@gataca/qr 2.0.3 → 2.0.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.
Files changed (30) hide show
  1. package/dist/cjs/gataca-autoqr.cjs.entry.js +105 -0
  2. package/dist/cjs/gataca-qr_2.cjs.entry.js +230 -0
  3. package/dist/cjs/gataca-qrws.cjs.entry.js +176 -0
  4. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +129 -0
  5. package/dist/cjs/gatacaqr.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/logo_gataca-f3dc6840.js +14 -0
  8. package/dist/{esm/gataca-autoqr_6.entry.js → cjs/qr-code-styling-412bbc7a.js} +2 -603
  9. package/dist/collection/components/gataca-qr/gataca-qr.css +11 -2
  10. package/dist/collection/components/gataca-qr/gataca-qr.js +110 -10
  11. package/dist/components/gataca-qr2.js +26 -10
  12. package/dist/esm/gataca-autoqr.entry.js +101 -0
  13. package/dist/esm/gataca-qr_2.entry.js +225 -0
  14. package/dist/esm/gataca-qrws.entry.js +172 -0
  15. package/dist/esm/gataca-ssibutton_2.entry.js +124 -0
  16. package/dist/esm/gatacaqr.js +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/logo_gataca-57ad0363.js +9 -0
  19. package/dist/{cjs/gataca-autoqr_6.cjs.entry.js → esm/qr-code-styling-0eeb38d5.js} +1 -613
  20. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  21. package/dist/gatacaqr/p-0be4566d.js +1 -0
  22. package/dist/gatacaqr/p-35b616ba.entry.js +1 -0
  23. package/dist/gatacaqr/p-5eb106c0.entry.js +1 -0
  24. package/dist/gatacaqr/p-66ad21ac.entry.js +1 -0
  25. package/dist/gatacaqr/p-6adc6933.js +1 -0
  26. package/dist/gatacaqr/p-b834ef88.entry.js +1 -0
  27. package/dist/types/components/gataca-qr/gataca-qr.d.ts +27 -2
  28. package/dist/types/components.d.ts +42 -2
  29. package/package.json +40 -38
  30. package/dist/gatacaqr/p-b37057bb.entry.js +0 -1
