diff --git a/docs/additional-documentation/adapt-id_token-validation.html b/docs/additional-documentation/adapt-id_token-validation.html index d733deac..960688df 100644 --- a/docs/additional-documentation/adapt-id_token-validation.html +++ b/docs/additional-documentation/adapt-id_token-validation.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/callback-after-login.html b/docs/additional-documentation/callback-after-login.html index 940275b4..99ef6d97 100644 --- a/docs/additional-documentation/callback-after-login.html +++ b/docs/additional-documentation/callback-after-login.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/code-flow-+-pcke.html b/docs/additional-documentation/code-flow-+-pcke.html index 8e4f51e0..df0086b6 100644 --- a/docs/additional-documentation/code-flow-+-pcke.html +++ b/docs/additional-documentation/code-flow-+-pcke.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/configure-custom-oauthstorage.html b/docs/additional-documentation/configure-custom-oauthstorage.html index a858cb00..48160158 100644 --- a/docs/additional-documentation/configure-custom-oauthstorage.html +++ b/docs/additional-documentation/configure-custom-oauthstorage.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/configure-library-for-implicit-flow-without-discovery-document.html b/docs/additional-documentation/configure-library-for-implicit-flow-without-discovery-document.html index 4ff822fa..fc84146f 100644 --- a/docs/additional-documentation/configure-library-for-implicit-flow-without-discovery-document.html +++ b/docs/additional-documentation/configure-library-for-implicit-flow-without-discovery-document.html @@ -43,11 +43,12 @@ + -

Configure Library for Implicit Flow (without discovery document)

+

Configure Library for Implicit Flow (without discovery document)

When you don't have a discovery document, you have to configure more properties manually:

Please note that the following sample uses the original config API. For information about the new config API have a look to the project's README above.

@Component({ ... })
diff --git a/docs/additional-documentation/custom-query-parameters.html b/docs/additional-documentation/custom-query-parameters.html
index 06d0192c..4a56d40c 100644
--- a/docs/additional-documentation/custom-query-parameters.html
+++ b/docs/additional-documentation/custom-query-parameters.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/additional-documentation/events.html b/docs/additional-documentation/events.html
index 34a9d583..3298c5b0 100644
--- a/docs/additional-documentation/events.html
+++ b/docs/additional-documentation/events.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/additional-documentation/getting-started.html b/docs/additional-documentation/getting-started.html
index 57de3494..e8b23232 100644
--- a/docs/additional-documentation/getting-started.html
+++ b/docs/additional-documentation/getting-started.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/additional-documentation/original-config-api.html b/docs/additional-documentation/original-config-api.html
index a48cd80d..a763f2a6 100644
--- a/docs/additional-documentation/original-config-api.html
+++ b/docs/additional-documentation/original-config-api.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/additional-documentation/preserving-state-(like-the-requested-url).html b/docs/additional-documentation/preserving-state-(like-the-requested-url).html
index 457a5891..0da119e9 100644
--- a/docs/additional-documentation/preserving-state-(like-the-requested-url).html
+++ b/docs/additional-documentation/preserving-state-(like-the-requested-url).html
@@ -43,11 +43,12 @@
 
 
 
+                   
 
 
 
 
-

Preserving State (like the Requested URL)

+

Preserving State (like the Requested URL)

When calling initImplicitFlow, you can pass an optional state which could be the requested url:

this.oauthService.initImplicitFlow('http://www.myurl.com/x/y/z');

After login succeeded, you can read this state:

this.oauthService.tryLogin({
diff --git a/docs/additional-documentation/refreshing-a-token.html b/docs/additional-documentation/refreshing-a-token.html
index 3cc34945..f1c2cd20 100644
--- a/docs/additional-documentation/refreshing-a-token.html
+++ b/docs/additional-documentation/refreshing-a-token.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
@@ -50,7 +51,7 @@
 

Refreshing a Token

The strategy to use for refreshing your token differs between implicit flow and code flow. Hence, you find here one separate section for both of them.

The last section shows how to automate refreshing for both flows.

-

Refreshing when using Code Flow (not Implicit Flow!)

+

Refreshing when using Code Flow (not Implicit Flow!)

For refreshing a token with implicit flow, please see section below!

@@ -59,7 +60,7 @@

Refreshing when usin

When using code flow, you can get an refresh_token. While the original standard DOES NOT allow this for SPAs, the mentioned document proposes to ease this limitation. However, it specifies a list of requirements one should take care about before using refresh_tokens. Please make sure you respect those requirements.

Please also note, that you have to request the offline_access scope to get an refresh token.

To refresh your token, just call the refresh method:

-
this.oauthService.refresh();

Refreshing when using Implicit Flow (not Code Flow!)

+
this.oauthService.refresh();

Refreshing when using Implicit Flow (not Code Flow!)

To refresh your tokens when using implicit flow you can use a silent refresh. This is a well-known solution that compensates the fact that implicit flow does not allow for issuing a refresh token. It uses a hidden iframe to get another token from the auth server. When the user is there still logged in (by using a cookie) it will respond without user interaction and provide new tokens.

To use this approach, setup a redirect uri for the silent refresh.

For this, you can set the property silentRefreshRedirectUri in the config object:

@@ -103,7 +104,7 @@

Refreshing when usin .silentRefresh() .then(info => console.debug('refresh ok', info)) .catch(err => console.error('refresh error', err));

When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property silentRefreshTimeout (msec). The default value is 20.000 (20 seconds).

-

Automatically refreshing a token when/ before it expires (Code Flow and Implicit Flow)

+

Automatically refreshing a token when/ before it expires (Code Flow and Implicit Flow)

To automatically refresh a token when/ some time before it expires, just call the following method after configuring the OAuthService:

this.oauthService.setupAutomaticSilentRefresh();

By default, this event is fired after 75% of the token's life time is over. You can adjust this factor by setting the property timeoutFactor to a value between 0 and 1. For instance, 0.5 means, that the event is fired after half of the life time is over and 0.33 triggers the event after a third.

diff --git a/docs/additional-documentation/routing-with-the-hashstrategy.html b/docs/additional-documentation/routing-with-the-hashstrategy.html index 2da73036..4aa01cc9 100644 --- a/docs/additional-documentation/routing-with-the-hashstrategy.html +++ b/docs/additional-documentation/routing-with-the-hashstrategy.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/server-side-rendering.html b/docs/additional-documentation/server-side-rendering.html index ae07a376..5f68d88b 100644 --- a/docs/additional-documentation/server-side-rendering.html +++ b/docs/additional-documentation/server-side-rendering.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/session-checks.html b/docs/additional-documentation/session-checks.html index 1ec8248d..64037ecd 100644 --- a/docs/additional-documentation/session-checks.html +++ b/docs/additional-documentation/session-checks.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/using-an-id-provider-that-fails-discovery-document-validation.html b/docs/additional-documentation/using-an-id-provider-that-fails-discovery-document-validation.html index 1c053195..3c1747b7 100644 --- a/docs/additional-documentation/using-an-id-provider-that-fails-discovery-document-validation.html +++ b/docs/additional-documentation/using-an-id-provider-that-fails-discovery-document-validation.html @@ -43,6 +43,7 @@ + diff --git a/docs/additional-documentation/using-password-flow.html b/docs/additional-documentation/using-password-flow.html index c622cc5d..f098e5ef 100644 --- a/docs/additional-documentation/using-password-flow.html +++ b/docs/additional-documentation/using-password-flow.html @@ -43,6 +43,7 @@ + @@ -51,7 +52,7 @@

Using Password-Flow

This section shows how to use the password flow, which demands the user to directly enter his or her password into the client.

Please note that from an OAuth2/OIDC perspective, the implicit flow is better suited for logging into a SPA and the flow described here should only be used, when a) there is a strong trust relations ship between the client and the auth server and when b) other flows are not possible.

-

Configure Library for Password Flow (using discovery document)

+

Configure Library for Password Flow (using discovery document)

To configure the library you just have to set some properties on startup. For this, the following sample uses the constructor of the AppComponent which is called before routing kicks in.

Please not, that this configuration is quite similar to the one for the implcit flow.

@Component({ ... })
@@ -85,7 +86,7 @@ 

Configure } -}

Configure Library for Password Flow (without discovery document)

+}

Configure Library for Password Flow (without discovery document)

In cases where you don't have an OIDC based discovery document you have to configure some more properties manually:

@Component({ ... })
 export class AppComponent {
@@ -116,7 +117,7 @@ 

Configure } -}

Fetching an Access Token by providing the current user's credentials

+}

Fetching an Access Token by providing the current user's credentials

