@flarehr/apollo-customer-workplace-link 1.82.11398 → 1.83.15757

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 (2) hide show
  1. package/build/bundle.esm.js +41 -1650
  2. package/package.json +1 -4
@@ -1,10 +1,46 @@
1
- let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=c(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(a," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,r?"":"."+h)}let p=r&&l.g?l.g:null;return r&&(l.g=l[h]),f=l[h],m=t,g=n,(_=p)?m.data=m.data.replace(_,f):-1===m.data.indexOf(f)&&(m.data=g?f+m.data:m.data+f),h;var f,m,g,_},h=(e,t,r)=>e.reduce(((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,i(t.target),t.g,t.o,t.k)}function f(n,i){let o=this||{};return function(){let s=arguments;function a(c,l){let u=Object.assign({},c),d=u.className||a.className;o.p=Object.assign({theme:t&&t()},u),o.o=/ *go\d+/.test(d),u.className=p.apply(o,s)+(d?" "+d:""),i&&(u.ref=l);let h=n;return n[0]&&(h=u.as||n,delete u.as),r&&h[0]&&r(u),e(h,u)}return i?i(a):a}}p.bind({g:1}),p.bind({k:1});var m,g,_,v,y,w,b,E,k={},I=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,n,i,null)}function A(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_:i};return null==i&&null!=g.vnode&&g.vnode(o),o}function P(){return{current:null}}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&v.push(e)&&!U.__r++||y!==g.debounceRendering)&&((y=g.debounceRendering)||w)(U)}function U(){var e,t,r,n,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(o=C({},s)).__v=s.__v+1,J(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),G(n,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,r,n,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=n&&n.__k||I,E=b.length,T=E,C=t.length;for(r.__k=[],d=0;d<C;d++)null!=(f=r.__k[d]=null==(f=t[d])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?A(null,f,null,null,f):S(f)?A(N,{children:f},null,null,null):f.__b>0?A(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)?(f.__=r,f.__b=r.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),J(e,f,p,i,o,s,a,c,l,u),m=f.__e,(h=f.ref)&&p.ref!=h&&(p.ref&&Y(p.ref,null,f),u.push(h,f.__c||m,f)),null!=m&&(null==g&&(g=m),(y=p===k||null===p.__v)?-1==v&&w--:v!==_&&(v===_+1?w++:v>_?T>C-_?w+=v-_:w--:w=v<_&&v==_-1?v-_:0),_=d+w,"function"!=typeof f.type||v===_&&p.__k!==f.__k?"function"==typeof f.type||v===_&&!y?void 0!==f.__d?(c=f.__d,f.__d=void 0):c=m.nextSibling:c=z(e,m,c):c=F(f,c,e),"function"==typeof r.type&&(r.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=n,c=L(p)),Q(p,p,!1),b[d]=null);for(r.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t="function"==typeof n.type?F(n,t,r):z(r,n.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(S(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function H(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type)return r;if(n>(null!=c?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function V(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||T.test(t)?r:r+"px"}function q(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||V(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||V(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?K:W,o)):e.removeEventListener(t,o?K:W,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(s){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function W(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(g.event?g.event(e):e)}function K(e){return this.l[e.type+!0](g.event?g.event(e):e)}function J(e,t,r,n,i,o,s,a,c,l){var u,d,h,p,f,_,v,y,w,b,E,I,T,O,A,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(u=g.__b)&&u(t);e:if("function"==typeof P)try{if(y=t.props,w=(u=P.contextType)&&n[u.__c],b=u?w?w.props.value:u.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(y,b):(t.__c=d=new x(y,b),d.constructor=P,d.render=X),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=C({},d.__s)),C(d.__s,P.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,_)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,I=g.__r,T=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(n=C(C({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,S(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,r,n,i,o,s,a,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(D){t.__v=null,(c||null!=o)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),g.__e(D,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,s,a,c){var l,u,d,h=r.props,p=t.props,f=t.type,g=0;if("svg"===f&&(i=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,a=!1}if(null===f)h===p||a&&e.data===p||(e.data=p);else{if(o=o&&m.call(e.childNodes),u=(h=r.props||k).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<e.attributes.length;g++)h[e.attributes[g].name]=e.attributes[g].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in t||q(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||q(e,o,t[o],r[o],n)}(e,p,h,i,a),d)t.__k=[];else if(j(e,S(g=t.props.children)?g:[g],t,r,n,i&&"foreignObject"!==f,o,s,o?o[0]:r.__k&&L(r,0),a,c),null!=o)for(g=o.length;g--;)null!=o[g]&&R(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==e.value||"progress"===f&&!g||"option"===f&&g!==h.value)&&q(e,"value",g,h.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==e.checked&&q(e,"checked",g,h.checked,!1))}return e}(r.__e,t,r,n,i,o,s,c,l);(u=g.diffed)&&u(t)}function G(e,t,r){for(var n=0;n<r.length;n++)Y(r[n],r[++n],r[++n]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){g.__e(r,t.__v)}}))}function Y(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){g.__e(n,r)}}function Q(e,t,r){var n,i;if(g.unmount&&g.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Y(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){g.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Q(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,r){return this.constructor(e,r)}function Z(e,t,r){var n,i,o,s;g.__&&g.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,o=[],s=[],J(t,e=(!n&&r||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?m.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),G(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=C({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),A(e.type,a,n||e.key,i||e.ref,null)}function re(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=I.slice,g={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=C({},this.state),"function"==typeof e&&(e=e(C({},r),this.props)),e&&C(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},x.prototype.render=N,v=[],w="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,E=0;var ne,ie,oe,se,ae=0,ce=[],le=[],ue=g.__b,de=g.__r,he=g.diffed,pe=g.__c,fe=g.unmount;function me(e,t){g.__h&&g.__h(ie,e,ae||t),ae=0;var r=ie.__H||(ie.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,r){var n=me(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ie,!ie.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}s&&s.call(this,e,t,r)},ie.shouldComponentUpdate=i}return n.__N||n.__}function ve(e,t){var r=me(ne++,3);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__H.__h.push(r))}function ye(e,t){var r=me(ne++,4);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__h.push(r))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function Ee(e,t){var r=me(ne++,7);return Ne(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],r=me(ne++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Se(){var e=me(ne++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ce(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(Mh){e.__H.__h=[],g.__e(Mh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),ne=0;var t=(ie=e.__c).__H;t&&(oe===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Ae),t.__h.forEach(Pe),t.__h=[],ne=0)),oe=ie},g.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ce.push(t)&&se===g.requestAnimationFrame||((se=g.requestAnimationFrame)||Oe)(Ce)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ie=null},g.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(r,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Ae(e)}catch(r){t=r}})),r.__H=void 0,t&&g.__e(t,r.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,r=function(){clearTimeout(n),Re&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Re&&(t=requestAnimationFrame(r))}function Ae(e){var t=ie,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ie=t}function Pe(e){var t=ie;e.__c=e.__(),ie=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function xe(e,t){return"function"==typeof t?t(e):t}class Le extends Error{}function De(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new Le(`Invalid token specified: missing part #${r+1}`);let i;try{i=De(n)}catch(gh){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${gh.message})`)}try{return JSON.parse(i)}catch(gh){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${gh.message})`)}}function Ue(e,t){return function(){return e.apply(t,arguments)}}Le.prototype.name="InvalidTokenError";const{toString:je}=Object.prototype,{getPrototypeOf:Fe}=Object,Be=(ze=Object.create(null),e=>{const t=je.call(e);return ze[t]||(ze[t]=t.slice(8,-1).toLowerCase())});var ze;const He=e=>(e=e.toLowerCase(),t=>Be(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");const We=He("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Ge=Ve("number"),Ye=e=>null!==e&&"object"==typeof e,Qe=e=>{if("object"!==Be(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=He("Date"),Ze=He("File"),et=He("Blob"),tt=He("FileList"),rt=He("URLSearchParams"),[nt,it,ot,st]=["ReadableStream","Request","Response","Headers"].map(He);function at(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function ct(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ut=e=>!qe(e)&&e!==lt;const dt=(ht="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ht&&e instanceof ht);var ht;const pt=He("HTMLFormElement"),ft=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mt=He("RegExp"),gt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};at(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},_t="abcdefghijklmnopqrstuvwxyz",vt="0123456789",yt={DIGIT:vt,ALPHA:_t,ALPHA_DIGIT:_t+_t.toUpperCase()+vt};const wt=He("AsyncFunction"),bt=(Et="function"==typeof setImmediate,kt=Je(lt.postMessage),Et?setImmediate:kt?(It=`axios@${Math.random()}`,Tt=[],lt.addEventListener("message",(({source:e,data:t})=>{e===lt&&t===It&&Tt.length&&Tt.shift()()}),!1),e=>{Tt.push(e),lt.postMessage(It,"*")}):e=>setTimeout(e));var Et,kt,It,Tt;const St="undefined"!=typeof queueMicrotask?queueMicrotask.bind(lt):"undefined"!=typeof process&&process.nextTick||bt,Ct={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&We(e.buffer),t},isString:Ke,isNumber:Ge,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isReadableStream:nt,isRequest:it,isResponse:ot,isHeaders:st,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:mt,isFunction:Je,isStream:e=>Ye(e)&&Je(e.pipe),isURLSearchParams:rt,isTypedArray:dt,isFileList:tt,forEach:at,merge:function e(){const{caseless:t}=ut(this)&&this||{},r={},n=(n,i)=>{const o=t&&ct(r,i)||i;Qe(r[o])&&Qe(n)?r[o]=e(r[o],n):Qe(n)?r[o]=e({},n):$e(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&at(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(at(t,((t,n)=>{r&&Je(t)?e[n]=Ue(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Ge(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:pt,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:gt,freezeMethods:e=>{gt(e,((t,r)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Je(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return $e(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ct,global:lt,isContextDefined:ut,ALPHABET:yt,generateString:(e=16,t=yt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=$e(e)?[]:{};return at(e,((e,t)=>{const o=r(e,n+1);!qe(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:wt,isThenable:e=>e&&(Ye(e)||Je(e))&&Je(e.then)&&Je(e.catch),setImmediate:bt,asap:St};function Rt(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}Ct.inherits(Rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ct.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ot=Rt.prototype,At={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{At[e]={value:e}})),Object.defineProperties(Rt,At),Object.defineProperty(Ot,"isAxiosError",{value:!0}),Rt.from=(e,t,r,n,i,o)=>{const s=Object.create(Ot);return Ct.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Rt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function Pt(e){return Ct.isPlainObject(e)||Ct.isArray(e)}function Nt(e){return Ct.endsWith(e,"[]")?e.slice(0,-2):e}function xt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Nt(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Lt=Ct.toFlatObject(Ct,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Dt(e,t,r){if(!Ct.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Ct.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ct.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Ct.isSpecCompliantForm(t);if(!Ct.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ct.isDate(e))return e.toISOString();if(!a&&Ct.isBlob(e))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ct.isArrayBuffer(e)||Ct.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(Ct.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Ct.isArray(e)&&function(e){return Ct.isArray(e)&&!e.some(Pt)}(e)||(Ct.isFileList(e)||Ct.endsWith(r,"[]"))&&(a=Ct.toArray(e)))return r=Nt(r),a.forEach((function(e,n){!Ct.isUndefined(e)&&null!==e&&t.append(!0===s?xt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!Pt(e)||(t.append(xt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(Lt,{defaultVisitor:l,convertValue:c,isVisitable:Pt});if(!Ct.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Ct.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),Ct.forEach(r,(function(r,o){!0===(!(Ct.isUndefined(r)||null===r)&&i.call(t,r,Ct.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Mt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ut(e,t){this._pairs=[],e&&Dt(e,this,t)}const jt=Ut.prototype;function Ft(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bt(e,t,r){if(!t)return e;const n=r&&r.encode||Ft,i=r&&r.serialize;let o;if(o=i?i(t,r):Ct.isURLSearchParams(t)?t.toString():new Ut(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}jt.append=function(e,t){this._pairs.push([e,t])},jt.toString=function(e){const t=e?function(t){return e.call(this,t,Mt)}:Mt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const zt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ct.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ut,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},$t="undefined"!=typeof window&&"undefined"!=typeof document,qt=(Wt="undefined"!=typeof navigator&&navigator.product,$t&&["ReactNative","NativeScript","NS"].indexOf(Wt)<0);var Wt;const Kt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Jt=$t&&window.location.href||"http://localhost",Gt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$t,hasStandardBrowserEnv:qt,hasStandardBrowserWebWorkerEnv:Kt,origin:Jt},Symbol.toStringTag,{value:"Module"})),...Vt};function Yt(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&Ct.isArray(n)?n.length:o,a)return Ct.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&Ct.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&Ct.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(Ct.isFormData(e)&&Ct.isFunction(e.entries)){const r={};return Ct.forEachEntry(e,((e,n)=>{t(function(e){return Ct.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Qt={transitional:Ht,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Ct.isObject(e);i&&Ct.isHTMLForm(e)&&(e=new FormData(e));if(Ct.isFormData(e))return n?JSON.stringify(Yt(e)):e;if(Ct.isArrayBuffer(e)||Ct.isBuffer(e)||Ct.isStream(e)||Ct.isFile(e)||Ct.isBlob(e)||Ct.isReadableStream(e))return e;if(Ct.isArrayBufferView(e))return e.buffer;if(Ct.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Dt(e,new Gt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Gt.isNode&&Ct.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ct.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Dt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(Ct.isString(e))try{return(t||JSON.parse)(e),Ct.trim(e)}catch(gh){if("SyntaxError"!==gh.name)throw gh}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Qt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Ct.isResponse(e)||Ct.isReadableStream(e))return e;if(e&&Ct.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(gh){if(r){if("SyntaxError"===gh.name)throw Rt.from(gh,Rt.ERR_BAD_RESPONSE,this,null,this.response);throw gh}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ct.forEach(["delete","get","head","post","put","patch"],(e=>{Qt.headers[e]={}}));const Xt=Qt,Zt=Ct.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),er=Symbol("internals");function tr(e){return e&&String(e).trim().toLowerCase()}function rr(e){return!1===e||null==e?e:Ct.isArray(e)?e.map(rr):String(e)}function nr(e,t,r,n,i){return Ct.isFunction(n)?n.call(this,t,r):(i&&(t=r),Ct.isString(t)?Ct.isString(n)?-1!==t.indexOf(n):Ct.isRegExp(n)?n.test(t):void 0:void 0)}class ir{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=tr(t);if(!i)throw new Error("header name must be a non-empty string");const o=Ct.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=rr(e))}const o=(e,t)=>Ct.forEach(e,((e,r)=>i(e,r,t)));if(Ct.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Ct.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Zt[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(Ct.isHeaders(e))for(const[s,a]of e.entries())i(a,s,r);else null!=e&&i(t,e,r);return this}get(e,t){if(e=tr(e)){const r=Ct.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Ct.isFunction(t))return t.call(this,e,r);if(Ct.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tr(e)){const r=Ct.findKey(this,e);return!(!r||void 0===this[r]||t&&!nr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=tr(e)){const i=Ct.findKey(r,e);!i||t&&!nr(0,r[i],i,t)||(delete r[i],n=!0)}}return Ct.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!nr(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Ct.forEach(this,((n,i)=>{const o=Ct.findKey(r,i);if(o)return t[o]=rr(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=rr(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ct.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Ct.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[er]=this[er]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=tr(e);t[n]||(!function(e,t){const r=Ct.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return Ct.isArray(e)?e.forEach(n):n(e),this}}ir.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ct.reduceDescriptors(ir.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Ct.freezeMethods(ir);const or=ir;function sr(e,t){const r=this||Xt,n=t||r,i=or.from(n.headers);let o=n.data;return Ct.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function ar(e){return!(!e||!e.__CANCEL__)}function cr(e,t,r){Rt.call(this,null==e?"canceled":e,Rt.ERR_CANCELED,t,r),this.name="CanceledError"}function lr(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Rt("Request failed with status code "+r.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Ct.inherits(cr,Rt,{__CANCEL__:!0});const ur=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];i||(i=c),r[o]=a,n[o]=c;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),o-a)))},()=>r&&s(r)]}((r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,c=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},dr=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hr=e=>(...t)=>Ct.asap((()=>e(...t))),pr=Gt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=Ct.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0},fr=Gt.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const s=[e+"="+encodeURIComponent(t)];Ct.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Ct.isString(n)&&s.push("path="+n),Ct.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mr(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const gr=e=>e instanceof or?{...e}:e;function _r(e,t){t=t||{};const r={};function n(e,t,r){return Ct.isPlainObject(e)&&Ct.isPlainObject(t)?Ct.merge.call({caseless:r},e,t):Ct.isPlainObject(t)?Ct.merge({},t):Ct.isArray(t)?t.slice():t}function i(e,t,r){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!Ct.isUndefined(t))return n(void 0,t)}function s(e,t){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(gr(e),gr(t),!0)};return Ct.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);Ct.isUndefined(s)&&o!==a||(r[n]=s)})),r}const vr=e=>{const t=_r({},e);let r,{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=or.from(a),t.url=Bt(mr(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Ct.isFormData(n))if(Gt.hasStandardBrowserEnv||Gt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Gt.hasStandardBrowserEnv&&(i&&Ct.isFunction(i)&&(i=i(t)),i||!1!==i&&pr(t.url))){const e=o&&s&&fr.read(s);e&&a.set(o,e)}return t},yr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=vr(e);let i=n.data;const o=or.from(n.headers).normalize();let s,a,c,l,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=n;function f(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const n=or.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());lr((function(e){t(e),f()}),(function(e){r(e),f()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new Rt("Request aborted",Rt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new Rt("Network Error",Rt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||Ht;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Rt(t,i.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Ct.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Ct.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),p&&([c,u]=ur(p,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=ur(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{m&&(r(!t||t.type?new cr(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const _=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);_&&-1===Gt.protocols.indexOf(_)?r(new Rt("Unsupported protocol "+_+":",Rt.ERR_BAD_REQUEST,e)):m.send(i||null)}))},wr=(e,t)=>{let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Rt?t:new cr(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{i(new Rt(`timeout ${t} of ms exceeded`,Rt.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",i):e.unsubscribe(i))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",i)));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},br=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Er=(e,t,r,n,i)=>{const o=async function*(e,t,r){for await(const n of e)yield*br(ArrayBuffer.isView(n)?n:await r(String(n)),t)}(e,t,i);let s,a=0,c=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return c(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw c(t),t}},cancel:e=>(c(e),o.return())},{highWaterMark:2})},kr="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ir=kr&&"function"==typeof ReadableStream,Tr=kr&&("function"==typeof TextEncoder?(Sr=new TextEncoder,e=>Sr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Sr;const Cr=(e,...t)=>{try{return!!e(...t)}catch(gh){return!1}},Rr=Ir&&Cr((()=>{let e=!1;const t=new Request(Gt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Or=Ir&&Cr((()=>Ct.isReadableStream(new Response("").body))),Ar={stream:Or&&(e=>e.body)};var Pr;kr&&(Pr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ar[e]&&(Ar[e]=Ct.isFunction(Pr[e])?t=>t[e]():(t,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})));const Nr=async(e,t)=>{const r=Ct.toFiniteNumber(e.getContentLength());return null==r?(async e=>null==e?0:Ct.isBlob(e)?e.size:Ct.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ct.isArrayBufferView(e)||Ct.isArrayBuffer(e)?e.byteLength:(Ct.isURLSearchParams(e)&&(e+=""),Ct.isString(e)?(await Tr(e)).byteLength:void 0))(t):r},xr={http:null,xhr:yr,fetch:kr&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:h}=vr(e);l=l?(l+"").toLowerCase():"text";let p,f,[m,g]=i||o||s?wr([i,o],s):[];const _=()=>{!p&&setTimeout((()=>{m&&m.unsubscribe()})),p=!0};let v;try{if(c&&Rr&&"get"!==r&&"head"!==r&&0!==(v=await Nr(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Ct.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=dr(v,ur(hr(c)));n=Er(r.body,65536,e,t,Tr)}}Ct.isString(d)||(d=d?"include":"omit"),f=new Request(t,{...h,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:d});let i=await fetch(f);const o=Or&&("stream"===l||"response"===l);if(Or&&(a||o)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Ct.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&dr(t,ur(hr(a),!0))||[];i=new Response(Er(i.body,65536,r,(()=>{n&&n(),o&&_()}),Tr),e)}l=l||"text";let s=await Ar[Ct.findKey(Ar,l)||"text"](i,e);return!o&&_(),g&&g(),await new Promise(((t,r)=>{lr(t,r,{data:s,headers:or.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(y){if(_(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,e,f),{cause:y.cause||y});throw Rt.from(y,y&&y.code,e,f)}})};Ct.forEach(xr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(gh){}Object.defineProperty(e,"adapterName",{value:t})}}));const Lr=e=>`- ${e}`,Dr=e=>Ct.isFunction(e)||null===e||!1===e,Mr=e=>{e=Ct.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Dr(r)&&(n=xr[(t=String(r)).toLowerCase()],void 0===n))throw new Rt(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Rt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Lr).join("\n"):" "+Lr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ur(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cr(null,e)}function jr(e){Ur(e),e.headers=or.from(e.headers),e.data=sr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Mr(e.adapter||Xt.adapter)(e).then((function(t){return Ur(e),t.data=sr.call(e,e.transformResponse,t),t.headers=or.from(t.headers),t}),(function(t){return ar(t)||(Ur(e),t&&t.response&&(t.response.data=sr.call(e,e.transformResponse,t.response),t.response.headers=or.from(t.response.headers))),Promise.reject(t)}))}const Fr="1.7.4",Br={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Br[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const zr={};Br.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new Rt(n(i," has been removed"+(t?" in "+t:"")),Rt.ERR_DEPRECATED);return t&&!zr[i]&&(zr[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const Hr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new Rt("option "+o+" must be "+r,Rt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Rt("Unknown option "+o,Rt.ERR_BAD_OPTION)}},validators:Br},Vr=Hr.validators;class $r{constructor(e){this.defaults=e,this.interceptors={request:new zt,response:new zt}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(gh){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_r(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Hr.assertOptions(r,{silentJSONParsing:Vr.transitional(Vr.boolean),forcedJSONParsing:Vr.transitional(Vr.boolean),clarifyTimeoutError:Vr.transitional(Vr.boolean)},!1),null!=n&&(Ct.isFunction(n)?t.paramsSerializer={serialize:n}:Hr.assertOptions(n,{encode:Vr.function,serialize:Vr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Ct.merge(i.common,i[t.method]);i&&Ct.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=or.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[jr.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{l=jr.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return Bt(mr((e=_r(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Ct.forEach(["delete","get","head","options"],(function(e){$r.prototype[e]=function(t,r){return this.request(_r(r||{},{method:e,url:t,data:(r||{}).data}))}})),Ct.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(_r(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}$r.prototype[e]=t(),$r.prototype[e+"Form"]=t(!0)}));const qr=$r;class Wr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new cr(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Wr((function(t){e=t})),cancel:e}}}const Kr=Wr;const Jr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Jr).forEach((([e,t])=>{Jr[t]=e}));const Gr=Jr;const Yr=function e(t){const r=new qr(t),n=Ue(qr.prototype.request,r);return Ct.extend(n,qr.prototype,r,{allOwnKeys:!0}),Ct.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(_r(t,r))},n}(Xt);Yr.Axios=qr,Yr.CanceledError=cr,Yr.CancelToken=Kr,Yr.isCancel=ar,Yr.VERSION=Fr,Yr.toFormData=Dt,Yr.AxiosError=Rt,Yr.Cancel=Yr.CanceledError,Yr.all=function(e){return Promise.all(e)},Yr.spread=function(e){return function(t){return e.apply(null,t)}},Yr.isAxiosError=function(e){return Ct.isObject(e)&&!0===e.isAxiosError},Yr.mergeConfig=_r,Yr.AxiosHeaders=or,Yr.formToJSON=e=>Yt(Ct.isHTMLForm(e)?new FormData(e):e),Yr.getAdapter=Mr,Yr.HttpStatusCode=Gr,Yr.default=Yr;const Qr=Yr,Xr=(e,t,r)=>{ve((()=>{const t=Qr.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},Zr=({request:e})=>console.error("[API] Request error:",e),en=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let tn;const rn=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),nn=async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.post("customer-profile/backend/v1.0/workplace-link",{},rn(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},on=(e,t,r,n)=>{if(!tn)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return tn.post("customer-profile/customer-backend/v1.0/workplace-link",i,rn(e,n))};for(var sn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},an={},cn={},ln={byteLength:function(e){var t=mn(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=mn(e),i=n[0],o=n[1],s=new hn(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=dn[e.charCodeAt(r)]<<18|dn[e.charCodeAt(r+1)]<<12|dn[e.charCodeAt(r+2)]<<6|dn[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=dn[e.charCodeAt(r)]<<2|dn[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=dn[e.charCodeAt(r)]<<10|dn[e.charCodeAt(r+1)]<<4|dn[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(gn(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(un[t>>2]+un[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(un[t>>10]+un[t>>4&63]+un[t<<2&63]+"="));return i.join("")}},un=[],dn=[],hn="undefined"!=typeof Uint8Array?Uint8Array:Array,pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fn=0;fn<64;++fn)un[fn]=pn[fn],dn[pn.charCodeAt(fn)]=fn;function mn(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function gn(e,t,r){for(var n,i,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(un[(i=n)>>18&63]+un[i>>12&63]+un[i>>6&63]+un[63&i]);return o.join("")}dn["-".charCodeAt(0)]=62,dn["_".charCodeAt(0)]=63;var _n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.AppAuthError=void 0;var vn=function(e,t){this.message=e,this.extras=t};_n.AppAuthError=vn,Object.defineProperty(cn,"__esModule",{value:!0});var yn=cn.DefaultCrypto=cn.textEncodeLite=cn.urlSafe=cn.bufferToString=void 0,wn=ln,bn=_n,En="undefined"!=typeof window&&!!window.crypto,kn=En&&!!window.crypto.subtle,In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function Tn(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(In[n])}return t.join("")}function Sn(e){return wn.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cn(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}cn.bufferToString=Tn,cn.urlSafe=Sn,cn.textEncodeLite=Cn;var Rn=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(En)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return Tn(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new bn.AppAuthError("Invalid code length.")):kn?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Cn(e)).then((function(e){return t(Sn(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new bn.AppAuthError("window.crypto.subtle is unavailable."))},e}();yn=cn.DefaultCrypto=Rn;var On={},An={};Object.defineProperty(An,"__esModule",{value:!0}),An.IS_PROFILE=An.IS_LOG=void 0,An.IS_LOG=!0,An.IS_PROFILE=!1;var Pn=sn&&sn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(On,"__esModule",{value:!0}),On.profile=On.log=void 0;var Nn=An;function xn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Nn.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Pn([e],t)):console.log(e))}On.log=xn;var Ln="undefined"!=typeof window&&!!window.performance&&!!console.profile;On.profile=function(e,t,r){return Nn.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Ln?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Pn([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){xn("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Pn([this||window],e)),o=Date.now()-t;return xn("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(an,"__esModule",{value:!0});var Dn=an.AuthorizationRequest=void 0,Mn=cn,Un=On,jn=function(){function e(t,r,n){void 0===r&&(r=new Mn.DefaultCrypto),void 0===n&&(n=!0),this.crypto=r,this.usePkce=n,this.clientId=t.client_id,this.redirectUri=t.redirect_uri,this.scope=t.scope,this.responseType=t.response_type||e.RESPONSE_TYPE_CODE,this.state=t.state||function(e){return e.generateRandom(10)}(r),this.extras=t.extras,this.internal=t.internal}return e.prototype.setupCodeVerifier=function(){var e=this;if(this.usePkce){var t=this.crypto.generateRandom(128);return this.crypto.deriveChallenge(t).catch((function(e){Un.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(r){r&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=r,e.extras.code_challenge_method="S256")}))}return Promise.resolve()},e.prototype.toJson=function(){var e=this;return this.setupCodeVerifier().then((function(){return{response_type:e.responseType,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scope,state:e.state,extras:e.extras,internal:e.internal}}))},e.RESPONSE_TYPE_TOKEN="token",e.RESPONSE_TYPE_CODE="code",e}();Dn=an.AuthorizationRequest=jn;var Fn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=On,r=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,r){this.listener&&this.listener(e,t,r)},e}();e.AuthorizationNotifier=r,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var n=function(){function r(e,t){this.utils=e,this.crypto=t,this.notifier=null}return r.prototype.buildRequestUrl=function(t,r){var n={redirect_uri:r.redirectUri,client_id:r.clientId,response_type:r.responseType,state:r.state,scope:r.scope};if(r.extras)for(var i in r.extras)r.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(n[i]=r.extras[i]);var o=this.utils.stringify(n);return t.authorizationEndpoint+"?"+o},r.prototype.completeAuthorizationRequestIfPossible=function(){var e=this;return t.log("Checking to see if there is an authorization response to be delivered."),this.notifier||t.log("Notifier is not present on AuthorizationRequest handler.\n No delivery of result will be possible"),this.completeAuthorizationRequest().then((function(r){r||t.log("No result is available yet."),r&&e.notifier&&e.notifier.onAuthorizationComplete(r.request,r.response,r.error)}))},r.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},r}();e.AuthorizationRequestHandler=n}(Fn);var Bn={},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.AuthorizationError=zn.AuthorizationResponse=void 0;var Hn=function(){function e(e){this.code=e.code,this.state=e.state}return e.prototype.toJson=function(){return{code:this.code,state:this.state}},e}();zn.AuthorizationResponse=Hn;var Vn=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri,this.state=e.state}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri,state:this.state}},e}();zn.AuthorizationError=Vn;var $n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.BasicQueryStringUtils=void 0;var qn=function(){function e(){}return e.prototype.parse=function(e,t){return t?this.parseQueryString(e.hash):this.parseQueryString(e.search)},e.prototype.parseQueryString=function(e){for(var t={},r=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),n=0;n<r.length;n+=1){var i=r[n].split("=");if(i.length>=2){var o=decodeURIComponent(i.shift()),s=i.length>0?i.join("="):null;s&&(t[o]=decodeURIComponent(s))}}return t},e.prototype.stringify=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&e[r]&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},e}();$n.BasicQueryStringUtils=qn;var Wn,Kn={},Jn=sn&&sn.__extends||(Wn=function(e,t){return(Wn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.LocalStorageBackend=Kn.StorageBackend=void 0;var Gn=function(){};Kn.StorageBackend=Gn;var Yn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return Jn(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(r,n){var i=t.storage.getItem(e);r(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(r,n){t.storage.removeItem(e),r()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,r){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var r=this;return new Promise((function(n,i){r.storage.setItem(e,t),n()}))},t}(Gn);Kn.LocalStorageBackend=Yn;var Qn=sn&&sn.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bn,"__esModule",{value:!0});var Xn=Bn.RedirectRequestHandler=void 0,Zn=an,ei=zn,ti=cn,ri=On,ni=$n,ii=Kn,oi=function(e){return e+"_appauth_authorization_request"},si=function(e){return e+"_appauth_authorization_service_configuration"},ai="appauth_current_authorization_request",ci=function(e){function t(t,r,n,i){void 0===t&&(t=new ii.LocalStorageBackend),void 0===r&&(r=new ni.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new ti.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return Qn(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(ai,n),t.toJson().then((function(e){return r.storageBackend.setItem(oi(n),JSON.stringify(e))})),this.storageBackend.setItem(si(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);ri.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(ai).then((function(t){return t?e.storageBackend.getItem(oi(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new Zn.AuthorizationRequest(e)})).then((function(r){var n=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;ri.log("Potential authorization request ",n,i,o,s,a);var c=o===r.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new ei.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new ei.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(ai),e.storageBackend.removeItem(oi(t)),e.storageBackend.removeItem(si(t))]).then((function(){return ri.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return ri.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(Fn.AuthorizationRequestHandler);Xn=Bn.RedirectRequestHandler=ci;var li={},ui={},di=sn&&sn.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ui,"__esModule",{value:!0}),ui.TestRequestor=gi=ui.FetchRequestor=ui.JQueryRequestor=ui.Requestor=void 0;var hi=_n,pi=function(){};ui.Requestor=pi;var fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return di(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,r){t.then((function(t,r,n){e(t)}),(function(e,t,n){r(new hi.AppAuthError(n))}))}))},t}(pi);ui.JQueryRequestor=fi;var mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return di(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new hi.AppAuthError("A URL must be provided."));var t=new URL(e.url),r={};(r.method=e.method,r.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?r.body=e.data:new URLSearchParams(e.data).forEach((function(e,r){t.searchParams.append(r,e)})));if(r.headers={},e.headers)for(var n in e.headers)e.headers.hasOwnProperty(n)&&(r.headers[n]=e.headers[n]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(r.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),r).then((function(e){if(e.status>=200&&e.status<300){var t=e.headers.get("content-type");return i||t&&-1!==t.indexOf("application/json")?e.json():e.text()}return Promise.reject(new hi.AppAuthError(e.status.toString(),e.statusText))}))},t}(pi),gi=ui.FetchRequestor=mi,_i=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return di(t,e),t.prototype.xhr=function(e){return this.promise},t}(pi);ui.TestRequestor=_i,Object.defineProperty(li,"__esModule",{value:!0});var vi=li.AuthorizationServiceConfiguration=void 0,yi=ui,wi=function(){function e(e){this.authorizationEndpoint=e.authorization_endpoint,this.tokenEndpoint=e.token_endpoint,this.revocationEndpoint=e.revocation_endpoint,this.userInfoEndpoint=e.userinfo_endpoint,this.endSessionEndpoint=e.end_session_endpoint}return e.prototype.toJson=function(){return{authorization_endpoint:this.authorizationEndpoint,token_endpoint:this.tokenEndpoint,revocation_endpoint:this.revocationEndpoint,end_session_endpoint:this.endSessionEndpoint,userinfo_endpoint:this.userInfoEndpoint}},e.fetchFromIssuer=function(t,r){var n=t+"/.well-known/openid-configuration";return(r||new yi.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();vi=li.AuthorizationServiceConfiguration=wi;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});var Ei=bi.TokenRequest=bi.GRANT_TYPE_REFRESH_TOKEN=bi.GRANT_TYPE_AUTHORIZATION_CODE=void 0,ki=bi.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";bi.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var Ii=function(){function e(e){this.clientId=e.client_id,this.redirectUri=e.redirect_uri,this.grantType=e.grant_type,this.code=e.code,this.refreshToken=e.refresh_token,this.extras=e.extras}return e.prototype.toJson=function(){return{grant_type:this.grantType,code:this.code,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,client_id:this.clientId,extras:this.extras}},e.prototype.toStringMap=function(){var e={grant_type:this.grantType,client_id:this.clientId,redirect_uri:this.redirectUri};if(this.code&&(e.code=this.code),this.refreshToken&&(e.refresh_token=this.refreshToken),this.extras)for(var t in this.extras)this.extras.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=this.extras[t]);return e},e}();Ei=bi.TokenRequest=Ii;var Ti={},Si={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=e.TokenResponse=e.nowInSeconds=void 0;e.nowInSeconds=function(){return Math.round((new Date).getTime()/1e3)};var t=function(){function t(t){this.accessToken=t.access_token,this.tokenType=t.token_type||"bearer",t.expires_in&&(this.expiresIn=parseInt(t.expires_in,10)),this.refreshToken=t.refresh_token,this.scope=t.scope,this.idToken=t.id_token,this.issuedAt=t.issued_at||e.nowInSeconds()}return t.prototype.toJson=function(){var e;return{access_token:this.accessToken,id_token:this.idToken,refresh_token:this.refreshToken,scope:this.scope,token_type:this.tokenType,issued_at:this.issuedAt,expires_in:null===(e=this.expiresIn)||void 0===e?void 0:e.toString()}},t.prototype.isValid=function(t){return void 0===t&&(t=-600),!this.expiresIn||e.nowInSeconds()<this.issuedAt+this.expiresIn+t},t}();e.TokenResponse=t;var r=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri}},e}();e.TokenError=r}(Si),Object.defineProperty(Ti,"__esModule",{value:!0});var Ci=Ti.BaseTokenRequestHandler=void 0,Ri=_n,Oi=$n,Ai=Si,Pi=ui,Ni=function(){function e(e,t){void 0===e&&(e=new Pi.JQueryRequestor),void 0===t&&(t=new Oi.BasicQueryStringUtils),this.requestor=e,this.utils=t}return e.prototype.isTokenResponse=function(e){return void 0===e.error},e.prototype.performRevokeTokenRequest=function(e,t){return this.requestor.xhr({url:e.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return!0}))},e.prototype.performTokenRequest=function(e,t){var r=this;return this.requestor.xhr({url:e.tokenEndpoint,method:"POST",dataType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return r.isTokenResponse(e)?new Ai.TokenResponse(e):Promise.reject(new Ri.AppAuthError(e.error,new Ai.TokenError(e)))}))},e}();Ci=Ti.BaseTokenRequestHandler=Ni;let xi;const Li=async(e,t)=>{const r=await vi.fetchFromIssuer(e,t);return xi=r,r},Di=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Ei({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:ki,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},Mi=e=>{if(e&&e.isValid())return e.accessToken},Ui=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),r=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(r){const e=JSON.parse(r);xi=new vi(e)}return!0}catch{return!1}};p.bind({g:1});const ji=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),Fi=(function(){const e=f.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
1
+ let e,t,r,n={data:""},o=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,i=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,s=/\n+/g,l=(e,t)=>{let r="",n="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?r=i+" "+a+";":n+="f"==i[1]?l(a,i):i+"{"+l(a,"k"==i[1]?"":t)+"}":"object"==typeof a?n+=l(a,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=l.p?l.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},c={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,o)=>{let d=u(e),f=c[d]||(c[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!c[f]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=i.exec(e.replace(a,""));)t[4]?n.shift():t[3]?(r=t[3].replace(s," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(s," ").trim();return n[0]})(e);c[f]=l(o?{["@keyframes "+f]:t}:t,r?"":"."+f)}let p=r&&c.g?c.g:null;return r&&(c.g=c[f]),h=c[f],m=t,_=n,(g=p)?m.data=m.data.replace(g,h):-1===m.data.indexOf(h)&&(m.data=_?h+m.data:m.data+h),f;var h,m,_,g},f=(e,t,r)=>e.reduce(((e,n,o)=>{let i=t[o];if(i&&i.call){let e=i(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):!1===e?"":e}return e+n+(null==i?"":i)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?f(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,o(t.target),t.g,t.o,t.k)}function h(n,o){let i=this||{};return function(){let a=arguments;function s(l,c){let u=Object.assign({},l),d=u.className||s.className;i.p=Object.assign({theme:t&&t()},u),i.o=/ *go\d+/.test(d),u.className=p.apply(i,a)+(d?" "+d:""),o&&(u.ref=c);let f=n;return n[0]&&(f=u.as||n,delete u.as),r&&f[0]&&r(u),e(f,u)}return o?o(s):s}}p.bind({g:1}),p.bind({k:1});var m,_,g,y,v,b,w,E,x={},C=[],S=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,N=Array.isArray;function k(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,o,i,a={};for(i in t)"key"==i?n=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return P(e,a,n,o,null)}function P(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++g:o};return null==o&&null!=_.vnode&&_.vnode(i),i}function T(){return{current:null}}function A(e){return e.children}function L(e,t){this.props=e,this.context=t}function M(e,t){if(null==t)return e.__?M(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?M(e):null}function F(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return F(e)}}function U(e){(!e.__d&&(e.__d=!0)&&y.push(e)&&!B.__r++||v!==_.debounceRendering)&&((v=_.debounceRendering)||b)(B)}function B(){var e,t,r,n,o,i,a,s,l;for(y.sort(w);e=y.shift();)e.__d&&(t=y.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=k({},a)).__v=a.__v+1,Y(l,a,i,r.__n,void 0!==l.ownerSVGElement,null!=a.__h?[s]:null,n,null==s?M(a):s,a.__h,o),K(n,a,o),a.__e!=s&&F(a)),y.length>t&&y.sort(w));B.__r=0}function j(e,t,r,n,o,i,a,s,l,c,u){var d,f,p,h,m,_,g,y,v,b=0,w=n&&n.__k||C,E=w.length,S=E,k=t.length;for(r.__k=[],d=0;d<k;d++)null!=(h=r.__k[d]=null==(h=t[d])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?P(null,h,null,null,h):N(h)?P(A,{children:h},null,null,null):h.__b>0?P(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)?(h.__=r,h.__b=r.__b+1,-1===(y=z(h,w,g=d+b,S))?p=x:(p=w[y]||x,w[y]=void 0,S--),Y(e,h,p,o,i,a,s,l,c,u),m=h.__e,(f=h.ref)&&p.ref!=f&&(p.ref&&J(p.ref,null,h),u.push(f,h.__c||m,h)),null!=m&&(null==_&&(_=m),(v=p===x||null===p.__v)?-1==y&&b--:y!==g&&(y===g+1?b++:y>g?S>k-g?b+=y-g:b--:b=y<g&&y==g-1?y-g:0),g=d+b,"function"!=typeof h.type||y===g&&p.__k!==h.__k?"function"==typeof h.type||y===g&&!v?void 0!==h.__d?(l=h.__d,h.__d=void 0):l=m.nextSibling:l=H(e,m,l):l=D(h,l,e),"function"==typeof r.type&&(r.__d=l))):(p=w[d])&&null==p.key&&p.__e&&(p.__e==l&&(p.__=n,l=M(p)),Q(p,p,!1),w[d]=null);for(r.__e=_,d=E;d--;)null!=w[d]&&("function"==typeof r.type&&null!=w[d].__e&&w[d].__e==r.__d&&(r.__d=w[d].__e.nextSibling),Q(w[d],w[d]))}function D(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t="function"==typeof n.type?D(n,t,r):H(r,n.__e,t));return t}function I(e,t){return t=t||[],null==e||"boolean"==typeof e||(N(e)?e.some((function(e){I(e,t)})):t.push(e)),t}function H(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function z(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(null===l||l&&o==l.key&&i===l.type)return r;if(n>(null!=l?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function $(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||S.test(t)?r:r+"px"}function V(e,t,r,n,o){var i;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||$(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||$(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,i?W:q,i)):e.removeEventListener(t,i?W:q,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(a){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function q(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(_.event?_.event(e):e)}function W(e){return this.l[e.type+!0](_.event?_.event(e):e)}function Y(e,t,r,n,o,i,a,s,l,c){var u,d,f,p,h,g,y,v,b,w,E,C,S,O,P,T=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(u=_.__b)&&u(t);e:if("function"==typeof T)try{if(v=t.props,b=(u=T.contextType)&&n[u.__c],w=u?b?b.props.value:u.__:n,r.__c?y=(d=t.__c=r.__c).__=d.__E:("prototype"in T&&T.prototype.render?t.__c=d=new T(v,w):(t.__c=d=new L(v,w),d.constructor=T,d.render=G),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=w,d.__n=n,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=k({},d.__s)),k(d.__s,T.getDerivedStateFromProps(v,d.__s))),p=d.props,h=d.state,d.__v=t,f)null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==T.getDerivedStateFromProps&&v!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,w)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,w),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,h,g)}))}if(d.context=w,d.props=v,d.__P=e,d.__e=!1,C=_.__r,S=0,"prototype"in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(n=k(k({},n),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,h)),j(e,N(P=null!=u&&u.type===A&&null==u.key?u.props.children:u)?P:[P],t,r,n,o,i,a,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&a.push(d),y&&(d.__E=d.__=null)}catch(F){t.__v=null,(l||null!=i)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),_.__e(F,t,r)}else null==i&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,o,i,a,s,l){var c,u,d,f=r.props,p=t.props,h=t.type,_=0;if("svg"===h&&(o=!0),null!=i)for(;_<i.length;_++)if((c=i[_])&&"setAttribute"in c==!!h&&(h?c.localName===h:3===c.nodeType)){e=c,i[_]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),i=null,s=!1}if(null===h)f===p||s&&e.data===p||(e.data=p);else{if(i=i&&m.call(e.childNodes),u=(f=r.props||x).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!s){if(null!=i)for(f={},_=0;_<e.attributes.length;_++)f[e.attributes[_].name]=e.attributes[_].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in t||V(e,i,null,r[i],n);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===t[i]||V(e,i,t[i],r[i],n)}(e,p,f,o,s),d)t.__k=[];else if(j(e,N(_=t.props.children)?_:[_],t,r,n,o&&"foreignObject"!==h,i,a,i?i[0]:r.__k&&M(r,0),s,l),null!=i)for(_=i.length;_--;)null!=i[_]&&R(i[_]);s||("value"in p&&void 0!==(_=p.value)&&(_!==e.value||"progress"===h&&!_||"option"===h&&_!==f.value)&&V(e,"value",_,f.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==e.checked&&V(e,"checked",_,f.checked,!1))}return e}(r.__e,t,r,n,o,i,a,l,c);(u=_.diffed)&&u(t)}function K(e,t,r){for(var n=0;n<r.length;n++)J(r[n],r[++n],r[++n]);_.__c&&_.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){_.__e(r,t.__v)}}))}function J(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){_.__e(n,r)}}function Q(e,t,r){var n,o;if(_.unmount&&_.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||J(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){_.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Q(n[o],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function G(e,t,r){return this.constructor(e,r)}function X(e,t,r){var n,o,i,a;_.__&&_.__(e,t),o=(n="function"==typeof r)?null:r&&r.__k||t.__k,i=[],a=[],Y(t,e=(!n&&r||t).__k=O(A,null,[e]),o||x,x,void 0!==t.ownerSVGElement,!n&&r?[r]:o?null:t.firstChild?m.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),K(i,e,a)}function Z(e,t){X(e,t,Z)}function ee(e,t,r){var n,o,i,a,s=k({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?n=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&void 0!==a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),P(e.type,s,n||e.key,o||e.ref,null)}function te(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,U(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=C.slice,_={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},g=0,L.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=k({},this.state),"function"==typeof e&&(e=e(k({},r),this.props)),e&&k(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),U(this))},L.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),U(this))},L.prototype.render=A,y=[],b="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,w=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,E=0;var re,ne,oe,ie,ae=0,se=[],le=[],ce=_.__b,ue=_.__r,de=_.diffed,fe=_.__c,pe=_.unmount;function he(e,t){_.__h&&_.__h(ne,e,ae||t),ae=0;var r=ne.__H||(ne.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function me(e){return ae=1,_e(Ae,e)}function _e(e,t,r){var n=he(re++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ae(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ne,!ne.u)){var o=function(e,t,r){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,r);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!i||i.call(this,e,t,r))};ne.u=!0;var i=ne.shouldComponentUpdate,a=ne.componentWillUpdate;ne.componentWillUpdate=function(e,t,r){if(this.__e){var n=i;i=void 0,o(e,t,r),i=n}a&&a.call(this,e,t,r)},ne.shouldComponentUpdate=o}return n.__N||n.__}function ge(e,t){var r=he(re++,3);!_.__s&&Te(r.__H,t)&&(r.__=e,r.i=t,ne.__H.__h.push(r))}function ye(e,t){var r=he(re++,4);!_.__s&&Te(r.__H,t)&&(r.__=e,r.i=t,ne.__h.push(r))}function ve(e){return ae=5,we((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function we(e,t){var r=he(re++,7);return Te(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ee(e,t){return ae=8,we((function(){return e}),t)}function xe(e){var t=ne.context[e.__c],r=he(re++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ne)),t.props.value):e.__}function Ce(e,t){_.useDebugValue&&_.useDebugValue(t?t(e):e)}function Se(){var e=he(re++,11);if(!e.__){for(var t=ne.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ne(){for(var e;e=se.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Oe),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(Ko){e.__H.__h=[],_.__e(Ko,e.__v)}}_.__b=function(e){ne=null,ce&&ce(e)},_.__r=function(e){ue&&ue(e),re=0;var t=(ne=e.__c).__H;t&&(oe===ne?(t.__h=[],ne.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Oe),t.__h.forEach(Pe),t.__h=[],re=0)),oe=ne},_.diffed=function(e){de&&de(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==se.push(t)&&ie===_.requestAnimationFrame||((ie=_.requestAnimationFrame)||Re)(Ne)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ne=null},_.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Oe),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],_.__e(r,e.__v)}})),fe&&fe(e,t)},_.unmount=function(e){pe&&pe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Oe(e)}catch(r){t=r}})),r.__H=void 0,t&&_.__e(t,r.__v))};var ke="function"==typeof requestAnimationFrame;function Re(e){var t,r=function(){clearTimeout(n),ke&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ke&&(t=requestAnimationFrame(r))}function Oe(e){var t=ne,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ne=t}function Pe(e){var t=ne;e.__c=e.__(),ne=t}function Te(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function Ae(e,t){return"function"==typeof t?t(e):t}function Le(e,t){return function(){return e.apply(t,arguments)}}const{toString:Me}=Object.prototype,{getPrototypeOf:Fe}=Object,Ue=(Be=Object.create(null),e=>{const t=Me.call(e);return Be[t]||(Be[t]=t.slice(8,-1).toLowerCase())});var Be;const je=e=>(e=e.toLowerCase(),t=>Ue(t)===e),De=e=>t=>typeof t===e,{isArray:Ie}=Array,He=De("undefined");const ze=je("ArrayBuffer");const $e=De("string"),Ve=De("function"),qe=De("number"),We=e=>null!==e&&"object"==typeof e,Ye=e=>{if("object"!==Ue(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ke=je("Date"),Je=je("File"),Qe=je("Blob"),Ge=je("FileList"),Xe=je("URLSearchParams"),[Ze,et,tt,rt]=["ReadableStream","Request","Response","Headers"].map(je);function nt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Ie(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function ot(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const it="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,at=e=>!He(e)&&e!==it;const st=(lt="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>lt&&e instanceof lt);var lt;const ct=je("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dt=je("RegExp"),ft=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nt(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},pt="abcdefghijklmnopqrstuvwxyz",ht="0123456789",mt={DIGIT:ht,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ht};const _t=je("AsyncFunction"),gt=(yt="function"==typeof setImmediate,vt=Ve(it.postMessage),yt?setImmediate:vt?(bt=`axios@${Math.random()}`,wt=[],it.addEventListener("message",(({source:e,data:t})=>{e===it&&t===bt&&wt.length&&wt.shift()()}),!1),e=>{wt.push(e),it.postMessage(bt,"*")}):e=>setTimeout(e));var yt,vt,bt,wt;const Et="undefined"!=typeof queueMicrotask?queueMicrotask.bind(it):"undefined"!=typeof process&&process.nextTick||gt,xt={isArray:Ie,isArrayBuffer:ze,isBuffer:function(e){return null!==e&&!He(e)&&null!==e.constructor&&!He(e.constructor)&&Ve(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ve(e.append)&&("formdata"===(t=Ue(e))||"object"===t&&Ve(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ze(e.buffer),t},isString:$e,isNumber:qe,isBoolean:e=>!0===e||!1===e,isObject:We,isPlainObject:Ye,isReadableStream:Ze,isRequest:et,isResponse:tt,isHeaders:rt,isUndefined:He,isDate:Ke,isFile:Je,isBlob:Qe,isRegExp:dt,isFunction:Ve,isStream:e=>We(e)&&Ve(e.pipe),isURLSearchParams:Xe,isTypedArray:st,isFileList:Ge,forEach:nt,merge:function e(){const{caseless:t}=at(this)&&this||{},r={},n=(n,o)=>{const i=t&&ot(r,o)||o;Ye(r[i])&&Ye(n)?r[i]=e(r[i],n):Ye(n)?r[i]=e({},n):Ie(n)?r[i]=n.slice():r[i]=n};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&nt(arguments[o],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(nt(t,((t,n)=>{r&&Ve(t)?e[n]=Le(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Ue,kindOfTest:je,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(Ie(e))return e;let t=e.length;if(!qe(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ct,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ft,freezeMethods:e=>{ft(e,((t,r)=>{if(Ve(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Ve(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return Ie(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ot,global:it,isContextDefined:at,ALPHABET:mt,generateString:(e=16,t=mt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Ve(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(We(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=Ie(e)?[]:{};return nt(e,((e,t)=>{const i=r(e,n+1);!He(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:_t,isThenable:e=>e&&(We(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),setImmediate:gt,asap:Et};function Ct(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}xt.inherits(Ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const St=Ct.prototype,Nt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Nt[e]={value:e}})),Object.defineProperties(Ct,Nt),Object.defineProperty(St,"isAxiosError",{value:!0}),Ct.from=(e,t,r,n,o,i)=>{const a=Object.create(St);return xt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ct.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function kt(e){return xt.isPlainObject(e)||xt.isArray(e)}function Rt(e){return xt.endsWith(e,"[]")?e.slice(0,-2):e}function Ot(e,t,r){return e?e.concat(t).map((function(e,t){return e=Rt(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Pt=xt.toFlatObject(xt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,r){if(!xt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=xt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!xt.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&xt.isSpecCompliantForm(t);if(!xt.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(xt.isDate(e))return e.toISOString();if(!s&&xt.isBlob(e))throw new Ct("Blob is not supported. Use a Buffer instead.");return xt.isArrayBuffer(e)||xt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(xt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(xt.isArray(e)&&function(e){return xt.isArray(e)&&!e.some(kt)}(e)||(xt.isFileList(e)||xt.endsWith(r,"[]"))&&(s=xt.toArray(e)))return r=Rt(r),s.forEach((function(e,n){!xt.isUndefined(e)&&null!==e&&t.append(!0===a?Ot([r],n,i):null===a?r:r+"[]",l(e))})),!1;return!!kt(e)||(t.append(Ot(o,r,i),l(e)),!1)}const u=[],d=Object.assign(Pt,{defaultVisitor:c,convertValue:l,isVisitable:kt});if(!xt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!xt.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),xt.forEach(r,(function(r,i){!0===(!(xt.isUndefined(r)||null===r)&&o.call(t,r,xt.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),u.pop()}}(e),t}function At(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Lt(e,t){this._pairs=[],e&&Tt(e,this,t)}const Mt=Lt.prototype;function Ft(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ut(e,t,r){if(!t)return e;const n=r&&r.encode||Ft,o=r&&r.serialize;let i;if(i=o?o(t,r):xt.isURLSearchParams(t)?t.toString():new Lt(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Mt.append=function(e,t){this._pairs.push([e,t])},Mt.toString=function(e){const t=e?function(t){return e.call(this,t,At)}:At;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Bt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){xt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Lt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},It="undefined"!=typeof window&&"undefined"!=typeof document,Ht=(zt="undefined"!=typeof navigator&&navigator.product,It&&["ReactNative","NativeScript","NS"].indexOf(zt)<0);var zt;const $t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Vt=It&&window.location.href||"http://localhost",qt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:It,hasStandardBrowserEnv:Ht,hasStandardBrowserWebWorkerEnv:$t,origin:Vt},Symbol.toStringTag,{value:"Module"})),...Dt};function Wt(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&xt.isArray(n)?n.length:i,s)return xt.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&xt.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&xt.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(xt.isFormData(e)&&xt.isFunction(e.entries)){const r={};return xt.forEachEntry(e,((e,n)=>{t(function(e){return xt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Yt={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=xt.isObject(e);o&&xt.isHTMLForm(e)&&(e=new FormData(e));if(xt.isFormData(e))return n?JSON.stringify(Wt(e)):e;if(xt.isArrayBuffer(e)||xt.isBuffer(e)||xt.isStream(e)||xt.isFile(e)||xt.isBlob(e)||xt.isReadableStream(e))return e;if(xt.isArrayBufferView(e))return e.buffer;if(xt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tt(e,new qt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return qt.isNode&&xt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=xt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(xt.isString(e))try{return(t||JSON.parse)(e),xt.trim(e)}catch(Ro){if("SyntaxError"!==Ro.name)throw Ro}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Yt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(xt.isResponse(e)||xt.isReadableStream(e))return e;if(e&&xt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(Ro){if(r){if("SyntaxError"===Ro.name)throw Ct.from(Ro,Ct.ERR_BAD_RESPONSE,this,null,this.response);throw Ro}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xt.forEach(["delete","get","head","post","put","patch"],(e=>{Yt.headers[e]={}}));const Kt=Yt,Jt=xt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qt=Symbol("internals");function Gt(e){return e&&String(e).trim().toLowerCase()}function Xt(e){return!1===e||null==e?e:xt.isArray(e)?e.map(Xt):String(e)}function Zt(e,t,r,n,o){return xt.isFunction(n)?n.call(this,t,r):(o&&(t=r),xt.isString(t)?xt.isString(n)?-1!==t.indexOf(n):xt.isRegExp(n)?n.test(t):void 0:void 0)}class er{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Gt(t);if(!o)throw new Error("header name must be a non-empty string");const i=xt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Xt(e))}const i=(e,t)=>xt.forEach(e,((e,r)=>o(e,r,t)));if(xt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(xt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Jt[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(xt.isHeaders(e))for(const[a,s]of e.entries())o(s,a,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Gt(e)){const r=xt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(xt.isFunction(t))return t.call(this,e,r);if(xt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Gt(e)){const r=xt.findKey(this,e);return!(!r||void 0===this[r]||t&&!Zt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Gt(e)){const o=xt.findKey(r,e);!o||t&&!Zt(0,r[o],o,t)||(delete r[o],n=!0)}}return xt.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Zt(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return xt.forEach(this,((n,o)=>{const i=xt.findKey(r,o);if(i)return t[i]=Xt(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Xt(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return xt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&xt.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Qt]=this[Qt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Gt(e);t[n]||(!function(e,t){const r=xt.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return xt.isArray(e)?e.forEach(n):n(e),this}}er.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),xt.reduceDescriptors(er.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),xt.freezeMethods(er);const tr=er;function rr(e,t){const r=this||Kt,n=t||r,o=tr.from(n.headers);let i=n.data;return xt.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function nr(e){return!(!e||!e.__CANCEL__)}function or(e,t,r){Ct.call(this,null==e?"canceled":e,Ct.ERR_CANCELED,t,r),this.name="CanceledError"}function ir(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Ct("Request failed with status code "+r.status,[Ct.ERR_BAD_REQUEST,Ct.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}xt.inherits(or,Ct,{__CANCEL__:!0});const ar=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=n[a];o||(o=l),r[i]=s,n[i]=l;let u=a,d=0;for(;u!==i;)d+=r[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,l=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},sr=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},lr=e=>(...t)=>xt.asap((()=>e(...t))),cr=qt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=xt.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0},ur=qt.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];xt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),xt.isString(n)&&a.push("path="+n),xt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function dr(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const fr=e=>e instanceof tr?{...e}:e;function pr(e,t){t=t||{};const r={};function n(e,t,r){return xt.isPlainObject(e)&&xt.isPlainObject(t)?xt.merge.call({caseless:r},e,t):xt.isPlainObject(t)?xt.merge({},t):xt.isArray(t)?t.slice():t}function o(e,t,r){return xt.isUndefined(t)?xt.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!xt.isUndefined(t))return n(void 0,t)}function a(e,t){return xt.isUndefined(t)?xt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(fr(e),fr(t),!0)};return xt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=l[n]||o,a=i(e[n],t[n],n);xt.isUndefined(a)&&i!==s||(r[n]=a)})),r}const hr=e=>{const t=pr({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=tr.from(s),t.url=Ut(dr(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),xt.isFormData(n))if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(qt.hasStandardBrowserEnv&&(o&&xt.isFunction(o)&&(o=o(t)),o||!1!==o&&cr(t.url))){const e=i&&a&&ur.read(a);e&&s.set(i,e)}return t},mr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=hr(e);let o=n.data;const i=tr.from(n.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function h(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function _(){if(!m)return;const n=tr.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ir((function(e){t(e),h()}),(function(e){r(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(_)},m.onabort=function(){m&&(r(new Ct("Request aborted",Ct.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new Ct("Network Error",Ct.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||jt;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Ct(t,o.clarifyTimeoutError?Ct.ETIMEDOUT:Ct.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&xt.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),xt.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),p&&([l,u]=ar(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=ar(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(a=t=>{m&&(r(!t||t.type?new or(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===qt.protocols.indexOf(g)?r(new Ct("Unsupported protocol "+g+":",Ct.ERR_BAD_REQUEST,e)):m.send(o||null)}))},_r=(e,t)=>{let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Ct?t:new or(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{o(new Ct(`timeout ${t} of ms exceeded`,Ct.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=a,[s,()=>{i&&clearTimeout(i),i=null}]},gr=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},yr=(e,t,r,n,o)=>{const i=async function*(e,t,r){for await(const n of e)yield*gr(ArrayBuffer.isView(n)?n:await r(String(n)),t)}(e,t,o);let a,s=0,l=e=>{a||(a=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return l(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw l(t),t}},cancel:e=>(l(e),i.return())},{highWaterMark:2})},vr="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,br=vr&&"function"==typeof ReadableStream,wr=vr&&("function"==typeof TextEncoder?(Er=new TextEncoder,e=>Er.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Er;const xr=(e,...t)=>{try{return!!e(...t)}catch(Ro){return!1}},Cr=br&&xr((()=>{let e=!1;const t=new Request(qt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Sr=br&&xr((()=>xt.isReadableStream(new Response("").body))),Nr={stream:Sr&&(e=>e.body)};var kr;vr&&(kr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Nr[e]&&(Nr[e]=xt.isFunction(kr[e])?t=>t[e]():(t,r)=>{throw new Ct(`Response type '${e}' is not supported`,Ct.ERR_NOT_SUPPORT,r)})})));const Rr=async(e,t)=>{const r=xt.toFiniteNumber(e.getContentLength());return null==r?(async e=>null==e?0:xt.isBlob(e)?e.size:xt.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:xt.isArrayBufferView(e)||xt.isArrayBuffer(e)?e.byteLength:(xt.isURLSearchParams(e)&&(e+=""),xt.isString(e)?(await wr(e)).byteLength:void 0))(t):r},Or={http:null,xhr:mr,fetch:vr&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=hr(e);c=c?(c+"").toLowerCase():"text";let p,h,[m,_]=o||i||a?_r([o,i],a):[];const g=()=>{!p&&setTimeout((()=>{m&&m.unsubscribe()})),p=!0};let y;try{if(l&&Cr&&"get"!==r&&"head"!==r&&0!==(y=await Rr(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(xt.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=sr(y,ar(lr(l)));n=yr(r.body,65536,e,t,wr)}}xt.isString(d)||(d=d?"include":"omit"),h=new Request(t,{...f,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:d});let o=await fetch(h);const i=Sr&&("stream"===c||"response"===c);if(Sr&&(s||i)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=xt.toFiniteNumber(o.headers.get("content-length")),[r,n]=s&&sr(t,ar(lr(s),!0))||[];o=new Response(yr(o.body,65536,r,(()=>{n&&n(),i&&g()}),wr),e)}c=c||"text";let a=await Nr[xt.findKey(Nr,c)||"text"](o,e);return!i&&g(),_&&_(),await new Promise(((t,r)=>{ir(t,r,{data:a,headers:tr.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})}))}catch(v){if(g(),v&&"TypeError"===v.name&&/fetch/i.test(v.message))throw Object.assign(new Ct("Network Error",Ct.ERR_NETWORK,e,h),{cause:v.cause||v});throw Ct.from(v,v&&v.code,e,h)}})};xt.forEach(Or,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Ro){}Object.defineProperty(e,"adapterName",{value:t})}}));const Pr=e=>`- ${e}`,Tr=e=>xt.isFunction(e)||null===e||!1===e,Ar=e=>{e=xt.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Tr(r)&&(n=Or[(t=String(r)).toLowerCase()],void 0===n))throw new Ct(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Ct("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Pr).join("\n"):" "+Pr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Lr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new or(null,e)}function Mr(e){Lr(e),e.headers=tr.from(e.headers),e.data=rr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ar(e.adapter||Kt.adapter)(e).then((function(t){return Lr(e),t.data=rr.call(e,e.transformResponse,t),t.headers=tr.from(t.headers),t}),(function(t){return nr(t)||(Lr(e),t&&t.response&&(t.response.data=rr.call(e,e.transformResponse,t.response),t.response.headers=tr.from(t.response.headers))),Promise.reject(t)}))}const Fr="1.7.4",Ur={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ur[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Br={};Ur.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Ct(n(o," has been removed"+(t?" in "+t:"")),Ct.ERR_DEPRECATED);return t&&!Br[o]&&(Br[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};const jr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Ct("options must be an object",Ct.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new Ct("option "+i+" must be "+r,Ct.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Ct("Unknown option "+i,Ct.ERR_BAD_OPTION)}},validators:Ur},Dr=jr.validators;class Ir{constructor(e){this.defaults=e,this.interceptors={request:new Bt,response:new Bt}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(Ro){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=pr(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&jr.assertOptions(r,{silentJSONParsing:Dr.transitional(Dr.boolean),forcedJSONParsing:Dr.transitional(Dr.boolean),clarifyTimeoutError:Dr.transitional(Dr.boolean)},!1),null!=n&&(xt.isFunction(n)?t.paramsSerializer={serialize:n}:jr.assertOptions(n,{encode:Dr.function,serialize:Dr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&xt.merge(o.common,o[t.method]);o&&xt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=tr.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[Mr.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=Mr.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Ut(dr((e=pr(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}xt.forEach(["delete","get","head","options"],(function(e){Ir.prototype[e]=function(t,r){return this.request(pr(r||{},{method:e,url:t,data:(r||{}).data}))}})),xt.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(pr(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ir.prototype[e]=t(),Ir.prototype[e+"Form"]=t(!0)}));const Hr=Ir;class zr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new or(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new zr((function(t){e=t})),cancel:e}}}const $r=zr;const Vr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vr).forEach((([e,t])=>{Vr[t]=e}));const qr=Vr;const Wr=function e(t){const r=new Hr(t),n=Le(Hr.prototype.request,r);return xt.extend(n,Hr.prototype,r,{allOwnKeys:!0}),xt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(pr(t,r))},n}(Kt);Wr.Axios=Hr,Wr.CanceledError=or,Wr.CancelToken=$r,Wr.isCancel=nr,Wr.VERSION=Fr,Wr.toFormData=Tt,Wr.AxiosError=Ct,Wr.Cancel=Wr.CanceledError,Wr.all=function(e){return Promise.all(e)},Wr.spread=function(e){return function(t){return e.apply(null,t)}},Wr.isAxiosError=function(e){return xt.isObject(e)&&!0===e.isAxiosError},Wr.mergeConfig=pr,Wr.AxiosHeaders=tr,Wr.formToJSON=e=>Wt(xt.isHTMLForm(e)?new FormData(e):e),Wr.getAdapter=Ar,Wr.HttpStatusCode=qr,Wr.default=Wr;const Yr=Wr,Kr=({request:e})=>console.error("[API] Request error:",e),Jr=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let Qr;p.bind({g:1});const Gr=h("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),Xr=(function(){const e=h.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
2
2
  @import url('//fonts.googleapis.com/css?family=Poppins');
3
3
 
4
4
  workplace-link {
5
5
  font-family: 'Poppins', sans-serif;
6
6
  }
7
- `,Bi=f("div")([{marginLeft:"1rem",marginRight:"1rem",display:"flex",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem","@media (min-width: 768px)":{margin:"auto"}},{minHeight:"25rem"}]),zi=f("div")([{position:"relative",height:"0.5rem",width:"12rem"}]),Hi=f("div")`
7
+ `,Zr=h("div")([{marginLeft:"1rem",marginRight:"1rem",display:"flex",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem","@media (min-width: 768px)":{margin:"auto"}},{minHeight:"25rem"}]);var en=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(en||{});var tn=0;function rn(e,t,r,n,o,i){var a,s,l={};for(s in t)"ref"==s?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--tn,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return _.vnode&&_.vnode(c),c}const nn=e=>rn("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[rn("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),rn("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),on=e=>{const[t,r]=me(!1);return rn("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[rn("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&rn("div",{className:"absolute animate-spin",children:rn(nn,{theme:"light"})})]})},an=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:o,iconElement:i,...a})=>{const s=Ee((e=>{r.test(e.key)||e.preventDefault()}),[r]);return rn(A,{children:[rn("label",{className:"font-medium text-sm text-gray-900 text-left",children:rn("span",{children:t})}),rn("div",{className:"relative",children:[rn("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:o,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...a}),i]})]})},sn=({className:e,onClick:t,...r})=>{const[n,o]=me(!1);return rn("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:Ee((()=>{if(!n)return o(!0),t().finally((()=>{o(!1)}))}),[n,t]),...r,children:[rn("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&rn("div",{className:"absolute animate-spin",children:rn(nn,{theme:"primary"})})]})},ln=({className:e,children:t})=>rn("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),cn=({className:e,children:t})=>rn("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),un=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};function dn(e,t){for(var r in t)e[r]=t[r];return e}function fn(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function pn(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function hn(e){this.props=e}function mn(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:fn(this.props,e)}function n(t){return this.shouldComponentUpdate=r,O(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(hn.prototype=new L).isPureReactComponent=!0,hn.prototype.shouldComponentUpdate=function(e,t){return fn(this.props,e)||fn(this.state,t)};var _n=_.__b;_.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_n&&_n(e)};var gn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function yn(e){function t(t){var r=dn({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=gn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vn=function(e,t){return null==e?null:I(I(e).map(t))},bn={map:vn,forEach:vn,count:function(e){return e?I(e).length:0},only:function(e){var t=I(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:I},wn=_.__e;_.__e=function(e,t,r,n){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);wn(e,t,r,n)};var En=_.unmount;function xn(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=dn({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return xn(e,t,r)}))),e}function Cn(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Cn(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function Sn(){this.__u=0,this.t=null,this.__b=null}function Nn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function kn(e){var t,r,n;function o(o){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return O(r,o)}return o.displayName="Lazy",o.__f=!0,o}function Rn(){this.u=null,this.o=null}_.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),En&&En(e)},(Sn.prototype=new L).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=Nn(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=Cn(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},l=!0===t.__h;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Sn.prototype.componentWillUnmount=function(){this.t=[]},Sn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=xn(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&O(A,null,e.fallback);return o&&(o.__h=null),[O(A,null,t.__a?null:e.children),o]};var On=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Pn(e){return this.getChildContext=function(){return e.context},e.children}function Tn(e){var t=this,r=e.i;t.componentWillUnmount=function(){X(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,r){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),X(O(Pn,{context:t.context},e.__v),t.l)}function An(e,t){var r=O(Tn,{__v:e,i:t});return r.containerInfo=t,r}(Rn.prototype=new L).__a=function(e){var t=this,r=Nn(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),On(t,e,n)):o()};r?r(i):i()}},Rn.prototype.render=function(e){this.u=null,this.o=new Map;var t=I(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Rn.prototype.componentDidUpdate=Rn.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){On(e,r,t)}))};var Ln="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Mn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Fn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Un=/[A-Z0-9]/g,Bn="undefined"!=typeof document,jn=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Dn(e,t,r){return null==t.__k&&(t.textContent=""),X(e,t),"function"==typeof r&&r(),e?e.__c:null}function In(e,t,r){return Z(e,t),"function"==typeof r&&r(),e?e.__c:null}L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(L.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Hn=_.event;function zn(){}function $n(){return this.cancelBubble}function Vn(){return this.defaultPrevented}_.event=function(e){return Hn&&(e=Hn(e)),e.persist=zn,e.isPropagationStopped=$n,e.isDefaultPrevented=Vn,e.nativeEvent=e};var qn,Wn={enumerable:!1,configurable:!0,get:function(){return this.class}},Yn=_.vnode;_.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Bn&&"children"===o&&"noscript"===r||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||jn(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":Fn.test(o)?o=a:-1===r.indexOf("-")&&Mn.test(o)?o=o.replace(Un,"-$&").toLowerCase():null===i&&(i=void 0):a=o="oninput","oninput"===a&&n[o=a]&&(o="oninputCapture"),n[o]=i}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=I(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=I(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",Wn)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=Ln,Yn&&Yn(e)};var Kn=_.__r;_.__r=function(e){Kn&&Kn(e),qn=e.__c};var Jn=_.diffed;_.diffed=function(e){Jn&&Jn(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),qn=null};var Qn={ReactCurrentDispatcher:{current:{readContext:function(e){return qn.__n[e.__c].props.value}}}};function Gn(e){return O.bind(null,e)}function Xn(e){return!!e&&e.$$typeof===Ln}function Zn(e){return Xn(e)&&e.type===A}function eo(e){return Xn(e)?ee.apply(null,arguments):e}function to(e){return!!e.__k&&(X(null,e),!0)}function ro(e){return e&&(e.base||1===e.nodeType&&e)||null}var no=function(e,t){return e(t)},oo=function(e,t){return e(t)},io=A;function ao(e){e()}function so(e){return e}function lo(){return[!1,ao]}var co=ye,uo=Xn;function fo(e,t){var r=t(),n=me({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ye((function(){o.__=r,o.v=t,pn(o.__,t())||i({h:o})}),[e,r,t]),ge((function(){return pn(o.__,o.v())||i({h:o}),e((function(){pn(o.__,o.v())||i({h:o})}))}),[e]),r}var po={useState:me,useId:Se,useReducer:_e,useEffect:ge,useLayoutEffect:ye,useInsertionEffect:co,useTransition:lo,useDeferredValue:so,useSyncExternalStore:fo,startTransition:ao,useRef:ve,useImperativeHandle:be,useMemo:we,useCallback:Ee,useContext:xe,useDebugValue:Ce,version:"17.0.2",Children:bn,render:Dn,hydrate:In,unmountComponentAtNode:to,createPortal:An,createElement:O,createContext:te,createFactory:Gn,cloneElement:eo,createRef:T,Fragment:A,isValidElement:Xn,isElement:uo,isFragment:Zn,findDOMNode:ro,Component:L,PureComponent:hn,memo:mn,forwardRef:yn,flushSync:oo,unstable_batchedUpdates:no,StrictMode:io,Suspense:Sn,SuspenseList:Rn,lazy:kn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qn};const ho=Object.freeze(Object.defineProperty({__proto__:null,Children:bn,Component:L,Fragment:A,PureComponent:hn,StrictMode:io,Suspense:Sn,SuspenseList:Rn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qn,cloneElement:eo,createContext:te,createElement:O,createFactory:Gn,createPortal:An,createRef:T,default:po,findDOMNode:ro,flushSync:oo,forwardRef:yn,hydrate:In,isElement:uo,isFragment:Zn,isValidElement:Xn,lazy:kn,memo:mn,render:Dn,startTransition:ao,unmountComponentAtNode:to,unstable_batchedUpdates:no,useCallback:Ee,useContext:xe,useDebugValue:Ce,useDeferredValue:so,useEffect:ge,useErrorBoundary:function(e){var t=he(re++,10),r=me();return t.__=e,ne.componentDidCatch||(ne.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]},useId:Se,useImperativeHandle:be,useInsertionEffect:co,useLayoutEffect:ye,useMemo:we,useReducer:_e,useRef:ve,useState:me,useSyncExternalStore:fo,useTransition:lo,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var mo=Object.defineProperty,_o=(e,t,r)=>(((e,t,r)=>{t in e?mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let go=new class{constructor(){_o(this,"current",this.detect()),_o(this,"handoffState","pending"),_o(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},yo=(e,t)=>{go.isServer?ge(e,t):ye(e,t)};function vo(e){let t=ve(e);return yo((()=>{t.current=e}),[e]),t}function bo(){let e=[],t={addEventListener:(e,r,n,o)=>(e.addEventListener(r,n,o),t.add((()=>e.removeEventListener(r,n,o)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=bo();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function wo(){let[e]=me(bo);return ge((()=>()=>e.dispose()),[e]),e}let Eo=function(e){let t=vo(e);return po.useCallback(((...e)=>t.current(...e)),[t])};function xo(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in ho&&ho.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=me(go.isHandoffComplete);return t&&!1===go.isHandoffComplete&&r(!1),ge((()=>{!0!==t&&r(!0)}),[t]),ge((()=>go.handoff()),[]),!e&&t}function Co(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Co),n}let So=Symbol();function No(...e){let t=ve(e);ge((()=>{t.current=e}),[e]);let r=Eo((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[So])))?void 0:r}function ko(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ro,Oo,Po=((Oo=Po||{})[Oo.None=0]="None",Oo[Oo.RenderStrategy=1]="RenderStrategy",Oo[Oo.Static=2]="Static",Oo),To=((Ro=To||{})[Ro.Unmount=0]="Unmount",Ro[Ro.Hidden=1]="Hidden",Ro);function Ao({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:a}){let s=Mo(t,e);if(i)return Lo(s,r,n,a);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=s;if(e)return Lo(t,r,n,a)}if(1&l){let{unmount:e=!0,...t}=s;return Co(e?0:1,{0:()=>null,1:()=>Lo({...t,hidden:!0,style:{display:"none"}},r,n,a)})}return Lo(s,r,n,a)}function Lo(e,t={},r,n){let{as:o=r,children:i,refName:a="ref",...s}=Bo(e,["unmount","static"]),l=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof i?i(t):i;"className"in s&&s.className&&"function"==typeof s.className&&(s.className=s.className(t));let u={};if(t){let e=!1,r=[];for(let[n,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(o===A&&Object.keys(Uo(s)).length>0){if(!Xn(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=c.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>ko(null==e?void 0:e.className(...t),s.className):ko(null==e?void 0:e.className,s.className),r=t?{className:t}:{};return eo(c,Object.assign({},Mo(c.props,Uo(Bo(s,["ref"]))),u,l,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(c.ref,l.ref),r))}return O(o,Object.assign({},Bo(s,["ref"]),o!==A&&l,o!==A&&u),c)}function Mo(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let o=r[n];for(let r of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Fo(e){var t;return Object.assign(yn(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Uo(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Bo(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let jo=te(null);jo.displayName="OpenClosedContext";var Do=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Do||{});function Io(){return xe(jo)}function Ho({value:e,children:t}){return po.createElement(jo.Provider,{value:e},t)}function zo(){let e=ve(!1);return yo((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function $o(e,...t){e&&t.length>0&&e.classList.add(...t)}function Vo(e,...t){e&&t.length>0&&e.classList.remove(...t)}function qo(e,t,r,n){let o=r?"enter":"leave",i=bo(),a=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=Co(o,{enter:()=>t.enter,leave:()=>t.leave}),l=Co(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Co(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Vo(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),$o(e,...t.base,...s,...c),i.nextFrame((()=>{Vo(e,...t.base,...s,...c),$o(e,...t.base,...s,...l),function(e,t){let r=bo();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:o}=getComputedStyle(e),[i,a]=[n,o].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),s=i+a;if(0!==s){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),s),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Vo(e,...t.base,...s),$o(e,...t.base,...t.entered),a())))})),i.dispose}function Wo(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Yo=te(null);Yo.displayName="TransitionContext";var Ko,Jo=((Ko=Jo||{}).Visible="visible",Ko.Hidden="hidden",Ko);let Qo=te(null);function Go(e){return"children"in e?Go(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Xo(e,t){let r=vo(e),n=ve([]),o=zo(),i=wo(),a=Eo(((e,t=To.Hidden)=>{let a=n.current.findIndex((({el:t})=>t===e));-1!==a&&(Co(t,{[To.Unmount](){n.current.splice(a,1)},[To.Hidden](){n.current[a].state="hidden"}}),i.microTask((()=>{var e;!Go(n)&&o.current&&(null==(e=r.current)||e.call(r))})))})),s=Eo((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>a(e,To.Unmount)})),l=ve([]),c=ve(Promise.resolve()),u=ve({enter:[],leave:[],idle:[]}),d=Eo(((e,r,n)=>{l.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),f=Eo(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>r(t)))}));return we((()=>({children:n,register:s,unregister:a,onStart:d,onStop:f,wait:c,chains:u})),[s,a,n,d,f,u,c])}function Zo(){}Qo.displayName="NestingContext";let ei=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ti(e){var t;let r={};for(let n of ei)r[n]=null!=(t=e[n])?t:Zo;return r}let ri=Po.RenderStrategy;let ni=Fo((function(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,a=ve(null),s=No(a,t);xo();let l=Io();if(void 0===r&&null!==l&&(r=(l&Do.Open)===Do.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=me(r?"visible":"hidden"),d=Xo((()=>{u("hidden")})),[f,p]=me(!0),h=ve([r]);yo((()=>{!1!==f&&h.current[h.current.length-1]!==r&&(h.current.push(r),p(!1))}),[h,r]);let m=we((()=>({show:r,appear:n,initial:f})),[r,n,f]);ge((()=>{if(r)u("visible");else if(Go(d)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let _={unmount:o},g=Eo((()=>{var t;f&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),y=Eo((()=>{var t;f&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return po.createElement(Qo.Provider,{value:d},po.createElement(Yo.Provider,{value:m},Ao({ourProps:{..._,as:A,children:po.createElement(oi,{ref:s,..._,...i,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:A,features:ri,visible:"visible"===c,name:"Transition"})))})),oi=Fo((function(e,t){var r,n;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:l,enterFrom:c,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:h,...m}=e,_=ve(null),g=No(_,t),y=null==(r=m.unmount)||r?To.Unmount:To.Hidden,{show:v,appear:b,initial:w}=function(){let e=xe(Yo);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,x]=me(v?"visible":"hidden"),C=function(){let e=xe(Qo);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:S,unregister:N}=C;ge((()=>S(_)),[S,_]),ge((()=>{if(y===To.Hidden&&_.current)return v&&"visible"!==E?void x("visible"):Co(E,{hidden:()=>N(_),visible:()=>S(_)})}),[E,_,S,N,v,y]);let k=vo({base:Wo(m.className),enter:Wo(l),enterFrom:Wo(c),enterTo:Wo(u),entered:Wo(d),leave:Wo(f),leaveFrom:Wo(p),leaveTo:Wo(h)}),R=function(e){let t=ve(ti(e));return ge((()=>{t.current=ti(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),O=xo();ge((()=>{if(O&&"visible"===E&&null===_.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[_,E,O]);let P=b&&v&&w,T=!O||w&&!b?"idle":v?"enter":"leave",A=function(e=0){let[t,r]=me(e),n=zo(),o=Ee((e=>{n.current&&r((t=>t|e))}),[t,n]),i=Ee((e=>Boolean(t&e)),[t]),a=Ee((e=>{n.current&&r((t=>t&~e))}),[r,n]),s=Ee((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}(0),L=Eo((e=>Co(e,{enter:()=>{A.addFlag(Do.Opening),R.current.beforeEnter()},leave:()=>{A.addFlag(Do.Closing),R.current.beforeLeave()},idle:()=>{}}))),M=Eo((e=>Co(e,{enter:()=>{A.removeFlag(Do.Opening),R.current.afterEnter()},leave:()=>{A.removeFlag(Do.Closing),R.current.afterLeave()},idle:()=>{}}))),F=Xo((()=>{x("hidden"),N(_)}),C);!function({immediate:e,container:t,direction:r,classes:n,onStart:o,onStop:i}){let a=zo(),s=wo(),l=vo(r);yo((()=>{e&&(l.current="enter")}),[e]),yo((()=>{let e=bo();s.add(e.dispose);let r=t.current;if(r&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(qo(r,n.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[r])}({immediate:P,container:_,classes:k,direction:T,onStart:vo((e=>{F.onStart(_,e,L)})),onStop:vo((e=>{F.onStop(_,e,M),"leave"===e&&!Go(F)&&(x("hidden"),N(_))}))});let U=m,B={ref:g};return P?U={...U,className:ko(m.className,...k.current.enter,...k.current.enterFrom)}:(U.className=ko(m.className,null==(n=_.current)?void 0:n.className),""===U.className&&delete U.className),po.createElement(Qo.Provider,{value:F},po.createElement(Ho,{value:Co(E,{visible:Do.Open,hidden:Do.Closed})|A.flags},Ao({ourProps:B,theirProps:U,defaultTag:"div",features:ri,visible:"visible"===E,name:"Transition.Child"})))})),ii=Fo((function(e,t){let r=null!==xe(Yo),n=null!==Io();return po.createElement(po.Fragment,null,!r&&n?po.createElement(ni,{ref:t,...e}):po.createElement(oi,{ref:t,...e}))})),ai=Object.assign(ni,{Child:ii,Root:ni});const si=({children:e})=>{const t=po.Children.toArray(e),r=t.find((e=>e.type===li)),n=t.find((e=>e.type===ci));return rn(ai,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:rn("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[rn(ai,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&rn("div",{className:"flex items-center h-full",children:r})}),rn(ai,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&rn("div",{className:"flex items-center h-full",children:n})})]})})},li=({children:e})=>rn(A,{children:e}),ci=({children:e})=>rn(A,{children:e});si.Top=li,si.Bottom=ci;const ui={verfiedPhoneNumber:void 0},di=te(ui),fi=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),pi=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:un},[n,o]=me(""),{setPhoneNumber:i,phoneNumber:a}=(()=>{const{verfiedPhoneNumber:e}=xe(di),[t,r]=me(e??""),n=we((()=>t.replace(/ /g,"")),[t]),o=we((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),i=we((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),a=we((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),s=we((()=>i===e),[i,e]);return{setPhoneNumber:r,phoneNumber:{valid:o,formatted:i,masked:a,isVerified:s}}})(),[s,l]=me(a.isVerified);ge((()=>{r("sign-up-viewed")}),[r]);const c=Ee((()=>{o("")}),[]),u=Ee((()=>{const e=a.valid?"":"Please enter a valid Australian mobile number beginning with 04.";o(e),l(a.isVerified)}),[a.isVerified,a.valid]),d=Ee((async()=>{a.valid&&await e(a).then((()=>r("sign-up-completed"))).catch(o)}),[a,e,r]);Ee((()=>r("sign-up-declined").then(t)),[t,r]);const f=Ee((async()=>{l(!1)}),[]),p=s?rn("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",rn("span",{className:"ml-1",children:rn(fi,{})})]}):void 0;return rn(si,{children:[rn(si.Top,{children:rn("div",{className:"flex flex-col gap-5",children:[rn(ln,{children:"Join your workplace benefits program"}),rn(cn,{children:[s?"Confirm ":"Enter "," your ",rn("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),rn(si.Bottom,{children:rn("div",{className:"mt-5 md:w-[300px] text-left",children:[rn(an,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:a.formatted,onChange:i,onfocusin:c,onfocusout:u,iconElement:p,disabled:s}),0!==n.length&&rn("div",{className:"h-8 leading-none",children:rn("span",{className:"text-xs text-rose-500",children:n})}),s&&rn("div",{className:"mt-2 ml-2 mb-2 leading-none",children:rn("span",{className:"text-xs",children:["Not your personal number?",rn(sn,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),rn("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",rn("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",rn("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),rn(on,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},hi=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),mi=({children:e,...t})=>rn("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),_i=({open:e})=>rn(mi,{open:e,children:rn("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[rn("span",{className:"animate-spin",children:rn(nn,{size:"lg"})}),rn(ln,{children:"Creating your account"}),rn("div",{children:[rn(cn,{children:"This can take up to 30 seconds."}),rn(cn,{children:"Please don't navigate away or refresh your browser."})]})]})}),gi=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=me("");return{otp:{valid:we((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=me(!1),[l,c]=me(""),{countdown:u,restart:d}=(e=>{const[t,r]=me(e),n=ve(),o=Ee((()=>{clearInterval(n.current)}),[]);return ge((()=>o),[o]),{countdown:t,restart:Ee((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ge(d,[d]);const f=Ee((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),p=Ee((()=>(c(""),r().then(d).catch(c))),[r,d]);return rn(A,{children:[rn(_i,{open:a}),rn(si,{children:[rn(si.Top,{children:rn("div",{className:"flex flex-col gap-5",children:[rn(ln,{children:"Verify your mobile number"}),rn(cn,{children:["An SMS verification code has been sent to the number"," ",rn("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),rn(si.Bottom,{children:rn("div",{className:"mt-5 md:w-[300px] text-left",children:[rn(an,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:i}),l&&rn("span",{className:"text-xs text-rose-500",children:l}),rn("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",rn(sn,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&rn(A,{children:["in ",u," secs"]})]}),rn(on,{class:"mt-5 md:w-full text-white",disabled:!o.valid,onClickPromise:f,children:"Continue"}),rn(on,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:rn("span",{className:"flex gap-3",children:[rn(hi,{}),"Back"]})})]})})]})]})},yi=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:o})=>{const[i,a]=me(""),{step:s,goBack:l,goToStep:c}=(()=>{const[e,t]=me(0),r=Ee((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=Ee((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=Ee((t=>e(t.formatted).then((e=>{a(t.masked),e.isVerificationRequired?c(en.OTP):n()}))),[c,e,n]),d=Ee((e=>t(e).then((()=>{n()}))),[t,n]);return rn(A,{children:[s===en.PHONE_NUMBER&&rn(pi,{onSubmit:u,onDecline:o}),s===en.OTP&&rn(gi,{phoneNumber:i,onVerify:d,onResendOtp:r,onGoBack:l})]})},vi=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let bi;const wi=()=>bi;var Ei=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Ei||{});const xi=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ei[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ci=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},Si=h("div")`
8
+ ${()=>({margin:"2rem",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"})}
9
+
10
+ font-family: 'Poppins', sans-serif;
11
+ color: #052d39;
12
+
13
+ h1 {
14
+ ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"1.5rem",lineHeight:"2rem",fontWeight:"600"})}
15
+ }
16
+
17
+ h2 {
18
+ ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"400"})}
19
+ }
20
+
21
+ h3 {
22
+ ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600"})}
23
+ }
24
+
25
+ p {
26
+ ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400"})}
27
+ }
28
+ `,Ni=h("div")`
29
+ ${()=>({marginTop:"2.5rem",marginBottom:"2.5rem"})}
30
+ `,ki=h("div")`
31
+ ${()=>({gridTemplateColumns:"repeat(2, minmax(0, 1fr))"})}
32
+ `,Ri=h("img")`
33
+ ${()=>({margin:"0.5rem",display:"inline-block",height:"2rem"})}
34
+ `,Oi=h("img")`
35
+ ${()=>({margin:"0.5rem",display:"inline-block",height:"3rem"})}
36
+ `,Pi=h("a")``,Ti=h("img")`
37
+ ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",height:"6rem"})}
38
+ `;var Ai,Li,Mi=Object.defineProperty,Fi=Object.getOwnPropertySymbols,Ui=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,ji=(e,t,r)=>t in e?Mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t)=>{for(var r in t||(t={}))Ui.call(t,r)&&ji(e,r,t[r]);if(Fi)for(var r of Fi(t))Bi.call(t,r)&&ji(e,r,t[r]);return e},Ii=(e,t)=>{var r={};for(var n in e)Ui.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Fi)for(var n of Fi(e))t.indexOf(n)<0&&Bi.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let t=0;t<this.size;t++)a.push(!1);for(let t=0;t<this.size;t++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(o=t,e=r),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,r,o=1,a=40,l=-1,c=!0){if(!(t.MIN_VERSION<=o&&o<=a&&a<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const n=8*t.getNumDataCodewords(u,r),o=s.getTotalBits(e,u);if(o<=n){d=o;break}if(u>=a)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,n)&&(r=n);let f=[];for(const t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(const e of t.getData())f.push(e)}i(f.length==d);const p=8*t.getNumDataCodewords(u,r);i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let t=236;f.length<p;t^=253)n(t,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,r,h,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let o=0;o<10;o++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);i(n>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,o(n,i));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,o(n,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,o(n,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,o(n,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let r=0;r<18;r++){const e=o(t,r),n=this.size-11+r%3,i=Math.floor(r/3);this.setFunctionModule(n,i,e),this.setFunctionModule(i,n,e)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,a=t+r;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],a=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(t.getNumRawDataModules(r)/8),l=o-s%o,c=Math.floor(s/o);let u=[];const d=t.reedSolomonComputeDivisor(a);for(let i=0,p=0;i<o;i++){let r=e.slice(p,p+c-a+(i<l?0:1));p+=r.length;const n=t.reedSolomonComputeRemainder(r,d);i<l&&r.push(0),u.push(r.concat(n))}let f=[];for(let t=0;t<u[0].length;t++)u.forEach(((e,r)=>{(t!=c-a||r>=l)&&f.push(e[t])}));return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){const a=t-i,s=0==(t+1&2)?this.size-1-n:n;!this.isFunction[s][a]&&r<8*e.length&&(this.modules[s][a]=o(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[i][a]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[i][a],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,o)*t.PENALTY_N3}for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][i]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[a][i],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,o)*t.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let r=0;r<this.size-1;r++){const n=this.modules[i][r];n==this.modules[i][r+1]&&n==this.modules[i+1][r]&&n==this.modules[i+1][r+1]&&(e+=t.PENALTY_N2)}let r=0;for(const t of this.modules)r=t.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const a=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const o=Math.min(e.length-r,3);n(parseInt(e.substr(r,o),10),3*o+1,t),r+=o}return new a(a.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!a.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(o,11,r)}return t<e.length&&n(a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new a(a.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:a.isNumeric(e)?[a.makeNumeric(e)]:a.isAlphanumeric(e)?[a.makeAlphanumeric(e)]:[a.makeBytes(a.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new a(a.Mode.ECI,0,t)}static isNumeric(e){return a.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return a.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=s})(Ai||(Ai={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})((Li=Ai||(Ai={})).QrCode||(Li.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Ai||(Ai={}));var Hi=Ai,zi={L:Hi.QrCode.Ecc.LOW,M:Hi.QrCode.Ecc.MEDIUM,Q:Hi.QrCode.Ecc.QUARTILE,H:Hi.QrCode.Ecc.HIGH},$i=128,Vi="L",qi="#FFFFFF",Wi="#000000",Yi=!1,Ki=4,Ji=.1;
39
+ /**
40
+ * @license qrcode.react
41
+ * Copyright (c) Paul O'Shannessy
42
+ * SPDX-License-Identifier: ISC
43
+ */function Qi(e,t=0){const r=[];return e.forEach((function(e,n){let o=null;e.forEach((function(i,a){if(!i&&null!==o)return r.push(`M${o+t} ${n+t}h${a-o}v1H${o+t}z`),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?r.push(`M${a+t},${n+t} h1v1H${a+t}z`):r.push(`M${o+t},${n+t} h${a+1-o}v1H${o+t}z`)}}))})),r.join("")}function Gi(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function Xi(e,t,r,n){if(null==n)return null;const o=r?Ki:0,i=e.length+2*o,a=Math.floor(t*Ji),s=i/t,l=(n.width||a)*s,c=(n.height||a)*s,u=null==n.x?e.length/2-l/2:n.x*s,d=null==n.y?e.length/2-c/2:n.y*s;let f=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);f={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:f}}var Zi=function(){try{(new Path2D).addPath(new Path2D)}catch(Ro){return!1}return!0}();function ea(e){const t=e,{value:r,size:n=$i,level:o=Vi,bgColor:i=qi,fgColor:a=Wi,includeMargin:s=Yi,style:l,imageSettings:c}=t,u=Ii(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==c?void 0:c.src,f=ve(null),p=ve(null),[h,m]=me(!1);ge((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let l=Hi.QrCode.encodeText(r,zi[o]).getModules();const u=s?Ki:0,d=l.length+2*u,h=Xi(l,n,s,c),m=p.current,_=null!=h&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;_&&null!=h.excavation&&(l=Gi(l,h.excavation));const g=window.devicePixelRatio||1;e.height=e.width=n*g;const y=n/d*g;t.scale(y,y),t.fillStyle=i,t.fillRect(0,0,d,d),t.fillStyle=a,Zi?t.fill(new Path2D(Qi(l,u))):l.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),_&&t.drawImage(m,h.x+u,h.y+u,h.w,h.h)}})),ge((()=>{m(!1)}),[d]);const _=Di({height:n,width:n},l);let g=null;return null!=d&&(g=po.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),po.createElement(po.Fragment,null,po.createElement("canvas",Di({style:_,height:n,width:n,ref:f},u)),g)}function ta(e){const t=e,{value:r,size:n=$i,level:o=Vi,bgColor:i=qi,fgColor:a=Wi,includeMargin:s=Yi,imageSettings:l}=t,c=Ii(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=Hi.QrCode.encodeText(r,zi[o]).getModules();const d=s?Ki:0,f=u.length+2*d,p=Xi(u,n,s,l);let h=null;null!=l&&null!=p&&(null!=p.excavation&&(u=Gi(u,p.excavation)),h=po.createElement("image",{xlinkHref:l.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=Qi(u,d);return po.createElement("svg",Di({height:n,width:n,viewBox:`0 0 ${f} ${f}`},c),po.createElement("path",{fill:i,d:`M0,0 h${f}v${f}H0z`,shapeRendering:"crispEdges"}),po.createElement("path",{fill:a,d:m,shapeRendering:"crispEdges"}),h)}var ra=e=>{const t=e,{renderAs:r}=t,n=Ii(t,["renderAs"]);return"svg"===r?po.createElement(ta,Di({},n)):po.createElement(ea,Di({},n))};const na=""+new URL("assets/google-play-badge-f72611e2.png",import.meta.url).href,oa=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,ia=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,aa=()=>rn(Zr,{children:rn(Si,{children:[rn(Ti,{src:ia}),rn("h1",{children:"You’re registered!"}),rn("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),rn(Ni,{children:rn(ra,{value:"https://esjpe.app.link"})}),rn("h3",{children:"Download the Flare App"}),rn("p",{children:"Available on iOS and Android"}),rn(ki,{children:[rn(Pi,{href:"https://apps.apple.com/au/app/flare/id1587276031",children:rn(Ri,{src:oa})}),rn(Pi,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:rn(Oi,{src:na})})]})]})}),sa=()=>{const[e,t]=me(!1),{signUp:r,verifyOtp:n,resendOtp:o}={signUp:async e=>wi().post("v2.0/auth/signUp",{mobileNumber:e}).catch((e=>(xi(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await wi().post("auth/verify",{otp:e}).catch(xi)},resendOtp:async()=>{await wi().post("auth/resend").catch(xi)}},i=()=>{t(!0),Ci()};return e?rn(aa,{}):rn(A,{children:rn("div",{className:"font-inter",children:[rn("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.pr-3{padding-right:.75rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),rn(yi,{onSignUp:r,onVerify:n,onResendOtp:o,onSuccess:i,onDecline:i})]})})},la=h("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),ca=h("div")([{position:"relative",height:"0.5rem",width:"12rem"}]),ua=h("div")`
8
44
  box-sizing: border-box;
9
45
  overflow: hidden;
10
46
  position: absolute;
@@ -57,45 +93,9 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
57
93
  left: calc(50% - -6rem);
58
94
  }
59
95
  }
60
- `;var Vi=0;function $i(e,t,r,n,i,o){var s,a,c={};for(a in t)"ref"==a?s=t[a]:c[a]=t[a];var l={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Vi,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===c[a]&&(c[a]=s[a]);return g.vnode&&g.vnode(l),l}const qi=({isActive:e,className:t})=>$i(Bi,{children:$i(zi,{className:t,children:[e&&$i(ji,{role:"alert",children:"Loading..."}),$i(Hi,{className:e?"is-active":"","aria-hidden":!0})]})}),Wi=f("div")`
61
- ${()=>({margin:"2rem",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"})}
62
-
63
- font-family: 'Poppins', sans-serif;
64
- color: #052d39;
65
-
66
- h1 {
67
- ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"1.5rem",lineHeight:"2rem",fontWeight:"600"})}
68
- }
69
-
70
- h2 {
71
- ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"400"})}
72
- }
73
-
74
- h3 {
75
- ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600"})}
76
- }
77
-
78
- p {
79
- ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400"})}
80
- }
81
- `,Ki=f("div")`
82
- ${()=>({marginTop:"2.5rem",marginBottom:"2.5rem"})}
83
- `,Ji=f("div")`
84
- ${()=>({gridTemplateColumns:"repeat(2, minmax(0, 1fr))"})}
85
- `,Gi=f("img")`
86
- ${()=>({margin:"0.5rem",display:"inline-block",height:"2rem"})}
87
- `,Yi=f("img")`
88
- ${()=>({margin:"0.5rem",display:"inline-block",height:"3rem"})}
89
- `,Qi=f("a")``,Xi=f("img")`
90
- ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",height:"6rem"})}
91
- `;function Zi(e,t){for(var r in t)e[r]=t[r];return e}function eo(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function to(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function ro(e){this.props=e}function no(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:eo(this.props,e)}function n(t){return this.shouldComponentUpdate=r,O(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ro.prototype=new x).isPureReactComponent=!0,ro.prototype.shouldComponentUpdate=function(e,t){return eo(this.props,e)||eo(this.state,t)};var io=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),io&&io(e)};var oo="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function so(e){function t(t){var r=Zi({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=oo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ao=function(e,t){return null==e?null:B(B(e).map(t))},co={map:ao,forEach:ao,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},lo=g.__e;g.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);lo(e,t,r,n)};var uo=g.unmount;function ho(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Zi({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return ho(e,t,r)}))),e}function po(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return po(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function fo(){this.__u=0,this.t=null,this.__b=null}function mo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function go(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return O(r,i)}return i.displayName="Lazy",i.__f=!0,i}function _o(){this.u=null,this.o=null}g.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),uo&&uo(e)},(fo.prototype=new x).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=mo(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=po(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},fo.prototype.componentWillUnmount=function(){this.t=[]},fo.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ho(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(N,null,e.fallback);return i&&(i.__h=null),[O(N,null,t.__a?null:e.children),i]};var vo=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function yo(e){return this.getChildContext=function(){return e.context},e.children}function wo(e){var t=this,r=e.i;t.componentWillUnmount=function(){Z(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,r){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),Z(O(yo,{context:t.context},e.__v),t.l)}function bo(e,t){var r=O(wo,{__v:e,i:t});return r.containerInfo=t,r}(_o.prototype=new x).__a=function(e){var t=this,r=mo(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),vo(t,e,n)):i()};r?r(o):o()}},_o.prototype.render=function(e){this.u=null,this.o=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},_o.prototype.componentDidUpdate=_o.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){vo(e,r,t)}))};var Eo="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ko=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Io=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,To=/[A-Z0-9]/g,So="undefined"!=typeof document,Co=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Ro(e,t,r){return null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof r&&r(),e?e.__c:null}function Oo(e,t,r){return ee(e,t),"function"==typeof r&&r(),e?e.__c:null}x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ao=g.event;function Po(){}function No(){return this.cancelBubble}function xo(){return this.defaultPrevented}g.event=function(e){return Ao&&(e=Ao(e)),e.persist=Po,e.isPropagationStopped=No,e.isDefaultPrevented=xo,e.nativeEvent=e};var Lo,Do={enumerable:!1,configurable:!0,get:function(){return this.class}},Mo=g.vnode;g.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||So&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==r&&"textarea"!==r||Co(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Io.test(i)?i=s:-1===r.indexOf("-")&&ko.test(i)?i=i.replace(To,"-$&").toLowerCase():null===o&&(o=void 0):s=i="oninput","oninput"===s&&n[i=s]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=B(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=B(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",Do)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=Eo,Mo&&Mo(e)};var Uo=g.__r;g.__r=function(e){Uo&&Uo(e),Lo=e.__c};var jo=g.diffed;g.diffed=function(e){jo&&jo(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),Lo=null};var Fo={ReactCurrentDispatcher:{current:{readContext:function(e){return Lo.__n[e.__c].props.value}}}};function Bo(e){return O.bind(null,e)}function zo(e){return!!e&&e.$$typeof===Eo}function Ho(e){return zo(e)&&e.type===N}function Vo(e){return zo(e)?te.apply(null,arguments):e}function $o(e){return!!e.__k&&(Z(null,e),!0)}function qo(e){return e&&(e.base||1===e.nodeType&&e)||null}var Wo=function(e,t){return e(t)},Ko=function(e,t){return e(t)},Jo=N;function Go(e){e()}function Yo(e){return e}function Qo(){return[!1,Go]}var Xo=ye,Zo=zo;function es(e,t){var r=t(),n=ge({h:{__:r,v:t}}),i=n[0].h,o=n[1];return ye((function(){i.__=r,i.v=t,to(i.__,t())||o({h:i})}),[e,r,t]),ve((function(){return to(i.__,i.v())||o({h:i}),e((function(){to(i.__,i.v())||o({h:i})}))}),[e]),r}var ts={useState:ge,useId:Se,useReducer:_e,useEffect:ve,useLayoutEffect:ye,useInsertionEffect:Xo,useTransition:Qo,useDeferredValue:Yo,useSyncExternalStore:es,startTransition:Go,useRef:we,useImperativeHandle:be,useMemo:Ee,useCallback:ke,useContext:Ie,useDebugValue:Te,version:"17.0.2",Children:co,render:Ro,hydrate:Oo,unmountComponentAtNode:$o,createPortal:bo,createElement:O,createContext:re,createFactory:Bo,cloneElement:Vo,createRef:P,Fragment:N,isValidElement:zo,isElement:Zo,isFragment:Ho,findDOMNode:qo,Component:x,PureComponent:ro,memo:no,forwardRef:so,flushSync:Ko,unstable_batchedUpdates:Wo,StrictMode:Jo,Suspense:fo,SuspenseList:_o,lazy:go,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fo};const rs=Object.freeze(Object.defineProperty({__proto__:null,Children:co,Component:x,Fragment:N,PureComponent:ro,StrictMode:Jo,Suspense:fo,SuspenseList:_o,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fo,cloneElement:Vo,createContext:re,createElement:O,createFactory:Bo,createPortal:bo,createRef:P,default:ts,findDOMNode:qo,flushSync:Ko,forwardRef:so,hydrate:Oo,isElement:Zo,isFragment:Ho,isValidElement:zo,lazy:go,memo:no,render:Ro,startTransition:Go,unmountComponentAtNode:$o,unstable_batchedUpdates:Wo,useCallback:ke,useContext:Ie,useDebugValue:Te,useDeferredValue:Yo,useEffect:ve,useErrorBoundary:function(e){var t=me(ne++,10),r=ge();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]},useId:Se,useImperativeHandle:be,useInsertionEffect:Xo,useLayoutEffect:ye,useMemo:Ee,useReducer:_e,useRef:we,useState:ge,useSyncExternalStore:es,useTransition:Qo,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var ns,is,os=Object.defineProperty,ss=Object.getOwnPropertySymbols,as=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable,ls=(e,t,r)=>t in e?os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,us=(e,t)=>{for(var r in t||(t={}))as.call(t,r)&&ls(e,r,t[r]);if(ss)for(var r of ss(t))cs.call(t,r)&&ls(e,r,t[r]);return e},ds=(e,t)=>{var r={};for(var n in e)as.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&ss)for(var n of ss(e))t.indexOf(n)<0&&cs.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,n){const i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){const i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,r,i=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const n=8*t.getNumDataCodewords(u,r),i=a.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,n)&&(r=n);let h=[];for(const t of e){n(t.mode.modeBits,4,h),n(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,r);o(h.length<=p),n(0,Math.min(4,p-h.length),h),n(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let t=236;h.length<p;t^=253)n(t,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let i=0;i<10;i++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);o(n>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,i(n,o));this.setFunctionModule(8,7,i(n,6)),this.setFunctionModule(8,8,i(n,7)),this.setFunctionModule(7,8,i(n,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,i(n,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,i(n,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,i(n,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let r=0;r<18;r++){const e=i(t,r),n=this.size-11+r%3,o=Math.floor(r/3);this.setFunctionModule(n,o,e),this.setFunctionModule(o,n,e)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,s=t+r;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=i-a%i,l=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let o=0,p=0;o<i;o++){let r=e.slice(p,p+l-s+(o<c?0:1));p+=r.length;const n=t.reedSolomonComputeRemainder(r,d);o<c&&r.push(0),u.push(r.concat(n))}let h=[];for(let t=0;t<u[0].length;t++)u.forEach(((e,r)=>{(t!=l-s||r>=c)&&h.push(e[t])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-n:n;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=i(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[o][s]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[o][s],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][o]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[s][o],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size-1;o++)for(let r=0;r<this.size-1;r++){const n=this.modules[o][r];n==this.modules[o][r+1]&&n==this.modules[o+1][r]&&n==this.modules[o+1][r+1]&&(e+=t.PENALTY_N2)}let r=0;for(const t of this.modules)r=t.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let i=0;i<e;i++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const i of e){const e=i^n.shift();n.push(0),r.forEach(((r,i)=>n[i]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const i=Math.min(e.length-r,3);n(parseInt(e.substr(r,i),10),3*i+1,t),r+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(i,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(ns||(ns={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})((is=ns||(ns={})).QrCode||(is.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(e.QrSegment||(e.QrSegment={}))})(ns||(ns={}));var hs=ns,ps={L:hs.QrCode.Ecc.LOW,M:hs.QrCode.Ecc.MEDIUM,Q:hs.QrCode.Ecc.QUARTILE,H:hs.QrCode.Ecc.HIGH},fs=128,ms="L",gs="#FFFFFF",_s="#000000",vs=!1,ys=4,ws=.1;
92
- /**
93
- * @license qrcode.react
94
- * Copyright (c) Paul O'Shannessy
95
- * SPDX-License-Identifier: ISC
96
- */function bs(e,t=0){const r=[];return e.forEach((function(e,n){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`)}}))})),r.join("")}function Es(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function ks(e,t,r,n){if(null==n)return null;const i=r?ys:0,o=e.length+2*i,s=Math.floor(t*ws),a=o/t,c=(n.width||s)*a,l=(n.height||s)*a,u=null==n.x?e.length/2-c/2:n.x*a,d=null==n.y?e.length/2-l/2:n.y*a;let h=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:h}}var Is=function(){try{(new Path2D).addPath(new Path2D)}catch(gh){return!1}return!0}();function Ts(e){const t=e,{value:r,size:n=fs,level:i=ms,bgColor:o=gs,fgColor:s=_s,includeMargin:a=vs,style:c,imageSettings:l}=t,u=ds(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==l?void 0:l.src,h=we(null),p=we(null),[f,m]=ge(!1);ve((()=>{if(null!=h.current){const e=h.current,t=e.getContext("2d");if(!t)return;let c=hs.QrCode.encodeText(r,ps[i]).getModules();const u=a?ys:0,d=c.length+2*u,f=ks(c,n,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Es(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=n*_;const v=n/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,Is?t.fill(new Path2D(bs(c,u))):c.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=us({height:n,width:n},c);let _=null;return null!=d&&(_=ts.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),ts.createElement(ts.Fragment,null,ts.createElement("canvas",us({style:g,height:n,width:n,ref:h},u)),_)}function Ss(e){const t=e,{value:r,size:n=fs,level:i=ms,bgColor:o=gs,fgColor:s=_s,includeMargin:a=vs,imageSettings:c}=t,l=ds(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=hs.QrCode.encodeText(r,ps[i]).getModules();const d=a?ys:0,h=u.length+2*d,p=ks(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Es(u,p.excavation)),f=ts.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=bs(u,d);return ts.createElement("svg",us({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),ts.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),ts.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Cs=e=>{const t=e,{renderAs:r}=t,n=ds(t,["renderAs"]);return"svg"===r?ts.createElement(Ss,us({},n)):ts.createElement(Ts,us({},n))};const Rs=""+new URL("assets/google-play-badge-f72611e2.png",import.meta.url).href,Os=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,As=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Ps=()=>$i(Bi,{children:$i(Wi,{children:[$i(Xi,{src:As}),$i("h1",{children:"You’re registered!"}),$i("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),$i(Ki,{children:$i(Cs,{value:"https://esjpe.app.link"})}),$i("h3",{children:"Download the Flare App"}),$i("p",{children:"Available on iOS and Android"}),$i(Ji,{children:[$i(Qi,{href:"https://apps.apple.com/au/app/flare/id1587276031",children:$i(Gi,{src:Os})}),$i(Qi,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:$i(Yi,{src:Rs})})]})]})}),Ns=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",width:125,height:125,fill:"none","xmlns:v":"https://vecta.io/nano",...e},O("g",{clipPath:"url(#A)"},O("path",{d:"M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z",fill:"#eeefee"}),O("path",{d:"M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z",fill:"#dbd8dd"}),O("path",{d:"M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z",fill:"silver"}),O("g",{fill:"#323c6b"},O("path",{d:"M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"}))),O("defs",null,O("clipPath",{id:"A"},O("path",{fill:"#fff",d:"M0 0h125v125H0z"})))),xs=f("img")`
96
+ `,da=({isActive:e,className:t})=>rn(Zr,{children:rn(ca,{className:t,children:[e&&rn(Gr,{role:"alert",children:"Loading..."}),rn(ua,{className:e?"is-active":"","aria-hidden":!0})]})}),fa=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",width:125,height:125,fill:"none","xmlns:v":"https://vecta.io/nano",...e},O("g",{clipPath:"url(#A)"},O("path",{d:"M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z",fill:"#eeefee"}),O("path",{d:"M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z",fill:"#dbd8dd"}),O("path",{d:"M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z",fill:"silver"}),O("g",{fill:"#323c6b"},O("path",{d:"M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"}))),O("defs",null,O("clipPath",{id:"A"},O("path",{fill:"#fff",d:"M0 0h125v125H0z"})))),pa=h("img")`
97
97
  ${()=>({marginBottom:"2.5rem",height:"7rem"})}
98
- `,Ls=f("div")`
98
+ `,ha=h("div")`
99
99
  ${()=>({marginTop:"6rem",marginBottom:"6rem",display:"flex",width:"100%",flexDirection:"column",alignItems:"center",textAlign:"center"})}
100
100
 
101
101
  h1 {
@@ -105,1613 +105,4 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
105
105
  p {
106
106
  ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"400"})}
107
107
  }
108
- `,Ds=()=>$i(Ls,{children:[$i(xs,{src:Ns}),$i("h1",{children:"Something went wrong!"}),$i("p",{children:"We’re having some difficulties."}),$i("p",{children:"Please try again shortly."})]}),Ms=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},Us=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};Xr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new Fn.AuthorizationNotifier,i=new Xn,o=new gi,s=new Ci(o);return i.setAuthorizationNotifier(n),n.setAuthorizationListener((async(n,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return r(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(n.internal&&n.internal.code_verifier&&(a=n.internal.code_verifier),!xi)return r("[AuthListener]: OIDC configuration not found");try{const e=await Di(i.code,a,s,n,xi),o=Mi(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(gh){return r(`[AuthListener]: Token code exchange failed: ${gh}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await on(i,o,n.sub,t),r(4)}catch(gh){n(`Error when trying to establish workplace link: ${gh}`)}}),n);s(i)}),[]),Xr((async()=>{o&&(await(async e=>{await Ui(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&n&&r(1)}),[o,t,n]),Xr((async n=>{if(o&&1===t)try{const t=await nn(e,n);if(t.isEstablished)return r(4);if(t.linkRequest){const e={openIdConnectUrl:t.linkRequest.openIdConnectUrl,clientId:t.linkRequest.clientId,redirectUri:`${window.location.protocol}//${window.location.host}${window.location.pathname}`,scope:`${t.linkRequest.clientId} openid`,state:t.linkRequest.linkRequestId};await(async(e,t,r)=>{const n=await Li(r.openIdConnectUrl,e),i=new Dn({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:Dn.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new yn,!0);t.performAuthorizationRequest(n,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),r(3)}catch(gh){a(`Could not redirect to OIDC provider: ${gh}`),r(3)}}),[o,t]),ve((()=>{4===t&&Ms()}),[t]);const c=0==t||1==t||2==t;return $i(N,{children:[c&&$i(qi,{isActive:c}),3==t&&$i(Ds,{}),4==t&&$i(Ps,{})]})},js=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},Fs={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,c=a?e[i+2]:0,l=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|c>>6,h=63&c;a||(h=64,o||(d=64)),n.push(r[l],r[u],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(js(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const t=r[e.charAt(i++)],o=i<e.length?r[e.charAt(i)]:0;++i;const s=i<e.length?r[e.charAt(i)]:64;++i;const a=i<e.length?r[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new Bs;const c=t<<2|o>>4;if(n.push(c),64!==s){const e=o<<4&240|s>>2;if(n.push(e),64!==a){const e=s<<6&192|a;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Bs extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const zs=function(e){return function(e){const t=js(e);return Fs.encodeByteArray(t,!0)}(e).replace(/\./g,"")},Hs=function(e){try{return Fs.decodeString(e,!0)}catch(gh){console.error("base64Decode failed: ",gh)}return null};
109
- /**
110
- * @license
111
- * Copyright 2022 Google LLC
112
- *
113
- * Licensed under the Apache License, Version 2.0 (the "License");
114
- * you may not use this file except in compliance with the License.
115
- * You may obtain a copy of the License at
116
- *
117
- * http://www.apache.org/licenses/LICENSE-2.0
118
- *
119
- * Unless required by applicable law or agreed to in writing, software
120
- * distributed under the License is distributed on an "AS IS" BASIS,
121
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
- * See the License for the specific language governing permissions and
123
- * limitations under the License.
124
- */
125
- const Vs=()=>
126
- /**
127
- * @license
128
- * Copyright 2022 Google LLC
129
- *
130
- * Licensed under the Apache License, Version 2.0 (the "License");
131
- * you may not use this file except in compliance with the License.
132
- * You may obtain a copy of the License at
133
- *
134
- * http://www.apache.org/licenses/LICENSE-2.0
135
- *
136
- * Unless required by applicable law or agreed to in writing, software
137
- * distributed under the License is distributed on an "AS IS" BASIS,
138
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139
- * See the License for the specific language governing permissions and
140
- * limitations under the License.
141
- */
142
- function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,$s=()=>{try{return Vs()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(gh){return}const t=e&&Hs(e[1]);return t&&JSON.parse(t)})()}catch(gh){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${gh}`)}},qs=()=>{var e;return null===(e=$s())||void 0===e?void 0:e.config},Ws=e=>{var t;return null===(t=$s())||void 0===t?void 0:t[`_${e}`]};
143
- /**
144
- * @license
145
- * Copyright 2017 Google LLC
146
- *
147
- * Licensed under the Apache License, Version 2.0 (the "License");
148
- * you may not use this file except in compliance with the License.
149
- * You may obtain a copy of the License at
150
- *
151
- * http://www.apache.org/licenses/LICENSE-2.0
152
- *
153
- * Unless required by applicable law or agreed to in writing, software
154
- * distributed under the License is distributed on an "AS IS" BASIS,
155
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
156
- * See the License for the specific language governing permissions and
157
- * limitations under the License.
158
- */
159
- class Ks{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,r))}}}
160
- /**
161
- * @license
162
- * Copyright 2017 Google LLC
163
- *
164
- * Licensed under the Apache License, Version 2.0 (the "License");
165
- * you may not use this file except in compliance with the License.
166
- * You may obtain a copy of the License at
167
- *
168
- * http://www.apache.org/licenses/LICENSE-2.0
169
- *
170
- * Unless required by applicable law or agreed to in writing, software
171
- * distributed under the License is distributed on an "AS IS" BASIS,
172
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
173
- * See the License for the specific language governing permissions and
174
- * limitations under the License.
175
- */function Js(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class Gs extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,Gs.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ys.prototype.create)}}class Ys{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(Qs,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(i,r):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new Gs(n,s,r)}}const Qs=/\{\$([^}]+)}/g;function Xs(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const i of r){if(!n.includes(i))return!1;const r=e[i],o=t[i];if(Zs(r)&&Zs(o)){if(!Xs(r,o))return!1}else if(r!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function Zs(e){return null!==e&&"object"==typeof e}
176
- /**
177
- * @license
178
- * Copyright 2017 Google LLC
179
- *
180
- * Licensed under the Apache License, Version 2.0 (the "License");
181
- * you may not use this file except in compliance with the License.
182
- * You may obtain a copy of the License at
183
- *
184
- * http://www.apache.org/licenses/LICENSE-2.0
185
- *
186
- * Unless required by applicable law or agreed to in writing, software
187
- * distributed under the License is distributed on an "AS IS" BASIS,
188
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
- * See the License for the specific language governing permissions and
190
- * limitations under the License.
191
- */function ea(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class ta{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},void 0===n.next&&(n.next=ra),void 0===n.error&&(n.error=ra),void 0===n.complete&&(n.complete=ra);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(gh){}})),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(gh){"undefined"!=typeof console&&console.error&&console.error(gh)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function ra(){}
192
- /**
193
- * @license
194
- * Copyright 2021 Google LLC
195
- *
196
- * Licensed under the Apache License, Version 2.0 (the "License");
197
- * you may not use this file except in compliance with the License.
198
- * You may obtain a copy of the License at
199
- *
200
- * http://www.apache.org/licenses/LICENSE-2.0
201
- *
202
- * Unless required by applicable law or agreed to in writing, software
203
- * distributed under the License is distributed on an "AS IS" BASIS,
204
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
- * See the License for the specific language governing permissions and
206
- * limitations under the License.
207
- */function na(e){return e&&e._delegate?e._delegate:e}class ia{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}
208
- /**
209
- * @license
210
- * Copyright 2019 Google LLC
211
- *
212
- * Licensed under the Apache License, Version 2.0 (the "License");
213
- * you may not use this file except in compliance with the License.
214
- * You may obtain a copy of the License at
215
- *
216
- * http://www.apache.org/licenses/LICENSE-2.0
217
- *
218
- * Unless required by applicable law or agreed to in writing, software
219
- * distributed under the License is distributed on an "AS IS" BASIS,
220
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
221
- * See the License for the specific language governing permissions and
222
- * limitations under the License.
223
- */const oa="[DEFAULT]";
224
- /**
225
- * @license
226
- * Copyright 2019 Google LLC
227
- *
228
- * Licensed under the Apache License, Version 2.0 (the "License");
229
- * you may not use this file except in compliance with the License.
230
- * You may obtain a copy of the License at
231
- *
232
- * http://www.apache.org/licenses/LICENSE-2.0
233
- *
234
- * Unless required by applicable law or agreed to in writing, software
235
- * distributed under the License is distributed on an "AS IS" BASIS,
236
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237
- * See the License for the specific language governing permissions and
238
- * limitations under the License.
239
- */class sa{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Ks;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(gh){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(gh){if(n)return null;throw gh}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
240
- /**
241
- * @license
242
- * Copyright 2019 Google LLC
243
- *
244
- * Licensed under the Apache License, Version 2.0 (the "License");
245
- * you may not use this file except in compliance with the License.
246
- * You may obtain a copy of the License at
247
- *
248
- * http://www.apache.org/licenses/LICENSE-2.0
249
- *
250
- * Unless required by applicable law or agreed to in writing, software
251
- * distributed under the License is distributed on an "AS IS" BASIS,
252
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
253
- * See the License for the specific language governing permissions and
254
- * limitations under the License.
255
- */(e))try{this.getOrInitializeService({instanceIdentifier:oa})}catch(gh){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(gh){}}}}clearInstance(e=oa){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=oa){return this.instances.has(e)}getOptions(e=oa){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,o]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(i)&&o.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);const o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===oa?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}var n;return r||null}normalizeInstanceIdentifier(e=oa){return this.component?this.component.multipleInstances?e:oa:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class aa{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new sa(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
256
- /**
257
- * @license
258
- * Copyright 2017 Google LLC
259
- *
260
- * Licensed under the Apache License, Version 2.0 (the "License");
261
- * you may not use this file except in compliance with the License.
262
- * You may obtain a copy of the License at
263
- *
264
- * http://www.apache.org/licenses/LICENSE-2.0
265
- *
266
- * Unless required by applicable law or agreed to in writing, software
267
- * distributed under the License is distributed on an "AS IS" BASIS,
268
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269
- * See the License for the specific language governing permissions and
270
- * limitations under the License.
271
- */var ca,la;(la=ca||(ca={}))[la.DEBUG=0]="DEBUG",la[la.VERBOSE=1]="VERBOSE",la[la.INFO=2]="INFO",la[la.WARN=3]="WARN",la[la.ERROR=4]="ERROR",la[la.SILENT=5]="SILENT";const ua={debug:ca.DEBUG,verbose:ca.VERBOSE,info:ca.INFO,warn:ca.WARN,error:ca.ERROR,silent:ca.SILENT},da=ca.INFO,ha={[ca.DEBUG]:"log",[ca.VERBOSE]:"log",[ca.INFO]:"info",[ca.WARN]:"warn",[ca.ERROR]:"error"},pa=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),i=ha[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${n}] ${e.name}:`,...r)};class fa{constructor(e){this.name=e,this._logLevel=da,this._logHandler=pa,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ca))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?ua[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,ca.DEBUG,...e),this._logHandler(this,ca.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ca.VERBOSE,...e),this._logHandler(this,ca.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ca.INFO,...e),this._logHandler(this,ca.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ca.WARN,...e),this._logHandler(this,ca.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ca.ERROR,...e),this._logHandler(this,ca.ERROR,...e)}}const ma=(e,t)=>t.some((t=>e instanceof t));let ga,_a;const va=new WeakMap,ya=new WeakMap,wa=new WeakMap,ba=new WeakMap,Ea=new WeakMap;let ka={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ya.get(e);if("objectStoreNames"===t)return e.objectStoreNames||wa.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Sa(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ia(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(_a||(_a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ca(this),t),Sa(va.get(this))}:function(...t){return Sa(e.apply(Ca(this),t))}:function(t,...r){const n=e.call(Ca(this),t,...r);return wa.set(n,t.sort?t.sort():[t]),Sa(n)}}function Ta(e){return"function"==typeof e?Ia(e):(e instanceof IDBTransaction&&function(e){if(ya.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));ya.set(e,t)}(e),ma(e,ga||(ga=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,ka):e)}function Sa(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Sa(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&va.set(t,e)})).catch((()=>{})),Ea.set(t,e),t}(e);if(ba.has(e))return ba.get(e);const t=Ta(e);return t!==e&&(ba.set(e,t),Ea.set(t,e)),t}const Ca=e=>Ea.get(e);const Ra=["get","getKey","getAll","getAllKeys","count"],Oa=["put","add","delete","clear"],Aa=new Map;function Pa(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Aa.get(t))return Aa.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Oa.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!Ra.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,i?"readwrite":"readonly");let s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return Aa.set(t,o),o}ka=(e=>({...e,get:(t,r,n)=>Pa(t,r)||e.get(t,r,n),has:(t,r)=>!!Pa(t,r)||e.has(t,r)}))(ka);
272
- /**
273
- * @license
274
- * Copyright 2019 Google LLC
275
- *
276
- * Licensed under the Apache License, Version 2.0 (the "License");
277
- * you may not use this file except in compliance with the License.
278
- * You may obtain a copy of the License at
279
- *
280
- * http://www.apache.org/licenses/LICENSE-2.0
281
- *
282
- * Unless required by applicable law or agreed to in writing, software
283
- * distributed under the License is distributed on an "AS IS" BASIS,
284
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
285
- * See the License for the specific language governing permissions and
286
- * limitations under the License.
287
- */
288
- class Na{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const xa="@firebase/app",La="0.9.22",Da=new fa("@firebase/app"),Ma="[DEFAULT]",Ua={[xa]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},ja=new Map,Fa=new Map;function Ba(e,t){try{e.container.addComponent(t)}catch(gh){Da.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,gh)}}function za(e){const t=e.name;if(Fa.has(t))return Da.debug(`There were multiple attempts to register component ${t}.`),!1;Fa.set(t,e);for(const r of ja.values())Ba(r,e);return!0}function Ha(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
289
- /**
290
- * @license
291
- * Copyright 2019 Google LLC
292
- *
293
- * Licensed under the Apache License, Version 2.0 (the "License");
294
- * you may not use this file except in compliance with the License.
295
- * You may obtain a copy of the License at
296
- *
297
- * http://www.apache.org/licenses/LICENSE-2.0
298
- *
299
- * Unless required by applicable law or agreed to in writing, software
300
- * distributed under the License is distributed on an "AS IS" BASIS,
301
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
302
- * See the License for the specific language governing permissions and
303
- * limitations under the License.
304
- */const Va=new Ys("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});
305
- /**
306
- * @license
307
- * Copyright 2019 Google LLC
308
- *
309
- * Licensed under the Apache License, Version 2.0 (the "License");
310
- * you may not use this file except in compliance with the License.
311
- * You may obtain a copy of the License at
312
- *
313
- * http://www.apache.org/licenses/LICENSE-2.0
314
- *
315
- * Unless required by applicable law or agreed to in writing, software
316
- * distributed under the License is distributed on an "AS IS" BASIS,
317
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
318
- * See the License for the specific language governing permissions and
319
- * limitations under the License.
320
- */
321
- class $a{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new ia("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Va.create("app-deleted",{appName:this._name})}}
322
- /**
323
- * @license
324
- * Copyright 2019 Google LLC
325
- *
326
- * Licensed under the Apache License, Version 2.0 (the "License");
327
- * you may not use this file except in compliance with the License.
328
- * You may obtain a copy of the License at
329
- *
330
- * http://www.apache.org/licenses/LICENSE-2.0
331
- *
332
- * Unless required by applicable law or agreed to in writing, software
333
- * distributed under the License is distributed on an "AS IS" BASIS,
334
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
335
- * See the License for the specific language governing permissions and
336
- * limitations under the License.
337
- */const qa="10.5.2";function Wa(e,t={}){let r=e;if("object"!=typeof t){t={name:t}}const n=Object.assign({name:Ma,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw Va.create("bad-app-name",{appName:String(i)});if(r||(r=qs()),!r)throw Va.create("no-options");const o=ja.get(i);if(o){if(Xs(r,o.options)&&Xs(n,o.config))return o;throw Va.create("duplicate-app",{appName:i})}const s=new aa(i);for(const c of Fa.values())s.addComponent(c);const a=new $a(r,n,s);return ja.set(i,a),a}function Ka(e,t,r){var n;let i=null!==(n=Ua[e])&&void 0!==n?n:e;r&&(i+=`-${r}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Da.warn(e.join(" "))}za(new ia(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
338
- /**
339
- * @license
340
- * Copyright 2021 Google LLC
341
- *
342
- * Licensed under the Apache License, Version 2.0 (the "License");
343
- * you may not use this file except in compliance with the License.
344
- * You may obtain a copy of the License at
345
- *
346
- * http://www.apache.org/licenses/LICENSE-2.0
347
- *
348
- * Unless required by applicable law or agreed to in writing, software
349
- * distributed under the License is distributed on an "AS IS" BASIS,
350
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351
- * See the License for the specific language governing permissions and
352
- * limitations under the License.
353
- */const Ja="firebase-heartbeat-database",Ga=1,Ya="firebase-heartbeat-store";let Qa=null;function Xa(){return Qa||(Qa=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Sa(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Sa(s.result),e.oldVersion,e.newVersion,Sa(s.transaction),e)})),r&&s.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(Ja,Ga,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(Ya)}}).catch((e=>{throw Va.create("idb-open",{originalErrorMessage:e.message})}))),Qa}async function Za(e,t){try{const r=(await Xa()).transaction(Ya,"readwrite"),n=r.objectStore(Ya);await n.put(t,ec(e)),await r.done}catch(gh){if(gh instanceof Gs)Da.warn(gh.message);else{const t=Va.create("idb-set",{originalErrorMessage:null==gh?void 0:gh.message});Da.warn(t.message)}}}function ec(e){return`${e.name}!${e.options.appId}`}
354
- /**
355
- * @license
356
- * Copyright 2021 Google LLC
357
- *
358
- * Licensed under the Apache License, Version 2.0 (the "License");
359
- * you may not use this file except in compliance with the License.
360
- * You may obtain a copy of the License at
361
- *
362
- * http://www.apache.org/licenses/LICENSE-2.0
363
- *
364
- * Unless required by applicable law or agreed to in writing, software
365
- * distributed under the License is distributed on an "AS IS" BASIS,
366
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367
- * See the License for the specific language governing permissions and
368
- * limitations under the License.
369
- */class tc{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new nc(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=rc();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=rc(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const i of e){const e=r.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),ic(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),ic(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=zs(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function rc(){return(new Date).toISOString().substring(0,10)}class nc{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(gh){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await Xa();return await t.transaction(Ya).objectStore(Ya).get(ec(e))}catch(gh){if(gh instanceof Gs)Da.warn(gh.message);else{const t=Va.create("idb-get",{originalErrorMessage:null==gh?void 0:gh.message});Da.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Za(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Za(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function ic(e){return zs(JSON.stringify({version:2,heartbeats:e})).length}
370
- /**
371
- * @license
372
- * Copyright 2019 Google LLC
373
- *
374
- * Licensed under the Apache License, Version 2.0 (the "License");
375
- * you may not use this file except in compliance with the License.
376
- * You may obtain a copy of the License at
377
- *
378
- * http://www.apache.org/licenses/LICENSE-2.0
379
- *
380
- * Unless required by applicable law or agreed to in writing, software
381
- * distributed under the License is distributed on an "AS IS" BASIS,
382
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
383
- * See the License for the specific language governing permissions and
384
- * limitations under the License.
385
- */var oc;function sc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ac(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}oc="",za(new ia("platform-logger",(e=>new Na(e)),"PRIVATE")),za(new ia("heartbeat",(e=>new tc(e)),"PRIVATE")),Ka(xa,La,oc),Ka(xa,La,"esm2017"),Ka("fire-js",""),"function"==typeof SuppressedError&&SuppressedError;const cc=ac,lc=new Ys("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),uc="auth/captcha-check-failed",dc="auth/invalid-verification-code",hc="auth/invalid-credential",pc="auth/invalid-phone-number",fc="auth/invalid-verification-id",mc="auth/missing-phone-number",gc="auth/user-disabled",_c=new fa("@firebase/auth");function vc(e,...t){_c.logLevel<=ca.ERROR&&_c.error(`Auth (${qa}): ${e}`,...t)}
386
- /**
387
- * @license
388
- * Copyright 2020 Google LLC
389
- *
390
- * Licensed under the Apache License, Version 2.0 (the "License");
391
- * you may not use this file except in compliance with the License.
392
- * You may obtain a copy of the License at
393
- *
394
- * http://www.apache.org/licenses/LICENSE-2.0
395
- *
396
- * Unless required by applicable law or agreed to in writing, software
397
- * distributed under the License is distributed on an "AS IS" BASIS,
398
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
399
- * See the License for the specific language governing permissions and
400
- * limitations under the License.
401
- */function yc(e,...t){throw bc(e,...t)}function wc(e,...t){return bc(e,...t)}function bc(e,...t){if("string"!=typeof e){const r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return lc.create(e,...t)}function Ec(e,t,...r){if(!e)throw bc(t,...r)}function kc(e){const t="INTERNAL ASSERTION FAILED: "+e;throw vc(t),new Error(t)}function Ic(e,t){e||kc(t)}
402
- /**
403
- * @license
404
- * Copyright 2020 Google LLC
405
- *
406
- * Licensed under the Apache License, Version 2.0 (the "License");
407
- * you may not use this file except in compliance with the License.
408
- * You may obtain a copy of the License at
409
- *
410
- * http://www.apache.org/licenses/LICENSE-2.0
411
- *
412
- * Unless required by applicable law or agreed to in writing, software
413
- * distributed under the License is distributed on an "AS IS" BASIS,
414
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
415
- * See the License for the specific language governing permissions and
416
- * limitations under the License.
417
- */function Tc(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Sc(){return"http:"===Cc()||"https:"===Cc()}function Cc(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}
418
- /**
419
- * @license
420
- * Copyright 2020 Google LLC
421
- *
422
- * Licensed under the Apache License, Version 2.0 (the "License");
423
- * you may not use this file except in compliance with the License.
424
- * You may obtain a copy of the License at
425
- *
426
- * http://www.apache.org/licenses/LICENSE-2.0
427
- *
428
- * Unless required by applicable law or agreed to in writing, software
429
- * distributed under the License is distributed on an "AS IS" BASIS,
430
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
- * See the License for the specific language governing permissions and
432
- * limitations under the License.
433
- */function Rc(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(Sc()||function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}
434
- /**
435
- * @license
436
- * Copyright 2020 Google LLC
437
- *
438
- * Licensed under the Apache License, Version 2.0 (the "License");
439
- * you may not use this file except in compliance with the License.
440
- * You may obtain a copy of the License at
441
- *
442
- * http://www.apache.org/licenses/LICENSE-2.0
443
- *
444
- * Unless required by applicable law or agreed to in writing, software
445
- * distributed under the License is distributed on an "AS IS" BASIS,
446
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
447
- * See the License for the specific language governing permissions and
448
- * limitations under the License.
449
- */
450
- class Oc{constructor(e,t){this.shortDelay=e,this.longDelay=t,Ic(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Js())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return Rc()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}
451
- /**
452
- * @license
453
- * Copyright 2020 Google LLC
454
- *
455
- * Licensed under the Apache License, Version 2.0 (the "License");
456
- * you may not use this file except in compliance with the License.
457
- * You may obtain a copy of the License at
458
- *
459
- * http://www.apache.org/licenses/LICENSE-2.0
460
- *
461
- * Unless required by applicable law or agreed to in writing, software
462
- * distributed under the License is distributed on an "AS IS" BASIS,
463
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464
- * See the License for the specific language governing permissions and
465
- * limitations under the License.
466
- */function Ac(e,t){Ic(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}
467
- /**
468
- * @license
469
- * Copyright 2020 Google LLC
470
- *
471
- * Licensed under the Apache License, Version 2.0 (the "License");
472
- * you may not use this file except in compliance with the License.
473
- * You may obtain a copy of the License at
474
- *
475
- * http://www.apache.org/licenses/LICENSE-2.0
476
- *
477
- * Unless required by applicable law or agreed to in writing, software
478
- * distributed under the License is distributed on an "AS IS" BASIS,
479
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
- * See the License for the specific language governing permissions and
481
- * limitations under the License.
482
- */class Pc{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void kc("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void kc("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void kc("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
483
- /**
484
- * @license
485
- * Copyright 2020 Google LLC
486
- *
487
- * Licensed under the Apache License, Version 2.0 (the "License");
488
- * you may not use this file except in compliance with the License.
489
- * You may obtain a copy of the License at
490
- *
491
- * http://www.apache.org/licenses/LICENSE-2.0
492
- *
493
- * Unless required by applicable law or agreed to in writing, software
494
- * distributed under the License is distributed on an "AS IS" BASIS,
495
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
496
- * See the License for the specific language governing permissions and
497
- * limitations under the License.
498
- */const Nc={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},xc=new Oc(3e4,6e4);
499
- /**
500
- * @license
501
- * Copyright 2020 Google LLC
502
- *
503
- * Licensed under the Apache License, Version 2.0 (the "License");
504
- * you may not use this file except in compliance with the License.
505
- * You may obtain a copy of the License at
506
- *
507
- * http://www.apache.org/licenses/LICENSE-2.0
508
- *
509
- * Unless required by applicable law or agreed to in writing, software
510
- * distributed under the License is distributed on an "AS IS" BASIS,
511
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
512
- * See the License for the specific language governing permissions and
513
- * limitations under the License.
514
- */function Lc(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Dc(e,t,r,n,i={}){return Mc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ea(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),Pc.fetch()(jc(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function Mc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Nc),t);try{const t=new Fc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw Bc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[r,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===r)throw Bc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw Bc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw Bc(e,"user-disabled",o);const a=n[r]||r.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,r){const n=Object.assign(Object.assign({},cc()),{[t]:r});return new Ys("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);yc(e,a)}}catch(gh){if(gh instanceof Gs)throw gh;yc(e,"network-request-failed",{message:String(gh)})}}async function Uc(e,t,r,n,i={}){const o=await Dc(e,t,r,n,i);return"mfaPendingCredential"in o&&yc(e,"multi-factor-auth-required",{_serverResponse:o}),o}function jc(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ac(e.config,i):`${e.config.apiScheme}://${i}`}class Fc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(wc(this.auth,"network-request-failed"))),xc.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function Bc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=wc(e,t,n);return i.customData._tokenResponse=r,i}
515
- /**
516
- * @license
517
- * Copyright 2020 Google LLC
518
- *
519
- * Licensed under the Apache License, Version 2.0 (the "License");
520
- * you may not use this file except in compliance with the License.
521
- * You may obtain a copy of the License at
522
- *
523
- * http://www.apache.org/licenses/LICENSE-2.0
524
- *
525
- * Unless required by applicable law or agreed to in writing, software
526
- * distributed under the License is distributed on an "AS IS" BASIS,
527
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
528
- * See the License for the specific language governing permissions and
529
- * limitations under the License.
530
- */function zc(e){return void 0!==e&&void 0!==e.getResponse}
531
- /**
532
- * @license
533
- * Copyright 2020 Google LLC
534
- *
535
- * Licensed under the Apache License, Version 2.0 (the "License");
536
- * you may not use this file except in compliance with the License.
537
- * You may obtain a copy of the License at
538
- *
539
- * http://www.apache.org/licenses/LICENSE-2.0
540
- *
541
- * Unless required by applicable law or agreed to in writing, software
542
- * distributed under the License is distributed on an "AS IS" BASIS,
543
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
544
- * See the License for the specific language governing permissions and
545
- * limitations under the License.
546
- */
547
- /**
548
- * @license
549
- * Copyright 2020 Google LLC
550
- *
551
- * Licensed under the Apache License, Version 2.0 (the "License");
552
- * you may not use this file except in compliance with the License.
553
- * You may obtain a copy of the License at
554
- *
555
- * http://www.apache.org/licenses/LICENSE-2.0
556
- *
557
- * Unless required by applicable law or agreed to in writing, software
558
- * distributed under the License is distributed on an "AS IS" BASIS,
559
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
560
- * See the License for the specific language governing permissions and
561
- * limitations under the License.
562
- */
563
- function Hc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(gh){}}function Vc(e){return 1e3*Number(e)}function $c(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return vc("JWT malformed, contained fewer than 3 sections"),null;try{const e=Hs(r);return e?JSON.parse(e):(vc("Failed to decode base64 JWT payload"),null)}catch(gh){return vc("Caught error parsing JWT payload as JSON",null==gh?void 0:gh.toString()),null}}
564
- /**
565
- * @license
566
- * Copyright 2020 Google LLC
567
- *
568
- * Licensed under the Apache License, Version 2.0 (the "License");
569
- * you may not use this file except in compliance with the License.
570
- * You may obtain a copy of the License at
571
- *
572
- * http://www.apache.org/licenses/LICENSE-2.0
573
- *
574
- * Unless required by applicable law or agreed to in writing, software
575
- * distributed under the License is distributed on an "AS IS" BASIS,
576
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
577
- * See the License for the specific language governing permissions and
578
- * limitations under the License.
579
- */
580
- async function qc(e,t,r=!1){if(r)return t;try{return await t}catch(gh){throw gh instanceof Gs&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
581
- /**
582
- * @license
583
- * Copyright 2020 Google LLC
584
- *
585
- * Licensed under the Apache License, Version 2.0 (the "License");
586
- * you may not use this file except in compliance with the License.
587
- * You may obtain a copy of the License at
588
- *
589
- * http://www.apache.org/licenses/LICENSE-2.0
590
- *
591
- * Unless required by applicable law or agreed to in writing, software
592
- * distributed under the License is distributed on an "AS IS" BASIS,
593
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594
- * See the License for the specific language governing permissions and
595
- * limitations under the License.
596
- */(gh)&&e.auth.currentUser===e&&await e.auth.signOut(),gh}}class Wc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(gh){return void("auth/network-request-failed"===(null==gh?void 0:gh.code)&&this.schedule(!0))}this.schedule()}}
597
- /**
598
- * @license
599
- * Copyright 2020 Google LLC
600
- *
601
- * Licensed under the Apache License, Version 2.0 (the "License");
602
- * you may not use this file except in compliance with the License.
603
- * You may obtain a copy of the License at
604
- *
605
- * http://www.apache.org/licenses/LICENSE-2.0
606
- *
607
- * Unless required by applicable law or agreed to in writing, software
608
- * distributed under the License is distributed on an "AS IS" BASIS,
609
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
610
- * See the License for the specific language governing permissions and
611
- * limitations under the License.
612
- */class Kc{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Hc(this.lastLoginAt),this.creationTime=Hc(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}
613
- /**
614
- * @license
615
- * Copyright 2019 Google LLC
616
- *
617
- * Licensed under the Apache License, Version 2.0 (the "License");
618
- * you may not use this file except in compliance with the License.
619
- * You may obtain a copy of the License at
620
- *
621
- * http://www.apache.org/licenses/LICENSE-2.0
622
- *
623
- * Unless required by applicable law or agreed to in writing, software
624
- * distributed under the License is distributed on an "AS IS" BASIS,
625
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
626
- * See the License for the specific language governing permissions and
627
- * limitations under the License.
628
- */async function Jc(e){var t;const r=e.auth,n=await e.getIdToken(),i=await qc(e,async function(e,t){return Dc(e,"POST","/v1/accounts:lookup",t)}(r,{idToken:n}));Ec(null==i?void 0:i.users.length,r,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((e=>{var{providerId:t}=e,r=sc(e,["providerId"]);return{providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})):[];const a=(c=e.providerData,l=s,[...c.filter((e=>!l.some((t=>t.providerId===e.providerId)))),...l]);var c,l;const u=e.isAnonymous,d=!(e.email&&o.passwordHash||(null==a?void 0:a.length)),h=!!u&&d,p={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Kc(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,p)}
629
- /**
630
- * @license
631
- * Copyright 2020 Google LLC
632
- *
633
- * Licensed under the Apache License, Version 2.0 (the "License");
634
- * you may not use this file except in compliance with the License.
635
- * You may obtain a copy of the License at
636
- *
637
- * http://www.apache.org/licenses/LICENSE-2.0
638
- *
639
- * Unless required by applicable law or agreed to in writing, software
640
- * distributed under the License is distributed on an "AS IS" BASIS,
641
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
642
- * See the License for the specific language governing permissions and
643
- * limitations under the License.
644
- */
645
- class Gc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ec(e.idToken,"internal-error"),Ec(void 0!==e.idToken,"internal-error"),Ec(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=$c(e);return Ec(t,"internal-error"),Ec(void 0!==t.exp,"internal-error"),Ec(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return Ec(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:r,refreshToken:n,expiresIn:i}=
646
- /**
647
- * @license
648
- * Copyright 2020 Google LLC
649
- *
650
- * Licensed under the Apache License, Version 2.0 (the "License");
651
- * you may not use this file except in compliance with the License.
652
- * You may obtain a copy of the License at
653
- *
654
- * http://www.apache.org/licenses/LICENSE-2.0
655
- *
656
- * Unless required by applicable law or agreed to in writing, software
657
- * distributed under the License is distributed on an "AS IS" BASIS,
658
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
659
- * See the License for the specific language governing permissions and
660
- * limitations under the License.
661
- */await async function(e,t){const r=await Mc(e,{},(async()=>{const r=ea({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,o=jc(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",Pc.fetch()(o,{method:"POST",headers:s,body:r})}));return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){const{refreshToken:r,accessToken:n,expirationTime:i}=t,o=new Gc;return r&&(Ec("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),n&&(Ec("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),i&&(Ec("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Gc,this.toJSON())}_performRefresh(){return kc("not implemented")}}
662
- /**
663
- * @license
664
- * Copyright 2020 Google LLC
665
- *
666
- * Licensed under the Apache License, Version 2.0 (the "License");
667
- * you may not use this file except in compliance with the License.
668
- * You may obtain a copy of the License at
669
- *
670
- * http://www.apache.org/licenses/LICENSE-2.0
671
- *
672
- * Unless required by applicable law or agreed to in writing, software
673
- * distributed under the License is distributed on an "AS IS" BASIS,
674
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675
- * See the License for the specific language governing permissions and
676
- * limitations under the License.
677
- */function Yc(e,t){Ec("string"==typeof e||void 0===e,"internal-error",{appName:t})}class Qc{constructor(e){var{uid:t,auth:r,stsTokenManager:n}=e,i=sc(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Wc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Kc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await qc(this,this.stsTokenManager.getToken(this.auth,e));return Ec(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const r=na(e),n=await r.getIdToken(t),i=$c(n);Ec(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");const o="object"==typeof i.firebase?i.firebase:void 0,s=null==o?void 0:o.sign_in_provider;return{claims:i,token:n,authTime:Hc(Vc(i.auth_time)),issuedAtTime:Hc(Vc(i.iat)),expirationTime:Hc(Vc(i.exp)),signInProvider:s||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=na(e);await Jc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Ec(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Qc(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Ec(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await Jc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await qc(this,
678
- /**
679
- * @license
680
- * Copyright 2020 Google LLC
681
- *
682
- * Licensed under the Apache License, Version 2.0 (the "License");
683
- * you may not use this file except in compliance with the License.
684
- * You may obtain a copy of the License at
685
- *
686
- * http://www.apache.org/licenses/LICENSE-2.0
687
- *
688
- * Unless required by applicable law or agreed to in writing, software
689
- * distributed under the License is distributed on an "AS IS" BASIS,
690
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
691
- * See the License for the specific language governing permissions and
692
- * limitations under the License.
693
- */
694
- async function(e,t){return Dc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var r,n,i,o,s,a,c,l;const u=null!==(r=t.displayName)&&void 0!==r?r:void 0,d=null!==(n=t.email)&&void 0!==n?n:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,p=null!==(o=t.photoURL)&&void 0!==o?o:void 0,f=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(c=t.createdAt)&&void 0!==c?c:void 0,_=null!==(l=t.lastLoginAt)&&void 0!==l?l:void 0,{uid:v,emailVerified:y,isAnonymous:w,providerData:b,stsTokenManager:E}=t;Ec(v&&E,e,"internal-error");const k=Gc.fromJSON(this.name,E);Ec("string"==typeof v,e,"internal-error"),Yc(u,e.name),Yc(d,e.name),Ec("boolean"==typeof y,e,"internal-error"),Ec("boolean"==typeof w,e,"internal-error"),Yc(h,e.name),Yc(p,e.name),Yc(f,e.name),Yc(m,e.name),Yc(g,e.name),Yc(_,e.name);const I=new Qc({uid:v,auth:e,email:d,emailVerified:y,displayName:u,isAnonymous:w,photoURL:p,phoneNumber:h,tenantId:f,stsTokenManager:k,createdAt:g,lastLoginAt:_});return b&&Array.isArray(b)&&(I.providerData=b.map((e=>Object.assign({},e)))),m&&(I._redirectEventId=m),I}static async _fromIdTokenResponse(e,t,r=!1){const n=new Gc;n.updateFromServerResponse(t);const i=new Qc({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await Jc(i),i}}
695
- /**
696
- * @license
697
- * Copyright 2020 Google LLC
698
- *
699
- * Licensed under the Apache License, Version 2.0 (the "License");
700
- * you may not use this file except in compliance with the License.
701
- * You may obtain a copy of the License at
702
- *
703
- * http://www.apache.org/licenses/LICENSE-2.0
704
- *
705
- * Unless required by applicable law or agreed to in writing, software
706
- * distributed under the License is distributed on an "AS IS" BASIS,
707
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
708
- * See the License for the specific language governing permissions and
709
- * limitations under the License.
710
- */const Xc=new Map;function Zc(e){Ic(e instanceof Function,"Expected a class definition");let t=Xc.get(e);return t?(Ic(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Xc.set(e,t),t)}
711
- /**
712
- * @license
713
- * Copyright 2019 Google LLC
714
- *
715
- * Licensed under the Apache License, Version 2.0 (the "License");
716
- * you may not use this file except in compliance with the License.
717
- * You may obtain a copy of the License at
718
- *
719
- * http://www.apache.org/licenses/LICENSE-2.0
720
- *
721
- * Unless required by applicable law or agreed to in writing, software
722
- * distributed under the License is distributed on an "AS IS" BASIS,
723
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
724
- * See the License for the specific language governing permissions and
725
- * limitations under the License.
726
- */class el{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}el.type="NONE";const tl=el;
727
- /**
728
- * @license
729
- * Copyright 2019 Google LLC
730
- *
731
- * Licensed under the Apache License, Version 2.0 (the "License");
732
- * you may not use this file except in compliance with the License.
733
- * You may obtain a copy of the License at
734
- *
735
- * http://www.apache.org/licenses/LICENSE-2.0
736
- *
737
- * Unless required by applicable law or agreed to in writing, software
738
- * distributed under the License is distributed on an "AS IS" BASIS,
739
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
740
- * See the License for the specific language governing permissions and
741
- * limitations under the License.
742
- */function rl(e,t,r){return`firebase:${e}:${t}:${r}`}class nl{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=rl(this.userKey,n.apiKey,i),this.fullPersistenceKey=rl("persistence",n.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Qc._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new nl(Zc(tl),e,r);const n=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=n[0]||Zc(tl);const o=rl(r,e.config.apiKey,e.name);let s=null;for(const l of t)try{const t=await l._get(o);if(t){const r=Qc._fromJSON(e,t);l!==i&&(s=r),i=l;break}}catch(c){}const a=n.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(c){}}))),new nl(i,e,r)):new nl(i,e,r)}}
743
- /**
744
- * @license
745
- * Copyright 2020 Google LLC
746
- *
747
- * Licensed under the Apache License, Version 2.0 (the "License");
748
- * you may not use this file except in compliance with the License.
749
- * You may obtain a copy of the License at
750
- *
751
- * http://www.apache.org/licenses/LICENSE-2.0
752
- *
753
- * Unless required by applicable law or agreed to in writing, software
754
- * distributed under the License is distributed on an "AS IS" BASIS,
755
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756
- * See the License for the specific language governing permissions and
757
- * limitations under the License.
758
- */function il(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(cl(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ol(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ul(t))return"Blackberry";if(dl(t))return"Webos";if(sl(t))return"Safari";if((t.includes("chrome/")||al(t))&&!t.includes("edge/"))return"Chrome";if(ll(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(t);if(2===(null==r?void 0:r.length))return r[1]}return"Other"}function ol(e=Js()){return/firefox\//i.test(e)}function sl(e=Js()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function al(e=Js()){return/crios\//i.test(e)}function cl(e=Js()){return/iemobile/i.test(e)}function ll(e=Js()){return/android/i.test(e)}function ul(e=Js()){return/blackberry/i.test(e)}function dl(e=Js()){return/webos/i.test(e)}function hl(e=Js()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function pl(){return function(){const e=Js();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function fl(e=Js()){return hl(e)||ll(e)||dl(e)||ul(e)||/windows phone/i.test(e)||cl(e)}
759
- /**
760
- * @license
761
- * Copyright 2020 Google LLC
762
- *
763
- * Licensed under the Apache License, Version 2.0 (the "License");
764
- * you may not use this file except in compliance with the License.
765
- * You may obtain a copy of the License at
766
- *
767
- * http://www.apache.org/licenses/LICENSE-2.0
768
- *
769
- * Unless required by applicable law or agreed to in writing, software
770
- * distributed under the License is distributed on an "AS IS" BASIS,
771
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
772
- * See the License for the specific language governing permissions and
773
- * limitations under the License.
774
- */
775
- function ml(e,t=[]){let r;switch(e){case"Browser":r=il(Js());break;case"Worker":r=`${il(Js())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${qa}/${n}`}
776
- /**
777
- * @license
778
- * Copyright 2022 Google LLC
779
- *
780
- * Licensed under the Apache License, Version 2.0 (the "License");
781
- * you may not use this file except in compliance with the License.
782
- * You may obtain a copy of the License at
783
- *
784
- * http://www.apache.org/licenses/LICENSE-2.0
785
- *
786
- * Unless required by applicable law or agreed to in writing, software
787
- * distributed under the License is distributed on an "AS IS" BASIS,
788
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
789
- * See the License for the specific language governing permissions and
790
- * limitations under the License.
791
- */class gl{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(gh){n(gh)}}));r.onAbort=t,this.queue.push(r);const n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(gh){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==gh?void 0:gh.message})}}}
792
- /**
793
- * @license
794
- * Copyright 2023 Google LLC
795
- *
796
- * Licensed under the Apache License, Version 2.0 (the "License");
797
- * you may not use this file except in compliance with the License.
798
- * You may obtain a copy of the License at
799
- *
800
- * http://www.apache.org/licenses/LICENSE-2.0
801
- *
802
- * Unless required by applicable law or agreed to in writing, software
803
- * distributed under the License is distributed on an "AS IS" BASIS,
804
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
805
- * See the License for the specific language governing permissions and
806
- * limitations under the License.
807
- */class _l{constructor(e){var t,r,n,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(n=null===(r=e.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==n?n:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,r,n,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(r=a.meetsMaxPasswordLength)||void 0===r||r),a.isValid&&(a.isValid=null===(n=a.containsLowercaseLetter)||void 0===n||n),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}
808
- /**
809
- * @license
810
- * Copyright 2020 Google LLC
811
- *
812
- * Licensed under the Apache License, Version 2.0 (the "License");
813
- * you may not use this file except in compliance with the License.
814
- * You may obtain a copy of the License at
815
- *
816
- * http://www.apache.org/licenses/LICENSE-2.0
817
- *
818
- * Unless required by applicable law or agreed to in writing, software
819
- * distributed under the License is distributed on an "AS IS" BASIS,
820
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
- * See the License for the specific language governing permissions and
822
- * limitations under the License.
823
- */class vl{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new wl(this),this.idTokenSubscription=new wl(this),this.beforeStateQueue=new gl(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=lc,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Zc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await nl.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(gh){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(await this.currentUser.getIdToken())):void(await this._updateCurrentUser(e,!0)):void 0}async initializeCurrentUser(e){var t;const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);r&&r!==o||!(null==s?void 0:s.user)||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(gh){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(gh)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ec(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(gh){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Jc(e)}catch(gh){if("auth/network-request-failed"!==(null==gh?void 0:gh.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?na(e):null;return t&&Ec(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Ec(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(Zc(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return Dc(e,"GET","/v2/passwordPolicy",Lc(e,t))}
824
- /**
825
- * @license
826
- * Copyright 2023 Google LLC
827
- *
828
- * Licensed under the Apache License, Version 2.0 (the "License");
829
- * you may not use this file except in compliance with the License.
830
- * You may obtain a copy of the License at
831
- *
832
- * http://www.apache.org/licenses/LICENSE-2.0
833
- *
834
- * Unless required by applicable law or agreed to in writing, software
835
- * distributed under the License is distributed on an "AS IS" BASIS,
836
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
837
- * See the License for the specific language governing permissions and
838
- * limitations under the License.
839
- */(this),t=new _l(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Ys("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged((()=>{r(),e()}),t)}}))}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&Zc(e)||this._popupRedirectResolver;Ec(t,this,"argument-error"),this.redirectPersistenceManager=await nl.create(this,[Zc(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,r;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};const i="function"==typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ec(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"==typeof t){const i=e.addObserver(t,r,n);return()=>{o=!0,i()}}{const r=e.addObserver(t);return()=>{o=!0,r()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ec(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ml(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const r=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());r&&(t["X-Firebase-Client"]=r);const n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){_c.logLevel<=ca.WARN&&_c.warn(`Auth (${qa}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function yl(e){return na(e)}class wl{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const r=new ta(e,t);return r.subscribe.bind(r)}((e=>this.observer=e))}get next(){return Ec(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
840
- /**
841
- * @license
842
- * Copyright 2020 Google LLC
843
- *
844
- * Licensed under the Apache License, Version 2.0 (the "License");
845
- * you may not use this file except in compliance with the License.
846
- * You may obtain a copy of the License at
847
- *
848
- * http://www.apache.org/licenses/LICENSE-2.0
849
- *
850
- * Unless required by applicable law or agreed to in writing, software
851
- * distributed under the License is distributed on an "AS IS" BASIS,
852
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
853
- * See the License for the specific language governing permissions and
854
- * limitations under the License.
855
- */function bl(e){return new Promise(((t,r)=>{const n=document.createElement("script");var i,o;n.setAttribute("src",e),n.onload=t,n.onerror=e=>{const t=wc("internal-error");t.customData=e,r(t)},n.type="text/javascript",n.charset="UTF-8",(null!==(o=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==o?o:document).appendChild(n)}))}function El(e){return`__${e}${Math.floor(1e6*Math.random())}`}
856
- /**
857
- * @license
858
- * Copyright 2020 Google LLC
859
- *
860
- * Licensed under the Apache License, Version 2.0 (the "License");
861
- * you may not use this file except in compliance with the License.
862
- * You may obtain a copy of the License at
863
- *
864
- * http://www.apache.org/licenses/LICENSE-2.0
865
- *
866
- * Unless required by applicable law or agreed to in writing, software
867
- * distributed under the License is distributed on an "AS IS" BASIS,
868
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
869
- * See the License for the specific language governing permissions and
870
- * limitations under the License.
871
- */function kl(e,t,r){const n=yl(e);Ec(n._canInitEmulator,n,"emulator-config-failed"),Ec(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!!(null==r?void 0:r.disableWarnings),o=Il(t),{host:s,port:a}=function(e){const t=Il(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};const n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const e=i[1];return{host:e,port:Tl(n.substr(e.length+1))}}{const[e,t]=n.split(":");return{host:e,port:Tl(t)}}}(t),c=null===a?"":`:${a}`;n.config.emulator={url:`${o}//${s}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}
872
- /**
873
- * @license
874
- * Copyright 2020 Google LLC
875
- *
876
- * Licensed under the Apache License, Version 2.0 (the "License");
877
- * you may not use this file except in compliance with the License.
878
- * You may obtain a copy of the License at
879
- *
880
- * http://www.apache.org/licenses/LICENSE-2.0
881
- *
882
- * Unless required by applicable law or agreed to in writing, software
883
- * distributed under the License is distributed on an "AS IS" BASIS,
884
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
885
- * See the License for the specific language governing permissions and
886
- * limitations under the License.
887
- */()}function Il(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Tl(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Sl{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return kc("not implemented")}_getIdTokenResponse(e){return kc("not implemented")}_linkToIdToken(e,t){return kc("not implemented")}_getReauthenticationResolver(e){return kc("not implemented")}}
888
- /**
889
- * @license
890
- * Copyright 2020 Google LLC
891
- *
892
- * Licensed under the Apache License, Version 2.0 (the "License");
893
- * you may not use this file except in compliance with the License.
894
- * You may obtain a copy of the License at
895
- *
896
- * http://www.apache.org/licenses/LICENSE-2.0
897
- *
898
- * Unless required by applicable law or agreed to in writing, software
899
- * distributed under the License is distributed on an "AS IS" BASIS,
900
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
901
- * See the License for the specific language governing permissions and
902
- * limitations under the License.
903
- */async function Cl(e,t){return Uc(e,"POST","/v1/accounts:signInWithIdp",Lc(e,t))}
904
- /**
905
- * @license
906
- * Copyright 2020 Google LLC
907
- *
908
- * Licensed under the Apache License, Version 2.0 (the "License");
909
- * you may not use this file except in compliance with the License.
910
- * You may obtain a copy of the License at
911
- *
912
- * http://www.apache.org/licenses/LICENSE-2.0
913
- *
914
- * Unless required by applicable law or agreed to in writing, software
915
- * distributed under the License is distributed on an "AS IS" BASIS,
916
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
917
- * See the License for the specific language governing permissions and
918
- * limitations under the License.
919
- */class Rl extends Sl{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Rl(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):yc("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:r,signInMethod:n}=t,i=sc(t,["providerId","signInMethod"]);if(!r||!n)return null;const o=new Rl(r,n);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return Cl(e,this.buildRequest())}_linkToIdToken(e,t){const r=this.buildRequest();return r.idToken=t,Cl(e,r)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Cl(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=ea(t)}return e}}
920
- /**
921
- * @license
922
- * Copyright 2020 Google LLC
923
- *
924
- * Licensed under the Apache License, Version 2.0 (the "License");
925
- * you may not use this file except in compliance with the License.
926
- * You may obtain a copy of the License at
927
- *
928
- * http://www.apache.org/licenses/LICENSE-2.0
929
- *
930
- * Unless required by applicable law or agreed to in writing, software
931
- * distributed under the License is distributed on an "AS IS" BASIS,
932
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
933
- * See the License for the specific language governing permissions and
934
- * limitations under the License.
935
- */const Ol={USER_NOT_FOUND:"user-not-found"};
936
- /**
937
- * @license
938
- * Copyright 2020 Google LLC
939
- *
940
- * Licensed under the Apache License, Version 2.0 (the "License");
941
- * you may not use this file except in compliance with the License.
942
- * You may obtain a copy of the License at
943
- *
944
- * http://www.apache.org/licenses/LICENSE-2.0
945
- *
946
- * Unless required by applicable law or agreed to in writing, software
947
- * distributed under the License is distributed on an "AS IS" BASIS,
948
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
949
- * See the License for the specific language governing permissions and
950
- * limitations under the License.
951
- */
952
- class Al extends Sl{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Al({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Al({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const r=await Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,t));if(r.temporaryProof)throw Bc(e,"account-exists-with-different-credential",r);return r}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Ol)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new Al({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}
953
- /**
954
- * @license
955
- * Copyright 2020 Google LLC
956
- *
957
- * Licensed under the Apache License, Version 2.0 (the "License");
958
- * you may not use this file except in compliance with the License.
959
- * You may obtain a copy of the License at
960
- *
961
- * http://www.apache.org/licenses/LICENSE-2.0
962
- *
963
- * Unless required by applicable law or agreed to in writing, software
964
- * distributed under the License is distributed on an "AS IS" BASIS,
965
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
966
- * See the License for the specific language governing permissions and
967
- * limitations under the License.
968
- */class Pl{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}
969
- /**
970
- * @license
971
- * Copyright 2019 Google LLC
972
- *
973
- * Licensed under the Apache License, Version 2.0 (the "License");
974
- * you may not use this file except in compliance with the License.
975
- * You may obtain a copy of the License at
976
- *
977
- * http://www.apache.org/licenses/LICENSE-2.0
978
- *
979
- * Unless required by applicable law or agreed to in writing, software
980
- * distributed under the License is distributed on an "AS IS" BASIS,
981
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
982
- * See the License for the specific language governing permissions and
983
- * limitations under the License.
984
- */class Nl extends Pl{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}
985
- /**
986
- * @license
987
- * Copyright 2020 Google LLC
988
- *
989
- * Licensed under the Apache License, Version 2.0 (the "License");
990
- * you may not use this file except in compliance with the License.
991
- * You may obtain a copy of the License at
992
- *
993
- * http://www.apache.org/licenses/LICENSE-2.0
994
- *
995
- * Unless required by applicable law or agreed to in writing, software
996
- * distributed under the License is distributed on an "AS IS" BASIS,
997
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
998
- * See the License for the specific language governing permissions and
999
- * limitations under the License.
1000
- */class xl extends Nl{constructor(){super("facebook.com")}static credential(e){return Rl._fromParams({providerId:xl.PROVIDER_ID,signInMethod:xl.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return xl.credentialFromTaggedObject(e)}static credentialFromError(e){return xl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return xl.credential(e.oauthAccessToken)}catch(t){return null}}}xl.FACEBOOK_SIGN_IN_METHOD="facebook.com",xl.PROVIDER_ID="facebook.com";
1001
- /**
1002
- * @license
1003
- * Copyright 2020 Google LLC
1004
- *
1005
- * Licensed under the Apache License, Version 2.0 (the "License");
1006
- * you may not use this file except in compliance with the License.
1007
- * You may obtain a copy of the License at
1008
- *
1009
- * http://www.apache.org/licenses/LICENSE-2.0
1010
- *
1011
- * Unless required by applicable law or agreed to in writing, software
1012
- * distributed under the License is distributed on an "AS IS" BASIS,
1013
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1014
- * See the License for the specific language governing permissions and
1015
- * limitations under the License.
1016
- */
1017
- class Ll extends Nl{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Rl._fromParams({providerId:Ll.PROVIDER_ID,signInMethod:Ll.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Ll.credentialFromTaggedObject(e)}static credentialFromError(e){return Ll.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return Ll.credential(t,r)}catch(n){return null}}}Ll.GOOGLE_SIGN_IN_METHOD="google.com",Ll.PROVIDER_ID="google.com";
1018
- /**
1019
- * @license
1020
- * Copyright 2020 Google LLC
1021
- *
1022
- * Licensed under the Apache License, Version 2.0 (the "License");
1023
- * you may not use this file except in compliance with the License.
1024
- * You may obtain a copy of the License at
1025
- *
1026
- * http://www.apache.org/licenses/LICENSE-2.0
1027
- *
1028
- * Unless required by applicable law or agreed to in writing, software
1029
- * distributed under the License is distributed on an "AS IS" BASIS,
1030
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1031
- * See the License for the specific language governing permissions and
1032
- * limitations under the License.
1033
- */
1034
- class Dl extends Nl{constructor(){super("github.com")}static credential(e){return Rl._fromParams({providerId:Dl.PROVIDER_ID,signInMethod:Dl.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Dl.credentialFromTaggedObject(e)}static credentialFromError(e){return Dl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Dl.credential(e.oauthAccessToken)}catch(t){return null}}}Dl.GITHUB_SIGN_IN_METHOD="github.com",Dl.PROVIDER_ID="github.com";
1035
- /**
1036
- * @license
1037
- * Copyright 2020 Google LLC
1038
- *
1039
- * Licensed under the Apache License, Version 2.0 (the "License");
1040
- * you may not use this file except in compliance with the License.
1041
- * You may obtain a copy of the License at
1042
- *
1043
- * http://www.apache.org/licenses/LICENSE-2.0
1044
- *
1045
- * Unless required by applicable law or agreed to in writing, software
1046
- * distributed under the License is distributed on an "AS IS" BASIS,
1047
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1048
- * See the License for the specific language governing permissions and
1049
- * limitations under the License.
1050
- */
1051
- class Ml extends Nl{constructor(){super("twitter.com")}static credential(e,t){return Rl._fromParams({providerId:Ml.PROVIDER_ID,signInMethod:Ml.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Ml.credentialFromTaggedObject(e)}static credentialFromError(e){return Ml.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return Ml.credential(t,r)}catch(n){return null}}}Ml.TWITTER_SIGN_IN_METHOD="twitter.com",Ml.PROVIDER_ID="twitter.com";
1052
- /**
1053
- * @license
1054
- * Copyright 2020 Google LLC
1055
- *
1056
- * Licensed under the Apache License, Version 2.0 (the "License");
1057
- * you may not use this file except in compliance with the License.
1058
- * You may obtain a copy of the License at
1059
- *
1060
- * http://www.apache.org/licenses/LICENSE-2.0
1061
- *
1062
- * Unless required by applicable law or agreed to in writing, software
1063
- * distributed under the License is distributed on an "AS IS" BASIS,
1064
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1065
- * See the License for the specific language governing permissions and
1066
- * limitations under the License.
1067
- */
1068
- class Ul{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){const i=await Qc._fromIdTokenResponse(e,r,n),o=jl(r);return new Ul({user:i,providerId:o,_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){await e._updateTokensIfNecessary(r,!0);const n=jl(r);return new Ul({user:e,providerId:n,_tokenResponse:r,operationType:t})}}function jl(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
1069
- /**
1070
- * @license
1071
- * Copyright 2020 Google LLC
1072
- *
1073
- * Licensed under the Apache License, Version 2.0 (the "License");
1074
- * you may not use this file except in compliance with the License.
1075
- * You may obtain a copy of the License at
1076
- *
1077
- * http://www.apache.org/licenses/LICENSE-2.0
1078
- *
1079
- * Unless required by applicable law or agreed to in writing, software
1080
- * distributed under the License is distributed on an "AS IS" BASIS,
1081
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1082
- * See the License for the specific language governing permissions and
1083
- * limitations under the License.
1084
- */class Fl extends Gs{constructor(e,t,r,n){var i;super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,Fl.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new Fl(e,t,r,n)}}function Bl(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch((r=>{if("auth/multi-factor-auth-required"===r.code)throw Fl._fromErrorAndOperation(e,r,t,n);throw r}))}
1085
- /**
1086
- * @license
1087
- * Copyright 2020 Google LLC
1088
- *
1089
- * Licensed under the Apache License, Version 2.0 (the "License");
1090
- * you may not use this file except in compliance with the License.
1091
- * You may obtain a copy of the License at
1092
- *
1093
- * http://www.apache.org/licenses/LICENSE-2.0
1094
- *
1095
- * Unless required by applicable law or agreed to in writing, software
1096
- * distributed under the License is distributed on an "AS IS" BASIS,
1097
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1098
- * See the License for the specific language governing permissions and
1099
- * limitations under the License.
1100
- */
1101
- async function zl(e,t,r=!1){const n="signIn",i=await Bl(e,n,t),o=await Ul._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(o.user),o}const Hl="__sak";
1102
- /**
1103
- * @license
1104
- * Copyright 2019 Google LLC
1105
- *
1106
- * Licensed under the Apache License, Version 2.0 (the "License");
1107
- * you may not use this file except in compliance with the License.
1108
- * You may obtain a copy of the License at
1109
- *
1110
- * http://www.apache.org/licenses/LICENSE-2.0
1111
- *
1112
- * Unless required by applicable law or agreed to in writing, software
1113
- * distributed under the License is distributed on an "AS IS" BASIS,
1114
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1115
- * See the License for the specific language governing permissions and
1116
- * limitations under the License.
1117
- */class Vl{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Hl,"1"),this.storage.removeItem(Hl),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}
1118
- /**
1119
- * @license
1120
- * Copyright 2020 Google LLC
1121
- *
1122
- * Licensed under the Apache License, Version 2.0 (the "License");
1123
- * you may not use this file except in compliance with the License.
1124
- * You may obtain a copy of the License at
1125
- *
1126
- * http://www.apache.org/licenses/LICENSE-2.0
1127
- *
1128
- * Unless required by applicable law or agreed to in writing, software
1129
- * distributed under the License is distributed on an "AS IS" BASIS,
1130
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1131
- * See the License for the specific language governing permissions and
1132
- * limitations under the License.
1133
- */class $l extends Vl{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=Js();return sl(e)||hl(e)}()&&function(){try{return!(!window||window===window.top)}catch(gh){return!1}}(),this.fallbackToPolling=fl(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,r)=>{this.notifyListeners(e,r)}));const r=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const n=this.storage.getItem(r);if(e.newValue!==n)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!t)return}const n=()=>{const e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);pl()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}$l.type="LOCAL";const ql=$l;
1134
- /**
1135
- * @license
1136
- * Copyright 2020 Google LLC
1137
- *
1138
- * Licensed under the Apache License, Version 2.0 (the "License");
1139
- * you may not use this file except in compliance with the License.
1140
- * You may obtain a copy of the License at
1141
- *
1142
- * http://www.apache.org/licenses/LICENSE-2.0
1143
- *
1144
- * Unless required by applicable law or agreed to in writing, software
1145
- * distributed under the License is distributed on an "AS IS" BASIS,
1146
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1147
- * See the License for the specific language governing permissions and
1148
- * limitations under the License.
1149
- */class Wl extends Vl{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Wl.type="SESSION";const Kl=Wl;
1150
- /**
1151
- * @license
1152
- * Copyright 2019 Google LLC
1153
- *
1154
- * Licensed under the Apache License, Version 2.0 (the "License");
1155
- * you may not use this file except in compliance with the License.
1156
- * You may obtain a copy of the License at
1157
- *
1158
- * http://www.apache.org/licenses/LICENSE-2.0
1159
- *
1160
- * Unless required by applicable law or agreed to in writing, software
1161
- * distributed under the License is distributed on an "AS IS" BASIS,
1162
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1163
- * See the License for the specific language governing permissions and
1164
- * limitations under the License.
1165
- */
1166
- /**
1167
- * @license
1168
- * Copyright 2019 Google LLC
1169
- *
1170
- * Licensed under the Apache License, Version 2.0 (the "License");
1171
- * you may not use this file except in compliance with the License.
1172
- * You may obtain a copy of the License at
1173
- *
1174
- * http://www.apache.org/licenses/LICENSE-2.0
1175
- *
1176
- * Unless required by applicable law or agreed to in writing, software
1177
- * distributed under the License is distributed on an "AS IS" BASIS,
1178
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1179
- * See the License for the specific language governing permissions and
1180
- * limitations under the License.
1181
- */
1182
- class Jl{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const r=new Jl(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:r,eventType:n,data:i}=t.data,o=this.handlersMap[n];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:r,eventType:n});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:r,eventType:n,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}
1183
- /**
1184
- * @license
1185
- * Copyright 2020 Google LLC
1186
- *
1187
- * Licensed under the Apache License, Version 2.0 (the "License");
1188
- * you may not use this file except in compliance with the License.
1189
- * You may obtain a copy of the License at
1190
- *
1191
- * http://www.apache.org/licenses/LICENSE-2.0
1192
- *
1193
- * Unless required by applicable law or agreed to in writing, software
1194
- * distributed under the License is distributed on an "AS IS" BASIS,
1195
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1196
- * See the License for the specific language governing permissions and
1197
- * limitations under the License.
1198
- */
1199
- function Gl(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random());return e+r}
1200
- /**
1201
- * @license
1202
- * Copyright 2019 Google LLC
1203
- *
1204
- * Licensed under the Apache License, Version 2.0 (the "License");
1205
- * you may not use this file except in compliance with the License.
1206
- * You may obtain a copy of the License at
1207
- *
1208
- * http://www.apache.org/licenses/LICENSE-2.0
1209
- *
1210
- * Unless required by applicable law or agreed to in writing, software
1211
- * distributed under the License is distributed on an "AS IS" BASIS,
1212
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
- * See the License for the specific language governing permissions and
1214
- * limitations under the License.
1215
- */Jl.receivers=[];class Yl{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,r=50){const n="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!n)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const c=Gl("",20);n.port1.start();const l=setTimeout((()=>{a(new Error("unsupported_event"))}),r);o={messageChannel:n,onMessage(e){const t=e;if(t.data.eventId===c)switch(t.data.status){case"ack":clearTimeout(l),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(l),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),n.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[n.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}
1216
- /**
1217
- * @license
1218
- * Copyright 2020 Google LLC
1219
- *
1220
- * Licensed under the Apache License, Version 2.0 (the "License");
1221
- * you may not use this file except in compliance with the License.
1222
- * You may obtain a copy of the License at
1223
- *
1224
- * http://www.apache.org/licenses/LICENSE-2.0
1225
- *
1226
- * Unless required by applicable law or agreed to in writing, software
1227
- * distributed under the License is distributed on an "AS IS" BASIS,
1228
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1229
- * See the License for the specific language governing permissions and
1230
- * limitations under the License.
1231
- */function Ql(){return window}
1232
- /**
1233
- * @license
1234
- * Copyright 2020 Google LLC.
1235
- *
1236
- * Licensed under the Apache License, Version 2.0 (the "License");
1237
- * you may not use this file except in compliance with the License.
1238
- * You may obtain a copy of the License at
1239
- *
1240
- * http://www.apache.org/licenses/LICENSE-2.0
1241
- *
1242
- * Unless required by applicable law or agreed to in writing, software
1243
- * distributed under the License is distributed on an "AS IS" BASIS,
1244
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1245
- * See the License for the specific language governing permissions and
1246
- * limitations under the License.
1247
- */
1248
- function Xl(){return void 0!==Ql().WorkerGlobalScope&&"function"==typeof Ql().importScripts}
1249
- /**
1250
- * @license
1251
- * Copyright 2019 Google LLC
1252
- *
1253
- * Licensed under the Apache License, Version 2.0 (the "License");
1254
- * you may not use this file except in compliance with the License.
1255
- * You may obtain a copy of the License at
1256
- *
1257
- * http://www.apache.org/licenses/LICENSE-2.0
1258
- *
1259
- * Unless required by applicable law or agreed to in writing, software
1260
- * distributed under the License is distributed on an "AS IS" BASIS,
1261
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1262
- * See the License for the specific language governing permissions and
1263
- * limitations under the License.
1264
- */
1265
- const Zl="firebaseLocalStorageDb",eu="firebaseLocalStorage",tu="fbase_key";class ru{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function nu(e,t){return e.transaction([eu],t?"readwrite":"readonly").objectStore(eu)}function iu(){const e=indexedDB.open(Zl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(eu,{keyPath:tu})}catch(gh){r(gh)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(eu)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(Zl);return new ru(e).toPromise()}(),t(await iu()))}))}))}async function ou(e,t,r){const n=nu(e,!0).put({[tu]:t,value:r});return new ru(n).toPromise()}function su(e,t){const r=nu(e,!0).delete(t);return new ru(r).toPromise()}class au{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await iu()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(gh){if(t++>3)throw gh;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Xl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Jl._getInstance(Xl()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Yl(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await iu();return await ou(e,Hl,"1"),await su(e,Hl),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((r=>ou(r,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const r=nu(e,!1).get(t),n=await new ru(r).toPromise();return void 0===n?null:n.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>su(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=nu(e,!1).getAll();return new ru(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],r=new Set;for(const{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(const n of Object.keys(this.localCache))this.localCache[n]&&!r.has(n)&&(this.notifyListeners(n,null),t.push(n));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}au.type="LOCAL";const cu=au;
1266
- /**
1267
- * @license
1268
- * Copyright 2020 Google LLC
1269
- *
1270
- * Licensed under the Apache License, Version 2.0 (the "License");
1271
- * you may not use this file except in compliance with the License.
1272
- * You may obtain a copy of the License at
1273
- *
1274
- * http://www.apache.org/licenses/LICENSE-2.0
1275
- *
1276
- * Unless required by applicable law or agreed to in writing, software
1277
- * distributed under the License is distributed on an "AS IS" BASIS,
1278
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1279
- * See the License for the specific language governing permissions and
1280
- * limitations under the License.
1281
- */
1282
- /**
1283
- * @license
1284
- * Copyright 2020 Google LLC
1285
- *
1286
- * Licensed under the Apache License, Version 2.0 (the "License");
1287
- * you may not use this file except in compliance with the License.
1288
- * You may obtain a copy of the License at
1289
- *
1290
- * http://www.apache.org/licenses/LICENSE-2.0
1291
- *
1292
- * Unless required by applicable law or agreed to in writing, software
1293
- * distributed under the License is distributed on an "AS IS" BASIS,
1294
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1295
- * See the License for the specific language governing permissions and
1296
- * limitations under the License.
1297
- */
1298
- const lu=1e12;class uu{constructor(e){this.auth=e,this.counter=lu,this._widgets=new Map}render(e,t){const r=this.counter;return this._widgets.set(r,new du(e,this.auth.name,t||{})),this.counter++,r}reset(e){var t;const r=e||lu;null===(t=this._widgets.get(r))||void 0===t||t.delete(),this._widgets.delete(r)}getResponse(e){var t;const r=e||lu;return(null===(t=this._widgets.get(r))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const r=e||lu;return null===(t=this._widgets.get(r))||void 0===t||t.execute(),""}}class du{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const n="string"==typeof e?document.getElementById(e):e;Ec(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((()=>{this.responseToken=function(e){const t=[],r="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<e;n++)t.push(r.charAt(Math.floor(Math.random()*r.length)));return t.join("")}
1299
- /**
1300
- * @license
1301
- * Copyright 2020 Google LLC
1302
- *
1303
- * Licensed under the Apache License, Version 2.0 (the "License");
1304
- * you may not use this file except in compliance with the License.
1305
- * You may obtain a copy of the License at
1306
- *
1307
- * http://www.apache.org/licenses/LICENSE-2.0
1308
- *
1309
- * Unless required by applicable law or agreed to in writing, software
1310
- * distributed under the License is distributed on an "AS IS" BASIS,
1311
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312
- * See the License for the specific language governing permissions and
1313
- * limitations under the License.
1314
- */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(gh){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(gh){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const hu=El("rcb"),pu=new Oc(3e4,6e4);class fu{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=Ql().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ec(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&zc(Ql().grecaptcha)?Promise.resolve(Ql().grecaptcha):new Promise(((r,n)=>{const i=Ql().setTimeout((()=>{n(wc(e,"network-request-failed"))}),pu.get());Ql()[hu]=()=>{Ql().clearTimeout(i),delete Ql()[hu];const o=Ql().grecaptcha;if(!o||!zc(o))return void n(wc(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(o)};bl(`https://www.google.com/recaptcha/api.js??${ea({onload:hu,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(wc(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=Ql().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class mu{async load(e){return new uu(e)}clearedOneInstance(){}}
1315
- /**
1316
- * @license
1317
- * Copyright 2020 Google LLC
1318
- *
1319
- * Licensed under the Apache License, Version 2.0 (the "License");
1320
- * you may not use this file except in compliance with the License.
1321
- * You may obtain a copy of the License at
1322
- *
1323
- * http://www.apache.org/licenses/LICENSE-2.0
1324
- *
1325
- * Unless required by applicable law or agreed to in writing, software
1326
- * distributed under the License is distributed on an "AS IS" BASIS,
1327
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1328
- * See the License for the specific language governing permissions and
1329
- * limitations under the License.
1330
- */const gu="recaptcha",_u={theme:"light",type:"image"};class vu{constructor(e,t,r=Object.assign({},_u)){this.parameters=r,this.type=gu,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=yl(e),this.isInvisible="invisible"===this.parameters.size,Ec("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ec(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new mu:new fu,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise((r=>{const n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(gh){return Promise.reject(gh)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){Ec(!this.parameters.sitekey,this.auth,"argument-error"),Ec(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ec("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const r=Ql()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ec(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){Ec(Sc()&&!Xl(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await Dc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ec(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ec(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function yu(e,t,r){var n;const i=await r.verify();try{let o;if(Ec("string"==typeof i,e,"argument-error"),Ec(r.type===gu,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ec("enroll"===t.type,e,"internal-error");const r=
1331
- /**
1332
- * @license
1333
- * Copyright 2020 Google LLC
1334
- *
1335
- * Licensed under the Apache License, Version 2.0 (the "License");
1336
- * you may not use this file except in compliance with the License.
1337
- * You may obtain a copy of the License at
1338
- *
1339
- * http://www.apache.org/licenses/LICENSE-2.0
1340
- *
1341
- * Unless required by applicable law or agreed to in writing, software
1342
- * distributed under the License is distributed on an "AS IS" BASIS,
1343
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344
- * See the License for the specific language governing permissions and
1345
- * limitations under the License.
1346
- */await function(e,t){return Dc(e,"POST","/v2/accounts/mfaEnrollment:start",Lc(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return r.phoneSessionInfo.sessionInfo}{Ec("signin"===t.type,e,"internal-error");const r=(null===(n=o.multiFactorHint)||void 0===n?void 0:n.uid)||o.multiFactorUid;Ec(r,e,"missing-multi-factor-info");const s=await function(e,t){return Dc(e,"POST","/v2/accounts/mfaSignIn:start",Lc(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return Dc(e,"POST","/v1/accounts:sendVerificationCode",Lc(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{r._reset()}}
1347
- /**
1348
- * @license
1349
- * Copyright 2020 Google LLC
1350
- *
1351
- * Licensed under the Apache License, Version 2.0 (the "License");
1352
- * you may not use this file except in compliance with the License.
1353
- * You may obtain a copy of the License at
1354
- *
1355
- * http://www.apache.org/licenses/LICENSE-2.0
1356
- *
1357
- * Unless required by applicable law or agreed to in writing, software
1358
- * distributed under the License is distributed on an "AS IS" BASIS,
1359
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360
- * See the License for the specific language governing permissions and
1361
- * limitations under the License.
1362
- */class wu{constructor(e){this.providerId=wu.PROVIDER_ID,this.auth=yl(e)}verifyPhoneNumber(e,t){return yu(this.auth,e,na(t))}static credential(e,t){return Al._fromVerification(e,t)}static credentialFromResult(e){const t=e;return wu.credentialFromTaggedObject(t)}static credentialFromError(e){return wu.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:r}=e;return t&&r?Al._fromTokenResponse(t,r):null}}wu.PROVIDER_ID="phone",wu.PHONE_SIGN_IN_METHOD="phone";
1363
- /**
1364
- * @license
1365
- * Copyright 2019 Google LLC
1366
- *
1367
- * Licensed under the Apache License, Version 2.0 (the "License");
1368
- * you may not use this file except in compliance with the License.
1369
- * You may obtain a copy of the License at
1370
- *
1371
- * http://www.apache.org/licenses/LICENSE-2.0
1372
- *
1373
- * Unless required by applicable law or agreed to in writing, software
1374
- * distributed under the License is distributed on an "AS IS" BASIS,
1375
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1376
- * See the License for the specific language governing permissions and
1377
- * limitations under the License.
1378
- */
1379
- class bu extends Sl{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Cl(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Cl(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Cl(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Eu(e){return zl(e.auth,new bu(e),e.bypassAuthState)}function ku(e){const{auth:t,user:r}=e;return Ec(r,t,"internal-error"),
1380
- /**
1381
- * @license
1382
- * Copyright 2019 Google LLC
1383
- *
1384
- * Licensed under the Apache License, Version 2.0 (the "License");
1385
- * you may not use this file except in compliance with the License.
1386
- * You may obtain a copy of the License at
1387
- *
1388
- * http://www.apache.org/licenses/LICENSE-2.0
1389
- *
1390
- * Unless required by applicable law or agreed to in writing, software
1391
- * distributed under the License is distributed on an "AS IS" BASIS,
1392
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1393
- * See the License for the specific language governing permissions and
1394
- * limitations under the License.
1395
- */
1396
- async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await qc(e,Bl(n,i,t,e),r);Ec(o.idToken,n,"internal-error");const s=$c(o.idToken);Ec(s,n,"internal-error");const{sub:a}=s;return Ec(e.uid===a,n,"user-mismatch"),Ul._forOperation(e,i,o)}catch(gh){throw"auth/user-not-found"===(null==gh?void 0:gh.code)&&yc(n,"user-mismatch"),gh}}(r,new bu(e),e.bypassAuthState)}async function Iu(e){const{auth:t,user:r}=e;return Ec(r,t,"internal-error"),async function(e,t,r=!1){const n=await qc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return Ul._forOperation(e,"link",n)}(r,new bu(e),e.bypassAuthState)}
1397
- /**
1398
- * @license
1399
- * Copyright 2020 Google LLC
1400
- *
1401
- * Licensed under the Apache License, Version 2.0 (the "License");
1402
- * you may not use this file except in compliance with the License.
1403
- * You may obtain a copy of the License at
1404
- *
1405
- * http://www.apache.org/licenses/LICENSE-2.0
1406
- *
1407
- * Unless required by applicable law or agreed to in writing, software
1408
- * distributed under the License is distributed on an "AS IS" BASIS,
1409
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1410
- * See the License for the specific language governing permissions and
1411
- * limitations under the License.
1412
- */class Tu{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(gh){this.reject(gh)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(gh){this.reject(gh)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Eu;case"linkViaPopup":case"linkViaRedirect":return Iu;case"reauthViaPopup":case"reauthViaRedirect":return ku;default:yc(this.auth,"internal-error")}}resolve(e){Ic(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Ic(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1413
- /**
1414
- * @license
1415
- * Copyright 2020 Google LLC
1416
- *
1417
- * Licensed under the Apache License, Version 2.0 (the "License");
1418
- * you may not use this file except in compliance with the License.
1419
- * You may obtain a copy of the License at
1420
- *
1421
- * http://www.apache.org/licenses/LICENSE-2.0
1422
- *
1423
- * Unless required by applicable law or agreed to in writing, software
1424
- * distributed under the License is distributed on an "AS IS" BASIS,
1425
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1426
- * See the License for the specific language governing permissions and
1427
- * limitations under the License.
1428
- */const Su=new Oc(2e3,1e4);class Cu extends Tu{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,Cu.currentPopupAction&&Cu.currentPopupAction.cancel(),Cu.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ec(e,this.auth,"internal-error"),e}async onExecution(){Ic(1===this.filter.length,"Popup operations only handle one event");const e=Gl();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(wc(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(wc(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Cu.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,r;(null===(r=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===r?void 0:r.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(wc(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Su.get())};e()}}Cu.currentPopupAction=null;
1429
- /**
1430
- * @license
1431
- * Copyright 2020 Google LLC
1432
- *
1433
- * Licensed under the Apache License, Version 2.0 (the "License");
1434
- * you may not use this file except in compliance with the License.
1435
- * You may obtain a copy of the License at
1436
- *
1437
- * http://www.apache.org/licenses/LICENSE-2.0
1438
- *
1439
- * Unless required by applicable law or agreed to in writing, software
1440
- * distributed under the License is distributed on an "AS IS" BASIS,
1441
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1442
- * See the License for the specific language governing permissions and
1443
- * limitations under the License.
1444
- */
1445
- const Ru="pendingRedirect",Ou=new Map;class Au extends Tu{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Ou.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return rl(Ru,e.config.apiKey,e.name)}(t),n=function(e){return Zc(e._redirectPersistence)}(e);if(!(await n._isAvailable()))return!1;const i="true"===await n._get(r);return await n._remove(r),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(gh){e=()=>Promise.reject(gh)}Ou.set(this.auth._key(),e)}return this.bypassAuthState||Ou.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Pu(e,t){Ou.set(e._key(),t)}async function Nu(e,t,r=!1){const n=yl(e),i=
1446
- /**
1447
- * @license
1448
- * Copyright 2021 Google LLC
1449
- *
1450
- * Licensed under the Apache License, Version 2.0 (the "License");
1451
- * you may not use this file except in compliance with the License.
1452
- * You may obtain a copy of the License at
1453
- *
1454
- * http://www.apache.org/licenses/LICENSE-2.0
1455
- *
1456
- * Unless required by applicable law or agreed to in writing, software
1457
- * distributed under the License is distributed on an "AS IS" BASIS,
1458
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1459
- * See the License for the specific language governing permissions and
1460
- * limitations under the License.
1461
- */
1462
- function(e,t){return t?Zc(t):(Ec(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(n,t),o=new Au(n,i,r),s=await o.execute();return s&&!r&&(delete s.user._redirectEventId,await n._persistUserIfCurrent(s.user),await n._setRedirectUser(null,t)),s}
1463
- /**
1464
- * @license
1465
- * Copyright 2020 Google LLC
1466
- *
1467
- * Licensed under the Apache License, Version 2.0 (the "License");
1468
- * you may not use this file except in compliance with the License.
1469
- * You may obtain a copy of the License at
1470
- *
1471
- * http://www.apache.org/licenses/LICENSE-2.0
1472
- *
1473
- * Unless required by applicable law or agreed to in writing, software
1474
- * distributed under the License is distributed on an "AS IS" BASIS,
1475
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1476
- * See the License for the specific language governing permissions and
1477
- * limitations under the License.
1478
- */class xu{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Du(e);default:return!1}}
1479
- /**
1480
- * @license
1481
- * Copyright 2020 Google LLC
1482
- *
1483
- * Licensed under the Apache License, Version 2.0 (the "License");
1484
- * you may not use this file except in compliance with the License.
1485
- * You may obtain a copy of the License at
1486
- *
1487
- * http://www.apache.org/licenses/LICENSE-2.0
1488
- *
1489
- * Unless required by applicable law or agreed to in writing, software
1490
- * distributed under the License is distributed on an "AS IS" BASIS,
1491
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1492
- * See the License for the specific language governing permissions and
1493
- * limitations under the License.
1494
- */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!Du(e)){const n=(null===(r=e.error.code)||void 0===r?void 0:r.split("auth/")[1])||"internal-error";t.onError(wc(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Lu(e))}saveEventToCache(e){this.cachedEventUids.add(Lu(e)),this.lastProcessedEventTime=Date.now()}}function Lu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function Du({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
1495
- /**
1496
- * @license
1497
- * Copyright 2020 Google LLC
1498
- *
1499
- * Licensed under the Apache License, Version 2.0 (the "License");
1500
- * you may not use this file except in compliance with the License.
1501
- * You may obtain a copy of the License at
1502
- *
1503
- * http://www.apache.org/licenses/LICENSE-2.0
1504
- *
1505
- * Unless required by applicable law or agreed to in writing, software
1506
- * distributed under the License is distributed on an "AS IS" BASIS,
1507
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1508
- * See the License for the specific language governing permissions and
1509
- * limitations under the License.
1510
- */
1511
- const Mu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Uu=/^https?/;async function ju(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return Dc(e,"GET","/v1/projects",t)}(e);for(const n of t)try{if(Fu(n))return}catch(r){}yc(e,"unauthorized-domain")}function Fu(e){const t=Tc(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!Uu.test(r))return!1;if(Mu.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}
1512
- /**
1513
- * @license
1514
- * Copyright 2020 Google LLC.
1515
- *
1516
- * Licensed under the Apache License, Version 2.0 (the "License");
1517
- * you may not use this file except in compliance with the License.
1518
- * You may obtain a copy of the License at
1519
- *
1520
- * http://www.apache.org/licenses/LICENSE-2.0
1521
- *
1522
- * Unless required by applicable law or agreed to in writing, software
1523
- * distributed under the License is distributed on an "AS IS" BASIS,
1524
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1525
- * See the License for the specific language governing permissions and
1526
- * limitations under the License.
1527
- */const Bu=new Oc(3e4,6e4);function zu(){const e=Ql().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let r=0;r<e.CP.length;r++)e.CP[r]=null}let Hu=null;function Vu(e){return Hu=Hu||function(e){return new Promise(((t,r)=>{var n,i,o;function s(){zu(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{zu(),r(wc(e,"network-request-failed"))},timeout:Bu.get()})}if(null===(i=null===(n=Ql().gapi)||void 0===n?void 0:n.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=Ql().gapi)||void 0===o?void 0:o.load)){const t=El("iframefcb");return Ql()[t]=()=>{gapi.load?s():r(wc(e,"network-request-failed"))},bl(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>r(e)))}s()}})).catch((e=>{throw Hu=null,e}))}(e),Hu}
1528
- /**
1529
- * @license
1530
- * Copyright 2020 Google LLC.
1531
- *
1532
- * Licensed under the Apache License, Version 2.0 (the "License");
1533
- * you may not use this file except in compliance with the License.
1534
- * You may obtain a copy of the License at
1535
- *
1536
- * http://www.apache.org/licenses/LICENSE-2.0
1537
- *
1538
- * Unless required by applicable law or agreed to in writing, software
1539
- * distributed under the License is distributed on an "AS IS" BASIS,
1540
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1541
- * See the License for the specific language governing permissions and
1542
- * limitations under the License.
1543
- */const $u=new Oc(5e3,15e3),qu="__/auth/iframe",Wu="emulator/auth/iframe",Ku={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Ju=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Gu(e){const t=e.config;Ec(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?Ac(t,Wu):`https://${e.config.authDomain}/${qu}`,n={apiKey:t.apiKey,appName:e.name,v:qa},i=Ju.get(e.config.apiHost);i&&(n.eid=i);const o=e._getFrameworks();return o.length&&(n.fw=o.join(",")),`${r}?${ea(n).slice(1)}`}
1544
- /**
1545
- * @license
1546
- * Copyright 2020 Google LLC.
1547
- *
1548
- * Licensed under the Apache License, Version 2.0 (the "License");
1549
- * you may not use this file except in compliance with the License.
1550
- * You may obtain a copy of the License at
1551
- *
1552
- * http://www.apache.org/licenses/LICENSE-2.0
1553
- *
1554
- * Unless required by applicable law or agreed to in writing, software
1555
- * distributed under the License is distributed on an "AS IS" BASIS,
1556
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1557
- * See the License for the specific language governing permissions and
1558
- * limitations under the License.
1559
- */
1560
- const Yu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Qu{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(gh){}}}function Xu(e,t,r,n=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString();let a="";const c=Object.assign(Object.assign({},Yu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=Js().toLowerCase();r&&(a=al(l)?"_blank":r),ol(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=Js()){var t;return hl(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}
1561
- /**
1562
- * @license
1563
- * Copyright 2021 Google LLC
1564
- *
1565
- * Licensed under the Apache License, Version 2.0 (the "License");
1566
- * you may not use this file except in compliance with the License.
1567
- * You may obtain a copy of the License at
1568
- *
1569
- * http://www.apache.org/licenses/LICENSE-2.0
1570
- *
1571
- * Unless required by applicable law or agreed to in writing, software
1572
- * distributed under the License is distributed on an "AS IS" BASIS,
1573
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1574
- * See the License for the specific language governing permissions and
1575
- * limitations under the License.
1576
- */(t||"",a),new Qu(null);const d=window.open(t||"",a,u);Ec(d,e,"popup-blocked");try{d.focus()}catch(gh){}return new Qu(d)}const Zu="__/auth/handler",ed="emulator/auth/handler",td=encodeURIComponent("fac");async function rd(e,t,r,n,i,o){Ec(e.config.authDomain,e,"auth-domain-config-required"),Ec(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:qa,eventId:i};if(t instanceof Pl){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Nl){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const c=await e._getAppCheckToken(),l=c?`#${td}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Zu}`;return Ac(e,ed)}
1577
- /**
1578
- * @license
1579
- * Copyright 2020 Google LLC
1580
- *
1581
- * Licensed under the Apache License, Version 2.0 (the "License");
1582
- * you may not use this file except in compliance with the License.
1583
- * You may obtain a copy of the License at
1584
- *
1585
- * http://www.apache.org/licenses/LICENSE-2.0
1586
- *
1587
- * Unless required by applicable law or agreed to in writing, software
1588
- * distributed under the License is distributed on an "AS IS" BASIS,
1589
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1590
- * See the License for the specific language governing permissions and
1591
- * limitations under the License.
1592
- */(e)}?${ea(a).slice(1)}${l}`}const nd="webStorageSupport";const id=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Kl,this._completeRedirectFn=Nu,this._overrideRedirectResult=Pu}async _openPopup(e,t,r,n){var i;Ic(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Xu(e,await rd(e,t,r,Tc(),n),Gl())}async _openRedirect(e,t,r,n){await this._originValidation(e);return function(e){Ql().location.href=e}(await rd(e,t,r,Tc(),n)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(Ic(r,"If manager is not set, promise should be"),r)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch((()=>{delete this.eventManagers[t]})),r}async initAndGetManager(e){const t=await async function(e){const t=await Vu(e),r=Ql().gapi;return Ec(r,e,"internal-error"),t.open({where:document.body,url:Gu(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Ku,dontclear:!0},(t=>new Promise((async(r,n)=>{await t.restyle({setHideOnLeave:!1});const i=wc(e,"network-request-failed"),o=Ql().setTimeout((()=>{n(i)}),$u.get());function s(){Ql().clearTimeout(o),r(t)}t.ping(s).then(s,(()=>{n(i)}))}))))}(e),r=new xu(e);return t.register("authEvent",(t=>{Ec(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nd,{type:nd},(r=>{var n;const i=null===(n=null==r?void 0:r[0])||void 0===n?void 0:n[nd];void 0!==i&&t(!!i),yc(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=ju(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return fl()||sl()||hl()}};var od="@firebase/auth",sd="1.3.2";
1593
- /**
1594
- * @license
1595
- * Copyright 2020 Google LLC
1596
- *
1597
- * Licensed under the Apache License, Version 2.0 (the "License");
1598
- * you may not use this file except in compliance with the License.
1599
- * You may obtain a copy of the License at
1600
- *
1601
- * http://www.apache.org/licenses/LICENSE-2.0
1602
- *
1603
- * Unless required by applicable law or agreed to in writing, software
1604
- * distributed under the License is distributed on an "AS IS" BASIS,
1605
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1606
- * See the License for the specific language governing permissions and
1607
- * limitations under the License.
1608
- */
1609
- class ad{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Ec(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}
1610
- /**
1611
- * @license
1612
- * Copyright 2020 Google LLC
1613
- *
1614
- * Licensed under the Apache License, Version 2.0 (the "License");
1615
- * you may not use this file except in compliance with the License.
1616
- * You may obtain a copy of the License at
1617
- *
1618
- * http://www.apache.org/licenses/LICENSE-2.0
1619
- *
1620
- * Unless required by applicable law or agreed to in writing, software
1621
- * distributed under the License is distributed on an "AS IS" BASIS,
1622
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1623
- * See the License for the specific language governing permissions and
1624
- * limitations under the License.
1625
- */
1626
- /**
1627
- * @license
1628
- * Copyright 2021 Google LLC
1629
- *
1630
- * Licensed under the Apache License, Version 2.0 (the "License");
1631
- * you may not use this file except in compliance with the License.
1632
- * You may obtain a copy of the License at
1633
- *
1634
- * http://www.apache.org/licenses/LICENSE-2.0
1635
- *
1636
- * Unless required by applicable law or agreed to in writing, software
1637
- * distributed under the License is distributed on an "AS IS" BASIS,
1638
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1639
- * See the License for the specific language governing permissions and
1640
- * limitations under the License.
1641
- */
1642
- const cd=Ws("authIdTokenMaxAge")||300;let ld=null;function ud(e=function(e=Ma){const t=ja.get(e);if(!t&&e===Ma&&qs())return Wa();if(!t)throw Va.create("no-app",{appName:e});return t}()){const t=Ha(e,"auth");if(t.isInitialized())return t.getImmediate();const r=function(e,t){const r=Ha(e,"auth");if(r.isInitialized()){const e=r.getImmediate();if(Xs(r.getOptions(),null!=t?t:{}))return e;yc(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:id,persistence:[cu,ql,Kl]}),n=Ws("authTokenSyncURL");if(n){const e=(i=n,async e=>{const t=e&&await e.getIdTokenResult(),r=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>cd)return;const n=null==t?void 0:t.token;ld!==n&&(ld=n,await fetch(i,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});!function(e,t,r){na(e).beforeAuthStateChanged(t,r)}(r,e,(()=>e(r.currentUser))),function(e,t,r,n){na(e).onIdTokenChanged(t,r,n)}(r,(t=>e(t)))}var i;const o=(s="auth",null===(c=null===(a=$s())||void 0===a?void 0:a.emulatorHosts)||void 0===c?void 0:c[s]);var s,a,c;return o&&kl(r,`http://${o}`),r}var dd;dd="Browser",za(new ia("auth",((e,{options:t})=>{const r=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=r.options;Ec(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const a={apiKey:o,authDomain:s,clientPlatform:dd,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ml(dd)},c=new vl(r,n,i,a);return function(e,t){const r=(null==t?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(Zc);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(c,t),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,r)=>{e.getProvider("auth-internal").initialize()}))),za(new ia("auth-internal",(e=>{const t=yl(e.getProvider("auth").getImmediate());return new ad(t)}),"PRIVATE").setInstantiationMode("EXPLICIT")),Ka(od,sd,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(dd)),Ka(od,sd,"esm2017");var hd=(e=>(e.INVALID_PHONE_NUMBER="Mobile number is not a valid Australian mobile number",e.INVALID_RECAPTCHA="reCAPTCHA check failed",e.INVALID_ACCOUNT="User account does not exist",e.INVALID_OTP="Verification failed. Please try again.",e))(hd||{});
1643
- /**
1644
- * @license
1645
- * Copyright 2020 Google LLC
1646
- *
1647
- * Licensed under the Apache License, Version 2.0 (the "License");
1648
- * you may not use this file except in compliance with the License.
1649
- * You may obtain a copy of the License at
1650
- *
1651
- * http://www.apache.org/licenses/LICENSE-2.0
1652
- *
1653
- * Unless required by applicable law or agreed to in writing, software
1654
- * distributed under the License is distributed on an "AS IS" BASIS,
1655
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1656
- * See the License for the specific language governing permissions and
1657
- * limitations under the License.
1658
- */
1659
- Ka("firebase","10.5.2","app");let pd=null,fd=null;const md=()=>{if(!pd){if(!fd)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=Wa(fd);pd=ud(e),pd.setPersistence(tl)}return pd},gd=e=>{switch(e.code){case uc:return hd.INVALID_RECAPTCHA;case pc:case mc:return hd.INVALID_PHONE_NUMBER;case gc:return hd.INVALID_ACCOUNT;case hc:case dc:case fc:return hd.INVALID_OTP;default:throw e.message}},_d=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new vu(md(),e,{size:"invisible"}))},sendOtp:async e=>{if(!r.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new wu(md()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(gh){return t({state:"error",occuredWhen:"sending",error:gd(gh)}),!1}},verifyOtp:async e=>{if(!n.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const r=wu.credential(n.current,e);return await async function(e,t){return zl(yl(e),t)}(md(),r),t({state:"verified"}),!0}catch(gh){return t({state:"error",occuredWhen:"verifying",error:gd(gh)}),!1}},resendOtp:async()=>{if(!i.current||!r.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new wu(md()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(gh){return t({state:"error",occuredWhen:"resending",error:gd(gh)}),!1}}}},vd=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),yd=({children:e})=>{const t=_d();return $i(vd.Provider,{value:t,children:e})},wd=()=>Ie(vd),bd=f("div")`
1660
- ${()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"currentColor",borderLeftColor:"transparent",borderTopColor:"transparent"})}
1661
- `,Ed=f("button")`
1662
- ${()=>({display:"inline-flex",height:"1rem",alignItems:"center",justifyContent:"center",gap:"1rem",borderRadius:"0.375rem",borderWidth:"0px",paddingLeft:"0.5rem",paddingRight:"0.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(15 77 196 / var(--tw-text-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"}})}
1663
-
1664
- & > .span {
1665
- ${()=>({height:"1rem",width:"1rem"})}
1666
- }
1667
- `,kd=f("button")`
1668
- ${()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"1rem",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(46 102 247 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(225 241 255 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px"}})}
1669
-
1670
- height: 48px;
1671
- pointer-events: all !important;
1672
-
1673
- &:disabled {
1674
- ${()=>({"--tw-bg-opacity":"1",backgroundColor:"rgb(240 242 245 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(166 172 177 / var(--tw-text-opacity))"})}
1675
- cursor: not-allowed;
1676
- }
1677
-
1678
- &[data-loading='true'] {
1679
- ${()=>({borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(46 102 247 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"})}
1680
- cursor: not-allowed;
1681
- }
1682
- `,Id=({onClick:e,children:t})=>{const[r,n]=ge(!1);return $i(Ed,{onClick:async()=>{n(!0),await e().finally((()=>{n(!1)}))},children:[r&&$i(bd,{className:"span"}),t]})},Td=f("img")`
1683
- ${()=>({marginBottom:"3rem",alignSelf:"center"})}
1684
- min-width: 150px;
1685
- max-width: 200px;
1686
- `,Sd=f("div")`
1687
- ${()=>({marginBottom:"0.75rem",fontSize:"1.25rem",lineHeight:"1.75rem",fontWeight:"600"})}
1688
- `,Cd=f("div")`
1689
- ${()=>({marginBottom:"1rem"})}
1690
- `,Rd=f("input")`
1691
- ${()=>({maxHeight:"3.5rem",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(248 249 250 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem"})}
1692
- height: 48px;
1693
- transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s !important;
1694
- `,Od=f("div")`
1695
- ${()=>({marginBottom:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600"})}
1696
- `,Ad=f("div")`
1697
- ${()=>({display:"flex",alignItems:"center",justifyContent:"space-between"})}
1698
- `,Pd=f("input")`
1699
- ${()=>({marginLeft:"0px",marginRight:"0px",marginTop:"0px",marginBottom:"0px",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(248 249 250 / var(--tw-bg-opacity))",fontWeight:"600",caretColor:"transparent","& *::selection":{backgroundColor:"transparent"},"::selection":{backgroundColor:"transparent"}})}
1700
-
1701
- width: 48px;
1702
- height: 48px;
1703
- line-height: 48px;
1704
- text-align: center;
1705
- `,Nd=f("p")`
1706
- ${()=>({height:"2rem","--tw-text-opacity":"1",color:"rgb(213 39 18 / var(--tw-text-opacity))"})}
1707
- `,xd=f("div")`
1708
- ${()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"3rem"})}
1709
-
1710
- & > .spin {
1711
- ${()=>({height:"5rem",width:"5rem",borderWidth:"4px","--tw-text-opacity":"1",color:"rgb(46 102 247 / var(--tw-text-opacity))"})}
1712
- }
1713
- `,Ld=({onClick:e,disabled:t,children:r})=>{const n=we(!0),[i,o]=ge(!1);return ve((()=>()=>{n.current=!1}),[]),$i(kd,{onClick:()=>{o(!0),e().finally((()=>{n.current&&o(!1)}))},disabled:t,"data-loading":i,children:[i&&$i(bd,{}),r]})},Dd=/\D/g,Md=({onChangeText:e})=>{const t=ke((e=>{var t;(null==(t=e.key)?void 0:t.replace(Dd,""))||e.preventDefault()}),[]);return $i(Pd,{type:"text",maxLength:1,onKeyDown:t,onChange:t=>e(t.currentTarget.value),onCopy:e=>e.preventDefault(),onPaste:e=>e.preventDefault(),onDrag:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),onFocus:e=>e.currentTarget&&e.currentTarget.select()})},Ud=({onChangeText:e})=>{const t=we(""),r=we(Array(6).fill(null));ve((()=>{var e;const t=null==(e=r.current[0])?void 0:e.base;null==t||t.focus()}),[]);const n=ke(((n,i)=>{n&&(e=>{var t,n;const i=null==(t=r.current[e+1])?void 0:t.base;if(i)i.focus();else{const t=null==(n=r.current[e])?void 0:n.base;null==t||t.blur()}})(i);const o=t.current,s=o.substring(0,i)+n+o.substring(i+1);t.current=s,e(s)}),[e]);return $i(Ad,{children:Array(6).fill("").map(((e,t)=>$i(Md,{ref:e=>r.current[t]=e,onChangeText:e=>{n(e,t)}},t)))})},jd=()=>{const{authState:e,resendOtp:t,verifyOtp:r}=wd(),[n,i]=ge(""),o=Ee((()=>"error"!==e.state||"verifying"!==e.occuredWhen&&"resending"!==e.occuredWhen?void 0:e.error),[e]),s=t,a=ke((async()=>{await r(n)}),[r,n]);return $i(N,{children:[$i(Sd,{children:"Verify your mobile number"}),$i(Cd,{children:"Enter your 6 digit verification code"}),$i(Cd,{children:["Didn't receive a code?"," ",$i(Id,{onClick:s,children:$i(N,{children:"Resend"})})]}),$i(Ud,{onChangeText:i}),$i(Nd,{children:o}),$i(Ld,{disabled:!n,onClick:a,children:$i(N,{children:"Verify"})})]})},Fd=["+","Backspace","Delete",...[...Array(10).keys()].map(String)],Bd=e=>e.startsWith("+"),zd=e=>"0"===e||"04"===e.substring(0,2),Hd=()=>{const{authState:e,sendOtp:t}=wd(),[r,n]=ge(""),[i,o]=ge(""),s=Ee((()=>Bd(r)||zd(r)),[r]),a=ke((e=>{Fd.find((t=>t===e.key))||e.preventDefault()}),[]),c=ke((e=>{const t=(e=>e.replace(/ /g,""))(e.currentTarget.value),r=zd(t)?((e,t)=>{let r=0;return e.replace(/#/g,(()=>t[r++]??"")).trim()})("#### ### ### ### ### ### ###",t):t;n(r)}),[n]),l=ke((async()=>{const e=Bd(r)?r:`+61${r}`;await t(e)}),[t,r]);return ve((()=>{"error"===e.state&&"sending"===e.occuredWhen?o(e.error):o("")}),[e]),ve((()=>{o(r&&!s?hd.INVALID_PHONE_NUMBER:"")}),[r,s]),$i(N,{children:[$i(Sd,{children:"Enter your mobile number"}),$i(Cd,{children:"Connect your workplace to Flare using your personal mobile number"}),$i(Od,{children:"Mobile number"}),$i(Rd,{type:"tel",autoFocus:!0,placeholder:"0400 000 000","aria-label":"Mobile number",value:r,onInput:c,onKeyDown:a}),$i(Nd,{children:i}),$i(Ld,{onClick:l,disabled:!s,children:$i(N,{children:"Continue"})})]})},Vd=()=>$i(xd,{children:[$i(bd,{className:"spin"}),$i(Cd,{children:"Please wait while we process your information."})]}),$d="INVISIBLE_RECAPTCHA_VERIFIER_ID",qd=()=>{const{authState:e,init:t}=wd(),[r,n]=ge(0);return ve((()=>{t($d)}),[t]),ve((()=>{"sent"===e.state?n(1):"verifying"===e.state?n(2):"error"===e.state&&"verifying"===e.occuredWhen&&n(1)}),[e,n]),$i(N,{children:[$i(Td,{src:"https://www.flarehr.com/wp-content/uploads/2022/03/flare-logo.svg",alt:"Flare Logo"}),0===r&&$i(Hd,{}),1===r&&$i(jd,{}),2===r&&$i(Vd,{}),$i("div",{id:$d})]})},Wd=()=>$i(yd,{children:$i(qd,{})}),Kd=f("div")`
1714
- ${()=>({display:"flex",flexDirection:"column",justifyContent:"center",paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"3rem",paddingBottom:"3rem","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"})}
1715
- width: 500px;
1716
- height: 500px;
1717
- `,Jd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=md().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");Xr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await nn(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(gh){throw`[Link Workplace]: Error when requesting a workplace link: ${gh}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await on(t,e,n,r)}catch(gh){throw`[Link Workplace]: Error when trying to establish workplace link: ${gh}`}})(o,e),n(5);break;case 5:Ms()}}catch(gh){console.log(gh),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return $i(Kd,{children:[a&&$i(qi,{isActive:a}),1===r&&$i(Wd,{}),4===r&&$i(Ds,{}),5===r&&$i(Ps,{})]})};var Gd=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(Gd||{});const Yd=e=>$i("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[$i("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),$i("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),Qd=e=>{const[t,r]=ge(!1);return $i("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[$i("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"light"})})]})},Xd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return $i(N,{children:[$i("label",{className:"font-medium text-sm text-gray-900 text-left",children:$i("span",{children:t})}),$i("div",{className:"relative",children:[$i("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},Zd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return $i("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[$i("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"primary"})})]})},eh=({className:e,children:t})=>$i("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),th=({className:e,children:t})=>$i("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),rh=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var nh=Object.defineProperty,ih=(e,t,r)=>(((e,t,r)=>{t in e?nh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let oh=new class{constructor(){ih(this,"current",this.detect()),ih(this,"handoffState","pending"),ih(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},sh=(e,t)=>{oh.isServer?ve(e,t):ye(e,t)};function ah(e){let t=we(e);return sh((()=>{t.current=e}),[e]),t}function ch(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=ch();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function lh(){let[e]=ge(ch);return ve((()=>()=>e.dispose()),[e]),e}let uh=function(e){let t=ah(e);return ts.useCallback(((...e)=>t.current(...e)),[t])};function dh(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in rs&&rs.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(oh.isHandoffComplete);return t&&!1===oh.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>oh.handoff()),[]),!e&&t}function hh(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hh),n}let ph=Symbol();function fh(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=uh((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ph])))?void 0:r}function mh(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var gh,_h,vh=((_h=vh||{})[_h.None=0]="None",_h[_h.RenderStrategy=1]="RenderStrategy",_h[_h.Static=2]="Static",_h),yh=((gh=yh||{})[gh.Unmount=0]="Unmount",gh[gh.Hidden=1]="Hidden",gh);function wh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Eh(t,e);if(o)return bh(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return bh(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return hh(e?0:1,{0:()=>null,1:()=>bh({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return bh(a,r,n,s)}function bh(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Th(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys(Ih(a)).length>0){if(!zo(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>mh(null==e?void 0:e.className(...t),a.className):mh(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return Vo(l,Object.assign({},Eh(l.props,Ih(Th(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},Th(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Eh(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function kh(e){var t;return Object.assign(so(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ih(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Th(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Sh=re(null);Sh.displayName="OpenClosedContext";var Ch=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ch||{});function Rh(){return Ie(Sh)}function Oh({value:e,children:t}){return ts.createElement(Sh.Provider,{value:e},t)}function Ah(){let e=we(!1);return sh((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ph(e,...t){e&&t.length>0&&e.classList.add(...t)}function Nh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function xh(e,t,r,n){let i=r?"enter":"leave",o=ch(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=hh(i,{enter:()=>t.enter,leave:()=>t.leave}),c=hh(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=hh(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Nh(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ph(e,...t.base,...a,...l),o.nextFrame((()=>{Nh(e,...t.base,...a,...l),Ph(e,...t.base,...a,...c),function(e,t){let r=ch();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Nh(e,...t.base,...a),Ph(e,...t.base,...t.entered),s())))})),o.dispose}function Lh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Dh=re(null);Dh.displayName="TransitionContext";var Mh,Uh=((Mh=Uh||{}).Visible="visible",Mh.Hidden="hidden",Mh);let jh=re(null);function Fh(e){return"children"in e?Fh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Bh(e,t){let r=ah(e),n=we([]),i=Ah(),o=lh(),s=uh(((e,t=yh.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(hh(t,{[yh.Unmount](){n.current.splice(s,1)},[yh.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!Fh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=uh((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,yh.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=uh(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=uh(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function zh(){}jh.displayName="NestingContext";let Hh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Vh(e){var t;let r={};for(let n of Hh)r[n]=null!=(t=e[n])?t:zh;return r}let $h=vh.RenderStrategy;let qh=kh((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=fh(s,t);dh();let c=Rh();if(void 0===r&&null!==c&&(r=(c&Ch.Open)===Ch.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=Bh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);sh((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(Fh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=uh((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=uh((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return ts.createElement(jh.Provider,{value:d},ts.createElement(Dh.Provider,{value:m},wh({ourProps:{...g,as:N,children:ts.createElement(Wh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:$h,visible:"visible"===l,name:"Transition"})))})),Wh=kh((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=fh(g,t),v=null==(r=m.unmount)||r?yh.Unmount:yh.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Dh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(jh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:S}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===yh.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):hh(E,{hidden:()=>S(g),visible:()=>T(g)})}),[E,g,T,S,y,v]);let C=ah({base:Lh(m.className),enter:Lh(c),enterFrom:Lh(l),enterTo:Lh(u),entered:Lh(d),leave:Lh(h),leaveFrom:Lh(p),leaveTo:Lh(f)}),R=function(e){let t=we(Vh(e));return ve((()=>{t.current=Vh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=dh();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Ah(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=uh((e=>hh(e,{enter:()=>{N.addFlag(Ch.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Ch.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=uh((e=>hh(e,{enter:()=>{N.removeFlag(Ch.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Ch.Closing),R.current.afterLeave()},idle:()=>{}}))),D=Bh((()=>{k("hidden"),S(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Ah(),a=lh(),c=ah(r);sh((()=>{e&&(c.current="enter")}),[e]),sh((()=>{let e=ch();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(xh(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:C,direction:P,onStart:ah((e=>{D.onStart(g,e,x)})),onStop:ah((e=>{D.onStop(g,e,L),"leave"===e&&!Fh(D)&&(k("hidden"),S(g))}))});let M=m,U={ref:_};return A?M={...M,className:mh(m.className,...C.current.enter,...C.current.enterFrom)}:(M.className=mh(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),ts.createElement(jh.Provider,{value:D},ts.createElement(Oh,{value:hh(E,{visible:Ch.Open,hidden:Ch.Closed})|N.flags},wh({ourProps:U,theirProps:M,defaultTag:"div",features:$h,visible:"visible"===E,name:"Transition.Child"})))})),Kh=kh((function(e,t){let r=null!==Ie(Dh),n=null!==Rh();return ts.createElement(ts.Fragment,null,!r&&n?ts.createElement(qh,{ref:t,...e}):ts.createElement(Wh,{ref:t,...e}))})),Jh=Object.assign(qh,{Child:Kh,Root:qh});const Gh=({children:e})=>{const t=ts.Children.toArray(e),r=t.find((e=>e.type===Yh)),n=t.find((e=>e.type===Qh));return $i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:$i("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[$i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&$i("div",{className:"flex items-center h-full",children:r})}),$i(Jh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&$i("div",{className:"flex items-center h-full",children:n})})]})})},Yh=({children:e})=>$i(N,{children:e}),Qh=({children:e})=>$i(N,{children:e});Gh.Top=Yh,Gh.Bottom=Qh;const Xh={verfiedPhoneNumber:void 0},Zh=re(Xh),ep=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),tp=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:rh},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(Zh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?$i("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",$i("span",{className:"ml-1",children:$i(ep,{})})]}):void 0;return $i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Join your workplace benefits program"}),$i(th,{children:[a?"Confirm ":"Enter "," your ",$i("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&$i("div",{className:"h-8 leading-none",children:$i("span",{className:"text-xs text-rose-500",children:n})}),a&&$i("div",{className:"mt-2 ml-2 mb-2 leading-none",children:$i("span",{className:"text-xs",children:["Not your personal number?",$i(Zd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),$i("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),$i(Qd,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},rp=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),np=({children:e,...t})=>$i("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),ip=({open:e})=>$i(np,{open:e,children:$i("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[$i("span",{className:"animate-spin",children:$i(Yd,{size:"lg"})}),$i(eh,{children:"Creating your account"}),$i("div",{children:[$i(th,{children:"This can take up to 30 seconds."}),$i(th,{children:"Please don't navigate away or refresh your browser."})]})]})}),op=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return $i(N,{children:[$i(ip,{open:s}),$i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Verify your mobile number"}),$i(th,{children:["An SMS verification code has been sent to the number"," ",$i("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&$i("span",{className:"text-xs text-rose-500",children:c}),$i("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",$i(Zd,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&$i(N,{children:["in ",u," secs"]})]}),$i(Qd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),$i(Qd,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:$i("span",{className:"flex gap-3",children:[$i(rp,{}),"Back"]})})]})})]})]})},sp=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(Gd.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return $i(N,{children:[a===Gd.PHONE_NUMBER&&$i(tp,{onSubmit:u,onDecline:i}),a===Gd.OTP&&$i(op,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},ap=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let cp;const lp=()=>cp;var up=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(up||{});const dp=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw up[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},hp=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>lp().post("v2.0/auth/signUp",{mobileNumber:e,source:t,channel:r}).catch((e=>(dp(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async(e,t="Invite",r="invite")=>{await lp().post("auth/verify",{otp:e,source:t,channel:r}).catch(dp)},resendOtp:async()=>{await lp().post("auth/resend").catch(dp)}},s=()=>{r(!0),Ms()};return t?$i(Ps,{}):$i(N,{children:$i("div",{className:"font-inter",children:[$i("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.pr-3{padding-right:.75rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),$i(sp,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},pp=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),fp=async(e,t)=>{await(async e=>{if(tn)return tn;const t=e.replace(/\/?$/,"");return tn=Qr.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(tn,{onRequestError:Zr,onResponseError:en}),tn})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.get("customer-profile/backend/v1.0/workplace-link/config",rn(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);fd=r;const s=e.backendUrl;var a,c;return a=s,c=e.apolloAccessToken,a=a.replace(/\/?$/,""),cp=Qr.create({baseURL:`${a}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${c}`}}),cp.interceptors.response.use((e=>e),ap),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function mp(){return(mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var gp=["context","children"];function _p(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,gp);return te(t,r)}function vp(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(_p,mp({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[yp(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Ep,{name:l},c):n[o]=c}var u=r?O(Ep,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function yp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function wp(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[yp(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function bp(){Z(this._vdom=null,this._root)}function Ep(e,t){var r=this;return O("slot",mp({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=vp,i.prototype.attributeChangedCallback=wp,i.prototype.disconnectedCallback=bp,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing"),[a,c]=ge(Xh);return Xr((async e=>{if(t.backendUrl)try{const r=await fp(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?$i(Ps,{}):$i(N,{children:["Initializing"===o&&$i(qi,{isActive:!0}),"Error"===o&&$i(Ds,{}),"Initialized"===o&&$i("div",{id:"preact_root",children:[$i(Fi,{}),$i(pp,{children:["google"===i.current&&$i(Jd,{...t}),"adb2c"===i.current&&$i(Us,{...t}),$i(Zh.Provider,{value:a,children:"flare-app-identity"===i.current&&$i(hp,{...t})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
108
+ `,ma=()=>rn(ha,{children:[rn(pa,{src:fa}),rn("h1",{children:"Something went wrong!"}),rn("p",{children:"We’re having some difficulties."}),rn("p",{children:"Please try again shortly."})]}),_a=async(e,t)=>{await(async e=>{if(Qr)return Qr;const t=e.replace(/\/?$/,"");return Qr=Yr.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:o})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw o&&await o(e),e}))})(Qr,{onRequestError:Kr,onResponseError:Jr}),Qr})(e.backendUrl);const{isEstablished:r,verifiedPhoneNumber:n}=await(async(e,t)=>{if(!Qr)throw new Error("Api has not been initialized");return Qr.get("customer-profile/backend/v1.0/workplace-link/config",((e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}))(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);return((e,t,r="Invite",n="invite")=>{e=e.replace(/\/?$/,""),bi=Yr.create({baseURL:`${e}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${t}`}}),bi.interceptors.request.use((e=>(e.params={...e.params??{},source:r,channel:n},e))),bi.interceptors.response.use((e=>e),vi)})(e.backendUrl,e.apolloAccessToken),{isEstablished:r,verifiedPhoneNumber:n}};!function(n,o,i,a){l.p=o,e=n,t=i,r=a}(O);function ga(){return(ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var ya=["context","children"];function va(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t.indexOf(r=i[n])>=0||(o[r]=e[r]);return o}(e,ya);return ee(t,r)}function ba(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(va,ga({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],o={},i=0,a=t.attributes,s=t.childNodes;for(i=a.length;i--;)"slot"!==a[i].name&&(o[a[i].name]=a[i].value,o[wa(a[i].name)]=a[i].value);for(i=s.length;i--;){var l=e(s[i],null),c=s[i].slot;c?o[c]=O(Ca,{name:c},l):n[i]=l}var u=r?O(Ca,null,n):n;return O(r||t.nodeName.toLowerCase(),o,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Z:X)(this._vdom,this._root)}function wa(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Ea(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[wa(e)]=r,this._vdom=ee(this._vdom,n),X(this._vdom,this._root)}}function xa(){X(this._vdom=null,this._root)}function Ca(e,t){var r=this;return O("slot",ga({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=ba,o.prototype.attributeChangedCallback=Ea,o.prototype.disconnectedCallback=xa,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=r,r.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,o)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=me(!1),[o,i]=me("Initializing"),[a,s]=me(ui);var l,c;return l=async e=>{if(t.backendUrl)try{const r=await _a(t,e);n(r.isEstablished),i("Initialized"),s({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{i("Error")}},ge((()=>{const e=Yr.CancelToken.source();return l(e),()=>{c&&c(),e.cancel()}}),[t.backendUrl]),r?rn(aa,{}):rn(A,{children:["Initializing"===o&&rn(da,{isActive:!0}),"Error"===o&&rn(ma,{}),"Initialized"===o&&rn("div",{id:"preact_root",children:[rn(Xr,{}),rn(la,{children:rn(di.Provider,{value:a,children:rn(sa,{})})})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});