@onhand-bi/sdk 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +175 -3
- package/config/index.d.ts +1 -0
- package/constants/api/url.d.ts +5 -0
- package/controllers/cclient.d.ts +3 -0
- package/controllers/client.d.ts +2 -2
- package/controllers/index.d.ts +1 -0
- package/core/base-client.d.ts +9 -0
- package/core/cclient.d.ts +12 -0
- package/core/client.d.ts +8 -6
- package/core/index.d.ts +1 -0
- package/environment.d.ts +4 -0
- package/helpers/response.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.LICENSE.txt +10 -0
- package/index.node.d.ts +2 -0
- package/index.node.js +2 -0
- package/index.node.js.LICENSE.txt +24 -0
- package/models/cclient.d.ts +15 -0
- package/models/client.d.ts +56 -0
- package/models/index.d.ts +1 -0
- package/package.json +1 -1
- package/services/cclient.d.ts +6 -0
- package/services/client.d.ts +5 -2
- package/services/index.d.ts +1 -2
- package/services/confidential-client.d.ts +0 -7
- package/services/public-client.d.ts +0 -4
- package/type/client.type.d.ts +0 -29
- package/type/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,176 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# SDK ONHANDBI
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@onhand-bi-dev/sdk)
|
|
4
|
+

|
|
5
|
+
[](https://pkg-size.dev/@onhand-bi-dev/sdk)
|
|
6
|
+
[](https://www.npmjs.com/package/@onhand-bi-dev/sdk)
|
|
7
|
+
<a href="https://pkg-size.dev/@onhand-bi-dev/sdk"><img src="https://pkg-size.dev/badge/install/103906" title="Install size for @onhand-bi-dev/sdk"></a>
|
|
8
|
+
<a href="https://pkg-size.dev/@onhand-bi-dev/sdk"><img src="https://pkg-size.dev/badge/bundle/24854" title="Bundle size for @onhand-bi-dev/sdk"></a>
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm i @onhand-bi-dev/sdk
|
|
14
|
+
# or
|
|
15
|
+
# yarn add @onhand-bi-dev/sdk
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Import
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import OHBI from "@onhand-bi-dev/sdk";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### Auth
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
const accessToken = "<your access token>"
|
|
30
|
+
const OHBI_SDK = await OHBI.newClient(accessToken);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Get List Report
|
|
34
|
+
This method retrieves a list of reports.
|
|
35
|
+
|
|
36
|
+
#### Parameters:
|
|
37
|
+
|
|
38
|
+
page (number, optional): The page number of the report list. Default is 1.
|
|
39
|
+
searchText (string, optional): The search text to filter reports. Default is an empty string.
|
|
40
|
+
Returns:
|
|
41
|
+
|
|
42
|
+
A Promise that resolves to an array of Report objects representing the reports.
|
|
43
|
+
#### Example:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
|
|
47
|
+
OHBI_SDK.getReports(1, 'search text')
|
|
48
|
+
.then((reports) => {
|
|
49
|
+
// Process the list of reports
|
|
50
|
+
console.log('Reports:', reports)
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
console.log('Error retrieving reports:', error)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Get Report
|
|
59
|
+
This method retrieves a specific report by its ID.
|
|
60
|
+
|
|
61
|
+
#### Parameters:
|
|
62
|
+
|
|
63
|
+
reportId (number): The ID of the report.
|
|
64
|
+
isOwner (boolean, optional): Indicates whether the client is the owner of the report. Default is false.
|
|
65
|
+
Returns:
|
|
66
|
+
|
|
67
|
+
A Promise that resolves to a Report object representing the report, or null if the report is not found.
|
|
68
|
+
#### Example:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
const reportId = 12345
|
|
72
|
+
|
|
73
|
+
OHBI_SDK.getReport(reportId)
|
|
74
|
+
.then((report) => {
|
|
75
|
+
if (report) {
|
|
76
|
+
// Process the report
|
|
77
|
+
console.log('Report:', report)
|
|
78
|
+
} else {
|
|
79
|
+
console.log('Report not found')
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
.catch((error) => {
|
|
83
|
+
console.log('Error retrieving report:', error)
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
### Load Report
|
|
88
|
+
This method loads a report into an HTML element identified by the specified tag ID.
|
|
89
|
+
|
|
90
|
+
#### Parameters:
|
|
91
|
+
|
|
92
|
+
reportId (number): The ID of the report to load.
|
|
93
|
+
tagId (string): The ID of the HTML element where the report should be loaded.
|
|
94
|
+
isOwner (boolean, optional): Indicates whether the client is the owner of the report. Default is false.
|
|
95
|
+
Example:
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
const reportId = 12345
|
|
99
|
+
const tagId = 'report-container'
|
|
100
|
+
|
|
101
|
+
OHBI_SDK.loadReport(reportId, tagId, true)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
### Load App
|
|
105
|
+
This method loads an app into an HTML element identified by the specified tag ID.
|
|
106
|
+
|
|
107
|
+
#### Parameters:
|
|
108
|
+
|
|
109
|
+
appId (number): The ID of the app to load.
|
|
110
|
+
tagId (string): The ID of the HTML element where the app should be loaded.
|
|
111
|
+
isOwner (boolean, optional): Indicates whether the client is the owner of the app. Default is false.
|
|
112
|
+
|
|
113
|
+
#### Example:
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
const appId = 54321
|
|
117
|
+
const tagId = 'app-container'
|
|
118
|
+
|
|
119
|
+
client.loadApp(appId, tagId, false)
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Get App
|
|
124
|
+
This method retrieves a specific app by its ID.
|
|
125
|
+
|
|
126
|
+
#### Parameters:
|
|
127
|
+
|
|
128
|
+
appId (number): The ID of the app.
|
|
129
|
+
isOwner (boolean, optional): Indicates whether the client is the owner of the app. Default is false.
|
|
130
|
+
#### Returns:
|
|
131
|
+
|
|
132
|
+
A Promise that resolves to an AppModel object representing the app, or null if the app is not found.
|
|
133
|
+
#### Example:
|
|
134
|
+
|
|
135
|
+
```js
|
|
136
|
+
const appId = 54321
|
|
137
|
+
|
|
138
|
+
OHBI_SDK.getApp(appId)
|
|
139
|
+
.then((app) => {
|
|
140
|
+
if (app) {
|
|
141
|
+
// Process the app
|
|
142
|
+
console.log('App:', app)
|
|
143
|
+
} else {
|
|
144
|
+
console.log('App not found')
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
.catch((error) => {
|
|
148
|
+
console.log('Error retrieving app:', error)
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
### Get List App
|
|
153
|
+
This method retrieves a list of apps.
|
|
154
|
+
|
|
155
|
+
#### Parameters:
|
|
156
|
+
|
|
157
|
+
page (number, optional): The page number of the app list. Default is 1.
|
|
158
|
+
searchText (string, optional): The search text to filter apps. Default is an empty string.
|
|
159
|
+
isOwner (boolean, optional): Indicates whether the client is the owner of the app. Default is false.
|
|
160
|
+
#### Returns:
|
|
161
|
+
|
|
162
|
+
A Promise that resolves to an array of AppModel objects representing the apps.
|
|
163
|
+
#### Example:
|
|
164
|
+
|
|
165
|
+
```js
|
|
166
|
+
OHBI_SDK.getApps(1, 'search text', false)
|
|
167
|
+
.then((apps) => {
|
|
168
|
+
// Process the list of apps
|
|
169
|
+
console.log('Apps:', apps)
|
|
170
|
+
})
|
|
171
|
+
.catch((error) => {
|
|
172
|
+
console.log('Error retrieving apps:', error)
|
|
173
|
+
})
|
|
174
|
+
```
|
|
175
|
+
|
|
3
176
|
|
|
4
|
-
# How to get report
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const realmClientId = "security-admin-console-dev";
|
package/constants/api/url.d.ts
CHANGED
|
@@ -3,4 +3,9 @@ export declare const API_URLS: {
|
|
|
3
3
|
GET_REPORTS: string;
|
|
4
4
|
GET_SHARED_REPORT: string;
|
|
5
5
|
GET_OWN_REPORT: string;
|
|
6
|
+
GET_APP: string;
|
|
7
|
+
GET_REPORT_CONFIG: string;
|
|
8
|
+
BUSINESS_GET_TOKEN: string;
|
|
9
|
+
BUSINESS_GET_REPORTS: string;
|
|
10
|
+
BUSINESS_GET_REPORT_ACCESS_TOKEN: string;
|
|
6
11
|
};
|
package/controllers/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Client } from
|
|
2
|
-
export declare function
|
|
1
|
+
import { Client } from '../core';
|
|
2
|
+
export declare function newOHBI(clientId: string): Promise<Client>;
|
package/controllers/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class BaseClient {
|
|
2
|
+
private keycloak;
|
|
3
|
+
constructor(clientId: string);
|
|
4
|
+
initialize(): Promise<void>;
|
|
5
|
+
tokenParsed(): import("keycloak-js").KeycloakTokenParsed | undefined;
|
|
6
|
+
logout(): Promise<void>;
|
|
7
|
+
getToken(): Promise<string>;
|
|
8
|
+
private updateToken;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CClientCredential } from '../models';
|
|
2
|
+
export declare class CClient {
|
|
3
|
+
private credential;
|
|
4
|
+
private accessToken;
|
|
5
|
+
constructor(credential: CClientCredential);
|
|
6
|
+
getCredential(): CClientCredential;
|
|
7
|
+
checkCredential(): Promise<void>;
|
|
8
|
+
getReports(): Promise<import("../models").WithMessage<import("../models").ReportModel[]>>;
|
|
9
|
+
getReportEmbbed(reportId: string | number, email: string): Promise<string>;
|
|
10
|
+
private ensureAccessTokenValid;
|
|
11
|
+
private getAccessToken;
|
|
12
|
+
}
|
package/core/client.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Report } from '../models';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { BaseClient } from './base-client';
|
|
3
|
+
export declare class Client extends BaseClient {
|
|
4
|
+
getReports(page?: number, searchText?: string): Promise<Report | never[]>;
|
|
5
|
+
getReport(reportId: number, isOwner?: boolean): Promise<import("../models").ReportResponse | null>;
|
|
6
|
+
loadReport(reportId: number, tagId: string, isOwner?: boolean): Promise<HTMLIFrameElement | undefined>;
|
|
7
|
+
loadApp(appId: number, tagId: string, isOwner?: boolean): Promise<HTMLIFrameElement | undefined>;
|
|
8
|
+
getApp(appId: number, isOwner?: boolean): Promise<import("../models").AppResponse | null>;
|
|
9
|
+
getApps(page?: number, searchText?: string, isOwner?: boolean): Promise<Report | never[]>;
|
|
8
10
|
}
|
package/core/index.d.ts
CHANGED
package/environment.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare const API_DOMAIN = "https://api.onhandbi.com/v1";
|
|
2
2
|
export declare const REPORT_DOMAIN = "https://report.onhandbi.com/report";
|
|
3
|
+
export declare const ORG_REPORT_DOMAIN = "https://report.onhandbi.com/org/report";
|
|
3
4
|
export declare const SSO_DOMAIN = "https://sso.onhandbi.com";
|
|
5
|
+
export declare const APP_DOMAIN = "https://report.onhandbi.com/app";
|
|
6
|
+
export declare const API_REPORT_DOMAIN = "https://api.onhandbi.com/report";
|
|
7
|
+
export declare const LOGIN_CLIEN_ID = "security-admin-console-dev";
|
package/helpers/response.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function handleResponse(response: any):
|
|
1
|
+
export declare function handleResponse<T>(response: any): Promise<T>;
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OHBI=t():e.OHBI=t()}(this,(()=>(()=>{var e={745:function(e,t,n){var r;e=n.nmd(e),function(o){var i=(e&&e.exports,"object"==typeof n.g&&n.g);i.global!==i&&i.window;var s=function(e){this.message=e};(s.prototype=new Error).name="InvalidCharacterError";var a=function(e){throw new s(e)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,l={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,o,i=e.length%3,s="",u=-1,l=e.length-i;++u<l;)t=e.charCodeAt(u)<<16,n=e.charCodeAt(++u)<<8,r=e.charCodeAt(++u),s+=c.charAt((o=t+n+r)>>18&63)+c.charAt(o>>12&63)+c.charAt(o>>6&63)+c.charAt(63&o);return 2==i?(t=e.charCodeAt(u)<<8,n=e.charCodeAt(++u),s+=c.charAt((o=t+n)>>10)+c.charAt(o>>4&63)+c.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(u),s+=c.charAt(o>>2)+c.charAt(o<<4&63)+"=="),s},decode:function(e){var t=(e=String(e).replace(u,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,o=0,i="",s=-1;++s<t;)r=c.indexOf(e.charAt(s)),n=o%4?64*n+r:r,o++%4&&(i+=String.fromCharCode(255&n>>(-2*o&6)));return i},version:"1.0.0"};void 0===(r=function(){return l}.call(t,n,t,e))||(e.exports=r)}()},645:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(949),t)},949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_URLS=void 0;const r=n(333);t.API_URLS={VALIDATE_TOKEN:r.API_DOMAIN+"/health_check",GET_REPORTS:r.API_DOMAIN+"/reports/list",GET_SHARED_REPORT:r.API_DOMAIN+"/reports/shared",GET_OWN_REPORT:r.API_DOMAIN+"/reports"}},647:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(645),t)},640:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.newClient=void 0;const o=n(108);t.newClient=function(e){return r(this,void 0,void 0,(function*(){const t=new o.Client;return yield t.initialize(e)}))}},972:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(640),t)},643:function(e,t,n){"use strict";var r,o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;const c=n(650),u=a(n(745)),l=n(333);t.Client=class{constructor(){r.set(this,void 0)}initialize(e){return o(this,void 0,void 0,(function*(){try{return yield c.ClientService.validateToken(e),i(this,r,e,"f"),this}catch(e){return console.log(e),null}}))}getReports(e=1,t=""){return o(this,void 0,void 0,(function*(){try{if(!s(this,r,"f"))return[];const n={page:e,params:{searchText:t}};return yield c.ClientService.getReports(s(this,r,"f"),n)}catch(e){return console.log(e),[]}}))}getOne(e,t=!1){return o(this,void 0,void 0,(function*(){try{return s(this,r,"f")?yield c.ClientService.getOne(s(this,r,"f"),e,t):null}catch(e){return console.log(e),null}}))}loadReport(e,t,n=!1){try{if(!s(this,r,"f")||!e||!t)return;const o=document.getElementById(t);if(!o)return;const i=u.default.encode(u.default.encode(`${e}`)),a=document.createElement("iframe");return a.src=l.REPORT_DOMAIN+`/${i}?token=${s(this,r,"f")}&isOwn=${n}`,a.allowFullscreen=!0,o.appendChild(a),a}catch(e){console.log(e)}}},r=new WeakMap},108:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(643),t)},333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SSO_DOMAIN=t.REPORT_DOMAIN=t.API_DOMAIN=void 0,t.API_DOMAIN="https://api.onhandbi.com/v1",t.REPORT_DOMAIN="https://report.onhandbi.com/report",t.SSO_DOMAIN="https://sso.onhandbi.com"},761:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ajaxHelpers=void 0;const o=r(n(218));t.ajaxHelpers={get:(e,t,n)=>o.default.get(e,Object.assign({params:t},n)),post:(e,t,n)=>o.default.post(e,t,n),put:(e,t,n)=>o.default.put(e,t,n),delete:(e,t,n)=>o.default.delete(e,n)}},829:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(761),t),o(n(111),t),o(n(565),t)},111:(e,t)=>{"use strict";function n(e){return e?{Authorization:`Bearer ${e}`,"Access-Control-Allow-Origin":"*"}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestOptions=t.getAuthHeaders=void 0,t.getAuthHeaders=n,t.getRequestOptions=function(e,t=!0){const r={};return e&&t&&(r.headers=n(e)),r}},565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleResponse=void 0,t.handleResponse=function(e){return e.then((e=>e.data)).catch((e=>{var t;return 401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&console.log(e),Promise.reject(e)}))}},432:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=i(n(972));t.default=s},539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientService=void 0;const o=n(647),i=n(829);t.ClientService=class{static validateToken(e){return r(this,void 0,void 0,(function*(){const t=(0,i.getRequestOptions)(e);return yield i.ajaxHelpers.get(o.API_URLS.VALIDATE_TOKEN,{},t)}))}static getReports(e,t={}){return r(this,void 0,void 0,(function*(){const n=(0,i.getRequestOptions)(e),{page:r,params:s}=t;return yield(0,i.handleResponse)(i.ajaxHelpers.get(o.API_URLS.GET_REPORTS,Object.assign({page:r},s),n))}))}static getOne(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=(0,i.getRequestOptions)(e),s=n?o.API_URLS.GET_OWN_REPORT:o.API_URLS.GET_SHARED_REPORT;return yield(0,i.handleResponse)(i.ajaxHelpers.get(s+`/${t}`,{},r))}))}}},383:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfidentialClientService=void 0;const o=n(829),i=n(333);t.ConfidentialClientService=class{static getToken({realm:e,clientId:t,clientSecret:n,scope:s="openid"}){return r(this,void 0,void 0,(function*(){const r=`${i.SSO_DOMAIN}/realms/${e}/protocol/openid-connect/token`,a=new URLSearchParams;return a.append("scope",s),a.append("client_id",t),a.append("client_secret",n),a.append("grant_type","client_credentials"),(0,o.handleResponse)(o.ajaxHelpers.post(r,a,{}))}))}static validateToken(e){return r(this,void 0,void 0,(function*(){const{realm:t,clientId:n,clientSecret:r,token:s}=e,a=`${i.SSO_DOMAIN}/realms/${t}/protocol/openid-connect/token/introspect`,c=new URLSearchParams;return c.append("token",s),c.append("client_id",n),c.append("client_secret",r),(0,o.handleResponse)(o.ajaxHelpers.post(a,c,{}))}))}}},650:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(539),t),o(n(501),t),o(n(383),t)},501:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicClientService=void 0;const o=n(829),i=n(333);t.PublicClientService=class{static getToken({realm:e,username:t,password:n,clientId:s,scope:a="openid"}){return r(this,void 0,void 0,(function*(){const r=`${i.SSO_DOMAIN}/realms/${e}/protocol/openid-connect/token`,c=new URLSearchParams;return c.append("client_id",s),c.append("username",t),c.append("password",n),c.append("scope",a),c.append("grant_type","password"),(0,o.handleResponse)(o.ajaxHelpers.post(r,c,{}))}))}}},218:(e,t,n)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,f=u("undefined"),d=c("ArrayBuffer"),p=u("string"),h=u("function"),m=u("number"),y=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=c("Date"),O=c("File"),v=c("Blob"),w=c("FileList"),_=c("URLSearchParams");function E(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function S(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,A=e=>!f(e)&&e!==R,j=(P="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>P&&e instanceof P);var P;const T=c("HTMLFormElement"),x=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),C=c("RegExp"),N=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};E(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},D="abcdefghijklmnopqrstuvwxyz",U="0123456789",B={DIGIT:U,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+U},F=c("AsyncFunction");var L={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=s(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:p,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:g,isUndefined:f,isDate:b,isFile:O,isBlob:v,isRegExp:C,isFunction:h,isStream:e=>y(e)&&h(e.pipe),isURLSearchParams:_,isTypedArray:j,isFileList:w,forEach:E,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&S(n,o)||o;g(n[i])&&g(r)?n[i]=e(n[i],r):g(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&E(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(E(t,((t,o)=>{n&&h(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:N,freezeMethods:e=>{N(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:S,global:R,isContextDefined:A,ALPHABET:B,generateString:(e=16,t=B.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return E(e,((e,t)=>{const i=n(e,r+1);!f(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:F,isThenable:e=>e&&(y(e)||h(e))&&h(e.then)&&h(e.catch)};function M(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}L.inherits(M,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=M.prototype,k={};function q(e){return L.isPlainObject(e)||L.isArray(e)}function H(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function z(e,t,n){return e?e.concat(t).map((function(e,t){return e=H(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{k[e]={value:e}})),Object.defineProperties(M,k),Object.defineProperty(I,"isAxiosError",{value:!0}),M.from=(e,t,n,r,o,i)=>{const s=Object.create(I);return L.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),M.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const J=L.toFlatObject(L,{},null,(function(e){return/^is[A-Z]/.test(e)}));function $(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!L.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(L.isDate(e))return e.toISOString();if(!a&&L.isBlob(e))throw new M("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(e)||L.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(L.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(L.isArray(e)&&function(e){return L.isArray(e)&&!e.some(q)}(e)||(L.isFileList(e)||L.endsWith(n,"[]"))&&(a=L.toArray(e)))return n=H(n),a.forEach((function(e,r){!L.isUndefined(e)&&null!==e&&t.append(!0===s?z([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!q(e)||(t.append(z(o,n,i),c(e)),!1)}const l=[],f=Object.assign(J,{defaultVisitor:u,convertValue:c,isVisitable:q});if(!L.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!L.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),L.forEach(n,(function(n,i){!0===(!(L.isUndefined(n)||null===n)&&o.call(t,n,L.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function W(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&$(e,this,t)}const V=K.prototype;function G(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const r=n&&n.encode||G,o=n&&n.serialize;let i;if(i=o?o(t,n):L.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}V.append=function(e,t){this._pairs.push([e,t])},V.toString=function(e){const t=e?function(t){return e.call(this,t,W)}:W;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Q=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(ne="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(ne)<0);var ne;const re="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var oe={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:re,hasStandardBrowserEnv:te}),...Y};function ie(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&L.isArray(r)?r.length:i,a?(L.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&L.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&L.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,((e,r)=>{t(function(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const se={transitional:Z,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=L.isObject(e);if(o&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return r&&r?JSON.stringify(ie(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new oe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return oe.isNode&&L.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=L.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(L.isString(e))try{return(0,JSON.parse)(e),L.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||se.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&L.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw M.from(e,M.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],(e=>{se.headers[e]={}}));var ae=se;const ce=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ue=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function fe(e){return!1===e||null==e?e:L.isArray(e)?e.map(fe):String(e)}function de(e,t,n,r,o){return L.isFunction(r)?r.call(this,t,n):(o&&(t=n),L.isString(t)?L.isString(r)?-1!==t.indexOf(r):L.isRegExp(r)?r.test(t):void 0:void 0)}class pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=le(t);if(!o)throw new Error("header name must be a non-empty string");const i=L.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fe(e))}const i=(e,t)=>L.forEach(e,((e,n)=>o(e,n,t)));return L.isPlainObject(e)||e instanceof this.constructor?i(e,t):L.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ce[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=le(e)){const n=L.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(L.isFunction(t))return t.call(this,e,n);if(L.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=le(e)){const n=L.findKey(this,e);return!(!n||void 0===this[n]||t&&!de(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=le(e)){const o=L.findKey(n,e);!o||t&&!de(0,n[o],o,t)||(delete n[o],r=!0)}}return L.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!de(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return L.forEach(this,((r,o)=>{const i=L.findKey(n,o);if(i)return t[i]=fe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=fe(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return L.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&L.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ue]=this[ue]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=le(e);t[r]||(function(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return L.isArray(e)?e.forEach(r):r(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(pe.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),L.freezeMethods(pe);var he=pe;function me(e,t){const n=this||ae,r=t||n,o=he.from(r.headers);let i=r.data;return L.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function ye(e){return!(!e||!e.__CANCEL__)}function ge(e,t,n){M.call(this,null==e?"canceled":e,M.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(ge,M,{__CANCEL__:!0});var be=oe.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];L.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),L.isString(r)&&s.push("path="+r),L.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Oe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ve=oe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=L.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function we(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const _e={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=he.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(L.isFormData(r))if(oe.hasStandardBrowserEnv||oe.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=Oe(e.baseURL,e.url);function d(){if(!l)return;const r=he.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new M("Request aborted",M.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new M("Network Error",M.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new M(t,r.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,l)),l=null},oe.hasStandardBrowserEnv&&(c&&L.isFunction(c)&&(c=c(e)),c||!1!==c&&ve(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&be.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&L.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),L.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",we(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",we(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new ge(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);p&&-1===oe.protocols.indexOf(p)?n(new M("Unsupported protocol "+p+":",M.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};L.forEach(_e,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ee=e=>`- ${e}`,Se=e=>L.isFunction(e)||null===e||!1===e;var Re=e=>{e=L.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Se(n)&&(r=_e[(t=String(n)).toLowerCase()],void 0===r))throw new M(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new M("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ee).join("\n"):" "+Ee(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function je(e){return Ae(e),e.headers=he.from(e.headers),e.data=me.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Re(e.adapter||ae.adapter)(e).then((function(t){return Ae(e),t.data=me.call(e,e.transformResponse,t),t.headers=he.from(t.headers),t}),(function(t){return ye(t)||(Ae(e),t&&t.response&&(t.response.data=me.call(e,e.transformResponse,t.response),t.response.headers=he.from(t.response.headers))),Promise.reject(t)}))}const Pe=e=>e instanceof he?e.toJSON():e;function Te(e,t){t=t||{};const n={};function r(e,t,n){return L.isPlainObject(e)&&L.isPlainObject(t)?L.merge.call({caseless:n},e,t):L.isPlainObject(t)?L.merge({},t):L.isArray(t)?t.slice():t}function o(e,t,n){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!L.isUndefined(t))return r(void 0,t)}function s(e,t){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Pe(e),Pe(t),!0)};return L.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);L.isUndefined(s)&&i!==a||(n[r]=s)})),n}const xe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{xe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};xe.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new M(r(o," has been removed"+(t?" in "+t:"")),M.ERR_DEPRECATED);return t&&!Ce[o]&&(Ce[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Ne={assertOptions:function(e,t,n){if("object"!=typeof e)throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new M("option "+i+" must be "+n,M.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new M("Unknown option "+i,M.ERR_BAD_OPTION)}},validators:xe};const De=Ne.validators;class Ue{constructor(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Te(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ne.assertOptions(n,{silentJSONParsing:De.transitional(De.boolean),forcedJSONParsing:De.transitional(De.boolean),clarifyTimeoutError:De.transitional(De.boolean)},!1),null!=r&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Ne.assertOptions(r,{encode:De.function,serialize:De.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&L.merge(o.common,o[t.method]);o&&L.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=he.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[je.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=je.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return X(Oe((e=Te(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],(function(e){Ue.prototype[e]=function(t,n){return this.request(Te(n||{},{method:e,url:t,data:(n||{}).data}))}})),L.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Te(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ue.prototype[e]=t(),Ue.prototype[e+"Form"]=t(!0)}));var Be=Ue;class Fe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ge(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Fe((function(t){e=t})),cancel:e}}}var Le=Fe;const Me={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Me).forEach((([e,t])=>{Me[t]=e}));var Ie=Me;const ke=function e(t){const n=new Be(t),o=r(Be.prototype.request,n);return L.extend(o,Be.prototype,n,{allOwnKeys:!0}),L.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Te(t,n))},o}(ae);ke.Axios=Be,ke.CanceledError=ge,ke.CancelToken=Le,ke.isCancel=ye,ke.VERSION="1.6.2",ke.toFormData=$,ke.AxiosError=M,ke.Cancel=ke.CanceledError,ke.all=function(e){return Promise.all(e)},ke.spread=function(e){return function(t){return e.apply(null,t)}},ke.isAxiosError=function(e){return L.isObject(e)&&!0===e.isAxiosError},ke.mergeConfig=Te,ke.AxiosHeaders=he,ke.formToJSON=e=>ie(L.isHTMLForm(e)?new FormData(e):e),ke.getAdapter=Re,ke.HttpStatusCode=Ie,ke.default=ke,e.exports=ke}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(432)})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OHBI=t():e.OHBI=t()}(this,(()=>(()=>{var e={501:function(e,t,n){var r;e=n.nmd(e),function(o){var i=(e&&e.exports,"object"==typeof n.g&&n.g);i.global!==i&&i.window;var s=function(e){this.message=e};(s.prototype=new Error).name="InvalidCharacterError";var a=function(e){throw new s(e)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,l={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,o,i=e.length%3,s="",u=-1,l=e.length-i;++u<l;)t=e.charCodeAt(u)<<16,n=e.charCodeAt(++u)<<8,r=e.charCodeAt(++u),s+=c.charAt((o=t+n+r)>>18&63)+c.charAt(o>>12&63)+c.charAt(o>>6&63)+c.charAt(63&o);return 2==i?(t=e.charCodeAt(u)<<8,n=e.charCodeAt(++u),s+=c.charAt((o=t+n)>>10)+c.charAt(o>>4&63)+c.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(u),s+=c.charAt(o>>2)+c.charAt(o<<4&63)+"=="),s},decode:function(e){var t=(e=String(e).replace(u,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,o=0,i="",s=-1;++s<t;)r=c.indexOf(e.charAt(s)),n=o%4?64*n+r:r,o++%4&&(i+=String.fromCharCode(255&n>>(-2*o&6)));return i},version:"1.0.0"};void 0===(r=function(){return l}.call(t,n,t,e))||(e.exports=r)}()},23:(e,t,n)=>{var r;!function(){"use strict";var t="input is invalid type",o="object"==typeof window,i=o?window:{};i.JS_SHA256_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self,a=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?i=n.g:s&&(i=self);var c=!i.JS_SHA256_NO_COMMON_JS&&e.exports,u=n.amdO,l=!i.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),f=[-2147483648,8388608,32768,128],h=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=["hex","array","digest","arrayBuffer"],g=[];!i.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(n){return new O(t,!0).update(n)[e]()}},v=function(e){var t=y("hex",e);a&&(t=w(t,e)),t.create=function(){return new O(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<m.length;++n){var r=m[n];t[r]=y(r,e)}return t},w=function(e,r){var o,s=n(127),a=n(371).Buffer,c=r?"sha224":"sha256";return o=a.from&&!i.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(n){if("string"==typeof n)return s.createHash(c).update(n,"utf8").digest("hex");if(null==n)throw new Error(t);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===a?s.createHash(c).update(o(n)).digest("hex"):e(n)}},b=function(e,t){return function(n,r){return new k(n,t,!0).update(r)[e]()}},_=function(e){var t=b("hex",e);t.create=function(t){return new k(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<m.length;++n){var r=m[n];t[r]=b(r,e)}return t};function O(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function k(e,n,r){var o,i=typeof e;if("string"===i){var s,a=[],c=e.length,u=0;for(o=0;o<c;++o)(s=e.charCodeAt(o))<128?a[u++]=s:s<2048?(a[u++]=192|s>>>6,a[u++]=128|63&s):s<55296||s>=57344?(a[u++]=224|s>>>12,a[u++]=128|s>>>6&63,a[u++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),a[u++]=240|s>>>18,a[u++]=128|s>>>12&63,a[u++]=128|s>>>6&63,a[u++]=128|63&s);e=a}else{if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new O(n,!0).update(e).array());var d=[],f=[];for(o=0;o<64;++o){var h=e[o]||0;d[o]=92^h,f[o]=54^h}O.call(this,n,r),this.update(f),this.oKeyPad=d,this.inner=!0,this.sharedMemory=r}O.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(t);if(null===e)throw new Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(t);n=!0}for(var o,i,s=0,a=e.length,c=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),n)for(i=this.start;s<a&&i<64;++s)c[i>>>2]|=e[s]<<h[3&i++];else for(i=this.start;s<a&&i<64;++s)(o=e.charCodeAt(s))<128?c[i>>>2]|=o<<h[3&i++]:o<2048?(c[i>>>2]|=(192|o>>>6)<<h[3&i++],c[i>>>2]|=(128|63&o)<<h[3&i++]):o<55296||o>=57344?(c[i>>>2]|=(224|o>>>12)<<h[3&i++],c[i>>>2]|=(128|o>>>6&63)<<h[3&i++],c[i>>>2]|=(128|63&o)<<h[3&i++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),c[i>>>2]|=(240|o>>>18)<<h[3&i++],c[i>>>2]|=(128|o>>>12&63)<<h[3&i++],c[i>>>2]|=(128|o>>>6&63)<<h[3&i++],c[i>>>2]|=(128|63&o)<<h[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=c[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},O.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},O.prototype.hash=function(){var e,t,n,r,o,i,s,a,c,u=this.h0,l=this.h1,d=this.h2,f=this.h3,h=this.h4,m=this.h5,g=this.h6,y=this.h7,v=this.blocks;for(e=16;e<64;++e)t=((o=v[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,n=((o=v[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,v[e]=v[e-16]+t+v[e-7]+n<<0;for(c=l&d,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,y=(o=v[0]-1413257819)-150054599<<0,f=o+24177077<<0):(i=704751109,y=(o=v[0]-210244248)-1521486534<<0,f=o+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(i=u&l)^u&d^c,y=f+(o=y+(n=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&m^~h&g)+p[e]+v[e])<<0,f=o+(t+r)<<0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(s=f&u)^f&l^i,g=d+(o=g+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&h^~y&m)+p[e+1]+v[e+1])<<0,t=((d=o+(t+r)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(a=d&f)^d&u^s,m=l+(o=m+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&h)+p[e+2]+v[e+2])<<0,t=((l=o+(t+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(c=l&d)^l&f^a,h=u+(o=h+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&g^~m&y)+p[e+3]+v[e+3])<<0,u=o+(t+r)<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+u<<0,this.h1=this.h1+l<<0,this.h2=this.h2+d<<0,this.h3=this.h3+f<<0,this.h4=this.h4+h<<0,this.h5=this.h5+m<<0,this.h6=this.h6+g<<0,this.h7=this.h7+y<<0},O.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=d[e>>>28&15]+d[e>>>24&15]+d[e>>>20&15]+d[e>>>16&15]+d[e>>>12&15]+d[e>>>8&15]+d[e>>>4&15]+d[15&e]+d[t>>>28&15]+d[t>>>24&15]+d[t>>>20&15]+d[t>>>16&15]+d[t>>>12&15]+d[t>>>8&15]+d[t>>>4&15]+d[15&t]+d[n>>>28&15]+d[n>>>24&15]+d[n>>>20&15]+d[n>>>16&15]+d[n>>>12&15]+d[n>>>8&15]+d[n>>>4&15]+d[15&n]+d[r>>>28&15]+d[r>>>24&15]+d[r>>>20&15]+d[r>>>16&15]+d[r>>>12&15]+d[r>>>8&15]+d[r>>>4&15]+d[15&r]+d[o>>>28&15]+d[o>>>24&15]+d[o>>>20&15]+d[o>>>16&15]+d[o>>>12&15]+d[o>>>8&15]+d[o>>>4&15]+d[15&o]+d[i>>>28&15]+d[i>>>24&15]+d[i>>>20&15]+d[i>>>16&15]+d[i>>>12&15]+d[i>>>8&15]+d[i>>>4&15]+d[15&i]+d[s>>>28&15]+d[s>>>24&15]+d[s>>>20&15]+d[s>>>16&15]+d[s>>>12&15]+d[s>>>8&15]+d[s>>>4&15]+d[15&s];return this.is224||(c+=d[a>>>28&15]+d[a>>>24&15]+d[a>>>20&15]+d[a>>>16&15]+d[a>>>12&15]+d[a>>>8&15]+d[a>>>4&15]+d[15&a]),c},O.prototype.toString=O.prototype.hex,O.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||c.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),c},O.prototype.array=O.prototype.digest,O.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},k.prototype=new O,k.prototype.finalize=function(){if(O.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();O.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),O.prototype.finalize.call(this)}};var S=v();S.sha256=S,S.sha224=v(!0),S.sha256.hmac=_(),S.sha224.hmac=_(!0),c?e.exports=S:(i.sha256=S.sha256,i.sha224=S.sha224,u&&(void 0===(r=function(){return S}.call(S,n,S,e))||(e.exports=r)))}()},245:(e,t,n)=>{"use strict";function r(e){this.message=e}n.r(t),n.d(t,{InvalidTokenError:()=>s,default:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,i=0,s=0,a="";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};function i(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return o(t)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name="InvalidTokenError";const a=function(e,t){if("string"!=typeof e)throw new s("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(".")[n]))}catch(e){throw new s("Invalid token specified: "+e.message)}}},645:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(949),t)},949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_URLS=void 0;const r=n(333);t.API_URLS={VALIDATE_TOKEN:r.API_DOMAIN+"/health_check",GET_REPORTS:r.API_DOMAIN+"/reports/list",GET_SHARED_REPORT:r.API_DOMAIN+"/reports/shared",GET_OWN_REPORT:r.API_DOMAIN+"/reports",GET_APP:r.API_DOMAIN+"/apps",GET_REPORT_CONFIG:r.API_REPORT_DOMAIN+"/getembedinfo",BUSINESS_GET_TOKEN:r.API_DOMAIN+"/organizations/access-token",BUSINESS_GET_REPORTS:r.API_DOMAIN+"/organizations/reports",BUSINESS_GET_REPORT_ACCESS_TOKEN:r.API_DOMAIN+"/organizations/report-token"}},647:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(645),t)},716:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.newCClient=void 0;const o=n(108);t.newCClient=function(e){return r(this,void 0,void 0,(function*(){const t=new o.CClient(e);return yield t.checkCredential(),t}))}},640:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.newOHBI=void 0;const o=n(108);t.newOHBI=function(e){return r(this,void 0,void 0,(function*(){const t=new o.Client(e);return yield t.initialize(),t}))}},972:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(640),t),o(n(716),t)},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseClient=void 0;const i=o(n(287)),s=n(333);t.BaseClient=class{constructor(e){this.keycloak=new i.default({realm:e,url:s.SSO_DOMAIN,clientId:s.LOGIN_CLIEN_ID}),this.logout=this.logout.bind(this),this.initialize=this.initialize.bind(this)}initialize(){return r(this,void 0,void 0,(function*(){try{yield this.keycloak.init({onLoad:"login-required"})}catch(e){console.error(e)}}))}tokenParsed(){return this.keycloak.tokenParsed}logout(){return this.keycloak.logout()}getToken(){return r(this,void 0,void 0,(function*(){const e=this.tokenParsed();return(null==e?void 0:e.exp)&&e.exp-10<(new Date).getTime()/1e3&&(yield this.updateToken()),this.keycloak.token}))}updateToken(){return r(this,void 0,void 0,(function*(){try{yield this.keycloak.updateToken()}catch(e){this.keycloak.clearToken()}}))}}},543:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CClient=void 0;const i=n(333),s=n(650),a=o(n(245)),c=n(501);t.CClient=class{constructor(e){this.credential=e,this.accessToken=""}getCredential(){return this.credential}checkCredential(){return r(this,void 0,void 0,(function*(){yield this.ensureAccessTokenValid()}))}getReports(){return r(this,void 0,void 0,(function*(){try{return yield this.ensureAccessTokenValid(),yield s.CClientService.getReports(this.accessToken)}catch(e){return yield this.getAccessToken(),s.CClientService.getReports(this.accessToken)}}))}getReportEmbbed(e,t){return r(this,void 0,void 0,(function*(){try{yield this.ensureAccessTokenValid();const n=yield s.CClientService.getReportAccessToken(this.accessToken,t),r=(0,c.encode)((0,c.encode)(e.toString()));return`${i.ORG_REPORT_DOMAIN}/${r}?token=${n.data.accessToken}`}catch(n){return yield this.getAccessToken(),this.getReportEmbbed(e,t)}}))}ensureAccessTokenValid(){return r(this,void 0,void 0,(function*(){try{const e=(0,a.default)(this.accessToken);(new Date).getTime()/1e3>e.exp-60&&(yield this.getAccessToken())}catch(e){yield this.getAccessToken()}}))}getAccessToken(){return r(this,void 0,void 0,(function*(){this.accessToken=yield s.CClientService.getAccessToken(this.credential)}))}}},643:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;const i=n(650),s=o(n(501)),a=n(333),c=n(632);class u extends c.BaseClient{getReports(e=1,t=""){return r(this,void 0,void 0,(function*(){try{const n={page:e,params:{searchText:t}},r=yield this.getToken();return yield i.ClientService.getReports(r,n)}catch(e){return[]}}))}getReport(e,t=!1){return r(this,void 0,void 0,(function*(){try{const n=yield this.getToken();return yield i.ClientService.getReport(n,e,t)}catch(e){return null}}))}loadReport(e,t,n=!1){return r(this,void 0,void 0,(function*(){try{if(!e||!t)return;const r=yield this.getToken(),o=document.getElementById(t);if(!o)return;const i=s.default.encode(s.default.encode(`${e}`)),c=document.createElement("iframe");return c.src=a.REPORT_DOMAIN+`/${i}?token=${r}&isOwn=${n}`,c.allowFullscreen=!0,o.appendChild(c),c}catch(e){console.log(e)}}))}loadApp(e,t,n=!1){return r(this,void 0,void 0,(function*(){try{if(!e||!t)return;const r=document.getElementById(t);if(!r)return;const o=yield this.getToken(),i=s.default.encode(s.default.encode(`${e}`)),c=document.createElement("iframe");return c.src=a.APP_DOMAIN+`/${i}?token=${o}&isOwn=${n}`,c.allowFullscreen=!0,r.appendChild(c),c}catch(e){console.log(e)}}))}getApp(e,t=!1){return r(this,void 0,void 0,(function*(){try{const n=yield this.getToken();return yield i.ClientService.getApp(n,e,t)}catch(e){return console.log(e),null}}))}getApps(e=1,t="",n=!1){return r(this,void 0,void 0,(function*(){try{const r=yield this.getToken(),o={page:e,params:{searchText:t}},s=n?i.ClientService.getAppsOwner:i.ClientService.getAppsSubscribes;return yield s(r,o)}catch(e){return console.log(e),[]}}))}}t.Client=u},108:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(643),t),o(n(543),t)},333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOGIN_CLIEN_ID=t.API_REPORT_DOMAIN=t.APP_DOMAIN=t.SSO_DOMAIN=t.ORG_REPORT_DOMAIN=t.REPORT_DOMAIN=t.API_DOMAIN=void 0,t.API_DOMAIN="https://api.onhandbi.com/v1",t.REPORT_DOMAIN="https://report.onhandbi.com/report",t.ORG_REPORT_DOMAIN="https://report.onhandbi.com/org/report",t.SSO_DOMAIN="https://sso.onhandbi.com",t.APP_DOMAIN="https://report.onhandbi.com/app",t.API_REPORT_DOMAIN="https://api.onhandbi.com/report",t.LOGIN_CLIEN_ID="security-admin-console-dev"},761:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ajaxHelpers=void 0;const o=r(n(218));t.ajaxHelpers={get:(e,t,n)=>o.default.get(e,Object.assign({params:t},n)),post:(e,t,n)=>o.default.post(e,t,n),put:(e,t,n)=>o.default.put(e,t,n),delete:(e,t,n)=>o.default.delete(e,n)}},829:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(761),t),o(n(111),t),o(n(565),t)},111:(e,t)=>{"use strict";function n(e){return e?{Authorization:`Bearer ${e}`,"Access-Control-Allow-Origin":"*"}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestOptions=t.getAuthHeaders=void 0,t.getAuthHeaders=n,t.getRequestOptions=function(e,t=!0){const r={};return e&&t&&(r.headers=n(e)),r}},565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleResponse=void 0,t.handleResponse=function(e){return e.then((e=>e.data)).catch((e=>{var t;return 401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&console.log(e),Promise.reject(e)}))}},432:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=i(n(972));t.default=s},499:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CClientService=void 0;const o=n(647),i=n(829);t.CClientService=class{static getAccessToken(e){return r(this,void 0,void 0,(function*(){const t=new URLSearchParams;return t.append("client_id",e.clientId),t.append("client_token",e.clientToken),(yield(0,i.handleResponse)(i.ajaxHelpers.post(o.API_URLS.BUSINESS_GET_TOKEN,t,{}))).data.accessToken}))}static getReports(e){const t=(0,i.getRequestOptions)(e);return(0,i.handleResponse)(i.ajaxHelpers.get(o.API_URLS.BUSINESS_GET_REPORTS,{},t))}static getReportAccessToken(e,t){const n=(0,i.getRequestOptions)(e);return(0,i.handleResponse)(i.ajaxHelpers.post(o.API_URLS.BUSINESS_GET_REPORT_ACCESS_TOKEN,{email:t},n))}}},539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientService=void 0;const o=n(647),i=n(829);t.ClientService=class{static validateToken(e){return r(this,void 0,void 0,(function*(){const t=(0,i.getRequestOptions)(e);return yield i.ajaxHelpers.get(o.API_URLS.VALIDATE_TOKEN,{},t)}))}static getReports(e,t={}){return r(this,void 0,void 0,(function*(){const n=(0,i.getRequestOptions)(e),{page:r,params:s}=t;return yield(0,i.handleResponse)(i.ajaxHelpers.get(o.API_URLS.GET_REPORTS,Object.assign({page:r},s),n))}))}static getAppsOwner(e,t={}){return r(this,void 0,void 0,(function*(){const n=(0,i.getRequestOptions)(e),{page:r,params:s}=t;return yield(0,i.handleResponse)(i.ajaxHelpers.get(o.API_URLS.GET_APP,Object.assign({page:r},s),n))}))}static getAppsSubscribes(e,t={}){return r(this,void 0,void 0,(function*(){const n=(0,i.getRequestOptions)(e),{page:r,params:s}=t;return yield(0,i.handleResponse)(i.ajaxHelpers.get(o.API_URLS.GET_APP+"/subscribes",Object.assign({page:r},s),n))}))}static getReport(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=(0,i.getRequestOptions)(e),s=n?o.API_URLS.GET_OWN_REPORT:o.API_URLS.GET_SHARED_REPORT;return yield(0,i.handleResponse)(i.ajaxHelpers.get(s+`/${t}`,{},r))}))}static getApp(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=(0,i.getRequestOptions)(e),s=n?o.API_URLS.GET_APP+`/${t}`:o.API_URLS.GET_APP+`/${t}/view`;return yield(0,i.handleResponse)(i.ajaxHelpers.get(s,{},r))}))}}},650:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(539),t),o(n(499),t)},371:()=>{},127:()=>{},218:(e,t,n)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,d=u("undefined"),f=c("ArrayBuffer"),h=u("string"),p=u("function"),m=u("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},v=c("Date"),w=c("File"),b=c("Blob"),_=c("FileList"),O=c("URLSearchParams");function k(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function S(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,E=e=>!d(e)&&e!==A,R=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>T&&e instanceof T);var T;const P=c("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),I=c("RegExp"),U=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},x="abcdefghijklmnopqrstuvwxyz",j="0123456789",N={DIGIT:j,ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+j},L=c("AsyncFunction");var M={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=s(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:d,isDate:v,isFile:w,isBlob:b,isRegExp:I,isFunction:p,isStream:e=>g(e)&&p(e.pipe),isURLSearchParams:O,isTypedArray:R,isFileList:_,forEach:k,merge:function e(){const{caseless:t}=E(this)&&this||{},n={},r=(r,o)=>{const i=t&&S(n,o)||o;y(n[i])&&y(r)?n[i]=e(n[i],r):y(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(k(t,((t,o)=>{n&&p(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:P,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:U,freezeMethods:e=>{U(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:S,global:A,isContextDefined:E,ALPHABET:N,generateString:(e=16,t=N.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return k(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:L,isThenable:e=>e&&(g(e)||p(e))&&p(e.then)&&p(e.catch)};function D(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}M.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const B=D.prototype,F={};function H(e){return M.isPlainObject(e)||M.isArray(e)}function q(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function z(e,t,n){return e?e.concat(t).map((function(e,t){return e=q(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{F[e]={value:e}})),Object.defineProperties(D,F),Object.defineProperty(B,"isAxiosError",{value:!0}),D.from=(e,t,n,r,o,i)=>{const s=Object.create(B);return M.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),D.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const V=M.toFlatObject(M,{},null,(function(e){return/^is[A-Z]/.test(e)}));function J(e,t,n){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!M.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(!a&&M.isBlob(e))throw new D("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(M.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function(e){return M.isArray(e)&&!e.some(H)}(e)||(M.isFileList(e)||M.endsWith(n,"[]"))&&(a=M.toArray(e)))return n=q(n),a.forEach((function(e,r){!M.isUndefined(e)&&null!==e&&t.append(!0===s?z([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!H(e)||(t.append(z(o,n,i),c(e)),!1)}const l=[],d=Object.assign(V,{defaultVisitor:u,convertValue:c,isVisitable:H});if(!M.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!M.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),M.forEach(n,(function(n,i){!0===(!(M.isUndefined(n)||null===n)&&o.call(t,n,M.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function K(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function G(e,t){this._pairs=[],e&&J(e,this,t)}const $=G.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const r=n&&n.encode||W,o=n&&n.serialize;let i;if(i=o?o(t,n):M.isURLSearchParams(t)?t.toString():new G(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}$.append=function(e,t){this._pairs.push([e,t])},$.toString=function(e){const t=e?function(t){return e.call(this,t,K)}:K;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Y=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:G,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(ne="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(ne)<0);var ne;const re="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var oe={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:re,hasStandardBrowserEnv:te}),...Z};function ie(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&M.isArray(r)?r.length:i,a?(M.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&M.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&M.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(M.isFormData(e)&&M.isFunction(e.entries)){const n={};return M.forEachEntry(e,((e,r)=>{t(function(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const se={transitional:Q,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=M.isObject(e);if(o&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return r&&r?JSON.stringify(ie(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return J(e,new oe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return oe.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=M.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return J(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(M.isString(e))try{return(0,JSON.parse)(e),M.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||se.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&M.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw D.from(e,D.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],(e=>{se.headers[e]={}}));var ae=se;const ce=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ue=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function de(e){return!1===e||null==e?e:M.isArray(e)?e.map(de):String(e)}function fe(e,t,n,r,o){return M.isFunction(r)?r.call(this,t,n):(o&&(t=n),M.isString(t)?M.isString(r)?-1!==t.indexOf(r):M.isRegExp(r)?r.test(t):void 0:void 0)}class he{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=le(t);if(!o)throw new Error("header name must be a non-empty string");const i=M.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=de(e))}const i=(e,t)=>M.forEach(e,((e,n)=>o(e,n,t)));return M.isPlainObject(e)||e instanceof this.constructor?i(e,t):M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ce[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=le(e)){const n=M.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(M.isFunction(t))return t.call(this,e,n);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=le(e)){const n=M.findKey(this,e);return!(!n||void 0===this[n]||t&&!fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=le(e)){const o=M.findKey(n,e);!o||t&&!fe(0,n[o],o,t)||(delete n[o],r=!0)}}return M.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!fe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return M.forEach(this,((r,o)=>{const i=M.findKey(n,o);if(i)return t[i]=de(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=de(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return M.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&M.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ue]=this[ue]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=le(e);t[r]||(function(e,t){const n=M.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return M.isArray(e)?e.forEach(r):r(e),this}}he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(he.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),M.freezeMethods(he);var pe=he;function me(e,t){const n=this||ae,r=t||n,o=pe.from(r.headers);let i=r.data;return M.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function ge(e){return!(!e||!e.__CANCEL__)}function ye(e,t,n){D.call(this,null==e?"canceled":e,D.ERR_CANCELED,t,n),this.name="CanceledError"}M.inherits(ye,D,{__CANCEL__:!0});var ve=oe.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];M.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),M.isString(r)&&s.push("path="+r),M.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function we(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var be=oe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=M.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function _e(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const Oe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=pe.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(M.isFormData(r))if(oe.hasStandardBrowserEnv||oe.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=we(e.baseURL,e.url);function f(){if(!l)return;const r=pe.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(d,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(f)},l.onabort=function(){l&&(n(new D("Request aborted",D.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new D("Network Error",D.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Q;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new D(t,r.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,l)),l=null},oe.hasStandardBrowserEnv&&(c&&M.isFunction(c)&&(c=c(e)),c||!1!==c&&be(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ve.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&M.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),M.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_e(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_e(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new ye(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===oe.protocols.indexOf(h)?n(new D("Unsupported protocol "+h+":",D.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};M.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ke=e=>`- ${e}`,Se=e=>M.isFunction(e)||null===e||!1===e;var Ae=e=>{e=M.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Se(n)&&(r=Oe[(t=String(n)).toLowerCase()],void 0===r))throw new D(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new D("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(ke).join("\n"):" "+ke(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ee(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ye(null,e)}function Re(e){return Ee(e),e.headers=pe.from(e.headers),e.data=me.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ae(e.adapter||ae.adapter)(e).then((function(t){return Ee(e),t.data=me.call(e,e.transformResponse,t),t.headers=pe.from(t.headers),t}),(function(t){return ge(t)||(Ee(e),t&&t.response&&(t.response.data=me.call(e,e.transformResponse,t.response),t.response.headers=pe.from(t.response.headers))),Promise.reject(t)}))}const Te=e=>e instanceof pe?e.toJSON():e;function Pe(e,t){t=t||{};const n={};function r(e,t,n){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:n},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function o(e,t,n){return M.isUndefined(t)?M.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!M.isUndefined(t))return r(void 0,t)}function s(e,t){return M.isUndefined(t)?M.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Te(e),Te(t),!0)};return M.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);M.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Ce={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ce[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ie={};Ce.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new D(r(o," has been removed"+(t?" in "+t:"")),D.ERR_DEPRECATED);return t&&!Ie[o]&&(Ie[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Ue={assertOptions:function(e,t,n){if("object"!=typeof e)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new D("option "+i+" must be "+n,D.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}},validators:Ce};const xe=Ue.validators;class je{constructor(e){this.defaults=e,this.interceptors={request:new Y,response:new Y}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Pe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ue.assertOptions(n,{silentJSONParsing:xe.transitional(xe.boolean),forcedJSONParsing:xe.transitional(xe.boolean),clarifyTimeoutError:xe.transitional(xe.boolean)},!1),null!=r&&(M.isFunction(r)?t.paramsSerializer={serialize:r}:Ue.assertOptions(r,{encode:xe.function,serialize:xe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[t.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=pe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[Re.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let f=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=Re.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return X(we((e=Pe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}M.forEach(["delete","get","head","options"],(function(e){je.prototype[e]=function(t,n){return this.request(Pe(n||{},{method:e,url:t,data:(n||{}).data}))}})),M.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Pe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}je.prototype[e]=t(),je.prototype[e+"Form"]=t(!0)}));var Ne=je;class Le{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ye(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Le((function(t){e=t})),cancel:e}}}var Me=Le;const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach((([e,t])=>{De[t]=e}));var Be=De;const Fe=function e(t){const n=new Ne(t),o=r(Ne.prototype.request,n);return M.extend(o,Ne.prototype,n,{allOwnKeys:!0}),M.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Pe(t,n))},o}(ae);Fe.Axios=Ne,Fe.CanceledError=ye,Fe.CancelToken=Me,Fe.isCancel=ge,Fe.VERSION="1.6.2",Fe.toFormData=J,Fe.AxiosError=D,Fe.Cancel=Fe.CanceledError,Fe.all=function(e){return Promise.all(e)},Fe.spread=function(e){return function(t){return e.apply(null,t)}},Fe.isAxiosError=function(e){return M.isObject(e)&&!0===e.isAxiosError},Fe.mergeConfig=Pe,Fe.AxiosHeaders=pe,Fe.formToJSON=e=>ie(M.isHTMLForm(e)?new FormData(e):e),Fe.getAdapter=Ae,Fe.HttpStatusCode=Be,Fe.default=Fe,e.exports=Fe},287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(23);class o extends Error{}function i(e,t){if("string"!=typeof e)throw new o("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new o(`Invalid token specified: missing part #${n+1}`);let i;try{i=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return atob(t)}}(r)}catch(e){throw new o(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new o(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(o.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function s(e){if(!(this instanceof s))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,o=this,a=[],c={enable:!0,callbackList:[],interval:5},u=document.getElementsByTagName("script"),l=0;l<u.length;l++)-1===u[l].src.indexOf("keycloak.js")&&-1===u[l].src.indexOf("keycloak.min.js")||-1===u[l].src.indexOf("version=")||(o.iframeVersion=u[l].src.substring(u[l].src.indexOf("version=")+8).split("&")[0]);var d=!0,f=C(console.info),h=C(console.warn);function p(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=new Array(e);for(var r=0;r<t.length;r++)t[r]=Math.floor(256*Math.random());return t}(e),r=new Array(e),o=0;o<e;o++)r[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,r)}function m(){return void 0!==o.authServerUrl?"/"==o.authServerUrl.charAt(o.authServerUrl.length-1)?o.authServerUrl+"realms/"+encodeURIComponent(o.realm):o.authServerUrl+"/realms/"+encodeURIComponent(o.realm):void 0}function g(e,t){var n=e.code,r=e.error,i=e.prompt,s=(new Date).getTime();if(e.kc_action_status&&o.onActionUpdate&&o.onActionUpdate(e.kc_action_status),r)if("none"!=i){var a={error:r,error_description:e.error_description};o.onAuthError&&o.onAuthError(a),t&&t.setError(a)}else t&&t.setSuccess();else if("standard"!=o.flow&&(e.access_token||e.id_token)&&h(e.access_token,null,e.id_token,!0),"implicit"!=o.flow&&n){var c="code="+n+"&grant_type=authorization_code",u=o.endpoints.token(),l=new XMLHttpRequest;l.open("POST",u,!0),l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),c+="&client_id="+encodeURIComponent(o.clientId),c+="&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(c+="&code_verifier="+e.pkceCodeVerifier),l.withCredentials=!0,l.onreadystatechange=function(){if(4==l.readyState)if(200==l.status){var e=JSON.parse(l.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===o.flow),S()}else o.onAuthError&&o.onAuthError(),t&&t.setError()},l.send(c)}function h(n,r,i,a){v(n,r,i,s=(s+(new Date).getTime())/2),d&&o.idTokenParsed&&o.idTokenParsed.nonce!=e.storedNonce?(f("[KEYCLOAK] Invalid nonce, clearing token"),o.clearToken(),t&&t.setError()):a&&(o.onAuthSuccess&&o.onAuthSuccess(),t&&t.setSuccess())}}function y(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function v(e,t,n,r){if(o.tokenTimeoutHandle&&(clearTimeout(o.tokenTimeoutHandle),o.tokenTimeoutHandle=null),t?(o.refreshToken=t,o.refreshTokenParsed=i(t)):(delete o.refreshToken,delete o.refreshTokenParsed),n?(o.idToken=n,o.idTokenParsed=i(n)):(delete o.idToken,delete o.idTokenParsed),e){if(o.token=e,o.tokenParsed=i(e),o.sessionId=o.tokenParsed.sid,o.authenticated=!0,o.subject=o.tokenParsed.sub,o.realmAccess=o.tokenParsed.realm_access,o.resourceAccess=o.tokenParsed.resource_access,r&&(o.timeSkew=Math.floor(r/1e3)-o.tokenParsed.iat),null!=o.timeSkew&&(f("[KEYCLOAK] Estimated time difference between browser and server is "+o.timeSkew+" seconds"),o.onTokenExpired)){var s=1e3*(o.tokenParsed.exp-(new Date).getTime()/1e3+o.timeSkew);f("[KEYCLOAK] Token expires in "+Math.round(s/1e3)+" s"),s<=0?o.onTokenExpired():o.tokenTimeoutHandle=setTimeout(o.onTokenExpired,s)}}else delete o.token,delete o.tokenParsed,delete o.subject,delete o.realmAccess,delete o.resourceAccess,o.authenticated=!1}function w(){var e="0123456789abcdef",t=p(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function b(e){var t=function(e){var t;switch(o.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var n,r,i=e.indexOf("?"),s=e.indexOf("#");if("query"===o.responseMode&&-1!==i?(n=e.substring(0,i),""!==(r=_(e.substring(i+1,-1!==s?s:e.length),t)).paramsString&&(n+="?"+r.paramsString),-1!==s&&(n+=e.substring(s))):"fragment"===o.responseMode&&-1!==s&&(n=e.substring(0,s),""!==(r=_(e.substring(s+1),t)).paramsString&&(n+="#"+r.paramsString)),r&&r.oauthParams)if("standard"===o.flow||"hybrid"===o.flow){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}else if("implicit"===o.flow&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}(e);if(t){var r=n.get(t.state);return r&&(t.valid=!0,t.redirectUri=r.redirectUri,t.storedNonce=r.nonce,t.prompt=r.prompt,t.pkceCodeVerifier=r.pkceCodeVerifier),t}}function _(e,t){for(var n=e.split("&"),r={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var i=n[o].indexOf("="),s=n[o].slice(0,i);-1!==t.indexOf(s)?r.oauthParams[s]=n[o].slice(i+1):(""!==r.paramsString&&(r.paramsString+="&"),r.paramsString+=n[o])}return r}function O(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}function k(){var e=O();if(!c.enable)return e.setSuccess(),e.promise;if(c.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");c.iframe=t,t.onload=function(){var t=o.endpoints.authorize();"/"===t.charAt(0)?c.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):c.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=o.endpoints.checkSessionIframe();return t.setAttribute("src",n),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",(function(e){if(e.origin===c.iframeOrigin&&c.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&o.clearToken();for(var t=c.callbackList.splice(0,c.callbackList.length),n=t.length-1;n>=0;--n){var r=t[n];"error"==e.data?r.setError():r.setSuccess("unchanged"==e.data)}}}),!1),e.promise}function S(){c.enable&&o.token&&setTimeout((function(){A().then((function(e){e&&S()}))}),1e3*c.interval)}function A(){var e=O();if(c.iframe&&c.iframeOrigin){var t=o.clientId+" "+(o.sessionId?o.sessionId:"");c.callbackList.push(e);var n=c.iframeOrigin;1==c.callbackList.length&&c.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function E(){var e=O();if(c.enable||o.silentCheckSsoRedirectUri){var t=document.createElement("iframe");t.setAttribute("src",o.endpoints.thirdPartyCookiesIframe()),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var n=function(r){t.contentWindow===r.source&&("supported"!==r.data&&"unsupported"!==r.data||("unsupported"===r.data&&(h("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),c.enable=!1,o.silentCheckSsoFallback&&(o.silentCheckSsoRedirectUri=!1)),document.body.removeChild(t),window.removeEventListener("message",n),e.setSuccess()))};window.addEventListener("message",n,!1)}else e.setSuccess();return function(e,t,n){var r=null,o=new Promise((function(e,n){r=setTimeout((function(){n({error:"Timeout when waiting for 3rd party check iframe message."})}),t)}));return Promise.race([e,o]).finally((function(){clearTimeout(r)}))}(e.promise,o.messageReceiveTimeout)}function R(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(o.createLoginUrl(e)),O().promise},logout:async function(e){if("GET"===(e?.logoutMethod??o.logoutMethod))return void window.location.replace(o.createLogoutUrl(e));const n=o.createLogoutUrl(e),r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:o.idToken,client_id:o.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(r.redirected)window.location.href=r.url;else{if(!r.ok)throw new Error("Logout failed, request returned an error code.");window.location.reload()}},register:function(e){return window.location.assign(o.createRegisterUrl(e)),O().promise},accountManagement:function(){var e=o.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";return window.location.href=e,O().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:o.redirectUri?o.redirectUri:location.href}};if("cordova"==e){c.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},r=function(e){var t=function(e){return e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((function(t,n){return t[n]=e.cordovaOptions[n],t}),{}):{}}(e);return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),function(e){return Object.keys(e).reduce((function(t,n){return t.push(n+"="+e[n]),t}),[]).join(",")}(t)},i=function(){return o.redirectUri||"http://localhost"};return{login:function(e){var t=O(),s=r(e),a=o.createLoginUrl(e),c=n(a,"_blank",s),u=!1,l=!1,d=function(){l=!0,c.close()};return c.addEventListener("loadstart",(function(e){0==e.url.indexOf(i())&&(g(b(e.url),t),d(),u=!0)})),c.addEventListener("loaderror",(function(e){u||(0==e.url.indexOf(i())?(g(b(e.url),t),d(),u=!0):(t.setError(),d()))})),c.addEventListener("exit",(function(e){l||t.setError({reason:"closed_by_user"})})),t.promise},logout:function(e){var t,r=O(),s=o.createLogoutUrl(e),a=n(s,"_blank","location=no,hidden=yes,clearcache=yes");return a.addEventListener("loadstart",(function(e){0==e.url.indexOf(i())&&a.close()})),a.addEventListener("loaderror",(function(e){0==e.url.indexOf(i())||(t=!0),a.close()})),a.addEventListener("exit",(function(e){t?r.setError():(o.clearToken(),r.setSuccess())})),r.promise},register:function(e){var t=O(),s=o.createRegisterUrl(),a=r(e),c=n(s,"_blank",a);return c.addEventListener("loadstart",(function(e){0==e.url.indexOf(i())&&(c.close(),g(b(e.url),t))})),t.promise},accountManagement:function(){var e=o.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";var t=n(e,"_blank","location=no");t.addEventListener("loadstart",(function(e){0==e.url.indexOf(i())&&t.close()}))},redirectUri:function(e){return i()}}}if("cordova-native"==e)return c.enable=!1,{login:function(e){var t=O(),n=o.createLoginUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),g(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=O(),n=o.createLogoutUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),o.clearToken(),t.setSuccess()})),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=O(),n=o.createRegisterUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),g(b(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=o.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";window.cordova.plugins.browsertab.openUrl(e)},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:o.redirectUri?o.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}o.init=function(r){if(o.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");if(o.didInitialize=!0,o.authenticated=!1,n=function(){try{return new T}catch(e){}return new P}(),t=r&&["default","cordova","cordova-native"].indexOf(r.adapter)>-1?R(r.adapter):r&&"object"==typeof r.adapter?r.adapter:window.Cordova||window.cordova?R("cordova"):R(),r){if(void 0!==r.useNonce&&(d=r.useNonce),void 0!==r.checkLoginIframe&&(c.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(c.interval=r.checkLoginIframeInterval),"login-required"===r.onLoad&&(o.loginRequired=!0),r.responseMode){if("query"!==r.responseMode&&"fragment"!==r.responseMode)throw"Invalid value for responseMode";o.responseMode=r.responseMode}if(r.flow){switch(r.flow){case"standard":o.responseType="code";break;case"implicit":o.responseType="id_token token";break;case"hybrid":o.responseType="code id_token token";break;default:throw"Invalid value for flow"}o.flow=r.flow}if(null!=r.timeSkew&&(o.timeSkew=r.timeSkew),r.redirectUri&&(o.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(o.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),"boolean"==typeof r.silentCheckSsoFallback?o.silentCheckSsoFallback=r.silentCheckSsoFallback:o.silentCheckSsoFallback=!0,void 0!==r.pkceMethod){if("S256"!==r.pkceMethod&&!1!==r.pkceMethod)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);o.pkceMethod=r.pkceMethod}else o.pkceMethod="S256";"boolean"==typeof r.enableLogging?o.enableLogging=r.enableLogging:o.enableLogging=!1,"POST"===r.logoutMethod?o.logoutMethod="POST":o.logoutMethod="GET","string"==typeof r.scope&&(o.scope=r.scope),"string"==typeof r.acrValues&&(o.acrValues=r.acrValues),"number"==typeof r.messageReceiveTimeout&&r.messageReceiveTimeout>0?o.messageReceiveTimeout=r.messageReceiveTimeout:o.messageReceiveTimeout=1e4}o.responseMode||(o.responseMode="fragment"),o.responseType||(o.responseType="code",o.flow="standard");var i=O(),s=O();s.promise.then((function(){o.onReady&&o.onReady(o.authenticated),i.setSuccess(o.authenticated)})).catch((function(e){i.setError(e)}));var a=function(t){var n,r=O();function i(e){o.endpoints=e?{authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:{authorize:function(){return m()+"/protocol/openid-connect/auth"},token:function(){return m()+"/protocol/openid-connect/token"},logout:function(){return m()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=m()+"/protocol/openid-connect/login-status-iframe.html";return o.iframeVersion&&(e=e+"?version="+o.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=m()+"/protocol/openid-connect/3p-cookies/step1.html";return o.iframeVersion&&(e=e+"?version="+o.iframeVersion),e},register:function(){return m()+"/protocol/openid-connect/registrations"},userinfo:function(){return m()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(n=e):n="keycloak.json",n)(c=new XMLHttpRequest).open("GET",n,!0),c.setRequestHeader("Accept","application/json"),c.onreadystatechange=function(){if(4==c.readyState)if(200==c.status||y(c)){var e=JSON.parse(c.responseText);o.authServerUrl=e["auth-server-url"],o.realm=e.realm,o.clientId=e.resource,i(null),r.setSuccess()}else r.setError()},c.send();else{if(!e.clientId)throw"clientId missing";o.clientId=e.clientId;var s=e.oidcProvider;if(s){var a,c;"string"==typeof s?(a="/"==s.charAt(s.length-1)?s+".well-known/openid-configuration":s+"/.well-known/openid-configuration",(c=new XMLHttpRequest).open("GET",a,!0),c.setRequestHeader("Accept","application/json"),c.onreadystatechange=function(){4==c.readyState&&(200==c.status||y(c)?(i(JSON.parse(c.responseText)),r.setSuccess()):r.setError())},c.send()):(i(s),r.setSuccess())}else{if(!e.url)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++)if(u[l].src.match(/.*keycloak\.js/)){e.url=u[l].src.substr(0,u[l].src.indexOf("/js/keycloak.js"));break}if(!e.realm)throw"realm missing";o.authServerUrl=e.url,o.realm=e.realm,i(null),r.setSuccess()}}return r.promise}();function u(){var e=function(e){e||(n.prompt="none"),r&&r.locale&&(n.locale=r.locale),o.login(n).then((function(){s.setSuccess()})).catch((function(e){s.setError(e)}))},t=function(){var e=document.createElement("iframe"),t=o.createLoginUrl({prompt:"none",redirectUri:o.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(g(b(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(r.onLoad){case"check-sso":c.enable?k().then((function(){A().then((function(n){n?s.setSuccess():o.silentCheckSsoRedirectUri?t():e(!1)})).catch((function(e){s.setError(e)}))})):o.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function l(){var e=b(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return k().then((function(){g(e,s)})).catch((function(e){s.setError(e)}));r?r.token&&r.refreshToken?(v(r.token,r.refreshToken,r.idToken),c.enable?k().then((function(){A().then((function(e){e?(o.onAuthSuccess&&o.onAuthSuccess(),s.setSuccess(),S()):s.setSuccess()})).catch((function(e){s.setError(e)}))})):o.updateToken(-1).then((function(){o.onAuthSuccess&&o.onAuthSuccess(),s.setSuccess()})).catch((function(e){o.onAuthError&&o.onAuthError(),r.onLoad?u():s.setError(e)}))):r.onLoad?u():s.setSuccess():s.setSuccess()}return a.then((function(){(function(){var e=O(),t=function(){"interactive"!==document.readyState&&"complete"!==document.readyState||(document.removeEventListener("readystatechange",t),e.setSuccess())};return document.addEventListener("readystatechange",t),t(),e.promise})().then(E).then(l).catch((function(e){i.setError(e)}))})),a.catch((function(e){i.setError(e)})),i.promise},o.login=function(e){return t.login(e)},o.createLoginUrl=function(e){var i,s=w(),a=w(),c=t.redirectUri(e),u={state:s,nonce:a,redirectUri:encodeURIComponent(c)};e&&e.prompt&&(u.prompt=e.prompt),i=e&&"register"==e.action?o.endpoints.register():o.endpoints.authorize();var l=e&&e.scope||o.scope;l?-1===l.indexOf("openid")&&(l="openid "+l):l="openid";var f,h=i+"?client_id="+encodeURIComponent(o.clientId)+"&redirect_uri="+encodeURIComponent(c)+"&state="+encodeURIComponent(s)+"&response_mode="+encodeURIComponent(o.responseMode)+"&response_type="+encodeURIComponent(o.responseType)+"&scope="+encodeURIComponent(l);if(d&&(h=h+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(h+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(h+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(h+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(h+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(h+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(h+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr){var m=(f={id_token:{acr:e.acr}},JSON.stringify(f));h+="&claims="+encodeURIComponent(m)}if((e&&e.acrValues||o.acrValues)&&(h+="&acr_values="+encodeURIComponent(e.acrValues||o.acrValues)),o.pkceMethod){var g=p(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");u.pkceCodeVerifier=g,h+="&code_challenge="+function(e,t){if("S256"!==e)throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return function(e){const t=String.fromCodePoint(...e);return btoa(t)}(new Uint8Array(r.arrayBuffer(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(o.pkceMethod,g),h+="&code_challenge_method="+o.pkceMethod}return n.add(u),h},o.logout=function(e){return t.logout(e)},o.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??o.logoutMethod))return o.endpoints.logout();var n=o.endpoints.logout()+"?client_id="+encodeURIComponent(o.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return o.idToken&&(n+="&id_token_hint="+encodeURIComponent(o.idToken)),n},o.register=function(e){return t.register(e)},o.createRegisterUrl=function(e){return e||(e={}),e.action="register",o.createLoginUrl(e)},o.createAccountUrl=function(e){var n=m(),r=void 0;return void 0!==n&&(r=n+"/account?referrer="+encodeURIComponent(o.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),r},o.accountManagement=function(){return t.accountManagement()},o.hasRealmRole=function(e){var t=o.realmAccess;return!!t&&t.roles.indexOf(e)>=0},o.hasResourceRole=function(e,t){if(!o.resourceAccess)return!1;var n=o.resourceAccess[t||o.clientId];return!!n&&n.roles.indexOf(e)>=0},o.loadUserProfile=function(){var e=m()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+o.token);var n=O();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(o.profile=JSON.parse(t.responseText),n.setSuccess(o.profile)):n.setError())},t.send(),n.promise},o.loadUserInfo=function(){var e=o.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+o.token);var n=O();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(o.userInfo=JSON.parse(t.responseText),n.setSuccess(o.userInfo)):n.setError())},t.send(),n.promise},o.isTokenExpired=function(e){if(!o.tokenParsed||!o.refreshToken&&"implicit"!=o.flow)throw"Not authenticated";if(null==o.timeSkew)return f("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=o.tokenParsed.exp-Math.ceil((new Date).getTime()/1e3)+o.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},o.updateToken=function(e){var t=O();if(!o.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,f("[KEYCLOAK] Refreshing token: forced refresh")):o.tokenParsed&&!o.isTokenExpired(e)||(n=!0,f("[KEYCLOAK] Refreshing token: token expired")),n){var r="grant_type=refresh_token&refresh_token="+o.refreshToken,i=o.endpoints.token();if(a.push(t),1==a.length){var s=new XMLHttpRequest;s.open("POST",i,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,r+="&client_id="+encodeURIComponent(o.clientId);var c=(new Date).getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){f("[KEYCLOAK] Token refreshed"),c=(c+(new Date).getTime())/2;var e=JSON.parse(s.responseText);v(e.access_token,e.refresh_token,e.id_token,c),o.onAuthRefreshSuccess&&o.onAuthRefreshSuccess();for(var t=a.pop();null!=t;t=a.pop())t.setSuccess(!0)}else for(h("[KEYCLOAK] Failed to refresh token"),400==s.status&&o.clearToken(),o.onAuthRefreshError&&o.onAuthRefreshError(),t=a.pop();null!=t;t=a.pop())t.setError(!0)},s.send(r)}}else t.setSuccess(!1)};return c.enable?A().then((function(){n()})).catch((function(e){t.setError(e)})):n(),t.promise},o.clearToken=function(){o.token&&(v(null,null,null),o.onAuthLogout&&o.onAuthLogout(),o.loginRequired&&o.login())};var T=function(){if(!(this instanceof T))return new T;function e(){for(var e=(new Date).getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var r=localStorage.getItem(n);if(r)try{var o=JSON.parse(r).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,r=localStorage.getItem(n);return r&&(localStorage.removeItem(n),r=JSON.parse(r)),e(),r}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=(new Date).getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},P=function(){if(!(this instanceof P))return new P;var e=this;e.get=function(e){if(e){var o=n("kc-callback-"+e);return r("kc-callback-"+e,"",t(-100)),o?JSON.parse(o):void 0}},e.add=function(e){r("kc-callback-"+e.state,JSON.stringify(e),t(60))},e.removeItem=function(e){r(e,"",t(-100))};var t=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},n=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,n){var r=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=r}};function C(e){return function(){o.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.amdO={},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(432)})()));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
5
|
+
*
|
|
6
|
+
* @version 0.11.0
|
|
7
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
8
|
+
* @copyright Chen, Yi-Cyuan 2014-2024
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
package/index.node.d.ts
ADDED