@gataca/qr 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/cjs/gataca-autoqr.cjs.entry.js +105 -0
  2. package/dist/cjs/gataca-qr_2.cjs.entry.js +230 -0
  3. package/dist/cjs/gataca-qrws.cjs.entry.js +176 -0
  4. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +129 -0
  5. package/dist/cjs/gatacaqr.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/logo_gataca-f3dc6840.js +14 -0
  8. package/dist/{esm/gataca-autoqr_6.entry.js → cjs/qr-code-styling-412bbc7a.js} +2 -603
  9. package/dist/collection/components/gataca-qr/gataca-qr.css +11 -2
  10. package/dist/collection/components/gataca-qr/gataca-qr.js +110 -10
  11. package/dist/components/gataca-qr2.js +26 -10
  12. package/dist/esm/gataca-autoqr.entry.js +101 -0
  13. package/dist/esm/gataca-qr_2.entry.js +225 -0
  14. package/dist/esm/gataca-qrws.entry.js +172 -0
  15. package/dist/esm/gataca-ssibutton_2.entry.js +124 -0
  16. package/dist/esm/gatacaqr.js +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/logo_gataca-57ad0363.js +9 -0
  19. package/dist/{cjs/gataca-autoqr_6.cjs.entry.js → esm/qr-code-styling-0eeb38d5.js} +1 -613
  20. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  21. package/dist/gatacaqr/p-0be4566d.js +1 -0
  22. package/dist/gatacaqr/p-35b616ba.entry.js +1 -0
  23. package/dist/gatacaqr/p-5eb106c0.entry.js +1 -0
  24. package/dist/gatacaqr/p-66ad21ac.entry.js +1 -0
  25. package/dist/gatacaqr/p-6adc6933.js +1 -0
  26. package/dist/gatacaqr/p-b834ef88.entry.js +1 -0
  27. package/dist/types/components/gataca-qr/gataca-qr.d.ts +27 -2
  28. package/dist/types/components.d.ts +42 -2
  29. package/package.json +40 -38
  30. package/dist/gatacaqr/p-b37057bb.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-a5648391.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-b37057bb",[[1,"gataca-autoqr",{configId:[1,"config-id"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}],[1,"gataca-ssibutton",{buttonText:[1,"button-text"],checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],open:[32],getSessionData:[64]}],[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],open:[32],getSessionData:[64]}],[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]}],[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],rounded:[4]}]]]],e)));
