@gataca/qr 4.0.3 → 4.1.1
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 +1 -1
- package/dist/cjs/gataca-qr_3.cjs.entry.js +130 -26
- package/dist/cjs/gataca-qrws.cjs.entry.js +142 -22
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +1 -1
- package/dist/cjs/gatacaqr.cjs.js +2 -2
- package/dist/cjs/{index-1332a8ce.js → index-d8d3dfde.js} +32 -0
- package/dist/cjs/index.cjs.js +6 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/utils-04522aa4.js +117 -0
- package/dist/collection/components/gataca-qr/components/qr/QR.js +9 -1
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +5 -2
- package/dist/collection/components/gataca-qr/gataca-qr.css +6 -0
- package/dist/collection/components/gataca-qr/gataca-qr.js +87 -17
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +28 -4
- package/dist/collection/components/gataca-qrws/components/qr/QR.js +9 -1
- package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +5 -2
- package/dist/collection/components/gataca-qrws/gataca-qrws.css +7 -0
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +126 -18
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +2 -2
- package/dist/collection/utils/utils.js +84 -0
- package/dist/components/gat-icon-check.js +85 -1
- package/dist/components/gataca-qr2.js +106 -20
- package/dist/components/gataca-qrdisplay2.js +25 -4
- package/dist/components/gataca-qrws2.js +145 -21
- package/dist/components/gataca-ssibutton2.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/esm/gataca-autoqr.entry.js +1 -1
- package/dist/esm/gataca-qr_3.entry.js +131 -27
- package/dist/esm/gataca-qrws.entry.js +142 -22
- package/dist/esm/gataca-ssibuttonws.entry.js +1 -1
- package/dist/esm/gatacaqr.js +2 -2
- package/dist/esm/{index-055790a7.js → index-dca2ab22.js} +32 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/utils-cf9db2bd.js +109 -0
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/{p-49cf321c.entry.js → p-2e8accf9.entry.js} +1 -1
- package/dist/gatacaqr/p-3db0f74d.entry.js +1 -0
- package/dist/gatacaqr/p-775c90cf.entry.js +1 -0
- package/dist/gatacaqr/{p-0501e224.js → p-7b6fa63b.js} +1 -1
- package/dist/gatacaqr/p-85af64b1.js +2 -0
- package/dist/gatacaqr/{p-c65f810b.entry.js → p-d27dabe4.entry.js} +1 -1
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +1 -0
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +0 -2
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +5 -2
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +4 -0
- package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +1 -0
- package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +0 -2
- package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +8 -2
- package/dist/types/utils/utils.d.ts +10 -0
- package/package.json +1 -1
- package/dist/cjs/utils-c6edb275.js +0 -28
- package/dist/esm/utils-22df0ce4.js +0 -25
- package/dist/gatacaqr/p-2083dd06.entry.js +0 -1
- package/dist/gatacaqr/p-f5a4f65c.entry.js +0 -1
- package/dist/gatacaqr/p-fccf9d4d.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-dca2ab22.js';
|
|
2
2
|
|
|
3
3
|
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}";
|
|
4
4
|
|
package/dist/esm/gatacaqr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-dca2ab22.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["gataca-qr_3",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"buttonDCAPIText":[1,"button-d-c-a-p-i-text"],"qrType":[1,"qr-type"],"autostart":[4],"checkStatus":[16],"createSession":[16],"fillSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"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"],"enableDcApi":[4,"enable-dc-api"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"qrStyle":[16],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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"],"qrStyle":[16],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"qrType":[1,"qr-type"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"bgColor":[1,"bg-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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-ssibuttonws",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrType":[1,"qr-type"],"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"],"qrType":[1,"qr-type"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["gataca-qr_3",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"buttonDCAPIText":[1,"button-d-c-a-p-i-text"],"qrType":[1,"qr-type"],"autostart":[4],"checkStatus":[16],"createSession":[16],"fillSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"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"],"enableDcApi":[4,"enable-dc-api"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"qrStyle":[16],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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"],"qrStyle":[16],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"qrHref":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"qrType":[1,"qr-type"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"bgColor":[1,"bg-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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],"qrHref":[32],"qrShortenPending":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibuttonws",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrType":[1,"qr-type"],"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"],"qrType":[1,"qr-type"],"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
|
});
|
|
@@ -978,6 +978,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
978
978
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
979
979
|
// check our new property value against our internal value
|
|
980
980
|
const hostRef = getHostRef(ref);
|
|
981
|
+
const elm = hostRef.$hostElement$ ;
|
|
981
982
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
982
983
|
const flags = hostRef.$flags$;
|
|
983
984
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -990,6 +991,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
990
991
|
// set our new value!
|
|
991
992
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
992
993
|
if (instance) {
|
|
994
|
+
// get an array of method names of watch functions to call
|
|
995
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
996
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
997
|
+
if (watchMethods) {
|
|
998
|
+
// this instance is watching for when this property changed
|
|
999
|
+
watchMethods.map((watchMethodName) => {
|
|
1000
|
+
try {
|
|
1001
|
+
// fire off each of the watch methods that are watching this property
|
|
1002
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1003
|
+
}
|
|
1004
|
+
catch (e) {
|
|
1005
|
+
consoleError(e, elm);
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
993
1010
|
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
994
1011
|
// looks like this value actually changed, so we've got work to do!
|
|
995
1012
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -1012,6 +1029,9 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1012
1029
|
*/
|
|
1013
1030
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1014
1031
|
if (cmpMeta.$members$) {
|
|
1032
|
+
if (Cstr.watchers) {
|
|
1033
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1034
|
+
}
|
|
1015
1035
|
// It's better to have a const than two Object.entries()
|
|
1016
1036
|
const members = Object.entries(cmpMeta.$members$);
|
|
1017
1037
|
const prototype = Cstr.prototype;
|
|
@@ -1126,6 +1146,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1126
1146
|
endLoad();
|
|
1127
1147
|
}
|
|
1128
1148
|
if (!Cstr.isProxied) {
|
|
1149
|
+
// we've never proxied this Constructor before
|
|
1150
|
+
// let's add the getters/setters to its prototype before
|
|
1151
|
+
// the first time we create an instance of the implementation
|
|
1152
|
+
{
|
|
1153
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1154
|
+
}
|
|
1129
1155
|
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1130
1156
|
Cstr.isProxied = true;
|
|
1131
1157
|
}
|
|
@@ -1149,6 +1175,9 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1149
1175
|
{
|
|
1150
1176
|
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1151
1177
|
}
|
|
1178
|
+
{
|
|
1179
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1180
|
+
}
|
|
1152
1181
|
endNewInstance();
|
|
1153
1182
|
}
|
|
1154
1183
|
if (Cstr.style) {
|
|
@@ -1267,6 +1296,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1267
1296
|
{
|
|
1268
1297
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1269
1298
|
}
|
|
1299
|
+
{
|
|
1300
|
+
cmpMeta.$watchers$ = {};
|
|
1301
|
+
}
|
|
1270
1302
|
const tagName = cmpMeta.$tagName$;
|
|
1271
1303
|
const HostElement = class extends HTMLElement {
|
|
1272
1304
|
// StencilLazyHost
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { R as RESULT_STATUS, b as base64UrlEncode, c as checkMobile } from './utils-
|
|
1
|
+
export { A as ALLOWED_APP_REDIRECT_PROTOCOLS, R as RESULT_STATUS, d as assignWindowLocationIfAllowed, b as base64UrlEncode, c as checkMobile, i as isAllowedAppRedirect, a as isAllowedNavigationRedirect, s as shortenUrlIfPossible } from './utils-cf9db2bd.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-dca2ab22.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -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-qr_3",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"buttonDCAPIText":[1,"button-d-c-a-p-i-text"],"qrType":[1,"qr-type"],"autostart":[4],"checkStatus":[16],"createSession":[16],"fillSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"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"],"enableDcApi":[4,"enable-dc-api"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"qrStyle":[16],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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"],"qrStyle":[16],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"qrType":[1,"qr-type"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"bgColor":[1,"bg-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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-ssibuttonws",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrType":[1,"qr-type"],"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"],"qrType":[1,"qr-type"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["gataca-qr_3",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"buttonDCAPIText":[1,"button-d-c-a-p-i-text"],"qrType":[1,"qr-type"],"autostart":[4],"checkStatus":[16],"createSession":[16],"fillSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"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"],"enableDcApi":[4,"enable-dc-api"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"qrStyle":[16],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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"],"qrStyle":[16],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"qrHref":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"qrType":[1,"qr-type"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"bgColor":[1,"bg-color"],"rounded":[4]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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],"qrHref":[32],"qrShortenPending":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibuttonws",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrType":[1,"qr-type"],"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"],"qrType":[1,"qr-type"],"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
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
function checkMobile() {
|
|
2
|
+
var check = false;
|
|
3
|
+
(function (a) {
|
|
4
|
+
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
|
|
5
|
+
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)))
|
|
6
|
+
check = true;
|
|
7
|
+
})(navigator.userAgent || navigator.vendor);
|
|
8
|
+
return check;
|
|
9
|
+
}
|
|
10
|
+
function base64UrlEncode(str) {
|
|
11
|
+
let b64 = btoa(str);
|
|
12
|
+
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
|
|
13
|
+
}
|
|
14
|
+
var RESULT_STATUS;
|
|
15
|
+
(function (RESULT_STATUS) {
|
|
16
|
+
RESULT_STATUS[RESULT_STATUS["NOT_STARTED"] = -1] = "NOT_STARTED";
|
|
17
|
+
RESULT_STATUS[RESULT_STATUS["ONGOING"] = 0] = "ONGOING";
|
|
18
|
+
RESULT_STATUS[RESULT_STATUS["SUCCESS"] = 1] = "SUCCESS";
|
|
19
|
+
RESULT_STATUS[RESULT_STATUS["FAILED"] = 2] = "FAILED";
|
|
20
|
+
RESULT_STATUS[RESULT_STATUS["EXPIRED"] = 3] = "EXPIRED";
|
|
21
|
+
RESULT_STATUS[RESULT_STATUS["READ"] = 5] = "READ";
|
|
22
|
+
})(RESULT_STATUS || (RESULT_STATUS = {}));
|
|
23
|
+
const GATACA_SHORTEN_API = 'https://links.gataca.io/api/v1/short';
|
|
24
|
+
/** URL schemes before assigning window.location. */
|
|
25
|
+
const ALLOWED_APP_REDIRECT_PROTOCOLS = [
|
|
26
|
+
'openid-gatc-vp',
|
|
27
|
+
'openid-vp',
|
|
28
|
+
'openid4vp',
|
|
29
|
+
'haip-vp',
|
|
30
|
+
'openid',
|
|
31
|
+
'openid-gatc-credential-offer',
|
|
32
|
+
'haip-vci',
|
|
33
|
+
'openid-credential-offer',
|
|
34
|
+
'digital-credentials'
|
|
35
|
+
];
|
|
36
|
+
const ALLOWED_APP_REDIRECT_PROTOCOL_SET = new Set(ALLOWED_APP_REDIRECT_PROTOCOLS);
|
|
37
|
+
function extractRedirectProtocol(url) {
|
|
38
|
+
var _a;
|
|
39
|
+
if (typeof url !== 'string') {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
const trimmed = url.trim();
|
|
43
|
+
if (!trimmed || /[\u0000-\u001F\u007F\\]/.test(trimmed)) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
const match = /^([a-z][a-z0-9+.-]*):/i.exec(trimmed);
|
|
47
|
+
return (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
48
|
+
}
|
|
49
|
+
function isAllowedAppRedirect(url) {
|
|
50
|
+
const protocol = extractRedirectProtocol(url);
|
|
51
|
+
return !!protocol && ALLOWED_APP_REDIRECT_PROTOCOL_SET.has(protocol);
|
|
52
|
+
}
|
|
53
|
+
function isAllowedNavigationRedirect(url) {
|
|
54
|
+
const protocol = extractRedirectProtocol(url);
|
|
55
|
+
return protocol === 'https' || isAllowedAppRedirect(url);
|
|
56
|
+
}
|
|
57
|
+
function assignWindowLocationIfAllowed(url, allowHttps = false) {
|
|
58
|
+
const allowed = allowHttps ? isAllowedNavigationRedirect(url) : isAllowedAppRedirect(url);
|
|
59
|
+
if (!allowed || typeof url !== 'string') {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
window.location.href = url.trim();
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
function extractShortUrlFromResponse(body) {
|
|
66
|
+
if (!body || typeof body !== 'object') {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const o = body;
|
|
70
|
+
for (const key of ['url', 'shortUrl', 'short_url', 'link']) {
|
|
71
|
+
const v = o[key];
|
|
72
|
+
if (typeof v === 'string' && v.trim() !== '') {
|
|
73
|
+
return v;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* POSTs the link to shortener. On success with a non-empty url in the body, returns that url;
|
|
80
|
+
* otherwise returns the original link.
|
|
81
|
+
*/
|
|
82
|
+
async function shortenUrlIfPossible(link) {
|
|
83
|
+
const trimmedLink = (link === null || link === void 0 ? void 0 : link.trim()) || '';
|
|
84
|
+
const linkHasLength = trimmedLink === null || trimmedLink === void 0 ? void 0 : trimmedLink.length;
|
|
85
|
+
if (!linkHasLength) {
|
|
86
|
+
return link !== null && link !== void 0 ? link : '';
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const res = await fetch(GATACA_SHORTEN_API, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
mode: 'cors',
|
|
92
|
+
credentials: 'omit',
|
|
93
|
+
headers: { 'Content-Type': 'application/json' },
|
|
94
|
+
body: JSON.stringify({ url: trimmedLink })
|
|
95
|
+
});
|
|
96
|
+
if (res.status !== 200 && res.status !== 201) {
|
|
97
|
+
return link;
|
|
98
|
+
}
|
|
99
|
+
const data = await res.json().catch(() => null);
|
|
100
|
+
const short = extractShortUrlFromResponse(data);
|
|
101
|
+
return short !== null && short !== void 0 ? short : link;
|
|
102
|
+
}
|
|
103
|
+
catch (_a) {
|
|
104
|
+
return link;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//
|
|
108
|
+
|
|
109
|
+
export { ALLOWED_APP_REDIRECT_PROTOCOLS as A, RESULT_STATUS as R, isAllowedNavigationRedirect as a, base64UrlEncode as b, checkMobile as c, assignWindowLocationIfAllowed as d, isAllowedAppRedirect as i, shortenUrlIfPossible as s };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-
|
|
1
|
+
import{p as e,b as a}from"./p-85af64b1.js";(()=>{const a=import.meta.url,r={};return""!==a&&(r.resourcesUrl=new URL(".",a).href),e(r)})().then((e=>a([["p-3db0f74d",[[1,"gataca-ssibutton",{buttonText:[1,"button-text"],buttonDCAPIText:[1,"button-d-c-a-p-i-text"],qrType:[1,"qr-type"],autostart:[4],checkStatus:[16],createSession:[16],fillSession:[16],successCallback:[16],errorCallback:[16],handleCheckAppLoading:[16],checkAppTimeout:[2,"check-app-timeout"],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"],enableDcApi:[4,"enable-dc-api"],hideQrModalDescription:[4,"hide-qr-modal-description"],qrStyle:[16],open:[32],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],getSessionData:[64],startMobilePolling:[64],stop:[64]}],[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],qrType:[1,"qr-type"],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"],qrStyle:[16],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],qrHref:[32],display:[64],stop:[64],getSessionData:[64]}],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],qrType:[1,"qr-type"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],bgColor:[1,"bg-color"],rounded:[4]}]]],["p-775c90cf",[[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],qrType:[1,"qr-type"],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],qrHref:[32],qrShortenPending:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["p-2e8accf9",[[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrType:[1,"qr-type"],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]}]]],["p-d27dabe4",[[1,"gataca-autoqr",{configId:[1,"config-id"],qrType:[1,"qr-type"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as RESULT_STATUS,b as base64UrlEncode,c as checkMobile}from"./p-
|
|
1
|
+
export{A as ALLOWED_APP_REDIRECT_PROTOCOLS,R as RESULT_STATUS,d as assignWindowLocationIfAllowed,b as base64UrlEncode,c as checkMobile,i as isAllowedAppRedirect,a as isAllowedNavigationRedirect,s as shortenUrlIfPossible}from"./p-7b6fa63b.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as a,h as i}from"./p-
|
|
1
|
+
import{r as t,c as a,h as i}from"./p-85af64b1.js";const e=class{constructor(e){t(this,e),this.gatacaLoginCompleted=a(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=a(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.successCallback=void 0,this.errorCallback=void 0,this.qrType="svg",this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.open=!1,this.qr=i("gataca-qrws",{wsOnMessage:this.wsOnMessage,wsOnOpen:this.wsOnOpen,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,qrType:this.qrType,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,socketEndpoint:this.socketEndpoint,autostart:!0,autorefresh:this.autorefresh,v:this.v,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return i("div",{class:"gatacaButtonWrapper"},i("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},i("img",{src:"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=",class:"buttonImg",alt:this.buttonText}),i("span",null,this.buttonText)))}render(){return i("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};e.style='@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}';export{e as gataca_ssibuttonws}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,c as e}from"./p-85af64b1.js";import{l as s,Q as a,g as n,a as o}from"./p-29119208.js";import{R as r,c as l,d,b as h,s as c}from"./p-7b6fa63b.js";const p=class{constructor(i){t(this,i),this.qrData=void 0,this.qrType="svg",this.size=256,this.logoSize=0,this.logoSrc=void 0,this.qrColor="#1E1E20",this.bgColor="#FFFFFF",this.rounded=!0}getQrOptions(){return{data:this.qrData,width:this.size,height:this.size,image:this.logoSize>0?this.logoSrc||s:void 0,margin:10,type:this.qrType,dotsOptions:{color:this.qrColor,type:this.rounded?"dots":"square"},cornersSquareOptions:{type:this.rounded?"extra-rounded":"square"},cornersDotOptions:{type:this.rounded?"dot":"square"},imageOptions:{margin:2,imageSize:this.logoSize},backgroundOptions:{color:this.bgColor}}}componentDidLoad(){this.mountOrUpdateQr()}onQrDataChange(){this.mountOrUpdateQr()}mountOrUpdateQr(){var t;(null===(t=this.qrData)||void 0===t?void 0:t.trim())&&this.qr&&(this.qrCode?this.qrCode.update({data:this.qrData}):(this.qrCode=new a(this.getQrOptions()),this.qrCode.append(this.qr)))}render(){return i("div",{ref:t=>{this.qr=t}})}static get watchers(){return{qrData:["onQrDataChange"]}}},u=t=>{const{value:e,useLogo:s,logoSrc:a,size:n,qrType:o,style:r,linkReady:l=!0}=t,d=null!=n?n:256;return l?i("gataca-qrdisplay",{qrData:e,rounded:!0,qrType:o,size:n,"logo-size":s?.33:0,"logo-src":a,qrColor:null==r?void 0:r.color,bgColor:null==r?void 0:r.bgColor}):i("div",{class:"qr-loading-slot",style:{width:d+"px",height:d+"px",margin:"0 auto"}})},g=t=>{const{color:e="#4745B7"}=t;return i("div",{class:"containerLoader",style:{"--loader-color":e}},i("div",{class:"loader"},i("div",{class:"loader__item loader__item__1"}),i("div",{class:"loader__item loader__item__2"}),i("div",{class:"loader__item loader__item__3"}),i("div",{class:"loader__item loader__item__4"}),i("div",{class:"loader__item loader__item__5"}),i("div",{class:"loader__item loader__item__6"}),i("div",{class:"loader__item loader__item__7"}),i("div",{class:"loader__item loader__item__8"})))},m=t=>{var e;const{modalWidth:s,readQrMessages:a,renderQR:n,url:o,sizeQR:r,style:l}=t,d={backgroundColor:(null==l?void 0:l.bgColor)?null==l?void 0:l.bgColor:"white"},h={color:(null==l?void 0:l.color)?null==l?void 0:l.color:"#707074"};return i("div",{class:"blured",style:{width:(s-48).toString()+"px",height:s?(null===(e=s-48)||void 0===e?void 0:e.toString())+"px":"",backgroundColor:null==l?void 0:l.bgColor,color:null==l?void 0:l.color,border:(null==l?void 0:l.color)?`1px dashed ${null==l?void 0:l.color}`:"1px dashed #a1a1a1"}},i("div",{id:"notify",style:d},i(g,{color:null==l?void 0:l.color}),i("p",{class:"notify-text",style:h},null==a?void 0:a.title," "),i("p",{class:"notify-text bold",style:h},null==a?void 0:a.description)),i("div",{id:"qrwait"},n(o,!1,r)))},b=t=>{const{height:e=24,width:s=24,color:a}=t,n=a||"#8B8B8B";return i("svg",{width:s,height:e,viewBox:`0 0 ${s} ${e}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M23 4V10H17",stroke:n,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M20.4899 15C19.8399 16.8399 18.6094 18.4187 16.984 19.4985C15.3586 20.5783 13.4263 21.1006 11.4783 20.9866C9.53026 20.8726 7.67203 20.1286 6.18363 18.8667C4.69524 17.6047 3.6573 15.8932 3.22625 13.9901C2.79519 12.0869 2.99436 10.0952 3.79374 8.31508C4.59313 6.53496 5.94942 5.06288 7.65823 4.12065C9.36705 3.17843 11.3358 2.81711 13.2678 3.09116C15.1999 3.3652 16.9905 4.25975 18.3699 5.64001L22.9999 10",stroke:n,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},v=t=>{var e;const{errorMessage:s,modalWidth:a,clickInsideBoxLabel:o,refreshQrLabel:r,scanQrLabel:l,style:d,display:h}=t,c={backgroundColor:(null==d?void 0:d.bgColor)?null==d?void 0:d.bgColor:"white"},p={backgroundColor:(null==d?void 0:d.alertBgColor)?null==d?void 0:d.alertBgColor:"#ffdedf"},u={borderColor:(null==d?void 0:d.alertBorderColor)?null==d?void 0:d.alertBorderColor:"#ee888c"},g={color:(null==d?void 0:d.color)?null==d?void 0:d.color:"#707074"};return i("div",{class:"reload",style:{width:(a-48).toString()+"px",height:a?(null===(e=a-48)||void 0===e?void 0:e.toString())+"px":"",border:(null==d?void 0:d.color)?`1px dashed ${null==d?void 0:d.color}`:"1px dashed #a1a1a1"}},i("div",{id:"notify",onClick:()=>h(),style:c},i(b,{color:null==d?void 0:d.color,height:24,width:24}),i("p",{class:"notify-text",style:g},o," "),i("p",{class:"notify-text bold",style:g},s?r:l),s&&i("div",{class:"alert",style:Object.assign(Object.assign({width:(a-48).toString()+"px"},p),{border:`1px solid ${u}`})},i("img",{src:n,height:24,width:24}),i("p",{style:{color:(null==d?void 0:d.color)?null==d?void 0:d.color:"#1e1e20"}},s))),i("div",{id:"qrwait",class:"qr-placeholder-slot",style:{width:(a-48).toString()+"px",height:a?(a-48).toString()+"px":""}}))},x=t=>{const{modalHeight:e,successLoginLabel:s,style:a}=t,n={color:(null==a?void 0:a.color)?null==a?void 0:a.color:"#1e1e20"};return i("div",{class:"success",style:{height:e?(null==e?void 0:e.toString())+"px":"300px"}},i("img",{src:o,height:52,width:52}),i("p",{class:"successMsg",style:n},s))},f=class{constructor(i){t(this,i),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.lastShortenRaw=null,this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.qrType="svg",this.callbackServer=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",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=!1,this.hideModalBoxShadow=!1,this.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=s,this.qrSize=300,this.modalWidth=300,this.modalHeight=void 0,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.readQrTitle="Processing...",this.readQrDescription="Please wait a moment",this.hideQrModalDescription=!1,this.sessionTimeout=300,this.pollingFrequency=3,this.dynamicLink=!0,this.qrStyle=void 0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED,this.qrHref=""}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){await this.getSessionId(),await this.refreshQrHref(),this.result=r.ONGOING,this.poll().then((t=>{this.result=r.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===r.EXPIRED;if(i&&this.autorefresh)this.display();else if(t!==r.NOT_STARTED){let e=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}})),l()&&this.dynamicLink&&d(this.getLink(),!0)}buildRawLink(){var t;return"2"===this.v?null!==(t=this.authenticationRequest)&&void 0!==t?t:"":"https://api.gataca.io/qr/redirect.html?dl="+h(this.authenticationRequest)}async refreshQrHref(){var t;const i=this.buildRawLink();if(i===this.lastShortenRaw)return;this.lastShortenRaw=i;const e=await c(null!=i?i:""),s=this.buildRawLink();s===i?this.qrHref=e:(null===(t=this.qrHref)||void 0===t?void 0:t.trim())||(this.qrHref=s)}async stop(){this.clean(),(this.result===r.ONGOING||r.READ)&&(this.result=r.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0,this.qrHref="",this.lastShortenRaw=null}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error(this.failedLoginErrorLabel))}async getSessionId(){if(this.sessionId)return this.sessionId;let{sessionId:t,authenticationRequest:i}=await this.createSession();return this.sessionId=t,this.authenticationRequest=i,this.sessionId}getLink(){return this.qrHref||this.buildRawLink()}async poll(){let t=(new Date).getTime()+1e3*(this.sessionTimeout||300),i=1e3*(this.pollingFrequency||3),e=this,s=async function(a,n){let{result:o,data:l}=await(async t=>{if(t.result===r.NOT_STARTED)return{result:r.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(e);switch(o){case r.SUCCESS:a(l);break;case r.READ:e.result=r.READ;case r.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(s,i,a,n):n(r.EXPIRED);break;default:n(o)}};return new Promise(s)}renderQRSection(){var t;switch(this.result){case r.NOT_STARTED:return this.renderRetryButton();case r.ONGOING:return this.renderQR(this.getLink(),!0,void 0,!!(null===(t=this.qrHref)||void 0===t?void 0:t.trim()));case r.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case r.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case r.SUCCESS:return this.renderSuccess();case r.READ:return this.renderReadQR({title:null==this?void 0:this.readQrTitle,description:null==this?void 0:this.readQrDescription})}}renderSuccess(){return i(x,{modalHeight:null==this?void 0:this.modalHeight,successLoginLabel:null==this?void 0:this.successLoginLabel,style:null==this?void 0:this.qrStyle})}renderRetryButton(t){return i(v,{errorMessage:t,modalWidth:null==this?void 0:this.modalWidth,clickInsideBoxLabel:null==this?void 0:this.clickInsideBoxLabel,refreshQrLabel:null==this?void 0:this.refreshQrLabel,scanQrLabel:null==this?void 0:this.scanQrLabel,display:this.display.bind(this),style:null==this?void 0:this.qrStyle})}renderReadQR(t){var e;const s=!!(null===(e=this.qrHref)||void 0===e?void 0:e.trim());return i(m,{modalWidth:null==this?void 0:this.modalWidth,readQrMessages:t,url:this.getLink(),sizeQR:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,renderQR:(t,i,e)=>this.renderQR(t,i,e,s),style:this.qrStyle})}renderQR(t,e,s,a=!0){return i(u,{value:t,qrType:this.qrType,useLogo:e&&0!==this.logoSize,size:s||(null==this?void 0:this.qrSize)||void 0,logoSrc:null==this?void 0:this.logoSrc,style:null==this?void 0:this.qrStyle,linkReady:a})}render(){var t,e,a,n,o,l;return i("div",{class:"popUpContainer"},i("div",{class:`is-visible modal-window ${this.hideModalTexts?"":"large-modal"} ${this.hideModalBoxShadow?"noBoxShadow":""}`,style:{width:(this.modalWidth-2).toString()+"px",height:this.modalHeight?(null===(t=this.modalHeight-2)||void 0===t?void 0:t.toString())+"px":"",backgroundColor:(null===(e=null==this?void 0:this.qrStyle)||void 0===e?void 0:e.bgColor)?null===(a=null==this?void 0:this.qrStyle)||void 0===a?void 0:a.bgColor:"white",boxShadow:(null===(n=null==this?void 0:this.qrStyle)||void 0===n?void 0:n.boxShadow)?null===(o=null==this?void 0:this.qrStyle)||void 0===o?void 0:o.boxShadow:"0px 3px 10px rgba(48, 48, 48, 0.1);"},onClick:t=>{t.stopPropagation()}},i("div",{class:"modal-window__content"},i("div",{class:"qrTitleContainer "+(this.hideModalTexts?"hidenText":"")},i("p",{class:"qrTitle modalText",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&i("p",{class:"qrBrand modalText"},this.byBrandLabel," ",i("span",null,i("img",{src:s}))),this.result!==r.SUCCESS&&!this.hideQrModalDescription&&i("p",{class:"qrDescription modalText"},this.qrModalDescription)),i("div",{class:"qrSection",style:{width:this.modalWidth.toString()+"px",height:this.modalWidth?(null===(l=this.modalWidth)||void 0===l?void 0:l.toString())+"px":""}},this.renderQRSection()))))}};f.style='@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=Poppins: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 .modalText{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}.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-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.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 .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.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}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:20px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}.qr-placeholder-slot{box-sizing:border-box;border-radius:12px;background:rgba(0, 0, 0, 0.04)}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>svg{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background-color:var(--loader-color, #4745B7);border-radius:2px;--to-opacity:1;opacity:var(--to-opacity)}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);--to-opacity:calc(1 - (0 / 8));animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);--to-opacity:calc(1 - (1 / 8));animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);--to-opacity:calc(1 - (2 / 8));animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);--to-opacity:calc(1 - (3 / 8));animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);--to-opacity:calc(1 - (4 / 8));animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);--to-opacity:calc(1 - (5 / 8));animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);--to-opacity:calc(1 - (6 / 8));animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);--to-opacity:calc(1 - (7 / 8));animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{opacity:1}100%{opacity:var(--to-opacity)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}';const w="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=",y=class{constructor(s){t(this,s),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.gatacaButtonPushed=e(this,"gatacaButtonPushed",7),this.getRequestFromUri=async t=>{const i=new URL(t).searchParams.get("request_uri");if(i){const t=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json"}}),e=(await t.json()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(e);let a=JSON.parse(s);return a.response_mode="dc_api",a}},this.buttonText="Easy login",this.buttonDCAPIText="Login with Device Credentials",this.qrType="svg",this.autostart=!0,this.checkStatus=void 0,this.createSession=void 0,this.fillSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.handleCheckAppLoading=void 0,this.checkAppTimeout=6,this.qrRole=void 0,this.callbackServer=void 0,this.sessionTimeout=void 0,this.pollingFrequency=void 0,this.autorefresh=!1,this.v="3",this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.logoSize=0,this.logoSrc=void 0,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.enableDcApi=!1,this.hideQrModalDescription=!1,this.qrStyle=void 0,this.open=!1,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED,this.qr=i("gataca-qr",{ref:t=>this.qrElement=t,checkStatus:this.checkStatus,createSession:this.createSession,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,qrType:this.qrType,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,pollingFrequency:this.pollingFrequency,autostart:this.autostart,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,qrStyle:this.qrStyle})}supportsDCAPI(){if(!this.enableDcApi)return!1;if(void 0===window.DigitalCredential)return!1;const t=["org-iso-mdoc","openid4vp","openid4vci"],i=t.filter(window.DigitalCredential.userAgentAllowsProtocol);return console.log(i,t),!0}async getSessionData(){return this.qr.getSessionData()}async getSessionId(){if(this.sessionId)return this.sessionId;let{sessionId:t,authenticationRequest:i}=await this.createSession();return this.sessionId=t,this.authenticationRequest=i,this.sessionId}async startMobilePolling(){await this.getSessionId(),this.result=r.ONGOING,this.poll().then((t=>{this.result=r.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===r.EXPIRED;if(i&&this.autorefresh)this.startMobilePolling();else if(t!==r.NOT_STARTED){let e=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}}))}async stop(){this.clean(),(this.result===r.ONGOING||r.READ)&&(this.result=r.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0}renderModal(){return this.qr}async poll(){let t=(new Date).getTime()+1e3*(this.sessionTimeout||300),i=1e3*(this.pollingFrequency||3),e=this,s=async function(a,n){let{result:o,data:l}=await(async t=>{if(t.result===r.NOT_STARTED)return{result:r.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(e);switch(o){case r.SUCCESS:a(l);break;case r.READ:e.result=r.READ;case r.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(s,i,a,n):n(r.EXPIRED);break;default:n(o)}};return new Promise(s)}isAppInstalled(t,i){let e,s=!1;(null==t?void 0:t.length)&&d(t,!0),e=setTimeout((()=>{s||i(!1),n()}),1e3*this.checkAppTimeout);const a=()=>{document.hidden&&(s=!0,i(!0),this.autostart||this.startMobilePolling(),n())};function n(){clearTimeout(e),document.removeEventListener("visibilitychange",a)}document.addEventListener("visibilitychange",a)}renderDesktopButton(){return i("div",{class:"gatacaButtonWrapper"},i("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,setTimeout((()=>{var t,i;this.open?null===(t=this.qrElement)||void 0===t||t.display():null===(i=this.qrElement)||void 0===i||i.stop()}),0)}},i("img",{src:w,class:"buttonImg",alt:this.buttonText}),i("span",null,this.buttonText)))}async getAuthRequest(){let{authenticationRequest:t}=await this.createSession();return t}renderMobileButton(t,e){this.autostart&&!this.supportsDCAPI()&&this.startMobilePolling();let s=!1;const a=t=>{s=t,this.handleCheckAppLoading&&this.handleCheckAppLoading(t)},n=async()=>{a(!0);try{const i=await this.getAuthRequest();this.isAppInstalled(i,(i=>{i||(this.stop(),t?window.location.href="https://play.google.com/store/apps/details?id=com.gataca.identity":e&&(window.location.href="https://apps.apple.com/us/app/gataca/id1498607616")),a(!1)}))}catch(t){this.stop(),a(!1)}};return i("div",{class:"gatacaButtonWrapper"},i("button",{class:"gatacaButton",onClick:()=>{this.gatacaButtonPushed.emit(),n()},disabled:s},i("img",{src:w,class:"buttonImg",alt:this.buttonText}),i("span",null,this.buttonText)))}renderDCAPIButton(t,e){let s=!1;console.log("Maybe act different",t,e);const a=t=>{s=t,this.handleCheckAppLoading&&this.handleCheckAppLoading(t)},n=async()=>{a(!0);try{const t=await this.getAuthRequest();let i=await this.getRequestFromUri(t),e=await navigator.credentials.get({digital:{requests:[{protocol:"openid4vp-v1-unsigned",data:i}]}});"DigitalCredential"==e.constructor.name&&console.log("Digital Credential - Response Data: "+e),await this.fillSession(i,null==e?void 0:e.data)}catch(t){this.stop(),a(!1)}};return i("div",{class:"gatacaButtonWrapper"},i("button",{class:"gatacaButton",onClick:()=>{this.gatacaButtonPushed.emit(),n()},disabled:s},i("img",{src:w,class:"buttonImg",alt:this.buttonDCAPIText}),i("span",null,this.buttonDCAPIText)))}render(){const t=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||(null===navigator||void 0===navigator?void 0:navigator.vendor)||(null===window||void 0===window?void 0:window.opera),e=/android/i.test(t),s=/iPad|iPhone|iPod/.test(t)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=e||s,n=this.supportsDCAPI();return i("div",null,i("div",{class:"buttonContainer"},a&&"3"===this.v?this.renderMobileButton(e,s):this.renderDesktopButton(),this.open&&(!a||"3"===this.v)&&this.renderModal()),n&&i("div",{class:"buttonContainer"},this.renderDCAPIButton(e,s)))}};y.style='@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}';export{f as gataca_qr,p as gataca_qrdisplay,y as gataca_ssibutton}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as i,r as t,c as e}from"./p-85af64b1.js";import{a as n,g as s,l as a}from"./p-29119208.js";import{R as o,c as r,d as l,b as d,s as h}from"./p-7b6fa63b.js";const p=t=>{const{modalHeight:e,successLoginLabel:s}=t;return i("div",{class:"success",style:{height:e?(null==e?void 0:e.toString())+"px":"300px"}},i("img",{src:n,height:52,width:52}),i("p",{class:"successMsg"},s))},c=t=>{var e;const{errorMessage:n,modalWidth:a,clickInsideBoxLabel:o,refreshQrLabel:r,scanQrLabel:l,display:d}=t;return i("div",{class:"reload",style:{width:(a-48).toString()+"px",height:a?(null===(e=a-48)||void 0===e?void 0:e.toString())+"px":""}},i("div",{id:"notify",onClick:()=>d()},i("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",height:24,width:24}),i("p",{class:"notify-text"},o," "),i("p",{class:"notify-text bold"},n?r:l),n&&i("div",{class:"alert",style:{width:(a-48).toString()+"px"}},i("img",{src:s,height:24,width:24}),i("p",null,n))),i("div",{id:"qrwait",class:"qr-placeholder-slot",style:{width:(a-48).toString()+"px",height:a?(a-48).toString()+"px":""}}))},g=t=>{const{value:e,useLogo:n,logoSrc:s,size:a,qrType:o,linkReady:r=!0}=t,l=null!=a?a:256;return r?i("gataca-qrdisplay",{qrData:e,rounded:!0,size:a,qrType:o,"logo-size":n?.33:0,"logo-src":s}):i("div",{class:"qr-loading-slot",style:{width:l+"px",height:l+"px",margin:"0 auto"}})},m=()=>i("div",{class:"containerLoader"},i("div",{class:"loader"},i("div",{class:"loader__item loader__item__1"}),i("div",{class:"loader__item loader__item__2"}),i("div",{class:"loader__item loader__item__3"}),i("div",{class:"loader__item loader__item__4"}),i("div",{class:"loader__item loader__item__5"}),i("div",{class:"loader__item loader__item__6"}),i("div",{class:"loader__item loader__item__7"}),i("div",{class:"loader__item loader__item__8"}))),x=t=>{var e;const{modalWidth:n,readQrMessages:s,renderQR:a,url:o,sizeQR:r}=t;return i("div",{class:"blured",style:{width:(n-48).toString()+"px",height:n?(null===(e=n-48)||void 0===e?void 0:e.toString())+"px":""}},i("div",{id:"notify"},i(m,null),i("p",{class:"notify-text"},null==s?void 0:s.title," "),i("p",{class:"notify-text bold"},null==s?void 0:s.description)),i("div",{id:"qrwait"},a(o,!1,r)))},u=class{constructor(i){t(this,i),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.qrRefreshGeneration=0,this.lastShortenRaw=null,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.qrType="svg",this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=300,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v="3",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=!1,this.hideModalBoxShadow=!1,this.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=a,this.qrSize=300,this.modalWidth=300,this.modalHeight=void 0,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.readQrTitle="Processing...",this.readQrDescription="Please wait a moment",this.hideQrModalDescription=!1,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=o.NOT_STARTED,this.qrHref="",this.qrShortenPending=!1}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){this.qrHref="",this.qrShortenPending=!1,this.lastShortenRaw=null,this.qrRefreshGeneration++;let i=new WebSocket(this.socketEndpoint);setTimeout((()=>{this.socket.close(1e3,"")}),1e3*this.sessionTimeout),this.socket=i,i.onopen=()=>{this.wsOnOpen&&this.wsOnOpen(this.socket)},i.onmessage=i=>{if(this.wsOnMessage)this.wsOnMessage(this.socket,i);else{let t=JSON.parse(i.data);t.sessionId&&this.handleWSResponse(t)}},i.onerror=()=>{let t=new Error("Error connecting with server");this.result=o.FAILED,this.gatacaLoginFailed.emit(t),this.errorCallback(t),i.close(1e3,"")},i.onclose=()=>{if((this.result===o.ONGOING||o.READ)&&(this.result=o.EXPIRED),this.result===o.EXPIRED)if(this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}},r()&&this.dynamicLink&&l(this.getLink(),!0)}sessionMsgReceived(i){this.handleWSResponse(i.detail)}handleWSResponse(i){switch(this.result=i.result,i.result){case o.ONGOING:case o.READ:{this.sessionId=i.sessionId,this.authenticationRequest=i.authenticationRequest;const t=this.buildRawLink();(null==t?void 0:t.trim())&&(this.qrShortenPending=!0,this.refreshQrHref());break}case o.SUCCESS:this.sessionData=i.authenticatedUserData,this.gatacaLoginCompleted.emit(i.authenticatedUserData),this.successCallback(i.authenticatedUserData),this.socket.close(1e3,"");break;case o.FAILED:this.socket.close();let t=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(t),this.errorCallback(t);break;case o.EXPIRED:if(this.socket.close(),this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}}}async stop(){this.sessionData=void 0,this.sessionId=void 0,this.qrHref="",this.qrShortenPending=!1,this.lastShortenRaw=null,this.socket.close(1e3,"Client stopped the connection")}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error("No successful login"))}buildRawLink(){var i;return"2"===this.v&&"connect"==this.qrRole?null!==(i=this.authenticationRequest)&&void 0!==i?i:"":"https://api.gataca.io/qr/redirect.html?dl="+d(this.authenticationRequest)}async refreshQrHref(){var i,t,e;const n=this.buildRawLink();if(!(null==n?void 0:n.trim()))return void(this.qrShortenPending=!1);if(n===this.lastShortenRaw&&(null===(i=this.qrHref)||void 0===i?void 0:i.trim()))return void(this.qrShortenPending=!1);if(this.qrShortenPending&&n===this.lastShortenRaw&&!(null===(t=this.qrHref)||void 0===t?void 0:t.trim()))return;const s=++this.qrRefreshGeneration;this.lastShortenRaw=n;try{const i=await h(n),t=this.buildRawLink();t===n?this.qrHref=i:(null===(e=this.qrHref)||void 0===e?void 0:e.trim())||(this.qrHref=t)}finally{s===this.qrRefreshGeneration&&(this.qrShortenPending=!1)}}getLink(){return this.qrHref||this.buildRawLink()}renderQRSection(){var i,t,e;switch(this.result){case o.NOT_STARTED:return this.renderRetryButton();case o.ONGOING:return this.qrShortenPending||!(null===(i=this.qrHref)||void 0===i?void 0:i.trim())?this.renderQrLoadingSlot():this.renderQR(this.getLink(),!0,void 0,!!(null===(t=this.qrHref)||void 0===t?void 0:t.trim()));case o.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case o.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case o.SUCCESS:return this.renderSuccess();case o.READ:return this.qrShortenPending||!(null===(e=this.qrHref)||void 0===e?void 0:e.trim())?this.renderQrLoadingSlot():this.renderReadQR({title:null==this?void 0:this.readQrTitle,description:null==this?void 0:this.readQrDescription})}}renderSuccess(){return i(p,{modalHeight:null==this?void 0:this.modalHeight,successLoginLabel:null==this?void 0:this.successLoginLabel})}renderRetryButton(t){return i(c,{errorMessage:t,modalWidth:null==this?void 0:this.modalWidth,clickInsideBoxLabel:null==this?void 0:this.clickInsideBoxLabel,refreshQrLabel:null==this?void 0:this.refreshQrLabel,scanQrLabel:null==this?void 0:this.scanQrLabel,display:this.display.bind(this)})}renderReadQR(t){var e;const n=!!(null===(e=this.qrHref)||void 0===e?void 0:e.trim());return i(x,{modalWidth:null==this?void 0:this.modalWidth,readQrMessages:t,url:this.getLink(),sizeQR:(null==this?void 0:this.qrSize)?(null==this?void 0:this.qrSize)-50:void 0,renderQR:(i,t,e)=>this.renderQR(i,t,e,n)})}renderQR(t,e,n,s=!0){return i(g,{value:t,qrType:this.qrType,useLogo:e&&0!==this.logoSize,size:n||(null==this?void 0:this.qrSize)||void 0,logoSrc:null==this?void 0:this.logoSrc,linkReady:s})}renderQrLoadingSlot(){const t=this.qrSize||300;return i("div",{class:"qr-loading-slot",style:{width:t+"px",height:t+"px",margin:"0 auto"}})}render(){var t,e;return i("div",{class:"popUpContainer"},i("div",{class:`is-visible modal-window ${this.hideModalTexts?"":"large-modal"} ${this.hideModalBoxShadow?"noBoxShadow":""}`,style:{width:(this.modalWidth-2).toString()+"px",height:this.modalHeight?(null===(t=this.modalHeight-2)||void 0===t?void 0:t.toString())+"px":""},onClick:i=>{i.stopPropagation()}},i("div",{class:"modal-window__content"},i("div",{class:"qrTitleContainer "+(this.hideModalTexts?"hidenText":"")},i("p",{class:"qrTitle modalText",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&i("p",{class:"qrBrand modalText"},this.byBrandLabel," ",i("span",null,i("img",{src:a}))),this.result!==o.SUCCESS&&!this.hideQrModalDescription&&i("p",{class:"qrDescription modalText"},this.qrModalDescription)),i("div",{class:"qrSection",style:{width:this.modalWidth.toString()+"px",height:this.modalWidth?(null===(e=this.modalWidth)||void 0===e?void 0:e.toString())+"px":""}},this.renderQRSection()))))}};u.style='@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=Poppins: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 .modalText{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}.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-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.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 .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.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}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}.qr-placeholder-slot,.qr-loading-slot{box-sizing:border-box;border-radius:12px;background:rgba(0, 0, 0, 0.04)}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:"Poppins", "Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}';export{u as gataca_qrws}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function i(){var i,
|
|
1
|
+
function i(){var i,t=!1;return i=navigator.userAgent||navigator.vendor,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(i)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(i.substr(0,4)))&&(t=!0),t}function t(i){return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=+$/,"")}var o;!function(i){i[i.NOT_STARTED=-1]="NOT_STARTED",i[i.ONGOING=0]="ONGOING",i[i.SUCCESS=1]="SUCCESS",i[i.FAILED=2]="FAILED",i[i.EXPIRED=3]="EXPIRED",i[i.READ=5]="READ"}(o||(o={}));const n=["openid-gatc-vp","openid-vp","openid4vp","haip-vp","openid","openid-gatc-credential-offer","haip-vci","openid-credential-offer","digital-credentials"],a=new Set(n);function e(i){var t;if("string"!=typeof i)return;const o=i.trim();if(!o||/[\u0000-\u001F\u007F\\]/.test(o))return;const n=/^([a-z][a-z0-9+.-]*):/i.exec(o);return null===(t=null==n?void 0:n[1])||void 0===t?void 0:t.toLowerCase()}function r(i){const t=e(i);return!!t&&a.has(t)}function c(i){return"https"===e(i)||r(i)}function s(i,t=!1){return!(!(t?c(i):r(i))||"string"!=typeof i||(window.location.href=i.trim(),0))}async function l(i){const t=(null==i?void 0:i.trim())||"";if(!(null==t?void 0:t.length))return null!=i?i:"";try{const o=await fetch("https://links.gataca.io/api/v1/short",{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t})});if(200!==o.status&&201!==o.status)return i;const n=function(i){if(!i||"object"!=typeof i)return null;const t=i;for(const i of["url","shortUrl","short_url","link"]){const o=t[i];if("string"==typeof o&&""!==o.trim())return o}return null}(await o.json().catch((()=>null)));return null!=n?n:i}catch(t){return i}}export{n as A,o as R,c as a,t as b,i as c,s as d,r as i,l as s}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let t,e,n=!1,l=!1;const s={},o=t=>"object"==(t=typeof t)||"function"===t,c=(t,e,...n)=>{let l=null,s=!1,c=!1;const i=[],a=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!o(l))&&(l+=""),s&&c?i[i.length-1].t+=l:i.push(s?r(null,l):l),c=s)};if(a(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}if("function"==typeof t)return t(null===e?{}:e,i,u);const f=r(t,null);return f.l=e,i.length>0&&(f.o=i),f},r=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),i={},u={forEach:(t,e)=>t.map(a).forEach(e),map:(t,e)=>t.map(a).map(e).map(f)},a=t=>({vattrs:t.l,vchildren:t.o,vkey:t.p,vname:t.m,vtag:t.u,vtext:t.t}),f=t=>{if("function"==typeof t.vtag){const e=Object.assign({},t.vattrs);return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),c(t.vtag,e,...t.vchildren||[])}const e=r(t.vtag,t.vtext);return e.l=t.vattrs,e.o=t.vchildren,e.p=t.vkey,e.m=t.vname,e},h=(t,e,n)=>{const l=(t=>V(t).$)(t);return{emit:t=>y(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},y=(t,e,n)=>{const l=Y.ce(e,n);return t.dispatchEvent(l),l},d=new WeakMap,p=t=>"sc-"+t.g,m=(t,e,n,l,s,c)=>{if(n!==l){let r=B(t,e),i=e.toLowerCase();if("class"===e){const e=t.classList,s=b(n),o=b(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("ref"===e)l&&l(t);else if(r||"o"!==e[0]||"n"!==e[1]){const i=o(l);if((r||i&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&c||s)&&!i&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):B(Q,i)?i.slice(2):i[2]+e.slice(3),n&&Y.rel(t,e,n,!1),l&&Y.ael(t,e,l,!1)}},$=/\s/,b=t=>t?t.split($):[],w=(t,e,n,l)=>{const o=11===e.h.nodeType&&e.h.host?e.h.host:e.h,c=t&&t.l||s,r=e.l||s;for(l in c)l in r||m(o,l,c[l],void 0,n,e.i);for(l in r)m(o,l,c[l],r[l],n,e.i)},g=(e,l,s)=>{const o=l.o[s];let c,r,i=0;if(null!==o.t)c=o.h=X.createTextNode(o.t);else{if(n||(n="svg"===o.u),c=o.h=X.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.u),n&&"foreignObject"===o.u&&(n=!1),w(null,o,n),null!=t&&c["s-si"]!==t&&c.classList.add(c["s-si"]=t),o.o)for(i=0;i<o.o.length;++i)r=g(e,o,i),r&&c.appendChild(r);"svg"===o.u?n=!1:"foreignObject"===c.tagName&&(n=!0)}return c},v=(t,n,l,s,o,c)=>{let r,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=g(null,l,o),r&&(s[o].h=r,i.insertBefore(r,n)))},j=(t,e,n,l,s)=>{for(;e<=n;++e)(l=t[e])&&(s=l.h,k(l),s.remove())},S=(t,e)=>t.u===e.u,O=(t,e)=>{const l=e.h=t.h,s=t.o,o=e.o,c=e.u,r=e.t;null===r?(n="svg"===c||"foreignObject"!==c&&n,w(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,c=0,r=e.length-1,i=e[0],u=e[r],a=l.length-1,f=l[0],h=l[a];for(;o<=r&&c<=a;)null==i?i=e[++o]:null==u?u=e[--r]:null==f?f=l[++c]:null==h?h=l[--a]:S(i,f)?(O(i,f),i=e[++o],f=l[++c]):S(u,h)?(O(u,h),u=e[--r],h=l[--a]):S(i,h)?(O(i,h),t.insertBefore(i.h,u.h.nextSibling),i=e[++o],h=l[--a]):S(u,f)?(O(u,f),t.insertBefore(u.h,i.h),u=e[--r],f=l[++c]):(s=g(e&&e[c],n,c),f=l[++c],s&&i.h.parentNode.insertBefore(s,i.h));o>r?v(t,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&j(e,o,r)})(l,s,e,o):null!==o?(null!==t.t&&(l.textContent=""),v(l,null,e,o,0,o.length-1)):null!==s&&j(s,0,s.length-1),n&&"svg"===c&&(n=!1)):t.t!==r&&(l.data=r)},k=t=>{t.l&&t.l.ref&&t.l.ref(null),t.o&&t.o.map(k)},M=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},C=(t,e)=>{if(t.i|=16,!(4&t.i))return M(t,t.j),rt((()=>x(t,e)));t.i|=512},x=(t,e)=>{const n=t.S;return e&&(t.i|=256,t.O&&(t.O.map((([t,e])=>T(n,t,e))),t.O=null)),q(void 0,(()=>P(t,n,e)))},P=async(t,e,n)=>{const l=t.$,s=l["s-rc"];n&&(t=>{const e=t.k,n=t.$,l=e.i,s=((t,e)=>{let n=p(e);const l=K.get(n);if(t=11===t.nodeType?t:X,l)if("string"==typeof l){let e,s=d.get(t=t.head||t);s||d.set(t,s=new Set),s.has(n)||(e=X.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);E(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>L(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},E=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,o=n.M||r(null,null),u=(t=>t&&t.u===i)(l)?l:c(null,null,l);e=s.tagName,u.u=null,u.i|=4,n.M=u,u.h=o.h=s.shadowRoot||s,t=s["s-sc"],O(o,u)})(n,l)}catch(t){G(t,n.$)}return null},L=t=>{const e=t.$,n=t.S,l=t.j;64&t.i||(t.i|=64,A(e),T(n,"componentDidLoad"),t.C(e),l||N()),t.P(e),t.v&&(t.v(),t.v=void 0),512&t.i&&ct((()=>C(t,!1))),t.i&=-517},N=()=>{A(X.documentElement),ct((()=>y(Q,"appload",{detail:{namespace:"gatacaqr"}})))},T=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){G(t)}},q=(t,e)=>t&&t.then?t.then(e):e(),A=t=>t.classList.add("hydrated"),F=(t,e,n)=>{if(e.L){t.watchers&&(e.N=t.watchers);const l=Object.entries(e.L),s=t.prototype;if(l.map((([t,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,t,{get(){return((t,e)=>V(this).T.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=V(t),c=s.$,r=s.T.get(e),i=s.i,u=s.S;if(n=((t,e)=>null==t||o(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.L[e][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.T.set(e,n),u)){if(l.N&&128&i){const t=l.N[e];t&&t.map((t=>{try{u[t](n,r,e)}catch(t){G(t,c)}}))}2==(18&i)&&C(s,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,t,{value(...e){const n=V(this);return n.q.then((()=>n.S[t](...e)))}})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){Y.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},R=(t,e={})=>{const n=[],l=e.exclude||[],s=Q.customElements,o=X.head,c=o.querySelector("meta[charset]"),r=X.createElement("style"),i=[];let u,a=!0;Object.assign(Y,e),Y.A=new URL(e.resourcesUrl||"./",X.baseURI).href,t.map((t=>{t[1].map((e=>{const o={i:e[0],g:e[1],L:e[2],F:e[3]};o.L=e[2],o.F=e[3],o.N={};const c=o.g,r=class extends HTMLElement{constructor(t){super(t),z(t=this,o),1&o.i&&t.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):Y.jmp((()=>(t=>{if(0==(1&Y.i)){const e=V(t),n=e.k,l=()=>{};if(1&e.i)U(t,e,n.F);else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(e,e.j=n);break}}n.L&&Object.entries(n.L).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.i)){{if(e.i|=32,(s=J(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(n.N=s.watchers,F(s,n,2),s.isProxied=!0);const t=()=>{};e.i|=8;try{new s(e)}catch(t){G(t)}e.i&=-9,e.i|=128,t()}if(s.style){let t=s.style;const e=p(n);if(!K.has(e)){const l=()=>{};((t,e,n)=>{let l=K.get(t);tt&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,K.set(t,l)})(e,t,!!(1&n.i)),l()}}}const o=e.j,c=()=>C(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,e,n)}l()}})(this)))}disconnectedCallback(){Y.jmp((()=>(()=>{if(0==(1&Y.i)){const t=V(this),e=t.S;t.R&&(t.R.map((t=>t())),t.R=void 0),T(e,"disconnectedCallback")}})()))}componentOnReady(){return V(this).U}};o.W=t[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,F(r,o,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,c?c.nextSibling:o.firstChild),a=!1,i.length?i.map((t=>t.connectedCallback())):Y.jmp((()=>u=setTimeout(N,30)))},U=(t,e,n)=>{n&&n.map((([n,l,s])=>{const o=t,c=W(e,s),r=D(n);Y.ael(o,l,c,r),(e.R=e.R||[]).push((()=>Y.rel(o,l,c,r)))}))},W=(t,e)=>n=>{try{256&t.i?t.S[e](n):(t.O=t.O||[]).push([e,n])}catch(t){G(t)}},D=t=>0!=(2&t),H=new WeakMap,V=t=>H.get(t),_=(t,e)=>H.set(e.S=t,e),z=(t,e)=>{const n={i:0,$:t,k:e,T:new Map};return n.q=new Promise((t=>n.P=t)),n.U=new Promise((t=>n.C=t)),t["s-p"]=[],t["s-rc"]=[],U(t,n,e.F),H.set(t,n)},B=(t,e)=>e in t,G=(t,e)=>(0,console.error)(t,e),I=new Map,J=t=>{const e=t.g.replace(/-/g,"_"),n=t.W,l=I.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(I.set(n,t),t[e])),G)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},K=new Map,Q="undefined"!=typeof window?window:{},X=Q.document||{head:{}},Y={i:0,A:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},Z=t=>Promise.resolve(t),tt=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),et=[],nt=[],lt=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&Y.i?ct(ot):Y.raf(ot))},st=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){G(t)}t.length=0},ot=()=>{st(et),st(nt),(l=et.length>0)&&Y.raf(ot)},ct=t=>Z().then(t),rt=lt(nt,!0);export{R as b,h as c,c as h,Z as p,_ as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-85af64b1.js";const e=t=>{if(t)return new Function("return "+t)()},a=class{constructor(s){t(this,s),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.configId=void 0,this.qrType="svg",this.configRepository="https://studio.gataca.io/api/v1/qrconfigs",this.successCallback=void 0,this.errorCallback=void 0,this.checkStatus=void 0,this.createSession=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.config=void 0,this.loading=void 0,this.loading=!0,fetch(this.configRepository+"/"+this.configId,{method:"GET",headers:{"Content-Type":"application/json"}}).then((t=>{t.json().then((t=>{t=(t=>{var i,s,a,o,r,n;return t.errorCallback=e(null===(i=t.errorCallback)||void 0===i?void 0:i.toString()),t.successCallback=e(null===(s=t.successCallback)||void 0===s?void 0:s.toString()),t.wsOnMessage=e(null===(a=t.wsOnMessage)||void 0===a?void 0:a.toString()),t.wsOnOpen=e(null===(o=t.wsOnOpen)||void 0===o?void 0:o.toString()),t.checkStatus=e(null===(r=t.checkStatus)||void 0===r?void 0:r.toString()),t.createSession=e(null===(n=t.createSession)||void 0===n?void 0:n.toString()),t})(t),this.config=t,this.loading=!1})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))}async getSessionData(){return this.qr.getSessionData()}selectQR(){this.qr=this.config.useButton?this.config.useWs?s("gataca-ssibuttonws",{buttonText:this.config.buttonText,wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrType:this.qrType,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:!0,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-ssibutton",{buttonText:this.config.buttonText,checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrType:this.qrType,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):this.config.useWs?s("gataca-qrws",{wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,qrType:this.qrType,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-qr",{checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,qrType:this.qrType,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v:this.config.v,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink})}render(){return this.loading?s("div",null,"Loading..."):this.config?(this.selectQR(),this.qr):s("div",null,"Error loading your config...")}};a.style='@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}';export{a as gataca_autoqr}
|
|
@@ -6,10 +6,8 @@ declare type IRetryButtonProps = {
|
|
|
6
6
|
clickInsideBoxLabel?: string;
|
|
7
7
|
refreshQrLabel?: string;
|
|
8
8
|
scanQrLabel?: string;
|
|
9
|
-
waitingStartSessionLabel?: string;
|
|
10
9
|
style?: qrStyle;
|
|
11
10
|
display: (x?: any) => void;
|
|
12
|
-
renderRetryQR(value: string, useLogo?: boolean): any;
|
|
13
11
|
};
|
|
14
12
|
export declare const RetryButton: React.FC<IRetryButtonProps>;
|
|
15
13
|
export {};
|