@gataca/qr 2.0.14 → 3.0.6
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/dist/cjs/gataca-autoqr.cjs.entry.js +5 -5
- package/dist/cjs/gataca-qr_2.cjs.entry.js +6 -19
- package/dist/cjs/gataca-qrws.cjs.entry.js +6 -18
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +197 -13
- package/dist/cjs/gatacaqr.cjs.js +3 -7
- package/dist/cjs/{index-f214ab7a.js → index-93d47a75.js} +2 -111
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +5 -5
- package/dist/collection/components/gataca-qr/gataca-qr.js +13 -26
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +12 -24
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +259 -19
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +9 -9
- package/dist/components/gataca-autoqr.js +4 -4
- package/dist/components/gataca-qr2.js +6 -19
- package/dist/components/gataca-qrws2.js +6 -18
- package/dist/components/gataca-ssibutton2.js +203 -12
- package/dist/components/gataca-ssibuttonws2.js +3 -3
- package/dist/components/index.d.ts +0 -9
- package/dist/components/index.js +1 -1
- package/dist/esm/gataca-autoqr.entry.js +5 -5
- package/dist/esm/gataca-qr_2.entry.js +6 -19
- package/dist/esm/gataca-qrws.entry.js +6 -18
- package/dist/esm/gataca-ssibutton_2.entry.js +197 -13
- package/dist/esm/gatacaqr.js +3 -4
- package/dist/esm/{index-570c9813.js → index-2be54f32.js} +3 -111
- package/dist/esm/loader.js +3 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/p-0381ab9a.entry.js +1 -0
- package/dist/gatacaqr/p-0be4566d.js +1 -1
- package/dist/gatacaqr/p-16298cb4.entry.js +1 -0
- package/dist/gatacaqr/p-5ae5f952.js +2 -0
- package/dist/gatacaqr/p-761647d3.entry.js +1 -0
- package/dist/gatacaqr/p-9e9af27e.entry.js +1 -0
- package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +2 -2
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +4 -4
- package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +3 -3
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +29 -5
- package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +2 -2
- package/dist/types/components.d.ts +38 -22
- package/dist/types/stencil-public-runtime.d.ts +3 -59
- package/dist/types/utils/utils.d.ts +9 -9
- package/loader/index.d.ts +0 -9
- package/package.json +2 -2
- package/readme.md +2 -0
- package/dist/gatacaqr/p-3d1a6526.entry.js +0 -1
- package/dist/gatacaqr/p-64740141.entry.js +0 -1
- package/dist/gatacaqr/p-bd6bd52f.entry.js +0 -1
- package/dist/gatacaqr/p-ec0f00a6.js +0 -2
- package/dist/gatacaqr/p-f9931de0.entry.js +0 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-2be54f32.js';
|
|
2
2
|
import './qr-code-styling-0eeb38d5.js';
|
|
3
|
+
import { R as RESULT_STATUS } from './utils-63e7a33b.js';
|
|
3
4
|
|
|
4
5
|
const gatacaSsibuttonCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
|
|
5
6
|
|
|
6
7
|
const PHONE_ICON$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=";
|
|
8
|
+
//Default values
|
|
9
|
+
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
10
|
+
const DEFAULT_POLLING_FREQ = 3;
|
|
7
11
|
const GatacaSSIButton = class {
|
|
8
12
|
constructor(hostRef) {
|
|
9
13
|
registerInstance(this, hostRef);
|
|
@@ -14,12 +18,13 @@ const GatacaSSIButton = class {
|
|
|
14
18
|
this.createSession = undefined;
|
|
15
19
|
this.successCallback = undefined;
|
|
16
20
|
this.errorCallback = undefined;
|
|
21
|
+
this.handleCheckAppLoading = undefined;
|
|
17
22
|
this.qrRole = undefined;
|
|
18
23
|
this.callbackServer = undefined;
|
|
19
24
|
this.sessionTimeout = undefined;
|
|
20
25
|
this.pollingFrequency = undefined;
|
|
21
26
|
this.autorefresh = false;
|
|
22
|
-
this.
|
|
27
|
+
this.v = "3";
|
|
23
28
|
this.qrModalTitle = "Quick Access";
|
|
24
29
|
this.modalTitleColor = "#4745B7";
|
|
25
30
|
this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
|
|
@@ -40,7 +45,11 @@ const GatacaSSIButton = class {
|
|
|
40
45
|
this.waitingStartSessionLabel = "waiting to start a session";
|
|
41
46
|
this.hideQrModalDescription = false;
|
|
42
47
|
this.open = false;
|
|
43
|
-
this.
|
|
48
|
+
this.sessionId = undefined;
|
|
49
|
+
this.authenticationRequest = undefined;
|
|
50
|
+
this.sessionData = undefined;
|
|
51
|
+
this.result = RESULT_STATUS.NOT_STARTED;
|
|
52
|
+
this.qr = (h("gataca-qr", { ref: (el) => (this.qrElement = el), checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription }));
|
|
44
53
|
}
|
|
45
54
|
/**
|
|
46
55
|
* Retrieve manually the session data on a successful login
|
|
@@ -48,22 +57,197 @@ const GatacaSSIButton = class {
|
|
|
48
57
|
async getSessionData() {
|
|
49
58
|
return this.qr.getSessionData();
|
|
50
59
|
}
|
|
60
|
+
async getSessionId() {
|
|
61
|
+
if (this.sessionId) {
|
|
62
|
+
return this.sessionId;
|
|
63
|
+
}
|
|
64
|
+
let { sessionId, authenticationRequest } = await this.createSession();
|
|
65
|
+
this.sessionId = sessionId;
|
|
66
|
+
this.authenticationRequest = authenticationRequest;
|
|
67
|
+
return this.sessionId;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Force manually the start polling
|
|
71
|
+
*/
|
|
72
|
+
async startMobilePolling() {
|
|
73
|
+
await this.getSessionId();
|
|
74
|
+
this.result = RESULT_STATUS.ONGOING;
|
|
75
|
+
this.poll()
|
|
76
|
+
.then((data) => {
|
|
77
|
+
this.result = RESULT_STATUS.SUCCESS;
|
|
78
|
+
this.sessionData = data;
|
|
79
|
+
this.gatacaLoginCompleted.emit(data);
|
|
80
|
+
this.successCallback(data);
|
|
81
|
+
})
|
|
82
|
+
.catch((err) => {
|
|
83
|
+
this.clean();
|
|
84
|
+
let expired = err === RESULT_STATUS.EXPIRED;
|
|
85
|
+
if (expired && this.autorefresh) {
|
|
86
|
+
this.startMobilePolling();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if (err !== RESULT_STATUS.NOT_STARTED) {
|
|
90
|
+
let error = expired
|
|
91
|
+
? new Error(this.userNotScanInTimeErrorLabel)
|
|
92
|
+
: new Error(this.credsNotValidatedErrorLabel);
|
|
93
|
+
this.result = err;
|
|
94
|
+
this.gatacaLoginFailed.emit(error);
|
|
95
|
+
this.errorCallback(error);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Stop manually an ongoing session
|
|
102
|
+
*/
|
|
103
|
+
async stop() {
|
|
104
|
+
this.clean();
|
|
105
|
+
if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
|
|
106
|
+
this.result = RESULT_STATUS.NOT_STARTED;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
clean() {
|
|
110
|
+
this.sessionData = undefined;
|
|
111
|
+
this.sessionId = undefined;
|
|
112
|
+
}
|
|
51
113
|
renderModal() {
|
|
52
114
|
return this.qr;
|
|
53
115
|
}
|
|
54
|
-
|
|
116
|
+
async poll() {
|
|
117
|
+
let endTime = new Date().getTime() +
|
|
118
|
+
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
119
|
+
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
120
|
+
let checkFunc = async (component) => {
|
|
121
|
+
if (component.result === RESULT_STATUS.NOT_STARTED) {
|
|
122
|
+
return { result: RESULT_STATUS.NOT_STARTED };
|
|
123
|
+
}
|
|
124
|
+
let id = await component.getSessionId();
|
|
125
|
+
return component.checkStatus(id);
|
|
126
|
+
};
|
|
127
|
+
let component = this;
|
|
128
|
+
let checkCondition = async function (resolve, reject) {
|
|
129
|
+
// If the condition is met, we're done!
|
|
130
|
+
let { result, data } = await checkFunc(component);
|
|
131
|
+
switch (result) {
|
|
132
|
+
case RESULT_STATUS.SUCCESS:
|
|
133
|
+
resolve(data);
|
|
134
|
+
break;
|
|
135
|
+
case RESULT_STATUS.READ:
|
|
136
|
+
component.result = RESULT_STATUS.READ;
|
|
137
|
+
case RESULT_STATUS.ONGOING:
|
|
138
|
+
if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
|
|
139
|
+
setTimeout(checkCondition, interval, resolve, reject);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
reject(RESULT_STATUS.EXPIRED);
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
145
|
+
default:
|
|
146
|
+
reject(result);
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return new Promise(checkCondition);
|
|
151
|
+
}
|
|
152
|
+
isAppInstalled(appScheme, callback) {
|
|
153
|
+
let timeout;
|
|
154
|
+
let detected = false;
|
|
155
|
+
if (appScheme === null || appScheme === void 0 ? void 0 : appScheme.length) {
|
|
156
|
+
window.location.href = appScheme;
|
|
157
|
+
}
|
|
158
|
+
timeout = setTimeout(() => {
|
|
159
|
+
if (!detected) {
|
|
160
|
+
setTimeout(() => {
|
|
161
|
+
if (!detected) {
|
|
162
|
+
callback(false);
|
|
163
|
+
}
|
|
164
|
+
cleanup();
|
|
165
|
+
}, 1000);
|
|
166
|
+
}
|
|
167
|
+
}, 1500);
|
|
168
|
+
const handleVisibilityChange = () => {
|
|
169
|
+
if (document.hidden) {
|
|
170
|
+
detected = true;
|
|
171
|
+
callback(true);
|
|
172
|
+
this.startMobilePolling();
|
|
173
|
+
cleanup();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
177
|
+
function cleanup() {
|
|
178
|
+
clearTimeout(timeout);
|
|
179
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
renderDesktopButton() {
|
|
55
183
|
return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
|
|
56
184
|
this.open = !this.open;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
if (this.open) {
|
|
188
|
+
(_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
(_b = this.qrElement) === null || _b === void 0 ? void 0 : _b.stop();
|
|
192
|
+
}
|
|
193
|
+
}, 0);
|
|
63
194
|
} }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
|
|
64
195
|
}
|
|
196
|
+
async getAuthRequest() {
|
|
197
|
+
let { authenticationRequest } = await this.createSession();
|
|
198
|
+
return authenticationRequest;
|
|
199
|
+
}
|
|
200
|
+
renderMobileButton(isAndroid, isIos) {
|
|
201
|
+
let loading = false;
|
|
202
|
+
const handleLoading = (isLoading) => {
|
|
203
|
+
loading = isLoading;
|
|
204
|
+
if (this.handleCheckAppLoading) {
|
|
205
|
+
this.handleCheckAppLoading(isLoading);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const executeRedirection = async () => {
|
|
209
|
+
handleLoading(true);
|
|
210
|
+
const androidStoreLink = "https://play.google.com/store/apps/details?id=com.gataca.identity";
|
|
211
|
+
const iosStoreLink = "https://apps.apple.com/us/app/gataca/id1498607616";
|
|
212
|
+
try {
|
|
213
|
+
const appScheme = await this.getAuthRequest();
|
|
214
|
+
this.isAppInstalled(appScheme, (installed) => {
|
|
215
|
+
if (!installed) {
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
this.stop();
|
|
218
|
+
if (isAndroid) {
|
|
219
|
+
window.location.href = androidStoreLink;
|
|
220
|
+
}
|
|
221
|
+
else if (isIos) {
|
|
222
|
+
window.location.href = iosStoreLink;
|
|
223
|
+
}
|
|
224
|
+
}, 500);
|
|
225
|
+
}
|
|
226
|
+
handleLoading(false);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
this.stop();
|
|
231
|
+
handleLoading(false);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
|
|
235
|
+
executeRedirection();
|
|
236
|
+
}, disabled: loading }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
|
|
237
|
+
}
|
|
65
238
|
render() {
|
|
66
|
-
|
|
239
|
+
const userAgent =
|
|
240
|
+
// @ts-ignore
|
|
241
|
+
(navigator === null || navigator === void 0 ? void 0 : navigator.userAgent) || (navigator === null || navigator === void 0 ? void 0 : navigator.vendor) || (window === null || window === void 0 ? void 0 : window.opera);
|
|
242
|
+
const isAndroid = /android/i.test(userAgent);
|
|
243
|
+
const isIos =
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) ||
|
|
246
|
+
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
247
|
+
const isMobile = isAndroid || isIos;
|
|
248
|
+
return (h("div", { class: "buttonContainer" }, isMobile && this.v === "3"
|
|
249
|
+
? this.renderMobileButton(isAndroid, isIos)
|
|
250
|
+
: this.renderDesktopButton(), this.open && (!isMobile || this.v === "3") && this.renderModal()));
|
|
67
251
|
}
|
|
68
252
|
};
|
|
69
253
|
GatacaSSIButton.style = gatacaSsibuttonCss;
|
|
@@ -87,13 +271,13 @@ const GatacaSSIButtonWS = class {
|
|
|
87
271
|
this.wsOnMessage = undefined;
|
|
88
272
|
this.autostart = true;
|
|
89
273
|
this.autorefresh = false;
|
|
90
|
-
this.
|
|
274
|
+
this.v = "3";
|
|
91
275
|
this.qrModalTitle = "Quick Access";
|
|
92
276
|
this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
|
|
93
277
|
this.hideBrandTitle = false;
|
|
94
278
|
this.dynamicLink = true;
|
|
95
279
|
this.open = false;
|
|
96
|
-
this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh,
|
|
280
|
+
this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
|
|
97
281
|
}
|
|
98
282
|
/**
|
|
99
283
|
* Retrieve manually the session data on a successful login
|
package/dist/esm/gatacaqr.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-570c9813.js';
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-2be54f32.js';
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
|
-
Stencil Client Patch Browser v2.
|
|
4
|
+
Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
6
5
|
*/
|
|
7
6
|
const patchBrowser = () => {
|
|
8
7
|
const importMeta = import.meta.url;
|
|
@@ -14,5 +13,5 @@ const patchBrowser = () => {
|
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["gataca-qr_2",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"
|
|
16
|
+
return bootstrapLazy([["gataca-qr_2",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
18
17
|
});
|
|
@@ -41,18 +41,6 @@ const isComplexType = (o) => {
|
|
|
41
41
|
o = typeof o;
|
|
42
42
|
return o === 'object' || o === 'function';
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Helper method for querying a `meta` tag that contains a nonce value
|
|
46
|
-
* out of a DOM's head.
|
|
47
|
-
*
|
|
48
|
-
* @param doc The DOM containing the `head` to query against
|
|
49
|
-
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
50
|
-
* exists or the tag has no content.
|
|
51
|
-
*/
|
|
52
|
-
function queryNonceMetaTagContent(doc) {
|
|
53
|
-
var _a, _b, _c;
|
|
54
|
-
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
55
|
-
}
|
|
56
44
|
/**
|
|
57
45
|
* Production h() function based on Preact by
|
|
58
46
|
* Jason Miller (@developit)
|
|
@@ -61,6 +49,7 @@ function queryNonceMetaTagContent(doc) {
|
|
|
61
49
|
*
|
|
62
50
|
* Modified for Stencil's compiler and vdom
|
|
63
51
|
*/
|
|
52
|
+
// const stack: any[] = [];
|
|
64
53
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
65
54
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
66
55
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -115,14 +104,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
115
104
|
}
|
|
116
105
|
return vnode;
|
|
117
106
|
};
|
|
118
|
-
/**
|
|
119
|
-
* A utility function for creating a virtual DOM node from a tag and some
|
|
120
|
-
* possible text content.
|
|
121
|
-
*
|
|
122
|
-
* @param tag the tag for this element
|
|
123
|
-
* @param text possible text content for the node
|
|
124
|
-
* @returns a newly-minted virtual DOM node
|
|
125
|
-
*/
|
|
126
107
|
const newVNode = (tag, text) => {
|
|
127
108
|
const vnode = {
|
|
128
109
|
$flags$: 0,
|
|
@@ -137,31 +118,11 @@ const newVNode = (tag, text) => {
|
|
|
137
118
|
return vnode;
|
|
138
119
|
};
|
|
139
120
|
const Host = {};
|
|
140
|
-
/**
|
|
141
|
-
* Check whether a given node is a Host node or not
|
|
142
|
-
*
|
|
143
|
-
* @param node the virtual DOM node to check
|
|
144
|
-
* @returns whether it's a Host node or not
|
|
145
|
-
*/
|
|
146
121
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
147
|
-
/**
|
|
148
|
-
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
149
|
-
*
|
|
150
|
-
* Note that these functions convert from {@link d.VNode} to
|
|
151
|
-
* {@link d.ChildNode} to give functional component developers a friendly
|
|
152
|
-
* interface.
|
|
153
|
-
*/
|
|
154
122
|
const vdomFnUtils = {
|
|
155
123
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
156
124
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
157
125
|
};
|
|
158
|
-
/**
|
|
159
|
-
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
160
|
-
* friendlier public interface (hence, 'convertToPublic').
|
|
161
|
-
*
|
|
162
|
-
* @param node the virtual DOM node to convert
|
|
163
|
-
* @returns a converted child node
|
|
164
|
-
*/
|
|
165
126
|
const convertToPublic = (node) => ({
|
|
166
127
|
vattrs: node.$attrs$,
|
|
167
128
|
vchildren: node.$children$,
|
|
@@ -170,15 +131,6 @@ const convertToPublic = (node) => ({
|
|
|
170
131
|
vtag: node.$tag$,
|
|
171
132
|
vtext: node.$text$,
|
|
172
133
|
});
|
|
173
|
-
/**
|
|
174
|
-
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
175
|
-
* order to use the resulting object in the virtual DOM. The initial object was
|
|
176
|
-
* likely created as part of presenting a public API, so converting it back
|
|
177
|
-
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
178
|
-
*
|
|
179
|
-
* @param node the child node to convert
|
|
180
|
-
* @returns a converted virtual DOM node
|
|
181
|
-
*/
|
|
182
134
|
const convertToPrivate = (node) => {
|
|
183
135
|
if (typeof node.vtag === 'function') {
|
|
184
136
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -288,7 +240,6 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
288
240
|
styles.set(scopeId, style);
|
|
289
241
|
};
|
|
290
242
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
291
|
-
var _a;
|
|
292
243
|
let scopeId = getScopeId(cmpMeta);
|
|
293
244
|
const style = styles.get(scopeId);
|
|
294
245
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -308,11 +259,6 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
308
259
|
styleElm = doc.createElement('style');
|
|
309
260
|
styleElm.innerHTML = style;
|
|
310
261
|
}
|
|
311
|
-
// Apply CSP nonce to the style tag if it exists
|
|
312
|
-
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
313
|
-
if (nonce != null) {
|
|
314
|
-
styleElm.setAttribute('nonce', nonce);
|
|
315
|
-
}
|
|
316
262
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
317
263
|
}
|
|
318
264
|
if (appliedStyles) {
|
|
@@ -542,21 +488,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
542
488
|
}
|
|
543
489
|
return elm;
|
|
544
490
|
};
|
|
545
|
-
/**
|
|
546
|
-
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
547
|
-
* add them to the DOM in the appropriate place.
|
|
548
|
-
*
|
|
549
|
-
* @param parentElm the DOM node which should be used as a parent for the new
|
|
550
|
-
* DOM nodes
|
|
551
|
-
* @param before a child of the `parentElm` which the new children should be
|
|
552
|
-
* inserted before (optional)
|
|
553
|
-
* @param parentVNode the parent virtual DOM node
|
|
554
|
-
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
555
|
-
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
556
|
-
* creating DOM nodes (inclusive)
|
|
557
|
-
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
558
|
-
* creating DOM nodes (inclusive)
|
|
559
|
-
*/
|
|
560
491
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
561
492
|
let containerElm = (parentElm);
|
|
562
493
|
let childNode;
|
|
@@ -573,19 +504,6 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
573
504
|
}
|
|
574
505
|
}
|
|
575
506
|
};
|
|
576
|
-
/**
|
|
577
|
-
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
578
|
-
* This can be used to, for instance, clean up after a list of children which
|
|
579
|
-
* should no longer be shown.
|
|
580
|
-
*
|
|
581
|
-
* This function also handles some of Stencil's slot relocation logic.
|
|
582
|
-
*
|
|
583
|
-
* @param vnodes a list of virtual DOM nodes to remove
|
|
584
|
-
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
585
|
-
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
586
|
-
* @param vnode a VNode
|
|
587
|
-
* @param elm an element
|
|
588
|
-
*/
|
|
589
507
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
590
508
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
591
509
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -778,8 +696,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
778
696
|
*
|
|
779
697
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
780
698
|
* changing order within a `children` array or something along those lines then
|
|
781
|
-
* we could obtain a false
|
|
782
|
-
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
699
|
+
* we could obtain a false positive and then have to do needless re-rendering.
|
|
783
700
|
*
|
|
784
701
|
* @param leftVNode the first VNode to check
|
|
785
702
|
* @param rightVNode the second VNode to check
|
|
@@ -846,18 +763,6 @@ const callNodeRefs = (vNode) => {
|
|
|
846
763
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
847
764
|
}
|
|
848
765
|
};
|
|
849
|
-
/**
|
|
850
|
-
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
851
|
-
*
|
|
852
|
-
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
853
|
-
* function will handle creating a virtual DOM tree with a single root, patching
|
|
854
|
-
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
855
|
-
* relocation, and reflecting attributes.
|
|
856
|
-
*
|
|
857
|
-
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
858
|
-
* the DOM node into which it should be rendered.
|
|
859
|
-
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
860
|
-
*/
|
|
861
766
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
862
767
|
const hostElm = hostRef.$hostElement$;
|
|
863
768
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -1305,7 +1210,6 @@ const disconnectedCallback = (elm) => {
|
|
|
1305
1210
|
}
|
|
1306
1211
|
};
|
|
1307
1212
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1308
|
-
var _a;
|
|
1309
1213
|
const endBootstrap = createTime();
|
|
1310
1214
|
const cmpTags = [];
|
|
1311
1215
|
const exclude = options.exclude || [];
|
|
@@ -1382,11 +1286,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1382
1286
|
{
|
|
1383
1287
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1384
1288
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1385
|
-
// Apply CSP nonce to the style tag if it exists
|
|
1386
|
-
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1387
|
-
if (nonce != null) {
|
|
1388
|
-
visibilityStyle.setAttribute('nonce', nonce);
|
|
1389
|
-
}
|
|
1390
1289
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1391
1290
|
}
|
|
1392
1291
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1431,13 +1330,6 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1431
1330
|
};
|
|
1432
1331
|
// prettier-ignore
|
|
1433
1332
|
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1434
|
-
/**
|
|
1435
|
-
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1436
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1437
|
-
* @param nonce The value to be assigned to the platform nonce property.
|
|
1438
|
-
* @returns void
|
|
1439
|
-
*/
|
|
1440
|
-
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1441
1333
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1442
1334
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1443
1335
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1548,4 +1440,4 @@ const flush = () => {
|
|
|
1548
1440
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1549
1441
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1550
1442
|
|
|
1551
|
-
export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r
|
|
1443
|
+
export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-570c9813.js';
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-2be54f32.js';
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
6
5
|
*/
|
|
7
6
|
const patchEsm = () => {
|
|
8
7
|
return promiseResolve();
|
|
@@ -11,7 +10,7 @@ const patchEsm = () => {
|
|
|
11
10
|
const defineCustomElements = (win, options) => {
|
|
12
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
12
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["gataca-qr_2",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"
|
|
13
|
+
return bootstrapLazy([["gataca-qr_2",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
15
14
|
});
|
|
16
15
|
};
|
|
17
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|