@@ -0,0 +1,225 @@
1
+ import { r as registerInstance, h, c as createEvent } from './index-80311733.js';
2
+ import { l as logoGatacaSvg, g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg } from './logo_gataca-57ad0363.js';
3
+ import { Q as QRCodeStyling } from './qr-code-styling-0eeb38d5.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-05ba6c9f.js';
5
+
6
+ const GatacaQRDisplay = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.qrData = undefined;
10
+ this.size = 256;
11
+ this.logoSize = 0;
12
+ this.logoSrc = undefined;
13
+ this.qrColor = "#1E1E20";
14
+ this.rounded = true;
15
+ }
16
+ componentDidLoad() {
17
+ const qrCode = new QRCodeStyling({
18
+ data: this.qrData,
19
+ width: this.size,
20
+ height: this.size,
21
+ image: this.logoSize > 0 ? this.logoSrc || logoGatacaSvg : undefined,
22
+ margin: 10,
23
+ type: "svg",
24
+ dotsOptions: {
25
+ color: this.qrColor,
26
+ type: this.rounded ? "dots" : "square",
27
+ },
28
+ cornersSquareOptions: {
29
+ type: this.rounded ? "extra-rounded" : "square",
30
+ },
31
+ cornersDotOptions: {
32
+ type: this.rounded ? "dot" : "square",
33
+ },
34
+ imageOptions: {
35
+ margin: 2,
36
+ imageSize: this.logoSize,
37
+ },
38
+ });
39
+ qrCode.append(this.qr);
40
+ }
41
+ render() {
42
+ return (h("div", { ref: (el) => {
43
+ this.qr = el;
44
+ } }));
45
+ }
46
+ };
47
+
48
+ const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @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}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window p{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:\"Work Sans\";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:\"salt\" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{line-height:23.5px;color:var(--neutral-1000, #1E1E20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}";
49
+
50
+ const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
51
+ //Default values
52
+ const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
53
+ const DEFAULT_POLLING_FREQ = 3;
54
+ const QR_ROLE_CONNECT = "connect";
55
+ const FUNCTION_ROLES = {
56
+ connect: "scan",
57
+ certify: "credential",
58
+ };
59
+ const GatacaQR = class {
60
+ constructor(hostRef) { registerInstance(this, hostRef); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.hideQrModalDescription = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
61
+ disconnectedCallback() {
62
+ this.stop();
63
+ }
64
+ async componentDidLoad() {
65
+ if (this.autostart) {
66
+ await this.display();
67
+ }
68
+ }
69
+ /**
70
+ * Force manually the display of a QR
71
+ */
72
+ async display() {
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.display();
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
+ if (checkMobile() && this.dynamicLink) {
100
+ window.location.href = this.getLink();
101
+ }
102
+ }
103
+ /**
104
+ * Stop manually an ongoing session
105
+ */
106
+ async stop() {
107
+ this.clean();
108
+ if (this.result === RESULT_STATUS.ONGOING) {
109
+ this.result = RESULT_STATUS.NOT_STARTED;
110
+ }
111
+ }
112
+ clean() {
113
+ this.sessionData = undefined;
114
+ this.sessionId = undefined;
115
+ }
116
+ /**
117
+ * Retrieve manually the session data on a successful login
118
+ */
119
+ async getSessionData() {
120
+ return this.sessionData
121
+ ? Promise.resolve(this.sessionData)
122
+ : Promise.reject(new Error(this.failedLoginErrorLabel));
123
+ }
124
+ async getSessionId() {
125
+ if (this.sessionId) {
126
+ return this.sessionId;
127
+ }
128
+ let { sessionId, authenticationRequest } = await this.createSession();
129
+ this.sessionId = sessionId;
130
+ this.authenticationRequest = authenticationRequest;
131
+ return this.sessionId;
132
+ }
133
+ getLink() {
134
+ if (this.v2) {
135
+ return this.authenticationRequest;
136
+ }
137
+ let op = FUNCTION_ROLES[this.qrRole];
138
+ let link = "https://gataca.page.link/" + op + "?";
139
+ link +=
140
+ this.qrRole === QR_ROLE_CONNECT
141
+ ? "session=" + this.sessionId
142
+ : "process=" + this.sessionId;
143
+ link +=
144
+ "&callback=" + base64UrlEncode(encodeURIComponent(this.callbackServer));
145
+ link = encodeURIComponent(link);
146
+ return this.dynamicLink ? DEEP_LINK_PREFIX + link : link;
147
+ }
148
+ async poll() {
149
+ let endTime = new Date().getTime() +
150
+ (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
151
+ let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
152
+ let checkFunc = async (component) => {
153
+ if (component.result === RESULT_STATUS.NOT_STARTED) {
154
+ return { result: RESULT_STATUS.NOT_STARTED };
155
+ }
156
+ let id = await component.getSessionId();
157
+ return component.checkStatus(id);
158
+ };
159
+ let component = this;
160
+ let checkCondition = async function (resolve, reject) {
161
+ // If the condition is met, we're done!
162
+ let { result, data } = await checkFunc(component);
163
+ switch (result) {
164
+ case RESULT_STATUS.SUCCESS:
165
+ resolve(data);
166
+ break;
167
+ case RESULT_STATUS.ONGOING:
168
+ if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
169
+ setTimeout(checkCondition, interval, resolve, reject);
170
+ }
171
+ else {
172
+ reject(RESULT_STATUS.EXPIRED);
173
+ }
174
+ break;
175
+ default:
176
+ reject(result);
177
+ break;
178
+ }
179
+ };
180
+ return new Promise(checkCondition);
181
+ }
182
+ renderQRSection() {
183
+ switch (this.result) {
184
+ case RESULT_STATUS.NOT_STARTED:
185
+ return this.renderRetryButton();
186
+ case RESULT_STATUS.ONGOING:
187
+ return this.renderQR(this.getLink(), true);
188
+ case RESULT_STATUS.EXPIRED:
189
+ return this.renderRetryButton(this.qrCodeExpiredLabel);
190
+ case RESULT_STATUS.FAILED:
191
+ return this.renderRetryButton(this.credentialsNotValidatedLabel);
192
+ case RESULT_STATUS.SUCCESS:
193
+ return this.renderSuccess();
194
+ }
195
+ }
196
+ renderSuccess() {
197
+ var _a;
198
+ return (h("div", { class: "success", style: {
199
+ height: this.modalHeight
200
+ ? ((_a = this.modalHeight) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
201
+ : "300px",
202
+ } }, h("img", { src: gatIconCheckSvg, height: 52, width: 52 }), h("p", { class: "successMsg" }, this.successLoginLabel)));
203
+ }
204
+ renderRetryButton(errorMessage) {
205
+ return (h("div", { class: "reload" }, h("div", { id: "notify", onClick: () => this.display() }, h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }), h("p", { class: "qrDescription" }, this.clickInsideBoxLabel, " "), errorMessage ? (h("p", { class: "qrDescription bold" }, this.refreshQrLabel)) : (h("p", { class: "qrDescription bold" }, this.scanQrLabel, "e")), errorMessage && (h("div", { class: "alert" }, h("img", { src: gatIconAlertSvg, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, this.renderQR(this.waitingStartSessionLabel))));
206
+ }
207
+ renderQR(value, useLogo) {
208
+ return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: this.qrSize, "logo-size": useLogo ? 0.33 : 0, "logo-src": this.logoSrc }));
209
+ }
210
+ render() {
211
+ var _a;
212
+ return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? "" : "large-modal"} ${this.hideModalBoxShadow ? "noBoxShadow" : ""}`, style: {
213
+ width: (this.modalWidth - 2).toString() + "px",
214
+ height: this.modalHeight
215
+ ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
216
+ : "",
217
+ }, onClick: (event) => {
218
+ event.stopPropagation();
219
+ } }, h("div", { class: "modal-window__content" }, h("div", { class: `qrTitleContainer ${this.hideModalTexts ? "hidenText" : ""}` }, h("p", { class: "qrTitle", style: { color: this.modalTitleColor || "#1e1e20" } }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand" }, this.byBrandLabel, " ", h("span", null, h("img", { src: logoGatacaSvg })))), this.result !== RESULT_STATUS.SUCCESS &&
220
+ !this.hideQrModalDescription && (h("p", { class: "qrDescription" }, this.qrModalDescription))), h("div", { class: "qrSection" }, this.renderQRSection())))));
221
+ }
222
+ };
223
+ GatacaQR.style = gatacaQrCss;
224
+
225
+ export { GatacaQR as gataca_qr, GatacaQRDisplay as gataca_qrdisplay };
@@ -0,0 +1,172 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-80311733.js';
2
+ import { g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg, l as logoGatacaSvg } from './logo_gataca-57ad0363.js';
3
+ import './qr-code-styling-0eeb38d5.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-05ba6c9f.js';
5
+
6
+ const gatacaQrwsCss = "@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}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:\"Work Sans\", \"Helvetica Neue\", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:\"Work Sans\";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:\"salt\" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}";
7
+
8
+ const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
9
+ const DEFAULT_SESSION_TIMEOUT = 300;
10
+ const QR_ROLE_CONNECT = "connect";
11
+ const FUNCTION_ROLES = {
12
+ connect: "scan",
13
+ certify: "credential",
14
+ };
15
+ const GatacaQRWS = class {
16
+ constructor(hostRef) { registerInstance(this, hostRef); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideBrandTitle = false; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
17
+ disconnectedCallback() {
18
+ this.stop();
19
+ }
20
+ async componentDidLoad() {
21
+ if (this.autostart) {
22
+ await this.display();
23
+ }
24
+ }
25
+ /**
26
+ * Force manually the display of a QR
27
+ */
28
+ async display() {
29
+ let socket = new WebSocket(this.socketEndpoint);
30
+ setTimeout(() => {
31
+ this.socket.close(1000, "");
32
+ }, 1000 * this.sessionTimeout);
33
+ this.socket = socket;
34
+ socket.onopen = () => {
35
+ if (this.wsOnOpen)
36
+ this.wsOnOpen(this.socket);
37
+ };
38
+ socket.onmessage = (msg) => {
39
+ if (this.wsOnMessage) {
40
+ this.wsOnMessage(this.socket, msg);
41
+ }
42
+ else {
43
+ let wsresp = JSON.parse(msg.data);
44
+ if (!!wsresp.sessionId) {
45
+ this.handleWSResponse(wsresp);
46
+ }
47
+ }
48
+ };
49
+ socket.onerror = () => {
50
+ let error = new Error("Error connecting with server");
51
+ this.result = RESULT_STATUS.FAILED;
52
+ this.gatacaLoginFailed.emit(error);
53
+ this.errorCallback(error);
54
+ socket.close(1000, "");
55
+ };
56
+ socket.onclose = () => {
57
+ if (this.result === RESULT_STATUS.ONGOING) {
58
+ this.result = RESULT_STATUS.EXPIRED;
59
+ }
60
+ if (this.result === RESULT_STATUS.EXPIRED) {
61
+ if (this.autorefresh) {
62
+ this.display();
63
+ }
64
+ else {
65
+ let error = new Error("User did not scan the QR in the alloted time");
66
+ this.gatacaLoginFailed.emit(error);
67
+ this.errorCallback(error);
68
+ }
69
+ }
70
+ };
71
+ if (checkMobile() && this.dynamicLink) {
72
+ window.location.href = this.getLink();
73
+ }
74
+ }
75
+ sessionMsgReceived(event) {
76
+ let wsresp = event.detail;
77
+ this.handleWSResponse(wsresp);
78
+ }
79
+ handleWSResponse(wsresp) {
80
+ this.result = wsresp.result;
81
+ switch (wsresp.result) {
82
+ case RESULT_STATUS.ONGOING:
83
+ this.sessionId = wsresp.sessionId;
84
+ this.authenticationRequest = wsresp.authenticationRequest;
85
+ break;
86
+ case RESULT_STATUS.SUCCESS:
87
+ this.sessionData = wsresp.authenticatedUserData;
88
+ this.gatacaLoginCompleted.emit(wsresp.authenticatedUserData);
89
+ this.successCallback(wsresp.authenticatedUserData);
90
+ this.socket.close(1000, "");
91
+ break;
92
+ case RESULT_STATUS.FAILED:
93
+ this.socket.close();
94
+ let error = new Error("Provided user credentials couldn't be validated");
95
+ this.gatacaLoginFailed.emit(error);
96
+ this.errorCallback(error);
97
+ break;
98
+ case RESULT_STATUS.EXPIRED:
99
+ this.socket.close();
100
+ if (this.autorefresh) {
101
+ this.display();
102
+ }
103
+ else {
104
+ let error = new Error("User did not scan the QR in the alloted time");
105
+ this.gatacaLoginFailed.emit(error);
106
+ this.errorCallback(error);
107
+ }
108
+ }
109
+ }
110
+ /**
111
+ * Stop manually an ongoing session
112
+ */
113
+ async stop() {
114
+ this.sessionData = undefined;
115
+ this.sessionId = undefined;
116
+ this.socket.close(1000, "Client stopped the connection");
117
+ }
118
+ /**
119
+ * Retrieve manually the session data on a successful login
120
+ */
121
+ async getSessionData() {
122
+ return this.sessionData
123
+ ? Promise.resolve(this.sessionData)
124
+ : Promise.reject(new Error("No successful login"));
125
+ }
126
+ getLink() {
127
+ if (this.v2 && this.qrRole == QR_ROLE_CONNECT) {
128
+ return this.authenticationRequest;
129
+ }
130
+ let op = FUNCTION_ROLES[this.qrRole];
131
+ let link = "https://gataca.page.link/" + op + "?";
132
+ link +=
133
+ this.qrRole === QR_ROLE_CONNECT
134
+ ? "session=" + this.sessionId
135
+ : "process=" + this.sessionId;
136
+ link +=
137
+ "&callback=" + base64UrlEncode(encodeURIComponent(this.callbackServer));
138
+ link = encodeURIComponent(link);
139
+ return this.dynamicLink ? DEEP_LINK_PREFIX + link : link;
140
+ }
141
+ renderQRSection() {
142
+ switch (this.result) {
143
+ case RESULT_STATUS.NOT_STARTED:
144
+ return this.renderRetryButton();
145
+ case RESULT_STATUS.ONGOING:
146
+ return this.renderQR(this.getLink(), 300, true);
147
+ case RESULT_STATUS.EXPIRED:
148
+ return this.renderRetryButton("QR Code expired");
149
+ case RESULT_STATUS.FAILED:
150
+ return this.renderRetryButton("User credentials not validated");
151
+ case RESULT_STATUS.SUCCESS:
152
+ return this.renderSuccess();
153
+ }
154
+ }
155
+ renderSuccess() {
156
+ return (h("div", { class: "success" }, h("img", { src: gatIconCheckSvg, height: 52, width: 52 }), h("p", { class: "successMsg" }, "Successful Connection!")));
157
+ }
158
+ renderRetryButton(errorMessage) {
159
+ return (h("div", { class: "reload" }, h("div", { id: "notify", onClick: () => this.display() }, h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }), h("p", { class: "qrDescription" }, "Click inside the box to "), errorMessage ? (h("p", { class: "qrDescription bold" }, "Refresh QR Code")) : (h("p", { class: "qrDescription bold" }, "Scan QR Code")), errorMessage && (h("div", { class: "alert" }, h("img", { src: gatIconAlertSvg, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, this.renderQR("waiting to start a session", 250))));
160
+ }
161
+ renderQR(value, size, useLogo) {
162
+ return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0 }));
163
+ }
164
+ render() {
165
+ return (h("div", { class: "popUpContainer" }, h("div", { class: "modal-window is-visible", onClick: (event) => {
166
+ event.stopPropagation();
167
+ } }, h("div", { class: "modal-window__content" }, h("div", { class: "qrTitleContainer" }, h("p", { class: "qrTitle" }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand" }, "by Gataca", " ", h("span", null, h("img", { src: logoGatacaSvg })))), this.result !== RESULT_STATUS.SUCCESS && (h("p", { class: "qrDescription" }, this.qrModalDescription))), h("div", { class: "qrSection" }, this.renderQRSection())))));
168
+ }
169
+ };
170
+ GatacaQRWS.style = gatacaQrwsCss;
171
+
172
+ export { GatacaQRWS as gataca_qrws };
@@ -0,0 +1,124 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-80311733.js';
2
+ import './qr-code-styling-0eeb38d5.js';
3
+
4
+ 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
+ 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=";
7
+ const GatacaSSIButton = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
11
+ this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
12
+ this.buttonText = "Easy login";
13
+ this.checkStatus = undefined;
14
+ this.createSession = undefined;
15
+ this.successCallback = undefined;
16
+ this.errorCallback = undefined;
17
+ this.qrRole = undefined;
18
+ this.callbackServer = undefined;
19
+ this.sessionTimeout = undefined;
20
+ this.pollingFrequency = undefined;
21
+ this.autorefresh = false;
22
+ this.v2 = false;
23
+ this.qrModalTitle = "Quick Access";
24
+ this.modalTitleColor = "#4745B7";
25
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
26
+ this.hideBrandTitle = false;
27
+ this.dynamicLink = true;
28
+ this.logoSize = 0;
29
+ this.logoSrc = undefined;
30
+ this.qrCodeExpiredLabel = "QR Code expired";
31
+ this.credentialsNotValidatedLabel = "User credentials not validated";
32
+ this.clickInsideBoxLabel = "Click inside the box to";
33
+ this.refreshQrLabel = "Refresh QR Code";
34
+ this.scanQrLabel = "Scan QR Code";
35
+ this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time";
36
+ this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
37
+ this.failedLoginErrorLabel = "No successful login";
38
+ this.successLoginLabel = "Successful Connection!";
39
+ this.byBrandLabel = "by Gataca";
40
+ this.waitingStartSessionLabel = "waiting to start a session";
41
+ this.hideQrModalDescription = false;
42
+ this.open = false;
43
+ this.qr = (h("gataca-qr", { 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, v2: this.v2, 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
+ }
45
+ /**
46
+ * Retrieve manually the session data on a successful login
47
+ */
48
+ async getSessionData() {
49
+ return this.qr.getSessionData();
50
+ }
51
+ renderModal() {
52
+ return this.qr;
53
+ }
54
+ renderButton() {
55
+ return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
56
+ this.open = !this.open;
57
+ if (this.open) {
58
+ this.qr.display();
59
+ }
60
+ else {
61
+ this.qr.stop();
62
+ }
63
+ } }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
64
+ }
65
+ render() {
66
+ return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
67
+ }
68
+ };
69
+ GatacaSSIButton.style = gatacaSsibuttonCss;
70
+
71
+ const gatacaSsibuttonwsCss = "@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}";
72
+
73
+ const PHONE_ICON = "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=";
74
+ const GatacaSSIButtonWS = class {
75
+ constructor(hostRef) {
76
+ registerInstance(this, hostRef);
77
+ this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
78
+ this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
79
+ this.buttonText = "Easy login";
80
+ this.successCallback = undefined;
81
+ this.errorCallback = undefined;
82
+ this.qrRole = undefined;
83
+ this.callbackServer = undefined;
84
+ this.socketEndpoint = undefined;
85
+ this.sessionTimeout = undefined;
86
+ this.wsOnOpen = undefined;
87
+ this.wsOnMessage = undefined;
88
+ this.autostart = true;
89
+ this.autorefresh = false;
90
+ this.v2 = false;
91
+ this.qrModalTitle = "Quick Access";
92
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
93
+ this.hideBrandTitle = false;
94
+ this.dynamicLink = true;
95
+ 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, v2: this.v2, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
97
+ }
98
+ /**
99
+ * Retrieve manually the session data on a successful login
100
+ */
101
+ async getSessionData() {
102
+ return this.qr.getSessionData();
103
+ }
104
+ renderModal() {
105
+ return this.qr;
106
+ }
107
+ renderButton() {
108
+ return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
109
+ this.open = !this.open;
110
+ if (this.open) {
111
+ this.qr.display();
112
+ }
113
+ else {
114
+ this.qr.stop();
115
+ }
116
+ } }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
117
+ }
118
+ render() {
119
+ return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
120
+ }
121
+ };
122
+ GatacaSSIButtonWS.style = gatacaSsibuttonwsCss;
123
+
124
+ export { GatacaSSIButton as gataca_ssibutton, GatacaSSIButtonWS as gataca_ssibuttonws };
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["gataca-autoqr_6",[[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]}],[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"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],"getSessionData":[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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"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"],"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]}],[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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]]], options);
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],"v2":[4,"v-2"],"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"],"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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"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],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"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],"getSessionData":[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],"v2":[4,"v-2"],"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);
17
17
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["gataca-autoqr_6",[[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]}],[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"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],"getSessionData":[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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"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"],"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]}],[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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]]], options);
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],"v2":[4,"v-2"],"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"],"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],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"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],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"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],"getSessionData":[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],"v2":[4,"v-2"],"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);
14
14
  });
15
15
  };
16
16