@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 +0,0 @@
1
- import{r as t,c as i,h as e}from"./p-a5648391.js";import{R as n,c as r,b as o}from"./p-b8ba109f.js";const a=t=>{if(t)return new Function("return "+t)()},s=class{constructor(e){t(this,e),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,e,n,r,o,s;return t.errorCallback=a(null===(i=t.errorCallback)||void 0===i?void 0:i.toString()),t.successCallback=a(null===(e=t.successCallback)||void 0===e?void 0:e.toString()),t.wsOnMessage=a(null===(n=t.wsOnMessage)||void 0===n?void 0:n.toString()),t.wsOnOpen=a(null===(r=t.wsOnOpen)||void 0===r?void 0:r.toString()),t.checkStatus=a(null===(o=t.checkStatus)||void 0===o?void 0:o.toString()),t.createSession=a(null===(s=t.createSession)||void 0===s?void 0:s.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?e("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}):e("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?e("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}):e("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?e("div",null,"Loading..."):this.config?(this.selectQR(),this.qr):e("div",null,"Error loading your config...")}};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}';const c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",h="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",u="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",l="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjUuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2MzUuMyA1OTcuNDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYzNS4zIDU5Ny40NzsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NzQ1Qjc7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02MDUuNzksMzIzLjQxYy0yNy45Ny00MS45Ny03My40NC03MS4yOC0xMjUuOTktNzcuNDljOS4xNS0yMS4zMywxNC4yMy00NC44MywxNC4yMy02OS41MQoJCWMwLTEwLjE3LTAuODctMjAuMTQtMi41My0yOS44NUM0NzcuMzMsNjMuMzUsNDA0Ljg5LDAsMzE3LjY0LDBjLTk3LjQyLDAtMTc2LjM4LDc4Ljk3LTE3Ni4zOCwxNzYuMzkKCQljMCwyNC42OSw1LjA4LDQ4LjE5LDE0LjI0LDY5LjUyQzY3LjkzLDI1Ni4yNCwwLDMzMC43MSwwLDQyMS4wN2MwLDQwLjM5LDEzLjU5LDc3LjYxLDM2LjQzLDEwNy4zNQoJCWMzMi4yNSw0MS45OCw4Mi45NCw2OS4wNSwxMzkuOTYsNjkuMDZjNTIuOTYsMCwxMDAuNDctMjMuMzQsMTMyLjgtNjAuM2MyLjk1LTMuMzcsNS43OC02Ljg2LDguNDctMTAuNDUKCQljNS45MSw3Ljg4LDEyLjQ4LDE1LjIzLDE5LjYsMjIuMDJjNS42LDUuMzQsMTEuNTQsMTAuMzQsMTcuODEsMTQuOTFjMTAuMTIsNy4zOCwyMS4wNSwxMy43MSwzMi42MywxOC44NAoJCWMyMS43OCw5LjYzLDQ1Ljg4LDE0Ljk5LDcxLjIyLDE0Ljk5YzIuNTEsMCw1LTAuMDcsNy40OC0wLjE3YzkzLjk1LTMuOTIsMTY4LjktODEuMzEsMTY4LjktMTc2LjIyCgkJQzYzNS4zLDM4NC45NSw2MjQuNDMsMzUxLjM3LDYwNS43OSwzMjMuNDF6IE0yMjUuNzQsMTIzLjMzYzI5LjMxLTUwLjc2LDk0LjIxLTY4LjE2LDE0NC45Ny0zOC44NQoJCWM0My41OCwyNS4xNiw2Mi41Niw3Ni41Nyw0OC41MSwxMjIuNzNjLTIuMzEsNy42MS01LjUyLDE1LjA3LTkuNjcsMjIuMjVjLTkuMjcsMTYuMDYtMjIuMTEsMjguNzgtMzYuOTQsMzcuNzQKCQljLTEuMjIsMC43NC0yLjQ2LDEuNDYtMy43MSwyLjE1Yy0xMS45NCw2LjU3LTI1LjA0LDEwLjc3LTM4LjUzLDEyLjQxYy0yMS44NCwyLjY2LTQ0LjY4LTEuNDItNjUuMjUtMTMuMTQKCQljLTAuNDctMC4yNy0wLjkzLTAuNTQtMS40LTAuODFDMjEzLjY0LDIzOC4yNywxOTYuNiwxNzMuODEsMjI1Ljc0LDEyMy4zM3ogTTU1Mi40OSw0NzEuMTVjLTEyLjIzLDIyLjgxLTMxLjQ3LDM5LjI2LTUzLjU1LDQ4LjIzCgkJYy0zMC4xNywxMi4yNi02NC40MSw5LjIzLTkyLjYyLTcuMDRsLTE1LjIxLTguNzhsLTQ3LjE3LTI3LjIybC02MC4yMi0zNC43NmwtMi44Ny0xLjY2bC04Mi4zMi00Ny41MWwtNTcuMTIsNDcuOTNsMTA0Ljk1LDYwLjU4CgkJYy0zMy4yNCwyOS4xNS04Mi42MiwzNS40Mi0xMjMuMDQsMTIuMDljLTEzLjQyLTcuNzUtMjQuNS0xNy45OC0zMy4wMS0yOS43OWMtMjMuNjgtMzIuODUtMjcuMzktNzcuODUtNS44My0xMTUuMgoJCWMyOS4yLTUwLjU4LDkzLjc0LTY4LjAzLDE0NC40Mi0zOS4xNmMwLjQ3LDAuMjcsMC45MywwLjU0LDEuNCwwLjgxYzEuMjMsMC43LDIuNDcsMS4zOSwzLjcyLDIuMDdsMjEuODEsMTIuNTlsMzUuOCwyMC42NwoJCWw1OS44MiwzNC41M2wzLjE2LDEuODNsOTMuNzksNTQuMTNsNTcuMDQtNDcuODZsMC4wNS0wLjA5bC0xMTUuODYtNjYuODdjNC41LTMuODgsOS4yOS03LjM1LDE0LjMxLTEwLjM4CgkJYzEuMjMtMC43NCwyLjQ2LTEuNDYsMy43Mi0yLjE1YzMxLjU2LTE3LjM3LDcxLjE4LTE4LjI0LDEwNC42MSwxLjIxYzE2Ljg5LDkuODIsMzAuMDksMjMuNzMsMzkuMDYsMzkuNzgKCQlDNTY4LjQ1LDM5OS43Niw1NzAuMTIsNDM4LjI2LDU1Mi40OSw0NzEuMTV6Ii8+CjwvZz4KPC9zdmc+Cg==";function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f;const g=d((function(t){self,t.exports=(()=>{var t={192:(t,i)=>{var e,n,r=function(){var t=function(t,i){var e=t,n=a[i],r=null,o=0,c=null,v=[],w={},y=function(t,i){r=function(t){for(var i=new Array(t),e=0;e<t;e+=1){i[e]=new Array(t);for(var n=0;n<t;n+=1)i[e][n]=null}return i}(o=4*e+17),b(0,0),b(o-7,0),b(0,o-7),x(),m(),L(t,i),e>=7&&j(t),null==c&&(c=D(e,n,v)),N(c,i)},b=function(t,i){for(var e=-1;e<=7;e+=1)if(!(t+e<=-1||o<=t+e))for(var n=-1;n<=7;n+=1)i+n<=-1||o<=i+n||(r[t+e][i+n]=0<=e&&e<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==e||6==e)||2<=e&&e<=4&&2<=n&&n<=4)},m=function(){for(var t=8;t<o-8;t+=1)null==r[t][6]&&(r[t][6]=t%2==0);for(var i=8;i<o-8;i+=1)null==r[6][i]&&(r[6][i]=i%2==0)},x=function(){for(var t=s.getPatternPosition(e),i=0;i<t.length;i+=1)for(var n=0;n<t.length;n+=1){var o=t[i],a=t[n];if(null==r[o][a])for(var c=-2;c<=2;c+=1)for(var h=-2;h<=2;h+=1)r[o+c][a+h]=-2==c||2==c||-2==h||2==h||0==c&&0==h}},j=function(t){for(var i=s.getBCHTypeNumber(e),n=0;n<18;n+=1){var a=!t&&1==(i>>n&1);r[Math.floor(n/3)][n%3+o-8-3]=a}for(n=0;n<18;n+=1)a=!t&&1==(i>>n&1),r[n%3+o-8-3][Math.floor(n/3)]=a},L=function(t,i){for(var e=s.getBCHTypeInfo(n<<3|i),a=0;a<15;a+=1){var c=!t&&1==(e>>a&1);a<6?r[a][8]=c:a<8?r[a+1][8]=c:r[o-15+a][8]=c}for(a=0;a<15;a+=1)c=!t&&1==(e>>a&1),a<8?r[8][o-a-1]=c:a<9?r[8][15-a-1+1]=c:r[8][15-a-1]=c;r[o-8][8]=!t},N=function(t,i){for(var e=-1,n=o-1,a=7,c=0,h=s.getMaskFunction(i),u=o-1;u>0;u-=2)for(6==u&&(u-=1);;){for(var l=0;l<2;l+=1)if(null==r[n][u-l]){var d=!1;c<t.length&&(d=1==(t[c]>>>a&1)),h(n,u-l)&&(d=!d),r[n][u-l]=d,-1==(a-=1)&&(c+=1,a=7)}if((n+=e)<0||o<=n){n-=e,e=-e;break}}},D=function(t,i,e){for(var n=u.getRSBlocks(t,i),r=l(),o=0;o<e.length;o+=1){var a=e[o];r.put(a.getMode(),4),r.put(a.getLength(),s.getLengthInBits(a.getMode(),t)),a.write(r)}var c=0;for(o=0;o<n.length;o+=1)c+=n[o].dataCount;if(r.getLengthInBits()>8*c)throw"code length overflow. ("+r.getLengthInBits()+">"+8*c+")";for(r.getLengthInBits()+4<=8*c&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*c||(r.put(236,8),r.getLengthInBits()>=8*c));)r.put(17,8);return function(t,i){for(var e=0,n=0,r=0,o=new Array(i.length),a=new Array(i.length),c=0;c<i.length;c+=1){var u=i[c].dataCount,l=i[c].totalCount-u;n=Math.max(n,u),r=Math.max(r,l),o[c]=new Array(u);for(var d=0;d<o[c].length;d+=1)o[c][d]=255&t.getBuffer()[d+e];e+=u;var f=s.getErrorCorrectPolynomial(l),g=h(o[c],f.getLength()-1).mod(f);for(a[c]=new Array(f.getLength()-1),d=0;d<a[c].length;d+=1){var p=d+g.getLength()-a[c].length;a[c][d]=p>=0?g.getAt(p):0}}var v=0;for(d=0;d<i.length;d+=1)v+=i[d].totalCount;var w=new Array(v),M=0;for(d=0;d<n;d+=1)for(c=0;c<i.length;c+=1)d<o[c].length&&(w[M]=o[c][d],M+=1);for(d=0;d<r;d+=1)for(c=0;c<i.length;c+=1)d<a[c].length&&(w[M]=a[c][d],M+=1);return w}(r,n)};w.addData=function(t,i){var e=null;switch(i=i||"Byte"){case"Numeric":e=d(t);break;case"Alphanumeric":e=f(t);break;case"Byte":e=g(t);break;case"Kanji":e=p(t);break;default:throw"mode:"+i}v.push(e),c=null},w.isDark=function(t,i){if(t<0||o<=t||i<0||o<=i)throw t+","+i;return r[t][i]},w.getModuleCount=function(){return o},w.make=function(){if(e<1){for(var t=1;t<40;t++){for(var i=u.getRSBlocks(t,n),r=l(),o=0;o<v.length;o++){var a=v[o];r.put(a.getMode(),4),r.put(a.getLength(),s.getLengthInBits(a.getMode(),t)),a.write(r)}var c=0;for(o=0;o<i.length;o++)c+=i[o].dataCount;if(r.getLengthInBits()<=8*c)break}e=t}y(!1,function(){for(var t=0,i=0,e=0;e<8;e+=1){y(!0,e);var n=s.getLostPoint(w);(0==e||t>n)&&(t=n,i=e)}return i}())},w.createTableTag=function(t,i){t=t||2;var e="";e+='<table style="',e+=" border-width: 0px; border-style: none;",e+=" border-collapse: collapse;",e+=" padding: 0px; margin: "+(i=void 0===i?4*t:i)+"px;",e+='">',e+="<tbody>";for(var n=0;n<w.getModuleCount();n+=1){e+="<tr>";for(var r=0;r<w.getModuleCount();r+=1)e+='<td style="',e+=" border-width: 0px; border-style: none;",e+=" border-collapse: collapse;",e+=" padding: 0px; margin: 0px;",e+=" width: "+t+"px;",e+=" height: "+t+"px;",e+=" background-color: ",e+=w.isDark(n,r)?"#000000":"#ffffff",e+=";",e+='"/>';e+="</tr>"}return(e+="</tbody>")+"</table>"},w.createSvgTag=function(t,i,e,n){var r={};"object"==typeof arguments[0]&&(t=(r=arguments[0]).cellSize,i=r.margin,e=r.alt,n=r.title),t=t||2,i=void 0===i?4*t:i,(e="string"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;var o,a,s,c,h=w.getModuleCount()*t+2*i,u="";for(c="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",u+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',u+=r.scalable?"":' width="'+h+'px" height="'+h+'px"',u+=' viewBox="0 0 '+h+" "+h+'" ',u+=' preserveAspectRatio="xMinYMin meet"',u+=n.text||e.text?' role="img" aria-labelledby="'+z([n.id,e.id].join(" ").trim())+'"':"",u+=">",u+=n.text?'<title id="'+z(n.id)+'">'+z(n.text)+"</title>":"",u+=e.text?'<description id="'+z(e.id)+'">'+z(e.text)+"</description>":"",u+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',u+='<path d="',a=0;a<w.getModuleCount();a+=1)for(s=a*t+i,o=0;o<w.getModuleCount();o+=1)w.isDark(a,o)&&(u+="M"+(o*t+i)+","+s+c);return(u+='" stroke="transparent" fill="black"/>')+"</svg>"},w.createDataURL=function(t,i){t=t||2,i=void 0===i?4*t:i;var e=w.getModuleCount()*t+2*i,n=i,r=e-i;return M(e,e,(function(i,e){if(n<=i&&i<r&&n<=e&&e<r){var o=Math.floor((i-n)/t),a=Math.floor((e-n)/t);return w.isDark(a,o)?0:1}return 1}))},w.createImgTag=function(t,i,e){t=t||2,i=void 0===i?4*t:i;var n=w.getModuleCount()*t+2*i,r="";return r+="<img",r+=' src="',r+=w.createDataURL(t,i),r+='"',r+=' width="',r+=n,r+='"',r+=' height="',r+=n,r+='"',e&&(r+=' alt="',r+=z(e),r+='"'),r+"/>"};var z=function(t){for(var i="",e=0;e<t.length;e+=1){var n=t.charAt(e);switch(n){case"<":i+="&lt;";break;case">":i+="&gt;";break;case"&":i+="&amp;";break;case'"':i+="&quot;";break;default:i+=n}}return i};return w.createASCII=function(t,i){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var i,e,n,r,o,a=1*w.getModuleCount()+2*t,s=t,c=a-t,h={"██":"█","█ ":"▀"," █":"▄"," ":" "},u={"██":"▀","█ ":"▀"," █":" "," ":" "},l="";for(i=0;i<a;i+=2){for(n=Math.floor((i-s)/1),r=Math.floor((i+1-s)/1),e=0;e<a;e+=1)o="█",s<=e&&e<c&&s<=i&&i<c&&w.isDark(n,Math.floor((e-s)/1))&&(o=" "),s<=e&&e<c&&s<=i+1&&i+1<c&&w.isDark(r,Math.floor((e-s)/1))?o+=" ":o+="█",l+=t<1&&i+1>=c?u[o]:h[o];l+="\n"}return a%2&&t>0?l.substring(0,l.length-a-1)+Array(a+1).join("▀"):l.substring(0,l.length-1)}(i);t-=1,i=void 0===i?2*t:i;var e,n,r,o,a=w.getModuleCount()*t+2*i,s=i,c=a-i,h=Array(t+1).join("██"),u=Array(t+1).join(" "),l="",d="";for(e=0;e<a;e+=1){for(r=Math.floor((e-s)/t),d="",n=0;n<a;n+=1)o=1,s<=n&&n<c&&s<=e&&e<c&&w.isDark(r,Math.floor((n-s)/t))&&(o=0),d+=o?h:u;for(r=0;r<t;r+=1)l+=d+"\n"}return l.substring(0,l.length-1)},w.renderTo2dContext=function(t,i){i=i||2;for(var e=w.getModuleCount(),n=0;n<e;n++)for(var r=0;r<e;r++)t.fillStyle=w.isDark(n,r)?"black":"white",t.fillRect(n*i,r*i,i,i)},w};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var i=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);i.push(255&n)}return i}}).default,t.createStringToBytes=function(t,i){var e=function(){for(var e=w(t),n=function(){var t=e.read();if(-1==t)throw"eof";return t},r=0,o={};;){var a=e.read();if(-1==a)break;var s=n(),c=n()<<8|n();o[String.fromCharCode(a<<8|s)]=c,r+=1}if(r!=i)throw r+" != "+i;return o}(),n="?".charCodeAt(0);return function(t){for(var i=[],r=0;r<t.length;r+=1){var o=t.charCodeAt(r);if(o<128)i.push(o);else{var a=e[t.charAt(r)];"number"==typeof a?(255&a)==a?i.push(a):(i.push(a>>>8),i.push(255&a)):i.push(n)}}return i}};var i,e,n,r,o,a={L:1,M:0,Q:3,H:2},s=(i=[[],[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]],e=1335,n=7973,o=function(t){for(var i=0;0!=t;)i+=1,t>>>=1;return i},(r={}).getBCHTypeInfo=function(t){for(var i=t<<10;o(i)-o(e)>=0;)i^=e<<o(i)-o(e);return 21522^(t<<10|i)},r.getBCHTypeNumber=function(t){for(var i=t<<12;o(i)-o(n)>=0;)i^=n<<o(i)-o(n);return t<<12|i},r.getPatternPosition=function(t){return i[t-1]},r.getMaskFunction=function(t){switch(t){case 0:return function(t,i){return(t+i)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,i){return i%3==0};case 3:return function(t,i){return(t+i)%3==0};case 4:return function(t,i){return(Math.floor(t/2)+Math.floor(i/3))%2==0};case 5:return function(t,i){return t*i%2+t*i%3==0};case 6:return function(t,i){return(t*i%2+t*i%3)%2==0};case 7:return function(t,i){return(t*i%3+(t+i)%2)%2==0};default:throw"bad maskPattern:"+t}},r.getErrorCorrectPolynomial=function(t){for(var i=h([1],0),e=0;e<t;e+=1)i=i.multiply(h([1,c.gexp(e)],0));return i},r.getLengthInBits=function(t,i){if(1<=i&&i<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(i<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(!(i<41))throw"type:"+i;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},r.getLostPoint=function(t){for(var i=t.getModuleCount(),e=0,n=0;n<i;n+=1)for(var r=0;r<i;r+=1){for(var o=0,a=t.isDark(n,r),s=-1;s<=1;s+=1)if(!(n+s<0||i<=n+s))for(var c=-1;c<=1;c+=1)r+c<0||i<=r+c||0==s&&0==c||a==t.isDark(n+s,r+c)&&(o+=1);o>5&&(e+=3+o-5)}for(n=0;n<i-1;n+=1)for(r=0;r<i-1;r+=1){var h=0;t.isDark(n,r)&&(h+=1),t.isDark(n+1,r)&&(h+=1),t.isDark(n,r+1)&&(h+=1),t.isDark(n+1,r+1)&&(h+=1),0!=h&&4!=h||(e+=3)}for(n=0;n<i;n+=1)for(r=0;r<i-6;r+=1)t.isDark(n,r)&&!t.isDark(n,r+1)&&t.isDark(n,r+2)&&t.isDark(n,r+3)&&t.isDark(n,r+4)&&!t.isDark(n,r+5)&&t.isDark(n,r+6)&&(e+=40);for(r=0;r<i;r+=1)for(n=0;n<i-6;n+=1)t.isDark(n,r)&&!t.isDark(n+1,r)&&t.isDark(n+2,r)&&t.isDark(n+3,r)&&t.isDark(n+4,r)&&!t.isDark(n+5,r)&&t.isDark(n+6,r)&&(e+=40);var u=0;for(r=0;r<i;r+=1)for(n=0;n<i;n+=1)t.isDark(n,r)&&(u+=1);return e+Math.abs(100*u/i/i-50)/5*10},r),c=function(){for(var t=new Array(256),i=new Array(256),e=0;e<8;e+=1)t[e]=1<<e;for(e=8;e<256;e+=1)t[e]=t[e-4]^t[e-5]^t[e-6]^t[e-8];for(e=0;e<255;e+=1)i[t[e]]=e;return{glog:function(t){if(t<1)throw"glog("+t+")";return i[t]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return t[i]}}}();function h(t,i){if(void 0===t.length)throw t.length+"/"+i;var e=function(){for(var e=0;e<t.length&&0==t[e];)e+=1;for(var n=new Array(t.length-e+i),r=0;r<t.length-e;r+=1)n[r]=t[r+e];return n}(),n={getAt:function(t){return e[t]},getLength:function(){return e.length},multiply:function(t){for(var i=new Array(n.getLength()+t.getLength()-1),e=0;e<n.getLength();e+=1)for(var r=0;r<t.getLength();r+=1)i[e+r]^=c.gexp(c.glog(n.getAt(e))+c.glog(t.getAt(r)));return h(i,0)},mod:function(t){if(n.getLength()-t.getLength()<0)return n;for(var i=c.glog(n.getAt(0))-c.glog(t.getAt(0)),e=new Array(n.getLength()),r=0;r<n.getLength();r+=1)e[r]=n.getAt(r);for(r=0;r<t.getLength();r+=1)e[r]^=c.gexp(c.glog(t.getAt(r))+i);return h(e,0).mod(t)}};return n}var u=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]],i=function(t,i){var e={};return e.totalCount=t,e.dataCount=i,e};return{getRSBlocks:function(e,n){var r=function(i,e){switch(e){case a.L:return t[4*(i-1)+0];case a.M:return t[4*(i-1)+1];case a.Q:return t[4*(i-1)+2];case a.H:return t[4*(i-1)+3];default:return}}(e,n);if(void 0===r)throw"bad rs block @ typeNumber:"+e+"/errorCorrectionLevel:"+n;for(var o=r.length/3,s=[],c=0;c<o;c+=1)for(var h=r[3*c+0],u=r[3*c+1],l=r[3*c+2],d=0;d<h;d+=1)s.push(i(u,l));return s}}}(),l=function(){var t=[],i=0,e={getBuffer:function(){return t},getAt:function(i){var e=Math.floor(i/8);return 1==(t[e]>>>7-i%8&1)},put:function(t,i){for(var n=0;n<i;n+=1)e.putBit(1==(t>>>i-n-1&1))},getLengthInBits:function(){return i},putBit:function(e){var n=Math.floor(i/8);t.length<=n&&t.push(0),e&&(t[n]|=128>>>i%8),i+=1}};return e},d=function(t){var i=t,e={getMode:function(){return 1},getLength:function(){return i.length},write:function(t){for(var e=i,r=0;r+2<e.length;)t.put(n(e.substring(r,r+3)),10),r+=3;r<e.length&&(e.length-r==1?t.put(n(e.substring(r,r+1)),4):e.length-r==2&&t.put(n(e.substring(r,r+2)),7))}},n=function(t){for(var i=0,e=0;e<t.length;e+=1)i=10*i+r(t.charAt(e));return i},r=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return e},f=function(t){var i=t,e={getMode:function(){return 2},getLength:function(){return i.length},write:function(t){for(var e=i,r=0;r+1<e.length;)t.put(45*n(e.charAt(r))+n(e.charAt(r+1)),11),r+=2;r<e.length&&t.put(n(e.charAt(r)),6)}},n=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 e},g=function(i){var e=t.stringToBytes(i);return{getMode:function(){return 4},getLength:function(){return e.length},write:function(t){for(var i=0;i<e.length;i+=1)t.put(e[i],8)}}},p=function(i){var e=t.stringToBytesFuncs.SJIS;if(!e)throw"sjis not supported.";!function(){var t=e("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var n=e(i);return{getMode:function(){return 8},getLength:function(){return~~(n.length/2)},write:function(t){for(var i=n,e=0;e+1<i.length;){var r=(255&i[e])<<8|255&i[e+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(e+1)+"/"+r;r-=49472}t.put(r=192*(r>>>8&255)+(255&r),13),e+=2}if(e<i.length)throw"illegal char at "+(e+1)}}},v=function(){var t=[],i={writeByte:function(i){t.push(255&i)},writeShort:function(t){i.writeByte(t),i.writeByte(t>>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var r=0;r<n;r+=1)i.writeByte(t[r+e])},writeString:function(t){for(var e=0;e<t.length;e+=1)i.writeByte(t.charCodeAt(e))},toByteArray:function(){return t},toString:function(){var i="";i+="[";for(var e=0;e<t.length;e+=1)e>0&&(i+=","),i+=t[e];return i+"]"}};return i},w=function(t){var i=t,e=0,n=0,r=0,o={read:function(){for(;r<8;){if(e>=i.length){if(0==r)return-1;throw"unexpected end of file./"+r}var t=i.charAt(e);if(e+=1,"="==t)return r=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),r+=6)}var o=n>>>r-8&255;return r-=8,o}},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 o},M=function(t,i,e){for(var n=function(t,i){var e=t,n=i,r=new Array(t*i),o={setPixel:function(t,i,n){r[i*e+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(e),t.writeShort(n),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(e),t.writeShort(n),t.writeByte(0);var i=a(2);t.writeByte(2);for(var r=0;i.length-r>255;)t.writeByte(255),t.writeBytes(i,r,255),r+=255;t.writeByte(i.length-r),t.writeBytes(i,r,i.length-r),t.writeByte(0),t.writeString(";")}},a=function(t){for(var i=1<<t,e=1+(1<<t),n=t+1,o=s(),a=0;a<i;a+=1)o.add(String.fromCharCode(a));o.add(String.fromCharCode(i)),o.add(String.fromCharCode(e));var c,h,u,l=v(),d=(c=l,h=0,u=0,{write:function(t,i){if(t>>>i!=0)throw"length over";for(;h+i>=8;)c.writeByte(255&(t<<h|u)),i-=8-h,t>>>=8-h,u=0,h=0;u|=t<<h,h+=i},flush:function(){h>0&&c.writeByte(u)}});d.write(i,n);var f=0,g=String.fromCharCode(r[f]);for(f+=1;f<r.length;){var p=String.fromCharCode(r[f]);f+=1,o.contains(g+p)?g+=p:(d.write(o.indexOf(g),n),o.size()<4095&&(o.size()==1<<n&&(n+=1),o.add(g+p)),g=p)}return d.write(o.indexOf(g),n),d.write(e,n),d.flush(),l.toByteArray()},s=function(){var t={},i=0,e={add:function(n){if(e.contains(n))throw"dup key:"+n;t[n]=i,i+=1},size:function(){return i},indexOf:function(i){return t[i]},contains:function(i){return void 0!==t[i]}};return e};return o}(t,i),r=0;r<i;r+=1)for(var o=0;o<t;o+=1)n.setPixel(o,r,e(o,r));var a=v();n.write(a);for(var s=function(){var t=0,i=0,e=0,n="",r={},o=function(t){n+=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 r.writeByte=function(n){for(t=t<<8|255&n,i+=8,e+=1;i>=6;)o(t>>>i-6),i-=6},r.flush=function(){if(i>0&&(o(t<<6-i),t=0,i=0),e%3!=0)for(var r=3-e%3,a=0;a<r;a+=1)n+="="},r.toString=function(){return n},r}(),c=a.toByteArray(),h=0;h<c.length;h+=1)s.writeByte(c[h]);return s.flush(),"data:image/gif;base64,"+s};return t}();r.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var i=[],e=0;e<t.length;e++){var n=t.charCodeAt(e);n<128?i.push(n):n<2048?i.push(192|n>>6,128|63&n):n<55296||n>=57344?i.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&t.charCodeAt(e)),i.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return i}(t)},void 0===(n="function"==typeof(e=function(){return r})?e.apply(i,[]):e)||(t.exports=n)},676:(t,i,e)=>{e.d(i,{default:()=>T});var n=function(){return(n=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)},r=function(){for(var t=0,i=0,e=arguments.length;i<e;i++)t+=arguments[i].length;var n=Array(t),r=0;for(i=0;i<e;i++)for(var o=arguments[i],a=0,s=o.length;a<s;a++,r++)n[r]=o[a];return n},o=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];if(!i.length)return t;var s=i.shift();return void 0!==s&&o(t)&&o(s)?(t=n({},t),Object.keys(s).forEach((function(i){var e=t[i],n=s[i];t[i]=Array.isArray(e)&&Array.isArray(n)?n:o(e)&&o(n)?a(Object.assign({},e),n):n})),a.apply(void 0,r([t],i))):t}function s(t,i){var e=document.createElement("a");e.download=i,e.href=t,document.body.appendChild(e),e.click(),document.body.removeChild(e)}function c(t){return i=this,void 0,n=function(){return function(t,i){var e,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=i.call(t,a)}catch(t){o=[6,t],n=0}finally{e=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(){return[2,new Promise((function(i){var e=new XMLHttpRequest;e.onload=function(){var t=new FileReader;t.onloadend=function(){i(t.result)},t.readAsDataURL(e.response)},e.open("GET",t),e.responseType="blob",e.send()}))]}))},new((e=void 0)||(e=Promise))((function(t,r){function o(t){try{s(n.next(t))}catch(t){r(t)}}function a(t){try{s(n.throw(t))}catch(t){r(t)}}function s(i){var n;i.done?t(i.value):(n=i.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,a)}s((n=n.apply(i,[])).next())}));var i,e,n}const h={L:.07,M:.15,Q:.25,H:.3};var u=function(){return(u=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};const l=function(){function t(t){var i=t.type;this._svg=t.svg,this._type=i}return t.prototype.draw=function(t,i,e,n){var r;switch(this._type){case"dots":r=this._drawDot;break;case"classy":r=this._drawClassy;break;case"classy-rounded":r=this._drawClassyRounded;break;case"rounded":r=this._drawRounded;break;case"extra-rounded":r=this._drawExtraRounded;break;case"square":default:r=this._drawSquare}r.call(this,{x:t,y:i,size:e,getNeighbor:n})},t.prototype._rotateFigure=function(t){var i,e=t.size,n=t.rotation,r=void 0===n?0:n,o=t.x+e/2,a=t.y+e/2;(0,t.draw)(),null===(i=this._element)||void 0===i||i.setAttribute("transform","rotate("+180*r/Math.PI+","+o+","+a+")")},t.prototype._basicDot=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),i._element.setAttribute("cx",String(n+e/2)),i._element.setAttribute("cy",String(r+e/2)),i._element.setAttribute("r",String(e/2))}}))},t.prototype._basicSquare=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),i._element.setAttribute("x",String(n)),i._element.setAttribute("y",String(r)),i._element.setAttribute("width",String(e)),i._element.setAttribute("height",String(e))}}))},t.prototype._basicSideRounded=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("d","M "+n+" "+r+"v "+e+"h "+e/2+"a "+e/2+" "+e/2+", 0, 0, 0, 0 "+-e)}}))},t.prototype._basicCornerRounded=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("d","M "+n+" "+r+"v "+e+"h "+e+"v "+-e/2+"a "+e/2+" "+e/2+", 0, 0, 0, "+-e/2+" "+-e/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("d","M "+n+" "+r+"v "+e+"h "+e+"a "+e+" "+e+", 0, 0, 0, "+-e+" "+-e)}}))},t.prototype._basicCornersRounded=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(u(u({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("d","M "+n+" "+r+"v "+e/2+"a "+e/2+" "+e/2+", 0, 0, 0, "+e/2+" "+e/2+"h "+e/2+"v "+-e/2+"a "+e/2+" "+e/2+", 0, 0, 0, "+-e/2+" "+-e/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 i=t.x,e=t.y,n=t.size,r=t.getNeighbor,o=r?+r(-1,0):0,a=r?+r(1,0):0,s=r?+r(0,-1):0,c=r?+r(0,1):0,h=o+a+s+c;if(0!==h)if(h>2||o&&a||s&&c)this._basicSquare({x:i,y:e,size:n,rotation:0});else{if(2===h){var u=0;return o&&s?u=Math.PI/2:s&&a?u=Math.PI:a&&c&&(u=-Math.PI/2),void this._basicCornerRounded({x:i,y:e,size:n,rotation:u})}if(1===h)return u=0,s?u=Math.PI/2:a?u=Math.PI:c&&(u=-Math.PI/2),void this._basicSideRounded({x:i,y:e,size:n,rotation:u})}else this._basicDot({x:i,y:e,size:n,rotation:0})},t.prototype._drawExtraRounded=function(t){var i=t.x,e=t.y,n=t.size,r=t.getNeighbor,o=r?+r(-1,0):0,a=r?+r(1,0):0,s=r?+r(0,-1):0,c=r?+r(0,1):0,h=o+a+s+c;if(0!==h)if(h>2||o&&a||s&&c)this._basicSquare({x:i,y:e,size:n,rotation:0});else{if(2===h){var u=0;return o&&s?u=Math.PI/2:s&&a?u=Math.PI:a&&c&&(u=-Math.PI/2),void this._basicCornerExtraRounded({x:i,y:e,size:n,rotation:u})}if(1===h)return u=0,s?u=Math.PI/2:a?u=Math.PI:c&&(u=-Math.PI/2),void this._basicSideRounded({x:i,y:e,size:n,rotation:u})}else this._basicDot({x:i,y:e,size:n,rotation:0})},t.prototype._drawClassy=function(t){var i=t.x,e=t.y,n=t.size,r=t.getNeighbor,o=r?+r(-1,0):0,a=r?+r(1,0):0,s=r?+r(0,-1):0,c=r?+r(0,1):0;0!==o+a+s+c?o||s?a||c?this._basicSquare({x:i,y:e,size:n,rotation:0}):this._basicCornerRounded({x:i,y:e,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:i,y:e,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:i,y:e,size:n,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var i=t.x,e=t.y,n=t.size,r=t.getNeighbor,o=r?+r(-1,0):0,a=r?+r(1,0):0,s=r?+r(0,-1):0,c=r?+r(0,1):0;0!==o+a+s+c?o||s?a||c?this._basicSquare({x:i,y:e,size:n,rotation:0}):this._basicCornerExtraRounded({x:i,y:e,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:i,y:e,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:i,y:e,size:n,rotation:Math.PI/2})},t}();var d=function(){return(d=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};const f=function(){function t(t){var i=t.type;this._svg=t.svg,this._type=i}return t.prototype.draw=function(t,i,e,n){var r;switch(this._type){case"square":r=this._drawSquare;break;case"extra-rounded":r=this._drawExtraRounded;break;case"dot":default:r=this._drawDot}r.call(this,{x:t,y:i,size:e,rotation:n})},t.prototype._rotateFigure=function(t){var i,e=t.size,n=t.rotation,r=void 0===n?0:n,o=t.x+e/2,a=t.y+e/2;(0,t.draw)(),null===(i=this._element)||void 0===i||i.setAttribute("transform","rotate("+180*r/Math.PI+","+o+","+a+")")},t.prototype._basicDot=function(t){var i=this,e=t.size,n=t.x,r=t.y,o=e/7;this._rotateFigure(d(d({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("clip-rule","evenodd"),i._element.setAttribute("d","M "+(n+e/2)+" "+r+"a "+e/2+" "+e/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(e/2-o)+" "+(e/2-o)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var i=this,e=t.size,n=t.x,r=t.y,o=e/7;this._rotateFigure(d(d({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("clip-rule","evenodd"),i._element.setAttribute("d","M "+n+" "+r+"v "+e+"h "+e+"v "+-e+"zM "+(n+o)+" "+(r+o)+"h "+(e-2*o)+"v "+(e-2*o)+"h "+(2*o-e)+"z")}}))},t.prototype._basicExtraRounded=function(t){var i=this,e=t.x,n=t.y,r=t.size/7;this._rotateFigure(d(d({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","path"),i._element.setAttribute("clip-rule","evenodd"),i._element.setAttribute("d","M "+e+" "+(n+2.5*r)+"v "+2*r+"a "+2.5*r+" "+2.5*r+", 0, 0, 0, "+2.5*r+" "+2.5*r+"h "+2*r+"a "+2.5*r+" "+2.5*r+", 0, 0, 0, "+2.5*r+" "+2.5*-r+"v "+-2*r+"a "+2.5*r+" "+2.5*r+", 0, 0, 0, "+2.5*-r+" "+2.5*-r+"h "+-2*r+"a "+2.5*r+" "+2.5*r+", 0, 0, 0, "+2.5*-r+" "+2.5*r+"M "+(e+2.5*r)+" "+(n+r)+"h "+2*r+"a "+1.5*r+" "+1.5*r+", 0, 0, 1, "+1.5*r+" "+1.5*r+"v "+2*r+"a "+1.5*r+" "+1.5*r+", 0, 0, 1, "+1.5*-r+" "+1.5*r+"h "+-2*r+"a "+1.5*r+" "+1.5*r+", 0, 0, 1, "+1.5*-r+" "+1.5*-r+"v "+-2*r+"a "+1.5*r+" "+1.5*r+", 0, 0, 1, "+1.5*r+" "+1.5*-r)}}))},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 g=function(){return(g=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};const p=function(){function t(t){var i=t.type;this._svg=t.svg,this._type=i}return t.prototype.draw=function(t,i,e,n){var r;switch(this._type){case"square":r=this._drawSquare;break;case"dot":default:r=this._drawDot}r.call(this,{x:t,y:i,size:e,rotation:n})},t.prototype._rotateFigure=function(t){var i,e=t.size,n=t.rotation,r=void 0===n?0:n,o=t.x+e/2,a=t.y+e/2;(0,t.draw)(),null===(i=this._element)||void 0===i||i.setAttribute("transform","rotate("+180*r/Math.PI+","+o+","+a+")")},t.prototype._basicDot=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(g(g({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),i._element.setAttribute("cx",String(n+e/2)),i._element.setAttribute("cy",String(r+e/2)),i._element.setAttribute("r",String(e/2))}}))},t.prototype._basicSquare=function(t){var i=this,e=t.size,n=t.x,r=t.y;this._rotateFigure(g(g({},t),{draw:function(){i._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),i._element.setAttribute("x",String(n)),i._element.setAttribute("y",String(r)),i._element.setAttribute("width",String(e)),i._element.setAttribute("height",String(e))}}))},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}(),v="circle";var w=function(t,i,e,n){return new(e||(e=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(a,s)}c((n=n.apply(t,i||[])).next())}))},M=function(t,i){var e,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=i.call(t,a)}catch(t){o=[6,t],n=0}finally{e=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},y=[[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]],b=[[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 m=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 w(this,void 0,void 0,(function(){var i,e,n,r,o,a,s,c=this;return M(this,(function(u){switch(u.label){case 0:return i=t.getModuleCount(),e=Math.min(this._options.width,this._options.height)-2*this._options.margin,n=this._options.shape===v?e/Math.sqrt(2):e,r=Math.floor(n/i),o={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(u.sent(),!this._image)return[2];a=this._options,s=Math.floor(a.imageOptions.imageSize*h[a.qrOptions.errorCorrectionLevel]*i*i),o=function(t){var i=t.originalHeight,e=t.originalWidth,n=t.maxHiddenDots,r=t.maxHiddenAxisDots,o=t.dotSize,a={x:0,y:0},s={x:0,y:0};if(i<=0||e<=0||n<=0||o<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var c=i/e;return a.x=Math.floor(Math.sqrt(n/c)),a.x<=0&&(a.x=1),r&&r<a.x&&(a.x=r),a.x%2==0&&a.x--,s.x=a.x*o,a.y=1+2*Math.ceil((a.x*c-1)/2),s.y=Math.round(s.x*c),(a.y*a.x>n||r&&r<a.y)&&(r&&r<a.y?(a.y=r,a.y%2==0&&a.x--):a.y-=2,s.y=a.y*o,a.x=1+2*Math.ceil((a.y/c-1)/2),s.x=Math.round(s.y/c)),{height:s.y,width:s.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:s,maxHiddenAxisDots:i-14,dotSize:r}),u.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,e){var n,r,a,s,h,u;return!(c._options.imageOptions.hideBackgroundDots&&t>=(i-o.hideXDots)/2&&t<(i+o.hideXDots)/2&&e>=(i-o.hideYDots)/2&&e<(i+o.hideYDots)/2||(null===(n=y[t])||void 0===n?void 0:n[e])||(null===(r=y[t-i+7])||void 0===r?void 0:r[e])||(null===(a=y[t])||void 0===a?void 0:a[e-i+7])||(null===(s=b[t])||void 0===s?void 0:s[e])||(null===(h=b[t-i+7])||void 0===h?void 0:h[e])||(null===(u=b[t])||void 0===u?void 0:u[e-i+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:o.width,height:o.height,count:i,dotSize:r})]:[3,4];case 3:u.sent(),u.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,i,e,n=this._options;if(this._element){var r=null===(t=n.backgroundOptions)||void 0===t?void 0:t.gradient,o=null===(i=n.backgroundOptions)||void 0===i?void 0:i.color;if((r||o)&&this._createColor({options:r,color:o,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:"background-color"}),null===(e=n.backgroundOptions)||void 0===e?void 0:e.round){var a=Math.min(n.width,n.height),s=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),s.setAttribute("x",String((n.width-a)/2)),s.setAttribute("y",String((n.height-a)/2)),s.setAttribute("width",String(a)),s.setAttribute("height",String(a)),s.setAttribute("rx",String(a/2*n.backgroundOptions.round)),this._backgroundClipPath.appendChild(s)}}},t.prototype.drawDots=function(t){var i,e,n=this;if(!this._qr)throw"QR code is not defined";var r=this._options,o=this._qr.getModuleCount();if(o>r.width||o>r.height)throw"The canvas is too small.";var a=Math.min(r.width,r.height)-2*r.margin,s=r.shape===v?a/Math.sqrt(2):a,c=Math.floor(s/o),h=Math.floor((r.width-o*c)/2),u=Math.floor((r.height-o*c)/2),d=new l({svg:this._element,type:r.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===(i=r.dotsOptions)||void 0===i?void 0:i.gradient,color:r.dotsOptions.color,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"dot-color"});for(var f=function(i){for(var r=function(r){return t&&!t(i,r)?"continue":(null===(e=g._qr)||void 0===e?void 0:e.isDark(i,r))?(d.draw(h+i*c,u+r*c,c,(function(e,a){return!(i+e<0||r+a<0||i+e>=o||r+a>=o)&&!(t&&!t(i+e,r+a))&&!!n._qr&&n._qr.isDark(i+e,r+a)})),void(d._element&&g._dotsClipPath&&g._dotsClipPath.appendChild(d._element))):"continue"},a=0;a<o;a++)r(a)},g=this,p=0;p<o;p++)f(p);if(r.shape===v){var w=Math.floor((a/c-o)/2),M=o+2*w,y=h-w*c,b=u-w*c,m=[],x=Math.floor(M/2);for(p=0;p<M;p++){m[p]=[];for(var j=0;j<M;j++)m[p][j]=p>=w-1&&p<=M-w&&j>=w-1&&j<=M-w||Math.sqrt((p-x)*(p-x)+(j-x)*(j-x))>x?0:this._qr.isDark(j-2*w<0?j:j>=o?j-2*w:j-w,p-2*w<0?p:p>=o?p-2*w:p-w)?1:0}var L=function(t){for(var i=function(i){if(!m[t][i])return"continue";d.draw(y+t*c,b+i*c,c,(function(e,n){var r;return!!(null===(r=m[t+e])||void 0===r?void 0:r[i+n])})),d._element&&N._dotsClipPath&&N._dotsClipPath.appendChild(d._element)},e=0;e<M;e++)i(e)},N=this;for(p=0;p<M;p++)L(p)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var i=this._options;if(!this._element)throw"Element code is not defined";var e=this._qr.getModuleCount(),n=Math.min(i.width,i.height)-2*i.margin,r=i.shape===v?n/Math.sqrt(2):n,o=Math.floor(r/e),a=7*o,s=3*o,c=Math.floor((i.width-e*o)/2),h=Math.floor((i.height-e*o)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(n){var r,u,d,g,v,w,M,m,x,j,L,N,D=n[0],z=n[1],I=n[2],A=c+D*o*(e-7),k=h+z*o*(e-7),C=t._dotsClipPath,S=t._dotsClipPath;if(((null===(r=i.cornersSquareOptions)||void 0===r?void 0:r.gradient)||(null===(u=i.cornersSquareOptions)||void 0===u?void 0:u.color))&&((C=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+D+"-"+z),t._defs.appendChild(C),t._cornersSquareClipPath=t._cornersDotClipPath=S=C,t._createColor({options:null===(d=i.cornersSquareOptions)||void 0===d?void 0:d.gradient,color:null===(g=i.cornersSquareOptions)||void 0===g?void 0:g.color,additionalRotation:I,x:A,y:k,height:a,width:a,name:"corners-square-color-"+D+"-"+z})),null===(v=i.cornersSquareOptions)||void 0===v?void 0:v.type){var T=new f({svg:t._element,type:i.cornersSquareOptions.type});T.draw(A,k,a,I),T._element&&C&&C.appendChild(T._element)}else for(var O=new l({svg:t._element,type:i.dotsOptions.type}),U=function(t){for(var i=function(i){if(!(null===(w=y[t])||void 0===w?void 0:w[i]))return"continue";O.draw(A+t*o,k+i*o,o,(function(e,n){var r;return!!(null===(r=y[t+e])||void 0===r?void 0:r[i+n])})),O._element&&C&&C.appendChild(O._element)},e=0;e<y[t].length;e++)i(e)},Q=0;Q<y.length;Q++)U(Q);if(((null===(M=i.cornersDotOptions)||void 0===M?void 0:M.gradient)||(null===(m=i.cornersDotOptions)||void 0===m?void 0:m.color))&&((S=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+D+"-"+z),t._defs.appendChild(S),t._cornersDotClipPath=S,t._createColor({options:null===(x=i.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(j=i.cornersDotOptions)||void 0===j?void 0:j.color,additionalRotation:I,x:A+2*o,y:k+2*o,height:s,width:s,name:"corners-dot-color-"+D+"-"+z})),null===(L=i.cornersDotOptions)||void 0===L?void 0:L.type){var E=new p({svg:t._element,type:i.cornersDotOptions.type});E.draw(A+2*o,k+2*o,s,I),E._element&&S&&S.appendChild(E._element)}else{O=new l({svg:t._element,type:i.dotsOptions.type});var q=function(t){for(var i=function(i){if(!(null===(N=b[t])||void 0===N?void 0:N[i]))return"continue";O.draw(A+t*o,k+i*o,o,(function(e,n){var r;return!!(null===(r=b[t+e])||void 0===r?void 0:r[i+n])})),O._element&&S&&S.appendChild(O._element)},e=0;e<b[t].length;e++)i(e)};for(Q=0;Q<b.length;Q++)q(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(i,e){var n=t._options,r=new Image;if(!n.image)return e("Image is not defined");"string"==typeof n.imageOptions.crossOrigin&&(r.crossOrigin=n.imageOptions.crossOrigin),t._image=r,r.onload=function(){i()},r.src=n.image}))},t.prototype.drawImage=function(t){var i=t.width,e=t.height,n=t.count,r=t.dotSize;return w(this,void 0,void 0,(function(){var t,o,a,s,h,u,l,d,f;return M(this,(function(g){switch(g.label){case 0:return t=this._options,o=Math.floor((t.width-n*r)/2),a=Math.floor((t.height-n*r)/2),s=o+t.imageOptions.margin+(n*r-i)/2,h=a+t.imageOptions.margin+(n*r-e)/2,u=i-2*t.imageOptions.margin,l=e-2*t.imageOptions.margin,(d=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(s)),d.setAttribute("y",String(h)),d.setAttribute("width",u+"px"),d.setAttribute("height",l+"px"),[4,c(t.image||"")];case 1:return f=g.sent(),d.setAttribute("href",f||""),this._element.appendChild(d),[2]}}))}))},t.prototype._createColor=function(t){var i=t.options,e=t.color,n=t.additionalRotation,r=t.x,o=t.y,a=t.height,s=t.width,c=t.name,h=s>a?s:a,u=document.createElementNS("http://www.w3.org/2000/svg","rect");if(u.setAttribute("x",String(r)),u.setAttribute("y",String(o)),u.setAttribute("height",String(a)),u.setAttribute("width",String(s)),u.setAttribute("clip-path","url('#clip-path-"+c+"')"),i){var l;if("radial"===i.type)(l=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",c),l.setAttribute("gradientUnits","userSpaceOnUse"),l.setAttribute("fx",String(r+s/2)),l.setAttribute("fy",String(o+a/2)),l.setAttribute("cx",String(r+s/2)),l.setAttribute("cy",String(o+a/2)),l.setAttribute("r",String(h/2));else{var d=((i.rotation||0)+n)%(2*Math.PI),f=(d+2*Math.PI)%(2*Math.PI),g=r+s/2,p=o+a/2,v=r+s/2,w=o+a/2;f>=0&&f<=.25*Math.PI||f>1.75*Math.PI&&f<=2*Math.PI?(g-=s/2,p-=a/2*Math.tan(d),v+=s/2,w+=a/2*Math.tan(d)):f>.25*Math.PI&&f<=.75*Math.PI?(p-=a/2,g-=s/2/Math.tan(d),w+=a/2,v+=s/2/Math.tan(d)):f>.75*Math.PI&&f<=1.25*Math.PI?(g+=s/2,p+=a/2*Math.tan(d),v-=s/2,w-=a/2*Math.tan(d)):f>1.25*Math.PI&&f<=1.75*Math.PI&&(p+=a/2,g+=s/2/Math.tan(d),w-=a/2,v-=s/2/Math.tan(d)),(l=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",c),l.setAttribute("gradientUnits","userSpaceOnUse"),l.setAttribute("x1",String(Math.round(g))),l.setAttribute("y1",String(Math.round(p))),l.setAttribute("x2",String(Math.round(v))),l.setAttribute("y2",String(Math.round(w)))}i.colorStops.forEach((function(t){var i=t.offset,e=t.color,n=document.createElementNS("http://www.w3.org/2000/svg","stop");n.setAttribute("offset",100*i+"%"),n.setAttribute("stop-color",e),l.appendChild(n)})),u.setAttribute("fill","url('#"+c+"')"),this._defs.appendChild(l)}else e&&u.setAttribute("fill",e);this._element.appendChild(u)},t}(),x="canvas";for(var j={},L=0;L<=40;L++)j[L]=L;const N={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:j[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 D=function(){return(D=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};function z(t){var i=D({},t);if(!i.colorStops||!i.colorStops.length)throw"Field 'colorStops' is required in gradient";return i.rotation=i.rotation?Number(i.rotation):0,i.colorStops=i.colorStops.map((function(t){return D(D({},t),{offset:Number(t.offset)})})),i}function I(t){var i=D({},t);return i.width=Number(i.width),i.height=Number(i.height),i.margin=Number(i.margin),i.imageOptions=D(D({},i.imageOptions),{hideBackgroundDots:Boolean(i.imageOptions.hideBackgroundDots),imageSize:Number(i.imageOptions.imageSize),margin:Number(i.imageOptions.margin)}),i.margin>Math.min(i.width,i.height)&&(i.margin=Math.min(i.width,i.height)),i.dotsOptions=D({},i.dotsOptions),i.dotsOptions.gradient&&(i.dotsOptions.gradient=z(i.dotsOptions.gradient)),i.cornersSquareOptions&&(i.cornersSquareOptions=D({},i.cornersSquareOptions),i.cornersSquareOptions.gradient&&(i.cornersSquareOptions.gradient=z(i.cornersSquareOptions.gradient))),i.cornersDotOptions&&(i.cornersDotOptions=D({},i.cornersDotOptions),i.cornersDotOptions.gradient&&(i.cornersDotOptions.gradient=z(i.cornersDotOptions.gradient))),i.backgroundOptions&&(i.backgroundOptions=D({},i.backgroundOptions),i.backgroundOptions.gradient&&(i.backgroundOptions.gradient=z(i.backgroundOptions.gradient))),i}var A=e(192),k=e.n(A),C=function(t,i,e,n){return new(e||(e=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(a,s)}c((n=n.apply(t,i||[])).next())}))},S=function(t,i){var e,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=i.call(t,a)}catch(t){o=[6,t],n=0}finally{e=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};const T=function(){function t(t){this._options=t?I(a(N,t)):N,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var i=new m(this._options);this._svg=i.getElement(),this._svgDrawingPromise=i.drawQR(this._qr).then((function(){var e;t._svg&&(null===(e=t._extension)||void 0===e||e.call(t,i.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,i=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(i._svg){var t=i._svg,e=(new XMLSerializer).serializeToString(t),n="data:image/svg+xml;base64,"+btoa(e),r=new Image;return new Promise((function(t){r.onload=function(){var e,n;null===(n=null===(e=i._canvas)||void 0===e?void 0:e.getContext("2d"))||void 0===n||n.drawImage(r,0,0),t()},r.src=n}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),C(this,void 0,void 0,(function(){return S(this,(function(i){switch(i.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 i.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return i.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(i){t._clearContainer(this._container),this._options=i?I(a(this._options,i)):this._options,this._options.data&&(this._qr=k()(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"),C(this,void 0,void 0,(function(){var i,e,n;return S(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(i=r.sent())?"svg"===t.toLowerCase()?(e=new XMLSerializer,n=e.serializeToString(i),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+n],{type:"image/svg+xml"})]):[2,new Promise((function(e){return i.toBlob(e,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return C(this,void 0,void 0,(function(){var i,e,n,r,o;return S(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return i="png",e="qr","string"==typeof t?(i=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&&(e=t.name),t.extension&&(i=t.extension)),[4,this._getElement(i)];case 1:return(n=a.sent())?("svg"===i.toLowerCase()?(r=new XMLSerializer,o='<?xml version="1.0" standalone="no"?>\r\n'+(o=r.serializeToString(n)),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),e+".svg")):s(n.toDataURL("image/"+i),e+"."+i),[2]):[2]}}))}))},t}()}},i={};function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{}};return t[n](r,r.exports,e),r.exports}return e.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},e.d=(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),e(676)})().default}(f={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),f.exports)),p=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 g({data:this.qrData,width:this.size,height:this.size,image:this.logoSize>0?this.logoSrc||l: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 e("div",{ref:t=>{this.qr=t}})}},v={connect:"scan",certify:"credential"},w=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(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.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=l,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=n.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){await this.getSessionId(),this.result=n.ONGOING,this.poll().then((t=>{this.result=n.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===n.EXPIRED;if(i&&this.autorefresh)this.display();else if(t!==n.NOT_STARTED){let e=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}})),r()&&this.dynamicLink&&(window.location.href=this.getLink())}async stop(){this.clean(),this.result===n.ONGOING&&(this.result=n.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&&"connect"==this.qrRole)return this.authenticationRequest;let t="https://gataca.page.link/"+v[this.qrRole]+"?";return t+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,t+="&callback="+o(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,r=async function(o,a){let{result:s,data:c}=await(async t=>{if(t.result===n.NOT_STARTED)return{result:n.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(e);switch(s){case n.SUCCESS:o(c);break;case n.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(r,i,o,a):a(n.EXPIRED);break;default:a(s)}};return new Promise(r)}renderQRSection(){switch(this.result){case n.NOT_STARTED:return this.renderRetryButton();case n.ONGOING:return this.renderQR(this.getLink(),300,!0);case n.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case n.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case n.SUCCESS:return this.renderSuccess()}}renderSuccess(){return e("div",{class:"success"},e("img",{src:h,height:52,width:52}),e("p",{class:"successMsg"},this.successLoginLabel))}renderRetryButton(t){return e("div",{class:"reload"},e("div",{id:"notify",onClick:()=>this.display()},e("img",{src:u,height:24,width:24}),e("p",{class:"qrDescription"},this.clickInsideBoxLabel," "),t?e("p",{class:"qrDescription bold"},this.refreshQrLabel):e("p",{class:"qrDescription bold"},this.scanQrLabel,"e"),t&&e("div",{class:"alert"},e("img",{src:c,height:24,width:24}),e("p",null,t))),e("div",{id:"qrwait"},this.renderQR(this.waitingStartSessionLabel,250)))}renderQR(t,i,n){return e("gataca-qrdisplay",{qrData:t,rounded:!0,size:i,"logo-size":n?.33:0,"logo-src":this.logoSrc})}render(){return e("div",{class:"popUpContainer"},e("div",{class:"modal-window is-visible",onClick:t=>{t.stopPropagation()}},e("div",{class:"modal-window__content"},e("div",{class:"qrTitleContainer"},e("p",{class:"qrTitle",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&e("p",{class:"qrBrand"},this.byBrandLabel," ",e("span",null,e("img",{src:l}))),this.result!==n.SUCCESS&&!this.hideQrModalDescription&&e("p",{class:"qrDescription"},this.qrModalDescription)),e("div",{class:"qrSection"},this.renderQRSection()))))}};w.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 .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;padding:1px;background-color:white;min-height:350px;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:"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 .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}';const M={connect:"scan",certify:"credential"},y=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(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=n.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){let t=new WebSocket(this.socketEndpoint);setTimeout((()=>{this.socket.close(1e3,"")}),1e3*this.sessionTimeout),this.socket=t,t.onopen=()=>{this.wsOnOpen&&this.wsOnOpen(this.socket)},t.onmessage=t=>{if(this.wsOnMessage)this.wsOnMessage(this.socket,t);else{let i=JSON.parse(t.data);i.sessionId&&this.handleWSResponse(i)}},t.onerror=()=>{let i=new Error("Error connecting with server");this.result=n.FAILED,this.gatacaLoginFailed.emit(i),this.errorCallback(i),t.close(1e3,"")},t.onclose=()=>{if(this.result===n.ONGOING&&(this.result=n.EXPIRED),this.result===n.EXPIRED)if(this.autorefresh)this.display();else{let t=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(t),this.errorCallback(t)}},r()&&this.dynamicLink&&(window.location.href=this.getLink())}sessionMsgReceived(t){this.handleWSResponse(t.detail)}handleWSResponse(t){switch(this.result=t.result,t.result){case n.ONGOING:this.sessionId=t.sessionId,this.authenticationRequest=t.authenticationRequest;break;case n.SUCCESS:this.sessionData=t.authenticatedUserData,this.gatacaLoginCompleted.emit(t.authenticatedUserData),this.successCallback(t.authenticatedUserData),this.socket.close(1e3,"");break;case n.FAILED:this.socket.close();let i=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(i),this.errorCallback(i);break;case n.EXPIRED:if(this.socket.close(),this.autorefresh)this.display();else{let t=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(t),this.errorCallback(t)}}}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 t="https://gataca.page.link/"+M[this.qrRole]+"?";return t+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,t+="&callback="+o(encodeURIComponent(this.callbackServer)),t=encodeURIComponent(t),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+t:t}renderQRSection(){switch(this.result){case n.NOT_STARTED:return this.renderRetryButton();case n.ONGOING:return this.renderQR(this.getLink(),300,!0);case n.EXPIRED:return this.renderRetryButton("QR Code expired");case n.FAILED:return this.renderRetryButton("User credentials not validated");case n.SUCCESS:return this.renderSuccess()}}renderSuccess(){return e("div",{class:"success"},e("img",{src:h,height:52,width:52}),e("p",{class:"successMsg"},"Successful Connection!"))}renderRetryButton(t){return e("div",{class:"reload"},e("div",{id:"notify",onClick:()=>this.display()},e("img",{src:u,height:24,width:24}),e("p",{class:"qrDescription"},"Click inside the box to "),e("p",{class:"qrDescription bold"},t?"Refresh QR Code":"Scan QR Code"),t&&e("div",{class:"alert"},e("img",{src:c,height:24,width:24}),e("p",null,t))),e("div",{id:"qrwait"},this.renderQR("waiting to start a session",250)))}renderQR(t,i,n){return e("gataca-qrdisplay",{qrData:t,rounded:!0,size:i,"logo-size":n?.33:0})}render(){return e("div",{class:"popUpContainer"},e("div",{class:"modal-window is-visible",onClick:t=>{t.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:l}))),this.result!==n.SUCCESS&&e("p",{class:"qrDescription"},this.qrModalDescription)),e("div",{class:"qrSection"},this.renderQRSection()))))}};y.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.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}';const b=class{constructor(n){t(this,n),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=e("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 e("div",{class:"gatacaButtonWrapper"},e("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},e("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}),e("span",null,this.buttonText)))}render(){return e("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};b.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 m=class{constructor(n){t(this,n),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=e("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 e("div",{class:"gatacaButtonWrapper"},e("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},e("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}),e("span",null,this.buttonText)))}render(){return e("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};m.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{s as gataca_autoqr,w as gataca_qr,p as gataca_qrdisplay,y as gataca_qrws,b as gataca_ssibutton,m as gataca_ssibuttonws}