@flarehr/apollo-customer-workplace-link 1.49.36057 → 1.50.38513

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 +75 -75
  2. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- let e,t,n,r={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||r,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+s+";":r+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?r+=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 n+(t&&i?t+"{"+i+"}":i)+r},l={},u=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+u(e[n]);return t}return e},d=(e,t,n,r,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,n,r=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?r.shift():t[3]?(n=t[3].replace(a," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(a," ").trim();return r[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,n?"":"."+h)}let p=n&&l.g?l.g:null;return n&&(l.g=l[h]),f=l[h],m=t,g=r,(_=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,n)=>e.reduce(((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),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+r+(null==o?"":o)}),"");function p(e){let t=this||{},n=e.call?e(t.p):e;return d(n.unshift?n.raw?h(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,i(t.target),t.g,t.o,t.k)}function f(r,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=r;return r[0]&&(h=u.as||r,delete u.as),n&&h[0]&&n(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,C=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,r,i,null)}function A(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__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 n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__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,n,r,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,r=void 0,i=void 0,o=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=S({},s)).__v=s.__v+1,G(c,s,o,n.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,r,null==a?L(s):a,s.__h,i),J(r,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,n,r,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=r&&r.__k||I,E=b.length,T=E,S=t.length;for(n.__k=[],d=0;d<S;d++)null!=(f=n.__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):C(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.__=n,f.__b=n.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),G(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>S-_?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 n.type&&(n.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=r,c=L(p)),Q(p,p,!1),b[d]=null);for(n.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof n.type&&null!=b[d].__e&&b[d].__e==n.__d&&(n.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?F(r,t,n):z(n,r.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(C(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,n){return null==n||n.parentNode!==e?e.insertBefore(t,null):t==n&&null!=t.parentNode||e.insertBefore(t,n),t.nextSibling}function H(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(null===c||c&&i==c.key&&o===c.type)return n;if(r>(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,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||T.test(t)?n:n+"px"}function q(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||V(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||V(e.style,t,n[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]=n,n?r?n.u=r.u:(n.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==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}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 G(e,t,n,r,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!=n.__h&&(c=n.__h,a=t.__e=n.__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)&&r[u.__c],b=u?w?w.props.value:u.__:r,n.__c?v=(d=t.__c=n.__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=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=S({},d.__s)),S(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===n.__v)){for(t.__v!==n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__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&&(r=S(S({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,C(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,n,r,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,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a,c){var l,u,d,h=n.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=n.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,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||q(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||q(e,o,t[o],n[o],r)}(e,p,h,i,a),d)t.__k=[];else if(j(e,C(g=t.props.children)?g:[g],t,n,r,i&&"foreignObject"!==f,o,s,o?o[0]:n.__k&&L(n,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}(n.__e,t,n,r,i,o,s,c,l);(u=g.diffed)&&u(t)}function J(e,t,n){for(var r=0;r<n.length;r++)Y(n[r],n[++r],n[++r]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(n){g.__e(n,t.__v)}}))}function Y(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(r){g.__e(r,n)}}function Q(e,t,n){var r,i;if(g.unmount&&g.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Y(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){g.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Q(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function Z(e,t,n){var r,i,o,s;g.__&&g.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],s=[],G(t,e=(!r&&n||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?m.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),J(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,n){var r,i,o,s,a=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=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):n),A(e.type,a,r||e.key,i||e.ref,null)}function ne(e,t){var n={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}m=I.slice,g={__e:function(e,t,n,r){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,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=S({},this.state),"function"==typeof e&&(e=e(S({},n),this.props)),e&&S(n,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 re,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 n=ie.__H||(ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:le}),n.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,n){var r=me(re++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);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&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},ie.shouldComponentUpdate=i}return r.__N||r.__}function ve(e,t){var n=me(re++,3);!g.__s&&Ne(n.__H,t)&&(n.__=e,n.i=t,ie.__H.__h.push(n))}function ye(e,t){var n=me(re++,4);!g.__s&&Ne(n.__H,t)&&(n.__=e,n.i=t,ie.__h.push(n))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,n){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==n?n:n.concat(e))}function Ee(e,t){var n=me(re++,7);return Ne(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],n=me(re++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Ce(){var e=me(re++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Se(){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(eh){e.__H.__h=[],g.__e(eh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),re=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=[],re=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)(Se)),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(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(n,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ae(e)}catch(n){t=n}})),n.__H=void 0,t&&g.__e(t,n.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,n=function(){clearTimeout(r),Re&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Re&&(t=requestAnimationFrame(n))}function Ae(e){var t=ie,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),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,n){return t!==e[n]}))}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 n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(n){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new Le(`Invalid token specified: missing part #${n+1}`);let i;try{i=De(r)}catch(Ld){throw new Le(`Invalid token specified: invalid base64 for part #${n+1} (${Ld.message})`)}try{return JSON.parse(i)}catch(Ld){throw new Le(`Invalid token specified: invalid json for part #${n+1} (${Ld.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"),Ge=Ve("function"),Je=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"),nt=He("URLSearchParams");function rt(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),$e(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(r=0;r<o;r++)s=i[r],t.call(null,e[s],s,e)}}function it(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!qe(e)&&e!==ot;const at=(ct="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ct&&e instanceof ct);var ct;const lt=He("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dt=He("RegExp"),ht=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};rt(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},pt="abcdefghijklmnopqrstuvwxyz",ft="0123456789",mt={DIGIT:ft,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ft};const gt=He("AsyncFunction"),_t={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Ge(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ge(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Ge(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:Je,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:dt,isFunction:Ge,isStream:e=>Ye(e)&&Ge(e.pipe),isURLSearchParams:nt,isTypedArray:at,isFileList:tt,forEach:rt,merge:function e(){const{caseless:t}=st(this)&&this||{},n={},r=(r,i)=>{const o=t&&it(n,i)||i;Qe(n[o])&&Qe(r)?n[o]=e(n[o],r):Qe(r)?n[o]=e({},r):$e(r)?n[o]=r.slice():n[o]=r};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&rt(arguments[i],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(rt(t,((t,r)=>{n&&Ge(t)?e[r]=Ue(t,n):e[r]=t}),{allOwnKeys:r}),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,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{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],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Fe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Je(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:lt,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ht,freezeMethods:e=>{ht(e,((t,n)=>{if(Ge(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ge(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return $e(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:it,global:ot,isContextDefined:st,ALPHABET:mt,generateString:(e=16,t=mt.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ge(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=$e(e)?[]:{};return rt(e,((e,t)=>{const o=n(e,r+1);!qe(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:gt,isThenable:e=>e&&(Ye(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch)};function vt(e,t,n,r,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),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}_t.inherits(vt,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:_t.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=vt.prototype,wt={};["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=>{wt[e]={value:e}})),Object.defineProperties(vt,wt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=(e,t,n,r,i,o)=>{const s=Object.create(yt);return _t.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),vt.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function bt(e){return _t.isPlainObject(e)||_t.isArray(e)}function Et(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,n){return e?e.concat(t).map((function(e,t){return e=Et(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const It=_t.toFlatObject(_t,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,n){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=_t.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_t.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_t.isDate(e))return e.toISOString();if(!a&&_t.isBlob(e))throw new vt("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(e)||_t.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(_t.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(_t.isArray(e)&&function(e){return _t.isArray(e)&&!e.some(bt)}(e)||(_t.isFileList(e)||_t.endsWith(n,"[]"))&&(a=_t.toArray(e)))return n=Et(n),a.forEach((function(e,r){!_t.isUndefined(e)&&null!==e&&t.append(!0===s?kt([n],r,o):null===s?n:n+"[]",c(e))})),!1;return!!bt(e)||(t.append(kt(i,n,o),c(e)),!1)}const u=[],d=Object.assign(It,{defaultVisitor:l,convertValue:c,isVisitable:bt});if(!_t.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!_t.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),_t.forEach(n,(function(n,o){!0===(!(_t.isUndefined(n)||null===n)&&i.call(t,n,_t.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function St(e,t){this._pairs=[],e&&Tt(e,this,t)}const Rt=St.prototype;function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,n){if(!t)return e;const r=n&&n.encode||Ot,i=n&&n.serialize;let o;if(o=i?i(t,n):_t.isURLSearchParams(t)?t.toString():new St(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Pt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_t.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:St,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Lt(e){function t(e,n,r,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&_t.isArray(r)?r.length:o,a)return _t.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&_t.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&_t.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s}if(_t.isFormData(e)&&_t.isFunction(e.entries)){const n={};return _t.forEachEntry(e,((e,r)=>{t(function(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Dt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=_t.isObject(e);i&&_t.isHTMLForm(e)&&(e=new FormData(e));if(_t.isFormData(e))return r&&r?JSON.stringify(Lt(e)):e;if(_t.isArrayBuffer(e)||_t.isBuffer(e)||_t.isStream(e)||_t.isFile(e)||_t.isBlob(e))return e;if(_t.isArrayBufferView(e))return e.buffer;if(_t.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tt(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return xt.isNode&&_t.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=_t.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(Ld){if("SyntaxError"!==Ld.name)throw Ld}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&_t.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(Ld){if(n){if("SyntaxError"===Ld.name)throw vt.from(Ld,vt.ERR_BAD_RESPONSE,this,null,this.response);throw Ld}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],(e=>{Dt.headers[e]={}}));const Mt=Dt,Ut=_t.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"]),jt=Symbol("internals");function Ft(e){return e&&String(e).trim().toLowerCase()}function Bt(e){return!1===e||null==e?e:_t.isArray(e)?e.map(Bt):String(e)}function zt(e,t,n,r,i){return _t.isFunction(r)?r.call(this,t,n):(i&&(t=n),_t.isString(t)?_t.isString(r)?-1!==t.indexOf(r):_t.isRegExp(r)?r.test(t):void 0:void 0)}class Ht{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Ft(t);if(!i)throw new Error("header name must be a non-empty string");const o=_t.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Bt(e))}const o=(e,t)=>_t.forEach(e,((e,n)=>i(e,n,t)));return _t.isPlainObject(e)||e instanceof this.constructor?o(e,t):_t.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ut[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=Ft(e)){const n=_t.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(_t.isFunction(t))return t.call(this,e,n);if(_t.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ft(e)){const n=_t.findKey(this,e);return!(!n||void 0===this[n]||t&&!zt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Ft(e)){const i=_t.findKey(n,e);!i||t&&!zt(0,n[i],i,t)||(delete n[i],r=!0)}}return _t.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!zt(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return _t.forEach(this,((r,i)=>{const o=_t.findKey(n,i);if(o)return t[o]=Bt(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Bt(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _t.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&_t.isArray(n)?n.join(", "):n)})),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 n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[jt]=this[jt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ft(e);t[r]||(!function(e,t){const n=_t.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return _t.isArray(e)?e.forEach(r):r(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_t.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),_t.freezeMethods(Ht);const Vt=Ht;function $t(e,t){const n=this||Mt,r=t||n,i=Vt.from(r.headers);let o=r.data;return _t.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qt(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,n){vt.call(this,null==e?"canceled":e,vt.ERR_CANCELED,t,n),this.name="CanceledError"}_t.inherits(Wt,vt,{__CANCEL__:!0});const Kt=xt.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),_t.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),_t.isString(r)&&s.push("path="+r),_t.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Gt(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 Jt=xt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{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 n=r(window.location.href),function(e){const t=_t.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Yt(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];i||(i=c),n[o]=a,r[o]=c;let u=s,d=0;for(;u!==o;)d+=n[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 i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a);n=o;const l={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:i};l[t?"download":"upload"]=!0,e(l)}}const Qt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=Vt.from(e.headers).normalize(),o=e.responseType;let s,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_t.isFormData(r)&&(xt.isStandardBrowserEnv||xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?_t.isString(a=i.getContentType())&&i.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const u=Gt(e.baseURL,e.url);function d(){if(!l)return;const r=Vt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new vt("Request failed with status code "+n.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),At(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new vt("Request aborted",vt.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new vt("Network Error",vt.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new vt(t,r.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,l)),l=null},xt.isStandardBrowserEnv){const t=Jt(u)&&e.xsrfCookieName&&Kt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&_t.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),_t.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Yt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Yt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new Wt(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);h&&-1===xt.protocols.indexOf(h)?n(new vt("Unsupported protocol "+h+":",vt.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};_t.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Ld){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`,Zt=e=>_t.isFunction(e)||null===e||!1===e,en=e=>{e=_t.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Zt(n)&&(r=Qt[(t=String(n)).toLowerCase()],void 0===r))throw new vt(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+o]=r}if(!r){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 vt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function nn(e){tn(e),e.headers=Vt.from(e.headers),e.data=$t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return en(e.adapter||Mt.adapter)(e).then((function(t){return tn(e),t.data=$t.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return qt(t)||(tn(e),t&&t.response&&(t.response.data=$t.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}const rn=e=>e instanceof Vt?e.toJSON():e;function on(e,t){t=t||{};const n={};function r(e,t,n){return _t.isPlainObject(e)&&_t.isPlainObject(t)?_t.merge.call({caseless:n},e,t):_t.isPlainObject(t)?_t.merge({},t):_t.isArray(t)?t.slice():t}function i(e,t,n){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!_t.isUndefined(t))return r(void 0,t)}function s(e,t){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials: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(rn(e),rn(t),!0)};return _t.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=c[r]||i,s=o(e[r],t[r],r);_t.isUndefined(s)&&o!==a||(n[r]=s)})),n}const sn="1.6.0",an={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{an[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const cn={};an.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new vt(r(i," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!cn[i]&&(cn[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const ln={assertOptions:function(e,t,n){if("object"!=typeof e)throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new vt("option "+o+" must be "+n,vt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new vt("Unknown option "+o,vt.ERR_BAD_OPTION)}},validators:an},un=ln.validators;class dn{constructor(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=on(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ln.assertOptions(n,{silentJSONParsing:un.transitional(un.boolean),forcedJSONParsing:un.transitional(un.boolean),clarifyTimeoutError:un.transitional(un.boolean)},!1),null!=r&&(_t.isFunction(r)?t.paramsSerializer={serialize:r}:ln.assertOptions(r,{encode:un.function,serialize:un.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&_t.merge(i.common,i[t.method]);i&&_t.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Vt.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=[nn.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=nn.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 At(Gt((e=on(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}_t.forEach(["delete","get","head","options"],(function(e){dn.prototype[e]=function(t,n){return this.request(on(n||{},{method:e,url:t,data:(n||{}).data}))}})),_t.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(on(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}dn.prototype[e]=t(),dn.prototype[e+"Form"]=t(!0)}));const hn=dn;class pn{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 n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Wt(e,r,i),t(n.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 pn((function(t){e=t})),cancel:e}}}const fn=pn;const mn={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(mn).forEach((([e,t])=>{mn[t]=e}));const gn=mn;const _n=function e(t){const n=new hn(t),r=Ue(hn.prototype.request,n);return _t.extend(r,hn.prototype,n,{allOwnKeys:!0}),_t.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(on(t,n))},r}(Mt);_n.Axios=hn,_n.CanceledError=Wt,_n.CancelToken=fn,_n.isCancel=qt,_n.VERSION=sn,_n.toFormData=Tt,_n.AxiosError=vt,_n.Cancel=_n.CanceledError,_n.all=function(e){return Promise.all(e)},_n.spread=function(e){return function(t){return e.apply(null,t)}},_n.isAxiosError=function(e){return _t.isObject(e)&&!0===e.isAxiosError},_n.mergeConfig=on,_n.AxiosHeaders=Vt,_n.formToJSON=e=>Lt(_t.isHTMLForm(e)?new FormData(e):e),_n.getAdapter=en,_n.HttpStatusCode=gn,_n.default=_n;const vn=_n,yn=(e,t,n)=>{ve((()=>{const t=vn.CancelToken.source();return e(t),()=>{n&&n(),t.cancel()}}),t)},wn=({request:e})=>console.error("[API] Request error:",e),bn=({response:e})=>{if(e){const{status:t,request:n,data:r}=e;console.error("[API] Response error:",t,n.responseURL,JSON.stringify(r))}};let En;const kn=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),In=async(e,t)=>{if(!En)throw new Error("Api has not been initialized");return En.post("customer-profile/backend/v1.0/workplace-link",{},kn(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},Tn=(e,t,n,r)=>{if(!En)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:n};return En.post("customer-profile/customer-backend/v1.0/workplace-link",i,kn(e,r))};for(var Cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Sn={},Rn={},On={byteLength:function(e){var t=Dn(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=Dn(e),i=r[0],o=r[1],s=new Nn(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),a=0,c=o>0?i-4:i;for(n=0;n<c;n+=4)t=Pn[e.charCodeAt(n)]<<18|Pn[e.charCodeAt(n+1)]<<12|Pn[e.charCodeAt(n+2)]<<6|Pn[e.charCodeAt(n+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=Pn[e.charCodeAt(n)]<<2|Pn[e.charCodeAt(n+1)]>>4,s[a++]=255&t);1===o&&(t=Pn[e.charCodeAt(n)]<<10|Pn[e.charCodeAt(n+1)]<<4|Pn[e.charCodeAt(n+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(Mn(e,s,s+o>a?a:s+o));1===r?(t=e[n-1],i.push(An[t>>2]+An[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(An[t>>10]+An[t>>4&63]+An[t<<2&63]+"="));return i.join("")}},An=[],Pn=[],Nn="undefined"!=typeof Uint8Array?Uint8Array:Array,xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ln=0;Ln<64;++Ln)An[Ln]=xn[Ln],Pn[xn.charCodeAt(Ln)]=Ln;function Dn(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function Mn(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(An[(i=r)>>18&63]+An[i>>12&63]+An[i>>6&63]+An[63&i]);return o.join("")}Pn["-".charCodeAt(0)]=62,Pn["_".charCodeAt(0)]=63;var Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.AppAuthError=void 0;var jn=function(e,t){this.message=e,this.extras=t};Un.AppAuthError=jn,Object.defineProperty(Rn,"__esModule",{value:!0});var Fn=Rn.DefaultCrypto=Rn.textEncodeLite=Rn.urlSafe=Rn.bufferToString=void 0,Bn=On,zn=Un,Hn="undefined"!=typeof window&&!!window.crypto,Vn=Hn&&!!window.crypto.subtle,$n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function qn(e){for(var t=[],n=0;n<e.byteLength;n+=1){var r=e[n]%62;t.push($n[r])}return t.join("")}function Wn(e){return Bn.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kn(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}Rn.bufferToString=qn,Rn.urlSafe=Wn,Rn.textEncodeLite=Kn;var Gn=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(Hn)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=62*Math.random()|0;return qn(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new zn.AppAuthError("Invalid code length.")):Vn?new Promise((function(t,n){crypto.subtle.digest("SHA-256",Kn(e)).then((function(e){return t(Wn(new Uint8Array(e)))}),(function(e){return n(e)}))})):Promise.reject(new zn.AppAuthError("window.crypto.subtle is unavailable."))},e}();Fn=Rn.DefaultCrypto=Gn;var Jn={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.IS_PROFILE=Yn.IS_LOG=void 0,Yn.IS_LOG=!0,Yn.IS_PROFILE=!1;var Qn=Cn&&Cn.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.profile=Jn.log=void 0;var Xn=Yn;function Zn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Xn.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Qn([e],t)):console.log(e))}Jn.log=Zn;var er="undefined"!=typeof window&&!!window.performance&&!!console.profile;Jn.profile=function(e,t,n){return Xn.IS_PROFILE?function(e,t,n){var r=n.value,i=r.name;i||(i="anonymous function");n.value=er?function(e){console.profile(i);var t=window.performance.now(),n=r.call.apply(r,Qn([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),n}:function(e){Zn("Profile start "+i);var t=Date.now(),n=r.call.apply(r,Qn([this||window],e)),o=Date.now()-t;return Zn("Profile end "+i+" took "+o+" ms."),n};return n}(0,0,n):n},Object.defineProperty(Sn,"__esModule",{value:!0});var tr=Sn.AuthorizationRequest=void 0,nr=Rn,rr=Jn,ir=function(){function e(t,n,r){void 0===n&&(n=new nr.DefaultCrypto),void 0===r&&(r=!0),this.crypto=n,this.usePkce=r,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)}(n),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){rr.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(n){n&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=n,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}();tr=Sn.AuthorizationRequest=ir;var or={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=Jn,n=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,n){this.listener&&this.listener(e,t,n)},e}();e.AuthorizationNotifier=n,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var r=function(){function n(e,t){this.utils=e,this.crypto=t,this.notifier=null}return n.prototype.buildRequestUrl=function(t,n){var r={redirect_uri:n.redirectUri,client_id:n.clientId,response_type:n.responseType,state:n.state,scope:n.scope};if(n.extras)for(var i in n.extras)n.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(r[i]=n.extras[i]);var o=this.utils.stringify(r);return t.authorizationEndpoint+"?"+o},n.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(n){n||t.log("No result is available yet."),n&&e.notifier&&e.notifier.onAuthorizationComplete(n.request,n.response,n.error)}))},n.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},n}();e.AuthorizationRequestHandler=r}(or);var sr={},ar={};Object.defineProperty(ar,"__esModule",{value:!0}),ar.AuthorizationError=ar.AuthorizationResponse=void 0;var cr=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}();ar.AuthorizationResponse=cr;var lr=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}();ar.AuthorizationError=lr;var ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.BasicQueryStringUtils=void 0;var dr=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={},n=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),r=0;r<n.length;r+=1){var i=n[r].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 n in e)e.hasOwnProperty(n)&&e[n]&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},e}();ur.BasicQueryStringUtils=dr;var hr,pr={},fr=Cn&&Cn.__extends||(hr=function(e,t){return(hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(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 n(){this.constructor=e}hr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(pr,"__esModule",{value:!0}),pr.LocalStorageBackend=pr.StorageBackend=void 0;var mr=function(){};pr.StorageBackend=mr;var gr=function(e){function t(t){var n=e.call(this)||this;return n.storage=t||window.localStorage,n}return fr(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(n,r){var i=t.storage.getItem(e);n(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(n,r){t.storage.removeItem(e),n()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,n){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var n=this;return new Promise((function(r,i){n.storage.setItem(e,t),r()}))},t}(mr);pr.LocalStorageBackend=gr;var _r=Cn&&Cn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(sr,"__esModule",{value:!0});var vr=sr.RedirectRequestHandler=void 0,yr=Sn,wr=ar,br=Rn,Er=Jn,kr=ur,Ir=pr,Tr=function(e){return e+"_appauth_authorization_request"},Cr=function(e){return e+"_appauth_authorization_service_configuration"},Sr="appauth_current_authorization_request",Rr=function(e){function t(t,n,r,i){void 0===t&&(t=new Ir.LocalStorageBackend),void 0===n&&(n=new kr.BasicQueryStringUtils),void 0===r&&(r=window.location),void 0===i&&(i=new br.DefaultCrypto);var o=e.call(this,n,i)||this;return o.storageBackend=t,o.locationLike=r,o}return _r(t,e),t.prototype.performAuthorizationRequest=function(e,t){var n=this,r=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(Sr,r),t.toJson().then((function(e){return n.storageBackend.setItem(Tr(r),JSON.stringify(e))})),this.storageBackend.setItem(Cr(r),JSON.stringify(e.toJson()))]).then((function(){var r=n.buildRequestUrl(e,t);Er.log("Making a request to ",t,r),n.locationLike.assign(r)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(Sr).then((function(t){return t?e.storageBackend.getItem(Tr(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new yr.AuthorizationRequest(e)})).then((function(n){var r=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;Er.log("Potential authorization request ",r,i,o,s,a);var c=o===n.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new wr.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new wr.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(Sr),e.storageBackend.removeItem(Tr(t)),e.storageBackend.removeItem(Cr(t))]).then((function(){return Er.log("Delivering authorization response"),{request:n,response:l,error:u}}))}return Er.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(or.AuthorizationRequestHandler);vr=sr.RedirectRequestHandler=Rr;var Or={},Ar={},Pr=Cn&&Cn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.TestRequestor=Mr=Ar.FetchRequestor=Ar.JQueryRequestor=Ar.Requestor=void 0;var Nr=Un,xr=function(){};Ar.Requestor=xr;var Lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pr(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,n){t.then((function(t,n,r){e(t)}),(function(e,t,r){n(new Nr.AppAuthError(r))}))}))},t}(xr);Ar.JQueryRequestor=Lr;var Dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pr(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new Nr.AppAuthError("A URL must be provided."));var t=new URL(e.url),n={};(n.method=e.method,n.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?n.body=e.data:new URLSearchParams(e.data).forEach((function(e,n){t.searchParams.append(n,e)})));if(n.headers={},e.headers)for(var r in e.headers)e.headers.hasOwnProperty(r)&&(n.headers[r]=e.headers[r]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(n.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),n).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 Nr.AppAuthError(e.status.toString(),e.statusText))}))},t}(xr),Mr=Ar.FetchRequestor=Dr,Ur=function(e){function t(t){var n=e.call(this)||this;return n.promise=t,n}return Pr(t,e),t.prototype.xhr=function(e){return this.promise},t}(xr);Ar.TestRequestor=Ur,Object.defineProperty(Or,"__esModule",{value:!0});var jr=Or.AuthorizationServiceConfiguration=void 0,Fr=Ar,Br=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,n){var r=t+"/.well-known/openid-configuration";return(n||new Fr.JQueryRequestor).xhr({url:r,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();jr=Or.AuthorizationServiceConfiguration=Br;var zr={};Object.defineProperty(zr,"__esModule",{value:!0});var Hr=zr.TokenRequest=zr.GRANT_TYPE_REFRESH_TOKEN=zr.GRANT_TYPE_AUTHORIZATION_CODE=void 0,Vr=zr.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";zr.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var $r=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}();Hr=zr.TokenRequest=$r;var qr={},Wr={};!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 n=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=n}(Wr),Object.defineProperty(qr,"__esModule",{value:!0});var Kr=qr.BaseTokenRequestHandler=void 0,Gr=Un,Jr=ur,Yr=Wr,Qr=Ar,Xr=function(){function e(e,t){void 0===e&&(e=new Qr.JQueryRequestor),void 0===t&&(t=new Jr.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 n=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 n.isTokenResponse(e)?new Yr.TokenResponse(e):Promise.reject(new Gr.AppAuthError(e.error,new Yr.TokenError(e)))}))},e}();Kr=qr.BaseTokenRequestHandler=Xr;let Zr;const ei=async(e,t)=>{const n=await jr.fetchFromIssuer(e,t);return Zr=n,n},ti=async(e,t,n,r,i)=>{const o={};t&&(o.code_verifier=t);const s=new Hr({client_id:r.clientId,redirect_uri:r.redirectUri,grant_type:Vr,code:e,refresh_token:void 0,extras:o});return await n.performTokenRequest(i,s)},ni=e=>{if(e&&e.isValid())return e.accessToken},ri=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),n=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(n){const e=JSON.parse(n);Zr=new jr(e)}return!0}catch{return!1}};p.bind({g:1});const ii=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),oi=(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:""},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,C=Array.isArray;function S(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=S({},s)).__v=s.__v+1,G(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),J(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,S=t.length;for(r.__k=[],d=0;d<S;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):C(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--),G(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>S-_?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||(C(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 G(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=S({},d.__s)),S(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=S(S({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,C(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,C(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 J(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=[],G(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),J(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=S({},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=S({},this.state),"function"==typeof e&&(e=e(S({},r),this.props)),e&&S(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 Ce(){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 Se(){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(eh){e.__H.__h=[],g.__e(eh,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)(Se)),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(Ld){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${Ld.message})`)}try{return JSON.parse(i)}catch(Ld){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${Ld.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"),Ge=Ve("function"),Je=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");function nt(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 it(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 ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!qe(e)&&e!==ot;const at=(ct="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ct&&e instanceof ct);var ct;const lt=He("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dt=He("RegExp"),ht=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nt(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},pt="abcdefghijklmnopqrstuvwxyz",ft="0123456789",mt={DIGIT:ft,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ft};const gt=He("AsyncFunction"),_t={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Ge(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ge(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Ge(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:Je,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:dt,isFunction:Ge,isStream:e=>Ye(e)&&Ge(e.pipe),isURLSearchParams:rt,isTypedArray:at,isFileList:tt,forEach:nt,merge:function e(){const{caseless:t}=st(this)&&this||{},r={},n=(n,i)=>{const o=t&&it(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]&&nt(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(nt(t,((t,n)=>{r&&Ge(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(!Je(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:lt,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ht,freezeMethods:e=>{ht(e,((t,r)=>{if(Ge(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Ge(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)=>(e=+e,Number.isFinite(e)?e:t),findKey:it,global:ot,isContextDefined:st,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&&Ge(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 nt(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:gt,isThenable:e=>e&&(Ye(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch)};function vt(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)}_t.inherits(vt,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:_t.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=vt.prototype,wt={};["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=>{wt[e]={value:e}})),Object.defineProperties(vt,wt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=(e,t,r,n,i,o)=>{const s=Object.create(yt);return _t.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),vt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function bt(e){return _t.isPlainObject(e)||_t.isArray(e)}function Et(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Et(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const It=_t.toFlatObject(_t,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,r){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=_t.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_t.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_t.isDate(e))return e.toISOString();if(!a&&_t.isBlob(e))throw new vt("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(e)||_t.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(_t.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(_t.isArray(e)&&function(e){return _t.isArray(e)&&!e.some(bt)}(e)||(_t.isFileList(e)||_t.endsWith(r,"[]"))&&(a=_t.toArray(e)))return r=Et(r),a.forEach((function(e,n){!_t.isUndefined(e)&&null!==e&&t.append(!0===s?kt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!bt(e)||(t.append(kt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(It,{defaultVisitor:l,convertValue:c,isVisitable:bt});if(!_t.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!_t.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),_t.forEach(r,(function(r,o){!0===(!(_t.isUndefined(r)||null===r)&&i.call(t,r,_t.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function St(e,t){this._pairs=[],e&&Tt(e,this,t)}const Rt=St.prototype;function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,r){if(!t)return e;const n=r&&r.encode||Ot,i=r&&r.serialize;let o;if(o=i?i(t,r):_t.isURLSearchParams(t)?t.toString():new St(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Pt=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){_t.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:St,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Lt(e){function t(e,r,n,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&_t.isArray(n)?n.length:o,a)return _t.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&_t.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&_t.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(_t.isFormData(e)&&_t.isFunction(e.entries)){const r={};return _t.forEachEntry(e,((e,n)=>{t(function(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Dt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=_t.isObject(e);i&&_t.isHTMLForm(e)&&(e=new FormData(e));if(_t.isFormData(e))return n&&n?JSON.stringify(Lt(e)):e;if(_t.isArrayBuffer(e)||_t.isBuffer(e)||_t.isStream(e)||_t.isFile(e)||_t.isBlob(e))return e;if(_t.isArrayBufferView(e))return e.buffer;if(_t.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 Tt(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return xt.isNode&&_t.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=_t.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(Ld){if("SyntaxError"!==Ld.name)throw Ld}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&_t.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(Ld){if(r){if("SyntaxError"===Ld.name)throw vt.from(Ld,vt.ERR_BAD_RESPONSE,this,null,this.response);throw Ld}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],(e=>{Dt.headers[e]={}}));const Mt=Dt,Ut=_t.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"]),jt=Symbol("internals");function Ft(e){return e&&String(e).trim().toLowerCase()}function Bt(e){return!1===e||null==e?e:_t.isArray(e)?e.map(Bt):String(e)}function zt(e,t,r,n,i){return _t.isFunction(n)?n.call(this,t,r):(i&&(t=r),_t.isString(t)?_t.isString(n)?-1!==t.indexOf(n):_t.isRegExp(n)?n.test(t):void 0:void 0)}class Ht{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ft(t);if(!i)throw new Error("header name must be a non-empty string");const o=_t.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Bt(e))}const o=(e,t)=>_t.forEach(e,((e,r)=>i(e,r,t)));return _t.isPlainObject(e)||e instanceof this.constructor?o(e,t):_t.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]&&Ut[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=Ft(e)){const r=_t.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(_t.isFunction(t))return t.call(this,e,r);if(_t.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ft(e)){const r=_t.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 i(e){if(e=Ft(e)){const i=_t.findKey(r,e);!i||t&&!zt(0,r[i],i,t)||(delete r[i],n=!0)}}return _t.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&&!zt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return _t.forEach(this,((n,i)=>{const o=_t.findKey(r,i);if(o)return t[o]=Bt(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]=Bt(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _t.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&_t.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[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ft(e);t[n]||(!function(e,t){const r=_t.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 _t.isArray(e)?e.forEach(n):n(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_t.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),_t.freezeMethods(Ht);const Vt=Ht;function $t(e,t){const r=this||Mt,n=t||r,i=Vt.from(n.headers);let o=n.data;return _t.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qt(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,r){vt.call(this,null==e?"canceled":e,vt.ERR_CANCELED,t,r),this.name="CanceledError"}_t.inherits(Wt,vt,{__CANCEL__:!0});const Kt=xt.isStandardBrowserEnv?{write:function(e,t,r,n,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),_t.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),_t.isString(n)&&s.push("path="+n),_t.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Gt(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 Jt=xt.isStandardBrowserEnv?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=_t.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Yt(e,t){let r=0;const n=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 i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const l={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:i};l[t?"download":"upload"]=!0,e(l)}}const Qt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=Vt.from(e.headers).normalize(),o=e.responseType;let s,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_t.isFormData(n)&&(xt.isStandardBrowserEnv||xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?_t.isString(a=i.getContentType())&&i.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const u=Gt(e.baseURL,e.url);function d(){if(!l)return;const n=Vt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new vt("Request failed with status code "+r.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),At(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(r(new vt("Request aborted",vt.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new vt("Network Error",vt.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new vt(t,n.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,l)),l=null},xt.isStandardBrowserEnv){const t=Jt(u)&&e.xsrfCookieName&&Kt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&_t.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),_t.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Yt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Yt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(r(!t||t.type?new Wt(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);h&&-1===xt.protocols.indexOf(h)?r(new vt("Unsupported protocol "+h+":",vt.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};_t.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Ld){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`,Zt=e=>_t.isFunction(e)||null===e||!1===e,er=e=>{e=_t.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,!Zt(r)&&(n=Qt[(t=String(r)).toLowerCase()],void 0===n))throw new vt(`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 vt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function rr(e){tr(e),e.headers=Vt.from(e.headers),e.data=$t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return er(e.adapter||Mt.adapter)(e).then((function(t){return tr(e),t.data=$t.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return qt(t)||(tr(e),t&&t.response&&(t.response.data=$t.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}const nr=e=>e instanceof Vt?e.toJSON():e;function ir(e,t){t=t||{};const r={};function n(e,t,r){return _t.isPlainObject(e)&&_t.isPlainObject(t)?_t.merge.call({caseless:r},e,t):_t.isPlainObject(t)?_t.merge({},t):_t.isArray(t)?t.slice():t}function i(e,t,r){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!_t.isUndefined(t))return n(void 0,t)}function s(e,t){return _t.isUndefined(t)?_t.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,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(nr(e),nr(t),!0)};return _t.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);_t.isUndefined(s)&&o!==a||(r[n]=s)})),r}const or="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ar={};sr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new vt(n(i," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!ar[i]&&(ar[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 cr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new vt("options must be an object",vt.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 vt("option "+o+" must be "+r,vt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new vt("Unknown option "+o,vt.ERR_BAD_OPTION)}},validators:sr},lr=cr.validators;class ur{constructor(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&cr.assertOptions(r,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),null!=n&&(_t.isFunction(n)?t.paramsSerializer={serialize:n}:cr.assertOptions(n,{encode:lr.function,serialize:lr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&_t.merge(i.common,i[t.method]);i&&_t.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Vt.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=[rr.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=rr.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 At(Gt((e=ir(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}_t.forEach(["delete","get","head","options"],(function(e){ur.prototype[e]=function(t,r){return this.request(ir(r||{},{method:e,url:t,data:(r||{}).data}))}})),_t.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(ir(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ur.prototype[e]=t(),ur.prototype[e+"Form"]=t(!0)}));const dr=ur;class hr{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 Wt(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 hr((function(t){e=t})),cancel:e}}}const pr=hr;const fr={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(fr).forEach((([e,t])=>{fr[t]=e}));const mr=fr;const gr=function e(t){const r=new dr(t),n=Ue(dr.prototype.request,r);return _t.extend(n,dr.prototype,r,{allOwnKeys:!0}),_t.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ir(t,r))},n}(Mt);gr.Axios=dr,gr.CanceledError=Wt,gr.CancelToken=pr,gr.isCancel=qt,gr.VERSION=or,gr.toFormData=Tt,gr.AxiosError=vt,gr.Cancel=gr.CanceledError,gr.all=function(e){return Promise.all(e)},gr.spread=function(e){return function(t){return e.apply(null,t)}},gr.isAxiosError=function(e){return _t.isObject(e)&&!0===e.isAxiosError},gr.mergeConfig=ir,gr.AxiosHeaders=Vt,gr.formToJSON=e=>Lt(_t.isHTMLForm(e)?new FormData(e):e),gr.getAdapter=er,gr.HttpStatusCode=mr,gr.default=gr;const _r=gr,vr=(e,t,r)=>{ve((()=>{const t=_r.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},yr=({request:e})=>console.error("[API] Request error:",e),wr=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let br;const Er=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),kr=async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.post("customer-profile/backend/v1.0/workplace-link",{},Er(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},Ir=(e,t,r,n)=>{if(!br)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return br.post("customer-profile/customer-backend/v1.0/workplace-link",i,Er(e,n))};for(var Tr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Cr={},Sr={},Rr={byteLength:function(e){var t=Lr(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Lr(e),i=n[0],o=n[1],s=new Pr(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=Ar[e.charCodeAt(r)]<<18|Ar[e.charCodeAt(r+1)]<<12|Ar[e.charCodeAt(r+2)]<<6|Ar[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=Ar[e.charCodeAt(r)]<<2|Ar[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=Ar[e.charCodeAt(r)]<<10|Ar[e.charCodeAt(r+1)]<<4|Ar[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(Dr(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(Or[t>>2]+Or[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Or[t>>10]+Or[t>>4&63]+Or[t<<2&63]+"="));return i.join("")}},Or=[],Ar=[],Pr="undefined"!=typeof Uint8Array?Uint8Array:Array,Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=0;xr<64;++xr)Or[xr]=Nr[xr],Ar[Nr.charCodeAt(xr)]=xr;function Lr(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 Dr(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(Or[(i=n)>>18&63]+Or[i>>12&63]+Or[i>>6&63]+Or[63&i]);return o.join("")}Ar["-".charCodeAt(0)]=62,Ar["_".charCodeAt(0)]=63;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AppAuthError=void 0;var Ur=function(e,t){this.message=e,this.extras=t};Mr.AppAuthError=Ur,Object.defineProperty(Sr,"__esModule",{value:!0});var jr=Sr.DefaultCrypto=Sr.textEncodeLite=Sr.urlSafe=Sr.bufferToString=void 0,Fr=Rr,Br=Mr,zr="undefined"!=typeof window&&!!window.crypto,Hr=zr&&!!window.crypto.subtle,Vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function $r(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(Vr[n])}return t.join("")}function qr(e){return Fr.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Wr(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}Sr.bufferToString=$r,Sr.urlSafe=qr,Sr.textEncodeLite=Wr;var Kr=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(zr)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return $r(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new Br.AppAuthError("Invalid code length.")):Hr?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Wr(e)).then((function(e){return t(qr(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new Br.AppAuthError("window.crypto.subtle is unavailable."))},e}();jr=Sr.DefaultCrypto=Kr;var Gr={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.IS_PROFILE=Jr.IS_LOG=void 0,Jr.IS_LOG=!0,Jr.IS_PROFILE=!1;var Yr=Tr&&Tr.__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(Gr,"__esModule",{value:!0}),Gr.profile=Gr.log=void 0;var Qr=Jr;function Xr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Qr.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Yr([e],t)):console.log(e))}Gr.log=Xr;var Zr="undefined"!=typeof window&&!!window.performance&&!!console.profile;Gr.profile=function(e,t,r){return Qr.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Zr?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Yr([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){Xr("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Yr([this||window],e)),o=Date.now()-t;return Xr("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(Cr,"__esModule",{value:!0});var en=Cr.AuthorizationRequest=void 0,tn=Sr,rn=Gr,nn=function(){function e(t,r,n){void 0===r&&(r=new tn.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){rn.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}();en=Cr.AuthorizationRequest=nn;var on={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=Gr,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}(on);var sn={},an={};Object.defineProperty(an,"__esModule",{value:!0}),an.AuthorizationError=an.AuthorizationResponse=void 0;var cn=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}();an.AuthorizationResponse=cn;var ln=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}();an.AuthorizationError=ln;var un={};Object.defineProperty(un,"__esModule",{value:!0}),un.BasicQueryStringUtils=void 0;var dn=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}();un.BasicQueryStringUtils=dn;var hn,pn={},fn=Tr&&Tr.__extends||(hn=function(e,t){return(hn=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}hn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.LocalStorageBackend=pn.StorageBackend=void 0;var mn=function(){};pn.StorageBackend=mn;var gn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return fn(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}(mn);pn.LocalStorageBackend=gn;var _n=Tr&&Tr.__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(sn,"__esModule",{value:!0});var vn=sn.RedirectRequestHandler=void 0,yn=Cr,wn=an,bn=Sr,En=Gr,kn=un,In=pn,Tn=function(e){return e+"_appauth_authorization_request"},Cn=function(e){return e+"_appauth_authorization_service_configuration"},Sn="appauth_current_authorization_request",Rn=function(e){function t(t,r,n,i){void 0===t&&(t=new In.LocalStorageBackend),void 0===r&&(r=new kn.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new bn.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return _n(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(Sn,n),t.toJson().then((function(e){return r.storageBackend.setItem(Tn(n),JSON.stringify(e))})),this.storageBackend.setItem(Cn(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);En.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(Sn).then((function(t){return t?e.storageBackend.getItem(Tn(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new yn.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;En.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 wn.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new wn.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(Sn),e.storageBackend.removeItem(Tn(t)),e.storageBackend.removeItem(Cn(t))]).then((function(){return En.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return En.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(on.AuthorizationRequestHandler);vn=sn.RedirectRequestHandler=Rn;var On={},An={},Pn=Tr&&Tr.__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(An,"__esModule",{value:!0}),An.TestRequestor=Mn=An.FetchRequestor=An.JQueryRequestor=An.Requestor=void 0;var Nn=Mr,xn=function(){};An.Requestor=xn;var Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(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 Nn.AppAuthError(n))}))}))},t}(xn);An.JQueryRequestor=Ln;var Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new Nn.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 Nn.AppAuthError(e.status.toString(),e.statusText))}))},t}(xn),Mn=An.FetchRequestor=Dn,Un=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return Pn(t,e),t.prototype.xhr=function(e){return this.promise},t}(xn);An.TestRequestor=Un,Object.defineProperty(On,"__esModule",{value:!0});var jn=On.AuthorizationServiceConfiguration=void 0,Fn=An,Bn=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 Fn.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();jn=On.AuthorizationServiceConfiguration=Bn;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});var Hn=zn.TokenRequest=zn.GRANT_TYPE_REFRESH_TOKEN=zn.GRANT_TYPE_AUTHORIZATION_CODE=void 0,Vn=zn.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";zn.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var $n=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}();Hn=zn.TokenRequest=$n;var qn={},Wn={};!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}(Wn),Object.defineProperty(qn,"__esModule",{value:!0});var Kn=qn.BaseTokenRequestHandler=void 0,Gn=Mr,Jn=un,Yn=Wn,Qn=An,Xn=function(){function e(e,t){void 0===e&&(e=new Qn.JQueryRequestor),void 0===t&&(t=new Jn.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 Yn.TokenResponse(e):Promise.reject(new Gn.AppAuthError(e.error,new Yn.TokenError(e)))}))},e}();Kn=qn.BaseTokenRequestHandler=Xn;let Zn;const ei=async(e,t)=>{const r=await jn.fetchFromIssuer(e,t);return Zn=r,r},ti=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Hn({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:Vn,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},ri=e=>{if(e&&e.isValid())return e.accessToken},ni=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);Zn=new jn(e)}return!0}catch{return!1}};p.bind({g:1});const ii=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),oi=(function(){const e=f.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 {
@@ -57,7 +57,7 @@ let e,t,n,r={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
57
57
  left: calc(50% - -6rem);
58
58
  }
59
59
  }
60
- `;var li=0;function ui(e,t,n,r,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:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--li,__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 di=({isActive:e,className:t})=>ui(si,{children:ui(ai,{className:t,children:[e&&ui(ii,{role:"alert",children:"Loading..."}),ui(ci,{className:e?"is-active":"","aria-hidden":!0})]})}),hi=f("div")`
60
+ `;var li=0;function ui(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:--li,__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 di=({isActive:e,className:t})=>ui(si,{children:ui(ai,{className:t,children:[e&&ui(ii,{role:"alert",children:"Loading..."}),ui(ci,{className:e?"is-active":"","aria-hidden":!0})]})}),hi=f("div")`
61
61
  ${()=>({margin:"2rem",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"})}
62
62
 
63
63
  font-family: 'Poppins', sans-serif;
@@ -88,12 +88,12 @@ let e,t,n,r={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
88
88
  ${()=>({margin:"0.5rem",display:"inline-block",height:"3rem"})}
89
89
  `,_i=f("a")``,vi=f("img")`
90
90
  ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",height:"6rem"})}
91
- `;function yi(e,t){for(var n in t)e[n]=t[n];return e}function wi(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function bi(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Ei(e){this.props=e}function ki(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:wi(this.props,e)}function r(t){return this.shouldComponentUpdate=n,O(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ei.prototype=new x).isPureReactComponent=!0,Ei.prototype.shouldComponentUpdate=function(e,t){return wi(this.props,e)||wi(this.state,t)};var Ii=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ii&&Ii(e)};var Ti="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ci(e){function t(t){var n=yi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ti,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Si=function(e,t){return null==e?null:B(B(e).map(t))},Ri={map:Si,forEach:Si,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},Oi=g.__e;g.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Oi(e,t,n,r)};var Ai=g.unmount;function Pi(e,t,n){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=yi({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Pi(e,t,n)}))),e}function Ni(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ni(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function xi(){this.__u=0,this.t=null,this.__b=null}function Li(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Di(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return O(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Mi(){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),Ai&&Ai(e)},(xi.prototype=new x).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Li(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ni(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},xi.prototype.componentWillUnmount=function(){this.t=[]},xi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Pi(this.__b,n,r.__O=r.__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 Ui=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ji(e){return this.getChildContext=function(){return e.context},e.children}function Fi(e){var t=this,n=e.i;t.componentWillUnmount=function(){Z(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){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(ji,{context:t.context},e.__v),t.l)}function Bi(e,t){var n=O(Fi,{__v:e,i:t});return n.containerInfo=t,n}(Mi.prototype=new x).__a=function(e){var t=this,n=Li(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Ui(t,e,r)):i()};n?n(o):o()}},Mi.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 n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Mi.prototype.componentDidUpdate=Mi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ui(e,n,t)}))};var zi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Hi=/^(?: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]/,Vi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$i=/[A-Z0-9]/g,qi="undefined"!=typeof document,Wi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Ki(e,t,n){return null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof n&&n(),e?e.__c:null}function Gi(e,t,n){return ee(e,t),"function"==typeof n&&n(),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 Ji=g.event;function Yi(){}function Qi(){return this.cancelBubble}function Xi(){return this.defaultPrevented}g.event=function(e){return Ji&&(e=Ji(e)),e.persist=Yi,e.isPropagationStopped=Qi,e.isDefaultPrevented=Xi,e.nativeEvent=e};var Zi,eo={enumerable:!1,configurable:!0,get:function(){return this.class}},to=g.vnode;g.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||qi&&"children"===i&&"noscript"===n||"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"!==n&&"textarea"!==n||Wi(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Vi.test(i)?i=s:-1===n.indexOf("-")&&Hi.test(i)?i=i.replace($i,"-$&").toLowerCase():null===o&&(o=void 0):s=i="oninput","oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=B(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=B(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",eo)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=zi,to&&to(e)};var no=g.__r;g.__r=function(e){no&&no(e),Zi=e.__c};var ro=g.diffed;g.diffed=function(e){ro&&ro(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Zi=null};var io={ReactCurrentDispatcher:{current:{readContext:function(e){return Zi.__n[e.__c].props.value}}}};function oo(e){return O.bind(null,e)}function so(e){return!!e&&e.$$typeof===zi}function ao(e){return so(e)&&e.type===N}function co(e){return so(e)?te.apply(null,arguments):e}function lo(e){return!!e.__k&&(Z(null,e),!0)}function uo(e){return e&&(e.base||1===e.nodeType&&e)||null}var ho=function(e,t){return e(t)},po=function(e,t){return e(t)},fo=N;function mo(e){e()}function go(e){return e}function _o(){return[!1,mo]}var vo=ye,yo=so;function wo(e,t){var n=t(),r=ge({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ye((function(){i.__=n,i.v=t,bi(i.__,t())||o({h:i})}),[e,n,t]),ve((function(){return bi(i.__,i.v())||o({h:i}),e((function(){bi(i.__,i.v())||o({h:i})}))}),[e]),n}var bo={useState:ge,useId:Ce,useReducer:_e,useEffect:ve,useLayoutEffect:ye,useInsertionEffect:vo,useTransition:_o,useDeferredValue:go,useSyncExternalStore:wo,startTransition:mo,useRef:we,useImperativeHandle:be,useMemo:Ee,useCallback:ke,useContext:Ie,useDebugValue:Te,version:"17.0.2",Children:Ri,render:Ki,hydrate:Gi,unmountComponentAtNode:lo,createPortal:Bi,createElement:O,createContext:ne,createFactory:oo,cloneElement:co,createRef:P,Fragment:N,isValidElement:so,isElement:yo,isFragment:ao,findDOMNode:uo,Component:x,PureComponent:Ei,memo:ki,forwardRef:Ci,flushSync:po,unstable_batchedUpdates:ho,StrictMode:fo,Suspense:xi,SuspenseList:Mi,lazy:Di,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io};const Eo=Object.freeze(Object.defineProperty({__proto__:null,Children:Ri,Component:x,Fragment:N,PureComponent:Ei,StrictMode:fo,Suspense:xi,SuspenseList:Mi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io,cloneElement:co,createContext:ne,createElement:O,createFactory:oo,createPortal:Bi,createRef:P,default:bo,findDOMNode:uo,flushSync:po,forwardRef:Ci,hydrate:Gi,isElement:yo,isFragment:ao,isValidElement:so,lazy:Di,memo:ki,render:Ki,startTransition:mo,unmountComponentAtNode:lo,unstable_batchedUpdates:ho,useCallback:ke,useContext:Ie,useDebugValue:Te,useDeferredValue:go,useEffect:ve,useErrorBoundary:function(e){var t=me(re++,10),n=ge();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:Ce,useImperativeHandle:be,useInsertionEffect:vo,useLayoutEffect:ye,useMemo:Ee,useReducer:_e,useRef:we,useState:ge,useSyncExternalStore:wo,useTransition:_o,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var ko,Io,To=Object.defineProperty,Co=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Oo=(e,t,n)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ao=(e,t)=>{for(var n in t||(t={}))So.call(t,n)&&Oo(e,n,t[n]);if(Co)for(var n of Co(t))Ro.call(t,n)&&Oo(e,n,t[n]);return e},Po=(e,t)=>{var n={};for(var r in e)So.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Co)for(var r of Co(e))t.indexOf(r)<0&&Ro.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,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(r);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,n,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 r=8*t.getNumDataCodewords(u,n),i=a.getTotalBits(e,u);if(i<=r){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const r of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,r)&&(n=r);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(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,n);o(h.length<=p),r(0,Math.min(4,p-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let t=236;h.length<p;t^=253)r(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,n,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 n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%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 n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let i=0;i<10;i++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,i(r,o));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,i(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,i(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,i(r,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let n=0;n<18;n++){const e=i(t,n),r=this.size-11+n%3,o=Math.floor(n/3);this.setFunctionModule(r,o,e),this.setFunctionModule(o,r,e)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,s=t+n;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/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 n=e.slice(p,p+l-s+(o<c?0:1));p+=n.length;const r=t.reedSolomonComputeRemainder(n,d);o<c&&n.push(0),u.push(n.concat(r))}let h=[];for(let t=0;t<u[0].length;t++)u.forEach(((e,n)=>{(t!=l-s||n>=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 n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-r:r;!this.isFunction[a][s]&&n<8*e.length&&(this.modules[a][s]=i(e[n>>>3],7-(7&n)),n++)}}o(n==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 n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[o][s]==n?(r++,5==r?e+=t.PENALTY_N1:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[o][s],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*t.PENALTY_N3}for(let o=0;o<this.size;o++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][o]==n?(r++,5==r?e+=t.PENALTY_N1:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[s][o],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*t.PENALTY_N3}for(let o=0;o<this.size-1;o++)for(let n=0;n<this.size-1;n++){const r=this.modules[o][n];r==this.modules[o][n+1]&&r==this.modules[o+1][n]&&r==this.modules[o+1][n+1]&&(e+=t.PENALTY_N2)}let n=0;for(const t of this.modules)n=t.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-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 n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.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]],n.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=n;const s=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,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 n=0;n<e.length;){const i=Math.min(e.length-n,3);r(parseInt(e.substr(n,i),10),3*i+1,t),n+=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,n=[];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)),r(i,11,n)}return t<e.length&&r(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new s(s.Mode.ALPHANUMERIC,e.length,n)}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)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(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 n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(ko||(ko={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((Io=ko||(ko={})).QrCode||(Io.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 n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(ko||(ko={}));var No=ko,xo={L:No.QrCode.Ecc.LOW,M:No.QrCode.Ecc.MEDIUM,Q:No.QrCode.Ecc.QUARTILE,H:No.QrCode.Ecc.HIGH},Lo=128,Do="L",Mo="#FFFFFF",Uo="#000000",jo=!1,Fo=4,Bo=.1;
91
+ `;function yi(e,t){for(var r in t)e[r]=t[r];return e}function wi(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 bi(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Ei(e){this.props=e}function ki(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:wi(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}(Ei.prototype=new x).isPureReactComponent=!0,Ei.prototype.shouldComponentUpdate=function(e,t){return wi(this.props,e)||wi(this.state,t)};var Ii=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ii&&Ii(e)};var Ti="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ci(e){function t(t){var r=yi({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=Ti,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Si=function(e,t){return null==e?null:B(B(e).map(t))},Ri={map:Si,forEach:Si,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},Oi=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);Oi(e,t,r,n)};var Ai=g.unmount;function Pi(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=yi({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Pi(e,t,r)}))),e}function Ni(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ni(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 xi(){this.__u=0,this.t=null,this.__b=null}function Li(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Di(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 Mi(){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),Ai&&Ai(e)},(xi.prototype=new x).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=Li(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]=Ni(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)},xi.prototype.componentWillUnmount=function(){this.t=[]},xi.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]=Pi(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 Ui=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 ji(e){return this.getChildContext=function(){return e.context},e.children}function Fi(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(ji,{context:t.context},e.__v),t.l)}function Bi(e,t){var r=O(Fi,{__v:e,i:t});return r.containerInfo=t,r}(Mi.prototype=new x).__a=function(e){var t=this,r=Li(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ui(t,e,n)):i()};r?r(o):o()}},Mi.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},Mi.prototype.componentDidUpdate=Mi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){Ui(e,r,t)}))};var zi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Hi=/^(?: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]/,Vi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$i=/[A-Z0-9]/g,qi="undefined"!=typeof document,Wi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Ki(e,t,r){return null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof r&&r(),e?e.__c:null}function Gi(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 Ji=g.event;function Yi(){}function Qi(){return this.cancelBubble}function Xi(){return this.defaultPrevented}g.event=function(e){return Ji&&(e=Ji(e)),e.persist=Yi,e.isPropagationStopped=Qi,e.isDefaultPrevented=Xi,e.nativeEvent=e};var Zi,eo={enumerable:!1,configurable:!0,get:function(){return this.class}},to=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||qi&&"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||Wi(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Vi.test(i)?i=s:-1===r.indexOf("-")&&Hi.test(i)?i=i.replace($i,"-$&").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",eo)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=zi,to&&to(e)};var ro=g.__r;g.__r=function(e){ro&&ro(e),Zi=e.__c};var no=g.diffed;g.diffed=function(e){no&&no(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),Zi=null};var io={ReactCurrentDispatcher:{current:{readContext:function(e){return Zi.__n[e.__c].props.value}}}};function oo(e){return O.bind(null,e)}function so(e){return!!e&&e.$$typeof===zi}function ao(e){return so(e)&&e.type===N}function co(e){return so(e)?te.apply(null,arguments):e}function lo(e){return!!e.__k&&(Z(null,e),!0)}function uo(e){return e&&(e.base||1===e.nodeType&&e)||null}var ho=function(e,t){return e(t)},po=function(e,t){return e(t)},fo=N;function mo(e){e()}function go(e){return e}function _o(){return[!1,mo]}var vo=ye,yo=so;function wo(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,bi(i.__,t())||o({h:i})}),[e,r,t]),ve((function(){return bi(i.__,i.v())||o({h:i}),e((function(){bi(i.__,i.v())||o({h:i})}))}),[e]),r}var bo={useState:ge,useId:Ce,useReducer:_e,useEffect:ve,useLayoutEffect:ye,useInsertionEffect:vo,useTransition:_o,useDeferredValue:go,useSyncExternalStore:wo,startTransition:mo,useRef:we,useImperativeHandle:be,useMemo:Ee,useCallback:ke,useContext:Ie,useDebugValue:Te,version:"17.0.2",Children:Ri,render:Ki,hydrate:Gi,unmountComponentAtNode:lo,createPortal:Bi,createElement:O,createContext:re,createFactory:oo,cloneElement:co,createRef:P,Fragment:N,isValidElement:so,isElement:yo,isFragment:ao,findDOMNode:uo,Component:x,PureComponent:Ei,memo:ki,forwardRef:Ci,flushSync:po,unstable_batchedUpdates:ho,StrictMode:fo,Suspense:xi,SuspenseList:Mi,lazy:Di,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io};const Eo=Object.freeze(Object.defineProperty({__proto__:null,Children:Ri,Component:x,Fragment:N,PureComponent:Ei,StrictMode:fo,Suspense:xi,SuspenseList:Mi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io,cloneElement:co,createContext:re,createElement:O,createFactory:oo,createPortal:Bi,createRef:P,default:bo,findDOMNode:uo,flushSync:po,forwardRef:Ci,hydrate:Gi,isElement:yo,isFragment:ao,isValidElement:so,lazy:Di,memo:ki,render:Ki,startTransition:mo,unmountComponentAtNode:lo,unstable_batchedUpdates:ho,useCallback:ke,useContext:Ie,useDebugValue:Te,useDeferredValue:go,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:Ce,useImperativeHandle:be,useInsertionEffect:vo,useLayoutEffect:ye,useMemo:Ee,useReducer:_e,useRef:we,useState:ge,useSyncExternalStore:wo,useTransition:_o,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var ko,Io,To=Object.defineProperty,Co=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Oo=(e,t,r)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ao=(e,t)=>{for(var r in t||(t={}))So.call(t,r)&&Oo(e,r,t[r]);if(Co)for(var r of Co(t))Ro.call(t,r)&&Oo(e,r,t[r]);return e},Po=(e,t)=>{var r={};for(var n in e)So.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Co)for(var n of Co(e))t.indexOf(n)<0&&Ro.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})(ko||(ko={})),(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})((Io=ko||(ko={})).QrCode||(Io.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={}))})(ko||(ko={}));var No=ko,xo={L:No.QrCode.Ecc.LOW,M:No.QrCode.Ecc.MEDIUM,Q:No.QrCode.Ecc.QUARTILE,H:No.QrCode.Ecc.HIGH},Lo=128,Do="L",Mo="#FFFFFF",Uo="#000000",jo=!1,Fo=4,Bo=.1;
92
92
  /**
93
93
  * @license qrcode.react
94
94
  * Copyright (c) Paul O'Shannessy
95
95
  * SPDX-License-Identifier: ISC
96
- */function zo(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+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?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function Ho(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function Vo(e,t,n,r){if(null==r)return null;const i=n?Fo:0,o=e.length+2*i,s=Math.floor(t*Bo),a=o/t,c=(r.width||s)*a,l=(r.height||s)*a,u=null==r.x?e.length/2-c/2:r.x*a,d=null==r.y?e.length/2-l/2:r.y*a;let h=null;if(r.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 $o=function(){try{(new Path2D).addPath(new Path2D)}catch(Ld){return!1}return!0}();function qo(e){const t=e,{value:n,size:r=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,style:c,imageSettings:l}=t,u=Po(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=No.QrCode.encodeText(n,xo[i]).getModules();const u=a?Fo:0,d=c.length+2*u,f=Vo(c,r,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Ho(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=r*_;const v=r/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,$o?t.fill(new Path2D(zo(c,u))):c.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+u,n+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=Ao({height:r,width:r},c);let _=null;return null!=d&&(_=bo.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),bo.createElement(bo.Fragment,null,bo.createElement("canvas",Ao({style:g,height:r,width:r,ref:h},u)),_)}function Wo(e){const t=e,{value:n,size:r=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,imageSettings:c}=t,l=Po(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=No.QrCode.encodeText(n,xo[i]).getModules();const d=a?Fo:0,h=u.length+2*d,p=Vo(u,r,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Ho(u,p.excavation)),f=bo.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=zo(u,d);return bo.createElement("svg",Ao({height:r,width:r,viewBox:`0 0 ${h} ${h}`},l),bo.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),bo.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Ko=e=>{const t=e,{renderAs:n}=t,r=Po(t,["renderAs"]);return"svg"===n?bo.createElement(Wo,Ao({},r)):bo.createElement(qo,Ao({},r))};const Go=""+new URL("assets/google-play-badge-215e4644.png",import.meta.url).href,Jo=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,Yo=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Qo=()=>ui(si,{children:ui(hi,{children:[ui(vi,{src:Yo}),ui("h1",{children:"You’re registered!"}),ui("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),ui(pi,{children:ui(Ko,{value:"https://esjpe.app.link"})}),ui("h3",{children:"Download the Flare App"}),ui("p",{children:"Available on iOS and Android"}),ui(fi,{children:[ui(_i,{href:"https://apps.apple.com/us/app/flare/id1587276031",children:ui(mi,{src:Jo})}),ui(_i,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:ui(gi,{src:Go})})]})]})}),Xo=""+new URL("assets/cross-icon-bd6b1cff.svg",import.meta.url).href,Zo=f("img")`
96
+ */function zo(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 Ho(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 Vo(e,t,r,n){if(null==n)return null;const i=r?Fo:0,o=e.length+2*i,s=Math.floor(t*Bo),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 $o=function(){try{(new Path2D).addPath(new Path2D)}catch(Ld){return!1}return!0}();function qo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,style:c,imageSettings:l}=t,u=Po(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=No.QrCode.encodeText(r,xo[i]).getModules();const u=a?Fo:0,d=c.length+2*u,f=Vo(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=Ho(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,$o?t.fill(new Path2D(zo(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=Ao({height:n,width:n},c);let _=null;return null!=d&&(_=bo.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),bo.createElement(bo.Fragment,null,bo.createElement("canvas",Ao({style:g,height:n,width:n,ref:h},u)),_)}function Wo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,imageSettings:c}=t,l=Po(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=No.QrCode.encodeText(r,xo[i]).getModules();const d=a?Fo:0,h=u.length+2*d,p=Vo(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Ho(u,p.excavation)),f=bo.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=zo(u,d);return bo.createElement("svg",Ao({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),bo.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),bo.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Ko=e=>{const t=e,{renderAs:r}=t,n=Po(t,["renderAs"]);return"svg"===r?bo.createElement(Wo,Ao({},n)):bo.createElement(qo,Ao({},n))};const Go=""+new URL("assets/google-play-badge-215e4644.png",import.meta.url).href,Jo=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,Yo=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Qo=()=>ui(si,{children:ui(hi,{children:[ui(vi,{src:Yo}),ui("h1",{children:"You’re registered!"}),ui("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),ui(pi,{children:ui(Ko,{value:"https://esjpe.app.link"})}),ui("h3",{children:"Download the Flare App"}),ui("p",{children:"Available on iOS and Android"}),ui(fi,{children:[ui(_i,{href:"https://apps.apple.com/us/app/flare/id1587276031",children:ui(mi,{src:Jo})}),ui(_i,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:ui(gi,{src:Go})})]})]})}),Xo=""+new URL("assets/cross-icon-bd6b1cff.svg",import.meta.url).href,Zo=f("img")`
97
97
  ${()=>({marginBottom:"2.5rem",height:"7rem"})}
98
98
  `,es=f("div")`
99
99
  ${()=>({marginTop:"6rem",marginBottom:"6rem",display:"flex",width:"100%",flexDirection:"column",alignItems:"center",textAlign:"center"})}
@@ -105,7 +105,7 @@ let e,t,n,r={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
- `,ts=()=>ui(es,{children:[ui(Zo,{src:Xo}),ui("h1",{children:"Something went wrong!"}),ui("p",{children:"We’re having some difficulties."}),ui("p",{children:"Please try again shortly."})]}),ns=()=>{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}))},rs=({apolloAccessToken:e})=>{const[t,n]=ge(0),[r,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};yn((async t=>{const r=e=>{a(e),n(3)},i=await(async(e,t,n)=>{const r=new or.AuthorizationNotifier,i=new vr,o=new Mr,s=new Kr(o);return i.setAuthorizationNotifier(r),r.setAuthorizationListener((async(r,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return n(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(r.internal&&r.internal.code_verifier&&(a=r.internal.code_verifier),!Zr)return n("[AuthListener]: OIDC configuration not found");try{const e=await ti(i.code,a,s,r,Zr),o=ni(e);return o&&i.state?await t(o,i.state):n("[AuthListener]: Could not resolve access token or state")}catch(Ld){return n(`[AuthListener]: Token code exchange failed: ${Ld}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>n(2)),(async(i,o)=>{if(!i||!o)return n(1);try{const r=Me(e);await Tn(i,o,r.sub,t),n(4)}catch(Ld){r(`Error when trying to establish workplace link: ${Ld}`)}}),r);s(i)}),[]),yn((async()=>{o&&(await(async e=>{await ri(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&r&&n(1)}),[o,t,r]),yn((async r=>{if(o&&1===t)try{const t=await In(e,r);if(t.isEstablished)return n(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,n)=>{const r=await ei(n.openIdConnectUrl,e),i=new tr({client_id:n.clientId,redirect_uri:n.redirectUri,scope:n.scope,response_type:tr.RESPONSE_TYPE_CODE,state:n.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new Fn,!0);t.performAuthorizationRequest(r,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),n(3)}catch(Ld){a(`Could not redirect to OIDC provider: ${Ld}`),n(3)}}),[o,t]),ve((()=>{4===t&&ns()}),[t]);const c=0==t||1==t||2==t;return ui(N,{children:[c&&ui(di,{isActive:c}),3==t&&ui(ts,{}),4==t&&ui(Qo,{})]})},is=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},os={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 n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];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)),r.push(n[l],n[u],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(is(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const t=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0;++i;const s=i<e.length?n[e.charAt(i)]:64;++i;const a=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new ss;const c=t<<2|o>>4;if(r.push(c),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;r.push(e)}}}return r},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 ss extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const as=function(e){return function(e){const t=is(e);return os.encodeByteArray(t,!0)}(e).replace(/\./g,"")},cs=function(e){try{return os.decodeString(e,!0)}catch(Ld){console.error("base64Decode failed: ",Ld)}return null};
108
+ `,ts=()=>ui(es,{children:[ui(Zo,{src:Xo}),ui("h1",{children:"Something went wrong!"}),ui("p",{children:"We’re having some difficulties."}),ui("p",{children:"Please try again shortly."})]}),rs=()=>{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}))},ns=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};vr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new on.AuthorizationNotifier,i=new vn,o=new Mn,s=new Kn(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),!Zn)return r("[AuthListener]: OIDC configuration not found");try{const e=await ti(i.code,a,s,n,Zn),o=ri(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(Ld){return r(`[AuthListener]: Token code exchange failed: ${Ld}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await Ir(i,o,n.sub,t),r(4)}catch(Ld){n(`Error when trying to establish workplace link: ${Ld}`)}}),n);s(i)}),[]),vr((async()=>{o&&(await(async e=>{await ni(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]),vr((async n=>{if(o&&1===t)try{const t=await kr(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 ei(r.openIdConnectUrl,e),i=new en({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:en.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new jr,!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(Ld){a(`Could not redirect to OIDC provider: ${Ld}`),r(3)}}),[o,t]),ve((()=>{4===t&&rs()}),[t]);const c=0==t||1==t||2==t;return ui(N,{children:[c&&ui(di,{isActive:c}),3==t&&ui(ts,{}),4==t&&ui(Qo,{})]})},is=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},os={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(is(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 ss;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 ss extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const as=function(e){return function(e){const t=is(e);return os.encodeByteArray(t,!0)}(e).replace(/\./g,"")},cs=function(e){try{return os.decodeString(e,!0)}catch(Ld){console.error("base64Decode failed: ",Ld)}return null};
109
109
  /**
110
110
  * @license
111
111
  * Copyright 2022 Google LLC
@@ -156,7 +156,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
156
156
  * See the License for the specific language governing permissions and
157
157
  * limitations under the License.
158
158
  */
159
- class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}
159
+ class ps{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
160
  /**
161
161
  * @license
162
162
  * Copyright 2017 Google LLC
@@ -172,7 +172,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
172
172
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
173
173
  * See the License for the specific language governing permissions and
174
174
  * limitations under the License.
175
- */function fs(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class ms extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,ms.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,gs.prototype.create)}}class gs{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(_s,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",s=`${this.serviceName}: ${o} (${r}).`;return new ms(r,s,n)}}const _s=/\{\$([^}]+)}/g;function vs(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(ys(n)&&ys(o)){if(!vs(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ys(e){return null!==e&&"object"==typeof e}
175
+ */function fs(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class ms extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,ms.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,gs.prototype.create)}}class gs{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(_s,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(i,r):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new ms(n,s,r)}}const _s=/\{\$([^}]+)}/g;function vs(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(ys(r)&&ys(o)){if(!vs(r,o))return!1}else if(r!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function ys(e){return null!==e&&"object"==typeof e}
176
176
  /**
177
177
  * @license
178
178
  * Copyright 2017 Google LLC
@@ -188,7 +188,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
188
188
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
189
  * See the License for the specific language governing permissions and
190
190
  * limitations under the License.
191
- */function ws(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}class bs{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,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=Es),void 0===r.error&&(r.error=Es),void 0===r.complete&&(r.complete=Es);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(Ld){}})),this.observers.push(r),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(Ld){"undefined"!=typeof console&&console.error&&console.error(Ld)}}))}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 Es(){}
191
+ */function ws(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 bs{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=Es),void 0===n.error&&(n.error=Es),void 0===n.complete&&(n.complete=Es);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(Ld){}})),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(Ld){"undefined"!=typeof console&&console.error&&console.error(Ld)}}))}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 Es(){}
192
192
  /**
193
193
  * @license
194
194
  * Copyright 2021 Google LLC
@@ -204,7 +204,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
204
204
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
205
  * See the License for the specific language governing permissions and
206
206
  * limitations under the License.
207
- */function ks(e){return e&&e._delegate?e._delegate:e}class Is{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,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}}
207
+ */function ks(e){return e&&e._delegate?e._delegate:e}class Is{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
208
  /**
209
209
  * @license
210
210
  * Copyright 2019 Google LLC
@@ -236,7 +236,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
236
236
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237
237
  * See the License for the specific language governing permissions and
238
238
  * limitations under the License.
239
- */class Cs{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 ps;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(Ld){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(Ld){if(r)return null;throw Ld}}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}
239
+ */class Cs{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 ps;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(Ld){}}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(Ld){if(n)return null;throw Ld}}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
240
  /**
241
241
  * @license
242
242
  * Copyright 2019 Google LLC
@@ -252,7 +252,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
252
252
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
253
253
  * See the License for the specific language governing permissions and
254
254
  * limitations under the License.
255
- */(e))try{this.getOrInitializeService({instanceIdentifier:Ts})}catch(Ld){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(Ld){}}}}clearInstance(e=Ts){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=Ts){return this.instances.has(e)}getOptions(e=Ts){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(r){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===Ts?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(i){}var r;return n||null}normalizeInstanceIdentifier(e=Ts){return this.component?this.component.multipleInstances?e:Ts:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ss{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 Cs(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
255
+ */(e))try{this.getOrInitializeService({instanceIdentifier:Ts})}catch(Ld){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(Ld){}}}}clearInstance(e=Ts){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=Ts){return this.instances.has(e)}getOptions(e=Ts){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===Ts?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=Ts){return this.component?this.component.multipleInstances?e:Ts:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ss{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 Cs(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
256
256
  /**
257
257
  * @license
258
258
  * Copyright 2017 Google LLC
@@ -268,7 +268,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
268
268
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269
269
  * See the License for the specific language governing permissions and
270
270
  * limitations under the License.
271
- */var Rs,Os;(Os=Rs||(Rs={}))[Os.DEBUG=0]="DEBUG",Os[Os.VERBOSE=1]="VERBOSE",Os[Os.INFO=2]="INFO",Os[Os.WARN=3]="WARN",Os[Os.ERROR=4]="ERROR",Os[Os.SILENT=5]="SILENT";const As={debug:Rs.DEBUG,verbose:Rs.VERBOSE,info:Rs.INFO,warn:Rs.WARN,error:Rs.ERROR,silent:Rs.SILENT},Ps=Rs.INFO,Ns={[Rs.DEBUG]:"log",[Rs.VERBOSE]:"log",[Rs.INFO]:"info",[Rs.WARN]:"warn",[Rs.ERROR]:"error"},xs=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=Ns[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)};class Ls{constructor(e){this.name=e,this._logLevel=Ps,this._logHandler=xs,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Rs))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?As[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,Rs.DEBUG,...e),this._logHandler(this,Rs.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Rs.VERBOSE,...e),this._logHandler(this,Rs.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Rs.INFO,...e),this._logHandler(this,Rs.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Rs.WARN,...e),this._logHandler(this,Rs.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Rs.ERROR,...e),this._logHandler(this,Rs.ERROR,...e)}}const Ds=(e,t)=>t.some((t=>e instanceof t));let Ms,Us;const js=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,zs=new WeakMap,Hs=new WeakMap;let Vs={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Fs.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Bs.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ws(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function $s(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Us||(Us=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ks(this),t),Ws(js.get(this))}:function(...t){return Ws(e.apply(Ks(this),t))}:function(t,...n){const r=e.call(Ks(this),t,...n);return Bs.set(r,t.sort?t.sort():[t]),Ws(r)}}function qs(e){return"function"==typeof e?$s(e):(e instanceof IDBTransaction&&function(e){if(Fs.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));Fs.set(e,t)}(e),Ds(e,Ms||(Ms=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Vs):e)}function Ws(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Ws(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&js.set(t,e)})).catch((()=>{})),Hs.set(t,e),t}(e);if(zs.has(e))return zs.get(e);const t=qs(e);return t!==e&&(zs.set(e,t),Hs.set(t,e)),t}const Ks=e=>Hs.get(e);const Gs=["get","getKey","getAll","getAllKeys","count"],Js=["put","add","delete","clear"],Ys=new Map;function Qs(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ys.get(t))return Ys.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Js.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Gs.includes(n))return;const o=async function(e,...t){const o=this.transaction(e,i?"readwrite":"readonly");let s=o.store;return r&&(s=s.index(t.shift())),(await Promise.all([s[n](...t),i&&o.done]))[0]};return Ys.set(t,o),o}Vs=(e=>({...e,get:(t,n,r)=>Qs(t,n)||e.get(t,n,r),has:(t,n)=>!!Qs(t,n)||e.has(t,n)}))(Vs);
271
+ */var Rs,Os;(Os=Rs||(Rs={}))[Os.DEBUG=0]="DEBUG",Os[Os.VERBOSE=1]="VERBOSE",Os[Os.INFO=2]="INFO",Os[Os.WARN=3]="WARN",Os[Os.ERROR=4]="ERROR",Os[Os.SILENT=5]="SILENT";const As={debug:Rs.DEBUG,verbose:Rs.VERBOSE,info:Rs.INFO,warn:Rs.WARN,error:Rs.ERROR,silent:Rs.SILENT},Ps=Rs.INFO,Ns={[Rs.DEBUG]:"log",[Rs.VERBOSE]:"log",[Rs.INFO]:"info",[Rs.WARN]:"warn",[Rs.ERROR]:"error"},xs=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),i=Ns[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${n}] ${e.name}:`,...r)};class Ls{constructor(e){this.name=e,this._logLevel=Ps,this._logHandler=xs,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Rs))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?As[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,Rs.DEBUG,...e),this._logHandler(this,Rs.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Rs.VERBOSE,...e),this._logHandler(this,Rs.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Rs.INFO,...e),this._logHandler(this,Rs.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Rs.WARN,...e),this._logHandler(this,Rs.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Rs.ERROR,...e),this._logHandler(this,Rs.ERROR,...e)}}const Ds=(e,t)=>t.some((t=>e instanceof t));let Ms,Us;const js=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,zs=new WeakMap,Hs=new WeakMap;let Vs={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return Fs.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Bs.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ws(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function $s(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Us||(Us=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ks(this),t),Ws(js.get(this))}:function(...t){return Ws(e.apply(Ks(this),t))}:function(t,...r){const n=e.call(Ks(this),t,...r);return Bs.set(n,t.sort?t.sort():[t]),Ws(n)}}function qs(e){return"function"==typeof e?$s(e):(e instanceof IDBTransaction&&function(e){if(Fs.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)}));Fs.set(e,t)}(e),Ds(e,Ms||(Ms=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Vs):e)}function Ws(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(Ws(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&js.set(t,e)})).catch((()=>{})),Hs.set(t,e),t}(e);if(zs.has(e))return zs.get(e);const t=qs(e);return t!==e&&(zs.set(e,t),Hs.set(t,e)),t}const Ks=e=>Hs.get(e);const Gs=["get","getKey","getAll","getAllKeys","count"],Js=["put","add","delete","clear"],Ys=new Map;function Qs(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ys.get(t))return Ys.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Js.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!Gs.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 Ys.set(t,o),o}Vs=(e=>({...e,get:(t,r,n)=>Qs(t,r)||e.get(t,r,n),has:(t,r)=>!!Qs(t,r)||e.has(t,r)}))(Vs);
272
272
  /**
273
273
  * @license
274
274
  * Copyright 2019 Google LLC
@@ -285,7 +285,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
285
285
  * See the License for the specific language governing permissions and
286
286
  * limitations under the License.
287
287
  */
288
- class Xs{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 Zs="@firebase/app",ea="0.9.22",ta=new Ls("@firebase/app"),na="[DEFAULT]",ra={[Zs]:"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"},ia=new Map,oa=new Map;function sa(e,t){try{e.container.addComponent(t)}catch(Ld){ta.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,Ld)}}function aa(e){const t=e.name;if(oa.has(t))return ta.debug(`There were multiple attempts to register component ${t}.`),!1;oa.set(t,e);for(const n of ia.values())sa(n,e);return!0}function ca(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}
288
+ class Xs{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 Zs="@firebase/app",ea="0.9.22",ta=new Ls("@firebase/app"),ra="[DEFAULT]",na={[Zs]:"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"},ia=new Map,oa=new Map;function sa(e,t){try{e.container.addComponent(t)}catch(Ld){ta.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,Ld)}}function aa(e){const t=e.name;if(oa.has(t))return ta.debug(`There were multiple attempts to register component ${t}.`),!1;oa.set(t,e);for(const r of ia.values())sa(r,e);return!0}function ca(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
289
289
  /**
290
290
  * @license
291
291
  * Copyright 2019 Google LLC
@@ -318,7 +318,7 @@ class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.con
318
318
  * See the License for the specific language governing permissions and
319
319
  * limitations under the License.
320
320
  */
321
- class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Is("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 la.create("app-deleted",{appName:this._name})}}
321
+ class ua{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 Is("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 la.create("app-deleted",{appName:this._name})}}
322
322
  /**
323
323
  * @license
324
324
  * Copyright 2019 Google LLC
@@ -334,7 +334,7 @@ class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e)
334
334
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
335
335
  * See the License for the specific language governing permissions and
336
336
  * limitations under the License.
337
- */const da="10.5.2";function ha(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r=Object.assign({name:na,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw la.create("bad-app-name",{appName:String(i)});if(n||(n=ds()),!n)throw la.create("no-options");const o=ia.get(i);if(o){if(vs(n,o.options)&&vs(r,o.config))return o;throw la.create("duplicate-app",{appName:i})}const s=new Ss(i);for(const c of oa.values())s.addComponent(c);const a=new ua(n,r,s);return ia.set(i,a),a}function pa(e,t,n){var r;let i=null!==(r=ra[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);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 ta.warn(e.join(" "))}aa(new Is(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
337
+ */const da="10.5.2";function ha(e,t={}){let r=e;if("object"!=typeof t){t={name:t}}const n=Object.assign({name:ra,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw la.create("bad-app-name",{appName:String(i)});if(r||(r=ds()),!r)throw la.create("no-options");const o=ia.get(i);if(o){if(vs(r,o.options)&&vs(n,o.config))return o;throw la.create("duplicate-app",{appName:i})}const s=new Ss(i);for(const c of oa.values())s.addComponent(c);const a=new ua(r,n,s);return ia.set(i,a),a}function pa(e,t,r){var n;let i=null!==(n=na[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 ta.warn(e.join(" "))}aa(new Is(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
338
338
  /**
339
339
  * @license
340
340
  * Copyright 2021 Google LLC
@@ -350,7 +350,7 @@ class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e)
350
350
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351
351
  * See the License for the specific language governing permissions and
352
352
  * limitations under the License.
353
- */const fa="firebase-heartbeat-database",ma=1,ga="firebase-heartbeat-store";let _a=null;function va(){return _a||(_a=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Ws(s);return r&&s.addEventListener("upgradeneeded",(e=>{r(Ws(s.result),e.oldVersion,e.newVersion,Ws(s.transaction),e)})),n&&s.addEventListener("blocked",(e=>n(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}(fa,ma,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ga)}}).catch((e=>{throw la.create("idb-open",{originalErrorMessage:e.message})}))),_a}async function ya(e,t){try{const n=(await va()).transaction(ga,"readwrite"),r=n.objectStore(ga);await r.put(t,wa(e)),await n.done}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-set",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}function wa(e){return`${e.name}!${e.options.appId}`}
353
+ */const fa="firebase-heartbeat-database",ma=1,ga="firebase-heartbeat-store";let _a=null;function va(){return _a||(_a=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Ws(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Ws(s.result),e.oldVersion,e.newVersion,Ws(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}(fa,ma,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ga)}}).catch((e=>{throw la.create("idb-open",{originalErrorMessage:e.message})}))),_a}async function ya(e,t){try{const r=(await va()).transaction(ga,"readwrite"),n=r.objectStore(ga);await n.put(t,wa(e)),await r.done}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-set",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}function wa(e){return`${e.name}!${e.options.appId}`}
354
354
  /**
355
355
  * @license
356
356
  * Copyright 2021 Google LLC
@@ -366,7 +366,7 @@ class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e)
366
366
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367
367
  * See the License for the specific language governing permissions and
368
368
  * limitations under the License.
369
- */class ba{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ka(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ea();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=Ea(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Ia(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Ia(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=as(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function Ea(){return(new Date).toISOString().substring(0,10)}class ka{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(Ld){return!1}}()&&new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(n){t(n)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await va();return await t.transaction(ga).objectStore(ga).get(wa(e))}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-get",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Ia(e){return as(JSON.stringify({version:2,heartbeats:e})).length}
369
+ */class ba{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ka(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ea();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=Ea(),{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),Ia(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),Ia(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=as(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 Ea(){return(new Date).toISOString().substring(0,10)}class ka{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(Ld){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 va();return await t.transaction(ga).objectStore(ga).get(wa(e))}catch(Ld){if(Ld instanceof ms)ta.warn(Ld.message);else{const t=la.create("idb-get",{originalErrorMessage:null==Ld?void 0:Ld.message});ta.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(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 ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function Ia(e){return as(JSON.stringify({version:2,heartbeats:e})).length}
370
370
  /**
371
371
  * @license
372
372
  * Copyright 2019 Google LLC
@@ -382,7 +382,7 @@ class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e)
382
382
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
383
383
  * See the License for the specific language governing permissions and
384
384
  * limitations under the License.
385
- */var Ta;function Ca(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Sa(){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."}}Ta="",aa(new Is("platform-logger",(e=>new Xs(e)),"PRIVATE")),aa(new Is("heartbeat",(e=>new ba(e)),"PRIVATE")),pa(Zs,ea,Ta),pa(Zs,ea,"esm2017"),pa("fire-js",""),"function"==typeof SuppressedError&&SuppressedError;const Ra=Sa,Oa=new gs("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."}),Aa="auth/captcha-check-failed",Pa="auth/invalid-verification-code",Na="auth/invalid-credential",xa="auth/invalid-phone-number",La="auth/invalid-verification-id",Da="auth/missing-phone-number",Ma="auth/user-disabled",Ua=new Ls("@firebase/auth");function ja(e,...t){Ua.logLevel<=Rs.ERROR&&Ua.error(`Auth (${da}): ${e}`,...t)}
385
+ */var Ta;function Ca(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 Sa(){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."}}Ta="",aa(new Is("platform-logger",(e=>new Xs(e)),"PRIVATE")),aa(new Is("heartbeat",(e=>new ba(e)),"PRIVATE")),pa(Zs,ea,Ta),pa(Zs,ea,"esm2017"),pa("fire-js",""),"function"==typeof SuppressedError&&SuppressedError;const Ra=Sa,Oa=new gs("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."}),Aa="auth/captcha-check-failed",Pa="auth/invalid-verification-code",Na="auth/invalid-credential",xa="auth/invalid-phone-number",La="auth/invalid-verification-id",Da="auth/missing-phone-number",Ma="auth/user-disabled",Ua=new Ls("@firebase/auth");function ja(e,...t){Ua.logLevel<=Rs.ERROR&&Ua.error(`Auth (${da}): ${e}`,...t)}
386
386
  /**
387
387
  * @license
388
388
  * Copyright 2020 Google LLC
@@ -398,7 +398,7 @@ class ua{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e)
398
398
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
399
399
  * See the License for the specific language governing permissions and
400
400
  * limitations under the License.
401
- */function Fa(e,...t){throw za(e,...t)}function Ba(e,...t){return za(e,...t)}function za(e,...t){if("string"!=typeof e){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return Oa.create(e,...t)}function Ha(e,t,...n){if(!e)throw za(t,...n)}function Va(e){const t="INTERNAL ASSERTION FAILED: "+e;throw ja(t),new Error(t)}function $a(e,t){e||Va(t)}
401
+ */function Fa(e,...t){throw za(e,...t)}function Ba(e,...t){return za(e,...t)}function za(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 Oa.create(e,...t)}function Ha(e,t,...r){if(!e)throw za(t,...r)}function Va(e){const t="INTERNAL ASSERTION FAILED: "+e;throw ja(t),new Error(t)}function $a(e,t){e||Va(t)}
402
402
  /**
403
403
  * @license
404
404
  * Copyright 2020 Google LLC
@@ -463,7 +463,7 @@ class Ja{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
463
463
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464
464
  * See the License for the specific language governing permissions and
465
465
  * limitations under the License.
466
- */function Ya(e,t){$a(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}
466
+ */function Ya(e,t){$a(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}
467
467
  /**
468
468
  * @license
469
469
  * Copyright 2020 Google LLC
@@ -479,7 +479,7 @@ class Ja{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
479
479
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
480
  * See the License for the specific language governing permissions and
481
481
  * limitations under the License.
482
- */class Qa{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}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 Va("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 Va("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 Va("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
482
+ */class Qa{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 Va("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 Va("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 Va("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
483
483
  /**
484
484
  * @license
485
485
  * Copyright 2020 Google LLC
@@ -511,7 +511,7 @@ class Ja{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
511
511
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
512
512
  * See the License for the specific language governing permissions and
513
513
  * limitations under the License.
514
- */function ec(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function tc(e,t,n,r,i={}){return nc(e,i,(async()=>{let i={},o={};r&&("GET"===t?o=r:i={body:JSON.stringify(r)});const s=ws(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),Qa.fetch()(ic(e,e.config.apiHost,n,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function nc(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},Xa),t);try{const t=new oc(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw sc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[n,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw sc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw sc(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw sc(e,"user-disabled",o);const a=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,n){const r=Object.assign(Object.assign({},Ra()),{[t]:n});return new gs("auth","Firebase",r).create(t,{appName:e.name})}(e,a,s);Fa(e,a)}}catch(Ld){if(Ld instanceof ms)throw Ld;Fa(e,"network-request-failed",{message:String(Ld)})}}async function rc(e,t,n,r,i={}){const o=await tc(e,t,n,r,i);return"mfaPendingCredential"in o&&Fa(e,"multi-factor-auth-required",{_serverResponse:o}),o}function ic(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?Ya(e.config,i):`${e.config.apiScheme}://${i}`}class oc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Ba(this.auth,"network-request-failed"))),Za.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function sc(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Ba(e,t,r);return i.customData._tokenResponse=n,i}
514
+ */function ec(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function tc(e,t,r,n,i={}){return rc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ws(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),Qa.fetch()(ic(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function rc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Xa),t);try{const t=new oc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw sc(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 sc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw sc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw sc(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({},Ra()),{[t]:r});return new gs("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);Fa(e,a)}}catch(Ld){if(Ld instanceof ms)throw Ld;Fa(e,"network-request-failed",{message:String(Ld)})}}async function nc(e,t,r,n,i={}){const o=await tc(e,t,r,n,i);return"mfaPendingCredential"in o&&Fa(e,"multi-factor-auth-required",{_serverResponse:o}),o}function ic(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ya(e.config,i):`${e.config.apiScheme}://${i}`}class oc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Ba(this.auth,"network-request-failed"))),Za.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function sc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=Ba(e,t,n);return i.customData._tokenResponse=r,i}
515
515
  /**
516
516
  * @license
517
517
  * Copyright 2020 Google LLC
@@ -560,7 +560,7 @@ class Ja{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
560
560
  * See the License for the specific language governing permissions and
561
561
  * limitations under the License.
562
562
  */
563
- function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(Ld){}}function lc(e){return 1e3*Number(e)}function uc(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return ja("JWT malformed, contained fewer than 3 sections"),null;try{const e=cs(n);return e?JSON.parse(e):(ja("Failed to decode base64 JWT payload"),null)}catch(Ld){return ja("Caught error parsing JWT payload as JSON",null==Ld?void 0:Ld.toString()),null}}
563
+ function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(Ld){}}function lc(e){return 1e3*Number(e)}function uc(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return ja("JWT malformed, contained fewer than 3 sections"),null;try{const e=cs(r);return e?JSON.parse(e):(ja("Failed to decode base64 JWT payload"),null)}catch(Ld){return ja("Caught error parsing JWT payload as JSON",null==Ld?void 0:Ld.toString()),null}}
564
564
  /**
565
565
  * @license
566
566
  * Copyright 2020 Google LLC
@@ -577,7 +577,7 @@ function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))retur
577
577
  * See the License for the specific language governing permissions and
578
578
  * limitations under the License.
579
579
  */
580
- async function dc(e,t,n=!1){if(n)return t;try{return await t}catch(Ld){throw Ld instanceof ms&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
580
+ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Ld){throw Ld instanceof ms&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
581
581
  /**
582
582
  * @license
583
583
  * Copyright 2020 Google LLC
@@ -625,7 +625,7 @@ async function dc(e,t,n=!1){if(n)return t;try{return await t}catch(Ld){throw Ld
625
625
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
626
626
  * See the License for the specific language governing permissions and
627
627
  * limitations under the License.
628
- */async function fc(e){var t;const n=e.auth,r=await e.getIdToken(),i=await dc(e,async function(e,t){return tc(e,"POST","/v1/accounts:lookup",t)}(n,{idToken:r}));Ha(null==i?void 0:i.users.length,n,"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,n=Ca(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.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 pc(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,p)}
628
+ */async function fc(e){var t;const r=e.auth,n=await e.getIdToken(),i=await dc(e,async function(e,t){return tc(e,"POST","/v1/accounts:lookup",t)}(r,{idToken:n}));Ha(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=Ca(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 pc(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,p)}
629
629
  /**
630
630
  * @license
631
631
  * Copyright 2020 Google LLC
@@ -642,7 +642,7 @@ async function dc(e,t,n=!1){if(n)return t;try{return await t}catch(Ld){throw Ld
642
642
  * See the License for the specific language governing permissions and
643
643
  * limitations under the License.
644
644
  */
645
- class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ha(e.idToken,"internal-error"),Ha(void 0!==e.idToken,"internal-error"),Ha(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=uc(e);return Ha(t,"internal-error"),Ha(void 0!==t.exp,"internal-error"),Ha(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 Ha(!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:n,refreshToken:r,expiresIn:i}=
645
+ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ha(e.idToken,"internal-error"),Ha(void 0!==e.idToken,"internal-error"),Ha(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=uc(e);return Ha(t,"internal-error"),Ha(void 0!==t.exp,"internal-error"),Ha(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 Ha(!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
646
  /**
647
647
  * @license
648
648
  * Copyright 2020 Google LLC
@@ -658,7 +658,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
658
658
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
659
659
  * See the License for the specific language governing permissions and
660
660
  * limitations under the License.
661
- */await async function(e,t){const n=await nc(e,{},(async()=>{const n=ws({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,o=ic(e,r,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",Qa.fetch()(o,{method:"POST",headers:s,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new mc;return n&&(Ha("string"==typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(Ha("string"==typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(Ha("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 mc,this.toJSON())}_performRefresh(){return Va("not implemented")}}
661
+ */await async function(e,t){const r=await rc(e,{},(async()=>{const r=ws({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,o=ic(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",Qa.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 mc;return r&&(Ha("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),n&&(Ha("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),i&&(Ha("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 mc,this.toJSON())}_performRefresh(){return Va("not implemented")}}
662
662
  /**
663
663
  * @license
664
664
  * Copyright 2020 Google LLC
@@ -674,7 +674,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
674
674
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675
675
  * See the License for the specific language governing permissions and
676
676
  * limitations under the License.
677
- */function gc(e,t){Ha("string"==typeof e||void 0===e,"internal-error",{appName:t})}class _c{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=Ca(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.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 pc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await dc(this,this.stsTokenManager.getToken(this.auth,e));return Ha(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 n=ks(e),r=await n.getIdToken(t),i=uc(r);Ha(i&&i.exp&&i.auth_time&&i.iat,n.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:r,authTime:cc(lc(i.auth_time)),issuedAtTime:cc(lc(i.iat)),expirationTime:cc(lc(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=ks(e);await fc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Ha(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 _c(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Ha(!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 n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await fc(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await dc(this,
677
+ */function gc(e,t){Ha("string"==typeof e||void 0===e,"internal-error",{appName:t})}class _c{constructor(e){var{uid:t,auth:r,stsTokenManager:n}=e,i=Ca(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hc(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 pc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await dc(this,this.stsTokenManager.getToken(this.auth,e));return Ha(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=ks(e),n=await r.getIdToken(t),i=uc(n);Ha(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:cc(lc(i.auth_time)),issuedAtTime:cc(lc(i.iat)),expirationTime:cc(lc(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=ks(e);await fc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Ha(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 _c(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Ha(!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 fc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await dc(this,
678
678
  /**
679
679
  * @license
680
680
  * Copyright 2020 Google LLC
@@ -691,7 +691,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
691
691
  * See the License for the specific language governing permissions and
692
692
  * limitations under the License.
693
693
  */
694
- async function(e,t){return tc(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 n,r,i,o,s,a,c,l;const u=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r: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;Ha(v&&E,e,"internal-error");const k=mc.fromJSON(this.name,E);Ha("string"==typeof v,e,"internal-error"),gc(u,e.name),gc(d,e.name),Ha("boolean"==typeof y,e,"internal-error"),Ha("boolean"==typeof w,e,"internal-error"),gc(h,e.name),gc(p,e.name),gc(f,e.name),gc(m,e.name),gc(g,e.name),gc(_,e.name);const I=new _c({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,n=!1){const r=new mc;r.updateFromServerResponse(t);const i=new _c({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await fc(i),i}}
694
+ async function(e,t){return tc(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;Ha(v&&E,e,"internal-error");const k=mc.fromJSON(this.name,E);Ha("string"==typeof v,e,"internal-error"),gc(u,e.name),gc(d,e.name),Ha("boolean"==typeof y,e,"internal-error"),Ha("boolean"==typeof w,e,"internal-error"),gc(h,e.name),gc(p,e.name),gc(f,e.name),gc(m,e.name),gc(g,e.name),gc(_,e.name);const I=new _c({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 mc;n.updateFromServerResponse(t);const i=new _c({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await fc(i),i}}
695
695
  /**
696
696
  * @license
697
697
  * Copyright 2020 Google LLC
@@ -739,7 +739,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
739
739
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
740
740
  * See the License for the specific language governing permissions and
741
741
  * limitations under the License.
742
- */function Ec(e,t,n){return`firebase:${e}:${t}:${n}`}class kc{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Ec(this.userKey,r.apiKey,i),this.fullPersistenceKey=Ec("persistence",r.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?_c._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,n="authUser"){if(!t.length)return new kc(yc(bc),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||yc(bc);const o=Ec(n,e.config.apiKey,e.name);let s=null;for(const l of t)try{const t=await l._get(o);if(t){const n=_c._fromJSON(e,t);l!==i&&(s=n),i=l;break}}catch(c){}const a=r.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 kc(i,e,n)):new kc(i,e,n)}}
742
+ */function Ec(e,t,r){return`firebase:${e}:${t}:${r}`}class kc{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=Ec(this.userKey,n.apiKey,i),this.fullPersistenceKey=Ec("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?_c._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 kc(yc(bc),e,r);const n=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=n[0]||yc(bc);const o=Ec(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=_c._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 kc(i,e,r)):new kc(i,e,r)}}
743
743
  /**
744
744
  * @license
745
745
  * Copyright 2020 Google LLC
@@ -755,7 +755,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
755
755
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756
756
  * See the License for the specific language governing permissions and
757
757
  * limitations under the License.
758
- */function Ic(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Rc(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Tc(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ac(t))return"Blackberry";if(Pc(t))return"Webos";if(Cc(t))return"Safari";if((t.includes("chrome/")||Sc(t))&&!t.includes("edge/"))return"Chrome";if(Oc(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function Tc(e=fs()){return/firefox\//i.test(e)}function Cc(e=fs()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Sc(e=fs()){return/crios\//i.test(e)}function Rc(e=fs()){return/iemobile/i.test(e)}function Oc(e=fs()){return/android/i.test(e)}function Ac(e=fs()){return/blackberry/i.test(e)}function Pc(e=fs()){return/webos/i.test(e)}function Nc(e=fs()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function xc(){return function(){const e=fs();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Lc(e=fs()){return Nc(e)||Oc(e)||Pc(e)||Ac(e)||/windows phone/i.test(e)||Rc(e)}
758
+ */function Ic(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Rc(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Tc(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ac(t))return"Blackberry";if(Pc(t))return"Webos";if(Cc(t))return"Safari";if((t.includes("chrome/")||Sc(t))&&!t.includes("edge/"))return"Chrome";if(Oc(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 Tc(e=fs()){return/firefox\//i.test(e)}function Cc(e=fs()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Sc(e=fs()){return/crios\//i.test(e)}function Rc(e=fs()){return/iemobile/i.test(e)}function Oc(e=fs()){return/android/i.test(e)}function Ac(e=fs()){return/blackberry/i.test(e)}function Pc(e=fs()){return/webos/i.test(e)}function Nc(e=fs()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function xc(){return function(){const e=fs();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Lc(e=fs()){return Nc(e)||Oc(e)||Pc(e)||Ac(e)||/windows phone/i.test(e)||Rc(e)}
759
759
  /**
760
760
  * @license
761
761
  * Copyright 2020 Google LLC
@@ -772,7 +772,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
772
772
  * See the License for the specific language governing permissions and
773
773
  * limitations under the License.
774
774
  */
775
- function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":n=`${Ic(fs())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${da}/${r}`}
775
+ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":r=`${Ic(fs())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${da}/${n}`}
776
776
  /**
777
777
  * @license
778
778
  * Copyright 2022 Google LLC
@@ -788,7 +788,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
788
788
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
789
789
  * See the License for the specific language governing permissions and
790
790
  * limitations under the License.
791
- */class Mc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(Ld){r(Ld)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(Ld){t.reverse();for(const r of t)try{r()}catch(n){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==Ld?void 0:Ld.message})}}}
791
+ */class Mc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(Ld){n(Ld)}}));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(Ld){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==Ld?void 0:Ld.message})}}}
792
792
  /**
793
793
  * @license
794
794
  * Copyright 2023 Google LLC
@@ -804,7 +804,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
804
804
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
805
805
  * See the License for the specific language governing permissions and
806
806
  * limitations under the License.
807
- */class Uc{constructor(e){var t,n,r,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!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,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===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),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 n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}
807
+ */class Uc{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
808
  /**
809
809
  * @license
810
810
  * Copyright 2020 Google LLC
@@ -820,7 +820,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
820
820
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
821
  * See the License for the specific language governing permissions and
822
822
  * limitations under the License.
823
- */class jc{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Bc(this),this.idTokenSubscription=new Bc(this),this.beforeStateQueue=new Mc(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=Oa,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=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=yc(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await kc.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(Ld){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.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 n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);n&&n!==o||!(null==s?void 0:s.user)||(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(Ld){r=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(Ld)))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Ha(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(Ld){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await fc(e)}catch(Ld){if("auth/network-request-failed"!==(null==Ld?void 0:Ld.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?ks(e):null;return t&&Ha(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&&Ha(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(yc(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 tc(e,"GET","/v2/passwordPolicy",ec(e,t))}
823
+ */class jc{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 Bc(this),this.idTokenSubscription=new Bc(this),this.beforeStateQueue=new Mc(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=Oa,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=yc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await kc.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(Ld){}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(Ld){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(Ld)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ha(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(Ld){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await fc(e)}catch(Ld){if("auth/network-request-failed"!==(null==Ld?void 0:Ld.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?ks(e):null;return t&&Ha(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&&Ha(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(yc(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 tc(e,"GET","/v2/passwordPolicy",ec(e,t))}
824
824
  /**
825
825
  * @license
826
826
  * Copyright 2023 Google LLC
@@ -836,7 +836,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
836
836
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
837
837
  * See the License for the specific language governing permissions and
838
838
  * limitations under the License.
839
- */(this),t=new Uc(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new gs("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged((()=>{n(),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 n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&yc(e)||this._popupRedirectResolver;Ha(t,this,"argument-error"),this.redirectPersistenceManager=await kc.create(this,[yc(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._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 n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){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(Ha(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"==typeof t){const i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{const n=e.addObserver(t);return()=>{o=!0,n()}}}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 Ha(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Dc(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 n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),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){Ua.logLevel<=Rs.WARN&&Ua.warn(`Auth (${da}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function Fc(e){return ks(e)}class Bc{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new bs(e,t);return n.subscribe.bind(n)}((e=>this.observer=e))}get next(){return Ha(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
839
+ */(this),t=new Uc(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new gs("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&&yc(e)||this._popupRedirectResolver;Ha(t,this,"argument-error"),this.redirectPersistenceManager=await kc.create(this,[yc(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(Ha(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 Ha(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Dc(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){Ua.logLevel<=Rs.WARN&&Ua.warn(`Auth (${da}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function Fc(e){return ks(e)}class Bc{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const r=new bs(e,t);return r.subscribe.bind(r)}((e=>this.observer=e))}get next(){return Ha(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
840
840
  /**
841
841
  * @license
842
842
  * Copyright 2020 Google LLC
@@ -852,7 +852,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
852
852
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
853
853
  * See the License for the specific language governing permissions and
854
854
  * limitations under the License.
855
- */function zc(e){return new Promise(((t,n)=>{const r=document.createElement("script");var i,o;r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=Ba("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",(null!==(o=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==o?o:document).appendChild(r)}))}function Hc(e){return`__${e}${Math.floor(1e6*Math.random())}`}
855
+ */function zc(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=Ba("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 Hc(e){return`__${e}${Math.floor(1e6*Math.random())}`}
856
856
  /**
857
857
  * @license
858
858
  * Copyright 2020 Google LLC
@@ -868,7 +868,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
868
868
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
869
869
  * See the License for the specific language governing permissions and
870
870
  * limitations under the License.
871
- */function Vc(e,t,n){const r=Fc(e);Ha(r._canInitEmulator,r,"emulator-config-failed"),Ha(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null==n?void 0:n.disableWarnings),o=$c(t),{host:s,port:a}=function(e){const t=$c(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:qc(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:qc(t)}}}(t),c=null===a?"":`:${a}`;r.config.emulator={url:`${o}//${s}${c}/`},r.settings.appVerificationDisabledForTesting=!0,r.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())}
871
+ */function Vc(e,t,r){const n=Fc(e);Ha(n._canInitEmulator,n,"emulator-config-failed"),Ha(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!!(null==r?void 0:r.disableWarnings),o=$c(t),{host:s,port:a}=function(e){const t=$c(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:qc(n.substr(e.length+1))}}{const[e,t]=n.split(":");return{host:e,port:qc(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
872
  /**
873
873
  * @license
874
874
  * Copyright 2020 Google LLC
@@ -900,7 +900,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
900
900
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
901
901
  * See the License for the specific language governing permissions and
902
902
  * limitations under the License.
903
- */async function Kc(e,t){return rc(e,"POST","/v1/accounts:signInWithIdp",ec(e,t))}
903
+ */async function Kc(e,t){return nc(e,"POST","/v1/accounts:signInWithIdp",ec(e,t))}
904
904
  /**
905
905
  * @license
906
906
  * Copyright 2020 Google LLC
@@ -916,7 +916,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
916
916
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
917
917
  * See the License for the specific language governing permissions and
918
918
  * limitations under the License.
919
- */class Gc extends Wc{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Gc(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):Fa("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:n,signInMethod:r}=t,i=Ca(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new Gc(n,r);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 Kc(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,Kc(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Kc(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=ws(t)}return e}}
919
+ */class Gc extends Wc{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Gc(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):Fa("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=Ca(t,["providerId","signInMethod"]);if(!r||!n)return null;const o=new Gc(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 Kc(e,this.buildRequest())}_linkToIdToken(e,t){const r=this.buildRequest();return r.idToken=t,Kc(e,r)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Kc(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=ws(t)}return e}}
920
920
  /**
921
921
  * @license
922
922
  * Copyright 2020 Google LLC
@@ -949,7 +949,7 @@ function Dc(e,t=[]){let n;switch(e){case"Browser":n=Ic(fs());break;case"Worker":
949
949
  * See the License for the specific language governing permissions and
950
950
  * limitations under the License.
951
951
  */
952
- class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Yc({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Yc({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return rc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await rc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t));if(n.temporaryProof)throw sc(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return rc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Jc)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}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:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new Yc({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}
952
+ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Yc({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Yc({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const r=await nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t));if(r.temporaryProof)throw sc(e,"account-exists-with-different-credential",r);return r}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Jc)}(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 Yc({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}
953
953
  /**
954
954
  * @license
955
955
  * Copyright 2020 Google LLC
@@ -1014,7 +1014,7 @@ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _
1014
1014
  * See the License for the specific language governing permissions and
1015
1015
  * limitations under the License.
1016
1016
  */
1017
- class el extends Xc{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Gc._fromParams({providerId:el.PROVIDER_ID,signInMethod:el.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return el.credentialFromTaggedObject(e)}static credentialFromError(e){return el.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return el.credential(t,n)}catch(r){return null}}}el.GOOGLE_SIGN_IN_METHOD="google.com",el.PROVIDER_ID="google.com";
1017
+ class el extends Xc{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Gc._fromParams({providerId:el.PROVIDER_ID,signInMethod:el.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return el.credentialFromTaggedObject(e)}static credentialFromError(e){return el.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return el.credential(t,r)}catch(n){return null}}}el.GOOGLE_SIGN_IN_METHOD="google.com",el.PROVIDER_ID="google.com";
1018
1018
  /**
1019
1019
  * @license
1020
1020
  * Copyright 2020 Google LLC
@@ -1048,7 +1048,7 @@ class tl extends Xc{constructor(){super("github.com")}static credential(e){retur
1048
1048
  * See the License for the specific language governing permissions and
1049
1049
  * limitations under the License.
1050
1050
  */
1051
- class nl extends Xc{constructor(){super("twitter.com")}static credential(e,t){return Gc._fromParams({providerId:nl.PROVIDER_ID,signInMethod:nl.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return nl.credentialFromTaggedObject(e)}static credentialFromError(e){return nl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return nl.credential(t,n)}catch(r){return null}}}nl.TWITTER_SIGN_IN_METHOD="twitter.com",nl.PROVIDER_ID="twitter.com";
1051
+ class rl extends Xc{constructor(){super("twitter.com")}static credential(e,t){return Gc._fromParams({providerId:rl.PROVIDER_ID,signInMethod:rl.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return rl.credentialFromTaggedObject(e)}static credentialFromError(e){return rl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return rl.credential(t,r)}catch(n){return null}}}rl.TWITTER_SIGN_IN_METHOD="twitter.com",rl.PROVIDER_ID="twitter.com";
1052
1052
  /**
1053
1053
  * @license
1054
1054
  * Copyright 2020 Google LLC
@@ -1065,7 +1065,7 @@ class nl extends Xc{constructor(){super("twitter.com")}static credential(e,t){re
1065
1065
  * See the License for the specific language governing permissions and
1066
1066
  * limitations under the License.
1067
1067
  */
1068
- class rl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){const i=await _c._fromIdTokenResponse(e,n,r),o=il(n);return new rl({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=il(n);return new rl({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function il(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
1068
+ class nl{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 _c._fromIdTokenResponse(e,r,n),o=il(r);return new nl({user:i,providerId:o,_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){await e._updateTokensIfNecessary(r,!0);const n=il(r);return new nl({user:e,providerId:n,_tokenResponse:r,operationType:t})}}function il(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
1069
1069
  /**
1070
1070
  * @license
1071
1071
  * Copyright 2020 Google LLC
@@ -1081,7 +1081,7 @@ class rl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._toke
1081
1081
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1082
1082
  * See the License for the specific language governing permissions and
1083
1083
  * limitations under the License.
1084
- */class ol extends ms{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,ol.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new ol(e,t,n,r)}}function sl(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw ol._fromErrorAndOperation(e,n,t,r);throw n}))}
1084
+ */class ol extends ms{constructor(e,t,r,n){var i;super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,ol.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 ol(e,t,r,n)}}function sl(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch((r=>{if("auth/multi-factor-auth-required"===r.code)throw ol._fromErrorAndOperation(e,r,t,n);throw r}))}
1085
1085
  /**
1086
1086
  * @license
1087
1087
  * Copyright 2020 Google LLC
@@ -1098,7 +1098,7 @@ class rl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._toke
1098
1098
  * See the License for the specific language governing permissions and
1099
1099
  * limitations under the License.
1100
1100
  */
1101
- async function al(e,t,n=!1){const r="signIn",i=await sl(e,r,t),o=await rl._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}const cl="__sak";
1101
+ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(o.user),o}const cl="__sak";
1102
1102
  /**
1103
1103
  * @license
1104
1104
  * Copyright 2019 Google LLC
@@ -1130,7 +1130,7 @@ async function al(e,t,n=!1){const r="signIn",i=await sl(e,r,t),o=await rl._fromI
1130
1130
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1131
1131
  * See the License for the specific language governing permissions and
1132
1132
  * limitations under the License.
1133
- */class ul extends ll{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=fs();return Cc(e)||Nc(e)}()&&function(){try{return!(!window||window===window.top)}catch(Ld){return!1}}(),this.fallbackToPolling=Lc(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);xc()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!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]}}ul.type="LOCAL";const dl=ul;
1133
+ */class ul extends ll{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=fs();return Cc(e)||Nc(e)}()&&function(){try{return!(!window||window===window.top)}catch(Ld){return!1}}(),this.fallbackToPolling=Lc(),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);xc()&&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]}}ul.type="LOCAL";const dl=ul;
1134
1134
  /**
1135
1135
  * @license
1136
1136
  * Copyright 2020 Google LLC
@@ -1179,7 +1179,7 @@ async function al(e,t,n=!1){const r="signIn",i=await sl(e,r,t),o=await rl._fromI
1179
1179
  * See the License for the specific language governing permissions and
1180
1180
  * limitations under the License.
1181
1181
  */
1182
- class fl{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 n=new fl(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});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:n,eventType:r,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)}}
1182
+ class fl{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 fl(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
1183
  /**
1184
1184
  * @license
1185
1185
  * Copyright 2020 Google LLC
@@ -1196,7 +1196,7 @@ class fl{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHa
1196
1196
  * See the License for the specific language governing permissions and
1197
1197
  * limitations under the License.
1198
1198
  */
1199
- function ml(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}
1199
+ function ml(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random());return e+r}
1200
1200
  /**
1201
1201
  * @license
1202
1202
  * Copyright 2019 Google LLC
@@ -1212,7 +1212,7 @@ function ml(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random
1212
1212
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
1213
  * See the License for the specific language governing permissions and
1214
1214
  * limitations under the License.
1215
- */fl.receivers=[];class gl{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,n=50){const r="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const c=ml("",20);r.port1.start();const l=setTimeout((()=>{a(new Error("unsupported_event"))}),n);o={messageChannel:r,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),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[r.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}
1215
+ */fl.receivers=[];class gl{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=ml("",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
1216
  /**
1217
1217
  * @license
1218
1218
  * Copyright 2020 Google LLC
@@ -1262,7 +1262,7 @@ function vl(){return void 0!==_l().WorkerGlobalScope&&"function"==typeof _l().im
1262
1262
  * See the License for the specific language governing permissions and
1263
1263
  * limitations under the License.
1264
1264
  */
1265
- const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class El{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 kl(e,t){return e.transaction([wl],t?"readwrite":"readonly").objectStore(wl)}function Il(){const e=indexedDB.open(yl,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(wl,{keyPath:bl})}catch(Ld){n(Ld)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(wl)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(yl);return new El(e).toPromise()}(),t(await Il()))}))}))}async function Tl(e,t,n){const r=kl(e,!0).put({[bl]:t,value:n});return new El(r).toPromise()}function Cl(e,t){const n=kl(e,!0).delete(t);return new El(n).toPromise()}class Sl{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 Il()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(Ld){if(t++>3)throw Ld;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return vl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fl._getInstance(vl()?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 gl(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[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 Il();return await Tl(e,cl,"1"),await Cl(e,cl),!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((n=>Tl(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=kl(e,!1).get(t),r=await new El(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Cl(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=kl(e,!1).getAll();return new El(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(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()}}Sl.type="LOCAL";const Rl=Sl;
1265
+ const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class El{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 kl(e,t){return e.transaction([wl],t?"readwrite":"readonly").objectStore(wl)}function Il(){const e=indexedDB.open(yl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(wl,{keyPath:bl})}catch(Ld){r(Ld)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(wl)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(yl);return new El(e).toPromise()}(),t(await Il()))}))}))}async function Tl(e,t,r){const n=kl(e,!0).put({[bl]:t,value:r});return new El(n).toPromise()}function Cl(e,t){const r=kl(e,!0).delete(t);return new El(r).toPromise()}class Sl{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 Il()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(Ld){if(t++>3)throw Ld;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return vl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fl._getInstance(vl()?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 gl(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 Il();return await Tl(e,cl,"1"),await Cl(e,cl),!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=>Tl(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=kl(e,!1).get(t),n=await new El(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=>Cl(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=kl(e,!1).getAll();return new El(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()}}Sl.type="LOCAL";const Rl=Sl;
1266
1266
  /**
1267
1267
  * @license
1268
1268
  * Copyright 2020 Google LLC
@@ -1295,7 +1295,7 @@ const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class
1295
1295
  * See the License for the specific language governing permissions and
1296
1296
  * limitations under the License.
1297
1297
  */
1298
- const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=new Map}render(e,t){const n=this.counter;return this._widgets.set(n,new Pl(e,this.auth.name,t||{})),this.counter++,n}reset(e){var t;const n=e||Ol;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}getResponse(e){var t;const n=e||Ol;return(null===(t=this._widgets.get(n))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const n=e||Ol;return null===(t=this._widgets.get(n))||void 0===t||t.execute(),""}}class Pl{constructor(e,t,n){this.params=n,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const r="string"==typeof e?document.getElementById(e):e;Ha(r,"argument-error",{appName:t}),this.container=r,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=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}
1298
+ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=new Map}render(e,t){const r=this.counter;return this._widgets.set(r,new Pl(e,this.auth.name,t||{})),this.counter++,r}reset(e){var t;const r=e||Ol;null===(t=this._widgets.get(r))||void 0===t||t.delete(),this._widgets.delete(r)}getResponse(e){var t;const r=e||Ol;return(null===(t=this._widgets.get(r))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const r=e||Ol;return null===(t=this._widgets.get(r))||void 0===t||t.execute(),""}}class Pl{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;Ha(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
1299
  /**
1300
1300
  * @license
1301
1301
  * Copyright 2020 Google LLC
@@ -1311,7 +1311,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1311
1311
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312
1312
  * See the License for the specific language governing permissions and
1313
1313
  * limitations under the License.
1314
- */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(Ld){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(Ld){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const Nl=Hc("rcb"),xl=new Ja(3e4,6e4);class Ll{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=_l().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ha(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ac(_l().grecaptcha)?Promise.resolve(_l().grecaptcha):new Promise(((n,r)=>{const i=_l().setTimeout((()=>{r(Ba(e,"network-request-failed"))}),xl.get());_l()[Nl]=()=>{_l().clearTimeout(i),delete _l()[Nl];const o=_l().grecaptcha;if(!o||!ac(o))return void r(Ba(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const n=s(e,t);return this.counter++,n},this.hostLanguage=t,n(o)};zc(`https://www.google.com/recaptcha/api.js??${ws({onload:Nl,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),r(Ba(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=_l().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class Dl{async load(e){return new Al(e)}clearedOneInstance(){}}
1314
+ */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(Ld){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(Ld){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const Nl=Hc("rcb"),xl=new Ja(3e4,6e4);class Ll{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=_l().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ha(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ac(_l().grecaptcha)?Promise.resolve(_l().grecaptcha):new Promise(((r,n)=>{const i=_l().setTimeout((()=>{n(Ba(e,"network-request-failed"))}),xl.get());_l()[Nl]=()=>{_l().clearTimeout(i),delete _l()[Nl];const o=_l().grecaptcha;if(!o||!ac(o))return void n(Ba(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)};zc(`https://www.google.com/recaptcha/api.js??${ws({onload:Nl,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(Ba(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=_l().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class Dl{async load(e){return new Al(e)}clearedOneInstance(){}}
1315
1315
  /**
1316
1316
  * @license
1317
1317
  * Copyright 2020 Google LLC
@@ -1327,7 +1327,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1327
1327
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1328
1328
  * See the License for the specific language governing permissions and
1329
1329
  * limitations under the License.
1330
- */const Ml="recaptcha",Ul={theme:"light",type:"image"};class jl{constructor(e,t,n=Object.assign({},Ul)){this.parameters=n,this.type=Ml,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Fc(e),this.isInvisible="invisible"===this.parameters.size,Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const r="string"==typeof t?document.getElementById(t):t;Ha(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Dl:new Ll,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),n=t.getResponse(e);return n||new Promise((n=>{const r=e=>{e&&(this.tokenChangeListeners.delete(r),n(e))};this.tokenChangeListeners.add(r),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(Ld){return Promise.reject(Ld)}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(){Ha(!this.parameters.sitekey,this.auth,"argument-error"),Ha(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ha("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 n=_l()[e];"function"==typeof n&&n(t)}}}assertNotDestroyed(){Ha(!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(){Ha(Wa()&&!vl(),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 tc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ha(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ha(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function Fl(e,t,n){var r;const i=await n.verify();try{let o;if(Ha("string"==typeof i,e,"argument-error"),Ha(n.type===Ml,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ha("enroll"===t.type,e,"internal-error");const n=
1330
+ */const Ml="recaptcha",Ul={theme:"light",type:"image"};class jl{constructor(e,t,r=Object.assign({},Ul)){this.parameters=r,this.type=Ml,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Fc(e),this.isInvisible="invisible"===this.parameters.size,Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ha(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Dl:new Ll,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(Ld){return Promise.reject(Ld)}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(){Ha(!this.parameters.sitekey,this.auth,"argument-error"),Ha(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ha("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=_l()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ha(!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(){Ha(Wa()&&!vl(),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 tc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ha(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ha(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function Fl(e,t,r){var n;const i=await r.verify();try{let o;if(Ha("string"==typeof i,e,"argument-error"),Ha(r.type===Ml,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ha("enroll"===t.type,e,"internal-error");const r=
1331
1331
  /**
1332
1332
  * @license
1333
1333
  * Copyright 2020 Google LLC
@@ -1343,7 +1343,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1343
1343
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344
1344
  * See the License for the specific language governing permissions and
1345
1345
  * limitations under the License.
1346
- */await function(e,t){return tc(e,"POST","/v2/accounts/mfaEnrollment:start",ec(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return n.phoneSessionInfo.sessionInfo}{Ha("signin"===t.type,e,"internal-error");const n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;Ha(n,e,"missing-multi-factor-info");const s=await function(e,t){return tc(e,"POST","/v2/accounts/mfaSignIn:start",ec(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return tc(e,"POST","/v1/accounts:sendVerificationCode",ec(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}
1346
+ */await function(e,t){return tc(e,"POST","/v2/accounts/mfaEnrollment:start",ec(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return r.phoneSessionInfo.sessionInfo}{Ha("signin"===t.type,e,"internal-error");const r=(null===(n=o.multiFactorHint)||void 0===n?void 0:n.uid)||o.multiFactorUid;Ha(r,e,"missing-multi-factor-info");const s=await function(e,t){return tc(e,"POST","/v2/accounts/mfaSignIn:start",ec(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return tc(e,"POST","/v1/accounts:sendVerificationCode",ec(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{r._reset()}}
1347
1347
  /**
1348
1348
  * @license
1349
1349
  * Copyright 2020 Google LLC
@@ -1359,7 +1359,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1359
1359
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360
1360
  * See the License for the specific language governing permissions and
1361
1361
  * limitations under the License.
1362
- */class Bl{constructor(e){this.providerId=Bl.PROVIDER_ID,this.auth=Fc(e)}verifyPhoneNumber(e,t){return Fl(this.auth,e,ks(t))}static credential(e,t){return Yc._fromVerification(e,t)}static credentialFromResult(e){const t=e;return Bl.credentialFromTaggedObject(t)}static credentialFromError(e){return Bl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:n}=e;return t&&n?Yc._fromTokenResponse(t,n):null}}Bl.PROVIDER_ID="phone",Bl.PHONE_SIGN_IN_METHOD="phone";
1362
+ */class Bl{constructor(e){this.providerId=Bl.PROVIDER_ID,this.auth=Fc(e)}verifyPhoneNumber(e,t){return Fl(this.auth,e,ks(t))}static credential(e,t){return Yc._fromVerification(e,t)}static credentialFromResult(e){const t=e;return Bl.credentialFromTaggedObject(t)}static credentialFromError(e){return Bl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:r}=e;return t&&r?Yc._fromTokenResponse(t,r):null}}Bl.PROVIDER_ID="phone",Bl.PHONE_SIGN_IN_METHOD="phone";
1363
1363
  /**
1364
1364
  * @license
1365
1365
  * Copyright 2019 Google LLC
@@ -1376,7 +1376,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1376
1376
  * See the License for the specific language governing permissions and
1377
1377
  * limitations under the License.
1378
1378
  */
1379
- class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Kc(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Kc(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Kc(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 Hl(e){return al(e.auth,new zl(e),e.bypassAuthState)}function Vl(e){const{auth:t,user:n}=e;return Ha(n,t,"internal-error"),
1379
+ class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Kc(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Kc(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Kc(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 Hl(e){return al(e.auth,new zl(e),e.bypassAuthState)}function Vl(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),
1380
1380
  /**
1381
1381
  * @license
1382
1382
  * Copyright 2019 Google LLC
@@ -1393,7 +1393,7 @@ class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getId
1393
1393
  * See the License for the specific language governing permissions and
1394
1394
  * limitations under the License.
1395
1395
  */
1396
- async function(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await dc(e,sl(r,i,t,e),n);Ha(o.idToken,r,"internal-error");const s=uc(o.idToken);Ha(s,r,"internal-error");const{sub:a}=s;return Ha(e.uid===a,r,"user-mismatch"),rl._forOperation(e,i,o)}catch(Ld){throw"auth/user-not-found"===(null==Ld?void 0:Ld.code)&&Fa(r,"user-mismatch"),Ld}}(n,new zl(e),e.bypassAuthState)}async function $l(e){const{auth:t,user:n}=e;return Ha(n,t,"internal-error"),async function(e,t,n=!1){const r=await dc(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return rl._forOperation(e,"link",r)}(n,new zl(e),e.bypassAuthState)}
1396
+ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc(e,sl(n,i,t,e),r);Ha(o.idToken,n,"internal-error");const s=uc(o.idToken);Ha(s,n,"internal-error");const{sub:a}=s;return Ha(e.uid===a,n,"user-mismatch"),nl._forOperation(e,i,o)}catch(Ld){throw"auth/user-not-found"===(null==Ld?void 0:Ld.code)&&Fa(n,"user-mismatch"),Ld}}(r,new zl(e),e.bypassAuthState)}async function $l(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),async function(e,t,r=!1){const n=await dc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return nl._forOperation(e,"link",n)}(r,new zl(e),e.bypassAuthState)}
1397
1397
  /**
1398
1398
  * @license
1399
1399
  * Copyright 2020 Google LLC
@@ -1409,7 +1409,7 @@ async function(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await dc
1409
1409
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1410
1410
  * See the License for the specific language governing permissions and
1411
1411
  * limitations under the License.
1412
- */class ql{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,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(Ld){this.reject(Ld)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(Ld){this.reject(Ld)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Hl;case"linkViaPopup":case"linkViaRedirect":return $l;case"reauthViaPopup":case"reauthViaRedirect":return Vl;default:Fa(this.auth,"internal-error")}}resolve(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){$a(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()}}
1412
+ */class ql{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(Ld){this.reject(Ld)}}))}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(Ld){this.reject(Ld)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Hl;case"linkViaPopup":case"linkViaRedirect":return $l;case"reauthViaPopup":case"reauthViaRedirect":return Vl;default:Fa(this.auth,"internal-error")}}resolve(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){$a(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
1413
  /**
1414
1414
  * @license
1415
1415
  * Copyright 2020 Google LLC
@@ -1425,7 +1425,7 @@ async function(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await dc
1425
1425
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1426
1426
  * See the License for the specific language governing permissions and
1427
1427
  * limitations under the License.
1428
- */const Wl=new Ja(2e3,1e4);class Kl extends ql{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,Kl.currentPopupAction&&Kl.currentPopupAction.cancel(),Kl.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ha(e,this.auth,"internal-error"),e}async onExecution(){$a(1===this.filter.length,"Popup operations only handle one event");const e=ml();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(Ba(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(Ba(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Kl.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(Ba(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Wl.get())};e()}}Kl.currentPopupAction=null;
1428
+ */const Wl=new Ja(2e3,1e4);class Kl extends ql{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,Kl.currentPopupAction&&Kl.currentPopupAction.cancel(),Kl.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ha(e,this.auth,"internal-error"),e}async onExecution(){$a(1===this.filter.length,"Popup operations only handle one event");const e=ml();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(Ba(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(Ba(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Kl.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(Ba(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Wl.get())};e()}}Kl.currentPopupAction=null;
1429
1429
  /**
1430
1430
  * @license
1431
1431
  * Copyright 2020 Google LLC
@@ -1442,7 +1442,7 @@ async function(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await dc
1442
1442
  * See the License for the specific language governing permissions and
1443
1443
  * limitations under the License.
1444
1444
  */
1445
- const Gl="pendingRedirect",Jl=new Map;class Yl extends ql{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=Jl.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=function(e){return Ec(Gl,e.config.apiKey,e.name)}(t),r=function(e){return yc(e._redirectPersistence)}(e);if(!(await r._isAvailable()))return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(Ld){e=()=>Promise.reject(Ld)}Jl.set(this.auth._key(),e)}return this.bypassAuthState||Jl.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 Ql(e,t){Jl.set(e._key(),t)}async function Xl(e,t,n=!1){const r=Fc(e),i=
1445
+ const Gl="pendingRedirect",Jl=new Map;class Yl extends ql{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Jl.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return Ec(Gl,e.config.apiKey,e.name)}(t),n=function(e){return yc(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(Ld){e=()=>Promise.reject(Ld)}Jl.set(this.auth._key(),e)}return this.bypassAuthState||Jl.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 Ql(e,t){Jl.set(e._key(),t)}async function Xl(e,t,r=!1){const n=Fc(e),i=
1446
1446
  /**
1447
1447
  * @license
1448
1448
  * Copyright 2021 Google LLC
@@ -1459,7 +1459,7 @@ const Gl="pendingRedirect",Jl=new Map;class Yl extends ql{constructor(e,t,n=!1){
1459
1459
  * See the License for the specific language governing permissions and
1460
1460
  * limitations under the License.
1461
1461
  */
1462
- function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(r,t),o=new Yl(r,i,n),s=await o.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}
1462
+ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(n,t),o=new Yl(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
1463
  /**
1464
1464
  * @license
1465
1465
  * Copyright 2020 Google LLC
@@ -1475,7 +1475,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1475
1475
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1476
1476
  * See the License for the specific language governing permissions and
1477
1477
  * limitations under the License.
1478
- */class Zl{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((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tu(e);default:return!1}}
1478
+ */class Zl{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 tu(e);default:return!1}}
1479
1479
  /**
1480
1480
  * @license
1481
1481
  * Copyright 2020 Google LLC
@@ -1491,7 +1491,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1491
1491
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1492
1492
  * See the License for the specific language governing permissions and
1493
1493
  * limitations under the License.
1494
- */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tu(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(Ba(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(eu(e))}saveEventToCache(e){this.cachedEventUids.add(eu(e)),this.lastProcessedEventTime=Date.now()}}function eu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function tu({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
1494
+ */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!tu(e)){const n=(null===(r=e.error.code)||void 0===r?void 0:r.split("auth/")[1])||"internal-error";t.onError(Ba(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(eu(e))}saveEventToCache(e){this.cachedEventUids.add(eu(e)),this.lastProcessedEventTime=Date.now()}}function eu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function tu({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
1495
1495
  /**
1496
1496
  * @license
1497
1497
  * Copyright 2020 Google LLC
@@ -1508,7 +1508,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1508
1508
  * See the License for the specific language governing permissions and
1509
1509
  * limitations under the License.
1510
1510
  */
1511
- const nu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ru=/^https?/;async function iu(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return tc(e,"GET","/v1/projects",t)}(e);for(const r of t)try{if(ou(r))return}catch(n){}Fa(e,"unauthorized-domain")}function ou(e){const t=qa(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!ru.test(n))return!1;if(nu.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}
1511
+ const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return tc(e,"GET","/v1/projects",t)}(e);for(const n of t)try{if(ou(n))return}catch(r){}Fa(e,"unauthorized-domain")}function ou(e){const t=qa(),{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(!nu.test(r))return!1;if(ru.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}
1512
1512
  /**
1513
1513
  * @license
1514
1514
  * Copyright 2020 Google LLC.
@@ -1524,7 +1524,7 @@ const nu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ru=/^https?/;async function iu(e
1524
1524
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1525
1525
  * See the License for the specific language governing permissions and
1526
1526
  * limitations under the License.
1527
- */const su=new Ja(3e4,6e4);function au(){const e=_l().___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 n=0;n<e.CP.length;n++)e.CP[n]=null}let cu=null;function lu(e){return cu=cu||function(e){return new Promise(((t,n)=>{var r,i,o;function s(){au(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{au(),n(Ba(e,"network-request-failed"))},timeout:su.get()})}if(null===(i=null===(r=_l().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=_l().gapi)||void 0===o?void 0:o.load)){const t=Hc("iframefcb");return _l()[t]=()=>{gapi.load?s():n(Ba(e,"network-request-failed"))},zc(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>n(e)))}s()}})).catch((e=>{throw cu=null,e}))}(e),cu}
1527
+ */const su=new Ja(3e4,6e4);function au(){const e=_l().___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 cu=null;function lu(e){return cu=cu||function(e){return new Promise(((t,r)=>{var n,i,o;function s(){au(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{au(),r(Ba(e,"network-request-failed"))},timeout:su.get()})}if(null===(i=null===(n=_l().gapi)||void 0===n?void 0:n.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=_l().gapi)||void 0===o?void 0:o.load)){const t=Hc("iframefcb");return _l()[t]=()=>{gapi.load?s():r(Ba(e,"network-request-failed"))},zc(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>r(e)))}s()}})).catch((e=>{throw cu=null,e}))}(e),cu}
1528
1528
  /**
1529
1529
  * @license
1530
1530
  * Copyright 2020 Google LLC.
@@ -1540,7 +1540,7 @@ const nu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ru=/^https?/;async function iu(e
1540
1540
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1541
1541
  * See the License for the specific language governing permissions and
1542
1542
  * limitations under the License.
1543
- */const uu=new Ja(5e3,15e3),du="__/auth/iframe",hu="emulator/auth/iframe",pu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},fu=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function mu(e){const t=e.config;Ha(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Ya(t,hu):`https://${e.config.authDomain}/${du}`,r={apiKey:t.apiKey,appName:e.name,v:da},i=fu.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${ws(r).slice(1)}`}
1543
+ */const uu=new Ja(5e3,15e3),du="__/auth/iframe",hu="emulator/auth/iframe",pu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},fu=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function mu(e){const t=e.config;Ha(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?Ya(t,hu):`https://${e.config.authDomain}/${du}`,n={apiKey:t.apiKey,appName:e.name,v:da},i=fu.get(e.config.apiHost);i&&(n.eid=i);const o=e._getFrameworks();return o.length&&(n.fw=o.join(",")),`${r}?${ws(n).slice(1)}`}
1544
1544
  /**
1545
1545
  * @license
1546
1546
  * Copyright 2020 Google LLC.
@@ -1557,7 +1557,7 @@ const nu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ru=/^https?/;async function iu(e
1557
1557
  * See the License for the specific language governing permissions and
1558
1558
  * limitations under the License.
1559
1559
  */
1560
- const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(Ld){}}}function vu(e,t,n,r=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const c=Object.assign(Object.assign({},gu),{width:r.toString(),height:i.toString(),top:o,left:s}),l=fs().toLowerCase();n&&(a=Sc(l)?"_blank":n),Tc(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=fs()){var t;return Nc(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}
1560
+ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(Ld){}}}function vu(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({},gu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=fs().toLowerCase();r&&(a=Sc(l)?"_blank":r),Tc(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=fs()){var t;return Nc(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
1561
  /**
1562
1562
  * @license
1563
1563
  * Copyright 2021 Google LLC
@@ -1573,7 +1573,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1573
1573
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1574
1574
  * See the License for the specific language governing permissions and
1575
1575
  * limitations under the License.
1576
- */(t||"",a),new _u(null);const d=window.open(t||"",a,u);Ha(d,e,"popup-blocked");try{d.focus()}catch(Ld){}return new _u(d)}const yu="__/auth/handler",wu="emulator/auth/handler",bu=encodeURIComponent("fac");async function Eu(e,t,n,r,i,o){Ha(e.config.authDomain,e,"auth-domain-config-required"),Ha(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:da,eventId:i};if(t instanceof Qc){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 Xc){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?`#${bu}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${yu}`;return Ya(e,wu)}
1576
+ */(t||"",a),new _u(null);const d=window.open(t||"",a,u);Ha(d,e,"popup-blocked");try{d.focus()}catch(Ld){}return new _u(d)}const yu="__/auth/handler",wu="emulator/auth/handler",bu=encodeURIComponent("fac");async function Eu(e,t,r,n,i,o){Ha(e.config.authDomain,e,"auth-domain-config-required"),Ha(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:da,eventId:i};if(t instanceof Qc){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 Xc){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?`#${bu}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${yu}`;return Ya(e,wu)}
1577
1577
  /**
1578
1578
  * @license
1579
1579
  * Copyright 2020 Google LLC
@@ -1589,7 +1589,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1589
1589
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1590
1590
  * See the License for the specific language governing permissions and
1591
1591
  * limitations under the License.
1592
- */(e)}?${ws(a).slice(1)}${l}`}const ku="webStorageSupport";const Iu=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=pl,this._completeRedirectFn=Xl,this._overrideRedirectResult=Ql}async _openPopup(e,t,n,r){var i;$a(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return vu(e,await Eu(e,t,n,qa(),r),ml())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){_l().location.href=e}(await Eu(e,t,n,qa(),r)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):($a(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await async function(e){const t=await lu(e),n=_l().gapi;return Ha(n,e,"internal-error"),t.open({where:document.body,url:mu(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pu,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=Ba(e,"network-request-failed"),o=_l().setTimeout((()=>{r(i)}),uu.get());function s(){_l().clearTimeout(o),n(t)}t.ping(s).then(s,(()=>{r(i)}))}))))}(e),n=new Zl(e);return t.register("authEvent",(t=>{Ha(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(ku,{type:ku},(n=>{var r;const i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[ku];void 0!==i&&t(!!i),Fa(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=iu(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Lc()||Cc()||Nc()}};var Tu="@firebase/auth",Cu="1.3.2";
1592
+ */(e)}?${ws(a).slice(1)}${l}`}const ku="webStorageSupport";const Iu=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=pl,this._completeRedirectFn=Xl,this._overrideRedirectResult=Ql}async _openPopup(e,t,r,n){var i;$a(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return vu(e,await Eu(e,t,r,qa(),n),ml())}async _openRedirect(e,t,r,n){await this._originValidation(e);return function(e){_l().location.href=e}(await Eu(e,t,r,qa(),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):($a(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 lu(e),r=_l().gapi;return Ha(r,e,"internal-error"),t.open({where:document.body,url:mu(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pu,dontclear:!0},(t=>new Promise((async(r,n)=>{await t.restyle({setHideOnLeave:!1});const i=Ba(e,"network-request-failed"),o=_l().setTimeout((()=>{n(i)}),uu.get());function s(){_l().clearTimeout(o),r(t)}t.ping(s).then(s,(()=>{n(i)}))}))))}(e),r=new Zl(e);return t.register("authEvent",(t=>{Ha(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(ku,{type:ku},(r=>{var n;const i=null===(n=null==r?void 0:r[0])||void 0===n?void 0:n[ku];void 0!==i&&t(!!i),Fa(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=iu(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Lc()||Cc()||Nc()}};var Tu="@firebase/auth",Cu="1.3.2";
1593
1593
  /**
1594
1594
  * @license
1595
1595
  * Copyright 2020 Google LLC
@@ -1639,7 +1639,7 @@ class Su{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var
1639
1639
  * See the License for the specific language governing permissions and
1640
1640
  * limitations under the License.
1641
1641
  */
1642
- const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=na){const t=ia.get(e);if(!t&&e===na&&ds())return ha();if(!t)throw la.create("no-app",{appName:e});return t}()){const t=ca(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=ca(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(vs(n.getOptions(),null!=t?t:{}))return e;Fa(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Iu,persistence:[Rl,dl,pl]}),r=hs("authTokenSyncURL");if(r){const e=(i=r,async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>Ru)return;const r=null==t?void 0:t.token;Ou!==r&&(Ou=r,await fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});!function(e,t,n){ks(e).beforeAuthStateChanged(t,n)}(n,e,(()=>e(n.currentUser))),function(e,t,n,r){ks(e).onIdTokenChanged(t,n,r)}(n,(t=>e(t)))}var i;const o=(s="auth",null===(c=null===(a=us())||void 0===a?void 0:a.emulatorHosts)||void 0===c?void 0:c[s]);var s,a,c;return o&&Vc(n,`http://${o}`),n}var Pu;Pu="Browser",aa(new Is("auth",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=n.options;Ha(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});const a={apiKey:o,authDomain:s,clientPlatform:Pu,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Dc(Pu)},c=new jc(n,r,i,a);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(yc);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(c,t),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),aa(new Is("auth-internal",(e=>{const t=Fc(e.getProvider("auth").getImmediate());return new Su(t)}),"PRIVATE").setInstantiationMode("EXPLICIT")),pa(Tu,Cu,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(Pu)),pa(Tu,Cu,"esm2017");var Nu=(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))(Nu||{});
1642
+ const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=ra){const t=ia.get(e);if(!t&&e===ra&&ds())return ha();if(!t)throw la.create("no-app",{appName:e});return t}()){const t=ca(e,"auth");if(t.isInitialized())return t.getImmediate();const r=function(e,t){const r=ca(e,"auth");if(r.isInitialized()){const e=r.getImmediate();if(vs(r.getOptions(),null!=t?t:{}))return e;Fa(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:Iu,persistence:[Rl,dl,pl]}),n=hs("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>Ru)return;const n=null==t?void 0:t.token;Ou!==n&&(Ou=n,await fetch(i,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});!function(e,t,r){ks(e).beforeAuthStateChanged(t,r)}(r,e,(()=>e(r.currentUser))),function(e,t,r,n){ks(e).onIdTokenChanged(t,r,n)}(r,(t=>e(t)))}var i;const o=(s="auth",null===(c=null===(a=us())||void 0===a?void 0:a.emulatorHosts)||void 0===c?void 0:c[s]);var s,a,c;return o&&Vc(r,`http://${o}`),r}var Pu;Pu="Browser",aa(new Is("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;Ha(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const a={apiKey:o,authDomain:s,clientPlatform:Pu,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Dc(Pu)},c=new jc(r,n,i,a);return function(e,t){const r=(null==t?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(yc);(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()}))),aa(new Is("auth-internal",(e=>{const t=Fc(e.getProvider("auth").getImmediate());return new Su(t)}),"PRIVATE").setInstantiationMode("EXPLICIT")),pa(Tu,Cu,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(Pu)),pa(Tu,Cu,"esm2017");var Nu=(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))(Nu||{});
1643
1643
  /**
1644
1644
  * @license
1645
1645
  * Copyright 2020 Google LLC
@@ -1656,7 +1656,7 @@ const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=na){c
1656
1656
  * See the License for the specific language governing permissions and
1657
1657
  * limitations under the License.
1658
1658
  */
1659
- pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=ha(Lu);xu=Au(e),xu.setPersistence(bc)}return xu},Mu=e=>{switch(e.code){case Aa:return Nu.INVALID_RECAPTCHA;case xa:case Da:return Nu.INVALID_PHONE_NUMBER;case Ma:return Nu.INVALID_ACCOUNT;case Na:case Pa:case La:return Nu.INVALID_OTP;default:throw e.message}},Uu=()=>{const[e,t]=ge({state:"idle"}),n=we(null),r=we(""),i=we("");return{authState:e,init:e=>{n.current||(n.current=new jl(Du(),e,{size:"invisible"}))},sendOtp:async e=>{if(!n.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new Bl(Du()),o=await i.verifyPhoneNumber(e,n.current);return r.current=o,t({state:"sent",phoneNumber:e}),!0}catch(Ld){return t({state:"error",occuredWhen:"sending",error:Mu(Ld)}),!1}},verifyOtp:async e=>{if(!r.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const n=Bl.credential(r.current,e);return await async function(e,t){return al(Fc(e),t)}(Du(),n),t({state:"verified"}),!0}catch(Ld){return t({state:"error",occuredWhen:"verifying",error:Mu(Ld)}),!1}},resendOtp:async()=>{if(!i.current||!n.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new Bl(Du()),o=await e.verifyPhoneNumber(i.current,n.current);return r.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(Ld){return t({state:"error",occuredWhen:"resending",error:Mu(Ld)}),!1}}}},ju=ne({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),Fu=({children:e})=>{const t=Uu();return ui(ju.Provider,{value:t,children:e})},Bu=()=>Ie(ju),zu=f("div")`
1659
+ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=ha(Lu);xu=Au(e),xu.setPersistence(bc)}return xu},Mu=e=>{switch(e.code){case Aa:return Nu.INVALID_RECAPTCHA;case xa:case Da:return Nu.INVALID_PHONE_NUMBER;case Ma:return Nu.INVALID_ACCOUNT;case Na:case Pa:case La:return Nu.INVALID_OTP;default:throw e.message}},Uu=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new jl(Du(),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 Bl(Du()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(Ld){return t({state:"error",occuredWhen:"sending",error:Mu(Ld)}),!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=Bl.credential(n.current,e);return await async function(e,t){return al(Fc(e),t)}(Du(),r),t({state:"verified"}),!0}catch(Ld){return t({state:"error",occuredWhen:"verifying",error:Mu(Ld)}),!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 Bl(Du()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(Ld){return t({state:"error",occuredWhen:"resending",error:Mu(Ld)}),!1}}}},ju=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),Fu=({children:e})=>{const t=Uu();return ui(ju.Provider,{value:t,children:e})},Bu=()=>Ie(ju),zu=f("div")`
1660
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
1661
  `,Hu=f("button")`
1662
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"}})}
@@ -1679,7 +1679,7 @@ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)t
1679
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
1680
  cursor: not-allowed;
1681
1681
  }
1682
- `,$u=({onClick:e,children:t})=>{const[n,r]=ge(!1);return ui(Hu,{onClick:async()=>{r(!0),await e().finally((()=>{r(!1)}))},children:[n&&ui(zu,{className:"span"}),t]})},qu=f("img")`
1682
+ `,$u=({onClick:e,children:t})=>{const[r,n]=ge(!1);return ui(Hu,{onClick:async()=>{n(!0),await e().finally((()=>{n(!1)}))},children:[r&&ui(zu,{className:"span"}),t]})},qu=f("img")`
1683
1683
  ${()=>({marginBottom:"3rem",alignSelf:"center"})}
1684
1684
  min-width: 150px;
1685
1685
  max-width: 200px;
@@ -1710,8 +1710,8 @@ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)t
1710
1710
  & > .spin {
1711
1711
  ${()=>({height:"5rem",width:"5rem",borderWidth:"4px","--tw-text-opacity":"1",color:"rgb(46 102 247 / var(--tw-text-opacity))"})}
1712
1712
  }
1713
- `,ed=({onClick:e,disabled:t,children:n})=>{const r=we(!0),[i,o]=ge(!1);return ve((()=>()=>{r.current=!1}),[]),ui(Vu,{onClick:()=>{o(!0),e().finally((()=>{r.current&&o(!1)}))},disabled:t,"data-loading":i,children:[i&&ui(zu,{}),n]})},td=/\D/g,nd=({onChangeText:e})=>{const t=ke((e=>{var t;(null==(t=e.key)?void 0:t.replace(td,""))||e.preventDefault()}),[]);return ui(Qu,{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()})},rd=({onChangeText:e})=>{const t=we(""),n=we(Array(6).fill(null));ve((()=>{var e;const t=null==(e=n.current[0])?void 0:e.base;null==t||t.focus()}),[]);const r=ke(((r,i)=>{r&&(e=>{var t,r;const i=null==(t=n.current[e+1])?void 0:t.base;if(i)i.focus();else{const t=null==(r=n.current[e])?void 0:r.base;null==t||t.blur()}})(i);const o=t.current,s=o.substring(0,i)+r+o.substring(i+1);t.current=s,e(s)}),[e]);return ui(Yu,{children:Array(6).fill("").map(((e,t)=>ui(nd,{ref:e=>n.current[t]=e,onChangeText:e=>{r(e,t)}},t)))})},id=()=>{const{authState:e,resendOtp:t,verifyOtp:n}=Bu(),[r,i]=ge(""),o=Ee((()=>"error"!==e.state||"verifying"!==e.occuredWhen&&"resending"!==e.occuredWhen?void 0:e.error),[e]),s=t,a=ke((async()=>{await n(r)}),[n,r]);return ui(N,{children:[ui(Wu,{children:"Verify your mobile number"}),ui(Ku,{children:"Enter your 6 digit verification code"}),ui(Ku,{children:["Didn't receive a code?"," ",ui($u,{onClick:s,children:ui(N,{children:"Resend"})})]}),ui(rd,{onChangeText:i}),ui(Xu,{children:o}),ui(ed,{disabled:!r,onClick:a,children:ui(N,{children:"Verify"})})]})},od=["+","Backspace","Delete",...[...Array(10).keys()].map(String)],sd=e=>e.startsWith("+"),ad=e=>"0"===e||"04"===e.substring(0,2),cd=()=>{const{authState:e,sendOtp:t}=Bu(),[n,r]=ge(""),[i,o]=ge(""),s=Ee((()=>sd(n)||ad(n)),[n]),a=ke((e=>{od.find((t=>t===e.key))||e.preventDefault()}),[]),c=ke((e=>{const t=(e=>e.replace(/ /g,""))(e.currentTarget.value),n=ad(t)?((e,t)=>{let n=0;return e.replace(/#/g,(()=>t[n++]??"")).trim()})("#### ### ### ### ### ### ###",t):t;r(n)}),[r]),l=ke((async()=>{const e=sd(n)?n:`+61${n}`;await t(e)}),[t,n]);return ve((()=>{"error"===e.state&&"sending"===e.occuredWhen?o(e.error):o("")}),[e]),ve((()=>{o(n&&!s?Nu.INVALID_PHONE_NUMBER:"")}),[n,s]),ui(N,{children:[ui(Wu,{children:"Enter your mobile number"}),ui(Ku,{children:"Connect your workplace to Flare using your personal mobile number"}),ui(Ju,{children:"Mobile number"}),ui(Gu,{type:"tel",autoFocus:!0,placeholder:"0400 000 000","aria-label":"Mobile number",value:n,onInput:c,onKeyDown:a}),ui(Xu,{children:i}),ui(ed,{onClick:l,disabled:!s,children:ui(N,{children:"Continue"})})]})},ld=()=>ui(Zu,{children:[ui(zu,{className:"spin"}),ui(Ku,{children:"Please wait while we process your information."})]}),ud="INVISIBLE_RECAPTCHA_VERIFIER_ID",dd=()=>{const{authState:e,init:t}=Bu(),[n,r]=ge(0);return ve((()=>{t(ud)}),[t]),ve((()=>{"sent"===e.state?r(1):"verifying"===e.state?r(2):"error"===e.state&&"verifying"===e.occuredWhen&&r(1)}),[e,r]),ui(N,{children:[ui(qu,{src:"https://www.flarehr.com/wp-content/uploads/2022/03/flare-logo.svg",alt:"Flare Logo"}),0===n&&ui(cd,{}),1===n&&ui(id,{}),2===n&&ui(ld,{}),ui("div",{id:ud})]})},hd=()=>ui(Fu,{children:ui(dd,{})}),pd=f("div")`
1713
+ `,ed=({onClick:e,disabled:t,children:r})=>{const n=we(!0),[i,o]=ge(!1);return ve((()=>()=>{n.current=!1}),[]),ui(Vu,{onClick:()=>{o(!0),e().finally((()=>{n.current&&o(!1)}))},disabled:t,"data-loading":i,children:[i&&ui(zu,{}),r]})},td=/\D/g,rd=({onChangeText:e})=>{const t=ke((e=>{var t;(null==(t=e.key)?void 0:t.replace(td,""))||e.preventDefault()}),[]);return ui(Qu,{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()})},nd=({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 ui(Yu,{children:Array(6).fill("").map(((e,t)=>ui(rd,{ref:e=>r.current[t]=e,onChangeText:e=>{n(e,t)}},t)))})},id=()=>{const{authState:e,resendOtp:t,verifyOtp:r}=Bu(),[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 ui(N,{children:[ui(Wu,{children:"Verify your mobile number"}),ui(Ku,{children:"Enter your 6 digit verification code"}),ui(Ku,{children:["Didn't receive a code?"," ",ui($u,{onClick:s,children:ui(N,{children:"Resend"})})]}),ui(nd,{onChangeText:i}),ui(Xu,{children:o}),ui(ed,{disabled:!n,onClick:a,children:ui(N,{children:"Verify"})})]})},od=["+","Backspace","Delete",...[...Array(10).keys()].map(String)],sd=e=>e.startsWith("+"),ad=e=>"0"===e||"04"===e.substring(0,2),cd=()=>{const{authState:e,sendOtp:t}=Bu(),[r,n]=ge(""),[i,o]=ge(""),s=Ee((()=>sd(r)||ad(r)),[r]),a=ke((e=>{od.find((t=>t===e.key))||e.preventDefault()}),[]),c=ke((e=>{const t=(e=>e.replace(/ /g,""))(e.currentTarget.value),r=ad(t)?((e,t)=>{let r=0;return e.replace(/#/g,(()=>t[r++]??"")).trim()})("#### ### ### ### ### ### ###",t):t;n(r)}),[n]),l=ke((async()=>{const e=sd(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?Nu.INVALID_PHONE_NUMBER:"")}),[r,s]),ui(N,{children:[ui(Wu,{children:"Enter your mobile number"}),ui(Ku,{children:"Connect your workplace to Flare using your personal mobile number"}),ui(Ju,{children:"Mobile number"}),ui(Gu,{type:"tel",autoFocus:!0,placeholder:"0400 000 000","aria-label":"Mobile number",value:r,onInput:c,onKeyDown:a}),ui(Xu,{children:i}),ui(ed,{onClick:l,disabled:!s,children:ui(N,{children:"Continue"})})]})},ld=()=>ui(Zu,{children:[ui(zu,{className:"spin"}),ui(Ku,{children:"Please wait while we process your information."})]}),ud="INVISIBLE_RECAPTCHA_VERIFIER_ID",dd=()=>{const{authState:e,init:t}=Bu(),[r,n]=ge(0);return ve((()=>{t(ud)}),[t]),ve((()=>{"sent"===e.state?n(1):"verifying"===e.state?n(2):"error"===e.state&&"verifying"===e.occuredWhen&&n(1)}),[e,n]),ui(N,{children:[ui(qu,{src:"https://www.flarehr.com/wp-content/uploads/2022/03/flare-logo.svg",alt:"Flare Logo"}),0===r&&ui(cd,{}),1===r&&ui(id,{}),2===r&&ui(ld,{}),ui("div",{id:ud})]})},hd=()=>ui(Fu,{children:ui(dd,{})}),pd=f("div")`
1714
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
1715
  width: 500px;
1716
1716
  height: 500px;
1717
- `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),n=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>n),[n]),{idToken:e}})(),[n,r]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");yn((async e=>{try{switch(n){case 0:await(async e=>{var t;try{const n=await In(i,e);return s((null==(t=n.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:n.isEstablished}}catch(Ld){throw`[Link Workplace]: Error when requesting a workplace link: ${Ld}`}})(e).then((e=>{e.isEstablished?r(5):r(1)}));break;case 1:t&&r(2);break;case 2:r(3);break;case 3:await(async(e,n)=>{const{sub:r}=Me(i);try{return await Tn(t,e,r,n)}catch(Ld){throw`[Link Workplace]: Error when trying to establish workplace link: ${Ld}`}})(o,e),r(5);break;case 5:ns()}}catch(Ld){console.log(Ld),r(4)}}),[n,t]);const a=void 0===n||0==n||3==n;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===n&&ui(hd,{}),4===n&&ui(ts,{}),5===n&&ui(Qo,{})]})},md=e=>ui("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:[ui("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"}),ui("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"})]}),gd=e=>{const[t,n]=ge(!1);return ui("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){n(!0);try{await e.onClickPromise()}catch(r){}n(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"light"})})]})},_d=({className:e,label:t,allowedKeyPattern:n,onChange:r,value:i,...o})=>{const s=ke((e=>{n.test(e.key)||e.preventDefault()}),[n]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("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:s,onChange:e=>r(e.currentTarget.value),...o})]})},vd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),yd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),wd=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var bd=Object.defineProperty,Ed=(e,t,n)=>(((e,t,n)=>{t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let kd=new class{constructor(){Ed(this,"current",this.detect()),Ed(this,"handoffState","pending"),Ed(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}},Id=(e,t)=>{kd.isServer?ve(e,t):ye(e,t)};function Td(e){let t=we(e);return Id((()=>{t.current=e}),[e]),t}function Cd(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Cd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Sd(){let[e]=ge(Cd);return ve((()=>()=>e.dispose()),[e]),e}let Rd=function(e){let t=Td(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Od(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=ge(kd.isHandoffComplete);return t&&!1===kd.isHandoffComplete&&n(!1),ve((()=>{!0!==t&&n(!0)}),[t]),ve((()=>kd.handoff()),[]),!e&&t}function Ad(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=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(r,Ad),r}let Pd=Symbol();function Nd(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let n=Rd((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Pd])))?void 0:n}function xd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ld,Dd,Md=((Dd=Md||{})[Dd.None=0]="None",Dd[Dd.RenderStrategy=1]="RenderStrategy",Dd[Dd.Static=2]="Static",Dd),Ud=((Ld=Ud||{})[Ld.Unmount=0]="Unmount",Ld[Ld.Hidden=1]="Hidden",Ld);function jd({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s}){let a=Bd(t,e);if(o)return Fd(a,n,r,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return Fd(t,n,r,s)}if(1&c){let{unmount:e=!0,...t}=a;return Ad(e?0:1,{0:()=>null,1:()=>Fd({...t,hidden:!0,style:{display:"none"}},n,r,s)})}return Fd(a,n,r,s)}function Fd(e,t={},n,r){let{as:i=n,children:o,refName:s="ref",...a}=Vd(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,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r);e&&(u["data-headlessui-state"]=n.join(" "))}if(i===N&&Object.keys(Hd(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> 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)=>xd(null==e?void 0:e.className(...t),a.className):xd(null==e?void 0:e.className,a.className),n=t?{className:t}:{};return co(l,Object.assign({},Bd(l.props,Hd(Vd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(l.ref,c.ref),n))}return O(i,Object.assign({},Vd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function zd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Hd(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Vd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let $d=ne(null);$d.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Wd(){return Ie($d)}function Kd({value:e,children:t}){return bo.createElement($d.Provider,{value:e},t)}function Gd(){let e=we(!1);return Id((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Yd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qd(e,t,n,r){let i=n?"enter":"leave",o=Cd(),s=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Ad(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Ad(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Ad(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Yd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...a,...l),o.nextFrame((()=>{Yd(e,...t.base,...a,...l),Jd(e,...t.base,...a,...c),function(e,t){let n=Cd();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,s]=[r,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){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),a),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Yd(e,...t.base,...a),Jd(e,...t.base,...t.entered),s())))})),o.dispose}function Xd(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Zd=ne(null);Zd.displayName="TransitionContext";var eh,th=((eh=th||{}).Visible="visible",eh.Hidden="hidden",eh);let nh=ne(null);function rh(e){return"children"in e?rh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function ih(e,t){let n=Td(e),r=we([]),i=Gd(),o=Sd(),s=Rd(((e,t=Ud.Hidden)=>{let s=r.current.findIndex((({el:t})=>t===e));-1!==s&&(Ad(t,{[Ud.Unmount](){r.current.splice(s,1)},[Ud.Hidden](){r.current[s].state="hidden"}}),o.microTask((()=>{var e;!rh(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),a=Rd((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>s(e,Ud.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Rd(((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(u.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),h=Rd(((e,t,n)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>n(t)))}));return Ee((()=>({children:r,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,r,d,h,u,l])}function oh(){}nh.displayName="NestingContext";let sh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ah(e){var t;let n={};for(let r of sh)n[r]=null!=(t=e[r])?t:oh;return n}let ch=Md.RenderStrategy;let lh=zd((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=we(null),a=Nd(s,t);Od();let c=Wd();if(void 0===n&&null!==c&&(n=(c&qd.Open)===qd.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(n?"visible":"hidden"),d=ih((()=>{u("hidden")})),[h,p]=ge(!0),f=we([n]);Id((()=>{!1!==h&&f.current[f.current.length-1]!==n&&(f.current.push(n),p(!1))}),[f,n]);let m=Ee((()=>({show:n,appear:r,initial:h})),[n,r,h]);ve((()=>{if(n)u("visible");else if(rh(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")}),[n,d]);let g={unmount:i},_=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(nh.Provider,{value:d},bo.createElement(Zd.Provider,{value:m},jd({ourProps:{...g,as:N,children:bo.createElement(uh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:ch,visible:"visible"===l,name:"Transition"})))})),uh=zd((function(e,t){var n,r;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),_=Nd(g,t),v=null==(n=m.unmount)||n?Ud.Unmount:Ud.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Zd);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(nh);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:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Ud.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Ad(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Td({base:Xd(m.className),enter:Xd(c),enterFrom:Xd(l),enterTo:Xd(u),entered:Xd(d),leave:Xd(h),leaveFrom:Xd(p),leaveTo:Xd(f)}),R=function(e){let t=we(ah(e));return ve((()=>{t.current=ah(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Od();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,n]=ge(e),r=Gd(),i=ke((e=>{r.current&&n((t=>t|e))}),[t,r]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{r.current&&n((t=>t&~e))}),[n,r]),a=ke((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Rd((e=>Ad(e,{enter:()=>{N.addFlag(qd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(qd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Rd((e=>Ad(e,{enter:()=>{N.removeFlag(qd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(qd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=ih((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:o}){let s=Gd(),a=Sd(),c=Td(n);Id((()=>{e&&(c.current="enter")}),[e]),Id((()=>{let e=Cd();a.add(e.dispose);let n=t.current;if(n&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Qd(n,r.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[n])}({immediate:A,container:g,classes:S,direction:P,onStart:Td((e=>{D.onStart(g,e,x)})),onStop:Td((e=>{D.onStop(g,e,L),"leave"===e&&!rh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:xd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=xd(m.className,null==(r=g.current)?void 0:r.className),""===M.className&&delete M.className),bo.createElement(nh.Provider,{value:D},bo.createElement(Kd,{value:Ad(E,{visible:qd.Open,hidden:qd.Closed})|N.flags},jd({ourProps:U,theirProps:M,defaultTag:"div",features:ch,visible:"visible"===E,name:"Transition.Child"})))})),dh=zd((function(e,t){let n=null!==Ie(Zd),r=null!==Wd();return bo.createElement(bo.Fragment,null,!n&&r?bo.createElement(lh,{ref:t,...e}):bo.createElement(uh,{ref:t,...e}))})),hh=Object.assign(lh,{Child:dh,Root:lh});const ph=({children:e})=>{const t=bo.Children.toArray(e),n=t.find((e=>e.type===fh)),r=t.find((e=>e.type===mh));return ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(hh,{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:n&&ui("div",{className:"flex items-center h-full",children:n})}),ui(hh,{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:r&&ui("div",{className:"flex items-center h-full",children:r})})]})})},fh=({children:e})=>ui(N,{children:e}),mh=({children:e})=>ui(N,{children:e});ph.Top=fh,ph.Bottom=mh;const gh=/^04\d{1,14}/,_h=/^\+[1-9]\d{1,14}/,vh=e=>_h.test(e),yh=()=>{const[e,t]=ge(""),n=Ee((()=>e.replace(/ /g,"")),[e]);return{setPhoneNumber:t,phoneNumber:{valid:Ee((()=>{return vh(n)||(e=n,gh.test(e));var e}),[n]),formatted:Ee((()=>vh(n)?n:`+61${n.replace(/^0+/,"")}`),[n]),masked:Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n])}}},wh=({onSubmit:e,onDecline:t})=>{const{trace:n}={trace:wd},[r,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=yh();ve((()=>{n("sign-up-viewed")}),[n]);const a=ke((()=>(i(""),e(s).then((()=>n("sign-up-completed"))).catch(i))),[s,e,n]);return ke((()=>n("sign-up-declined").then(t)),[t,n]),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Create your Flare Benefits account"}),ui(yd,{children:"Confirm your mobile number below to create your Flare Benefits account"})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.masked,onChange:o}),r&&ui("span",{className:"text-xs text-rose-500",children:r}),ui("div",{className:"mt-5 font-medium text-sm text-gray-900",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!s.valid,onClickPromise:a,children:"Create account"}),!1]})})]})},bh=""+new URL("assets/check-b48de75e.svg",import.meta.url).href,Eh=({onContinue:e})=>ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"h-16 w-16 flex items-center justify-center rounded-full bg-blue-50 text-primary-base",children:ui(bh,{className:"h-7 w-7"})})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[ui(vd,{children:"You now have access to Flare Benefits"}),ui(yd,{children:"With your benefits account, you now have access to a range of exclusive benefits through your workplace."}),ui(gd,{class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]}),kh=""+new URL("assets/left-arrow-38f55b24.svg",import.meta.url).href,Ih=({className:e,onClick:t,...n})=>{const[r,i]=ge(!1);return ui("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(!r)return i(!0),t().finally((()=>{i(!1)}))}),[r,t]),...n,children:[ui("div",{className:"relative "+(r?"invisible":""),children:n.children}),r&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"primary"})})]})},Th=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Ch=({open:e})=>ui(Th,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(md,{size:"lg"})}),ui(vd,{children:"Creating your account"}),ui("div",{children:[ui(yd,{children:"This can take up to 30 seconds."}),ui(yd,{children:"Please don't navigate away or refresh your browser."})]})]})}),Sh=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{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,n]=ge(e),r=we(),i=ke((()=>{clearInterval(r.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(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(""),n().then(d).catch(l))),[n,d]);return ui(N,{children:[ui(Ch,{open:s}),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Verify your mobile number"}),ui(yd,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(Ih,{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&&ui(N,{children:["in ",u," secs"]})]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(gd,{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()=>{r()},children:ui("span",{className:"flex gap-3",children:[ui("img",{src:kh}),"Back"]})})]})})]})]})},Rh=({onSignUp:e,onVerify:t,onResendOtp:n,onSuccess:r,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goNext:l}=(e=>{const[t,n]=ge(1),r=ke((()=>{const e=t-1;e>=1&&n(e)}),[t]),i=ke((()=>{const r=t+1;r<=e&&n(r)}),[t,e]);return{step:t,goBack:r,goNext:i}})(3),u=ke((t=>e(t.formatted).then((()=>{s(t.masked),l()}))),[l,e]),d=ke((e=>t(e).then((()=>{r()}))),[t,r]);return ui(N,{children:[1===a&&ui(wh,{onSubmit:u,onDecline:i}),2===a&&ui(Sh,{phoneNumber:o,onVerify:d,onResendOtp:n,onGoBack:c}),3===a&&ui(Eh,{onContinue:r})]})},Oh=e=>{var t,n;throw"Auth_SessionExpired"===(null==(n=null==(t=e.response)?void 0:t.data)?void 0:n.code)&&window.location.reload(),e};let Ah;const Ph=()=>Ah;var Nh=(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))(Nh||{});const xh=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Nh[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Lh=()=>{const[e,t]=ge(!1),{signUp:n,verifyOtp:r,resendOtp:i}={signUp:async e=>{await Ph().post("auth/signUp",{mobileNumber:e}).catch(xh)},verifyOtp:async e=>{await Ph().post("auth/verify",{otp:e}).catch(xh)},resendOtp:async()=>{await Ph().post("auth/resend").catch(xh)}},o=()=>{t(!0),ns()};return e?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!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}.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-\\[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-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-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}.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}.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-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}.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}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!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-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()}),ui(Rh,{onSignUp:n,onVerify:r,onResendOtp:i,onSuccess:o,onDecline:o})]})})},Dh=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Mh=async(e,t)=>{await(async e=>{if(En)return En;const t=e.replace(/\/?$/,"");return En=vn.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:n,onResponse:r,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw n&&await n(e),e})),e.interceptors.response.use((async e=>(r&&await r(e),e)),(async e=>{throw i&&await i(e),e}))})(En,{onRequestError:wn,onResponseError:bn}),En})(e.backendUrl);const{googleCloud:n,identityProvider:r,isEstablished:i}=await(async(e,t)=>{if(!En)throw new Error("Api has not been initialized");return En.get("customer-profile/backend/v1.0/workplace-link/config",kn(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=n;const o=e.backendUrl;var s,a;return s=o,a=e.apolloAccessToken,s=s.replace(/\/?$/,""),Ah=vn.create({baseURL:`${s}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${a}`}}),Ah.interceptors.response.use((e=>e),Oh),{identityProvider:r,isEstablished:i}};!function(r,i,o,s){c.p=i,e=r,t=o,n=s}(O);function Uh(){return(Uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var jh=["context","children"];function Fh(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,jh);return te(t,n)}function Bh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Fh,Uh({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],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[zh(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($h,{name:l},c):r[o]=c}var u=n?O($h,null,r):r;return O(n||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function zh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Hh(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[zh(e)]=n,this._vdom=te(this._vdom,r),Z(this._vdom,this._root)}}function Vh(){Z(this._vdom=null,this._root)}function $h(e,t){var n=this;return O("slot",Uh({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(e,t,n,r){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=Bh,i.prototype.attributeChangedCallback=Hh,i.prototype.disconnectedCallback=Vh,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,n.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 n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||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"]},[n,r]=ge(!1),i=we(""),[o,s]=ge("Initializing");return yn((async e=>{if(t.backendUrl)try{const n=await Mh(t,e);i.current=n.identityProvider,r(n.isEstablished),s("Initialized")}catch{s("Error")}}),[t.backendUrl]),n?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(Dh,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(rs,{...t}),"flare-app-identity"===i.current&&ui(Lh,{...t})]})]})]})}),"workplace-link",["backend-url","access-token"],{shadow:!1});
1717
+ `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().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("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Ld){throw`[Link Workplace]: Error when requesting a workplace link: ${Ld}`}})(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 Ir(t,e,n,r)}catch(Ld){throw`[Link Workplace]: Error when trying to establish workplace link: ${Ld}`}})(o,e),n(5);break;case 5:rs()}}catch(Ld){console.log(Ld),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})},md=e=>ui("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:[ui("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"}),ui("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"})]}),gd=e=>{const[t,r]=ge(!1);return ui("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:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"light"})})]})},_d=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,...o})=>{const s=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("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:s,onChange:e=>n(e.currentTarget.value),...o})]})},vd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),yd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),wd=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var bd=Object.defineProperty,Ed=(e,t,r)=>(((e,t,r)=>{t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let kd=new class{constructor(){Ed(this,"current",this.detect()),Ed(this,"handoffState","pending"),Ed(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}},Id=(e,t)=>{kd.isServer?ve(e,t):ye(e,t)};function Td(e){let t=we(e);return Id((()=>{t.current=e}),[e]),t}function Cd(){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=Cd();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 Sd(){let[e]=ge(Cd);return ve((()=>()=>e.dispose()),[e]),e}let Rd=function(e){let t=Td(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Od(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(kd.isHandoffComplete);return t&&!1===kd.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>kd.handoff()),[]),!e&&t}function Ad(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,Ad),n}let Pd=Symbol();function Nd(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Rd((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[Pd])))?void 0:r}function xd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Ld,Dd,Md=((Dd=Md||{})[Dd.None=0]="None",Dd[Dd.RenderStrategy=1]="RenderStrategy",Dd[Dd.Static=2]="Static",Dd),Ud=((Ld=Ud||{})[Ld.Unmount=0]="Unmount",Ld[Ld.Hidden=1]="Hidden",Ld);function jd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Bd(t,e);if(o)return Fd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return Fd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Ad(e?0:1,{0:()=>null,1:()=>Fd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return Fd(a,r,n,s)}function Fd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Vd(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(Hd(a)).length>0){if(!so(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)=>xd(null==e?void 0:e.className(...t),a.className):xd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Bd(l.props,Hd(Vd(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({},Vd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Bd(...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 zd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Hd(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Vd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let $d=re(null);$d.displayName="OpenClosedContext";var qd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qd||{});function Wd(){return Ie($d)}function Kd({value:e,children:t}){return bo.createElement($d.Provider,{value:e},t)}function Gd(){let e=we(!1);return Id((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Yd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qd(e,t,r,n){let i=r?"enter":"leave",o=Cd(),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=Ad(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Ad(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Ad(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Yd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...a,...l),o.nextFrame((()=>{Yd(e,...t.base,...a,...l),Jd(e,...t.base,...a,...c),function(e,t){let r=Cd();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,(()=>(Yd(e,...t.base,...a),Jd(e,...t.base,...t.entered),s())))})),o.dispose}function Xd(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Zd=re(null);Zd.displayName="TransitionContext";var eh,th=((eh=th||{}).Visible="visible",eh.Hidden="hidden",eh);let rh=re(null);function nh(e){return"children"in e?nh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function ih(e,t){let r=Td(e),n=we([]),i=Gd(),o=Sd(),s=Rd(((e,t=Ud.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Ad(t,{[Ud.Unmount](){n.current.splice(s,1)},[Ud.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!nh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Rd((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,Ud.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Rd(((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=Rd(((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 oh(){}rh.displayName="NestingContext";let sh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ah(e){var t;let r={};for(let n of sh)r[n]=null!=(t=e[n])?t:oh;return r}let ch=Md.RenderStrategy;let lh=zd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Nd(s,t);Od();let c=Wd();if(void 0===r&&null!==c&&(r=(c&qd.Open)===qd.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=ih((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Id((()=>{!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(nh(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},_=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Rd((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(rh.Provider,{value:d},bo.createElement(Zd.Provider,{value:m},jd({ourProps:{...g,as:N,children:bo.createElement(uh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:ch,visible:"visible"===l,name:"Transition"})))})),uh=zd((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),_=Nd(g,t),v=null==(r=m.unmount)||r?Ud.Unmount:Ud.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Zd);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(rh);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:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Ud.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Ad(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Td({base:Xd(m.className),enter:Xd(c),enterFrom:Xd(l),enterTo:Xd(u),entered:Xd(d),leave:Xd(h),leaveFrom:Xd(p),leaveTo:Xd(f)}),R=function(e){let t=we(ah(e));return ve((()=>{t.current=ah(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Od();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=Gd(),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=Rd((e=>Ad(e,{enter:()=>{N.addFlag(qd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(qd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Rd((e=>Ad(e,{enter:()=>{N.removeFlag(qd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(qd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=ih((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Gd(),a=Sd(),c=Td(r);Id((()=>{e&&(c.current="enter")}),[e]),Id((()=>{let e=Cd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Qd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Td((e=>{D.onStart(g,e,x)})),onStop:Td((e=>{D.onStop(g,e,L),"leave"===e&&!nh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:xd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=xd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(rh.Provider,{value:D},bo.createElement(Kd,{value:Ad(E,{visible:qd.Open,hidden:qd.Closed})|N.flags},jd({ourProps:U,theirProps:M,defaultTag:"div",features:ch,visible:"visible"===E,name:"Transition.Child"})))})),dh=zd((function(e,t){let r=null!==Ie(Zd),n=null!==Wd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(lh,{ref:t,...e}):bo.createElement(uh,{ref:t,...e}))})),hh=Object.assign(lh,{Child:dh,Root:lh});const ph=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===fh)),n=t.find((e=>e.type===mh));return ui(hh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(hh,{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&&ui("div",{className:"flex items-center h-full",children:r})}),ui(hh,{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&&ui("div",{className:"flex items-center h-full",children:n})})]})})},fh=({children:e})=>ui(N,{children:e}),mh=({children:e})=>ui(N,{children:e});ph.Top=fh,ph.Bottom=mh;const gh=/^04\d{1,14}/,_h=/^\+[1-9]\d{1,14}/,vh=e=>_h.test(e),yh=()=>{const[e,t]=ge(""),r=Ee((()=>e.replace(/ /g,"")),[e]);return{setPhoneNumber:t,phoneNumber:{valid:Ee((()=>{return vh(r)||(e=r,gh.test(e));var e}),[r]),formatted:Ee((()=>vh(r)?r:`+61${r.replace(/^0+/,"")}`),[r]),masked:Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(r)),[r])}}},wh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:wd},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=yh();ve((()=>{r("sign-up-viewed")}),[r]);const a=ke((()=>(i(""),e(s).then((()=>r("sign-up-completed"))).catch(i))),[s,e,r]);return ke((()=>r("sign-up-declined").then(t)),[t,r]),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Create your Flare Benefits account"}),ui(yd,{children:"Confirm your mobile number below to create your Flare Benefits account"})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.masked,onChange:o}),n&&ui("span",{className:"text-xs text-rose-500",children:n}),ui("div",{className:"mt-5 font-medium text-sm text-gray-900",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!s.valid,onClickPromise:a,children:"Create account"}),!1]})})]})},bh=""+new URL("assets/check-b48de75e.svg",import.meta.url).href,Eh=({onContinue:e})=>ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"h-16 w-16 flex items-center justify-center rounded-full bg-blue-50 text-primary-base",children:ui(bh,{className:"h-7 w-7"})})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[ui(vd,{children:"You now have access to Flare Benefits"}),ui(yd,{children:"With your benefits account, you now have access to a range of exclusive benefits through your workplace."}),ui(gd,{class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]}),kh=""+new URL("assets/left-arrow-38f55b24.svg",import.meta.url).href,Ih=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("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:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(md,{theme:"primary"})})]})},Th=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Ch=({open:e})=>ui(Th,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(md,{size:"lg"})}),ui(vd,{children:"Creating your account"}),ui("div",{children:[ui(yd,{children:"This can take up to 30 seconds."}),ui(yd,{children:"Please don't navigate away or refresh your browser."})]})]})}),Sh=({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 ui(N,{children:[ui(Ch,{open:s}),ui(ph,{children:[ui(ph.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(vd,{children:"Verify your mobile number"}),ui(yd,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),ui(ph.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(_d,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(Ih,{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&&ui(N,{children:["in ",u," secs"]})]}),ui(gd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(gd,{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:ui("span",{className:"flex gap-3",children:[ui("img",{src:kh}),"Back"]})})]})})]})]})},Rh=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goNext:l}=(e=>{const[t,r]=ge(1),n=ke((()=>{const e=t-1;e>=1&&r(e)}),[t]),i=ke((()=>{const n=t+1;n<=e&&r(n)}),[t,e]);return{step:t,goBack:n,goNext:i}})(3),u=ke((t=>e(t.formatted).then((()=>{s(t.masked),l()}))),[l,e]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[1===a&&ui(wh,{onSubmit:u,onDecline:i}),2===a&&ui(Sh,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c}),3===a&&ui(Eh,{onContinue:n})]})},Oh=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 Ah;const Ph=()=>Ah;var Nh=(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))(Nh||{});const xh=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Nh[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Lh=()=>{const[e,t]=ge(!1),{signUp:r,verifyOtp:n,resendOtp:i}={signUp:async e=>{await Ph().post("auth/signUp",{mobileNumber:e}).catch(xh)},verifyOtp:async e=>{await Ph().post("auth/verify",{otp:e}).catch(xh)},resendOtp:async()=>{await Ph().post("auth/resend").catch(xh)}},o=()=>{t(!0),rs()};return e?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!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}.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-\\[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}.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}.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-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()}),ui(Rh,{onSignUp:r,onVerify:n,onResendOtp:i,onSuccess:o,onDecline:o})]})})},Dh=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Mh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.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}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const o=e.backendUrl;var s,a;return s=o,a=e.apolloAccessToken,s=s.replace(/\/?$/,""),Ah=_r.create({baseURL:`${s}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${a}`}}),Ah.interceptors.response.use((e=>e),Oh),{identityProvider:n,isEstablished:i}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function Uh(){return(Uh=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 jh=["context","children"];function Fh(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,jh);return te(t,r)}function Bh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Fh,Uh({},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[zh(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($h,{name:l},c):n[o]=c}var u=r?O($h,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function zh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Hh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[zh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function Vh(){Z(this._vdom=null,this._root)}function $h(e,t){var r=this;return O("slot",Uh({},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=Bh,i.prototype.attributeChangedCallback=Hh,i.prototype.disconnectedCallback=Vh,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"]},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing");return vr((async e=>{if(t.backendUrl)try{const r=await Mh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized")}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(Dh,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),"flare-app-identity"===i.current&&ui(Lh,{...t})]})]})]})}),"workplace-link",["backend-url","access-token"],{shadow:!1});