this.oauthService.fetchTokenUsingPasswordFlow('max', 'geheim').then((resp) => {
 
       // Loading data about the user
diff --git a/docs/additional-documentation/using-systemjs.html b/docs/additional-documentation/using-systemjs.html
index 218512f0..399ecd57 100644
--- a/docs/additional-documentation/using-systemjs.html
+++ b/docs/additional-documentation/using-systemjs.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/additional-documentation/working-with-httpinterceptors.html b/docs/additional-documentation/working-with-httpinterceptors.html
index 36d88c12..9546ca28 100644
--- a/docs/additional-documentation/working-with-httpinterceptors.html
+++ b/docs/additional-documentation/working-with-httpinterceptors.html
@@ -43,6 +43,7 @@
 
 
 
+                   
 
 
 
diff --git a/docs/changelog.html b/docs/changelog.html
index a52479b1..8b7bcb29 100644
--- a/docs/changelog.html
+++ b/docs/changelog.html
@@ -33,7 +33,7 @@
 

Change Log

Lates features

See Release Notes

-

New Features in Version 2.1

+

New Features in Version 2.1

  • New Config API (the original one is still supported)
  • New convenience methods in OAuthService to streamline default tasks:
      @@ -74,6 +74,7 @@

      Breaking Changes in Version 2

      + diff --git a/docs/classes/AbstractValidationHandler.html b/docs/classes/AbstractValidationHandler.html index 0a9dab8c..d04b47f9 100644 --- a/docs/classes/AbstractValidationHandler.html +++ b/docs/classes/AbstractValidationHandler.html @@ -78,7 +78,7 @@

      Description

      Implements

      - ValidationHandler + ValidationHandler

      @@ -128,328 +128,331 @@
      Methods
      -

      - Methods -

      - - - - + + +
      - - - - Protected - Abstract +

      + Methods +

      + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
      + + + + Protected + Abstract calcHash - - - -
      - - calcHash(valueToHash: string, algorithm: string) -
      - -
      -

      Calculates the hash for the passed value by using + + + +

      + + calcHash(valueToHash: string, algorithm: string) +
      + +
      +

      Calculates the hash for the passed value by using the passed hash algorithm.

      -
      - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
      NameTypeOptional
      valueToHash - string - - No -
      algorithm - string - - No -
      -
      -
      -
      -
      - Returns : Promise<string> - -
      -
      - -
      -
      - - - - + + +
      - - - - Protected +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      valueToHash + string + + No +
      algorithm + string + + No +
      +
      +
      +
      +
      + Returns : Promise<string> + +
      +
      + +
      +
      + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
      + + + + Protected inferHashAlgorithm - - - -
      - - inferHashAlgorithm(jwtHeader: object) -
      - -
      -

      Infers the name of the hash algorithm to use + + + +

      + + inferHashAlgorithm(jwtHeader: object) +
      + +
      +

      Infers the name of the hash algorithm to use from the alg field of an id_token.

      -
      - Parameters : - - - - - - - - - - - - - - - - - - - - -
      NameTypeOptionalDescription
      jwtHeader - object - - No - -

      the id_token's parsed header

      - -
      -
      -
      -
      -
      - Returns : string - -
      -
      - -
      -
      - - - - + + +
      - - - - Async +
      + Parameters : + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptionalDescription
      jwtHeader + object + + No + +

      the id_token's parsed header

      + +
      +
      +
      +
      +
      + Returns : string + +
      +
      + +
      +
      + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
      + + + + Async validateAtHash - - - -
      - - validateAtHash(params: ValidationParams) -
      - -
      -

      Validates the at_hash in an id_token against the received access_token.

      + + + +
      + + validateAtHash(params: ValidationParams) +
      + +
      +

      Validates the at_hash in an id_token against the received access_token.

      -
      - Parameters : - - - - - - - - - - - - - - - - - - -
      NameTypeOptional
      params - ValidationParams - - No -
      -
      -
      -
      -
      - Returns : Promise<boolean> - -
      -
      - -
      -
      - - - - + + +
      - - - - Abstract +
      + Parameters : + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      params + ValidationParams + + No +
      +
      +
      +
      +
      + Returns : Promise<boolean> + +
      +
      + +
      +
      + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
      + + + + Abstract validateSignature - - - -
      - - validateSignature(validationParams: ValidationParams) -
      - -
      -

      Validates the signature of an id_token.

      + + + +
      + + validateSignature(validationParams: ValidationParams) +
      + +
      +

      Validates the signature of an id_token.

      -
      - Parameters : - - - - - - - - - - - - - - - - - - -
      NameTypeOptional
      validationParams - ValidationParams - - No -
      -
      -
      -
      -
      - Returns : Promise<any> - -
      -
      - -
      -
      +
      + Parameters : + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      validationParams + ValidationParams + + No +
      +
      +
      +
      +
      + Returns : Promise<any> + +
      +
      + +
      +
      -
@@ -547,6 +550,7 @@

+ diff --git a/docs/classes/AuthConfig.html b/docs/classes/AuthConfig.html index 46ec6788..29075639 100644 --- a/docs/classes/AuthConfig.html +++ b/docs/classes/AuthConfig.html @@ -334,7 +334,7 @@

Constructor

json - Partial<AuthConfig> + Partial<AuthConfig> @@ -406,7 +406,7 @@

- Type : string + Type : string @@ -475,7 +475,7 @@

- Type : object + Type : object @@ -590,7 +590,7 @@

- Type : string + Type : string @@ -635,7 +635,7 @@

- Type : number + Type : number @@ -672,7 +672,7 @@

- Type : string + Type : string @@ -712,7 +712,7 @@

- Type : object + Type : object @@ -754,7 +754,7 @@

- Type : string + Type : string @@ -795,7 +795,7 @@

- Type : string + Type : string @@ -835,7 +835,7 @@

- Type : string + Type : string @@ -949,7 +949,7 @@

- Type : any + Type : any @@ -983,7 +983,7 @@

- Type : string + Type : string @@ -1024,7 +1024,7 @@

- Type : string + Type : string @@ -1142,7 +1142,7 @@

- Type : string + Type : string @@ -1176,7 +1176,7 @@

- Type : string + Type : string @@ -1210,7 +1210,7 @@

- Type : string + Type : string @@ -1244,7 +1244,7 @@

- Type : string + Type : string @@ -1284,7 +1284,7 @@

- Type : string + Type : string @@ -1324,7 +1324,7 @@

- Type : string + Type : string @@ -1472,7 +1472,7 @@

- Type : string + Type : string @@ -1506,7 +1506,7 @@

- Type : string + Type : string @@ -1540,7 +1540,7 @@

- Type : string + Type : string @@ -1615,7 +1615,7 @@

- Type : number + Type : number @@ -1760,7 +1760,7 @@

- Type : number + Type : number @@ -1802,7 +1802,7 @@

- Type : string + Type : string @@ -1904,7 +1904,7 @@

- Type : string + Type : string @@ -2191,6 +2191,7 @@

+ diff --git a/docs/classes/CryptoHandler.html b/docs/classes/CryptoHandler.html index 8e099115..3dd28f41 100644 --- a/docs/classes/CryptoHandler.html +++ b/docs/classes/CryptoHandler.html @@ -107,99 +107,99 @@

Methods
-

- Methods -

- - - - + + + + + + + + + + + + + + + +
- - - - Abstract +

+ Methods +

+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract calcHash - - - -
- - calcHash(valueToHash: string, algorithm: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
valueToHash - string - - No -
algorithm - string - - No -
-
-
-
-
- Returns : Promise<string> - -
-
- -
-
+
+ +
+
+ + calcHash(valueToHash: string, algorithm: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
valueToHash + string + + No +
algorithm + string + + No +
+
+
+
+
+ Returns : Promise<string> + +
+
+ +
+
- @@ -214,6 +214,7 @@

+ diff --git a/docs/classes/JwksValidationHandler.html b/docs/classes/JwksValidationHandler.html index f2093e3d..26dd6e8b 100644 --- a/docs/classes/JwksValidationHandler.html +++ b/docs/classes/JwksValidationHandler.html @@ -77,7 +77,7 @@

Description

Extends

- AbstractValidationHandler + AbstractValidationHandler

@@ -220,7 +220,7 @@

- Type : number + Type : number @@ -249,588 +249,594 @@

-

- Methods -

- - - - + + +
- - - +

+ Methods +

+ + + + - - - + + + - - - - - - - - - - - - -
+ + + calcHash - - - -
+ + + +
calcHash(valueToHash: string, algorithm: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
valueToHash - string - - No -
algorithm - string - - No -
-
-
-
-
- Returns : Promise<string> - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
valueToHash + string + + No +
algorithm + string + + No +
+
+
+
+
+ Returns : Promise<string> + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + toByteArrayAsString - - - -
+ + + +
toByteArrayAsString(hexString: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
hexString - string - - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
hexString + string + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + validateSignature - - - -
+ + + +
validateSignature(params: ValidationParams, retry) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault value
params - ValidationParams - - No - -
retry - - No - - false -
-
-
-
-
- Returns : Promise<any> - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - - Protected - Abstract +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
params + ValidationParams + + No + +
retry + + No + + false +
+
+
+
+
+ Returns : Promise<any> + +
+
+ +
+
+ + + + - - - - - - - - + + + + + + + + - - - - + + + + + - - + - - -
+ + + + Protected + Abstract calcHash - - - -
- - calcHash(valueToHash: string, algorithm: string) -
-
Inherited from AbstractValidationHandler + + + +
+ + calcHash(valueToHash: string, algorithm: string) +
+ -
-
Defined in AbstractValidationHandler:86
-
+ +
-

Calculates the hash for the passed value by using +

+

Calculates the hash for the passed value by using the passed hash algorithm.

-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
valueToHash - string - - No -
algorithm - string - - No -
-
-
-
-
- Returns : Promise<string> - -
-
- -
-
- - - - + + +
- - - - Protected +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
valueToHash + string + + No +
algorithm + string + + No +
+
+
+
+
+ Returns : Promise<string> + +
+
+ +
+
+ + + + - - - - - - - - + + + + + + + + - - - - + + + + + - - + - - -
+ + + + Protected inferHashAlgorithm - - - -
- - inferHashAlgorithm(jwtHeader: object) -
-
Inherited from AbstractValidationHandler + + + +
+ + inferHashAlgorithm(jwtHeader: object) +
+ -
-
Defined in AbstractValidationHandler:69
-
+ +
-

Infers the name of the hash algorithm to use +

+

Infers the name of the hash algorithm to use from the alg field of an id_token.

-
- Parameters : - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
jwtHeader - object - - No - -

the id_token's parsed header

- -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + +
- - - - Async +
+ Parameters : + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
jwtHeader + object + + No + +

the id_token's parsed header

+ +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + - - - - - - - - + + + + + + + + - - - - + + + + + - - + - - -
+ + + + Async validateAtHash - - - -
- - validateAtHash(params: ValidationParams) -
-
Inherited from AbstractValidationHandler + + + +
+ + validateAtHash(params: ValidationParams) +
+ -
-
Defined in AbstractValidationHandler:44
-
+ +
-

Validates the at_hash in an id_token against the received access_token.

+
+

Validates the at_hash in an id_token against the received access_token.

-
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
params - ValidationParams - - No -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
-
- - - - + + +
- - - - Abstract +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
params + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + - - - - - - - - + + + + + + + + - - - - + + + + + - - + - - -
+ + + + Abstract validateSignature - - - -
- - validateSignature(validationParams: ValidationParams) -
-
Inherited from AbstractValidationHandler + + + +
+ + validateSignature(validationParams: ValidationParams) +
+ -
-
Defined in AbstractValidationHandler:39
-
+ +
-

Validates the signature of an id_token.

+
+

Validates the signature of an id_token.

-
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
validationParams - ValidationParams - - No -
-
-
-
-
- Returns : Promise<any> - -
-
- -
-
+
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
validationParams + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<any> + +
+
+ +
+
- @@ -997,6 +1003,7 @@

+ diff --git a/docs/classes/LoginOptions.html b/docs/classes/LoginOptions.html index 2798e17a..804a60fd 100644 --- a/docs/classes/LoginOptions.html +++ b/docs/classes/LoginOptions.html @@ -144,7 +144,7 @@

- Type : string + Type : string @@ -180,7 +180,7 @@

- Type : boolean + Type : boolean @@ -219,7 +219,7 @@

- Type : function + Type : function @@ -255,7 +255,7 @@

- Type : function + Type : function @@ -326,7 +326,7 @@

- Type : function + Type : function @@ -519,6 +519,7 @@

+ diff --git a/docs/classes/NullValidationHandler.html b/docs/classes/NullValidationHandler.html index 0b3e77c4..9dc258e2 100644 --- a/docs/classes/NullValidationHandler.html +++ b/docs/classes/NullValidationHandler.html @@ -77,7 +77,7 @@

Description

Implements

- ValidationHandler + ValidationHandler

@@ -116,154 +116,155 @@
Methods
-

- Methods -

- - - - + + + + + + + + + + + + +
- - - +

+ Methods +

+ + + + - - - + + + - - - - - - - - - - - - -
+ + + validateAtHash - - - -
+ + + +
validateAtHash(validationParams: ValidationParams) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
validationParams - ValidationParams - - No -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
validationParams + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + validateSignature - - - -
+ + + +
validateSignature(validationParams: ValidationParams) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
validationParams - ValidationParams - - No -
-
-
-
-
- Returns : Promise<any> - -
-
- -
-
+
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
validationParams + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<any> + +
+
+ +
+
- @@ -288,6 +289,7 @@

+ diff --git a/docs/classes/OAuthErrorEvent.html b/docs/classes/OAuthErrorEvent.html index ee693df2..30cd3f90 100644 --- a/docs/classes/OAuthErrorEvent.html +++ b/docs/classes/OAuthErrorEvent.html @@ -68,7 +68,7 @@

File

Extends

- OAuthEvent + OAuthEvent

@@ -106,7 +106,7 @@

Constructor

type - EventType + EventType @@ -118,7 +118,7 @@

Constructor

reason - object + object @@ -130,7 +130,7 @@

Constructor

params - object + object @@ -213,6 +213,7 @@

Constructor

+ diff --git a/docs/classes/OAuthEvent.html b/docs/classes/OAuthEvent.html index 56f93f9c..3ed87d61 100644 --- a/docs/classes/OAuthEvent.html +++ b/docs/classes/OAuthEvent.html @@ -100,7 +100,7 @@

Constructor

type - EventType + EventType @@ -183,6 +183,7 @@

Constructor

+ diff --git a/docs/classes/OAuthInfoEvent.html b/docs/classes/OAuthInfoEvent.html index 5e47033d..8f70f149 100644 --- a/docs/classes/OAuthInfoEvent.html +++ b/docs/classes/OAuthInfoEvent.html @@ -68,7 +68,7 @@

File

Extends

- OAuthEvent + OAuthEvent

@@ -106,7 +106,7 @@

Constructor

type - EventType + EventType @@ -118,7 +118,7 @@

Constructor

info - any + any @@ -201,6 +201,7 @@

Constructor

+ diff --git a/docs/classes/OAuthLogger.html b/docs/classes/OAuthLogger.html index 2e44cf32..f42f346d 100644 --- a/docs/classes/OAuthLogger.html +++ b/docs/classes/OAuthLogger.html @@ -126,431 +126,435 @@
Methods
-

- Methods -

- - - - + + + + + + + + + + + + + + + +
- - - - Abstract +

+ Methods +

+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract debug - - - -
- - debug(message?: any, ...optionalParams: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
message - any - - Yes -
optionalParams - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + debug(message?: any, ...optionalParams: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
message + any + + Yes +
optionalParams + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract error - - - -
- - error(message?: any, ...optionalParams: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
message - any - - Yes -
optionalParams - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + error(message?: any, ...optionalParams: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
message + any + + Yes +
optionalParams + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract info - - - -
- - info(message?: any, ...optionalParams: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
message - any - - Yes -
optionalParams - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + info(message?: any, ...optionalParams: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
message + any + + Yes +
optionalParams + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract log - - - -
- - log(message?: any, ...optionalParams: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
message - any - - Yes -
optionalParams - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + log(message?: any, ...optionalParams: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
message + any + + Yes +
optionalParams + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract warn - - - -
- - warn(message?: any, ...optionalParams: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
message - any - - Yes -
optionalParams - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
+
+ +
+
+ + warn(message?: any, ...optionalParams: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
message + any + + Yes +
optionalParams + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
- @@ -716,6 +720,7 @@

+ diff --git a/docs/classes/OAuthModuleConfig.html b/docs/classes/OAuthModuleConfig.html index 41b57240..a8ecd70f 100644 --- a/docs/classes/OAuthModuleConfig.html +++ b/docs/classes/OAuthModuleConfig.html @@ -115,7 +115,7 @@

- Type : OAuthResourceServerConfig + Type : OAuthResourceServerConfig @@ -160,6 +160,7 @@

+ diff --git a/docs/classes/OAuthNoopResourceServerErrorHandler.html b/docs/classes/OAuthNoopResourceServerErrorHandler.html index 2ff3e67b..737fc53a 100644 --- a/docs/classes/OAuthNoopResourceServerErrorHandler.html +++ b/docs/classes/OAuthNoopResourceServerErrorHandler.html @@ -69,7 +69,7 @@

File

Implements

- OAuthResourceServerErrorHandler + OAuthResourceServerErrorHandler

@@ -105,85 +105,85 @@
Methods
-

- Methods -

- - - - + + + + + + + + + + + + +
- - - +

+ Methods +

+ + + + - - - + + + - - - - - - - - - - - - -
+ + + handleError - - - -
+ + + +
handleError(err: HttpResponse) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
err - HttpResponse<any> - - No -
-
-
-
-
- Returns : Observable<any> - -
-
- -
-
+
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
err + HttpResponse<any> + + No +
+
+
+
+
+ Returns : Observable<any> + +
+
+ +
+
- @@ -207,6 +207,7 @@

+ diff --git a/docs/classes/OAuthResourceServerConfig.html b/docs/classes/OAuthResourceServerConfig.html index 62238966..8caa8795 100644 --- a/docs/classes/OAuthResourceServerConfig.html +++ b/docs/classes/OAuthResourceServerConfig.html @@ -160,7 +160,7 @@

- Type : function + Type : function @@ -187,7 +187,7 @@

- Type : boolean + Type : boolean @@ -232,6 +232,7 @@

+ diff --git a/docs/classes/OAuthResourceServerErrorHandler.html b/docs/classes/OAuthResourceServerErrorHandler.html index cb304d8e..240a5ac7 100644 --- a/docs/classes/OAuthResourceServerErrorHandler.html +++ b/docs/classes/OAuthResourceServerErrorHandler.html @@ -100,87 +100,87 @@

Methods
-

- Methods -

- - - - + + + + + + + + + + + + + + + +
- - - - Abstract +

+ Methods +

+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract handleError - - - -
- - handleError(err: HttpResponse) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
err - HttpResponse<any> - - No -
-
-
-
-
- Returns : Observable<any> - -
-
- -
-
+
+ +
+
+ + handleError(err: HttpResponse) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
err + HttpResponse<any> + + No +
+
+
+
+
+ Returns : Observable<any> + +
+
+ +
+
- @@ -204,6 +204,7 @@

+ diff --git a/docs/classes/OAuthStorage.html b/docs/classes/OAuthStorage.html index 96956a3b..1b1fe174 100644 --- a/docs/classes/OAuthStorage.html +++ b/docs/classes/OAuthStorage.html @@ -118,241 +118,243 @@

Methods
-

- Methods -

- - - - + + + + + + + + + + + + + + + +
- - - - Abstract +

+ Methods +

+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract getItem - - - -
- - getItem(key: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
key - string - - No -
-
-
-
-
- Returns : string | null - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + getItem(key: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
key + string + + No +
+
+
+
+
+ Returns : string | null + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract removeItem - - - -
- - removeItem(key: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
key - string - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Abstract + + + +
+ + removeItem(key: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
key + string + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Abstract setItem - - - -
- - setItem(key: string, data: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
key - string - - No -
data - string - - No -
-
-
-
-
- Returns : void - -
-
- -
-
+
+ +
+
+ + setItem(key: string, data: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
key + string + + No +
data + string + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
- @@ -518,6 +520,7 @@

+ diff --git a/docs/classes/OAuthSuccessEvent.html b/docs/classes/OAuthSuccessEvent.html index 2bf0523a..94d91ea3 100644 --- a/docs/classes/OAuthSuccessEvent.html +++ b/docs/classes/OAuthSuccessEvent.html @@ -68,7 +68,7 @@

File

Extends

- OAuthEvent + OAuthEvent

@@ -106,7 +106,7 @@

Constructor

type - EventType + EventType @@ -118,7 +118,7 @@

Constructor

info - any + any @@ -201,6 +201,7 @@

Constructor

+ diff --git a/docs/classes/ReceivedTokens.html b/docs/classes/ReceivedTokens.html index 95b941e5..e6e890bd 100644 --- a/docs/classes/ReceivedTokens.html +++ b/docs/classes/ReceivedTokens.html @@ -134,7 +134,7 @@

- Type : string + Type : string @@ -162,7 +162,7 @@

- Type : object + Type : object @@ -189,7 +189,7 @@

- Type : string + Type : string @@ -217,7 +217,7 @@

- Type : string + Type : string @@ -403,6 +403,7 @@

+ diff --git a/docs/classes/ValidationHandler.html b/docs/classes/ValidationHandler.html index da208fd7..dea5965c 100644 --- a/docs/classes/ValidationHandler.html +++ b/docs/classes/ValidationHandler.html @@ -114,164 +114,165 @@

Methods
-

- Methods -

- - - - + + +
- - - - Public - Abstract +

+ Methods +

+ + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
+ + + + Public + Abstract validateAtHash - - - -
- - validateAtHash(validationParams: ValidationParams) -
- -
-

Validates the at_hash in an id_token against the received access_token.

+ + + +
+ + validateAtHash(validationParams: ValidationParams) +
+ +
+

Validates the at_hash in an id_token against the received access_token.

-
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
validationParams - ValidationParams - - No -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
-
- - - - + + +
- - - - Public - Abstract +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
validationParams + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
+ + + + Public + Abstract validateSignature - - - -
- - validateSignature(validationParams: ValidationParams) -
- -
-

Validates the signature of an id_token.

+ + + +
+ + validateSignature(validationParams: ValidationParams) +
+ +
+

Validates the signature of an id_token.

-
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
validationParams - ValidationParams - - No -
-
-
-
-
- Returns : Promise<any> - -
-
- -
-
+
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
validationParams + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<any> + +
+
+ +
+
- @@ -369,6 +370,7 @@

+ diff --git a/docs/classes/WebHttpUrlEncodingCodec.html b/docs/classes/WebHttpUrlEncodingCodec.html index ce910dd3..da578d99 100644 --- a/docs/classes/WebHttpUrlEncodingCodec.html +++ b/docs/classes/WebHttpUrlEncodingCodec.html @@ -76,7 +76,7 @@

Description

Implements

- HttpParameterCodec + HttpParameterCodec

@@ -121,292 +121,295 @@
Methods
-

- Methods -

- - - - + + + + + + + + + + + + +
- - - +

+ Methods +

+ + + + - - - + + + - - - - - - - - - - - - -
+ + + decodeKey - - - -
+ + + +
decodeKey(k: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
k - string - - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
k + string + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + decodeValue - - - -
+ + + +
decodeValue(v: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
v - string - - No -
-
-
-
-
- Returns : any - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
v + string + + No +
+
+
+
+
+ Returns : any + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + encodeKey - - - -
+ + + +
encodeKey(k: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
k - string - - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + + + + + + + + + + +
- - - +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
k + string + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + - - - + + + - - - - - - - - - - - - -
+ + + encodeValue - - - -
+ + + +
encodeValue(v: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
v - string - - No -
-
-
-
-
- Returns : string - -
-
- -
-
+
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
v + string + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
- @@ -438,6 +441,7 @@

+ diff --git a/docs/dependencies.html b/docs/dependencies.html index 1f4590dc..841f1e9e 100644 --- a/docs/dependencies.html +++ b/docs/dependencies.html @@ -85,6 +85,7 @@ zone.js : ^0.9.1 + diff --git a/docs/index.html b/docs/index.html index 48fdedbb..cdde98a0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -64,8 +64,10 @@

Release Cycle

Contributions

@@ -513,7 +730,7 @@

Constructor

ngZone - NgZone + NgZone @@ -525,7 +742,7 @@

Constructor

http - HttpClient + HttpClient @@ -537,7 +754,7 @@

Constructor

storage - OAuthStorage + OAuthStorage @@ -549,7 +766,7 @@

Constructor

tokenValidationHandler - ValidationHandler + ValidationHandler @@ -561,7 +778,7 @@

Constructor

config - AuthConfig + AuthConfig @@ -573,7 +790,7 @@

Constructor

urlHelper - UrlHelperService + UrlHelperService @@ -585,7 +802,7 @@

Constructor

logger - OAuthLogger + OAuthLogger @@ -597,7 +814,7 @@

Constructor

crypto - CryptoHandler + CryptoHandler @@ -616,4734 +833,6503 @@

Constructor

-

- Methods -

- - - - + + +
- - - - Public +

+ Methods +

+ + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
+ + + + Public authorizationHeader - - - -
- - authorizationHeader() -
- -
-

Returns the auth-header that can be used + + + +

+ + authorizationHeader() +
+ +
+

Returns the auth-header that can be used to transmit the access_token to a service

-
- Returns : string +
+ Returns : string -
-
- - - - + + +
- - - - Protected + +
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected calcTimeout - - - -
- - calcTimeout(storedAt: number, expiration: number) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
storedAt - number - - No -
expiration - number - - No -
-
-
-
-
- Returns : number - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected + + + +
+ + calcTimeout(storedAt: number, expiration: number) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
storedAt + number + + No +
expiration + number + + No +
+
+
+
+
+ Returns : number + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected calculatePopupFeatures - - - -
- - calculatePopupFeatures(options: literal type) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
options - literal type - - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected + + + +
+ + calculatePopupFeatures(options: literal type) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
options + literal type + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected callOnTokenReceivedIfExists - - - -
- - callOnTokenReceivedIfExists(options: LoginOptions) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
options - LoginOptions - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected + + + +
+ + callOnTokenReceivedIfExists(options: LoginOptions) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
options + LoginOptions + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected canPerformSessionCheck - - - -
- - canPerformSessionCheck() -
- -
- -
- Returns : boolean - -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected - Async + + + +
+ + canPerformSessionCheck() +
+ +
+ +
+ Returns : boolean + +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected + Async checkAtHash - - - -
- - checkAtHash(params: ValidationParams) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
params - ValidationParams - - No -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected + + + +
+ + checkAtHash(params: ValidationParams) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
params + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected checkSession - - - -
- - checkSession() -
- -
- -
- Returns : void - -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Protected + + + +
+ + checkSession() +
+ +
+ +
+ Returns : void + +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Protected checkSignature - - - -
- - checkSignature(params: ValidationParams) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
params - ValidationParams - - No -
-
-
-
-
- Returns : Promise<any> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - clearAccessTokenTimer - - - -
- - clearAccessTokenTimer() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - clearIdTokenTimer - - - -
- - clearIdTokenTimer() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - configChanged - - - -
- - configChanged() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - configure - - - -
- - configure(config: AuthConfig) -
- -
-

Use this method to configure the service

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
config - AuthConfig - - No - -

the configuration

- -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - Async - createChallangeVerifierPairForPKCE - - - -
- - createChallangeVerifierPairForPKCE() -
- -
- -
- Returns : Promise<> - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - Async - createLoginUrl - - - -
- - createLoginUrl(state: string, loginHint: string, customRedirectUri: string, noPrompt, params: object) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault value
state - string - - No - - '' -
loginHint - string - - No - - '' -
customRedirectUri - string - - No - - '' -
noPrompt - - No - - false -
params - object - - No - - {} -
-
-
-
-
- Returns : {} - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - createNonce - - - -
- - createNonce() -
- -
- -
- Returns : Promise<string> - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - debug - - - -
- - debug(...args: any[]) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
args - any[] - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - fetchTokenUsingPasswordFlow - - - -
- - fetchTokenUsingPasswordFlow(userName: string, password: string, headers: HttpHeaders) -
- -
-

Uses password flow to exchange userName and password for an access_token.

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
userName - string - - No - - -
password - string - - No - - -
headers - HttpHeaders - - No - - new HttpHeaders() - -

Optional additional http-headers.

- -
-
-
-
-
- Returns : Promise<object> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - fetchTokenUsingPasswordFlowAndLoadUserProfile - - - -
- - fetchTokenUsingPasswordFlowAndLoadUserProfile(userName: string, password: string, headers: HttpHeaders) -
- -
-

Uses password flow to exchange userName and password for an -access_token. After receiving the access_token, this method -uses it to query the userinfo endpoint in order to get information -about the user in question.

-

When using this, make sure that the property oidc is set to false. -Otherwise stricter validations take place that make this operation -fail.

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
userName - string - - No - - -
password - string - - No - - -
headers - HttpHeaders - - No - - new HttpHeaders() - -

Optional additional http-headers.

- -
-
-
-
-
- Returns : Promise<object> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getAccessToken - - - -
- - getAccessToken() -
- -
-

Returns the current access_token.

-
- -
- Returns : string - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getAccessTokenExpiration - - - -
- - getAccessTokenExpiration() -
- -
-

Returns the expiration date of the access_token -as milliseconds since 1970.

-
- -
- Returns : number - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - getAccessTokenStoredAt - - - -
- - getAccessTokenStoredAt() -
- -
- -
- Returns : number - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getGrantedScopes - - - -
- - getGrantedScopes() -
- -
-

Returns the granted scopes from the server.

-
- -
- Returns : object - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getIdentityClaims - - - -
- - getIdentityClaims() -
- -
-

Returns the received claims about the user.

-
- -
- Returns : object - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getIdToken - - - -
- - getIdToken() -
- -
-

Returns the current id_token.

-
- -
- Returns : string - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getIdTokenExpiration - - - -
- - getIdTokenExpiration() -
- -
-

Returns the expiration date of the id_token -as milliseconds since 1970.

-
- -
- Returns : number - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - getIdTokenStoredAt - - - -
- - getIdTokenStoredAt() -
- -
- -
- Returns : number - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Public - getRefreshToken - - - -
- - getRefreshToken() -
- -
- -
- Returns : string - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - getSessionState - - - -
- - getSessionState() -
- -
- -
- Returns : string - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - handleLoginError - - - -
- - handleLoginError(options: LoginOptions, parts: object) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
options - LoginOptions - - No -
parts - object - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - handleSessionChange - - - -
- - handleSessionChange() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - handleSessionError - - - -
- - handleSessionError() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - - Protected - handleSessionUnchanged - - - -
- - handleSessionUnchanged() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- - - - Public - hasValidAccessToken - - - -
- - hasValidAccessToken() -
- -
-

Checkes, whether there is a valid access_token.

+ + + +
+ + checkSignature(params: ValidationParams) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
params + ValidationParams + + No +
+
+
+
+
+ Returns : Promise<any> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + clearAccessTokenTimer + + + +
+ + clearAccessTokenTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + clearIdTokenTimer + + + +
+ + clearIdTokenTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + configChanged + + + +
+ + configChanged() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + configure + + + +
+ + configure(config: AuthConfig) +
+ +
+

Use this method to configure the service

-
- Returns : boolean - -
-
- - - - - - - - - - - - - - - - - + + +
- - - - Public - hasValidIdToken - - - -
- - hasValidIdToken() -
- -
-

Checks whether there is a valid id_token.

+
+ Parameters : + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
config + AuthConfig + + No + +

the configuration

+ +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + Async + createChallangeVerifierPairForPKCE + + + +
+ + createChallangeVerifierPairForPKCE() +
+ +
+ +
+ Returns : Promise<> + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + Async + createLoginUrl + + + +
+ + createLoginUrl(state: string, loginHint: string, customRedirectUri: string, noPrompt, params: object) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
state + string + + No + + '' +
loginHint + string + + No + + '' +
customRedirectUri + string + + No + + '' +
noPrompt + + No + + false +
params + object + + No + + {} +
+
+
+
+
+ Returns : {} + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + createNonce + + + +
+ + createNonce() +
+ +
+ +
+ Returns : Promise<string> + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + debug + + + +
+ + debug(...args: any[]) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
args + any[] + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + fetchTokenUsingPasswordFlow + + + +
+ + fetchTokenUsingPasswordFlow(userName: string, password: string, headers: HttpHeaders) +
+ +
+

Uses password flow to exchange userName and password for an access_token.

-
- Returns : boolean - -
-
- - - - - - - - - +
+ Parameters : +
- - - - Public - initCodeFlow - - - -
- - initCodeFlow(additionalState: string, params: object) -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
userName + string + + No + + +
password + string + + No + + +
headers + HttpHeaders + + No + + new HttpHeaders() + +

Optional additional http-headers.

+ +
+ +
+
+
+ Returns : Promise<object> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - - +
+ Parameters : +
+ + + + Public + fetchTokenUsingPasswordFlowAndLoadUserProfile + + + +
+ + fetchTokenUsingPasswordFlowAndLoadUserProfile(userName: string, password: string, headers: HttpHeaders) +
+ +
+

Uses password flow to exchange userName and password for an +access_token. After receiving the access_token, this method +uses it to query the userinfo endpoint in order to get information +about the user in question.

+

When using this, make sure that the property oidc is set to false. +Otherwise stricter validations take place that make this operation +fail.

+
-
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
userName + string + + No + + +
password + string + + No + + +
headers + HttpHeaders + + No + + new HttpHeaders() + +

Optional additional http-headers.

+ +
+ +
+
+
+ Returns : Promise<object> + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + - + + +
+ + + + Public + getAccessToken + + + +
+ + getAccessToken() +
+ +
+

Returns the current access_token.

+
+
+ Returns : string -
-

Starts the authorization code flow and redirects to user to -the auth servers login url.

+
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + getAccessTokenExpiration + + + +
+ + getAccessTokenExpiration() +
+ +
+

Returns the expiration date of the access_token +as milliseconds since 1970.

-
- Parameters : - - - - - - - - - - - - - - - - - +
+ Returns : number -
- - - - - - - + + + + +
NameTypeOptionalDefault value
additionalState - string - - No - - '' -
params - object - - No - - {} -
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + getAccessTokenStoredAt + + + +
+ + getAccessTokenStoredAt() +
+ +
+ +
+ Returns : number + +
+
+ + + + + + + + + + + + + + + + + - -
+ + + + Public + getGrantedScopes + + + +
+ + getGrantedScopes() +
+ +
+

Returns the granted scopes from the server.

+
-
-
-
-
-
- Returns : void +
+ Returns : object -
-
- -
-
- - - - - - - - + + + + +
- - - - Public - initImplicitFlow - - - -
- - initImplicitFlow(additionalState: string, params: string | object) -
+ + + + + + + + + + + + + + + + + - - + + + + +
+ + + + Public + getIdentityClaims + + + +
+ + getIdentityClaims() +
+ +
+

Returns the received claims about the user.

+
+
+ Returns : object -
- -
+ + + + + + + + + + + + + + + + + - + + +
+ + + + Public + getIdToken + + + +
+ + getIdToken() +
+ +
+

Returns the current id_token.

+
+
+ Returns : string -
-

Starts the implicit flow and redirects to user to -the auth servers' login url.

+
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + getIdTokenExpiration + + + +
+ + getIdTokenExpiration() +
+ +
+

Returns the expiration date of the id_token +as milliseconds since 1970.

-
- Parameters : - - - - - - - - - - - - - - - - - - +
+ Returns : number -
+ + +
NameTypeOptionalDefault valueDescription
additionalState - string - - No - - '' - -

Optional state that is passed around. -You'll find this state in the property state after tryLogin logged in the user.

+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + getIdTokenStoredAt + + + +
+ + getIdTokenStoredAt() +
+ +
+ +
+ Returns : number + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + getRefreshToken + + + +
+ + getRefreshToken() +
+ +
+ +
+ Returns : string + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + getSessionState + + + +
+ + getSessionState() +
+ +
+ +
+ Returns : string + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + handleLoginError + + + +
+ + handleLoginError(options: LoginOptions, parts: object) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
options + LoginOptions + + No +
parts + object + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + handleSessionChange + + + +
+ + handleSessionChange() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + handleSessionError + + + +
+ + handleSessionError() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + handleSessionUnchanged + + + +
+ + handleSessionUnchanged() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + - - - - - - - - +
+ Returns : boolean -
+ + +
+ + + + Public + hasValidAccessToken + + + +
+ + hasValidAccessToken() +
+ +
+

Checkes, whether there is a valid access_token.

+
-
params - string | object - - No - - '' - -

Hash with additional parameter. If it is a string, it is used for the -parameter loginHint (for the sake of compatibility with former versions)

+ +
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + hasValidIdToken + + + +
+ + hasValidIdToken() +
+ +
+

Checks whether there is a valid id_token.

+
-
-
-
-
-
- Returns : void +
+ Returns : boolean -
-
- -
-
- - - - - - - - + + + + +
- - - - Public - initImplicitFlowInPopup - - - -
- - initImplicitFlowInPopup(options?: literal type) -
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + initCodeFlow + + + +
+ + initCodeFlow(additionalState: string, params: object) +
+ +
+

Starts the authorization code flow and redirects to user to +the auth servers login url.

+
+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
additionalState + string + + No + + '' +
params + object + + No + + {} +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - - +
+ Parameters : +
+ + + + Public + initImplicitFlow + + + +
+ + initImplicitFlow(additionalState: string, params: string | object) +
+ +
+

Starts the implicit flow and redirects to user to +the auth servers' login url.

+
-
- -
+ + + + + + + + + + + + + + + + + + + + + + + - - -
- Parameters : -
NameTypeOptionalDefault valueDescription
additionalState + string + + No + + '' + +

Optional state that is passed around. +You'll find this state in the property state after tryLogin logged in the user.

+
params + string | object +
+ + No +
- - - - - - - - - - - - - - + - - -
NameTypeOptional
options - literal type - - Yes - + '' +
- -
-
-
- Returns : any + +

Hash with additional parameter. If it is a string, it is used for the +parameter loginHint (for the sake of compatibility with former versions)

-
-
- -
- - - - - - - - + + +
- - - +
+ +
+
+
+ Returns : void + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Public + initImplicitFlowInPopup + + + +
+ + initImplicitFlowInPopup(options?: literal type) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
options + literal type + + Yes +
+
+
+
+
+ Returns : any + +
+
+ +
+
+ + + + - - - + + + - - - - - - - + + + + + + + + + + + + + +
+ + + initImplicitFlowInternal - - - -
+ + + +
initImplicitFlowInternal(additionalState: string, params: string | object) -
- -
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
additionalState + string + + No + + '' +
params + string | object + + No + + '' +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - + + +
+ + + + Public + initLoginFlow + + + +
+ + initLoginFlow(additionalState: string, params: object) +
+ +
+

Start the implicit flow or the code flow, +depending on your configuration.

+
-
+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
additionalState + string + + No + + '' +
params + object + + No + + {} +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + initSessionCheck + + + +
+ + initSessionCheck() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + loadDiscoveryDocument + + + +
+ + loadDiscoveryDocument(fullUrl: string) +
+ +
+

Loads the discovery document to configure most +properties of this service. The url of the discovery +document is infered from the issuer's url according +to the OpenId Connect spec. To use another url you +can pass it to to optional parameter fullUrl.

+
-
- Parameters : - - - - - - - - - - - - - - - - - +
+ Parameters : +
NameTypeOptionalDefault value
additionalState - string - - No - - '' -
+ + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
fullUrl + string + + No + + null +
+
+
+
+
+ Returns : Promise<object> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - - - - - - - +
+ Parameters : +
+ + + + Public + loadDiscoveryDocumentAndLogin + + + +
+ + loadDiscoveryDocumentAndLogin(options: LoginOptions) +
+ +
+

Convenience method that first calls loadDiscoveryDocumentAndTryLogin(...) +and if then chains to initImplicitFlow(), but only if there is no valid +IdToken or no valid AccessToken.

+
-
params - string | object - - No - - '' -
+ + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
options + LoginOptions + + No + + null + +

LoginOptions to pass through to tryLogin(...)

+ +
+ +
+
+
+ Returns : Promise<boolean> + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + - -
+ + + + Public + loadDiscoveryDocumentAndTryLogin + + + +
+ + loadDiscoveryDocumentAndTryLogin(options: LoginOptions) +
+ +
+

Convenience method that first calls loadDiscoveryDocument(...) and +directly chains using the then(...) part of the promise to call +the tryLogin(...) method.

+
-
- -
-
-
- Returns : void +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
options + LoginOptions + + No + + null + +

LoginOptions to pass through to tryLogin(...)

+ +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Protected + loadJwks + + + +
+ + loadJwks() +
+ +
+ +
+ Returns : Promise<object> + +
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + loadUserProfile + + + +
+ + loadUserProfile() +
+ +
+

Loads the user profile by accessing the user info endpoint defined by OpenId Connect.

+

When using this with OAuth2 password flow, make sure that the property oidc is set to false. +Otherwise stricter validations take place that make this operation fail.

+
- -
- -
-
- - - - - - - - +
+ Returns : Promise<object> +
+ + + +
- - - - Public - initLoginFlow - - - -
- - initLoginFlow(additionalState: string, params: object) -
+ + + + + + + + + + + + + + + + + - - +
+ Parameters : +
+ + + + Public + logOut + + + +
+ + logOut(noRedirectToLogoutUrl) +
+ +
+

Removes all tokens and logs the user out. +If a logout url is configured, the user is +redirected to it.

+
-
- -
+ + + + + + + + + + + + + + + + + +
NameOptionalDefault value
noRedirectToLogoutUrl + No + + false +
+
+
+
+
+ Returns : void + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Protected + padBase64 + + + +
+ + padBase64(base64data) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + +
NameOptional
base64data + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + processMessageEventMessage + + + +
+ + processMessageEventMessage(e: MessageEvent) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
e + MessageEvent + + No +
+
+
+
+
+ Returns : string + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + refreshInternal + + + +
+ + refreshInternal(params, noPrompt) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameOptional
params + No +
noPrompt + No +
+
+
+
+
+ Returns : any + +
+
+ +
+
+ + + + + + + + + + + + + + + + + - + + +
+ + + + Public + refreshToken + + + +
+ + refreshToken() +
+ +
+

Refreshes the token using a refresh_token. +This does not work for implicit flow, b/c +there is no refresh_token in this flow. +A solution for this is provided by the +method silentRefresh.

+
+
+ Returns : Promise<object> -
-

Start the implicit flow or the code flow, -depending on your configuration.

+
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + removeSessionCheckEventListener + + + +
+ + removeSessionCheckEventListener() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + removeSilentRefreshEventListener + + + +
+ + removeSilentRefreshEventListener() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + resetImplicitFlow + + + +
+ + resetImplicitFlow() +
+ +
+

Reset current implicit flow

-
- Parameters : - - - - - - - - - - - - - - - - - +
+ Returns : void -
- - - - - - - + + + + +
NameTypeOptionalDefault value
additionalState - string - - No - - '' -
params - object - - No - - {} -
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + restartRefreshTimerIfStillLoggedIn + + + +
+ + restartRefreshTimerIfStillLoggedIn() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + restartSessionChecksIfStillLoggedIn + + + +
+ + restartSessionChecksIfStillLoggedIn() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupAccessTokenTimer + + + +
+ + setupAccessTokenTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + - -
+ + + + Public + setupAutomaticSilentRefresh + + + +
+ + setupAutomaticSilentRefresh(params: object, listenTo?: "access_token" | "id_token" | "any", noPrompt) +
+ +
+

Will setup up silent refreshing for when the token is +about to expire. When the user is logged out via this.logOut method, the +silent refreshing will pause and not refresh the tokens until the user is +logged back in via receiving a new token.

+
-
-
-
-
-
- Returns : void +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
params + object + + No + + {} + +

Additional parameter to pass

+ +
listenTo + "access_token" | "id_token" | "any" + + Yes + + +

Setup automatic refresh of a specific token type

+ +
noPrompt + + No + + true + +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupExpirationTimers + + + +
+ + setupExpirationTimers() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupIdTokenTimer + + + +
+ + setupIdTokenTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupRefreshTimer + + + +
+ + setupRefreshTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupSessionCheck + + + +
+ + setupSessionCheck() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupSessionCheckEventListener + + + +
+ + setupSessionCheckEventListener() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + setupSilentRefreshEventListener + + + +
+ + setupSilentRefreshEventListener() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + - - -
+ + + + Public + silentRefresh + + + +
+ + silentRefresh(params: object, noPrompt) +
+ +
+

Performs a silent refresh for implicit flow. +Use this method to get new tokens when/before +the existing tokens expire.

+
- -
- -
-
+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault value
params + object + + No + + {} +
noPrompt + + No + + true +
+
+
+
+
+ Returns : Promise<OAuthEvent> + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Protected + startSessionCheckTimer + + + +
+ + startSessionCheckTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + stopSessionCheckTimer + + + +
+ + stopSessionCheckTimer() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + storeAccessTokenResponse + + + +
+ + storeAccessTokenResponse(accessToken: string, refreshToken: string, expiresIn: number, grantedScopes: String) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
accessToken + string + + No +
refreshToken + string + + No +
expiresIn + number + + No +
grantedScopes + String + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + storeIdToken + + + +
+ + storeIdToken(idToken: ParsedIdToken) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
idToken + ParsedIdToken + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + storeSessionState + + + +
+ + storeSessionState(sessionState: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
sessionState + string + + No +
+
+
+
+
+ Returns : void + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + tryLogin + + + +
+ + tryLogin(options: LoginOptions) +
+ +
+

Delegates to tryLoginImplicitFlow for the sake of competability

+
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
options + LoginOptions + + No + + null + +

Optional options.

+ +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + tryLoginCodeFlow + + + +
+ + tryLoginCodeFlow() +
+ +
+ +
+ Returns : Promise<void> + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + tryLoginImplicitFlow + + + +
+ + tryLoginImplicitFlow(options: LoginOptions) +
+ +
+

Checks whether there are tokens in the hash fragment +as a result of the implicit flow. These tokens are +parsed, validated and used to sign the user in to the +current client.

+
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDefault valueDescription
options + LoginOptions + + No + + null + +

Optional options.

+ +
+
+
+
+
+ Returns : Promise<boolean> + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + validateDiscoveryDocument + + + +
+ + validateDiscoveryDocument(doc: OidcDiscoveryDoc) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
doc + OidcDiscoveryDoc + + No +
+
+
+
+
+ Returns : boolean + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + validateNonce + + + +
+ + validateNonce(nonceInState: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
nonceInState + string + + No +
+
+
+
+
+ Returns : boolean + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + validateUrlAgainstIssuer + + + +
+ + validateUrlAgainstIssuer(url: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
url + string + + No +
+
+
+
+
+ Returns : any + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + validateUrlForHttps + + + +
+ + validateUrlForHttps(url: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
url + string + + No +
+
+
+
+
+ Returns : boolean + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + validateUrlFromDiscoveryDocument + + + +
+ + validateUrlFromDiscoveryDocument(url: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
url + string + + No +
+
+
+
+
+ Returns : string[] + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + Protected + waitForSilentRefreshAfterSessionChange + + + +
+ + waitForSilentRefreshAfterSessionChange() +
+ +
+ +
+ Returns : void + +
+
+
+
+ +

+ Properties +

- - - - + + + - - -
- + Protected - initSessionCheck - - + _storage +
- - initSessionCheck() -
+ Type : OAuthStorage +
- +
- -
- Returns : void - -
-
- - - - + + + - - - - - + - -
- -
- -
- + - Public - loadDiscoveryDocument - - + Protected + accessTokenTimeoutSubscription +
- - loadDiscoveryDocument(fullUrl: string) -
+ Type : Subscription +
- +
-

Loads the discovery document to configure most -properties of this service. The url of the discovery -document is infered from the issuer's url according -to the OpenId Connect spec. To use another url you -can pass it to to optional parameter fullUrl.

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault value
fullUrl - string - - No - - null -
-
-
-
-
- Returns : Promise<object> +
- - - - + + + + + + - - -
- + - Public - loadDiscoveryDocumentAndLogin - - + Protected + discoveryDocumentLoadedSubject +
- - loadDiscoveryDocumentAndLogin(options: LoginOptions) -
+ Type : Subject<object> +
+ Default value : new Subject<object>() +
- +
-

Convenience method that first calls loadDiscoveryDocumentAndTryLogin(...) -and if then chains to initImplicitFlow(), but only if there is no valid -IdToken or no valid AccessToken.

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
options - LoginOptions - - No - - null - -

LoginOptions to pass through to tryLogin(...)

- -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
-
- - - - + + + - +
- + Public - loadDiscoveryDocumentAndTryLogin - - + events +
- - loadDiscoveryDocumentAndTryLogin(options: LoginOptions) -
+ Type : Observable<OAuthEvent> +
- +
-

Convenience method that first calls loadDiscoveryDocument(...) and -directly chains using the then(...) part of the promise to call -the tryLogin(...) method.

+

Informs about events, like token_received or token_expires. +See the string enum EventType for a full list of event types.

- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
options - LoginOptions - - No - - null - -

LoginOptions to pass through to tryLogin(...)

- -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
- - - - + + + + + + - - -
- + Protected - loadJwks - - + eventsSubject +
- - loadJwks() -
+ Type : Subject<OAuthEvent> +
+ Default value : new Subject<OAuthEvent>() +
- +
- -
- Returns : Promise<object> - -
-
- - - - + + + + + + - - -
- + - Public - loadUserProfile - - + Protected + grantTypesSupported +
- - loadUserProfile() -
+ Type : Array<string> +
+ Default value : [] +
- +
-

Loads the user profile by accessing the user info endpoint defined by OpenId Connect.

-

When using this with OAuth2 password flow, make sure that the property oidc is set to false. -Otherwise stricter validations take place that make this operation fail.

-
- -
- Returns : Promise<object> - -
-
- - - - + + + - - -
- + - Public - logOut - - + Protected + idTokenTimeoutSubscription +
- - logOut(noRedirectToLogoutUrl) -
+ Type : Subscription +
- +
-

Removes all tokens and logs the user out. -If a logout url is configured, the user is -redirected to it.

-
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameOptionalDefault value
noRedirectToLogoutUrl - No - - false -
-
-
-
-
- Returns : void - -
-
- -
-
+ + + + + + + + + +
- + Protected - padBase64 - - + inImplicitFlow +
+ Default value : false +
+ +
+ + + + + - - -
- - padBase64(base64data) + + + + Protected + jwksUri + +
+ Type : string - +
- +
- -
- Parameters : - - - - - - - - - - - - - - - - -
NameOptional
base64data - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + - - -
- + Protected - processMessageEventMessage - - + sessionCheckEventListener +
- - processMessageEventMessage(e: MessageEvent) -
+ Type : EventListener +
- +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
e - MessageEvent - - No -
-
-
-
-
- Returns : string - -
-
- -
-
- - - - + + + - - -
- + Protected - refreshInternal - - + sessionCheckTimer +
- - refreshInternal(params, noPrompt) -
+ Type : any +
- +
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - -
NameOptional
params - No -
noPrompt - No -
-
-
-
-
- Returns : any - -
-
- -
-
- - - - + + + - - -
- + - Public - refreshToken - - + Protected + silentRefreshPostMessageEventListener +
- - refreshToken() -
+ Type : EventListener +
- +
-

Refreshes the token using a refresh_token. -This does not work for implicit flow, b/c -there is no refresh_token in this flow. -A solution for this is provided by the -method silentRefresh.

-
- -
- Returns : Promise<object> - -
-
- - - - + + + - - -
- + Protected - removeSessionCheckEventListener - - + silentRefreshSubject +
- - removeSessionCheckEventListener() -
+ Type : string +
- +
- -
- Returns : void - -
-
- - - - + + + + + + - +
- + - Protected - removeSilentRefreshEventListener - - + Public + Optional + state +
- - removeSilentRefreshEventListener() -
+ Type : string +
+ Default value : '' +
- +
- -
- Returns : void - -
+

The received (passed around) state, when logging +in with implicit flow.

+
- - - - + + + - +
- + Public - resetImplicitFlow - - + tokenValidationHandler +
- - resetImplicitFlow() -
+ Type : ValidationHandler +
- +
-

Reset current implicit flow

+

The ValidationHandler used to validate received +id_tokens.

- -
- Returns : void - -
- - - - - + + + + + + - - - + +
- + - Protected - restartRefreshTimerIfStillLoggedIn - - + Public + Optional + clearHashAfterLogin +
- - restartRefreshTimerIfStillLoggedIn() -
+ Default value : true +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:60 +
- -
- Returns : void - -
+
+

Defines whether to clear the hash fragment after logging in.

+
- - - - + + + + + + + + + - +
- + Public - restartSessionChecksIfStillLoggedIn - - + Optional + clientId +
- - restartSessionChecksIfStillLoggedIn() -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:5 +
- -
- Returns : void - -
+

The client's id as registered with the auth server

+
- - - - - + + + - +
- + - Protected - setupAccessTokenTimer - - + Public + Optional + clockSkewInSec +
- - setupAccessTokenTimer() -
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:222 +
- -
- Returns : void - -
+

The window of time (in seconds) to allow the current time to deviate when validating id_token's iat and exp values.

+
- - - - + + + + + + + + + - +
- + Public - setupAutomaticSilentRefresh - - + Optional + customQueryParams +
- - setupAutomaticSilentRefresh(params: object, listenTo?: "access_token" | "id_token" | "any", noPrompt) -
+ Type : object +
+ Default value : null +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:142 +
-

Will setup up silent refreshing for when the token is -about to expire. When the user is logged out via this.logOut method, the -silent refreshing will pause and not refresh the tokens until the user is -logged back in via receiving a new token.

+

Map with additional query parameter that are appended to +the request when initializing implicit flow.

- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
params - object - - No - - {} - -

Additional parameter to pass

- -
listenTo - "access_token" | "id_token" | "any" - - Yes - - -

Setup automatic refresh of a specific token type

- -
noPrompt - - No - - true - -
-
-
-
-
- Returns : void - -
-
- -
- - - - - + + + + + + - +
- + - Protected - setupExpirationTimers - - + Public + Optional + disableAtHashCheck +
- - setupExpirationTimers() -
+ Default value : false +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:183 +
- -
- Returns : void - -
+

This property has been introduced to disable at_hash checks +and is indented for Identity Provider that does not deliver +an at_hash EVEN THOUGH its recommended by the OIDC specs. +Of course, when disabling these checks the we are bypassing +a security check which means we are more vulnerable.

+
- - - - - + + + + + + - +
- + - Protected - setupIdTokenTimer - - + Public + Optional + disablePKCE +
- - setupIdTokenTimer() -
+ Default value : false +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:229 +
- -
- Returns : void - -
+

Code Flow is by defauld used together with PKCI which is also higly recommented. +You can disbale it here by setting this flag to true. +https://tools.ietf.org/html/rfc7636#section-1.1

+
- - - - + + + + + + + + + - +
- + - Protected - setupRefreshTimer - - + Public + Optional + dummyClientSecret +
- - setupRefreshTimer() -
+ Type : string +
+ Default value : null +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:115 +
- -
- Returns : void - -
+

Some auth servers don't allow using password flow +w/o a client secret while the standards do not +demand for it. In this case, you can set a password +here. As this password is exposed to the public +it does not bring additional security and is therefore +as good as using no password.

+
- - - - + + + + + + - +
- + - Protected - setupSessionCheck - - + Public + Optional + fallbackAccessTokenExpirationTimeInSec +
- - setupSessionCheck() -
+ Type : number +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:204 +
- -
- Returns : void - -
+

According to rfc6749 it is recommended (but not required) that the auth +server exposes the access_token's life time in seconds. +This is a fallback value for the case this value is not exposed.

+
- - - - + + + + + + + + + - +
- + - Protected - setupSessionCheckEventListener - - + Public + Optional + issuer +
- - setupSessionCheckEventListener() -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:50 +
- -
- Returns : void - -
+

The issuer's uri.

+
- - - + + + + + + + + + - +
- + - Protected - setupSilentRefreshEventListener - - - -
- - setupSilentRefreshEventListener() + Public + Optional + jwks + +
+ Type : object - +
+ Default value : null +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:136 +
- -
- Returns : void - -
+

JSON Web Key Set (https://tools.ietf.org/html/rfc7517) +with keys used to validate received id_tokens. +This is taken out of the disovery document. Can be set manually too.

+
- - - - + + + + + + + + + - +
- + Public - silentRefresh - - + Optional + loginUrl +
- - silentRefresh(params: object, noPrompt) -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:22 +
-

Performs a silent refresh for implicit flow. -Use this method to get new tokens when/before -the existing tokens expire.

+

The auth server's endpoint that allows to log +the user in when using implicit flow.

- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault value
params - object - - No - - {} -
noPrompt - - No - - true -
-
-
-
-
- Returns : Promise<OAuthEvent> - -
-
- -
- - - - + + + + + + + + + - +
- + - Protected - startSessionCheckTimer - - + Public + Optional + logoutUrl +
- - startSessionCheckTimer() -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:55 +
- -
- Returns : void - -
+

The logout url.

+
- - - - + + + + + + + + + - +
- + - Protected - stopSessionCheckTimer - - + Public + Optional + nonceStateSeparator +
- - stopSessionCheckTimer() -
+ Type : string +
+ Default value : ';' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:212 +
- -
- Returns : void - -
+

final state sent to issuer is built as follows: +state = nonce + nonceStateSeparator + additional state +Default separator is ';' (encoded %3B). +In rare cases, this character might be forbidden or inconvenient to use by the issuer so it can be customized.

+
- - - - - + + + + + + - +
- + - Protected - storeAccessTokenResponse - - + Public + Optional + oidc +
- - storeAccessTokenResponse(accessToken: string, refreshToken: string, expiresIn: number, grantedScopes: String) -
+ Default value : true +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:37 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
accessToken - string - - No -
refreshToken - string - - No -
expiresIn - number - - No -
grantedScopes - String - - No -
-
-
-
-
- Returns : void - -
-
- -
+

Defines whether to use OpenId Connect during +implicit flow.

+
- - - - - + + + + + + - +
- + - Protected - storeIdToken - - + Public + Optional + openUri +
- - storeIdToken(idToken: ParsedIdToken) -
+ Default value : () => {...} +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:242 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
idToken - ParsedIdToken - - No -
-
-
-
-
- Returns : void - -
-
- -
+

This property allows you to override the method that is used to open the login url, +allowing a way for implementations to specify their own method of routing to new +urls.

+
+ + + + + + + + + + + + + + + +
- + - Protected - storeSessionState - - + Public + Optional + options +
+ Type : any + +
+ Default value : null +
+
Inherited from AuthConfig +
+
+
Defined in AuthConfig:45 +
+
+ + + + + + + + + + + - +
- - storeSessionState(sessionState: string) + + + + Public + Optional + postLogoutRedirectUri + +
+ Type : string - +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:16 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
sessionState - string - - No -
-
-
-
-
- Returns : void - -
-
- -
+

An optional second redirectUri where the auth server +redirects the user to after logging out.

+
- - - - + + + + + + + + + - +
- + Public - tryLogin - - + Optional + redirectUri +
- - tryLogin(options: LoginOptions) -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:10 +
-

Delegates to tryLoginImplicitFlow for the sake of competability

+

The client's redirectUri as registered with the auth server

- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
options - LoginOptions - - No - - null - -

Optional options.

- -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
- - - - - + + + + + + - +
- + Public - tryLoginCodeFlow - - + Optional + requestAccessToken +
- - tryLoginCodeFlow() -
+ Default value : true +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:43 +
- -
- Returns : Promise<void> - -
+

Defines whether to request an access token during +implicit flow.

+
- - - - + + + + + + + + + - +
- + Public - tryLoginImplicitFlow - - + Optional + requireHttps +
- - tryLoginImplicitFlow(options: LoginOptions) -
+ Type : boolean | "remoteOnly" +
+ Default value : 'remoteOnly' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:123 +
-

Checks whether there are tokens in the hash fragment -as a result of the implicit flow. These tokens are -parsed, validated and used to sign the user in to the -current client.

+

Defines whether https is required. +The default value is remoteOnly which only allows +http for localhost, while every other domains need +to be used with https.

- -
- Parameters : - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDefault valueDescription
options - LoginOptions - - No - - null - -

Optional options.

- -
-
-
-
-
- Returns : Promise<boolean> - -
-
- -
- - - - + + + + + + + + + - - - - - + +
- + - Protected - validateDiscoveryDocument - - + Public + Optional + resource +
- - validateDiscoveryDocument(doc: OidcDiscoveryDoc) -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:29 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
doc - OidcDiscoveryDoc - - No -
-
-
-
-
- Returns : boolean - -
-
- -
-
- - - - + + + + + + + + + + +
- + - Protected - validateNonce - - + Public + Optional + responseType +
- - validateNonce(nonceInState: string) -
+ Type : string +
+ Default value : '' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:72 +
+ + + + + -
+ + + + Public + Optional + rngUrl + + +
+ Type : string -
- Parameters : - - - - - - - - - - - - - - - + + + + + + + + + + + - - -
NameTypeOptional
nonceInState - string - - No -
+ Default value : '' +
+
Inherited from AuthConfig +
+
+
Defined in AuthConfig:31 +
+
-
-
-
-
- Returns : boolean -
-
- -
-
- - - - + + + + + + + + + - +
- + - Protected - validateUrlAgainstIssuer - - + Public + Optional + scope +
- - validateUrlAgainstIssuer(url: string) -
+ Type : string +
+ Default value : 'openid profile' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:27 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
url - string - - No -
-
-
-
-
- Returns : any - -
-
- -
+

The requested scopes

+
- - - - + + + + + + + + + - +
- + - Protected - validateUrlForHttps - - + Public + Optional + sessionCheckIFrameName +
- - validateUrlForHttps(url: string) -
+ Type : string +
+ Default value : 'angular-oauth-oidc-check-session-iframe' +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:174 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
url - string - - No -
-
-
-
-
- Returns : boolean - -
-
- -
+

Name of the iframe to use for session checks

+
- - - - + + + + + + + + + - +
- + - Protected - validateUrlFromDiscoveryDocument - - + Public + Optional + sessionCheckIFrameUrl +
- - validateUrlFromDiscoveryDocument(url: string) -
+ Type : string +
+ Default value : null +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:169 +
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
url - string - - No -
-
-
-
-
- Returns : string[] - -
-
- -
+

Url for the iframe used for session checks

+
- - - - - + + + + + + - - - -
- + - Protected - waitForSilentRefreshAfterSessionChange - - + Public + Optional + sessionCheckIntervall +
- - waitForSilentRefreshAfterSessionChange() -
+ Default value : 3 * 1000 +
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:164 +
- -
- Returns : void - -
+

Interval in msec for checking the session +according to http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification

+
-
- -
- -

- Properties -

+ + + + + + + + + +
- + - Protected - _storage - + Public + Optional + sessionChecksEnabled +
- Type : OAuthStorage - + Default value : false
+
Inherited from AuthConfig +
+
- +
Defined in AuthConfig:158 +
+

If true, the lib will try to check whether the user +is still logged in on a regular basis as described +in http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification

+
+
@@ -5351,27 +7337,43 @@

- + - Protected - accessTokenTimeoutSubscription - + Public + Optional + showDebugInformation + - Type : Subscription - + Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:80 +
+ + +

Defines whether additional debug information should +be shown at the console. Note that in certain browsers +the verbosity of the console needs to be explicitly set +to include Debug level messages.

+
+ + @@ -5379,29 +7381,37 @@

- + - Protected - discoveryDocumentLoadedSubject - + Public + Optional + silentRefreshIFrameName + - Type : Subject<object> + Type : string - Default value : new Subject<object>() + Default value : 'angular-oauth-oidc-silent-refresh-iframe' + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:144 +
@@ -5412,34 +7422,40 @@

- + Public - events - + Optional + silentRefreshMessagePrefix + - Type : Observable<OAuthEvent> + Type : string + + + Default value : '' + + + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:87 +
- - -

Informs about events, like token_received or token_expires. -See the string enum EventType for a full list of event types.

-
- - @@ -5447,32 +7463,46 @@

- + - Protected - eventsSubject - + Public + Optional + silentRefreshRedirectUri + - Type : Subject<OAuthEvent> + Type : string - Default value : new Subject<OAuthEvent>() + Default value : '' + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:85 +
+ + +

The redirect uri used when doing silent refresh.

+
+ + @@ -5480,32 +7510,41 @@

- + - Protected - grantTypesSupported - + Public + Optional + silentRefreshShowIFrame + - Type : Array<string> - - - - - - Default value : [] + Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:93 +
+ + +

Set this to true to display the iframe used for +silent refresh for debugging.

+
+ + @@ -5513,27 +7552,46 @@

- + - Protected - idTokenTimeoutSubscription - + Public + Optional + silentRefreshTimeout + - Type : Subscription + Type : number + + + Default value : 1000 * 20 + + + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:105 +
+ + +

Timeout for silent refresh.

+
+ + @@ -5541,12 +7599,13 @@

- + - Protected - inImplicitFlow - + Public + Optional + skipIssuerCheck + @@ -5555,12 +7614,26 @@

Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:197 +
+ + +

Defined whether to skip the validation of the issuer in the discovery document. +Normally, the discovey document's url starts with the url of the issuer.

+
+ + @@ -5568,27 +7641,41 @@

- + - Protected - jwksUri - + Public + Optional + skipSubjectCheck + - Type : string - + Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:189 +
+ + +

Defines wether to check the subject of a refreshed token after silent refresh. +Normally, it should be the same as before.

+
+ + @@ -5596,27 +7683,41 @@

- + - Protected - sessionCheckEventListener - + Public + Optional + strictDiscoveryDocumentValidation + - Type : EventListener - + Default value : true + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:129 +
+ + +

Defines whether every url provided by the discovery +document has to start with the issuer's url.

+
+ + @@ -5624,27 +7725,48 @@

- + - Protected - sessionCheckTimer - + Public + Optional + timeoutFactor + - Type : any + Type : number + + + Default value : 0.75 + + + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:151 +
+ + +

Defines when the token_timeout event should be raised. +If you set this to the default value 0.75, the event +is triggered after 75% of the token's life time.

+
+ + @@ -5652,27 +7774,46 @@

- + - Protected - silentRefreshPostMessageEventListener - + Public + Optional + tokenEndpoint + - Type : EventListener + Type : string + + + Default value : null + + + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:65 +
+ + +

Url of the token endpoint as defined by OpenId Connect and OAuth 2.

+
+ + @@ -5680,27 +7821,40 @@

- + - Protected - silentRefreshSubject - + Public + Optional + useHttpBasicAuth + - Type : string - + Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:217 +
+ + +

Set this to true to use HTTP BASIC auth for password flow

+
+ + @@ -5708,40 +7862,34 @@

- + Public Optional - state - + useIdTokenHintForSilentRefresh + - Type : string - - - - - - Default value : '' + Default value : false + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:191 +
- - -

The received (passed around) state, when logging -in with implicit flow.

-
- - @@ -5749,31 +7897,43 @@

- + Public - tokenValidationHandler - + Optional + userinfoEndpoint + - Type : ValidationHandler + Type : string + + + Default value : null + + + + +
Inherited from AuthConfig +
+ + - +
Defined in AuthConfig:70 +
-

The ValidationHandler used to validate received -id_tokens.

+

Url of the userinfo endpoint as defined by OpenId Connect.

@@ -7990,6 +10150,7 @@

+ diff --git a/docs/injectables/UrlHelperService.html b/docs/injectables/UrlHelperService.html index c71a1110..3b5806c0 100644 --- a/docs/injectables/UrlHelperService.html +++ b/docs/injectables/UrlHelperService.html @@ -61,6 +61,7 @@

File

+

Index

@@ -97,154 +98,155 @@
Methods
-

- Methods -

-
- - - + + + + + + + + + + + + + + + +
- - - - Public +

+ Methods +

+ + + + - - - - - - - - - - - - - - - -
+ + + + Public getHashFragmentParams - - - -
- - getHashFragmentParams(customHashFragment?: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
customHashFragment - string - - Yes -
-
-
-
-
- Returns : object - -
-
- -
-
- - - - + + + + + + + + + + + + + + + +
- - - - Public + + + +
+ + getHashFragmentParams(customHashFragment?: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
customHashFragment + string + + Yes +
+
+
+
+
+ Returns : object + +
+
+ +
+
+ + + + - - - - - - - - - - - - - - - -
+ + + + Public parseQueryString - - - -
- - parseQueryString(queryString: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
queryString - string - - No -
-
-
-
-
- Returns : object - -
-
- -
-
+
+ +
+
+ + parseQueryString(queryString: string) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
queryString + string + + No +
+
+
+
+
+ Returns : object + +
+
+ +
+
-
@@ -324,6 +326,7 @@

+ diff --git a/docs/interceptors/DefaultOAuthInterceptor.html b/docs/interceptors/DefaultOAuthInterceptor.html index 44a0f824..d4d0afe8 100644 --- a/docs/interceptors/DefaultOAuthInterceptor.html +++ b/docs/interceptors/DefaultOAuthInterceptor.html @@ -97,7 +97,7 @@

Constructor

-constructor(authStorage: OAuthStorage, errorHandler: OAuthResourceServerErrorHandler, moduleConfig: OAuthModuleConfig) +constructor(authStorage: OAuthStorage, oAuthService: OAuthService, errorHandler: OAuthResourceServerErrorHandler, moduleConfig: OAuthModuleConfig) @@ -123,7 +123,7 @@

Constructor

authStorage - OAuthStorage + OAuthStorage @@ -132,10 +132,10 @@

Constructor

- errorHandler + oAuthService - OAuthResourceServerErrorHandler + OAuthService @@ -144,142 +144,156 @@

Constructor

- moduleConfig + errorHandler - OAuthModuleConfig + OAuthResourceServerErrorHandler No - - - - - - - - -
- -
- -

- Methods -

- - - - - - - - - - - - - - - - -
- - - - Public - intercept - - - -
- - intercept(req: HttpRequest, next: HttpHandler) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - + + - + -
NameTypeOptional
req - HttpRequest<any> - - No -
nextmoduleConfig - HttpHandler + OAuthModuleConfig No
-
-
-
- Returns : Observable<HttpEvent<any>> - -
-
- -
+
+ +

+ Methods +

+ + + + + + + + + + + + + + + + + + + +
+ + + + Public + intercept + + + +
+ + intercept(req: HttpRequest, next: HttpHandler) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
req + HttpRequest<any> + + No +
next + HttpHandler + + No +
+
+
+
+
+ Returns : Observable<HttpEvent<any>> + +
+
+ +
+
+
-
import { Injectable, Inject, Optional } from '@angular/core';
-import { OAuthService } from '../oauth-service';
-import { OAuthStorage } from '../types';
+        
import { Injectable, Optional } from '@angular/core';
+
 import {
-    HttpEvent,
-    HttpHandler,
-    HttpInterceptor,
-    HttpRequest,
-    HttpResponse,
-    HttpErrorResponse
+  HttpEvent,
+  HttpHandler,
+  HttpInterceptor,
+  HttpRequest,
 } from '@angular/common/http';
-import { Observable } from 'rxjs';
-import { catchError } from 'rxjs/operators';
+import { Observable, of, merge } from 'rxjs';
+import { catchError, filter, map, take, mergeMap, timeout } from 'rxjs/operators';
 import { OAuthResourceServerErrorHandler } from './resource-server-error-handler';
 import { OAuthModuleConfig } from '../oauth-module.config';
-import { isPlatformBrowser } from '@angular/common';
+import { OAuthStorage } from '../types';
+import { OAuthService } from '../oauth-service';
+
+const WAIT_FOR_TOKEN_RECEIVED = 1000;
 
 @Injectable()
 export class DefaultOAuthInterceptor implements HttpInterceptor {
+
     constructor(
         private authStorage: OAuthStorage,
+        private oAuthService: OAuthService,
         private errorHandler: OAuthResourceServerErrorHandler,
         @Optional() private moduleConfig: OAuthModuleConfig
     ) { }
@@ -296,37 +310,55 @@ 

return true; } - public intercept( - req: HttpRequest<any>, - next: HttpHandler - ): Observable<HttpEvent<any>> { - const url = req.url.toLowerCase(); + public intercept( + req: HttpRequest<any>, + next: HttpHandler + ): Observable<HttpEvent<any>> { + const url = req.url.toLowerCase(); - if (!this.moduleConfig) { - return next.handle(req); - } - if (!this.moduleConfig.resourceServer) { - return next.handle(req); - } - if (!this.checkUrl(url)) { - return next.handle(req); - } - const sendAccessToken = this.moduleConfig.resourceServer.sendAccessToken; + if (!this.moduleConfig) { + return next.handle(req); + } + if (!this.moduleConfig.resourceServer) { + return next.handle(req); + } + if (this.moduleConfig.resourceServer.allowedUrls && !this.checkUrl(url)) { + return next.handle(req); + } - if (sendAccessToken && this.authStorage.getItem('access_token')) { - const token = this.authStorage.getItem('access_token'); - const header = 'Bearer ' + token; + const sendAccessToken = this.moduleConfig.resourceServer.sendAccessToken; - const headers = req.headers.set('Authorization', header); + if (!sendAccessToken) { + return next + .handle(req) + .pipe(catchError(err => this.errorHandler.handleError(err))); + } - req = req.clone({ headers }); + return merge( + of(this.oAuthService.getAccessToken()).pipe( + filter(token => token ? true : false), + ), + this.oAuthService.events.pipe( + filter(e => e.type === 'token_received'), + timeout(WAIT_FOR_TOKEN_RECEIVED), + map(_ => this.oAuthService.getAccessToken()), + ), + ).pipe( + take(1), + mergeMap(token => { + if (token) { + const header = 'Bearer ' + token; + const headers = req.headers.set('Authorization', header); + req = req.clone({ headers }); } return next - .handle(req) - .pipe(catchError(err => this.errorHandler.handleError(err))); - } + .handle(req) + .pipe(catchError(err => this.errorHandler.handleError(err))); + }), + ); + } }

@@ -337,6 +369,7 @@

+ diff --git a/docs/interfaces/OidcDiscoveryDoc.html b/docs/interfaces/OidcDiscoveryDoc.html index 606f8801..2e9b441c 100644 --- a/docs/interfaces/OidcDiscoveryDoc.html +++ b/docs/interfaces/OidcDiscoveryDoc.html @@ -222,7 +222,7 @@

Properties

- authorization_endpoint: string + authorization_endpoint: string @@ -230,7 +230,7 @@

Properties

- Type : string + Type : string @@ -251,7 +251,7 @@

Properties

- check_session_iframe: string + check_session_iframe: string @@ -259,7 +259,7 @@

Properties

- Type : string + Type : string @@ -309,7 +309,7 @@

Properties

- claims_parameter_supported: boolean + claims_parameter_supported: boolean @@ -317,7 +317,7 @@

Properties

- Type : boolean + Type : boolean @@ -396,7 +396,7 @@

Properties

- end_session_endpoint: string + end_session_endpoint: string @@ -404,7 +404,7 @@

Properties

- Type : string + Type : string @@ -541,7 +541,7 @@

Properties

- issuer: string + issuer: string @@ -549,7 +549,7 @@

Properties

- Type : string + Type : string @@ -570,7 +570,7 @@

Properties

- jwks_uri: string + jwks_uri: string @@ -578,7 +578,7 @@

Properties

- Type : string + Type : string @@ -599,7 +599,7 @@

Properties

- registration_endpoint: string + registration_endpoint: string @@ -607,7 +607,7 @@

Properties

- Type : string + Type : string @@ -744,7 +744,7 @@

Properties

- service_documentation: string + service_documentation: string @@ -752,7 +752,7 @@

Properties

- Type : string + Type : string @@ -802,7 +802,7 @@

Properties

- token_endpoint: string + token_endpoint: string @@ -810,7 +810,7 @@

Properties

- Type : string + Type : string @@ -976,7 +976,7 @@

Properties

- userinfo_endpoint: string + userinfo_endpoint: string @@ -984,7 +984,7 @@

Properties

- Type : string + Type : string @@ -1189,6 +1189,7 @@

Properties

+ diff --git a/docs/interfaces/ParsedIdToken.html b/docs/interfaces/ParsedIdToken.html index c4b727c4..4f6211de 100644 --- a/docs/interfaces/ParsedIdToken.html +++ b/docs/interfaces/ParsedIdToken.html @@ -124,7 +124,7 @@

Properties

- idToken: string + idToken: string @@ -132,7 +132,7 @@

Properties

- Type : string + Type : string @@ -153,7 +153,7 @@

Properties

- idTokenClaims: object + idTokenClaims: object @@ -161,7 +161,7 @@

Properties

- Type : object + Type : object @@ -182,7 +182,7 @@

Properties

- idTokenClaimsJson: string + idTokenClaimsJson: string @@ -190,7 +190,7 @@

Properties

- Type : string + Type : string @@ -211,7 +211,7 @@

Properties

- idTokenExpiresAt: number + idTokenExpiresAt: number @@ -219,7 +219,7 @@

Properties

- Type : number + Type : number @@ -240,7 +240,7 @@

Properties

- idTokenHeader: object + idTokenHeader: object @@ -248,7 +248,7 @@

Properties

- Type : object + Type : object @@ -269,7 +269,7 @@

Properties

- idTokenHeaderJson: string + idTokenHeaderJson: string @@ -277,7 +277,7 @@

Properties

- Type : string + Type : string @@ -453,6 +453,7 @@

Properties

+ diff --git a/docs/interfaces/TokenResponse.html b/docs/interfaces/TokenResponse.html index ee9537f9..68c03146 100644 --- a/docs/interfaces/TokenResponse.html +++ b/docs/interfaces/TokenResponse.html @@ -129,7 +129,7 @@

Properties

- access_token: string + access_token: string @@ -137,7 +137,7 @@

Properties

- Type : string + Type : string @@ -158,7 +158,7 @@

Properties

- expires_in: number + expires_in: number @@ -166,7 +166,7 @@

Properties

- Type : number + Type : number @@ -187,7 +187,7 @@

Properties

- id_token: string + id_token: string @@ -195,7 +195,7 @@

Properties

- Type : string + Type : string @@ -216,7 +216,7 @@

Properties

- refresh_token: string + refresh_token: string @@ -224,7 +224,7 @@

Properties

- Type : string + Type : string @@ -245,7 +245,7 @@

Properties

- scope: string + scope: string @@ -253,7 +253,7 @@

Properties

- Type : string + Type : string @@ -274,7 +274,7 @@

Properties

- state: string + state: string @@ -282,7 +282,7 @@

Properties

- Type : string + Type : string @@ -308,7 +308,7 @@

Properties

- token_type: string + token_type: string @@ -316,7 +316,7 @@

Properties

- Type : string + Type : string @@ -492,6 +492,7 @@

Properties

+ diff --git a/docs/interfaces/UserInfo.html b/docs/interfaces/UserInfo.html index 1b5ee497..bf0205a4 100644 --- a/docs/interfaces/UserInfo.html +++ b/docs/interfaces/UserInfo.html @@ -103,7 +103,7 @@

Indexable

- [key: string]: any + [key: string]: any @@ -128,7 +128,7 @@

Properties

- sub: string + sub: string @@ -136,7 +136,7 @@

Properties

- Type : string + Type : string @@ -312,6 +312,7 @@

Properties

+ diff --git a/docs/interfaces/ValidationParams.html b/docs/interfaces/ValidationParams.html index c8436e19..b782e5a7 100644 --- a/docs/interfaces/ValidationParams.html +++ b/docs/interfaces/ValidationParams.html @@ -117,7 +117,7 @@

Properties

- accessToken: string + accessToken: string @@ -125,7 +125,7 @@

Properties

- Type : string + Type : string @@ -146,7 +146,7 @@

Properties

- idToken: string + idToken: string @@ -154,7 +154,7 @@

Properties

- Type : string + Type : string @@ -175,7 +175,7 @@

Properties

- idTokenClaims: object + idTokenClaims: object @@ -183,7 +183,7 @@

Properties

- Type : object + Type : object @@ -204,7 +204,7 @@

Properties

- idTokenHeader: object + idTokenHeader: object @@ -212,7 +212,7 @@

Properties

- Type : object + Type : object @@ -233,7 +233,7 @@

Properties

- jwks: object + jwks: object @@ -241,7 +241,7 @@

Properties

- Type : object + Type : object @@ -262,7 +262,7 @@

Properties

- loadKeys: function + loadKeys: function @@ -270,7 +270,7 @@

Properties

- Type : function + Type : function @@ -378,6 +378,7 @@

Properties

+ diff --git a/docs/js/libs/lit-html.js b/docs/js/libs/lit-html.js index 08293816..743deea1 100644 --- a/docs/js/libs/lit-html.js +++ b/docs/js/libs/lit-html.js @@ -1,2 +1 @@ -// lit-html v0.10.0 | © Polymer team -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.lithtml={})}(this,function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},r=function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:x;i(this,e),this.strings=t,this.values=n,this.type=r,this.partCallback=o}return r(e,[{key:"getHTML",value:function(){for(var e,t,n=this.strings.length-1,r="",i=!0,o=0;o"),e.indexOf("<",t+1)>-1?e.length:t);r+=(i=s>-1?s"+n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getHTML",this).call(this)+""}},{key:"getTemplateElement",value:function(){var e=n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getTemplateElement",this).call(this),r=e.content,i=r.firstChild;return r.removeChild(i),T(r,i.firstChild),e}}]),t}();function l(e){var t=o.get(e.type);void 0===t&&(t=new Map,o.set(e.type,t));var n=t.get(e.strings);return void 0===n&&(n=new v(e,e.getTemplateElement()),t.set(e.strings,n)),n}var u="{{lit-"+String(Math.random()).slice(2)+"}}",c="\x3c!--"+u+"--\x3e",h=new RegExp(u+"|"+c),f=/[ \x09\x0a\x0c\x0d]([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)[ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*)$/;var p=function e(t,n,r,o,a){i(this,e),this.type=t,this.index=n,this.name=r,this.rawName=o,this.strings=a},v=function e(t,n){i(this,e),this.parts=[],this.element=n;for(var r=this.element.content,o=document.createTreeWalker(r,133,null,!1),a=-1,s=0,l=[],c=void 0,v=void 0;o.nextNode();){a++,c=v;var d=v=o.currentNode;if(1===d.nodeType){if(!d.hasAttributes())continue;for(var y=d.attributes,m=0,_=0;_=0&&m++;for(;m-- >0;){var g=t.strings[s],b=f.exec(g)[1],x=y.getNamedItem(b),N=x.value.split(h);this.parts.push(new p("attribute",a,x.name,b,N)),d.removeAttribute(x.name),s+=N.length-1}}else if(3===d.nodeType){var T=d.nodeValue;if(T.indexOf(u)<0)continue;var w=d.parentNode,V=T.split(h),k=V.length-1;s+=k;for(var O=0;O0)h=n[r-1].endNode=document.createTextNode(""),this._insert(h);c=new e(this.instance,h,this.endNode),n.push(c)}c.setValue(u),r++}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}if(0===r)this.clear(),this._previousValue=void 0;else if(r0&&void 0!==arguments[0]?arguments[0]:this.startNode;w(this.startNode.parentNode,e.nextSibling,this.endNode)}}]),e}(),x=function(e,t,n){if("attribute"===t.type)return new g(e,n,t.name,t.strings);if("node"===t.type)return new b(e,n,n.nextSibling);throw new Error("Unknown part type "+t.type)},N=function(){function e(t,n,r){i(this,e),this._parts=[],this.template=t,this._partCallback=n,this._getTemplate=r}return r(e,[{key:"update",value:function(e){var t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this._parts[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;void 0===s.size?(s.setValue(e[t]),t++):(s.setValue(e,t),t+=s.size)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"_clone",value:function(){var e=document.importNode(this.template.element.content,!0),t=this.template.parts;if(t.length>0)for(var n=document.createTreeWalker(e,133,null,!1),r=-1,i=0;i2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t;i!==n;){var o=i.nextSibling;e.insertBefore(i,r),i=o}},w=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t;r!==n;){var i=r.nextSibling;e.removeChild(r),r=i}};e.templateCaches=o,e.html=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:l,r=n(e),i=t.__templateInstance;if(void 0===i||i.template!==r||i._partCallback!==e.partCallback){i=new N(r,e.partCallback,n),t.__templateInstance=i;var o=i._clone();i.update(e.values),w(t,t.firstChild),t.appendChild(o)}else i.update(e.values)},e.TemplatePart=p,e.Template=v,e.getValue=d,e.directive=function(e){return e.__litDirective=!0,e},e.directiveValue=m,e.AttributePart=g,e.NodePart=b,e.defaultPartCallback=x,e.TemplateInstance=N,e.reparentNodes=T,e.removeNodes=w,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file +"use strict";function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var n=e;for(;n!==s;){var _e=n.nextSibling;t.insertBefore(n,i),n=_e}},o=function o(t,e){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=e;for(;i!==s;){var _e2=i.nextSibling;t.removeChild(i),i=_e2}},r={},a={},l="{{lit-".concat(String(Math.random()).slice(2),"}}"),h="\x3c!--".concat(l,"--\x3e"),d=new RegExp("".concat(l,"|").concat(h)),c="$lit$";var u=function u(t,e){var _this=this;_classCallCheck(this,u);this.parts=[],this.element=e;var s=-1,i=0;var n=[],o=function o(e){var r=e.content,a=document.createTreeWalker(r,133,null,!1);var h=0;for(;a.nextNode();){s++;var _e3=a.currentNode;if(1===_e3.nodeType){if(_e3.hasAttributes()){var _n=_e3.attributes;var _o=0;for(var _t=0;_t<_n.length;_t++){_n[_t].value.indexOf(l)>=0&&_o++}for(;_o-- >0;){var _n2=t.strings[i],_o2=g.exec(_n2)[2],_r=_o2.toLowerCase()+c,_a=_e3.getAttribute(_r).split(d);_this.parts.push({type:"attribute",index:s,name:_o2,strings:_a}),_e3.removeAttribute(_r),i+=_a.length-1}}"TEMPLATE"===_e3.tagName&&o(_e3)}else if(3===_e3.nodeType){var _t2=_e3.data;if(_t2.indexOf(l)>=0){var _o3=_e3.parentNode,_r2=_t2.split(d),_a2=_r2.length-1;for(var _t3=0;_t3<_a2;_t3++){_o3.insertBefore(""===_r2[_t3]?m():document.createTextNode(_r2[_t3]),_e3),_this.parts.push({type:"node",index:++s})}""===_r2[_a2]?(_o3.insertBefore(m(),_e3),n.push(_e3)):_e3.data=_r2[_a2],i+=_a2}}else if(8===_e3.nodeType)if(_e3.data===l){var _t4=_e3.parentNode;null!==_e3.previousSibling&&s!==h||(s++,_t4.insertBefore(m(),_e3)),h=s,_this.parts.push({type:"node",index:s}),null===_e3.nextSibling?_e3.data="":(n.push(_e3),s--),i++}else{var _t5=-1;for(;-1!==(_t5=_e3.data.indexOf(l,_t5+1));){_this.parts.push({type:"node",index:-1})}}}};o(e);for(var _i=0;_i=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var v=function(){function v(t,e,s){_classCallCheck(this,v);this._parts=[],this.template=t,this.processor=e,this.options=s}_createClass(v,[{key:"update",value:function update(t){var e=0;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=this._parts[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _s=_step.value;void 0!==_s&&_s.setValue(t[e]),e++}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=this._parts[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var _t7=_step2.value;void 0!==_t7&&_t7.commit()}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return!=null){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}}},{key:"_clone",value:function _clone(){var _this2=this;var t=i?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;var s=0,n=0;var o=function o(t){var i=document.createTreeWalker(t,133,null,!1);var r=i.nextNode();for(;s".concat(_get(_getPrototypeOf(x.prototype),"getHTML",this).call(this),"")}},{key:"getTemplateElement",value:function getTemplateElement(){var t=_get(_getPrototypeOf(x.prototype),"getTemplateElement",this).call(this),e=t.content,s=e.firstChild;return e.removeChild(s),n(e,s.firstChild),t}}]);return x}(f);var _=function _(t){return null===t||!("object"==_typeof(t)||"function"==typeof t)};var y=function(){function y(t,e,s){_classCallCheck(this,y);this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(var _t11=0;_t110&&arguments[0]!==undefined?arguments[0]:this.startNode;o(this.startNode.parentNode,t.nextSibling,this.endNode)}}]);return V}();var b=function(){function b(t,e,s){_classCallCheck(this,b);if(this.value=void 0,this._pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}_createClass(b,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t15=this._pendingValue;this._pendingValue=r,_t15(this)}if(this._pendingValue===r)return;var t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=r}}]);return b}();var w=function(_y){_inherits(w,_y);function w(t,e,s){var _this3;_classCallCheck(this,w);_this3=_possibleConstructorReturn(this,_getPrototypeOf(w).call(this,t,e,s)),_this3.single=2===s.length&&""===s[0]&&""===s[1];return _this3}_createClass(w,[{key:"_createPart",value:function _createPart(){return new T(this)}},{key:"_getValue",value:function _getValue(){return this.single?this.parts[0].value:_get(_getPrototypeOf(w.prototype),"_getValue",this).call(this)}},{key:"commit",value:function commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]);return w}(y);var T=function(_N){_inherits(T,_N);function T(){_classCallCheck(this,T);return _possibleConstructorReturn(this,_getPrototypeOf(T).apply(this,arguments))}return T}(N);var E=!1;try{var _t16={get capture(){return E=!0,!1}};window.addEventListener("test",_t16,_t16),window.removeEventListener("test",_t16,_t16)}catch(t){}var A=function(){function A(t,e,s){var _this4=this;_classCallCheck(this,A);this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this._boundHandleEvent=function(t){return _this4.handleEvent(t)}}_createClass(A,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t17=this._pendingValue;this._pendingValue=r,_t17(this)}if(this._pendingValue===r)return;var t=this._pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),n&&(this._options=P(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=r}},{key:"handleEvent",value:function handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}]);return A}();var P=function P(t){return t&&(E?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)};var S=function(){function S(){_classCallCheck(this,S)}_createClass(S,[{key:"handleAttributeExpressions",value:function handleAttributeExpressions(t,e,s,i){var n=e[0];if("."===n){return new w(t,e.slice(1),s).parts}return"@"===n?[new A(t,e.slice(1),i.eventContext)]:"?"===n?[new b(t,e.slice(1),s)]:new y(t,e,s).parts}},{key:"handleTextExpression",value:function handleTextExpression(t){return new V(t)}}]);return S}();var C=new S;function M(t){var e=L.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},L.set(t.type,e));var s=e.stringsArray.get(t.strings);if(void 0!==s)return s;var i=t.strings.join(l);return void 0===(s=e.keyString.get(i))&&(s=new u(t,t.getTemplateElement()),e.keyString.set(i,s)),e.stringsArray.set(t.strings,s),s}var L=new Map,k=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");t.html=function(t){for(var _len=arguments.length,e=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){e[_key-1]=arguments[_key]}return new f(t,e,"html",C)},t.svg=function(t){for(var _len2=arguments.length,e=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){e[_key2-1]=arguments[_key2]}return new x(t,e,"svg",C)},t.DefaultTemplateProcessor=S,t.defaultTemplateProcessor=C,t.directive=function(t){return function(){var i=t.apply(void 0,arguments);return e.set(i,!0),i}},t.isDirective=s,t.removeNodes=o,t.reparentNodes=n,t.noChange=r,t.nothing=a,t.AttributeCommitter=y,t.AttributePart=N,t.BooleanAttributePart=b,t.EventPart=A,t.isPrimitive=_,t.NodePart=V,t.PropertyCommitter=w,t.PropertyPart=T,t.parts=k,t.render=function(t,e,s){var i=k.get(e);void 0===i&&(o(e,e.firstChild),k.set(e,i=new V(Object.assign({templateFactory:M},s))),i.appendInto(e)),i.setValue(t),i.commit()},t.templateCaches=L,t.templateFactory=M,t.TemplateInstance=v,t.SVGTemplateResult=x,t.TemplateResult=f,t.createMarker=m,t.isTemplatePartActive=p,t.Template=u,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/docs/js/libs/svg-pan-zoom.min.js b/docs/js/libs/svg-pan-zoom.min.js index 6156a996..807f0e44 100644 --- a/docs/js/libs/svg-pan-zoom.min.js +++ b/docs/js/libs/svg-pan-zoom.min.js @@ -1,3 +1,3 @@ -// svg-pan-zoom v3.5.2 +// svg-pan-zoom v3.6.0 // 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],!1);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)},n.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(n.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),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],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),h=h.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 h=[],c=function(t,e){var o=s.getSvg(t);if(null===o)return null;for(var n=h.length-1;n>=0;n--)if(h[n].svg===o)return h[n].instance.getPublicInstance();return h.push({svg:o,instance:new l(o,e)}),h[h.length-1].instance.getPublicInstance()};e.exports=c},{"./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]); +!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 diff --git a/docs/js/libs/tablesort.min.js b/docs/js/libs/tablesort.min.js index 29310907..09de2aed 100644 --- a/docs/js/libs/tablesort.min.js +++ b/docs/js/libs/tablesort.min.js @@ -1,5 +1,6 @@ /*! - * tablesort v5.0.2 (2017-11-12) + * tablesort v5.1.0 (2018-09-14) * http://tristen.ca/tablesort/demo/ - * Copyright (c) 2017 ; Licensed MIT -*/!function(){function a(b,c){if(!(this instanceof a))return new a(b,c);if(!b||"TABLE"!==b.tagName)throw new Error("Element must be a table");this.init(b,c||{})}var b=[],c=function(a){var b;return window.CustomEvent&&"function"==typeof window.CustomEvent?b=new CustomEvent(a):(b=document.createEvent("CustomEvent"),b.initCustomEvent(a,!1,!1,void 0)),b},d=function(a){return a.getAttribute("data-sort")||a.textContent||a.innerText||""},e=function(a,b){return a=a.trim().toLowerCase(),b=b.trim().toLowerCase(),a===b?0:a0)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e0&&l.push(k),m++;if(!l)return}for(m=0;m0)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e0&&l.push(k),m++;if(!l)return}for(m=0;m0,l[4]=i,_o.apply(null,l)}function xo(t){return void 0===t?Ds:"function"==typeof t&&(Ds=t,!0)}function ko(t,e){return void 0!==Ms[t]&&(void 0===e?Ms[t]:(Ms[t]=e,"s"===t&&(Ms.ss=e-1),!0))}function So(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=wo(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Do(t){return(t>0)-(t<0)||+t}function Mo(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,o=Cs(this._milliseconds)/1e3,n=Cs(this._days),s=Cs(this._months);t=b(o/60),e=b(t/60),o%=60,t%=60,i=b(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o?o.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var p=c<0?"-":"",f=Do(this._months)!==Do(c)?"-":"",m=Do(this._days)!==Do(c)?"-":"",v=Do(this._milliseconds)!==Do(c)?"-":"";return p+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(h?m+h+"D":"")+(d||l||u?"T":"")+(d?v+d+"H":"")+(l?v+l+"M":"")+(u?v+u+"S":"")}var Co,Oo;Oo=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;o68?1900:2e3)};var yn,bn=it("FullYear",!0);yn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:m()}),Xn=function(){return Date.now?Date.now():+new Date},Zn=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ae("Z",":"),Ae("ZZ",""),U("Z",nn),U("ZZ",nn),K(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ze(nn,t)});var Kn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Jn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,$n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Ke.fn=Ie.prototype,Ke.invalid=Pe;var Qn=ti(1,"add"),ts=ti(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var es=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ai("gggg","weekYear"),Ai("ggggg","weekYear"),Ai("GGGG","isoWeekYear"),Ai("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),U("G",en),U("g",en),U("GG",Xo,Go),U("gg",Xo,Go),U("GGGG",$o,Uo),U("gggg",$o,Uo),U("GGGGG",Qo,qo),U("ggggg",Qo,qo),J(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=_(t)}),J(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),U("Q",Yo),K("Q",function(t,e){e[ln]=3*(_(t)-1)}),H("D",["DD",2],"Do","date"),A("date","D"),F("date",9),U("D",Xo),U("DD",Xo,Go),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),K(["D","DD"],un),K("Do",function(t,e){e[un]=_(t.match(Xo)[0],10)});var is=it("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),U("DDD",Jo),U("DDDD",Vo),K(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),H("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),U("m",Xo),U("mm",Xo,Go),K(["m","mm"],pn);var os=it("Minutes",!1);H("s",["ss",2],0,"second"),A("second","s"),F("second",15),U("s",Xo),U("ss",Xo,Go),K(["s","ss"],fn);var ns=it("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),U("S",Jo,Yo),U("SS",Jo,Go),U("SSS",Jo,Vo);var ss;for(ss="SSSS";ss.length<=9;ss+="S")U(ss,tn);for(ss="S";ss.length<=9;ss+="S")K(ss,Gi);var rs=it("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var as=g.prototype;as.add=Qn,as.calendar=oi,as.clone=ni,as.diff=ui,as.endOf=Si,as.format=vi,as.from=gi,as.fromNow=yi,as.to=bi,as.toNow=_i,as.get=st,as.invalidAt=Ni,as.isAfter=si,as.isBefore=ri,as.isBetween=ai,as.isSame=hi,as.isSameOrAfter=di,as.isSameOrBefore=li,as.isValid=Pi,as.lang=es,as.locale=wi,as.localeData=xi,as.max=qn,as.min=Un,as.parsingFlags=Ii,as.set=rt,as.startOf=ki,as.subtract=ts,as.toArray=Oi,as.toObject=Ei,as.toDate=Ci,as.toISOString=fi,as.inspect=mi,as.toJSON=Ti,as.toString=pi,as.unix=Mi,as.valueOf=Di,as.creationData=Ri,as.year=bn,as.isLeapYear=et,as.weekYear=zi,as.isoWeekYear=Li,as.quarter=as.quarters=Wi,as.month=ft,as.daysInMonth=mt,as.week=as.weeks=Ot,as.isoWeek=as.isoWeeks=Et,as.weeksInYear=Bi,as.isoWeeksInYear=Fi,as.date=is,as.day=as.days=Lt,as.weekday=Ft,as.isoWeekday=Bt,as.dayOfYear=Yi,as.hour=as.hours=Rn,as.minute=as.minutes=os,as.second=as.seconds=ns,as.millisecond=as.milliseconds=rs,as.utcOffset=Be,as.utc=He,as.local=We,as.parseZone=Ye,as.hasAlignedHourOffset=Ge,as.isDST=Ve,as.isLocal=qe,as.isUtcOffset=Xe,as.isUtc=Ze,as.isUTC=Ze,as.zoneAbbr=Vi,as.zoneName=Ui,as.dates=k("dates accessor is deprecated. Use date instead.",is),as.months=k("months accessor is deprecated. Use month instead",ft),as.years=k("years accessor is deprecated. Use year instead",bn),as.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",je),as.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ue);var hs=O.prototype;hs.calendar=E,hs.longDateFormat=T,hs.invalidDate=P,hs.ordinal=I,hs.preparse=Zi,hs.postformat=Zi,hs.relativeTime=N,hs.pastFuture=R,hs.set=M,hs.months=dt,hs.monthsShort=lt,hs.monthsParse=ct,hs.monthsRegex=gt,hs.monthsShortRegex=vt,hs.week=Dt,hs.firstDayOfYear=Ct,hs.firstDayOfWeek=Mt,hs.weekdays=It,hs.weekdaysMin=Rt,hs.weekdaysShort=Nt,hs.weekdaysParse=zt,hs.weekdaysRegex=jt,hs.weekdaysShortRegex=Ht,hs.weekdaysMinRegex=Wt,hs.isPM=Xt,hs.meridiem=Zt,Qt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qt),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ie);var ds=Math.abs,ls=mo("ms"),us=mo("s"),cs=mo("m"),ps=mo("h"),fs=mo("d"),ms=mo("w"),vs=mo("M"),gs=mo("y"),ys=yo("milliseconds"),bs=yo("seconds"),_s=yo("minutes"),ws=yo("hours"),xs=yo("days"),ks=yo("months"),Ss=yo("years"),Ds=Math.round,Ms={ss:44,s:45,m:45,h:22,d:26,M:11},Cs=Math.abs,Os=Ie.prototype;return Os.isValid=Te,Os.abs=no,Os.add=ro,Os.subtract=ao,Os.as=po,Os.asMilliseconds=ls,Os.asSeconds=us,Os.asMinutes=cs,Os.asHours=ps,Os.asDays=fs,Os.asWeeks=ms,Os.asMonths=vs,Os.asYears=gs,Os.valueOf=fo,Os._bubble=lo,Os.clone=vo,Os.get=go,Os.milliseconds=ys,Os.seconds=bs,Os.minutes=_s,Os.hours=ws,Os.days=xs,Os.weeks=bo,Os.months=ks,Os.years=Ss,Os.humanize=So,Os.toISOString=Mo,Os.toString=Mo,Os.toJSON=Mo,Os.locale=wi,Os.localeData=xi,Os.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mo),Os.lang=es,H("X",0,0,"unix"),H("x",0,0,"valueOf"),U("x",en),U("X",sn),K("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),K("x",function(t,e,i){i._d=new Date(_(t))}),e.version="2.19.1",function(t){Co=t}(De),e.fn=as,e.min=Ce,e.max=Oe,e.now=Xn,e.utc=u,e.unix=qi,e.months=Qi,e.isDate=a,e.locale=Qt,e.invalid=m,e.duration=Ke,e.isMoment=y,e.weekdays=eo,e.parseZone=Xi,e.localeData=ie,e.isDuration=Ne,e.monthsShort=to,e.weekdaysMin=oo,e.defineLocale=te,e.updateLocale=ee,e.locales=oe,e.weekdaysShort=io,e.normalizeUnits=z,e.relativeTimeRounding=xo,e.relativeTimeThreshold=ko,e.calendarFormat=ii,e.prototype=as,e})}).call(e,i(155)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=156},function(t,e,i){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){n<16&&(e[o+n++]=u[t])});n<16;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(d<0&&void 0===t.clockseq&&(r=r+1&16383),(d<0||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;p<6;p++)s[n+p]=c[p];return e||o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:void 0!==e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;c<256;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,i(158))},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Graph3d=i(161),e.graph3d={Camera:i(95),Filter:i(96),Point2d:i(91),Point3d:i(34),Slider:i(92),StepNumber:i(93)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){var o=i(7),n=o.JSON||(o.JSON={stringify:JSON.stringify});t.exports=function(t){return n.stringify.apply(n,arguments)}},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.dataGroup=new _,this.dataPoints=null,this.create(),f.setDefaults(o.DEFAULTS,this),this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.setOptions(i),this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(90),a=function(t){return t&&t.__esModule?t:{default:t}}(r),h=i(44),d=i(2),l=i(34),u=i(91),c=i(92),p=i(93),f=i(94),m=i(15).default,v=i(15),g=v.printStyle,y=i(172),b=y.allOptions,_=i(173);o.STYLE=f.STYLE;o.DEFAULTS={width:"400px",height:"400px",filterLabel:"time",legendLabel:"value",xLabel:"x",yLabel:"y",zLabel:"z",xValueLabel:function(t){return t},yValueLabel:function(t){return t},zValueLabel:function(t){return t},showXAxis:!0,showYAxis:!0,showZAxis:!0,showGrid:!0,showPerspective:!0,showShadow:!1,keepAspectRatio:!0,verticalRatio:.5,dotSizeRatio:.02,dotSizeMinFraction:.5,dotSizeMaxFraction:2.5,showAnimationControls:void 0,animationInterval:1e3,animationPreload:!1,animationAutoStart:void 0,axisColor:"#4D4D4D",gridColor:"#D3D3D3",xCenter:"55%",yCenter:"50%",style:o.STYLE.DOT,tooltip:!1,tooltipStyle:{content:{padding:"10px",border:"1px solid #4d4d4d",color:"#1a1a1a",background:"rgba(255,255,255,0.7)",borderRadius:"2px",boxShadow:"5px 5px 10px rgba(128,128,128,0.5)"},line:{height:"40px",width:"0",borderLeft:"1px solid #4d4d4d"},dot:{height:"0",width:"0",border:"5px solid #4d4d4d",borderRadius:"5px"}},dataColor:{fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},cameraPosition:{horizontal:1,vertical:.5,distance:1.7},showLegend:void 0,backgroundColor:void 0,xBarWidth:void 0,yBarWidth:void 0,valueMin:void 0,valueMax:void 0,xMin:void 0,xMax:void 0,xStep:void 0,yMin:void 0,yMax:void 0,yStep:void 0,zMin:void 0,zMax:void 0,zStep:void 0},h(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/this.xRange.range(),1/this.yRange.range(),1/this.zRange.range()),this.keepAspectRatio&&(this.scale.x0&&(r[n-1].pointNext=r[n]);return r},o.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},o=function(t){e._onTouchStart(t)},n=function(t){e._onWheel(t)},s=function(t){e._onTooltip(t)},r=function(t){e._onClick(t)};d.addEventListener(this.frame.canvas,"mousedown",i),d.addEventListener(this.frame.canvas,"touchstart",o),d.addEventListener(this.frame.canvas,"mousewheel",n),d.addEventListener(this.frame.canvas,"mousemove",s),d.addEventListener(this.frame.canvas,"click",r),this.containerElement.appendChild(this.frame)},o.prototype._setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},o.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},o.prototype.animationStart=function(){if(this.animationAutoStart&&this.dataGroup.dataFilter){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()}},o.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},o.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},o.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},o.prototype._readData=function(t){this.dataPoints=this.dataGroup.initializeData(this,t,this.style),this._initializeRanges(),this._redrawFilter()},o.prototype.setData=function(t){void 0!==t&&null!==t&&(this._readData(t),this.redraw(),this.animationStart())},o.prototype.setOptions=function(t){if(void 0!==t){!0===m.validate(t,b)&&console.log("%cErrors have been found in the supplied options object.",g),this.animationStop(),f.setOptions(t,this),this.setPointDrawingMethod(),this._setSize(this.width,this.height),this.setData(this.dataGroup.getDataTable()),this.animationStart()}},o.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case o.STYLE.BAR:t=o.prototype._redrawBarGraphPoint;break;case o.STYLE.BARCOLOR:t=o.prototype._redrawBarColorGraphPoint;break;case o.STYLE.BARSIZE:t=o.prototype._redrawBarSizeGraphPoint;break;case o.STYLE.DOT:t=o.prototype._redrawDotGraphPoint;break;case o.STYLE.DOTLINE:t=o.prototype._redrawDotLineGraphPoint;break;case o.STYLE.DOTCOLOR:t=o.prototype._redrawDotColorGraphPoint;break;case o.STYLE.DOTSIZE:t=o.prototype._redrawDotSizeGraphPoint;break;case o.STYLE.SURFACE:t=o.prototype._redrawSurfaceGraphPoint;break;case o.STYLE.GRID:t=o.prototype._redrawGridGraphPoint;break;case o.STYLE.LINE:t=o.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},o.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},o.prototype._getContext=function(){var t=this.frame.canvas,e=t.getContext("2d");return e.lineJoin="round",e.lineCap="round",e},o.prototype._redrawClear=function(){var t=this.frame.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height)},o.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},o.prototype._getLegendWidth=function(){var t;if(this.style===o.STYLE.DOTSIZE){t=this._dotSize()*this.dotSizeMaxFraction}else t=this.style===o.STYLE.BARSIZE?this.xBarWidth:20;return t},o.prototype._redrawLegend=function(){if(!0===this.showLegend&&this.style!==o.STYLE.LINE&&this.style!==o.STYLE.BARSIZE){var t=this.style===o.STYLE.BARSIZE||this.style===o.STYLE.DOTSIZE,e=this.style===o.STYLE.DOTSIZE||this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),n=this.margin,s=this._getLegendWidth(),r=this.frame.clientWidth-this.margin,a=r-s,h=n+i,d=this._getContext();if(d.lineWidth=1,d.font="14px arial",!1===t){var l,c=i;for(l=0;l0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelY=function(t,e,i,o,n){void 0===n&&(n=0);var s=this._convert3Dto2D(e);Math.cos(2*o)<0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelZ=function(t,e,i,o){void 0===o&&(o=0);var n=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,n.x-o,n.y)},o.prototype._line3d=function(t,e,i,o){var n=this._convert3Dto2D(e),s=this._convert3Dto2D(i);this._line(t,n,s,o)},o.prototype._redrawAxis=function(){var t,e,i,o,n,s,r,a,h,d,c,f=this._getContext();f.font=24/this.camera.getArmLength()+"px arial";var m,v=.025/this.scale.x,g=.025/this.scale.y,y=5/this.camera.getArmLength(),b=this.camera.getArmRotation().horizontal,_=new u(Math.cos(b),Math.sin(b)),w=this.xRange,x=this.yRange,k=this.zRange;for(f.lineWidth=1,o=void 0===this.defaultXStep,i=new p(w.min,w.max,this.xStep,o),i.start(!0);!i.end();){var S=i.getCurrent();if(this.showGrid?(t=new l(S,x.min,k.min),e=new l(S,x.max,k.min),this._line3d(f,t,e,this.gridColor)):this.showXAxis&&(t=new l(S,x.min,k.min),e=new l(S,x.min+v,k.min),this._line3d(f,t,e,this.axisColor),t=new l(S,x.max,k.min),e=new l(S,x.max-v,k.min),this._line3d(f,t,e,this.axisColor)),this.showXAxis){r=_.x>0?x.min:x.max,m=new l(S,r,k.min);var D=" "+this.xValueLabel(S)+" ";this.drawAxisLabelX(f,m,D,b,y)}i.next()}for(f.lineWidth=1,o=void 0===this.defaultYStep,i=new p(x.min,x.max,this.yStep,o),i.start(!0);!i.end();){var M=i.getCurrent();if(this.showGrid?(t=new l(w.min,M,k.min),e=new l(w.max,M,k.min),this._line3d(f,t,e,this.gridColor)):this.showYAxis&&(t=new l(w.min,M,k.min),e=new l(w.min+g,M,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,M,k.min),e=new l(w.max-g,M,k.min),this._line3d(f,t,e,this.axisColor)),this.showYAxis){s=_.y>0?w.min:w.max,m=new l(s,M,k.min);var C=" "+this.yValueLabel(M)+" ";this.drawAxisLabelY(f,m,C,b,y)}i.next()}if(this.showZAxis){for(f.lineWidth=1,o=void 0===this.defaultZStep,i=new p(k.min,k.max,this.zStep,o),i.start(!0),s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max;!i.end();){var O=i.getCurrent(),E=new l(s,r,O),T=this._convert3Dto2D(E);e=new u(T.x-y,T.y),this._line(f,T,e,this.axisColor);var P=this.zValueLabel(O)+" ";this.drawAxisLabelZ(f,E,P,5),i.next()}f.lineWidth=1,t=new l(s,r,k.min),e=new l(s,r,k.max),this._line3d(f,t,e,this.axisColor)}if(this.showXAxis){var I,N;f.lineWidth=1,I=new l(w.min,x.min,k.min),N=new l(w.max,x.min,k.min),this._line3d(f,I,N,this.axisColor),I=new l(w.min,x.max,k.min),N=new l(w.max,x.max,k.min),this._line3d(f,I,N,this.axisColor)}this.showYAxis&&(f.lineWidth=1,t=new l(w.min,x.min,k.min),e=new l(w.min,x.max,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,x.min,k.min),e=new l(w.max,x.max,k.min),this._line3d(f,t,e,this.axisColor));var R=this.xLabel;R.length>0&&this.showXAxis&&(c=.1/this.scale.y,s=(w.max+3*w.min)/4,r=_.x>0?x.min-c:x.max+c,n=new l(s,r,k.min),this.drawAxisLabelX(f,n,R,b));var A=this.yLabel;A.length>0&&this.showYAxis&&(d=.1/this.scale.x,s=_.y>0?w.min-d:w.max+d,r=(x.max+3*x.min)/4,n=new l(s,r,k.min),this.drawAxisLabelY(f,n,A,b));var z=this.zLabel;z.length>0&&this.showZAxis&&(h=30,s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max,a=(k.max+3*k.min)/4,n=new l(s,r,a),this.drawAxisLabelZ(f,n,z,h))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-this.eye.z/this.camera.getArmLength()*this.dataColor.strokeWidth:this.dataColor.strokeWidth},o.prototype._redrawBar=function(t,e,i,o,n,s){var r,a=this,h=e.point,d=this.zRange.min,u=[{point:new l(h.x-i,h.y-o,h.z)},{point:new l(h.x+i,h.y-o,h.z)},{point:new l(h.x+i,h.y+o,h.z)},{point:new l(h.x-i,h.y+o,h.z)}],c=[{point:new l(h.x-i,h.y-o,d)},{point:new l(h.x+i,h.y-o,d)},{point:new l(h.x+i,h.y+o,d)},{point:new l(h.x-i,h.y+o,d)}];u.forEach(function(t){t.screen=a._convert3Dto2D(t.point)}),c.forEach(function(t){t.screen=a._convert3Dto2D(t.point)});var p=[{corners:u,center:l.avg(c[0].point,c[2].point)},{corners:[u[0],u[1],c[1],c[0]],center:l.avg(c[1].point,c[0].point)},{corners:[u[1],u[2],c[2],c[1]],center:l.avg(c[2].point,c[1].point)},{corners:[u[2],u[3],c[3],c[2]],center:l.avg(c[3].point,c[2].point)},{corners:[u[3],u[0],c[0],c[3]],center:l.avg(c[0].point,c[3].point)}];e.surfaces=p;for(var f=0;f0}if(a){var p,f=(e.point.z+i.point.z+o.point.z+n.point.z)/4,m=240*(1-(f-this.zRange.min)*this.scale.z/this.verticalRatio);this.showShadow?(p=Math.min(1+u.x/c/2,1),s=this._hsv2rgb(m,1,p),r=s):(p=1,s=this._hsv2rgb(m,1,p),r=this.axisColor)}else s="gray",r=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var v=[e,i,n,o];this._polygon(t,v,s,r)}},o.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var o=(e.point.z+i.point.z)/2,n=240*(1-(o-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(n,1,1),this._line(t,e.screen,i.screen)}},o.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},o.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},o.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t0?1:t<0?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=null,s=null,r=null,a=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){n=this.dataPoints[i];var h=n.surfaces;if(h)for(var d=h.length-1;d>=0;d--){var l=h[d],c=l.corners,p=[c[0].screen,c[1].screen,c[2].screen],f=[c[2].screen,c[3].screen,c[0].screen];if(this._insideTriangle(a,p)||this._insideTriangle(a,f))return n}}else for(i=0;i"+this.xLabel+":"+t.point.x+""+this.yLabel+":"+t.point.y+""+this.zLabel+":"+t.point.z+"",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,h=o.offsetWidth,d=o.offsetHeight,l=t.screen.x-n/2;l=Math.min(Math.max(l,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=l+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-h/2+"px",o.style.top=t.screen.y-d/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},o.prototype.setCameraPosition=function(t){f.setCameraPosition(t,this),this.redraw()},o.prototype.setSize=function(t,e){this._setSize(t,e),this.redraw()},t.exports=o},function(t,e,i){i(163),t.exports=i(7).Object.assign},function(t,e,i){var o=i(17);o(o.S+o.F,"Object",{assign:i(164)})},function(t,e,i){var o=i(33),n=i(63),s=i(42),r=i(41),a=i(78),h=Object.assign;t.exports=!h||i(28)(function(){var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach(function(t){e[t]=t}),7!=h({},t)[i]||Object.keys(h({},e)).join("")!=o})?function(t,e){for(var i=r(t),h=arguments.length,d=1,l=n.f,u=s.f;h>d;)for(var c,p=a(arguments[d++]),f=l?o(p).concat(l(p)):o(p),m=f.length,v=0;m>v;)u.call(p,c=f[v++])&&(i[c]=p[c]);return i}:h},function(t,e,i){t.exports={default:i(166),__esModule:!0}},function(t,e,i){i(167),t.exports=i(7).Math.sign},function(t,e,i){var o=i(17);o(o.S,"Math",{sign:i(168)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,i){t.exports={default:i(170),__esModule:!0}},function(t,e,i){i(171);var o=i(7).Object;t.exports=function(t,e,i){return o.defineProperty(t,e,i)}},function(t,e,i){var o=i(17);o(o.S+o.F*!i(21),"Object",{defineProperty:i(20).f})},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var o="string",n="boolean",s="number",r={fill:{string:o},stroke:{string:o},strokeWidth:{number:s},__type__:{string:o,object:"object",undefined:"undefined"}},a={animationAutoStart:{boolean:n,undefined:"undefined"},animationInterval:{number:s},animationPreload:{boolean:n},axisColor:{string:o},backgroundColor:r,xBarWidth:{number:s,undefined:"undefined"},yBarWidth:{number:s,undefined:"undefined"},cameraPosition:{distance:{number:s},horizontal:{number:s},vertical:{number:s},__type__:{object:"object"}},xCenter:{string:o},yCenter:{string:o},dataColor:r,dotSizeMinFraction:{number:s},dotSizeMaxFraction:{number:s},dotSizeRatio:{number:s},filterLabel:{string:o},gridColor:{string:o},onclick:{function:"function"},keepAspectRatio:{boolean:n},xLabel:{string:o},yLabel:{string:o},zLabel:{string:o},legendLabel:{string:o},xMin:{number:s,undefined:"undefined"},yMin:{number:s,undefined:"undefined"},zMin:{number:s,undefined:"undefined"},xMax:{number:s,undefined:"undefined"},yMax:{number:s,undefined:"undefined"},zMax:{number:s,undefined:"undefined"},showAnimationControls:{boolean:n,undefined:"undefined"},showGrid:{boolean:n},showLegend:{boolean:n,undefined:"undefined"},showPerspective:{boolean:n},showShadow:{boolean:n},showXAxis:{boolean:n},showYAxis:{boolean:n},showZAxis:{boolean:n},xStep:{number:s,undefined:"undefined"},yStep:{number:s,undefined:"undefined"},zStep:{number:s,undefined:"undefined"},style:{number:s,string:["bar","bar-color","bar-size","dot","dot-line","dot-color","dot-size","line","grid","surface"]},tooltip:{boolean:n,function:"function"},tooltipStyle:{content:{color:{string:o},background:{string:o},border:{string:o},borderRadius:{string:o},boxShadow:{string:o},padding:{string:o},__type__:{object:"object"}},line:{borderLeft:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},dot:{border:{string:o},borderRadius:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},__type__:{object:"object"}},xValueLabel:{function:"function"},yValueLabel:{function:"function"},zValueLabel:{function:"function"},valueMax:{number:s,undefined:"undefined"},valueMin:{number:s,undefined:"undefined"},verticalRatio:{number:s},height:{string:o},width:{string:o},__type__:{object:"object"}};e.allOptions=a},function(t,e,i){function o(){this.dataTable=null}var n=i(11),s=i(12),r=i(174),a=i(96),h=i(94),d=i(34);o.prototype.initializeData=function(t,e,i){if(void 0!==e){Array.isArray(e)&&(e=new n(e));var o;if(!(e instanceof n||e instanceof s))throw new Error("Array, DataSet, or DataView expected");if(o=e.get(),0!=o.length){this.style=i,this.dataSet&&this.dataSet.off("*",this._onChange),this.dataSet=e,this.dataTable=o;var r=this;this._onChange=function(){t.setData(r.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z";var h=t.hasBars(i);if(h&&(void 0!==t.defaultXBarWidth?this.xBarWidth=t.defaultXBarWidth:this.xBarWidth=this.getSmallestDifference(o,this.colX)||1,void 0!==t.defaultYBarWidth?this.yBarWidth=t.defaultYBarWidth:this.yBarWidth=this.getSmallestDifference(o,this.colY)||1),this._initializeRange(o,this.colX,t,h),this._initializeRange(o,this.colY,t,h),this._initializeRange(o,this.colZ,t,!1),o[0].hasOwnProperty("style")){this.colValue="style";var d=this.getColumnRange(o,this.colValue);this._setRangeDefaults(d,t.defaultValueMin,t.defaultValueMax),this.valueRange=d}this.getDataTable()[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new a(this,"filter",t),this.dataFilter.setOnLoadCallback(function(){t.redraw()}));return this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.getDataTable())}}},o.prototype._collectRangeSettings=function(t,e){if(-1==["x","y","z"].indexOf(t))throw new Error("Column '"+t+"' invalid");var i=t.toUpperCase();return{barWidth:this[t+"BarWidth"],min:e["default"+i+"Min"],max:e["default"+i+"Max"],step:e["default"+i+"Step"],range_label:t+"Range",step_label:t+"Step"}},o.prototype._initializeRange=function(t,e,i,o){var n=this._collectRangeSettings(e,i),s=this.getColumnRange(t,e);o&&"z"!=e&&s.expand(n.barWidth/2),this._setRangeDefaults(s,n.min,n.max),this[n.range_label]=s,this[n.step_label]=void 0!==n.step?n.step:s.range()/5},o.prototype.getDistinctValues=function(t,e){void 0===e&&(e=this.dataTable);for(var i=[],o=0;os)&&(o=s)}return o},o.prototype.getColumnRange=function(t,e){for(var i=new r,o=0;o0&&(e[i-1].pointNext=e[i]);return e},o.prototype._checkValueField=function(t){if(this.style===h.STYLE.BARCOLOR||this.style===h.STYLE.BARSIZE||this.style===h.STYLE.DOTCOLOR||this.style===h.STYLE.DOTSIZE){if(void 0===this.colValue)throw new Error("Expected data to have field 'style' for graph style '"+this.style+"'");if(void 0===t[0][this.colValue])throw new Error("Expected data to have field '"+this.colValue+"' for graph style '"+this.style+"'")}},t.exports=o},function(t,e,i){function o(){this.min=void 0,this.max=void 0}o.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.maxi)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},o.prototype.range=function(){return this.max-this.min},o.prototype.center=function(){return(this.min+this.max)/2},t.exports=o},function(t,e,i){var o,n,s;!function(i){n=[],o=i,void 0!==(s="function"==typeof o?o.apply(e,n):o)&&(t.exports=s)}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(l(t,i[e],i),!0)}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ft(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==gt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function S(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=R(o);e.timeStamp=_t(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=L(a,h),P(i,e),e.offsetDirection=z(e.deltaX,e.deltaY);var d=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=bt(d.x)>bt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?B(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==Pt||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=It&&(h>Ot||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=A(h,d,l);o=u.x,n=u.y,i=bt(u.x)>bt(u.y)?u.x:u.y,s=z(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;i=bt(e)?t<0?Rt:At:e<0?zt:Lt}function L(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function B(t,e){return F(e[1],e[0],Wt)+F(t[1],t[0],Wt)}function j(t,e){return L(e[0],e[1],Wt)/L(t[0],t[1],Wt)}function H(){this.evEl=Gt,this.evWin=Vt,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=Xt,this.evWin=Zt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Jt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(Pt|It)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Tt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;n-1&&o.splice(t,1)};setTimeout(n,ee)}}function K(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;o=fe&&e(i.options.event+tt(o))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return ot.prototype.attrTest.call(this,t)&&(this.state&ce||!(this.state&ce)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(st,ot,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ce)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(rt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(Pt|It)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&Pt)return me;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&Pt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=_t(),this.manager.emit(this.options.event,this._input)))}}),c(at,ot,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ce)}}),c(ht,ot,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ft|Bt,pointers:1},getTouchAction:function(){return nt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ft|Bt)?e=t.overallVelocity:i&Ft?e=t.overallVelocityX:i&Bt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Pt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(dt,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanced+i?s+=h()+u-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,o-i),{shouldScroll:r,scrollOffset:s,itemTop:l}}var a=i(9),h=i(2),d=i(11),l=i(12),u=i(64),c=i(65),p=i(45),f=i(67),m=i(46),v=i(99),g=i(15).printStyle,y=i(105).allOptions,b=i(105).configureOptions,_=i(71).default,w=i(15).default;o.prototype=new c,o.prototype._createConfigurator=function(){return new _(this,this.dom.container,b)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){if(!0===w.validate(t,y)&&console.log("%cErrors have been found in the supplied options object.",g),c.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e),this.setSelection(i)}}},o.prototype.setItems=function(t){var e;e=t?t instanceof d||t instanceof l?t:new d(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},o.prototype.setGroups=function(t){var e;if(t){var i=function(t){return!1!==t.visible};e=t instanceof d||t instanceof l?new l(t,{filter:i}):new d(t.filter(i))}else e=null;this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||es)&&(s=i)}),null!==n&&null!==s){var a=this,h=this.itemSet.items[i[0]],d=-1*this._getScrollTop(),l=null,u=function(t,e,i){var o=r(a,h);if(l||(l=o),l.itemTop!=o.itemTop||l.shouldScroll){l.itemTop!=o.itemTop&&o.shouldScroll&&(l=o,d=-1*a._getScrollTop());var n=d,s=l.scrollOffset,u=i?s:n+(s-n)*t;a._setScrollTop(-u),e||a._redraw()}},c=function(){var t=r(a,h);t.shouldScroll&&t.itemTop!=l.itemTop&&(a._setScrollTop(-t.scrollOffset),a._redraw())},p=function(){c(),setTimeout(c,100)},f=(n+s)/2,m=Math.max(this.range.end-this.range.start,1.1*(s-n)),v=!e||void 0===e.animation||e.animation;v||(l={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(f-m/2,f+m/2,{animation:v},p,u)}}},o.prototype.fit=function(t,e){var i,o=!t||void 0===t.animation||t.animation,n=this.itemsData&&this.itemsData.getDataSet();1===n.length&&void 0===n.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:o},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:o},e))},o.prototype.getItemRange=function(){var t=this.getDataRange(),e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,o=null,r=null;if(null!=e&&null!=i){var a=i-e;a<=0&&(a=10);var d=a/this.props.center.width,l={},u=0;h.forEach(this.itemSet.items,function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),u=l[e].length}});if(u>0)for(var c=0;ci&&(i=h,r=t)}.bind(this)),o&&r){var p=o.getWidthLeft()+10,f=r.getWidthRight()+10,m=this.props.center.width-p-f;m>0&&(this.options.rtl?(e=n(o)-f*a/m,i=s(r)+p*a/m):(e=n(o)-p*a/m,i=s(r)+f*a/m))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=h.convert(i.start,"Date").valueOf(),n=h.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||oe)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e,i=t.center?t.center.x:t.clientX,o=t.center?t.center.y:t.clientY;e=this.options.rtl?h.getAbsoluteRight(this.dom.centerContainer)-i:i-h.getAbsoluteLeft(this.dom.centerContainer);var n=o-h.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=m.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),c=this._toTime(e),p=d?d(c,l,u):c,f=h.getTarget(t),v=null;return null!=s?v="item":null!=a?v="custom-time":h.hasParent(f,this.timeAxis.dom.foreground)?v="axis":this.timeAxis2&&h.hasParent(f,this.timeAxis2.dom.foreground)?v="axis":h.hasParent(f,this.itemSet.dom.labelSet)?v="group-label":h.hasParent(f,this.currentTime.bar)?v="current-time":h.hasParent(f,this.dom.center)&&(v="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:v,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:e,y:n,time:c,snappedTime:p}},o.prototype.toggleRollingMode=function(){this.range.rolling?this.range.stopRolling():(void 0==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(10),u=i(37),c=i(2),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,a.default)(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return(0,d.default)(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,o=this._isColorString(t);if(void 0!==o&&(t=o),!0===c.isString(t)){if(!0===c.isValidRGB(t)){var n=t.substr(4).substr(0,t.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(!0===c.isValidRGBA(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===c.isValidHex(t)){var a=c.hexToRGB(t);i={r:a.r,g:a.g,b:a.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var h=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+(0,s.default)(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=c.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=c.extend({},t)),this.color=t;var e=c.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=c.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=c.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=c.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d") -;this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new l(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),u.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var a=2*Math.PI/360,h=1/this.r,d=void 0;for(s=0;s<360;s++)for(r=0;rr?r:t,e=null==e?r:e0&&l.push(u.screenToValue(n)),!p.hidden&&this.itemsData.length>0&&l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new g(this,this.dom.container,v)},t.exports=o},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Network=i(182),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(122)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){function o(t,e,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:d,clickToUse:!1},s.extend(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new g(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new y(this.body,this.canvas),this.renderer=new v(this.body,this.canvas),this.physics=new f(this.body),this.layoutEngine=new w(this.body),this.clustering=new m(this.body),this.manipulation=new x(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new c(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new p(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new T(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}i(183);var n=i(44),s=i(2),r=i(114),a=i(115),h=i(97),d=i(184),l=i(116).default,u=i(186).default,c=i(187).default,p=i(214).default,f=i(220).default,m=i(227).default,v=i(229).default,g=i(230).default,y=i(231).default,b=i(232).default,_=i(234).default,w=i(235).default,x=i(237).default,k=i(71).default,S=i(15).default,D=i(15),M=D.printStyle,C=i(122),O=C.allOptions,E=C.configureOptions,T=i(238).default;n(o.prototype),o.prototype.setOptions=function(t){var e=this;if(void 0!==t){!0===S.validate(t,O)&&console.log("%cErrors have been found in the supplied options object.",M);var i=["locale","locales","clickToUse"];if(s.selectiveDeepExtend(i,this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new k(this,this.body.container,E,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var o={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};s.deepExtend(o.nodes,this.nodesHandler.options),s.deepExtend(o.edges,this.edgesHandler.options),s.deepExtend(o.layout,this.layoutEngine.options),s.deepExtend(o.interaction,this.selectionHandler.options),s.deepExtend(o.interaction,this.renderer.options),s.deepExtend(o.interaction,this.interactionHandler.options),s.deepExtend(o.manipulation,this.manipulation.options),s.deepExtend(o.physics,this.physics.options),s.deepExtend(o.global,this.canvas.options),s.deepExtend(o.global,this.options),this.configurator.setModuleOptions(o)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new h(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in t)t.hasOwnProperty(i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=t[n.fromId],r=t[n.toId],a=void 0!==s&&void 0!==r,h=!this.clustering._isClusteredEdge(o)&&!1===n.options.hidden&&a&&!1===s.options.hidden&&!1===r.options.hidden;h&&this.body.edgeIndices.push(n.id)}},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var e=r.DOTToGraph(t.dot);return void this.setData(e)}if(t&&t.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=a.parseGephi(t.gephi);return void this.setData(i)}this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&delete this.body.nodes[t];for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&delete this.body.edges[e];s.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,o=void 0,n=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),o=void 0===o?s:Math.max(s,o),n+=s)}if(void 0!==i&&void 0!==o)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,o,n)},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},o.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},o.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},o.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},o.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},o.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},o.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},o.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},o.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},o.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},o.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},o.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},o.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},o.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},o.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},o.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},o.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},o.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},o.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},o.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},o.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},o.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},o.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},o.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},o.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},o.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},o.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},o.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},o.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},o.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},o.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},o.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},o.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},o.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},o.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},o.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},o.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},o.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},o.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},o.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},o.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},o.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t},t.exports=o},function(t,e,i){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;o<10;o++){var n=o%2==0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;i-2*n<0&&(n=i/2),o-2*n<0&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(t,e,i,o){var n=i/2*.5522848,s=o/2*.5522848,r=t+i,a=e+o,h=t+i/2,d=e+o/2;this.beginPath(),this.moveTo(t,d),this.bezierCurveTo(t,d-s,h-n,e,h,e),this.bezierCurveTo(h+n,e,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+n,a,h,a),this.bezierCurveTo(h-n,a,t,d+s,t,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=i,s=o*(1/3),r=n/2*.5522848,a=s/2*.5522848,h=t+n,d=e+s,l=t+n/2,u=e+s/2,c=e+(o-s/2),p=e+o;this.beginPath(),this.moveTo(h,u),this.bezierCurveTo(h,u+a,l+r,d,l,d),this.bezierCurveTo(l-r,d,t,u+a,t,u),this.bezierCurveTo(t,u-a,l-r,e,l,e),this.bezierCurveTo(l+r,e,h,u-a,h,u),this.lineTo(h,c),this.bezierCurveTo(h,c+a,l+r,p,l,p),this.bezierCurveTo(l-r,p,t,c+a,t,c),this.lineTo(t,u)},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=r<0?-c:c,t+=c,e+=h*c,!0===u?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(t,e,i){this.beginPath();var o=2*Math.PI/6;this.moveTo(t+i,e);for(var n=1;n<6;n++)this.lineTo(t+i*Math.cos(o*n),e+i*Math.sin(o*n));this.closePath()})},function(t,e,i){e.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},e.en_EN=e.en,e.en_US=e.en,e.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},e.de_DE=e.de,e.es={edit:"Editar",del:"Eliminar selección",back:"Átras",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},e.it_IT=e.it,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl,e["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},e["pt-BR"]=e["pt-br"],e.pt_BR=e["pt-br"],e.pt_br=e["pt-br"],e.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},e.ru_RU=e.ru,e.cn={edit:"编辑",del:"删除选定",back:"返回",addNode:"添加节点",addEdge:"添加连接线",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"无法将连接线连接到群集。",deleteClusterError:"无法删除群集。",editClusterError:"无法编辑群集。"},e.zh_CN=e.cn},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(){(0,s.default)(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return(0,a.default)(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),o=Math.floor(e/4),n=Math.floor(e/8),s=Math.floor(e/16),r=Math.floor(t/2),a=Math.floor(t/4),h=Math.floor(t/8),d=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,r,i],[r,0,a,o],[r,o,h,n],[5*h,o,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i2){e*=.5;for(var r=0;e>2&&r=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,o,n,s)}else t.drawImage(this.image,i,o,n,s)}}]),t}();e.default=h},function(t,e,i){ +;this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new l(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),u.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var a=2*Math.PI/360,h=1/this.r,d=void 0;for(s=0;s<360;s++)for(r=0;rr?r:t,e=null==e?r:e0&&l.push(u.screenToValue(n)),!p.hidden&&this.itemsData.length>0&&l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new g(this,this.dom.container,v)},t.exports=o},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Network=i(182),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(122)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){function o(t,e,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:d,clickToUse:!1},s.extend(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new g(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new y(this.body,this.canvas),this.renderer=new v(this.body,this.canvas),this.physics=new f(this.body),this.layoutEngine=new w(this.body),this.clustering=new m(this.body),this.manipulation=new x(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new c(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new p(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new T(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}i(183);var n=i(44),s=i(2),r=i(114),a=i(115),h=i(97),d=i(184),l=i(116).default,u=i(186).default,c=i(187).default,p=i(214).default,f=i(220).default,m=i(227).default,v=i(229).default,g=i(230).default,y=i(231).default,b=i(232).default,_=i(234).default,w=i(235).default,x=i(237).default,k=i(71).default,S=i(15).default,D=i(15),M=D.printStyle,C=i(122),O=C.allOptions,E=C.configureOptions,T=i(238).default;n(o.prototype),o.prototype.setOptions=function(t){var e=this;if(void 0!==t){!0===S.validate(t,O)&&console.log("%cErrors have been found in the supplied options object.",M);var i=["locale","locales","clickToUse"];if(s.selectiveDeepExtend(i,this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new k(this,this.body.container,E,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var o={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};s.deepExtend(o.nodes,this.nodesHandler.options),s.deepExtend(o.edges,this.edgesHandler.options),s.deepExtend(o.layout,this.layoutEngine.options),s.deepExtend(o.interaction,this.selectionHandler.options),s.deepExtend(o.interaction,this.renderer.options),s.deepExtend(o.interaction,this.interactionHandler.options),s.deepExtend(o.manipulation,this.manipulation.options),s.deepExtend(o.physics,this.physics.options),s.deepExtend(o.global,this.canvas.options),s.deepExtend(o.global,this.options),this.configurator.setModuleOptions(o)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new h(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in t)t.hasOwnProperty(i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=t[n.fromId],r=t[n.toId],a=void 0!==s&&void 0!==r,h=!this.clustering._isClusteredEdge(o)&&!1===n.options.hidden&&a&&!1===s.options.hidden&&!1===r.options.hidden;h&&this.body.edgeIndices.push(n.id)}},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var e=r.DOTToGraph(t.dot);return void this.setData(e)}if(t&&t.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=a.parseGephi(t.gephi);return void this.setData(i)}this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&delete this.body.nodes[t];for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&delete this.body.edges[e];s.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,o=void 0,n=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),o=void 0===o?s:Math.max(s,o),n+=s)}if(void 0!==i&&void 0!==o)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,o,n)},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},o.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},o.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},o.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},o.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},o.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},o.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},o.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},o.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},o.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},o.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},o.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},o.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},o.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},o.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},o.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},o.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},o.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},o.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},o.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},o.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},o.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},o.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},o.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},o.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},o.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},o.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},o.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},o.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},o.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},o.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},o.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},o.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},o.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},o.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},o.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},o.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},o.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},o.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},o.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},o.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},o.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t},t.exports=o},function(t,e,i){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;o<10;o++){var n=o%2==0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;i-2*n<0&&(n=i/2),o-2*n<0&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(t,e,i,o){var n=i/2*.5522848,s=o/2*.5522848,r=t+i,a=e+o,h=t+i/2,d=e+o/2;this.beginPath(),this.moveTo(t,d),this.bezierCurveTo(t,d-s,h-n,e,h,e),this.bezierCurveTo(h+n,e,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+n,a,h,a),this.bezierCurveTo(h-n,a,t,d+s,t,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=i,s=o*(1/3),r=n/2*.5522848,a=s/2*.5522848,h=t+n,d=e+s,l=t+n/2,u=e+s/2,c=e+(o-s/2),p=e+o;this.beginPath(),this.moveTo(h,u),this.bezierCurveTo(h,u+a,l+r,d,l,d),this.bezierCurveTo(l-r,d,t,u+a,t,u),this.bezierCurveTo(t,u-a,l-r,e,l,e),this.bezierCurveTo(l+r,e,h,u-a,h,u),this.lineTo(h,c),this.bezierCurveTo(h,c+a,l+r,p,l,p),this.bezierCurveTo(l-r,p,t,c+a,t,c),this.lineTo(t,u)},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=r<0?-c:c,t+=c,e+=h*c,!0===u?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(t,e,i){this.beginPath();var o=2*Math.PI/6;this.moveTo(t+i,e);for(var n=1;n<6;n++)this.lineTo(t+i*Math.cos(o*n),e+i*Math.sin(o*n));this.closePath()})},function(t,e,i){e.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},e.en_EN=e.en,e.en_US=e.en,e.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},e.de_DE=e.de,e.es={edit:"Editar",del:"Eliminar selección",back:"Átras",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},e.it_IT=e.it,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl,e["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},e["pt-BR"]=e["pt-br"],e.pt_BR=e["pt-br"],e.pt_br=e["pt-br"],e.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},e.ru_RU=e.ru,e.cn={edit:"编辑",del:"åˆ é™¤é€‰å®š",back:"返回",addNode:"æ·»åŠ èŠ‚ç‚¹",addEdge:"æ·»åŠ è¿žæŽ¥çº¿",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"æ— æ³•å°†è¿žæŽ¥çº¿è¿žæŽ¥åˆ°ç¾¤é›†ã€‚",deleteClusterError:"æ— æ³•åˆ é™¤ç¾¤é›†ã€‚",editClusterError:"æ— æ³•ç¼–è¾‘ç¾¤é›†ã€‚"},e.zh_CN=e.cn},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(){(0,s.default)(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return(0,a.default)(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),o=Math.floor(e/4),n=Math.floor(e/8),s=Math.floor(e/16),r=Math.floor(t/2),a=Math.floor(t/4),h=Math.floor(t/8),d=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,r,i],[r,0,a,o],[r,o,h,n],[5*h,o,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i2){e*=.5;for(var r=0;e>2&&r=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,o,n,s)}else t.drawImage(this.image,i,o,n,s)}}]),t}();e.default=h},function(t,e,i){ function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=function(){function t(){(0,s.default)(this,t),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},h.extend(this.options,this.defaultOptions)}return(0,a.default)(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var i in t)if(t.hasOwnProperty(i)&&-1===e.indexOf(i)){var o=t[i];this.add(i,o)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.groups[t];if(void 0===i&&e)if(!1===this.options.useDefaultGroups&&this.groupsArray.length>0){var o=this.groupIndex%this.groupsArray.length;this.groupIndex++,i={},i.color=this.groups[this.groupsArray[o]],this.groups[t]=i}else{var n=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,i={},i.color=this.defaultGroups[n],this.groups[t]=i}return i}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e.default=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(47).default,c=function(){function t(e,i,o,n){var r=this;if((0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.layoutEngine=n,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(t,e){r.add(e.items)},update:function(t,e){r.update(e.items,e.data,e.oldData)},remove:function(t,e){r.remove(e.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=h.bridgeObject(this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.nodesListeners,function(e,i){t.body.data.nodes&&t.body.data.nodes.off(i,e)}),delete t.body.functions.createNode,delete t.nodesListeners.add,delete t.nodesListeners.update,delete t.nodesListeners.remove,delete t.nodesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){if(u.parseOptions(this.options,t),void 0!==t.shape)for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&this.body.nodes[e].updateShape();if(void 0!==t.font)for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&(this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh());if(void 0!==t.size)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&this.body.nodes[o].needsRefresh();void 0===t.hidden&&void 0===t.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if(t instanceof d||t instanceof l)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new d,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new d}if(i&&h.forEach(this.nodesListeners,function(t,e){i.off(e,t)}),this.body.nodes={},this.body.data.nodes){var o=this;h.forEach(this.nodesListeners,function(t,e){o.body.data.nodes.on(e,t)});var n=this.body.data.nodes.getIds();this.add(n,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:u)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h.forEach(this.body.nodes,function(i,o){var n=t.body.data.nodes.get(o);void 0!==n&&(!0===e&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(n))})}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Array.isArray(t)){for(var i=0;i0)for(var r=0;r0)for(var p=0;p0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.position/.test(t.substr(i.position,3))?i.mono||i.ital||!//.test(t.substr(i.position,3))?!i.mono&&//.test(t.substr(i.position,6))?(i.emitBlock(),i.mono=!0,i.modStack.unshift("mono"),i.position+=5):!i.mono&&"bold"===i.mod()&&/<\/b>/.test(t.substr(i.position,4))?(i.emitBlock(),i.bold=!1,i.modStack.shift(),i.position+=3):!i.mono&&"ital"===i.mod()&&/<\/i>/.test(t.substr(i.position,4))?(i.emitBlock(),i.ital=!1,i.modStack.shift(),i.position+=3):"mono"===i.mod()&&/<\/code>/.test(t.substr(i.position,7))?(i.emitBlock(),i.mono=!1,i.modStack.shift(),i.position+=6):i.add(o):(i.emitBlock(),i.ital=!0,i.modStack.unshift("ital"),i.position+=2):(i.emitBlock(),i.bold=!0,i.modStack.unshift("bold"),i.position+=2):/&/.test(o)?/</.test(t.substr(i.position,4))?(i.add("<"),i.position+=3):/&/.test(t.substr(i.position,5))?(i.add("&"),i.position+=4):i.add("&"):i.add(o),i.position++}return i.emitBlock(),e}},{key:"splitMarkdownBlocks",value:function(t){var e=[],i={bold:!1,ital:!1,mono:!1,beginable:!0,spacing:!1,position:0,buffer:"",modStack:[]};for(i.mod=function(){return 0===this.modStack.length?"normal":this.modStack[0]},i.modName=function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":i.bold&&i.ital?"boldital":i.bold?"bold":i.ital?"ital":void 0},i.emitBlock=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",i=0;i1&&void 0!==arguments[1]?arguments[1]:"normal",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t.replace(/^( +)/g,"$1\r"),t=t.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var o=t.split("\r");o.length>0;){var n=this.getLongestFit(o);if(0===n){var s=o[0],r=this.getLongestFitWord(s);this.lines.newLine(s.slice(0,r),e),o[0]=s.slice(r)}else{var a=n;" "===o[n-1]?n--:" "===o[a]&&a++;var h=o.slice(0,n).join("");n==o.length&&i?this.lines.append(h,e):this.lines.newLine(h,e),o=o.slice(a)}}}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(90),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=function(){function t(e){(0,a.default)(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return(0,d.default)(t,[{key:"_add",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var o=e;void 0!==e&&""!==e||(o=" ");var n=this.measureText(o,i),r=(0,s.default)({},n.values);r.text=e,r.width=n.width,r.mod=i,void 0!==e&&""!==e||(r.width=0),this.lines[t].blocks.push(r),this.lines[t].width+=r.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;tt&&(t=o.width),e+=o.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.width=o.width+this.margin.right+this.margin.left,this.height=o.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.roundRect(this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"updateBoundingBox",value:function(t,e,i,o,n){this._updateBoundingBox(t,e,i,o,n);var s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(m.default);e.default=v},function(t,e,i){i(195),t.exports=i(7).Object.getPrototypeOf},function(t,e,i){var o=i(41),n=i(85);i(87)("getPrototypeOf",function(){return function(t){return n(o(t))}})},function(t,e,i){t.exports={default:i(197),__esModule:!0}},function(t,e,i){i(198),t.exports=i(7).Object.setPrototypeOf},function(t,e,i){var o=i(17);o(o.S,"Object",{setPrototypeOf:i(199).set})},function(t,e,i){var o=i(32),n=i(27),s=function(t,e){if(n(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{o=i(80)(Function.call,i(89).f(Object.prototype,"__proto__").set,2),o(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,i){return s(t,i),e?t.__proto__=i:o(t,i),t}}({},!1):void 0),check:s}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=Math.max(o.width+this.margin.right+this.margin.left,o.height+this.margin.top+this.margin.bottom);this.options.size=n/2,this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),this.updateBoundingBox(e,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,i,o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,this.height=o,void(this.radius=.5*this.width)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),t.save(),t.clip(),this._drawImageAtPosition(t,s),t.restore(),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=o.width+this.margin.right+this.margin.left;this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.database(e-this.width/2,i-this.height/2,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"diamond",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"circle",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),this.options.size}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.height=2*o.height,this.width=o.width+o.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-.5*this.width,this.top=i-.5*this.height,this.initContextForDraw(t,s),t.ellipse_vis(this.left,this.top,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,e,i,o,n)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){if(this.resize(t,o,n),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=i-this.height/2,this._icon(t,e,i,o,n,s),void 0!==this.options.label){this.labelModule.draw(t,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,o)}this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){if(this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0){this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5)}}},{key:"_icon",value:function(t,e,i,o,n,s){var r=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+r+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,s),t.fillText(this.options.icon.code,e,i),this.disableShadow(t,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,void(this.height=o)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){if(this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,!0===this.options.shapeProperties.useBorderWithImage){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.beginPath(),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),t.fill(),this.performStroke(t,s),t.closePath()}this._drawImageAtPosition(t,s),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this._updateBoundingBox(t,e),void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)} }]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"square",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"hexagon",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"star",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.textSize=this.labelModule.getTextSize(t,e,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.enableShadow(t,s),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n),this.disableShadow(t,s),this.updateBoundingBox(e,i,t,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangle",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangleDown",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(74).default,c=function(){function t(e,i,o){var n=this;(0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.body.functions.createEdge=this.create.bind(this),this.edgesListeners={add:function(t,e){n.add(e.items)},update:function(t,e){n.update(e.items)},remove:function(t,e){n.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},selectionWidth:1.5,selfReferenceSize:20,shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},h.deepExtend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("_forceDisableDynamicCurves",function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===e&&(e="continuous");var o=!1;for(var n in t.body.edges)if(t.body.edges.hasOwnProperty(n)){var s=t.body.edges[n],r=t.body.data.edges._data[n];if(void 0!==r){var a=r.smooth;void 0!==a&&!0===a.enabled&&"dynamic"===a.type&&(void 0===e?s.setOptions({smooth:!1}):s.setOptions({smooth:{type:e}}),o=!0)}}!0===i&&!0===o&&t.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){t.reconnectEdges()}),this.body.emitter.on("refreshEdges",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.edgesListeners,function(e,i){t.body.data.edges&&t.body.data.edges.off(i,e)}),delete t.body.functions.createEdge,delete t.edgesListeners.add,delete t.edgesListeners.update,delete t.edgesListeners.remove,delete t.edgesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){u.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var i in this.body.edges)this.body.edges.hasOwnProperty(i)&&(e=this.body.edges[i].updateEdgeType()||e);if(void 0!==t.font)for(var o in this.body.edges)this.body.edges.hasOwnProperty(o)&&this.body.edges[o].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(t instanceof d||t instanceof l)this.body.data.edges=t;else if(Array.isArray(t))this.body.data.edges=new d,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new d}if(o&&h.forEach(this.edgesListeners,function(t,e){o.off(e,t)}),this.body.edges={},this.body.data.edges){h.forEach(this.edgesListeners,function(t,i){e.body.data.edges.on(i,t)});var n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;n1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var i=this.body.edges;h.forEach(t,function(t){var e=i[t];void 0!==e&&e.remove()}),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;h.forEach(this.body.edges,function(e,i){var o=t.body.data.edges._data[i];void 0!==o&&e.setOptions(o)})}},{key:"create",value:function(t){return new u(t,this.body,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,i=this.body.edges;for(t in e)e.hasOwnProperty(t)&&(e[t].edges=[]);for(t in i)if(i.hasOwnProperty(t)){var o=i[t];o.from=null,o.to=null,o.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var i=this.body.edges[t];void 0!==i.fromId&&e.push(i.fromId),void 0!==i.toId&&e.push(i.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];h.forEach(this.body.edges,function(i,o){var n=t.body.nodes[i.toId],s=t.body.nodes[i.fromId];void 0!==n&&!0===n.isCluster||void 0!==s&&!0===s.isCluster||void 0!==n&&void 0!==s||e.push(o)}),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.edges,e=this.body.data.edges,i=[];e.forEach(function(e,o){void 0===t[o]&&i.push(o)}),this.add(i,!0)}}]),t}();e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(3),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(4),p=o(c),f=i(5),m=o(f),v=i(216),g=o(v),y=function(t){function e(t,i,o){return(0,d.default)(this,e),(0,p.default)(this,(e.__proto__||(0,a.default)(e)).call(this,t,i,o))}return(0,m.default)(e,t),(0,u.default)(e,[{key:"_line",value:function(t,e,i){var o=i[0],n=i[1];this._bezierCurve(t,e,o,n)}},{key:"_getViaCoordinates",value:function(){var t=this.from.x-this.to.x,e=this.from.y-this.to.y,i=void 0,o=void 0,n=void 0,s=void 0,r=this.options.smooth.roundness;return(Math.abs(t)>Math.abs(e)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,r){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),h=(0,s.default)(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,r,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=(0,s.default)(e,2),o=i[0],n=i[1],r=t,a=[];return a[0]=Math.pow(1-r,3),a[1]=3*r*Math.pow(1-r,2),a[2]=3*Math.pow(r,2)*(1-r),a[3]=Math.pow(r,3),{x:a[0]*this.fromPoint.x+a[1]*o.x+a[2]*n.x+a[3]*this.toPoint.x,y:a[0]*this.fromPoint.y+a[1]*o.y+a[2]*n.y+a[3]*this.toPoint.y}}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r,a){var h=1e9,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=t,m=e,v=[0,0,0,0];for(l=1;l<10;l++)u=.1*l,v[0]=Math.pow(1-u,3),v[1]=3*u*Math.pow(1-u,2),v[2]=3*Math.pow(u,2)*(1-u),v[3]=Math.pow(u,3),c=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,c,p,n,s),h=d1&&void 0!==arguments[1]?arguments[1]:this.via,i=t,o=void 0,n=void 0;if(this.from===this.to){var r=this._getCircleData(this.from),a=(0,s.default)(r,3),h=a[0],d=a[1],l=a[2],u=2*Math.PI*(1-i);o=h+l*Math.sin(u),n=d+l-l*(1-Math.cos(u))}else o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToBezierEdge(t,e,i,o,n,s,this.via)}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t=void 0,e=void 0,i=this.options.smooth.roundness,o=this.options.smooth.type,n=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if("discrete"===o||"diagonalCross"===o){var r=void 0,a=void 0;r=a=n<=s?i*s:i*n,this.from.x>this.to.x&&(r=-r),this.from.y>=this.to.y&&(a=-a),t=this.from.x+r,e=this.from.y+a,"discrete"===o&&(n<=s?t=nthis.to.x&&(_=-_),this.from.y>=this.to.y&&(w=-w),t=this.from.x+_,e=this.from.y+w,n<=s?t=this.from.x<=this.to.x?this.to.xt?this.to.x:t:e=this.from.y>=this.to.y?this.to.y>e?this.to.y:e:this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,o,n,s,r)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t;return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(118),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,o=this.from;t.id===this.from.id&&(i=this.from,o=this.to);var n=Math.atan2(i.y-o.y,i.x-o.x),s=i.x-o.x,r=i.y-o.y,a=Math.sqrt(s*s+r*r),h=t.distanceToBorder(e,n),d=(a-h)/a,l={};return l.x=(1-d)*o.x+d*i.x,l.y=(1-d)*o.y+d*i.y,l}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToLine(t,e,i,o,n,s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(120).default,u=i(221).default,c=i(222).default,p=i(223).default,f=i(224).default,m=i(121).default,v=i(225).default,g=i(226).default,y=i(2),b=i(119).default,_=function(){function t(e){(0,a.default)(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0},y.extend(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return(0,d.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",function(){t.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){t.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){t.stopSimulation(),t.ready=!1}),this.body.emitter.on("disablePhysics",function(){t.physicsEnabled=!1,t.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()}),this.body.emitter.on("startSimulation",function(){!0===t.ready&&t.startSimulation()}),this.body.emitter.on("stopSimulation",function(){t.stopSimulation()}),this.body.emitter.on("destroy",function(){t.stopSimulation(!1),t.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){t.updatePhysicsData()})}},{key:"setOptions",value:function(t){void 0!==t&&(!1===t?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):!0===t?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,y.selectiveNotDeepExtend(["stabilization"],this.options,t),y.mergeOptions(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation()),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new v(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new g(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new u(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new c(this.body,this.physicsBody,t),this.edgesSolver=new f(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new l(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=this.simulationStep.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Date.now();this.physicsTick(),(Date.now()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,i=0,o=0;oo&&(t=t>0?o:-o),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],i=this.physicsBody.forces[t],o=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:o.x,vy:o.y},!1===e.options.fixed.x?(o.x=this.calculateComponentVelocity(o.x,i.x,e.options.mass),e.x+=o.x*this.timestep):(i.x=0,o.x=0),!1===e.options.fixed.y?(o.y=this.calculateComponentVelocity(o.y,i.y,e.options.mass),e.y+=o.y*this.timestep):(i.y=0,o.y=0),Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(t.hasOwnProperty(e)&&t[e].x&&t[e].y){var i=t[e].options.fixed;this.freezeCache[e]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;if("number"!=typeof e&&(e=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0===this.physicsBody.physicsNodeIndices.length)return void(this.ready=!0);this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,setTimeout(function(){return t._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(6),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(2),p=i(76).default,f=i(228).default,m=i(74).default,v=i(47).default,g=function(){function t(e){var i=this;(0,d.default)(this,t),this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},c.extend(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){i.clusteredNodes={},i.clusteredEdges={}})}return(0,u.default)(t,[{key:"clusterByHubsize",value:function(t,e){void 0===t?t=this._getHubSize():"object"===(void 0===t?"undefined":(0,a.default)(t))&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],o=0;o=t&&i.push(n.id)}for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{},i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var o={},n={};c.forEach(this.body.nodes,function(i,s){var r=p.cloneOptions(i);!0===e.joinCondition(r)&&(o[s]=i,c.forEach(i.edges,function(e){void 0===t.clusteredEdges[e.id]&&(n[e.id]=e)}))}),this._cluster(o,n,e,i)}},{key:"clusterByEdgeCount",value:function(t,e){var i=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var n=[],r={},a=void 0,h=void 0,d=void 0,l=0;l0&&(0,s.default)(m).length>0&&!0===b)if(c=function(){for(var t=0;t1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];e=this._checkOptions(e,o),void 0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);var n={},r={},a=o.id,h=p.cloneOptions(o);n[a]=o;for(var d=0;d-1&&(r[g.id]=g)}this._cluster(n,r,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,o){for(var n=void 0,r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=(0,s.default)(t),c=[],p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(0!=(0,s.default)(t).length&&(1!=(0,s.default)(t).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){for(var n in t)if(t.hasOwnProperty(n)&&void 0!==this.clusteredNodes[n])return;var r=c.deepExtend({},i.clusterNodeProperties);if(void 0!==i.processProperties){var a=[];for(var h in t)if(t.hasOwnProperty(h)){var d=p.cloneOptions(t[h]);a.push(d)}var l=[];for(var u in e)if(e.hasOwnProperty(u)&&"clusterEdge:"!==u.substr(0,12)){var m=p.cloneOptions(e[u],"edge");l.push(m)}if(!(r=i.processProperties(r,a,l)))throw new Error("The processProperties function does not return properties!")}void 0===r.id&&(r.id="cluster:"+c.randomUUID());var v=r.id;void 0===r.label&&(r.label="cluster");var g=void 0;void 0===r.x&&(g=this._getClusterPosition(t),r.x=g.x),void 0===r.y&&(void 0===g&&(g=this._getClusterPosition(t)),r.y=g.y),r.id=v;var y=this.body.functions.createNode(r,f);y.containedNodes=t,y.containedEdges=e,y.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[r.id]=y,this._clusterEdges(t,e,r,i.clusterEdgeProperties),r.id=void 0,!0===o&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(t){void 0===this.clusteredEdges[t.id]&&(this.clusteredEdges[t.id]={physics:t.options.physics})}},{key:"_restoreEdge",value:function(t){var e=this.clusteredEdges[t.id];void 0!==e&&(t.setOptions({physics:e.physics}),delete this.clusteredEdges[t.id])}},{key:"isCluster",value:function(t){return void 0!==this.body.nodes[t]?!0===this.body.nodes[t].isCluster:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(t){for(var e=(0,s.default)(t),i=t[e[0]].x,o=t[e[0]].x,n=t[e[0]].y,r=t[e[0]].y,a=void 0,h=1;ho?a.x:o,n=a.yr?a.y:r;return{x:.5*(i+o),y:.5*(n+r)}}},{key:"openCluster",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var o=this.body.nodes[t];if(void 0===o)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==o.isCluster||void 0===o.containedNodes||void 0===o.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var n=this.findNode(t),s=n.indexOf(t)-1;if(s>=0){var r=n[s];return this.body.nodes[r]._openChildCluster(t),delete this.body.nodes[t],void(!0===i&&this.body.emitter.emit("_dataChanged"))}var a=o.containedNodes,h=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var d={},l={x:o.x,y:o.y};for(var u in a)if(a.hasOwnProperty(u)){var p=this.body.nodes[u];d[u]={x:p.x,y:p.y}}var f=e.releaseFunction(l,d);for(var m in a)if(a.hasOwnProperty(m)){var v=this.body.nodes[m];void 0!==f[m]&&(v.x=void 0===f[m].x?o.x:f[m].x,v.y=void 0===f[m].y?o.y:f[m].y)}}else c.forEach(a,function(t){!1===t.options.fixed.x&&(t.x=o.x),!1===t.options.fixed.y&&(t.y=o.y)});for(var g in a)if(a.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[g]}for(var b=[],_=0;_0&&n<100;){var s=e.pop();if(void 0!==s){var r=this.body.edges[s];if(void 0!==r){n++;var a=r.clusteringEdgeReplacingIds;if(void 0===a)o.push(s);else for(var h=0;ho&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}},{key:"_createClusteredEdge",value:function(t,e,i,o,n){var s=p.cloneOptions(i,"edge");c.deepExtend(s,o),s.from=t,s.to=e,s.id="clusterEdge:"+c.randomUUID(),void 0!==n&&c.deepExtend(s,n);var r=this.body.functions.createEdge(s);return r.clusteringEdgeReplacingIds=[i.id],r.connect(),this.body.edges[r.id]=r,r}},{key:"_clusterEdges",value:function(t,e,i,o){if(e instanceof m){var n=e,s={};s[n.id]=n,e=s}if(t instanceof v){var r=t,a={};a[r.id]=r,t=a}if(void 0===i||null===i)throw new Error("_clusterEdges: parameter clusterNode required");void 0===o&&(o=i.clusterEdgeProperties),this._createClusterEdges(t,e,i,o);for(var h in e)if(e.hasOwnProperty(h)&&void 0!==this.body.edges[h]){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var l in t)t.hasOwnProperty(l)&&(this.clusteredNodes[l]={clusterId:i.id,node:this.body.nodes[l]},this.body.nodes[l].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var i=e.clusterId;if(void 0!==i)return this.body.nodes[i]}}}},{key:"_filter",value:function(t,e){var i=[];return c.forEach(t,function(t){e(t)&&i.push(t)}),i}},{key:"_updateState",value:function(){var t=this,e=void 0,i=[],o=[],n=function(e){c.forEach(t.body.nodes,function(t){!0===t.isCluster&&e(t)})};for(e in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(e)){var r=this.body.nodes[e];void 0===r&&i.push(e)}n(function(t){for(var e=0;e0}e.endPointsValid()&&n||o.push(i)}),n(function(e){c.forEach(o,function(i){delete e.containedEdges[i],c.forEach(e.edges,function(n,s){if(n.id===i)return void(e.edges[s]=null);n.clusteringEdgeReplacingIds=t._filter(n.clusteringEdgeReplacingIds,function(t){return-1===o.indexOf(t)})}),e.edges=t._filter(e.edges,function(t){return null!==t})})}),c.forEach(o,function(e){delete t.clusteredEdges[e]}),c.forEach(o,function(e){delete t.body.edges[e]});var h=(0,s.default)(this.body.edges);c.forEach(h,function(e){var i=t.body.edges[e],o=t._isClusteredNode(i.fromId)||t._isClusteredNode(i.toId);if(o!==t._isClusteredEdge(i.id)){if(!o)throw new Error("remove edge from clustering not implemented!");var n=t._getClusterNodeForNode(i.fromId);void 0!==n&&t._clusterEdges(t.body.nodes[i.fromId],i,n);var s=t._getClusterNodeForNode(i.toId);void 0!==s&&t._clusterEdges(t.body.nodes[i.toId],i,s)}});for(var d=!1,l=!0;l;)!function(){var e=[];n(function(t){var i=(0,s.default)(t.containedNodes).length,o=!0===t.options.allowSingleNodeCluster;(o&&i<1||!o&&i<2)&&e.push(t.id)});for(var i=0;i0,d=d||l}();d&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}();e.default=g},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(2),m=i(47).default,v=function(t){function e(t,i,o,n,r,h){(0,a.default)(this,e);var d=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o,n,r,h));return d.isCluster=!0,d.containedNodes={},d.containedEdges={},d}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_openChildCluster",value:function(t){var e=this,i=this.body.nodes[t];if(void 0===this.containedNodes[t])throw new Error("node with id: "+t+" not in current cluster");if(!i.isCluster)throw new Error("node with id: "+t+" is not a cluster");delete this.containedNodes[t],f.forEach(i.edges,function(t){delete e.containedEdges[t.id]}),f.forEach(i.containedNodes,function(t,i){e.containedNodes[i]=t}),i.containedNodes={},f.forEach(i.containedEdges,function(t,i){e.containedEdges[i]=t}),i.containedEdges={},f.forEach(i.edges,function(t){f.forEach(e.edges,function(i){var o=i.clusteringEdgeReplacingIds.indexOf(t.id);-1!==o&&(f.forEach(t.clusteringEdgeReplacingIds,function(t){i.clusteringEdgeReplacingIds.push(t),e.body.edges[t].edgeReplacedById=i.id}),i.clusteringEdgeReplacingIds.splice(o,1))})}),i.edges=[]}}]),e}(m);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(){var t;void 0!==window&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===t?function(t){t()}:t}Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),r=o(s),a=i(1),h=o(a),d=i(2),l=function(){function t(e,i){(0,r.default)(this,t),n(),this.body=e,this.canvas=i,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideNodesOnDrag:!1},d.extend(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return(0,h.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("dragStart",function(){t.dragging=!0}),this.body.emitter.on("dragEnd",function(){t.dragging=!1}),this.body.emitter.on("_resizeNodes",function(){t._resizeNodes()}),this.body.emitter.on("_redraw",function(){!1===t.renderingActive&&t._redraw()}),this.body.emitter.on("_blockRedraw",function(){t.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){t.allowRedraw=!0,t.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()}),this.body.emitter.on("_stopRendering",function(){t.renderRequests-=1,t.renderingActive=t.renderRequests>0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,!0===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];d.selectiveDeepExtend(e,this.options,t)}}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var i=void 0,o=window;return!0===this.requiresTimeout?i=o.setTimeout(t,e):o.requestAnimationFrame&&(i=o.requestAnimationFrame(t)),i}}},{key:"_startRendering",value:function(){!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(this._renderStep.bind(this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame(function(){t._redraw(!1)},0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var e=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&this._drawEdges(e),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),!0===t&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=this.canvas.DOMtoCanvas({x:-20,y:-20}),a=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),h={top:r.y,left:r.x,bottom:a.y,right:a.x},d=0;d0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new h(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:h.DIRECTION_ALL}),d.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new h(this.frame),d.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(s),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var r=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s), diff --git a/docs/js/menu-wc.js b/docs/js/menu-wc.js index 6f8f4b82..776493ef 100644 --- a/docs/js/menu-wc.js +++ b/docs/js/menu-wc.js @@ -44,11 +44,11 @@ customElements.define('compodoc-menu', class extends HTMLElement { LICENSE - +
  • @@ -58,7 +58,7 @@ customElements.define('compodoc-menu', class extends HTMLElement { Additional documentation -