1
+ import{p as e,b as a}from"./p-a5648391.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-35b616ba",[[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideModalTexts:[4,"hide-modal-texts"],hideModalBoxShadow:[4,"hide-modal-box-shadow"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrSize:[2,"qr-size"],modalWidth:[2,"modal-width"],modalHeight:[2,"modal-height"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]}],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],rounded:[4]}]]],["p-5eb106c0",[[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["p-66ad21ac",[[1,"gataca-ssibutton",{buttonText:[1,"button-text"],checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],open:[32],getSessionData:[64]}],[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],open:[32],getSessionData:[64]}]]],["p-b834ef88",[[1,"gataca-autoqr",{configId:[1,"config-id"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}]]]],e)));
@@ -0,0 +1 @@
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r;const n=t((function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="&lt;";break;case">":r+="&gt;";break;case"&":r+="&amp;";break;case'"':r+="&quot;";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(t,r){var n={};return n.totalCount=t,n.dataCount=r,n};return{getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}}}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;case"square":default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],M=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default}(r={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports));export{n as Q}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,c as e}from"./p-a5648391.js";import{l as s,g as n,a as o,b as a}from"./p-6adc6933.js";import{Q as r}from"./p-0be4566d.js";import{R as h,c as p,b as l}from"./p-b8ba109f.js";const d=class{constructor(i){t(this,i),this.qrData=void 0,this.size=256,this.logoSize=0,this.logoSrc=void 0,this.qrColor="#1E1E20",this.rounded=!0}componentDidLoad(){new r({data:this.qrData,width:this.size,height:this.size,image:this.logoSize>0?this.logoSrc||s:void 0,margin:10,type:"svg",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}}).append(this.qr)}render(){return i("div",{ref:t=>{this.qr=t}})}},c={connect:"scan",certify:"credential"},g=class{constructor(i){t(this,i),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.autostart=!0,this.autorefresh=!1,this.v2=!1,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.hideQrModalDescription=!1,this.sessionTimeout=300,this.pollingFrequency=3,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=h.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){await this.getSessionId(),this.result=h.ONGOING,this.poll().then((t=>{this.result=h.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===h.EXPIRED;if(i&&this.autorefresh)this.display();else if(t!==h.NOT_STARTED){let e=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}})),p()&&this.dynamicLink&&(window.location.href=this.getLink())}async stop(){this.clean(),this.result===h.ONGOING&&(this.result=h.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0}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(){if(this.v2)return this.authenticationRequest;let t="https://gataca.page.link/"+c[this.qrRole]+"?";return t+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,t+="&callback="+l(encodeURIComponent(this.callbackServer)),t=encodeURIComponent(t),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+t:t}async poll(){let t=(new Date).getTime()+1e3*(this.sessionTimeout||300),i=1e3*(this.pollingFrequency||3),e=this,s=async function(n,o){let{result:a,data:r}=await(async t=>{if(t.result===h.NOT_STARTED)return{result:h.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(e);switch(a){case h.SUCCESS:n(r);break;case h.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(s,i,n,o):o(h.EXPIRED);break;default:o(a)}};return new Promise(s)}renderQRSection(){switch(this.result){case h.NOT_STARTED:return this.renderRetryButton();case h.ONGOING:return this.renderQR(this.getLink(),!0);case h.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case h.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case h.SUCCESS:return this.renderSuccess()}}renderSuccess(){var t;return i("div",{class:"success",style:{height:this.modalHeight?(null===(t=this.modalHeight)||void 0===t?void 0:t.toString())+"px":"300px"}},i("img",{src:n,height:52,width:52}),i("p",{class:"successMsg"},this.successLoginLabel))}renderRetryButton(t){return i("div",{class:"reload"},i("div",{id:"notify",onClick:()=>this.display()},i("img",{src:o,height:24,width:24}),i("p",{class:"qrDescription"},this.clickInsideBoxLabel," "),t?i("p",{class:"qrDescription bold"},this.refreshQrLabel):i("p",{class:"qrDescription bold"},this.scanQrLabel,"e"),t&&i("div",{class:"alert"},i("img",{src:a,height:24,width:24}),i("p",null,t))),i("div",{id:"qrwait"},this.renderQR(this.waitingStartSessionLabel)))}renderQR(t,e){return i("gataca-qrdisplay",{qrData:t,rounded:!0,size:this.qrSize,"logo-size":e?.33:0,"logo-src":this.logoSrc})}render(){var t;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:t=>{t.stopPropagation()}},i("div",{class:"modal-window__content"},i("div",{class:"qrTitleContainer "+(this.hideModalTexts?"hidenText":"")},i("p",{class:"qrTitle",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&i("p",{class:"qrBrand"},this.byBrandLabel," ",i("span",null,i("img",{src:s}))),this.result!==h.SUCCESS&&!this.hideQrModalDescription&&i("p",{class:"qrDescription"},this.qrModalDescription)),i("div",{class:"qrSection"},this.renderQRSection()))))}};g.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=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window p{font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:"Work Sans";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:"salt" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{line-height:23.5px;color:var(--neutral-1000, #1E1E20);text-align:center;font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}';export{g as gataca_qr,d as gataca_qrdisplay}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as e}from"./p-a5648391.js";import{g as s,a as n,b as o,l as a}from"./p-6adc6933.js";import"./p-0be4566d.js";import{R as r,c as p,b as l}from"./p-b8ba109f.js";const d={connect:"scan",certify:"credential"},c=class{constructor(e){i(this,e),this.gatacaLoginCompleted=t(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=t(this,"gatacaLoginFailed",7),this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,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.v2=!1,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.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){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=r.FAILED,this.gatacaLoginFailed.emit(t),this.errorCallback(t),i.close(1e3,"")},i.onclose=()=>{if(this.result===r.ONGOING&&(this.result=r.EXPIRED),this.result===r.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)}},p()&&this.dynamicLink&&(window.location.href=this.getLink())}sessionMsgReceived(i){this.handleWSResponse(i.detail)}handleWSResponse(i){switch(this.result=i.result,i.result){case r.ONGOING:this.sessionId=i.sessionId,this.authenticationRequest=i.authenticationRequest;break;case r.SUCCESS:this.sessionData=i.authenticatedUserData,this.gatacaLoginCompleted.emit(i.authenticatedUserData),this.successCallback(i.authenticatedUserData),this.socket.close(1e3,"");break;case r.FAILED:this.socket.close();let t=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(t),this.errorCallback(t);break;case r.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.socket.close(1e3,"Client stopped the connection")}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error("No successful login"))}getLink(){if(this.v2&&"connect"==this.qrRole)return this.authenticationRequest;let i="https://gataca.page.link/"+d[this.qrRole]+"?";return i+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,i+="&callback="+l(encodeURIComponent(this.callbackServer)),i=encodeURIComponent(i),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+i:i}renderQRSection(){switch(this.result){case r.NOT_STARTED:return this.renderRetryButton();case r.ONGOING:return this.renderQR(this.getLink(),300,!0);case r.EXPIRED:return this.renderRetryButton("QR Code expired");case r.FAILED:return this.renderRetryButton("User credentials not validated");case r.SUCCESS:return this.renderSuccess()}}renderSuccess(){return e("div",{class:"success"},e("img",{src:s,height:52,width:52}),e("p",{class:"successMsg"},"Successful Connection!"))}renderRetryButton(i){return e("div",{class:"reload"},e("div",{id:"notify",onClick:()=>this.display()},e("img",{src:n,height:24,width:24}),e("p",{class:"qrDescription"},"Click inside the box to "),e("p",{class:"qrDescription bold"},i?"Refresh QR Code":"Scan QR Code"),i&&e("div",{class:"alert"},e("img",{src:o,height:24,width:24}),e("p",null,i))),e("div",{id:"qrwait"},this.renderQR("waiting to start a session",250)))}renderQR(i,t,s){return e("gataca-qrdisplay",{qrData:i,rounded:!0,size:t,"logo-size":s?.33:0})}render(){return e("div",{class:"popUpContainer"},e("div",{class:"modal-window is-visible",onClick:i=>{i.stopPropagation()}},e("div",{class:"modal-window__content"},e("div",{class:"qrTitleContainer"},e("p",{class:"qrTitle"},this.qrModalTitle),!this.hideBrandTitle&&e("p",{class:"qrBrand"},"by Gataca"," ",e("span",null,e("img",{src:a}))),this.result!==r.SUCCESS&&e("p",{class:"qrDescription"},this.qrModalDescription)),e("div",{class:"qrSection"},this.renderQRSection()))))}};c.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}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:"Work Sans", "Helvetica Neue", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:"Work Sans";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:"salt" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}';export{c as gataca_qrws}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as a}from"./p-a5648391.js";import"./p-0be4566d.js";const e=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.sessionTimeout=void 0,this.pollingFrequency=void 0,this.autorefresh=!1,this.v2=!1,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.hideQrModalDescription=!1,this.open=!1,this.qr=a("gataca-qr",{checkStatus:this.checkStatus,createSession:this.createSession,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,pollingFrequency:this.pollingFrequency,autostart:!0,autorefresh:this.autorefresh,v2:this.v2,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink,logoSize:this.logoSize,logoSrc:this.logoSrc,modalTitleColor:this.modalTitleColor,qrCodeExpiredLabel:this.qrCodeExpiredLabel,credentialsNotValidatedLabel:this.credentialsNotValidatedLabel,clickInsideBoxLabel:this.clickInsideBoxLabel,refreshQrLabel:this.refreshQrLabel,scanQrLabel:this.scanQrLabel,userNotScanInTimeErrorLabel:this.userNotScanInTimeErrorLabel,credsNotValidatedErrorLabel:this.credsNotValidatedErrorLabel,failedLoginErrorLabel:this.failedLoginErrorLabel,successLoginLabel:this.successLoginLabel,byBrandLabel:this.byBrandLabel,waitingStartSessionLabel:this.waitingStartSessionLabel,hideQrModalDescription:this.hideQrModalDescription})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},a("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}),a("span",null,this.buttonText)))}render(){return a("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}';const s=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.successCallback=void 0,this.errorCallback=void 0,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.v2=!1,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=a("gataca-qrws",{wsOnMessage:this.wsOnMessage,wsOnOpen:this.wsOnOpen,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,socketEndpoint:this.socketEndpoint,autostart:!0,autorefresh:this.autorefresh,v2:this.v2,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},a("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}),a("span",null,this.buttonText)))}render(){return a("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};s.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_ssibutton,s as gataca_ssibuttonws}
@@ -0,0 +1 @@
1
+ const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",j="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",N="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",L="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjUuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2MzUuMyA1OTcuNDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYzNS4zIDU5Ny40NzsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NzQ1Qjc7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02MDUuNzksMzIzLjQxYy0yNy45Ny00MS45Ny03My40NC03MS4yOC0xMjUuOTktNzcuNDljOS4xNS0yMS4zMywxNC4yMy00NC44MywxNC4yMy02OS41MQoJCWMwLTEwLjE3LTAuODctMjAuMTQtMi41My0yOS44NUM0NzcuMzMsNjMuMzUsNDA0Ljg5LDAsMzE3LjY0LDBjLTk3LjQyLDAtMTc2LjM4LDc4Ljk3LTE3Ni4zOCwxNzYuMzkKCQljMCwyNC42OSw1LjA4LDQ4LjE5LDE0LjI0LDY5LjUyQzY3LjkzLDI1Ni4yNCwwLDMzMC43MSwwLDQyMS4wN2MwLDQwLjM5LDEzLjU5LDc3LjYxLDM2LjQzLDEwNy4zNQoJCWMzMi4yNSw0MS45OCw4Mi45NCw2OS4wNSwxMzkuOTYsNjkuMDZjNTIuOTYsMCwxMDAuNDctMjMuMzQsMTMyLjgtNjAuM2MyLjk1LTMuMzcsNS43OC02Ljg2LDguNDctMTAuNDUKCQljNS45MSw3Ljg4LDEyLjQ4LDE1LjIzLDE5LjYsMjIuMDJjNS42LDUuMzQsMTEuNTQsMTAuMzQsMTcuODEsMTQuOTFjMTAuMTIsNy4zOCwyMS4wNSwxMy43MSwzMi42MywxOC44NAoJCWMyMS43OCw5LjYzLDQ1Ljg4LDE0Ljk5LDcxLjIyLDE0Ljk5YzIuNTEsMCw1LTAuMDcsNy40OC0wLjE3YzkzLjk1LTMuOTIsMTY4LjktODEuMzEsMTY4LjktMTc2LjIyCgkJQzYzNS4zLDM4NC45NSw2MjQuNDMsMzUxLjM3LDYwNS43OSwzMjMuNDF6IE0yMjUuNzQsMTIzLjMzYzI5LjMxLTUwLjc2LDk0LjIxLTY4LjE2LDE0NC45Ny0zOC44NQoJCWM0My41OCwyNS4xNiw2Mi41Niw3Ni41Nyw0OC41MSwxMjIuNzNjLTIuMzEsNy42MS01LjUyLDE1LjA3LTkuNjcsMjIuMjVjLTkuMjcsMTYuMDYtMjIuMTEsMjguNzgtMzYuOTQsMzcuNzQKCQljLTEuMjIsMC43NC0yLjQ2LDEuNDYtMy43MSwyLjE1Yy0xMS45NCw2LjU3LTI1LjA0LDEwLjc3LTM4LjUzLDEyLjQxYy0yMS44NCwyLjY2LTQ0LjY4LTEuNDItNjUuMjUtMTMuMTQKCQljLTAuNDctMC4yNy0wLjkzLTAuNTQtMS40LTAuODFDMjEzLjY0LDIzOC4yNywxOTYuNiwxNzMuODEsMjI1Ljc0LDEyMy4zM3ogTTU1Mi40OSw0NzEuMTVjLTEyLjIzLDIyLjgxLTMxLjQ3LDM5LjI2LTUzLjU1LDQ4LjIzCgkJYy0zMC4xNywxMi4yNi02NC40MSw5LjIzLTkyLjYyLTcuMDRsLTE1LjIxLTguNzhsLTQ3LjE3LTI3LjIybC02MC4yMi0zNC43NmwtMi44Ny0xLjY2bC04Mi4zMi00Ny41MWwtNTcuMTIsNDcuOTNsMTA0Ljk1LDYwLjU4CgkJYy0zMy4yNCwyOS4xNS04Mi42MiwzNS40Mi0xMjMuMDQsMTIuMDljLTEzLjQyLTcuNzUtMjQuNS0xNy45OC0zMy4wMS0yOS43OWMtMjMuNjgtMzIuODUtMjcuMzktNzcuODUtNS44My0xMTUuMgoJCWMyOS4yLTUwLjU4LDkzLjc0LTY4LjAzLDE0NC40Mi0zOS4xNmMwLjQ3LDAuMjcsMC45MywwLjU0LDEuNCwwLjgxYzEuMjMsMC43LDIuNDcsMS4zOSwzLjcyLDIuMDdsMjEuODEsMTIuNTlsMzUuOCwyMC42NwoJCWw1OS44MiwzNC41M2wzLjE2LDEuODNsOTMuNzksNTQuMTNsNTcuMDQtNDcuODZsMC4wNS0wLjA5bC0xMTUuODYtNjYuODdjNC41LTMuODgsOS4yOS03LjM1LDE0LjMxLTEwLjM4CgkJYzEuMjMtMC43NCwyLjQ2LTEuNDYsMy43Mi0yLjE1YzMxLjU2LTE3LjM3LDcxLjE4LTE4LjI0LDEwNC42MSwxLjIxYzE2Ljg5LDkuODIsMzAuMDksMjMuNzMsMzkuMDYsMzkuNzgKCQlDNTY4LjQ1LDM5OS43Niw1NzAuMTIsNDM4LjI2LDU1Mi40OSw0NzEuMTV6Ii8+CjwvZz4KPC9zdmc+Cg==";export{N as a,M as b,j as g,L as l}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./p-a5648391.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.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,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:!0,autorefresh:this.config.autorefresh,v2:this.config.v2,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,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autorefresh:this.config.autorefresh,v2:this.config.v2,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,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,v2:this.config.v2,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,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,v2:this.config.v2,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}
@@ -38,7 +38,7 @@ export declare class GatacaQR {
38
38
  */
39
39
  errorCallback: (error?: Error) => void;
40
40
  /**
41
- * ***Mandatory***
41
+ * ***Mandatory just for V1***
42
42
  * Decide if scanning the credential as a verifier to request credentials
43
43
  * or as an issuer too issue credentials.
44
44
  * Options: connect | certify
@@ -79,6 +79,16 @@ export declare class GatacaQR {
79
79
  * Modifies the Modal description
80
80
  */
81
81
  qrModalDescription?: string;
82
+ /**
83
+ * _[Optional]_
84
+ * Boolean to show or not show the modal title, brandTitle and description
85
+ */
86
+ hideModalTexts?: boolean;
87
+ /**
88
+ * _[Optional]_
89
+ * Boolean to show or not show the modal title, brandTitle and description
90
+ */
91
+ hideModalBoxShadow?: boolean;
82
92
  /**
83
93
  * _[Optional]_
84
94
  * Boolean to show or not show the gataca brand title
@@ -94,6 +104,21 @@ export declare class GatacaQR {
94
104
  * Logo to display, just if the logo size is greater than 0. No logo is the GATACA logo.
95
105
  */
96
106
  logoSrc?: string;
107
+ /**
108
+ * _[Optional]_
109
+ * Size of QR Displayed
110
+ */
111
+ qrSize?: number;
112
+ /**
113
+ * _[Optional]_
114
+ * Width of the modal
115
+ */
116
+ modalWidth?: number;
117
+ /**
118
+ * _[Optional]_
119
+ * Height of the modal
120
+ */
121
+ modalHeight?: number;
97
122
  /**
98
123
  * _[Optional]_
99
124
  * String to show when qr code expired
@@ -201,6 +226,6 @@ export declare class GatacaQR {
201
226
  renderQRSection(): any;
202
227
  renderSuccess(): any;
203
228
  renderRetryButton(errorMessage?: string): any;
204
- renderQR(value: string, size: number, useLogo?: boolean): any;
229
+ renderQR(value: string, useLogo?: boolean): any;
205
230
  render(): any;
206
231
  }
@@ -117,6 +117,14 @@ export namespace Components {
117
117
  * _[Optional]_ Boolean to show or not show the gataca brand title
118
118
  */
119
119
  "hideBrandTitle"?: boolean;
120
+ /**
121
+ * _[Optional]_ Boolean to show or not show the modal title, brandTitle and description
122
+ */
123
+ "hideModalBoxShadow"?: boolean;
124
+ /**
125
+ * _[Optional]_ Boolean to show or not show the modal title, brandTitle and description
126
+ */
127
+ "hideModalTexts"?: boolean;
120
128
  /**
121
129
  * _[Optional]_ Boolean to show or not show the QR Modal description
122
130
  */
@@ -129,10 +137,18 @@ export namespace Components {
129
137
  * _[Optional]_ Logo to display, just if the logo size is greater than 0. No logo is the GATACA logo.
130
138
  */
131
139
  "logoSrc"?: string;
140
+ /**
141
+ * _[Optional]_ Height of the modal
142
+ */
143
+ "modalHeight"?: number;
132
144
  /**
133
145
  * _[Optional]_ String to set Modal title color
134
146
  */
135
147
  "modalTitleColor"?: string;
148
+ /**
149
+ * _[Optional]_ Width of the modal
150
+ */
151
+ "modalWidth"?: number;
136
152
  /**
137
153
  * _[Optional]_ Frequency in seconds to check if the session has been validated
138
154
  */
@@ -150,9 +166,13 @@ export namespace Components {
150
166
  */
151
167
  "qrModalTitle"?: string;
152
168
  /**
153
- * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
169
+ * ***Mandatory just for V1*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
154
170
  */
155
171
  "qrRole": string;
172
+ /**
173
+ * _[Optional]_ Size of QR Displayed
174
+ */
175
+ "qrSize"?: number;
156
176
  /**
157
177
  * _[Optional]_ String to show "refresh QR" label
158
178
  */
@@ -664,6 +684,14 @@ declare namespace LocalJSX {
664
684
  * _[Optional]_ Boolean to show or not show the gataca brand title
665
685
  */
666
686
  "hideBrandTitle"?: boolean;
687
+ /**
688
+ * _[Optional]_ Boolean to show or not show the modal title, brandTitle and description
689
+ */
690
+ "hideModalBoxShadow"?: boolean;
691
+ /**
692
+ * _[Optional]_ Boolean to show or not show the modal title, brandTitle and description
693
+ */
694
+ "hideModalTexts"?: boolean;
667
695
  /**
668
696
  * _[Optional]_ Boolean to show or not show the QR Modal description
669
697
  */
@@ -676,10 +704,18 @@ declare namespace LocalJSX {
676
704
  * _[Optional]_ Logo to display, just if the logo size is greater than 0. No logo is the GATACA logo.
677
705
  */
678
706
  "logoSrc"?: string;
707
+ /**
708
+ * _[Optional]_ Height of the modal
709
+ */
710
+ "modalHeight"?: number;
679
711
  /**
680
712
  * _[Optional]_ String to set Modal title color
681
713
  */
682
714
  "modalTitleColor"?: string;
715
+ /**
716
+ * _[Optional]_ Width of the modal
717
+ */
718
+ "modalWidth"?: number;
683
719
  /**
684
720
  * GatacaLoginCompleted event, triggered with session data upon login success
685
721
  */
@@ -705,9 +741,13 @@ declare namespace LocalJSX {
705
741
  */
706
742
  "qrModalTitle"?: string;
707
743
  /**
708
- * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
744
+ * ***Mandatory just for V1*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
709
745
  */
710
746
  "qrRole"?: string;
747
+ /**
748
+ * _[Optional]_ Size of QR Displayed
749
+ */
750
+ "qrSize"?: number;
711
751
  /**
712
752
  * _[Optional]_ String to show "refresh QR" label
713
753
  */
package/package.json CHANGED
@@ -1,40 +1,42 @@
1
1
  {
2
- "name": "@gataca/qr",
3
- "version": "2.0.3",
4
- "description": "Gataca component to display presentation requests in QR",
5
- "author": "Gataca <it@gataca.io>",
6
- "licenses": [
7
- {
8
- "license": "MIT"
9
- }
10
- ],
11
- "main": "dist/index.cjs.js",
12
- "module": "dist/index.js",
13
- "es2015": "dist/esm/index.mjs",
14
- "es2017": "dist/esm/index.mjs",
15
- "types": "dist/types/index.d.ts",
16
- "collection": "dist/collection/collection-manifest.json",
17
- "collection:main": "dist/collection/index.js",
18
- "unpkg": "dist/gatacaqr/gatacaqr.js",
19
- "files": [
20
- "dist/",
21
- "loader/"
22
- ],
23
- "scripts": {
24
- "build": "stencil build --docs",
25
- "start": "stencil build --dev --watch --serve",
26
- "test": "stencil test --spec --e2e",
27
- "test.watch": "stencil test --spec --e2e --watchAll",
28
- "generate": "stencil generate"
29
- },
30
- "devDependencies": {
31
- "@stencil/core": "^2.9.0",
32
- "@stencil/sass": "^1.4.0",
33
- "rollup-plugin-node-polyfills": "^0.2.1"
34
- },
35
- "license": "MIT",
36
- "dependencies": {
37
- "@stencil/react-output-target": "^0.3.1",
38
- "qr-code-styling": "^1.6.0-rc.1"
39
- }
2
+ "name": "@gataca/qr",
3
+ "version": "2.0.5",
4
+ "description": "Gataca component to display presentation requests in QR",
5
+ "author": "Gataca <it@gataca.io>",
6
+ "licenses": [{
7
+ "license": "MIT"
8
+ }],
9
+ "main": "dist/index.cjs.js",
10
+ "module": "dist/index.js",
11
+ "es2015": "dist/esm/index.mjs",
12
+ "es2017": "dist/esm/index.mjs",
13
+ "types": "dist/types/index.d.ts",
14
+ "collection": "dist/collection/collection-manifest.json",
15
+ "collection:main": "dist/collection/index.js",
16
+ "unpkg": "dist/gatacaqr/gatacaqr.js",
17
+ "files": [
18
+ "dist/",
19
+ "loader/"
20
+ ],
21
+ "scripts": {
22
+ "build": "stencil build --docs",
23
+ "start": "stencil build --dev --watch --serve",
24
+ "test": "stencil test --spec --e2e",
25
+ "test.watch": "stencil test --spec --e2e --watchAll",
26
+ "generate": "stencil generate"
27
+ },
28
+ "devDependencies": {
29
+ "@stencil/core": "^2.9.0",
30
+ "@stencil/sass": "^1.4.0",
31
+ "@types/jest": "^27.0.3",
32
+ "jest": "^27.0.3",
33
+ "jest-cli": "^27.4.5",
34
+ "puppeteer": "^10.0.0",
35
+ "rollup-plugin-node-polyfills": "^0.2.1"
36
+ },
37
+ "license": "MIT",
38
+ "dependencies": {
39
+ "@stencil/react-output-target": "^0.4.0",
40
+ "qr-code-styling": "^1.6.0-rc.1"
41
+ }
40
42
  }