@zkpassport/ui 0.14.2 → 0.15.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +17 -12
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/react.cjs +17 -12
- package/dist/cjs/react.cjs.map +1 -1
- package/dist/esm/index.js +17 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react.js +17 -12
- package/dist/esm/react.js.map +1 -1
- package/dist/styles.css +15 -10
- package/package.json +3 -3
package/dist/cjs/react.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),be=require('qrcode'),sdk=require('@zkpassport/sdk'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var be__default=/*#__PURE__*/_interopDefault(be);var W,v,w1,P,z1,M1,Z1,n1,G,T,L1,i1,o1,a1,K={},$=[],fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y=Array.isArray;function Z(t,e){for(var r in e)t[r]=e[r];return t}function p1(t){t&&t.parentNode&&t.parentNode.removeChild(t);}function l1(t,e,r){var a,s,n,p={};for(n in e)n=="key"?a=e[n]:n=="ref"?s=e[n]:p[n]=e[n];if(arguments.length>2&&(p.children=arguments.length>3?W.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)p[n]===void 0&&(p[n]=t.defaultProps[n]);return j(t,p,a,s,null)}function j(t,e,r,a,s){var n={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++w1,__i:-1,__u:0};return s==null&&v.vnode!=null&&v.vnode(n),n}function L(t){return t.children}function F(t,e){this.props=t,this.context=e;}function O(t,e){if(e==null)return t.__?O(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?O(t):null}function he(t){if(t.__P&&t.__d){var e=t.__v,r=e.__e,a=[],s=[],n=Z({},e);n.__v=e.__v+1,v.vnode&&v.vnode(n),c1(t.__P,n,e,t.__n,t.__P.namespaceURI,32&e.__u?[r]:null,a,r??O(e),!!(32&e.__u),s),n.__v=e.__v,n.__.__k[n.__i]=n,P1(a,n,s),e.__e=e.__=null,n.__e!=r&&S1(n);}}function S1(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),S1(t)}function x1(t){(!t.__d&&(t.__d=true)&&P.push(t)&&!Q.__r++||z1!=v.debounceRendering)&&((z1=v.debounceRendering)||M1)(Q);}function Q(){try{for(var t,e=1;P.length;)P.length>e&&P.sort(Z1),t=P.shift(),e=P.length,he(t);}finally{P.length=Q.__r=0;}}function R1(t,e,r,a,s,n,p,l,u,i,f){var o,_,d,m,C,z,g,h=a&&a.__k||$,M=e.length;for(u=ve(r,e,h,u,M),o=0;o<M;o++)(d=r.__k[o])!=null&&(_=d.__i!=-1&&h[d.__i]||K,d.__i=o,z=c1(t,d,_,s,n,p,l,u,i,f),m=d.__e,d.ref&&_.ref!=d.ref&&(_.ref&&_1(_.ref,null,d),f.push(d.ref,d.__c||m,d)),C==null&&m!=null&&(C=m),(g=!!(4&d.__u))||_.__k===d.__k?(u=N1(d,u,t,g),g&&_.__e&&(_.__e=null)):typeof d.type=="function"&&z!==void 0?u=z:m&&(u=m.nextSibling),d.__u&=-7);return r.__e=C,u}function ve(t,e,r,a,s){var n,p,l,u,i,f=r.length,o=f,_=0;for(t.__k=new Array(s),n=0;n<s;n++)(p=e[n])!=null&&typeof p!="boolean"&&typeof p!="function"?(typeof p=="string"||typeof p=="number"||typeof p=="bigint"||p.constructor==String?p=t.__k[n]=j(null,p,null,null,null):Y(p)?p=t.__k[n]=j(L,{children:p},null,null,null):p.constructor===void 0&&p.__b>0?p=t.__k[n]=j(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):t.__k[n]=p,u=n+_,p.__=t,p.__b=t.__b+1,l=null,(i=p.__i=ge(p,r,u,o))!=-1&&(o--,(l=r[i])&&(l.__u|=2)),l==null||l.__v==null?(i==-1&&(s>f?_--:s<f&&_++),typeof p.type!="function"&&(p.__u|=4)):i!=u&&(i==u-1?_--:i==u+1?_++:(i>u?_--:_++,p.__u|=4))):t.__k[n]=null;if(o)for(n=0;n<f;n++)(l=r[n])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=O(l)),H1(l,l));return a}function N1(t,e,r,a){var s,n;if(typeof t.type=="function"){for(s=t.__k,n=0;s&&n<s.length;n++)s[n]&&(s[n].__=t,e=N1(s[n],e,r,a));return e}t.__e!=e&&(a&&(e&&t.type&&!e.parentNode&&(e=O(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ge(t,e,r,a){var s,n,p,l=t.key,u=t.type,i=e[r],f=i!=null&&(2&i.__u)==0;if(i===null&&l==null||f&&l==i.key&&u==i.type)return r;if(a>(f?1:0)){for(s=r-1,n=r+1;s>=0||n<e.length;)if((i=e[p=s>=0?s--:n++])!=null&&(2&i.__u)==0&&l==i.key&&u==i.type)return p}return -1}function C1(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||fe.test(e)?r:r+"px";}function B(t,e,r,a,s){var n,p;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else {if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||C1(t.style,e,"");if(r)for(e in r)a&&r[e]==a[e]||C1(t.style,e,r[e]);}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(L1,"$1")),p=e.toLowerCase(),e=p in t||e=="onFocusOut"||e=="onFocusIn"?p.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?a?r[T]=a[T]:(r[T]=i1,t.addEventListener(e,n?a1:o1,n)):t.removeEventListener(e,n?a1:o1,n);else {if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r));}}function b1(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e[G]==null)e[G]=i1++;else if(e[G]<r[T])return;return r(v.event?v.event(e):e)}}}function c1(t,e,r,a,s,n,p,l,u,i){var f,o,_,d,m,C,z,g,h,M,R,H,t1,E,U,b=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),n=[l=e.__e=r.__e]),(f=v.__b)&&f(e);e:if(typeof b=="function")try{if(g=e.props,h=b.prototype&&b.prototype.render,M=(f=b.contextType)&&a[f.__c],R=f?M?M.props.value:f.__:a,r.__c?z=(o=e.__c=r.__c).__=o.__E:(h?e.__c=o=new b(g,R):(e.__c=o=new F(g,R),o.constructor=b,o.render=ke),M&&M.sub(o),o.state||(o.state={}),o.__n=a,_=o.__d=!0,o.__h=[],o._sb=[]),h&&o.__s==null&&(o.__s=o.state),h&&b.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=Z({},o.__s)),Z(o.__s,b.getDerivedStateFromProps(g,o.__s))),d=o.props,m=o.state,o.__v=e,_)h&&b.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),h&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(h&&b.getDerivedStateFromProps==null&&g!==d&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(g,R),e.__v==r.__v||!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(g,o.__s,R)===!1){e.__v!=r.__v&&(o.props=g,o.state=o.__s,o.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(N){N&&(N.__=e);}),$.push.apply(o.__h,o._sb),o._sb=[],o.__h.length&&p.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(g,o.__s,R),h&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(d,m,C);});}if(o.context=R,o.props=g,o.__P=t,o.__e=!1,H=v.__r,t1=0,h)o.state=o.__s,o.__d=!1,H&&H(e),f=o.render(o.props,o.state,o.context),$.push.apply(o.__h,o._sb),o._sb=[];else do o.__d=!1,H&&H(e),f=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++t1<25);o.state=o.__s,o.getChildContext!=null&&(a=Z(Z({},a),o.getChildContext())),h&&!_&&o.getSnapshotBeforeUpdate!=null&&(C=o.getSnapshotBeforeUpdate(d,m)),E=f!=null&&f.type===L&&f.key==null?A1(f.props.children):f,l=R1(t,Y(E)?E:[E],e,r,a,s,n,p,l,u,i),o.base=e.__e,e.__u&=-161,o.__h.length&&p.push(o),z&&(o.__E=o.__=null);}catch(N){if(e.__v=null,u||n!=null)if(N.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l;}else {for(U=n.length;U--;)p1(n[U]);s1(e);}else e.__e=r.__e,e.__k=r.__k,N.then||s1(e);v.__e(N,e,r);}else n==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=me(r.__e,e,r,a,s,n,p,u,i);return (f=v.diffed)&&f(e),128&e.__u?void 0:l}function s1(t){t&&(t.__c&&(t.__c.__e=true),t.__k&&t.__k.some(s1));}function P1(t,e,r){for(var a=0;a<r.length;a++)_1(r[a],r[++a],r[++a]);v.__c&&v.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s);});}catch(n){v.__e(n,s.__v);}});}function A1(t){return typeof t!="object"||t==null||t.__b>0?t:Y(t)?t.map(A1):t.constructor!==void 0?null:Z({},t)}function me(t,e,r,a,s,n,p,l,u){var i,f,o,_,d,m,C,z=r.props||K,g=e.props,h=e.type;if(h=="svg"?s="http://www.w3.org/2000/svg":h=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(i=0;i<n.length;i++)if((d=n[i])&&"setAttribute"in d==!!h&&(h?d.localName==h:d.nodeType==3)){t=d,n[i]=null;break}}if(t==null){if(h==null)return document.createTextNode(g);t=document.createElementNS(s,h,g.is&&g),l&&(v.__m&&v.__m(e,n),l=false),n=null;}if(h==null)z===g||l&&t.data==g||(t.data=g);else {if(n=h=="textarea"&&g.defaultValue!=null?null:n&&W.call(t.childNodes),!l&&n!=null)for(z={},i=0;i<t.attributes.length;i++)z[(d=t.attributes[i]).name]=d.value;for(i in z)d=z[i],i=="dangerouslySetInnerHTML"?o=d:i=="children"||i in g||i=="value"&&"defaultValue"in g||i=="checked"&&"defaultChecked"in g||B(t,i,null,d,s);for(i in g)d=g[i],i=="children"?_=d:i=="dangerouslySetInnerHTML"?f=d:i=="value"?m=d:i=="checked"?C=d:l&&typeof d!="function"||z[i]===d||B(t,i,d,z[i],s);if(f)l||o&&(f.__html==o.__html||f.__html==t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(o&&(t.innerHTML=""),R1(e.type=="template"?t.content:t,Y(_)?_:[_],e,r,a,h=="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,p,n?n[0]:r.__k&&O(r,0),l,u),n!=null)for(i=n.length;i--;)p1(n[i]);l&&h!="textarea"||(i="value",h=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[i]||h=="progress"&&!m||h=="option"&&m!=z[i])&&B(t,i,m,z[i],s),i="checked",C!=null&&C!=t[i]&&B(t,i,C,z[i],s));}return t}function _1(t,e,r){try{if(typeof t=="function"){var a=typeof t.__u=="function";a&&t.__u(),a&&e==null||(t.__u=t(e));}else t.current=e;}catch(s){v.__e(s,r);}}function H1(t,e,r){var a,s;if(v.unmount&&v.unmount(t),(a=t.ref)&&(a.current&&a.current!=t.__e||_1(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount();}catch(n){v.__e(n,e);}a.base=a.__P=null;}if(a=t.__k)for(s=0;s<a.length;s++)a[s]&&H1(a[s],e,r||typeof t.type!="function");r||p1(t.__e),t.__c=t.__=t.__e=void 0;}function ke(t,e,r){return this.constructor(t,r)}function d1(t,e,r){var a,s,n,p;e==document&&(e=document.documentElement),v.__&&v.__(t,e),s=(a="undefined"=="function")?null:e.__k,n=[],p=[],c1(e,t=(e).__k=l1(L,null,[t]),s||K,K,e.namespaceURI,s?null:e.firstChild?W.call(e.childNodes):null,n,s?s.__e:e.firstChild,a,p),P1(n,t,p);}W=$.slice,v={__e:function(t,e,r,a){for(var s,n,p;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),p=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,a||{}),p=s.__d),p)return s.__E=s}catch(l){t=l;}throw t}},w1=0,F.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Z({},this.state),typeof t=="function"&&(t=t(Z({},r),this.props)),t&&Z(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),x1(this));},F.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),x1(this));},F.prototype.render=L,P=[],M1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z1=function(t,e){return t.__v.__b-e.__v.__b},Q.__r=0,n1=Math.random().toString(8),G="__d"+n1,T="__a"+n1,L1=/(PointerCapture)$|Capture$/i,i1=0,o1=b1(false),a1=b1(true);var q,k,u1,O1,I=0,B1=[],y=v,q1=y.__b,E1=y.__r,T1=y.diffed,I1=y.__c,D1=y.unmount,V1=y.__;function X(t,e){y.__h&&y.__h(k,t,I||e),I=0;var r=k.__H||(k.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function D(t){return I=1,ye(K1,t)}function ye(t,e,r){var a=X(q++,2);if(a.t=t,!a.__c&&(a.__=[K1(void 0,e),function(l){var u=a.__N?a.__N[0]:a.__[0],i=a.t(u,l);u!==i&&(a.__N=[i,a.__[1]],a.__c.setState({}));}],a.__c=k,!k.__f)){var s=function(l,u,i){if(!a.__c.__H)return true;var f=a.__c.__H.__.filter(function(_){return _.__c});if(f.every(function(_){return !_.__N}))return !n||n.call(this,l,u,i);var o=a.__c.props!==l;return f.some(function(_){if(_.__N){var d=_.__[0];_.__=_.__N,_.__N=void 0,d!==_.__[0]&&(o=true);}}),n&&n.call(this,l,u,i)||o};k.__f=true;var n=k.shouldComponentUpdate,p=k.componentWillUpdate;k.componentWillUpdate=function(l,u,i){if(this.__e){var f=n;n=void 0,s(l,u,i),n=f;}p&&p.call(this,l,u,i);},k.shouldComponentUpdate=s;}return a.__N||a.__}function e1(t,e){var r=X(q++,3);!y.__s&&v1(r.__H,e)&&(r.__=t,r.u=e,k.__H.__h.push(r));}function G1(t,e){var r=X(q++,4);!y.__s&&v1(r.__H,e)&&(r.__=t,r.u=e,k.__h.push(r));}function h1(t){return I=5,j1(function(){return {current:t}},[])}function j1(t,e){var r=X(q++,7);return v1(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function F1(t,e){return I=8,j1(function(){return t},e)}function ze(){for(var t;t=B1.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(J),e.__h.some(f1),e.__h=[];}catch(r){e.__h=[],y.__e(r,t.__v);}}}y.__b=function(t){k=null,q1&&q1(t);},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),V1&&V1(t,e);},y.__r=function(t){E1&&E1(t),q=0;var e=(k=t.__c).__H;e&&(u1===k?(e.__h=[],k.__h=[],e.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0;})):(e.__h.some(J),e.__h.some(f1),e.__h=[],q=0)),u1=k;},y.diffed=function(t){T1&&T1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(B1.push(e)!==1&&O1===y.requestAnimationFrame||((O1=y.requestAnimationFrame)||xe)(ze)),e.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0;})),u1=k=null;},y.__c=function(t,e){e.some(function(r){try{r.__h.some(J),r.__h=r.__h.filter(function(a){return !a.__||f1(a)});}catch(a){e.some(function(s){s.__h&&(s.__h=[]);}),e=[],y.__e(a,r.__v);}}),I1&&I1(t,e);},y.unmount=function(t){D1&&D1(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(a){try{J(a);}catch(s){e=s;}}),r.__H=void 0,e&&y.__e(e,r.__v));};var U1=typeof requestAnimationFrame=="function";function xe(t){var e,r=function(){clearTimeout(a),U1&&cancelAnimationFrame(e),setTimeout(t);},a=setTimeout(r,35);U1&&(e=requestAnimationFrame(r));}function J(t){var e=k,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),k=e;}function f1(t){var e=k;t.__c=t.__(),k=e;}function v1(t,e){return !t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function K1(t,e){return typeof e=="function"?e(t):e}var $1="https://zkpassport.id/r",Q1="https://apps.apple.com/us/app/zkpassport/id6477371975",W1="https://play.google.com/store/apps/details?id=app.zkpassport.zkpassport",g1='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" fill="none" aria-hidden="true"><path d="M15.0417 29.516C23.0399 29.516 29.5237 23.0338 29.5237 15.0378C29.5237 7.04166 23.0399 0.559547 15.0417 0.559547C7.04352 0.559547 0.559692 7.04166 0.559692 15.0378C0.559692 23.0338 7.04352 29.516 15.0417 29.516Z" fill="#2139A3"/><path d="M15.0417 0C23.349 0 30.0834 6.73263 30.0834 15.0377C30.0834 23.3429 23.349 30.0755 15.0417 30.0755C6.73441 30.0755 0 23.3429 0 15.0377C0 6.73263 6.73441 0 15.0417 0ZM15.0417 1.60869C7.62309 1.60869 1.60911 7.62108 1.60911 15.0377C1.60911 22.4544 7.62309 28.4668 15.0417 28.4668C22.4603 28.4668 28.4743 22.4544 28.4743 15.0377C28.4743 7.62108 22.4603 1.60869 15.0417 1.60869ZM15.0592 3.09498C21.6662 3.09498 27.0226 8.44173 27.0226 15.0377C27.0226 21.6338 21.6662 26.9805 15.0592 26.9805C8.45221 26.9805 3.09579 21.6338 3.09579 15.0377C3.09579 8.44173 8.45221 3.09498 15.0592 3.09498ZM9.96458 22.0322L6.92138 22.0322C8.39067 23.7337 10.3865 24.9694 12.6564 25.4872C11.5835 24.7598 10.6605 23.5567 9.96458 22.0322ZM23.197 22.0322L20.1538 22.0322C19.4579 23.5567 18.5349 24.7598 17.4621 25.4874C19.7319 24.9694 21.7277 23.7337 23.197 22.0322ZM14.3421 22.032L11.2161 22.0321C12.0187 23.8592 13.1229 25.1125 14.3421 25.4638L14.3421 22.032ZM18.8674 22.0321L15.7413 22.032L15.7414 25.4638C16.9606 25.1125 18.0648 23.8591 18.8674 22.0321ZM25.7572 15.9821L21.5259 15.982C21.4396 17.8044 21.1057 19.5076 20.5786 20.9831L23.9963 20.983C24.9699 19.5278 25.5963 17.8215 25.7572 15.9821ZM8.59253 15.982L4.36123 15.9821C4.5221 17.8215 5.14847 19.5278 6.1221 20.983L9.53983 20.9831C9.01269 19.5076 8.67877 17.8044 8.59253 15.982ZM20.1638 15.9821L15.7413 15.982V20.9829L19.2733 20.983C19.7636 19.5382 20.0831 17.8314 20.1638 15.9821ZM14.3421 15.982L9.91967 15.9821C10.0003 17.8314 10.3198 19.5382 10.8101 20.983L14.3421 20.9829V15.982ZM24.2843 9.54718L20.7326 9.54709C21.2388 11.1259 21.5307 12.9383 21.5474 14.8629L25.7969 14.8629L25.7969 14.8605C25.7653 12.9205 25.2174 11.1057 24.2843 9.54718ZM9.38584 9.54709L5.83411 9.54718C4.9006 11.1063 4.35262 12.922 4.32152 14.8629L8.57108 14.8629L8.57113 14.8531C8.58872 12.9322 8.88051 11.1232 9.38584 9.54709ZM19.4086 9.54708L15.7413 9.54722V14.8629L20.183 14.8629C20.1655 12.9105 19.8822 11.0944 19.4086 9.54708ZM14.3421 9.54722L10.6748 9.54708C10.2012 11.0944 9.91791 12.9105 9.90041 14.8629L14.3421 14.8629V9.54722ZM17.462 4.5883L17.5252 4.6316C18.6751 5.43583 19.6492 6.78889 20.3507 8.49789H23.5684C22.073 6.56232 19.9294 5.15119 17.462 4.5883ZM12.6563 4.58812L12.6442 4.59108C10.182 5.15582 8.04296 6.5655 6.54996 8.49789H9.76772C10.4821 6.75769 11.479 5.38655 12.6563 4.58812ZM15.7414 4.64663L15.7413 8.49807L19.0424 8.49792C18.2293 6.4439 17.0518 5.02425 15.7414 4.64663ZM11.0411 8.49792L14.3421 8.49807L14.3421 4.64662C13.0317 5.02423 11.8541 6.44388 11.0411 8.49792Z" fill="url(#zkp-mark-grad)"/><defs><linearGradient id="zkp-mark-grad" x1="15.0417" y1="0" x2="15.0417" y2="30.0755" gradientUnits="userSpaceOnUse"><stop stop-color="#F2DCB0"/><stop offset="1" stop-color="#F6D38F"/></linearGradient></defs></svg>',Y1=`
|
|
2
|
+
'use strict';var react=require('react'),be=require('qrcode'),sdk=require('@zkpassport/sdk'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var be__default=/*#__PURE__*/_interopDefault(be);var W,v,w1,P,z1,M1,Z1,n1,G,T,L1,i1,o1,a1,K={},$=[],fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y=Array.isArray;function Z(t,e){for(var r in e)t[r]=e[r];return t}function p1(t){t&&t.parentNode&&t.parentNode.removeChild(t);}function l1(t,e,r){var a,s,n,p={};for(n in e)n=="key"?a=e[n]:n=="ref"?s=e[n]:p[n]=e[n];if(arguments.length>2&&(p.children=arguments.length>3?W.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)p[n]===void 0&&(p[n]=t.defaultProps[n]);return j(t,p,a,s,null)}function j(t,e,r,a,s){var n={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++w1,__i:-1,__u:0};return s==null&&v.vnode!=null&&v.vnode(n),n}function L(t){return t.children}function F(t,e){this.props=t,this.context=e;}function q(t,e){if(e==null)return t.__?q(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?q(t):null}function he(t){if(t.__P&&t.__d){var e=t.__v,r=e.__e,a=[],s=[],n=Z({},e);n.__v=e.__v+1,v.vnode&&v.vnode(n),c1(t.__P,n,e,t.__n,t.__P.namespaceURI,32&e.__u?[r]:null,a,r??q(e),!!(32&e.__u),s),n.__v=e.__v,n.__.__k[n.__i]=n,P1(a,n,s),e.__e=e.__=null,n.__e!=r&&S1(n);}}function S1(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),S1(t)}function x1(t){(!t.__d&&(t.__d=true)&&P.push(t)&&!Q.__r++||z1!=v.debounceRendering)&&((z1=v.debounceRendering)||M1)(Q);}function Q(){try{for(var t,e=1;P.length;)P.length>e&&P.sort(Z1),t=P.shift(),e=P.length,he(t);}finally{P.length=Q.__r=0;}}function R1(t,e,r,a,s,n,p,l,u,i,f){var o,_,d,m,C,z,g,h=a&&a.__k||$,M=e.length;for(u=ve(r,e,h,u,M),o=0;o<M;o++)(d=r.__k[o])!=null&&(_=d.__i!=-1&&h[d.__i]||K,d.__i=o,z=c1(t,d,_,s,n,p,l,u,i,f),m=d.__e,d.ref&&_.ref!=d.ref&&(_.ref&&_1(_.ref,null,d),f.push(d.ref,d.__c||m,d)),C==null&&m!=null&&(C=m),(g=!!(4&d.__u))||_.__k===d.__k?(u=N1(d,u,t,g),g&&_.__e&&(_.__e=null)):typeof d.type=="function"&&z!==void 0?u=z:m&&(u=m.nextSibling),d.__u&=-7);return r.__e=C,u}function ve(t,e,r,a,s){var n,p,l,u,i,f=r.length,o=f,_=0;for(t.__k=new Array(s),n=0;n<s;n++)(p=e[n])!=null&&typeof p!="boolean"&&typeof p!="function"?(typeof p=="string"||typeof p=="number"||typeof p=="bigint"||p.constructor==String?p=t.__k[n]=j(null,p,null,null,null):Y(p)?p=t.__k[n]=j(L,{children:p},null,null,null):p.constructor===void 0&&p.__b>0?p=t.__k[n]=j(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):t.__k[n]=p,u=n+_,p.__=t,p.__b=t.__b+1,l=null,(i=p.__i=ge(p,r,u,o))!=-1&&(o--,(l=r[i])&&(l.__u|=2)),l==null||l.__v==null?(i==-1&&(s>f?_--:s<f&&_++),typeof p.type!="function"&&(p.__u|=4)):i!=u&&(i==u-1?_--:i==u+1?_++:(i>u?_--:_++,p.__u|=4))):t.__k[n]=null;if(o)for(n=0;n<f;n++)(l=r[n])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=q(l)),H1(l,l));return a}function N1(t,e,r,a){var s,n;if(typeof t.type=="function"){for(s=t.__k,n=0;s&&n<s.length;n++)s[n]&&(s[n].__=t,e=N1(s[n],e,r,a));return e}t.__e!=e&&(a&&(e&&t.type&&!e.parentNode&&(e=q(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ge(t,e,r,a){var s,n,p,l=t.key,u=t.type,i=e[r],f=i!=null&&(2&i.__u)==0;if(i===null&&l==null||f&&l==i.key&&u==i.type)return r;if(a>(f?1:0)){for(s=r-1,n=r+1;s>=0||n<e.length;)if((i=e[p=s>=0?s--:n++])!=null&&(2&i.__u)==0&&l==i.key&&u==i.type)return p}return -1}function C1(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||fe.test(e)?r:r+"px";}function B(t,e,r,a,s){var n,p;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else {if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||C1(t.style,e,"");if(r)for(e in r)a&&r[e]==a[e]||C1(t.style,e,r[e]);}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(L1,"$1")),p=e.toLowerCase(),e=p in t||e=="onFocusOut"||e=="onFocusIn"?p.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?a?r[T]=a[T]:(r[T]=i1,t.addEventListener(e,n?a1:o1,n)):t.removeEventListener(e,n?a1:o1,n);else {if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r));}}function b1(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e[G]==null)e[G]=i1++;else if(e[G]<r[T])return;return r(v.event?v.event(e):e)}}}function c1(t,e,r,a,s,n,p,l,u,i){var f,o,_,d,m,C,z,g,h,M,R,H,t1,E,U,b=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),n=[l=e.__e=r.__e]),(f=v.__b)&&f(e);e:if(typeof b=="function")try{if(g=e.props,h=b.prototype&&b.prototype.render,M=(f=b.contextType)&&a[f.__c],R=f?M?M.props.value:f.__:a,r.__c?z=(o=e.__c=r.__c).__=o.__E:(h?e.__c=o=new b(g,R):(e.__c=o=new F(g,R),o.constructor=b,o.render=ke),M&&M.sub(o),o.state||(o.state={}),o.__n=a,_=o.__d=!0,o.__h=[],o._sb=[]),h&&o.__s==null&&(o.__s=o.state),h&&b.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=Z({},o.__s)),Z(o.__s,b.getDerivedStateFromProps(g,o.__s))),d=o.props,m=o.state,o.__v=e,_)h&&b.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),h&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(h&&b.getDerivedStateFromProps==null&&g!==d&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(g,R),e.__v==r.__v||!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(g,o.__s,R)===!1){e.__v!=r.__v&&(o.props=g,o.state=o.__s,o.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(N){N&&(N.__=e);}),$.push.apply(o.__h,o._sb),o._sb=[],o.__h.length&&p.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(g,o.__s,R),h&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(d,m,C);});}if(o.context=R,o.props=g,o.__P=t,o.__e=!1,H=v.__r,t1=0,h)o.state=o.__s,o.__d=!1,H&&H(e),f=o.render(o.props,o.state,o.context),$.push.apply(o.__h,o._sb),o._sb=[];else do o.__d=!1,H&&H(e),f=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++t1<25);o.state=o.__s,o.getChildContext!=null&&(a=Z(Z({},a),o.getChildContext())),h&&!_&&o.getSnapshotBeforeUpdate!=null&&(C=o.getSnapshotBeforeUpdate(d,m)),E=f!=null&&f.type===L&&f.key==null?A1(f.props.children):f,l=R1(t,Y(E)?E:[E],e,r,a,s,n,p,l,u,i),o.base=e.__e,e.__u&=-161,o.__h.length&&p.push(o),z&&(o.__E=o.__=null);}catch(N){if(e.__v=null,u||n!=null)if(N.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l;}else {for(U=n.length;U--;)p1(n[U]);s1(e);}else e.__e=r.__e,e.__k=r.__k,N.then||s1(e);v.__e(N,e,r);}else n==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=me(r.__e,e,r,a,s,n,p,u,i);return (f=v.diffed)&&f(e),128&e.__u?void 0:l}function s1(t){t&&(t.__c&&(t.__c.__e=true),t.__k&&t.__k.some(s1));}function P1(t,e,r){for(var a=0;a<r.length;a++)_1(r[a],r[++a],r[++a]);v.__c&&v.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s);});}catch(n){v.__e(n,s.__v);}});}function A1(t){return typeof t!="object"||t==null||t.__b>0?t:Y(t)?t.map(A1):t.constructor!==void 0?null:Z({},t)}function me(t,e,r,a,s,n,p,l,u){var i,f,o,_,d,m,C,z=r.props||K,g=e.props,h=e.type;if(h=="svg"?s="http://www.w3.org/2000/svg":h=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(i=0;i<n.length;i++)if((d=n[i])&&"setAttribute"in d==!!h&&(h?d.localName==h:d.nodeType==3)){t=d,n[i]=null;break}}if(t==null){if(h==null)return document.createTextNode(g);t=document.createElementNS(s,h,g.is&&g),l&&(v.__m&&v.__m(e,n),l=false),n=null;}if(h==null)z===g||l&&t.data==g||(t.data=g);else {if(n=h=="textarea"&&g.defaultValue!=null?null:n&&W.call(t.childNodes),!l&&n!=null)for(z={},i=0;i<t.attributes.length;i++)z[(d=t.attributes[i]).name]=d.value;for(i in z)d=z[i],i=="dangerouslySetInnerHTML"?o=d:i=="children"||i in g||i=="value"&&"defaultValue"in g||i=="checked"&&"defaultChecked"in g||B(t,i,null,d,s);for(i in g)d=g[i],i=="children"?_=d:i=="dangerouslySetInnerHTML"?f=d:i=="value"?m=d:i=="checked"?C=d:l&&typeof d!="function"||z[i]===d||B(t,i,d,z[i],s);if(f)l||o&&(f.__html==o.__html||f.__html==t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(o&&(t.innerHTML=""),R1(e.type=="template"?t.content:t,Y(_)?_:[_],e,r,a,h=="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,p,n?n[0]:r.__k&&q(r,0),l,u),n!=null)for(i=n.length;i--;)p1(n[i]);l&&h!="textarea"||(i="value",h=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[i]||h=="progress"&&!m||h=="option"&&m!=z[i])&&B(t,i,m,z[i],s),i="checked",C!=null&&C!=t[i]&&B(t,i,C,z[i],s));}return t}function _1(t,e,r){try{if(typeof t=="function"){var a=typeof t.__u=="function";a&&t.__u(),a&&e==null||(t.__u=t(e));}else t.current=e;}catch(s){v.__e(s,r);}}function H1(t,e,r){var a,s;if(v.unmount&&v.unmount(t),(a=t.ref)&&(a.current&&a.current!=t.__e||_1(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount();}catch(n){v.__e(n,e);}a.base=a.__P=null;}if(a=t.__k)for(s=0;s<a.length;s++)a[s]&&H1(a[s],e,r||typeof t.type!="function");r||p1(t.__e),t.__c=t.__=t.__e=void 0;}function ke(t,e,r){return this.constructor(t,r)}function d1(t,e,r){var a,s,n,p;e==document&&(e=document.documentElement),v.__&&v.__(t,e),s=(a="undefined"=="function")?null:e.__k,n=[],p=[],c1(e,t=(e).__k=l1(L,null,[t]),s||K,K,e.namespaceURI,s?null:e.firstChild?W.call(e.childNodes):null,n,s?s.__e:e.firstChild,a,p),P1(n,t,p);}W=$.slice,v={__e:function(t,e,r,a){for(var s,n,p;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),p=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,a||{}),p=s.__d),p)return s.__E=s}catch(l){t=l;}throw t}},w1=0,F.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Z({},this.state),typeof t=="function"&&(t=t(Z({},r),this.props)),t&&Z(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),x1(this));},F.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),x1(this));},F.prototype.render=L,P=[],M1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z1=function(t,e){return t.__v.__b-e.__v.__b},Q.__r=0,n1=Math.random().toString(8),G="__d"+n1,T="__a"+n1,L1=/(PointerCapture)$|Capture$/i,i1=0,o1=b1(false),a1=b1(true);var O,k,u1,q1,I=0,B1=[],y=v,O1=y.__b,E1=y.__r,T1=y.diffed,I1=y.__c,D1=y.unmount,V1=y.__;function X(t,e){y.__h&&y.__h(k,t,I||e),I=0;var r=k.__H||(k.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function D(t){return I=1,ye(K1,t)}function ye(t,e,r){var a=X(O++,2);if(a.t=t,!a.__c&&(a.__=[K1(void 0,e),function(l){var u=a.__N?a.__N[0]:a.__[0],i=a.t(u,l);u!==i&&(a.__N=[i,a.__[1]],a.__c.setState({}));}],a.__c=k,!k.__f)){var s=function(l,u,i){if(!a.__c.__H)return true;var f=a.__c.__H.__.filter(function(_){return _.__c});if(f.every(function(_){return !_.__N}))return !n||n.call(this,l,u,i);var o=a.__c.props!==l;return f.some(function(_){if(_.__N){var d=_.__[0];_.__=_.__N,_.__N=void 0,d!==_.__[0]&&(o=true);}}),n&&n.call(this,l,u,i)||o};k.__f=true;var n=k.shouldComponentUpdate,p=k.componentWillUpdate;k.componentWillUpdate=function(l,u,i){if(this.__e){var f=n;n=void 0,s(l,u,i),n=f;}p&&p.call(this,l,u,i);},k.shouldComponentUpdate=s;}return a.__N||a.__}function e1(t,e){var r=X(O++,3);!y.__s&&v1(r.__H,e)&&(r.__=t,r.u=e,k.__H.__h.push(r));}function G1(t,e){var r=X(O++,4);!y.__s&&v1(r.__H,e)&&(r.__=t,r.u=e,k.__h.push(r));}function h1(t){return I=5,j1(function(){return {current:t}},[])}function j1(t,e){var r=X(O++,7);return v1(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function F1(t,e){return I=8,j1(function(){return t},e)}function ze(){for(var t;t=B1.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(J),e.__h.some(f1),e.__h=[];}catch(r){e.__h=[],y.__e(r,t.__v);}}}y.__b=function(t){k=null,O1&&O1(t);},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),V1&&V1(t,e);},y.__r=function(t){E1&&E1(t),O=0;var e=(k=t.__c).__H;e&&(u1===k?(e.__h=[],k.__h=[],e.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0;})):(e.__h.some(J),e.__h.some(f1),e.__h=[],O=0)),u1=k;},y.diffed=function(t){T1&&T1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(B1.push(e)!==1&&q1===y.requestAnimationFrame||((q1=y.requestAnimationFrame)||xe)(ze)),e.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0;})),u1=k=null;},y.__c=function(t,e){e.some(function(r){try{r.__h.some(J),r.__h=r.__h.filter(function(a){return !a.__||f1(a)});}catch(a){e.some(function(s){s.__h&&(s.__h=[]);}),e=[],y.__e(a,r.__v);}}),I1&&I1(t,e);},y.unmount=function(t){D1&&D1(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(a){try{J(a);}catch(s){e=s;}}),r.__H=void 0,e&&y.__e(e,r.__v));};var U1=typeof requestAnimationFrame=="function";function xe(t){var e,r=function(){clearTimeout(a),U1&&cancelAnimationFrame(e),setTimeout(t);},a=setTimeout(r,35);U1&&(e=requestAnimationFrame(r));}function J(t){var e=k,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),k=e;}function f1(t){var e=k;t.__c=t.__(),k=e;}function v1(t,e){return !t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function K1(t,e){return typeof e=="function"?e(t):e}var $1="https://zkpassport.id/r",Q1="https://apps.apple.com/us/app/zkpassport/id6477371975",W1="https://play.google.com/store/apps/details?id=app.zkpassport.zkpassport",g1='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" fill="none" aria-hidden="true"><path d="M15.0417 29.516C23.0399 29.516 29.5237 23.0338 29.5237 15.0378C29.5237 7.04166 23.0399 0.559547 15.0417 0.559547C7.04352 0.559547 0.559692 7.04166 0.559692 15.0378C0.559692 23.0338 7.04352 29.516 15.0417 29.516Z" fill="#2139A3"/><path d="M15.0417 0C23.349 0 30.0834 6.73263 30.0834 15.0377C30.0834 23.3429 23.349 30.0755 15.0417 30.0755C6.73441 30.0755 0 23.3429 0 15.0377C0 6.73263 6.73441 0 15.0417 0ZM15.0417 1.60869C7.62309 1.60869 1.60911 7.62108 1.60911 15.0377C1.60911 22.4544 7.62309 28.4668 15.0417 28.4668C22.4603 28.4668 28.4743 22.4544 28.4743 15.0377C28.4743 7.62108 22.4603 1.60869 15.0417 1.60869ZM15.0592 3.09498C21.6662 3.09498 27.0226 8.44173 27.0226 15.0377C27.0226 21.6338 21.6662 26.9805 15.0592 26.9805C8.45221 26.9805 3.09579 21.6338 3.09579 15.0377C3.09579 8.44173 8.45221 3.09498 15.0592 3.09498ZM9.96458 22.0322L6.92138 22.0322C8.39067 23.7337 10.3865 24.9694 12.6564 25.4872C11.5835 24.7598 10.6605 23.5567 9.96458 22.0322ZM23.197 22.0322L20.1538 22.0322C19.4579 23.5567 18.5349 24.7598 17.4621 25.4874C19.7319 24.9694 21.7277 23.7337 23.197 22.0322ZM14.3421 22.032L11.2161 22.0321C12.0187 23.8592 13.1229 25.1125 14.3421 25.4638L14.3421 22.032ZM18.8674 22.0321L15.7413 22.032L15.7414 25.4638C16.9606 25.1125 18.0648 23.8591 18.8674 22.0321ZM25.7572 15.9821L21.5259 15.982C21.4396 17.8044 21.1057 19.5076 20.5786 20.9831L23.9963 20.983C24.9699 19.5278 25.5963 17.8215 25.7572 15.9821ZM8.59253 15.982L4.36123 15.9821C4.5221 17.8215 5.14847 19.5278 6.1221 20.983L9.53983 20.9831C9.01269 19.5076 8.67877 17.8044 8.59253 15.982ZM20.1638 15.9821L15.7413 15.982V20.9829L19.2733 20.983C19.7636 19.5382 20.0831 17.8314 20.1638 15.9821ZM14.3421 15.982L9.91967 15.9821C10.0003 17.8314 10.3198 19.5382 10.8101 20.983L14.3421 20.9829V15.982ZM24.2843 9.54718L20.7326 9.54709C21.2388 11.1259 21.5307 12.9383 21.5474 14.8629L25.7969 14.8629L25.7969 14.8605C25.7653 12.9205 25.2174 11.1057 24.2843 9.54718ZM9.38584 9.54709L5.83411 9.54718C4.9006 11.1063 4.35262 12.922 4.32152 14.8629L8.57108 14.8629L8.57113 14.8531C8.58872 12.9322 8.88051 11.1232 9.38584 9.54709ZM19.4086 9.54708L15.7413 9.54722V14.8629L20.183 14.8629C20.1655 12.9105 19.8822 11.0944 19.4086 9.54708ZM14.3421 9.54722L10.6748 9.54708C10.2012 11.0944 9.91791 12.9105 9.90041 14.8629L14.3421 14.8629V9.54722ZM17.462 4.5883L17.5252 4.6316C18.6751 5.43583 19.6492 6.78889 20.3507 8.49789H23.5684C22.073 6.56232 19.9294 5.15119 17.462 4.5883ZM12.6563 4.58812L12.6442 4.59108C10.182 5.15582 8.04296 6.5655 6.54996 8.49789H9.76772C10.4821 6.75769 11.479 5.38655 12.6563 4.58812ZM15.7414 4.64663L15.7413 8.49807L19.0424 8.49792C18.2293 6.4439 17.0518 5.02425 15.7414 4.64663ZM11.0411 8.49792L14.3421 8.49807L14.3421 4.64662C13.0317 5.02423 11.8541 6.44388 11.0411 8.49792Z" fill="url(#zkp-mark-grad)"/><defs><linearGradient id="zkp-mark-grad" x1="15.0417" y1="0" x2="15.0417" y2="30.0755" gradientUnits="userSpaceOnUse"><stop stop-color="#F2DCB0"/><stop offset="1" stop-color="#F6D38F"/></linearGradient></defs></svg>',Y1=`
|
|
3
3
|
<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
4
4
|
<defs>
|
|
5
5
|
<linearGradient id="zkp-spin-mark-grad" x1="15.0417" y1="0" x2="15.0417" y2="30.0755" gradientUnits="userSpaceOnUse">
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
--zkp-brand: #2139a3;
|
|
24
24
|
--zkp-success: #16a34a;
|
|
25
25
|
--zkp-error: #dc2626;
|
|
26
|
+
--zkp-qr-padding: 0px;
|
|
26
27
|
|
|
27
28
|
all: revert;
|
|
28
29
|
position: relative;
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
--zkp-brand: #6b86d8;
|
|
53
54
|
--zkp-success: #4ade80;
|
|
54
55
|
--zkp-error: #f87171;
|
|
56
|
+
--zkp-qr-padding: 12px;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
@media (prefers-color-scheme: dark) {
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
--zkp-brand: #6b86d8;
|
|
66
68
|
--zkp-success: #4ade80;
|
|
67
69
|
--zkp-error: #f87171;
|
|
70
|
+
--zkp-qr-padding: 12px;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -107,14 +110,14 @@
|
|
|
107
110
|
.zkp-app-icon-slot {
|
|
108
111
|
max-width: 96px;
|
|
109
112
|
min-width: 32px;
|
|
113
|
+
overflow: hidden;
|
|
110
114
|
}
|
|
111
115
|
.zkp-app-icon {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
width: auto;
|
|
115
|
-
|
|
116
|
-
object-fit: contain;
|
|
117
|
-
display: block;
|
|
116
|
+
display: block !important;
|
|
117
|
+
height: 32px !important;
|
|
118
|
+
width: auto !important;
|
|
119
|
+
max-width: 96px !important;
|
|
120
|
+
object-fit: contain !important;
|
|
118
121
|
}
|
|
119
122
|
.zkp-header-dots {
|
|
120
123
|
display: flex;
|
|
@@ -181,21 +184,23 @@
|
|
|
181
184
|
margin: 10px 0 14px;
|
|
182
185
|
}
|
|
183
186
|
|
|
184
|
-
/* QR slot */
|
|
185
187
|
.zkp-qr-slot {
|
|
186
188
|
position: relative;
|
|
187
189
|
width: 100%;
|
|
188
190
|
aspect-ratio: 1;
|
|
189
191
|
margin: 16px 0 0;
|
|
190
|
-
background:
|
|
192
|
+
background: #ffffff;
|
|
191
193
|
display: grid;
|
|
192
194
|
place-items: center;
|
|
193
195
|
overflow: hidden;
|
|
196
|
+
border-radius: 8px;
|
|
194
197
|
}
|
|
195
198
|
.zkp-qr {
|
|
196
199
|
width: 100%;
|
|
197
200
|
height: 100%;
|
|
198
|
-
color:
|
|
201
|
+
color: #000000;
|
|
202
|
+
background: #ffffff;
|
|
203
|
+
padding: var(--zkp-qr-padding);
|
|
199
204
|
transition:
|
|
200
205
|
opacity 200ms ease,
|
|
201
206
|
transform 200ms ease;
|
|
@@ -212,7 +217,7 @@
|
|
|
212
217
|
transform: translate(-50%, -50%);
|
|
213
218
|
width: 14%;
|
|
214
219
|
aspect-ratio: 1;
|
|
215
|
-
background:
|
|
220
|
+
background: #ffffff;
|
|
216
221
|
padding: 3px;
|
|
217
222
|
border-radius: 50%;
|
|
218
223
|
display: grid;
|
|
@@ -560,6 +565,6 @@
|
|
|
560
565
|
}
|
|
561
566
|
}
|
|
562
567
|
}
|
|
563
|
-
`;function ie(t){let[e,r]=D("preparing"),[a,s]=D(null),[n,p]=D(null),[l,u]=D(0),i=h1(t);i.current=t;let f=h1(null);f.current===null&&(f.current=new sdk.ZKPassport(t.domain)),e1(()=>{let _=false,d=false;r("preparing"),s(null),p(null);let{domain:m,theme:C,query:z,onReady:g,onRetryClicked:h,onBridgeConnect:M,onRequestReceived:R,onGeneratingProof:H,onProofGenerated:t1,onResult:E,onReject:U,onError:b,...N}=i.current,y1=()=>{d||(d=true,S(i.current.onReady));},A=r1=>(...x)=>{if(!_)try{r1(...x);}catch{r("error");}};return f.current.request(N).then(r1=>{if(_)return;let x;try{x=z(r1);}catch{r("error");return}x.onBridgeConnect(A(()=>{r(w=>w==="preparing"||w==="connecting"?"waiting":w),y1(),S(i.current.onBridgeConnect);})),x.onRequestReceived(A(()=>{r("scanned"),S(i.current.onRequestReceived);})),x.onGeneratingProof(A(()=>{r("generating"),S(i.current.onGeneratingProof);})),x.onProofGenerated(A(w=>{S(i.current.onProofGenerated,w);})),x.onResult(A(w=>{r(w.verified?"success":"error"),S(i.current.onResult,w);})),x.onReject(A(()=>{r("error"),S(i.current.onReject);})),x.onError(A(w=>{r("error"),S(i.current.onError,w);}));try{x.requestReceived()?r("scanned"):x.isBridgeConnected()?(r("waiting"),y1()):r("connecting");}catch{r("error");}s(x.url);try{p(Me(x.url));}catch{r("error");}}).catch(()=>{_||r("error");}),()=>{_=true;}},[l]);let o=F1(()=>{S(i.current.onRetryClicked),u(_=>_+1);},[]);return {state:e,url:a,qrSvg:n,retry:o}}function Me(t){let e=be__default.default.create(t,{errorCorrectionLevel:"H"}),r=e.modules.size,a=e.modules.data,s=100/r,n=o=>o.toFixed(3),p=[[0,0],[0,r-7],[r-7,0]],l=(o,_)=>p.some(([d,m])=>o>=d&&o<d+7&&_>=m&&_<m+7),u="",i=s*.
|
|
568
|
+
`;function ie(t){let[e,r]=D("preparing"),[a,s]=D(null),[n,p]=D(null),[l,u]=D(0),i=h1(t);i.current=t;let f=h1(null);f.current===null&&(f.current=new sdk.ZKPassport(t.domain)),e1(()=>{let _=false,d=false;r("preparing"),s(null),p(null);let{domain:m,theme:C,query:z,onReady:g,onRetryClicked:h,onBridgeConnect:M,onRequestReceived:R,onGeneratingProof:H,onProofGenerated:t1,onResult:E,onReject:U,onError:b,...N}=i.current,y1=()=>{d||(d=true,S(i.current.onReady));},A=r1=>(...x)=>{if(!_)try{r1(...x);}catch{r("error");}};return f.current.request(N).then(r1=>{if(_)return;let x;try{x=z(r1);}catch{r("error");return}x.onBridgeConnect(A(()=>{r(w=>w==="preparing"||w==="connecting"?"waiting":w),y1(),S(i.current.onBridgeConnect);})),x.onRequestReceived(A(()=>{r("scanned"),S(i.current.onRequestReceived);})),x.onGeneratingProof(A(()=>{r("generating"),S(i.current.onGeneratingProof);})),x.onProofGenerated(A(w=>{S(i.current.onProofGenerated,w);})),x.onResult(A(w=>{r(w.verified?"success":"error"),S(i.current.onResult,w);})),x.onReject(A(()=>{r("error"),S(i.current.onReject);})),x.onError(A(w=>{r("error"),S(i.current.onError,w);}));try{x.requestReceived()?r("scanned"):x.isBridgeConnected()?(r("waiting"),y1()):r("connecting");}catch{r("error");}s(x.url);try{p(Me(x.url));}catch{r("error");}}).catch(()=>{_||r("error");}),()=>{_=true;}},[l]);let o=F1(()=>{S(i.current.onRetryClicked),u(_=>_+1);},[]);return {state:e,url:a,qrSvg:n,retry:o}}function Me(t){let e=be__default.default.create(t,{errorCorrectionLevel:"H"}),r=e.modules.size,a=e.modules.data,s=100/r,n=o=>o.toFixed(3),p=[[0,0],[0,r-7],[r-7,0]],l=(o,_)=>p.some(([d,m])=>o>=d&&o<d+7&&_>=m&&_<m+7),u="",i=s*.47;for(let o=0;o<r;o++)for(let _=0;_<r;_++){if(!a[o*r+_]||l(o,_))continue;let d=(_+.5)*s,m=(o+.5)*s;u+=`<circle cx="${n(d)}" cy="${n(m)}" r="${n(i)}"/>`;}let f="";for(let[o,_]of p){let d=(_+3.5)*s,m=(o+3.5)*s;f+=`<circle cx="${n(d)}" cy="${n(m)}" r="${n(s*3)}" fill="none" stroke="currentColor" stroke-width="${n(s)}"/><circle cx="${n(d)}" cy="${n(m)}" r="${n(s*1.5)}"/>`;}return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" shape-rendering="geometricPrecision" fill="currentColor">${f}${u}</svg>`}function S(t,...e){if(t)try{t(...e);}catch{}}var Ze=0;function c(t,e,r,a,s,n){e||(e={});var p,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?p=e[l]:u[l]=e[l];var i={type:t,props:u,key:r,ref:p,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ze,__i:-1,__u:0,__source:s,__self:n};if(typeof t=="function"&&(p=t.defaultProps))for(l in p)u[l]===void 0&&(u[l]=p[l]);return v.vnode&&v.vnode(i),i}function ce({options:t,controlRef:e}){G1(Ne,[]);let{state:r,url:a,qrSvg:s,retry:n}=ie(t);e1(()=>{if(e)return e.current={retry:n},()=>{e.current=null;}},[n,e]);let p=t.name??t.domain??"",l=t.logo??"",u=r==="scanned"||r==="generating"||r==="success"||r==="error",i=Se(r),f=Le(r),o=r==="waiting"||r==="scanned";return c("div",{className:"zkp-card","data-state":r,"data-theme":t.theme??"auto",children:[o?c("button",{type:"button",className:"zkp-restart","aria-label":"Restart verification",title:"Restart verification",onClick:n,dangerouslySetInnerHTML:{__html:ne}}):null,c("div",{className:"zkp-header",children:[c("div",{className:"zkp-header-icons",children:[c("div",{className:"zkp-zkp-icon",dangerouslySetInnerHTML:{__html:g1}}),l?c(L,{children:[c("div",{className:"zkp-header-dots",children:[c("span",{}),c("span",{}),c("span",{})]}),c("div",{className:"zkp-app-icon-slot",children:c("img",{className:"zkp-app-icon",src:l,alt:p?`${p} icon`:""})})]}):null]}),c("p",{className:"zkp-title",children:[c("strong",{children:p||"This app"})," uses ",c("strong",{children:"ZKPassport"})," to verify identity without compromising your privacy."]})]}),c("div",{className:"zkp-divider zkp-divider-header"}),c(Re,{state:r,qrSvg:s,caption:f}),r==="waiting"&&a?c("a",{className:"zkp-open-app",href:a,children:"Open in ZKPassport App"}):null,c("div",{className:"zkp-divider zkp-divider-top"}),c("div",{className:"zkp-steps",children:[c(V,{status:i[0],icon:u?null:ee,children:[c("a",{href:$1,target:"_blank",rel:"noopener noreferrer",children:"Download"})," the ZKPassport mobile app."]}),c(V,{status:i[1],icon:u?null:J1,children:"Scan this QR code with the ZKPassport app."}),c(V,{status:i[2],icon:u?null:X1,children:"Approve the request on your phone."}),c("div",{className:`zkp-collapse${u?"":" zkp-collapse-out"}`,children:c(L,{children:[c(V,{status:i[3],icon:null,children:"Generate proof on your device."}),c(V,{status:i[4],icon:null,children:"Verify the proof."})]})})]}),c("div",{className:`zkp-collapse${u?" zkp-collapse-out":""}`,children:c("div",{className:"zkp-collapse-inner",children:[c("div",{className:"zkp-divider zkp-divider-bottom"}),c("div",{className:"zkp-footer",children:[c("span",{className:"zkp-footer-label",children:"ZKPassport App"}),c("div",{className:"zkp-store-buttons",children:[c(pe,{href:Q1,badge:oe}),c(pe,{href:W1,badge:ae})]})]})]})}),r==="error"?c("div",{className:"zkp-result-actions",children:c("button",{type:"button",className:"zkp-retry",onClick:n,children:"Try again"})}):null]})}function Le(t){switch(t){case "scanned":return "Approve the request on your phone";case "generating":return "Generating proof\u2026";case "success":return "Verification complete";case "error":return "Something went wrong";default:return ""}}function Se(t){switch(t){case "scanned":return ["done","done","current","pending","pending"];case "generating":return ["done","done","done","current","pending"];case "success":return ["done","done","done","done","done"];default:return ["pending","pending","pending","pending","pending"]}}function Re({state:t,qrSvg:e,caption:r}){return c("div",{className:"zkp-qr-slot","data-state":t,children:[c("div",{className:"zkp-skeleton"}),c("div",{className:"zkp-qr",dangerouslySetInnerHTML:e?{__html:e}:void 0}),e?c("div",{className:"zkp-qr-logo",dangerouslySetInnerHTML:{__html:g1}}):null,c("div",{className:"zkp-overlay",children:[c("div",{className:"zkp-overlay-body",children:[t==="connecting"||t==="generating"?c("div",{className:"zkp-spinner",dangerouslySetInnerHTML:{__html:Y1}}):null,t==="scanned"?c("div",{className:"zkp-scanned-phone",dangerouslySetInnerHTML:{__html:re}}):null,t==="success"?c("div",{className:"zkp-check",dangerouslySetInnerHTML:{__html:m1}}):null,t==="error"?c("div",{className:"zkp-error-icon",dangerouslySetInnerHTML:{__html:te}}):null]}),r?c("div",{className:"zkp-overlay-caption",children:r},t):null]})]})}function V({status:t,icon:e,children:r}){return c("div",{className:"zkp-step","data-status":t,"data-mode":e?"icon":"progress",children:[c("div",{className:"zkp-step-marker",dangerouslySetInnerHTML:{__html:e??m1}}),c("div",{className:"zkp-step-text",children:r})]})}function pe({href:t,badge:e}){return c("a",{className:"zkp-store-button",href:t,target:"_blank",rel:"noopener noreferrer","aria-label":e.ariaLabel,dangerouslySetInnerHTML:{__html:e.svg}})}var le="data-zkpassport-ui",k1=false;function Ne(){if(k1||typeof document>"u")return;if(document.querySelector(`style[${le}]`)){k1=true;return}let t=document.createElement("style");t.setAttribute(le,""),t.textContent=se,document.head.appendChild(t),k1=true;}function tt(t){let e=react.useRef(null);return react.useEffect(()=>{let r=e.current;if(r)return ()=>{d1(null,r);}},[]),react.useEffect(()=>{let r=e.current;r&&d1(l1(ce,{options:t}),r);}),jsxRuntime.jsx("div",{ref:e})}
|
|
564
569
|
exports.ZKPassportQRCode=tt;//# sourceMappingURL=react.cjs.map
|
|
565
570
|
//# sourceMappingURL=react.cjs.map
|