@aws-amplify/ui-vue 4.4.3 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.js +234 -228
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -17,11 +17,11 @@ Event: `).concat(JSON.stringify(p.data))),o.state;if(o.status!==Q.Running&&!o.op
|
|
|
17
17
|
Event: `).concat(JSON.stringify(p.data)));return o.scheduler.schedule(function(){o.forward(p);var m=o._nextState(p);o.update(m,p)}),o._state},this.sendTo=function(d,f,p){var m=o.parent&&(f===Fe.Parent||o.parent.id===f),y=m?o.parent:z(f)?f===Fe.Internal?o:o.children.get(f)||Xe.get(f):vp(f)?f:void 0;if(!y){if(!m)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(o.id,"'."));H||ee(!1,"Service '".concat(o.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in y){if(o.status!==Q.Stopped||o.parent!==y||o.state.done){var g=M(M({},d),{name:d.name===ap?"".concat(He(o.id)):d.name,origin:o.sessionId});!p&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([y,g]):y.send(g)}}else!p&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([y,d.data]):y.send(d.data)},this._exec=function(d,f,p,m){m===void 0&&(m=o.machine.options.actions);var y=d.exec||zt(d.type,m),g=q(y)?y:y?y.exec:d.exec;if(g)try{return g(f,p.data,o.machine.config.predictableActionArguments?{action:d,_event:p}:{action:d,state:o.state,_event:p})}catch(R){throw o.parent&&o.parent.send({type:"xstate.error",data:R}),R}switch(d.type){case vt:{var _=d;o.defer(_);break}case Wt:var h=d;if(typeof h.delay=="number"){o.defer(h);return}else h.to?o.sendTo(h._event,h.to,p===Ue):o.send(h._event);break;case oc:o.cancel(d.sendId);break;case Ci:{if(o.status!==Q.Running)return;var v=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[v.id||v.type])break;if(v.type===G.Invoke){var S=fc(v.src),w=o.machine.options.services?o.machine.options.services[S.type]:void 0,P=v.id,b=v.data;H||ee(!("forward"in v),"`forward` property is deprecated (found in invocation of '".concat(v.src,"' in in machine '").concat(o.machine.id,"'). ")+"Please use `autoForward` instead.");var C="autoForward"in v?v.autoForward:!!v.forward;if(!w){H||ee(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(o.machine.id,"'."));return}var E=b?Vt(b,f,p):void 0;if(typeof w=="string")return;var T=q(w)?w(f,p.data,{data:E,src:S,meta:v.meta}):w;if(!T)return;var I=void 0;Ee(T)&&(T=E?T.withContext(E):T,I={autoForward:C}),o.spawn(T,P,I)}else o.spawnActivity(v);break}case Fi:{o.stopChild(d.activity.id);break}case ic:var A=d,k=A.label,N=A.value;k?o.logger(k,N):o.logger(N);break;default:H||ee(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var i=M(M({},t.defaultOptions),n),a=i.clock,s=i.logger,u=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=a,this.parent=u,this.options=i,this.scheduler=new Na({deferEvents:this.options.deferEvents}),this.sessionId=Xe.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:je(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return H||ee(this.status!==Q.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var o,i;try{for(var a=B(e.actions),s=a.next();!s.done;s=a.next()){var u=s.value;this.exec(u,e,n)}}catch(l){o={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},t.prototype.update=function(e,n){var o,i,a,s,u,l,c,d,f=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Ue)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(T){f.state.children[T.id]=T}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var m=B(this.eventListeners),y=m.next();!y.done;y=m.next()){var g=y.value;g(e.event)}}catch(T){o={error:T}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var _=B(this.listeners),h=_.next();!h.done;h=_.next()){var g=h.value;g(e,e.event)}}catch(T){a={error:T}}finally{try{h&&!h.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}try{for(var v=B(this.contextListeners),S=v.next();!S.done;S=v.next()){var w=S.value;w(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(T){u={error:T}}finally{try{S&&!S.done&&(l=v.return)&&l.call(v)}finally{if(u)throw u.error}}if(this.state.done){var P=e.configuration.find(function(T){return T.type==="final"&&T.parent===f.machine}),b=P&&P.doneData?Vt(P.doneData,e.context,n):void 0;this._doneEvent=ft(this.id,b);try{for(var C=B(this.doneListeners),E=C.next();!E.done;E=C.next()){var g=E.value;g(this._doneEvent)}}catch(T){c={error:T}}finally{try{E&&!E.done&&(d=C.return)&&d.call(C)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),Xe.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Q.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,o){var i=this,a=Ft(e,n,o);this.listeners.add(a.next),this.status!==Q.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===Q.Stopped?a.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(a.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Q.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Q.Running)return this;this.machine._init(),Xe.register(this.sessionId,this),this.initialized=!0,this.status=Q.Running;var o=e===void 0?this.initialState:je(this,function(){return Rp(e)?n.machine.resolveState(e):n.machine.resolveState(_e.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(o,Ue)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){q(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,o,i,a,s,u,l,c,d;try{for(var f=B(this.listeners),p=f.next();!p.done;p=f.next()){var m=p.value;this.listeners.delete(m)}}catch(C){e={error:C}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}try{for(var y=B(this.stopListeners),g=y.next();!g.done;g=y.next()){var m=g.value;m(),this.stopListeners.delete(m)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}try{for(var _=B(this.contextListeners),h=_.next();!h.done;h=_.next()){var m=h.value;this.contextListeners.delete(m)}}catch(C){a={error:C}}finally{try{h&&!h.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}try{for(var v=B(this.doneListeners),S=v.next();!S.done;S=v.next()){var m=S.value;this.doneListeners.delete(m)}}catch(C){u={error:C}}finally{try{S&&!S.done&&(l=v.return)&&l.call(v)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Q.Stopped,this._initialState=void 0;try{for(var w=B(Object.keys(this.delayedEventsMap)),P=w.next();!P.done;P=w.next()){var b=P.value;this.clock.clearTimeout(this.delayedEventsMap[b])}}catch(C){c={error:C}}finally{try{P&&!P.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new Na({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var o=te({type:"xstate.stop"}),i=je(e,function(){var a=W(j([],V(e.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return be(d.onExit,e.machine.options.actions)})),s=V(ht(e.machine,e.state,e.state.context,o,[{type:"exit",actions:a}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),u=s[0],l=s[1],c=new _e({value:e.state.value,context:l,_event:o,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:u.filter(function(d){return!Ti(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,o),e._stopChildren(),Xe.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(this.status===Q.NotStarted&&this.options.deferEvents)H||ee(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
|
|
18
18
|
Event: `).concat(JSON.stringify(event)));else if(this.status!==Q.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var o=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,a,s=n.state,u=!1,l=[],c=function(m){var y=te(m);n.forward(y),s=je(n,function(){return n.machine.transition(s,y,void 0,o||void 0)}),l.push.apply(l,j([],V(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return xp(g,s)})),!1)),u=u||!!s.changed};try{for(var d=B(e),f=d.next();!f.done;f=d.next()){var p=f.value;c(p)}}catch(m){i={error:m}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}s.changed=u,s.actions=l,n.update(s,te(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var o=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=te(e);if(i.name.indexOf(Aa)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Aa)===0}))throw i.data.data;var a=je(this,function(){return o.machine.transition(o.state,i,void 0,n||void 0)});return a},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,o;try{for(var i=B(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,u=this.children.get(s);if(!u)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));u.send(e)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,o=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=o)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,o){o===void 0&&(o=this.machine.options.actions),this._exec(e,n.context,n._event,o)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),q(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,o){if(this.status!==Q.Running)return Vi(e,n);if(Ia(e))return this.spawnPromise(Promise.resolve(e),n);if(q(e))return this.spawnCallback(e,n);if(Ip(e))return this.spawnActor(e,n);if(yp(e))return this.spawnObservable(e,n);if(Ee(e))return this.spawnMachine(e,M(M({},o),{id:n}));if(mp(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var o=this;n===void 0&&(n={});var i=new t(e,M(M({},this.options),{parent:this,id:n.id||e.id})),a=M(M({},Pi),n);a.sync&&i.onTransition(function(u){o.send(Di,{state:u,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(u){o.removeChild(i.id),o.send(te(u,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var o=Bp(e,{id:n,parent:this});return this.children.set(n,o),o},t.prototype.spawnPromise=function(e,n){var o,i=this,a=!1,s;e.then(function(l){a||(s=l,i.removeChild(n),i.send(te(ft(n,l),{origin:n})))},function(l){if(!a){i.removeChild(n);var c=He(n,l);try{i.send(te(c,{origin:n}))}catch(d){wp(l,d,n),i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var u=(o={id:n,send:function(){},subscribe:function(l,c,d){var f=Ft(l,c,d),p=!1;return e.then(function(m){p||(f.next(m),!p&&f.complete())},function(m){p||f.error(m)}),{unsubscribe:function(){return p=!0}}},stop:function(){a=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},o[Me]=function(){return this},o);return this.children.set(n,u),u},t.prototype.spawnCallback=function(e,n){var o,i=this,a=!1,s=new Set,u=new Set,l,c=function(p){l=p,u.forEach(function(m){return m(p)}),!a&&i.send(te(p,{origin:n}))},d;try{d=e(c,function(p){s.add(p)})}catch(p){this.send(He(n,p))}if(Ia(d))return this.spawnPromise(d,n);var f=(o={id:n,send:function(p){return s.forEach(function(m){return m(p)})},subscribe:function(p){var m=Ft(p);return u.add(m.next),{unsubscribe:function(){u.delete(m.next)}}},stop:function(){a=!0,q(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},o[Me]=function(){return this},o);return this.children.set(n,f),f},t.prototype.spawnObservable=function(e,n){var o,i=this,a,s=e.subscribe(function(l){a=l,i.send(te(l,{origin:n}))},function(l){i.removeChild(n),i.send(te(He(n,l),{origin:n}))},function(){i.removeChild(n),i.send(te(ft(n),{origin:n}))}),u=(o={id:n,send:function(){},subscribe:function(l,c,d){return e.subscribe(l,c,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:n}}},o[Me]=function(){return this},o);return this.children.set(n,u),u},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(!n){H||ee(!1,"No implementation found for activity '".concat(e.type,"'"));return}var o=n(this.state.context,e);this.spawnEffect(e.id,o)},t.prototype.spawnEffect=function(e,n){var o;this.children.set(e,(o={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},o[Me]=function(){return this},o))},t.prototype.attachDev=function(){var e=zi();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(M(M({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},n),{features:M({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Dp(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Me]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Q.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Rc,t}(),zp=function(t){return z(t)?M(M({},Pi),{name:t}):M(M(M({},Pi),{name:_p()}),t)};function et(t,e){var n=zp(e);return Ap(function(o){if(!H){var i=Ee(t)||q(t);ee(!!o||i,'Attempted to spawn an Actor (ID: "'.concat(Ee(t)?t.id:"undefined",'") outside of a service. This will have no effect.'))}return o?o.spawn(t,n.name,n):Vi(t,n.name)})}function Rc(t,e){var n=new Vp(t,e);return n}function qp(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Tt(t){return M(M({type:bi},t),{toJSON:function(){t.onDone,t.onError;var e=Ui(t,["onDone","onError"]);return M(M({},e),{type:bi,src:qp(t.src)})}})}var We="",ki="#",tt="*",qe={},Le=function(t){return t[0]===ki},Lp=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Gp=function(t,e,n){var o=n.slice(0,-1).some(function(a){return!("cond"in a)&&!("in"in a)&&(z(a.target)||Ee(a.target))}),i=e===We?"the transient event":"event '".concat(e,"'");ee(!o,"One or more transitions for ".concat(i," on state '").concat(t.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},jp=function(){function t(e,n,o,i){o===void 0&&(o="context"in e?e.context:void 0);var a=this,s;this.config=e,this._context=o,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Lp(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:ac),this.id=this.config.id||j([this.machine.key],V(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,H||ee(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?ot(this.config.states,function(c,d){var f,p=new t(c,{},void 0,{parent:a,key:d});return Object.assign(a.idMap,M((f={},f[p.id]=p,f),p.idMap)),p}):qe;var u=0;function l(c){var d,f;c.order=u++;try{for(var p=B(Pc(c)),m=p.next();!m.done;m=p.next()){var y=m.value;l(y)}}catch(g){d={error:g}}finally{try{m&&!m.done&&(f=p.return)&&f.call(p)}finally{if(d)throw d.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var d=c.event;return d===We}):We in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=he(this.config.entry||this.config.onEntry).map(function(c){return Ke(c)}),this.onExit=he(this.config.exit||this.config.onExit).map(function(c){return Ke(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=he(this.config.invoke).map(function(c,d){var f,p;if(Ee(c)){var m=Et(a.id,d);return a.machine.options.services=M((f={},f[m]=c,f),a.machine.options.services),Tt({src:m,id:m})}else if(z(c.src)){var m=c.id||Et(a.id,d);return Tt(M(M({},c),{id:m,src:c.src}))}else if(Ee(c.src)||q(c.src)){var m=c.id||Et(a.id,d);return a.machine.options.services=M((p={},p[m]=c.src,p),a.machine.options.services),Tt(M(M({id:m},c),{src:m}))}else{var y=c.src;return Tt(M(M({id:Et(a.id,d)},c),{src:y}))}}),this.activities=he(this.config.activities).concat(this.invoke).map(function(c){return Kt(c)}),this.transition=this.transition.bind(this),this.tags=he(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||kc(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var o=this.options,i=o.actions,a=o.activities,s=o.guards,u=o.services,l=o.delays;return new t(this.config,{actions:M(M({},i),e.actions),activities:M(M({},a),e.activities),guards:M(M({},s),e.guards),services:M(M({},u),e.services),delays:M(M({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return q(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:ot(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,o){return n[o.eventType]=n[o.eventType]||[],n[o.eventType].push(o),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===We,o=this.transitions.filter(function(i){var a=i.eventType===e;return n?a:a||i.eventType===tt});return this.__cache.candidates[e]=o,o},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var o=function(a,s){var u=q(a)?"".concat(e.id,":delay[").concat(s,"]"):a,l=Ac(u,e.id);return e.onEntry.push($t(l,{delay:a})),e.onExit.push(_c(l)),l},i=$e(n)?n.map(function(a,s){var u=o(a.delay,s);return M(M({},a),{event:u})}):W(Object.keys(n).map(function(a,s){var u=n[a],l=z(u)?{target:u}:u,c=isNaN(+a)?a:+a,d=o(c,s);return he(l).map(function(f){return M(M({},f),{event:d,delay:c})})}));return i.map(function(a){var s=a.delay;return M(M({},e.formatTransition(a)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,o=this;if(!e)return[];var i=e instanceof _e?e.value:dt(e,this.delimiter);if(z(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((n={},n[i]=a,n)):[this,this.states[i]]}var s=Object.keys(i),u=[this];return u.push.apply(u,j([],V(W(s.map(function(l){return o.getStateNode(l).getStateNodes(i[l])}))),!1)),u},t.prototype.handles=function(e){var n=sc(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof _e?e:_e.create(e),o=Array.from(at([],this.getStateNodes(n.value)));return new _e(M(M({},n),{value:this.resolve(n.value),configuration:o,done:Ot(o,this),tags:ka(o),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,o){var i=this.getStateNode(e),a=i.next(n,o);return!a||!a.transitions.length?this.next(n,o):a},t.prototype.transitionCompoundNode=function(e,n,o){var i=Object.keys(e),a=this.getStateNode(i[0]),s=a._transition(e[i[0]],n,o);return!s||!s.transitions.length?this.next(n,o):s},t.prototype.transitionParallelNode=function(e,n,o){var i,a,s={};try{for(var u=B(Object.keys(e)),l=u.next();!l.done;l=u.next()){var c=l.value,d=e[c];if(d){var f=this.getStateNode(c),p=f._transition(d,n,o);p&&(s[c]=p)}}}catch(h){i={error:h}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}var m=Object.keys(s).map(function(h){return s[h]}),y=W(m.map(function(h){return h.transitions})),g=m.some(function(h){return h.transitions.length>0});if(!g)return this.next(n,o);var _=W(Object.keys(s).map(function(h){return s[h].configuration}));return{transitions:y,exitSet:W(m.map(function(h){return h.exitSet})),configuration:_,source:n,actions:W(Object.keys(s).map(function(h){return s[h].actions}))}},t.prototype._transition=function(e,n,o){return z(e)?this.transitionLeafNode(e,n,o):Object.keys(e).length===1?this.transitionCompoundNode(e,n,o):this.transitionParallelNode(e,n,o)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,te(n))},t.prototype.next=function(e,n){var o,i,a=this,s=n.name,u=[],l=[],c;try{for(var d=B(this.getCandidates(s)),f=d.next();!f.done;f=d.next()){var p=f.value,m=p.cond,y=p.in,g=e.context,_=y?z(y)&&Le(y)?e.matches(dt(this.getStateNodeById(y).path,this.delimiter)):Bi(dt(y,this.delimiter),dp(this.path.slice(0,-2))(e.value)):!0,h=!1;try{h=!m||dc(this.machine,m,g,n,e)}catch(w){throw new Error("Unable to evaluate guard '".concat(m.name||m.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
19
19
|
`).concat(w.message))}if(h&&_){p.target!==void 0&&(l=p.target),u.push.apply(u,j([],V(p.actions),!1)),c=p;break}}}catch(w){o={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var v=W(l.map(function(w){return a.getRelativeStateNodes(w,e.historyValue)})),S=!!c.internal;return{transitions:[c],exitSet:S?[]:W(l.map(function(w){return a.getPotentiallyReenteringNodes(w)})),configuration:v,source:e,actions:u}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],o=this,i=e;o&&o!==i;)n.push(o),o=o.parent;return o!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,o,i,a,s,u){var l,c,d,f,p=this,m=s?at([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=B(Array.from(e).sort(function(A,k){return A.order-k.order})),_=g.next();!_.done;_=g.next()){var h=_.value;(!st(m,h)||st(o.exitSet,h)||h.parent&&y.has(h.parent))&&y.add(h)}}catch(A){l={error:A}}finally{try{_&&!_.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}try{for(var v=B(m),S=v.next();!S.done;S=v.next()){var h=S.value;(!st(e,h)||st(o.exitSet,h.parent))&&o.exitSet.push(h)}}catch(A){d={error:A}}finally{try{S&&!S.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}o.exitSet.sort(function(A,k){return k.order-A.order});var w=Array.from(y).sort(function(A,k){return A.order-k.order}),P=new Set(o.exitSet),b=W(w.map(function(A){var k=[];if(A.type!=="final")return k;var N=A.parent;if(!N.parent)return k;k.push(it(A.id,A.doneData),it(N.id,A.doneData?Vt(A.doneData,i,a):void 0));var R=N.parent;return R.type==="parallel"&>(R).every(function(L){return Ot(o.configuration,L)})&&k.push(it(R.id)),k})),C=w.map(function(A){var k=A.onEntry,N=A.activities.map(function(R){return Sc(R)});return{type:"entry",actions:be(u?j(j([],V(k),!1),V(N),!1):j(j([],V(N),!1),V(k),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:b.map(function(A){return pc(A)})}),E=Array.from(P).map(function(A){return{type:"exit",actions:be(j(j([],V(A.onExit),!1),V(A.activities.map(function(k){return wc(k)})),!1),p.machine.options.actions)}}),T=E.concat({type:"transition",actions:be(o.actions,this.machine.options.actions)}).concat(C);if(n){var I=be(W(j([],V(e),!1).sort(function(A,k){return k.order-A.order}).map(function(A){return A.onExit})),this.machine.options.actions).filter(function(A){return!Ti(A)});return T.concat({type:"stop",actions:I})}return T},t.prototype.transition=function(e,n,o,i){e===void 0&&(e=this.initialState);var a=te(n),s;if(e instanceof _e)s=o===void 0?e:this.resolveState(_e.from(e,o));else{var u=z(e)?this.resolve(Bt(this.getResolvedPath(e))):this.resolve(e),l=o??this.machine.context;s=this.resolveState(_e.from(u,l))}if(!H&&a.name===tt)throw new Error("An event cannot have the wildcard type ('".concat(tt,"')"));if(this.strict&&!this.events.includes(a.name)&&!pp(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(s.value,s,a)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},d=at([],this.getStateNodes(s.value)),f=c.configuration.length?at(d,c.configuration):d;return c.configuration=j([],V(f),!1),this.resolveTransition(c,s,s.context,i,a)},t.prototype.resolveRaisedTransition=function(e,n,o,i){var a,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=o,e.event=o.data,(a=e.actions).unshift.apply(a,j([],V(s),!1)),e},t.prototype.resolveTransition=function(e,n,o,i,a){var s,u,l,c,d=this;a===void 0&&(a=Ue);var f=e.configuration,p=!n||e.transitions.length>0,m=p?e.configuration:n?n.configuration:[],y=Ot(m,this),g=p?kp(this.machine,f):void 0,_=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,h=this.getActions(new Set(m),y,e,o,a,n,i),v=n?M({},n.activities):{};try{for(var S=B(h),w=S.next();!w.done;w=S.next()){var P=w.value;try{for(var b=(l=void 0,B(P.actions)),C=b.next();!C.done;C=b.next()){var E=C.value;E.type===Ci?v[E.activity.id||E.activity.type]=E:E.type===Fi&&(v[E.activity.id||E.activity.type]=!1)}}catch(U){l={error:U}}finally{try{C&&!C.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}}}catch(U){s={error:U}}finally{try{w&&!w.done&&(u=S.return)&&u.call(S)}finally{if(s)throw s.error}}var T=V(ht(this,n,o,a,h,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),I=T[0],A=T[1],k=V(hp(I,Ti),2),N=k[0],R=k[1],L=I.filter(function(U){var pe;return U.type===Ci&&((pe=U.activity)===null||pe===void 0?void 0:pe.type)===bi}),K=L.reduce(function(U,pe){return U[pe.activity.id]=Ep(pe.activity,d.machine,A,a),U},n?M({},n.children):{}),Y=new _e({value:g||n.value,context:A,_event:a,_sessionid:n?n._sessionid:null,historyValue:g?_?gp(_,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?R:[],activities:g?v:n?n.activities:{},events:[],configuration:m,transitions:e.transitions,children:K,done:y,tags:ka(m),machine:this}),J=o!==A;Y.changed=a.name===Di||J;var Z=Y.history;Z&&delete Z.history;var ye=!y&&(this._transient||f.some(function(U){return U._transient}));if(!p&&(!ye||a.name===We))return Y;var X=Y;if(!y)for(ye&&(X=this.resolveRaisedTransition(X,{type:op},a,i));N.length;){var Pe=N.shift();X=this.resolveRaisedTransition(X,Pe._event,a,i)}var xe=X.changed||(Z?!!X.actions.length||J||typeof Z.value!=typeof X.value||!Mc(X.value,Z.value):void 0);return X.changed=xe,X.history=Z,X},t.prototype.getStateNode=function(e){if(Le(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Le(e)?e.slice(ki.length):e;if(n===this.id)return this;var o=this.machine.idMap[n];if(!o)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return o},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Le(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ei(e,this.delimiter).slice(),o=this;n.length;){var i=n.shift();if(!i.length)break;o=o.getStateNode(i)}return o},t.prototype.resolve=function(e){var n,o=this;if(!e)return this.initialStateValue||qe;switch(this.type){case"parallel":return ot(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(e[s]||a):qe});case"compound":if(z(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?ot(e,function(a,s){return a?o.getStateNode(s).resolve(a):qe}):this.initialStateValue||{};default:return e||qe}},t.prototype.getResolvedPath=function(e){if(Le(e)){var n=this.machine.idMap[e.slice(ki.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ei(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Ta(this.states,function(o){return o.initialStateValue||qe},function(o){return o.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Lt(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var o=this.getStateNodes(e);return this.resolveTransition({configuration:o,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;z(n.target)?e=Le(n.target)?Bt(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,o){return o===void 0&&(o=!0),o?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Lt(this))return[this];if(this.type==="compound"&&!this.initial)return H||ee(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=Ut(this.initialStateValue);return W(n.map(function(o){return e.getFromRelativePath(o)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=V(e),o=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(o,"' from node with no states"));var a=this.getStateNode(o);if(a.type==="history")return a.resolveHistory();if(!this.states[o])throw new Error("Child state '".concat(o,"' does not exist on '").concat(this.id,"'"));return this.states[o].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Ta(this.states,function(n,o){if(!e)return n.historyValue();var i=z(e)?void 0:e[o];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var o=this.parent;if(!e){var i=this.target;return i?W(Ut(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=fp(o.path,"states")(e).current;return z(a)?[o.getStateNode(a)]:W(Ut(a).map(function(s){return n.history==="deep"?o.getFromRelativePath(s):[o.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=W(Object.keys(this.states).map(function(o){return e.states[o].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,o,i;if(this.__cache.events)return this.__cache.events;var a=this.states,s=new Set(this.ownEvents);if(a)try{for(var u=B(Object.keys(a)),l=u.next();!l.done;l=u.next()){var c=l.value,d=a[c];if(d.states)try{for(var f=(o=void 0,B(d.events)),p=f.next();!p.done;p=f.next()){var m=p.value;s.add("".concat(m))}}catch(y){o={error:y}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(o){if(!z(o))return o;var i=o[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(o.slice(1));var a=i?n.key+o:o;if(n.parent)try{var s=n.parent.getStateNodeByPath(a);return s}catch(u){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
20
|
-
`).concat(u.message))}else return n.getStateNodeByPath(a)})},t.prototype.formatTransition=function(e){var n=this,o=Sp(e.target),i="internal"in e?e.internal:o?o.some(function(l){return z(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),u=M(M({},e),{actions:be(he(e.actions)),cond:cc(e.cond,a),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return M(M({},u),{target:u.target?u.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return u},t.prototype.formatTransitions=function(){var e,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=tt,u=a[s],l=u===void 0?[]:u,c=Ui(a,[typeof s=="symbol"?s:s+""]);i=W(Object.keys(c).map(function(v){!H&&v===We&&ee(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(o.id,'".'));var S=ze(v,c[v]);return H||Gp(o,v,S),S}).concat(ze(tt,l)))}var d=this.config.always?ze("",this.config.always):[],f=this.config.onDone?ze(String(it(this.id)),this.config.onDone):[];H||ee(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=W(this.invoke.map(function(v){var S=[];return v.onDone&&S.push.apply(S,j([],V(ze(String(ft(v.id)),v.onDone)),!1)),v.onError&&S.push.apply(S,j([],V(ze(String(He(v.id)),v.onError)),!1)),S})),m=this.after,y=W(j(j(j(j([],V(f),!1),V(p),!1),V(i),!1),V(d),!1).map(function(v){return he(v).map(function(S){return o.formatTransition(S)})}));try{for(var g=B(m),_=g.next();!_.done;_=g.next()){var h=_.value;y.push(h)}}catch(v){e={error:v}}finally{try{_&&!_.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}(),Ma=!1;function Ye(t,e){return!H&&!("predictableActionArguments"in t)&&!Ma&&(Ma=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new jp(t,e)}var Ce=bc,Yt=yc,Wp=Ec,It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ur,Ra;function xc(){if(Ra)return ur;Ra=1;function t(e,n){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=n(e[o],o,e);return a}return ur=t,ur}var lr,xa;function Hp(){if(xa)return lr;xa=1;function t(){this.__data__=[],this.size=0}return lr=t,lr}var cr,Ua;function _t(){if(Ua)return cr;Ua=1;function t(e,n){return e===n||e!==e&&n!==n}return cr=t,cr}var dr,Fa;function Jt(){if(Fa)return dr;Fa=1;var t=_t();function e(n,o){for(var i=n.length;i--;)if(t(n[i][0],o))return i;return-1}return dr=e,dr}var fr,Oa;function Kp(){if(Oa)return fr;Oa=1;var t=Jt(),e=Array.prototype,n=e.splice;function o(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():n.call(a,s,1),--this.size,!0}return fr=o,fr}var pr,Da;function $p(){if(Da)return pr;Da=1;var t=Jt();function e(n){var o=this.__data__,i=t(o,n);return i<0?void 0:o[i][1]}return pr=e,pr}var mr,Ba;function Yp(){if(Ba)return mr;Ba=1;var t=Jt();function e(n){return t(this.__data__,n)>-1}return mr=e,mr}var hr,Va;function Jp(){if(Va)return hr;Va=1;var t=Jt();function e(n,o){var i=this.__data__,a=t(i,n);return a<0?(++this.size,i.push([n,o])):i[a][1]=o,this}return hr=e,hr}var gr,za;function Zt(){if(za)return gr;za=1;var t=Hp(),e=Kp(),n=$p(),o=Yp(),i=Jp();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,gr=a,gr}var yr,qa;function Zp(){if(qa)return yr;qa=1;var t=Zt();function e(){this.__data__=new t,this.size=0}return yr=e,yr}var vr,La;function Qp(){if(La)return vr;La=1;function t(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}return vr=t,vr}var _r,Ga;function Xp(){if(Ga)return _r;Ga=1;function t(e){return this.__data__.get(e)}return _r=t,_r}var Sr,ja;function em(){if(ja)return Sr;ja=1;function t(e){return this.__data__.has(e)}return Sr=t,Sr}var wr,Wa;function Uc(){if(Wa)return wr;Wa=1;var t=typeof It=="object"&&It&&It.Object===Object&&It;return wr=t,wr}var Cr,Ha;function Se(){if(Ha)return Cr;Ha=1;var t=Uc(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Cr=n,Cr}var br,Ka;function Qt(){if(Ka)return br;Ka=1;var t=Se(),e=t.Symbol;return br=e,br}var Ar,$a;function tm(){if($a)return Ar;$a=1;var t=Qt(),e=Object.prototype,n=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=n.call(s,i),l=s[i];try{s[i]=void 0;var c=!0}catch{}var d=o.call(s);return c&&(u?s[i]=l:delete s[i]),d}return Ar=a,Ar}var Er,Ya;function rm(){if(Ya)return Er;Ya=1;var t=Object.prototype,e=t.toString;function n(o){return e.call(o)}return Er=n,Er}var Tr,Ja;function Je(){if(Ja)return Tr;Ja=1;var t=Qt(),e=tm(),n=rm(),o="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:o:a&&a in Object(u)?e(u):n(u)}return Tr=s,Tr}var Ir,Za;function Te(){if(Za)return Ir;Za=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return Ir=t,Ir}var Pr,Qa;function Li(){if(Qa)return Pr;Qa=1;var t=Je(),e=Te(),n="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var l=t(u);return l==o||l==i||l==n||l==a}return Pr=s,Pr}var kr,Xa;function nm(){if(Xa)return kr;Xa=1;var t=Se(),e=t["__core-js_shared__"];return kr=e,kr}var Nr,es;function om(){if(es)return Nr;es=1;var t=nm(),e=function(){var o=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function n(o){return!!e&&e in o}return Nr=n,Nr}var Mr,ts;function Fc(){if(ts)return Mr;ts=1;var t=Function.prototype,e=t.toString;function n(o){if(o!=null){try{return e.call(o)}catch{}try{return o+""}catch{}}return""}return Mr=n,Mr}var Rr,rs;function im(){if(rs)return Rr;rs=1;var t=Li(),e=om(),n=Te(),o=Fc(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,c=u.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||e(p))return!1;var m=t(p)?d:a;return m.test(o(p))}return Rr=f,Rr}var xr,ns;function am(){if(ns)return xr;ns=1;function t(e,n){return e==null?void 0:e[n]}return xr=t,xr}var Ur,os;function Oe(){if(os)return Ur;os=1;var t=im(),e=am();function n(o,i){var a=e(o,i);return t(a)?a:void 0}return Ur=n,Ur}var Fr,is;function Gi(){if(is)return Fr;is=1;var t=Oe(),e=Se(),n=t(e,"Map");return Fr=n,Fr}var Or,as;function Xt(){if(as)return Or;as=1;var t=Oe(),e=t(Object,"create");return Or=e,Or}var Dr,ss;function sm(){if(ss)return Dr;ss=1;var t=Xt();function e(){this.__data__=t?t(null):{},this.size=0}return Dr=e,Dr}var Br,us;function um(){if(us)return Br;us=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return Br=t,Br}var Vr,ls;function lm(){if(ls)return Vr;ls=1;var t=Xt(),e="__lodash_hash_undefined__",n=Object.prototype,o=n.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return o.call(s,a)?s[a]:void 0}return Vr=i,Vr}var zr,cs;function cm(){if(cs)return zr;cs=1;var t=Xt(),e=Object.prototype,n=e.hasOwnProperty;function o(i){var a=this.__data__;return t?a[i]!==void 0:n.call(a,i)}return zr=o,zr}var qr,ds;function dm(){if(ds)return qr;ds=1;var t=Xt(),e="__lodash_hash_undefined__";function n(o,i){var a=this.__data__;return this.size+=this.has(o)?0:1,a[o]=t&&i===void 0?e:i,this}return qr=n,qr}var Lr,fs;function fm(){if(fs)return Lr;fs=1;var t=sm(),e=um(),n=lm(),o=cm(),i=dm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Lr=a,Lr}var Gr,ps;function pm(){if(ps)return Gr;ps=1;var t=fm(),e=Zt(),n=Gi();function o(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return Gr=o,Gr}var jr,ms;function mm(){if(ms)return jr;ms=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return jr=t,jr}var Wr,hs;function er(){if(hs)return Wr;hs=1;var t=mm();function e(n,o){var i=n.__data__;return t(o)?i[typeof o=="string"?"string":"hash"]:i.map}return Wr=e,Wr}var Hr,gs;function hm(){if(gs)return Hr;gs=1;var t=er();function e(n){var o=t(this,n).delete(n);return this.size-=o?1:0,o}return Hr=e,Hr}var Kr,ys;function gm(){if(ys)return Kr;ys=1;var t=er();function e(n){return t(this,n).get(n)}return Kr=e,Kr}var $r,vs;function ym(){if(vs)return $r;vs=1;var t=er();function e(n){return t(this,n).has(n)}return $r=e,$r}var Yr,_s;function vm(){if(_s)return Yr;_s=1;var t=er();function e(n,o){var i=t(this,n),a=i.size;return i.set(n,o),this.size+=i.size==a?0:1,this}return Yr=e,Yr}var Jr,Ss;function ji(){if(Ss)return Jr;Ss=1;var t=pm(),e=hm(),n=gm(),o=ym(),i=vm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Jr=a,Jr}var Zr,ws;function _m(){if(ws)return Zr;ws=1;var t=Zt(),e=Gi(),n=ji(),o=200;function i(a,s){var u=this.__data__;if(u instanceof t){var l=u.__data__;if(!e||l.length<o-1)return l.push([a,s]),this.size=++u.size,this;u=this.__data__=new n(l)}return u.set(a,s),this.size=u.size,this}return Zr=i,Zr}var Qr,Cs;function Wi(){if(Cs)return Qr;Cs=1;var t=Zt(),e=Zp(),n=Qp(),o=Xp(),i=em(),a=_m();function s(u){var l=this.__data__=new t(u);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,Qr=s,Qr}var Xr,bs;function Sm(){if(bs)return Xr;bs=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return Xr=e,Xr}var en,As;function wm(){if(As)return en;As=1;function t(e){return this.__data__.has(e)}return en=t,en}var tn,Es;function Cm(){if(Es)return tn;Es=1;var t=ji(),e=Sm(),n=wm();function o(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return o.prototype.add=o.prototype.push=e,o.prototype.has=n,tn=o,tn}var rn,Ts;function bm(){if(Ts)return rn;Ts=1;function t(e,n){for(var o=-1,i=e==null?0:e.length;++o<i;)if(n(e[o],o,e))return!0;return!1}return rn=t,rn}var nn,Is;function Am(){if(Is)return nn;Is=1;function t(e,n){return e.has(n)}return nn=t,nn}var on,Ps;function Oc(){if(Ps)return on;Ps=1;var t=Cm(),e=bm(),n=Am(),o=1,i=2;function a(s,u,l,c,d,f){var p=l&o,m=s.length,y=u.length;if(m!=y&&!(p&&y>m))return!1;var g=f.get(s),_=f.get(u);if(g&&_)return g==u&&_==s;var h=-1,v=!0,S=l&i?new t:void 0;for(f.set(s,u),f.set(u,s);++h<m;){var w=s[h],P=u[h];if(c)var b=p?c(P,w,h,u,s,f):c(w,P,h,s,u,f);if(b!==void 0){if(b)continue;v=!1;break}if(S){if(!e(u,function(C,E){if(!n(S,E)&&(w===C||d(w,C,l,c,f)))return S.push(E)})){v=!1;break}}else if(!(w===P||d(w,P,l,c,f))){v=!1;break}}return f.delete(s),f.delete(u),v}return on=a,on}var an,ks;function Dc(){if(ks)return an;ks=1;var t=Se(),e=t.Uint8Array;return an=e,an}var sn,Ns;function Em(){if(Ns)return sn;Ns=1;function t(e){var n=-1,o=Array(e.size);return e.forEach(function(i,a){o[++n]=[a,i]}),o}return sn=t,sn}var un,Ms;function Tm(){if(Ms)return un;Ms=1;function t(e){var n=-1,o=Array(e.size);return e.forEach(function(i){o[++n]=i}),o}return un=t,un}var ln,Rs;function Im(){if(Rs)return ln;Rs=1;var t=Qt(),e=Dc(),n=_t(),o=Oc(),i=Em(),a=Tm(),s=1,u=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",_="[object Symbol]",h="[object ArrayBuffer]",v="[object DataView]",S=t?t.prototype:void 0,w=S?S.valueOf:void 0;function P(b,C,E,T,I,A,k){switch(E){case v:if(b.byteLength!=C.byteLength||b.byteOffset!=C.byteOffset)return!1;b=b.buffer,C=C.buffer;case h:return!(b.byteLength!=C.byteLength||!A(new e(b),new e(C)));case l:case c:case p:return n(+b,+C);case d:return b.name==C.name&&b.message==C.message;case m:case g:return b==C+"";case f:var N=i;case y:var R=T&s;if(N||(N=a),b.size!=C.size&&!R)return!1;var L=k.get(b);if(L)return L==C;T|=u,k.set(b,C);var K=o(N(b),N(C),T,I,A,k);return k.delete(b),K;case _:if(w)return w.call(b)==w.call(C)}return!1}return ln=P,ln}var cn,xs;function Bc(){if(xs)return cn;xs=1;function t(e,n){for(var o=-1,i=n.length,a=e.length;++o<i;)e[a+o]=n[o];return e}return cn=t,cn}var dn,Us;function Ie(){if(Us)return dn;Us=1;var t=Array.isArray;return dn=t,dn}var fn,Fs;function Vc(){if(Fs)return fn;Fs=1;var t=Bc(),e=Ie();function n(o,i,a){var s=i(o);return e(o)?s:t(s,a(o))}return fn=n,fn}var pn,Os;function Pm(){if(Os)return pn;Os=1;function t(e,n){for(var o=-1,i=e==null?0:e.length,a=0,s=[];++o<i;){var u=e[o];n(u,o,e)&&(s[a++]=u)}return s}return pn=t,pn}var mn,Ds;function zc(){if(Ds)return mn;Ds=1;function t(){return[]}return mn=t,mn}var hn,Bs;function qc(){if(Bs)return hn;Bs=1;var t=Pm(),e=zc(),n=Object.prototype,o=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return o.call(s,u)}))}:e;return hn=a,hn}var gn,Vs;function km(){if(Vs)return gn;Vs=1;function t(e,n){for(var o=-1,i=Array(e);++o<e;)i[o]=n(o);return i}return gn=t,gn}var yn,zs;function De(){if(zs)return yn;zs=1;function t(e){return e!=null&&typeof e=="object"}return yn=t,yn}var vn,qs;function Nm(){if(qs)return vn;qs=1;var t=Je(),e=De(),n="[object Arguments]";function o(i){return e(i)&&t(i)==n}return vn=o,vn}var _n,Ls;function Hi(){if(Ls)return _n;Ls=1;var t=Nm(),e=De(),n=Object.prototype,o=n.hasOwnProperty,i=n.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(s){return e(s)&&o.call(s,"callee")&&!i.call(s,"callee")};return _n=a,_n}var ut={exports:{}},Sn,Gs;function Mm(){if(Gs)return Sn;Gs=1;function t(){return!1}return Sn=t,Sn}ut.exports;var js;function Ki(){return js||(js=1,function(t,e){var n=Se(),o=Mm(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||o;t.exports=c}(ut,ut.exports)),ut.exports}var wn,Ws;function tr(){if(Ws)return wn;Ws=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(o,i){var a=typeof o;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return wn=n,wn}var Cn,Hs;function $i(){if(Hs)return Cn;Hs=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return Cn=e,Cn}var bn,Ks;function Rm(){if(Ks)return bn;Ks=1;var t=Je(),e=$i(),n=De(),o="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",y="[object String]",g="[object WeakMap]",_="[object ArrayBuffer]",h="[object DataView]",v="[object Float32Array]",S="[object Float64Array]",w="[object Int8Array]",P="[object Int16Array]",b="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",A={};A[v]=A[S]=A[w]=A[P]=A[b]=A[C]=A[E]=A[T]=A[I]=!0,A[o]=A[i]=A[_]=A[a]=A[h]=A[s]=A[u]=A[l]=A[c]=A[d]=A[f]=A[p]=A[m]=A[y]=A[g]=!1;function k(N){return n(N)&&e(N.length)&&!!A[t(N)]}return bn=k,bn}var An,$s;function xm(){if($s)return An;$s=1;function t(e){return function(n){return e(n)}}return An=t,An}var lt={exports:{}};lt.exports;var Ys;function Um(){return Ys||(Ys=1,function(t,e){var n=Uc(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&n.process,u=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=u}(lt,lt.exports)),lt.exports}var En,Js;function Yi(){if(Js)return En;Js=1;var t=Rm(),e=xm(),n=Um(),o=n&&n.isTypedArray,i=o?e(o):t;return En=i,En}var Tn,Zs;function Lc(){if(Zs)return Tn;Zs=1;var t=km(),e=Hi(),n=Ie(),o=Ki(),i=tr(),a=Yi(),s=Object.prototype,u=s.hasOwnProperty;function l(c,d){var f=n(c),p=!f&&e(c),m=!f&&!p&&o(c),y=!f&&!p&&!m&&a(c),g=f||p||m||y,_=g?t(c.length,String):[],h=_.length;for(var v in c)(d||u.call(c,v))&&!(g&&(v=="length"||m&&(v=="offset"||v=="parent")||y&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||i(v,h)))&&_.push(v);return _}return Tn=l,Tn}var In,Qs;function Ji(){if(Qs)return In;Qs=1;var t=Object.prototype;function e(n){var o=n&&n.constructor,i=typeof o=="function"&&o.prototype||t;return n===i}return In=e,In}var Pn,Xs;function Gc(){if(Xs)return Pn;Xs=1;function t(e,n){return function(o){return e(n(o))}}return Pn=t,Pn}var kn,eu;function Fm(){if(eu)return kn;eu=1;var t=Gc(),e=t(Object.keys,Object);return kn=e,kn}var Nn,tu;function Om(){if(tu)return Nn;tu=1;var t=Ji(),e=Fm(),n=Object.prototype,o=n.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))o.call(a,u)&&u!="constructor"&&s.push(u);return s}return Nn=i,Nn}var Mn,ru;function rr(){if(ru)return Mn;ru=1;var t=Li(),e=$i();function n(o){return o!=null&&e(o.length)&&!t(o)}return Mn=n,Mn}var Rn,nu;function jc(){if(nu)return Rn;nu=1;var t=Lc(),e=Om(),n=rr();function o(i){return n(i)?t(i):e(i)}return Rn=o,Rn}var xn,ou;function Dm(){if(ou)return xn;ou=1;var t=Vc(),e=qc(),n=jc();function o(i){return t(i,n,e)}return xn=o,xn}var Un,iu;function Bm(){if(iu)return Un;iu=1;var t=Dm(),e=1,n=Object.prototype,o=n.hasOwnProperty;function i(a,s,u,l,c,d){var f=u&e,p=t(a),m=p.length,y=t(s),g=y.length;if(m!=g&&!f)return!1;for(var _=m;_--;){var h=p[_];if(!(f?h in s:o.call(s,h)))return!1}var v=d.get(a),S=d.get(s);if(v&&S)return v==s&&S==a;var w=!0;d.set(a,s),d.set(s,a);for(var P=f;++_<m;){h=p[_];var b=a[h],C=s[h];if(l)var E=f?l(C,b,h,s,a,d):l(b,C,h,a,s,d);if(!(E===void 0?b===C||c(b,C,u,l,d):E)){w=!1;break}P||(P=h=="constructor")}if(w&&!P){var T=a.constructor,I=s.constructor;T!=I&&"constructor"in a&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(w=!1)}return d.delete(a),d.delete(s),w}return Un=i,Un}var Fn,au;function Vm(){if(au)return Fn;au=1;var t=Oe(),e=Se(),n=t(e,"DataView");return Fn=n,Fn}var On,su;function zm(){if(su)return On;su=1;var t=Oe(),e=Se(),n=t(e,"Promise");return On=n,On}var Dn,uu;function qm(){if(uu)return Dn;uu=1;var t=Oe(),e=Se(),n=t(e,"Set");return Dn=n,Dn}var Bn,lu;function Lm(){if(lu)return Bn;lu=1;var t=Oe(),e=Se(),n=t(e,"WeakMap");return Bn=n,Bn}var Vn,cu;function Gm(){if(cu)return Vn;cu=1;var t=Vm(),e=Gi(),n=zm(),o=qm(),i=Lm(),a=Je(),s=Fc(),u="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(t),y=s(e),g=s(n),_=s(o),h=s(i),v=a;return(t&&v(new t(new ArrayBuffer(1)))!=p||e&&v(new e)!=u||n&&v(n.resolve())!=c||o&&v(new o)!=d||i&&v(new i)!=f)&&(v=function(S){var w=a(S),P=w==l?S.constructor:void 0,b=P?s(P):"";if(b)switch(b){case m:return p;case y:return u;case g:return c;case _:return d;case h:return f}return w}),Vn=v,Vn}var zn,du;function jm(){if(du)return zn;du=1;var t=Wi(),e=Oc(),n=Im(),o=Bm(),i=Gm(),a=Ie(),s=Ki(),u=Yi(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function y(g,_,h,v,S,w){var P=a(g),b=a(_),C=P?d:i(g),E=b?d:i(_);C=C==c?f:C,E=E==c?f:E;var T=C==f,I=E==f,A=C==E;if(A&&s(g)){if(!s(_))return!1;P=!0,T=!1}if(A&&!T)return w||(w=new t),P||u(g)?e(g,_,h,v,S,w):n(g,_,C,h,v,S,w);if(!(h&l)){var k=T&&m.call(g,"__wrapped__"),N=I&&m.call(_,"__wrapped__");if(k||N){var R=k?g.value():g,L=N?_.value():_;return w||(w=new t),S(R,L,h,v,w)}}return A?(w||(w=new t),o(g,_,h,v,S,w)):!1}return zn=y,zn}var qn,fu;function Wc(){if(fu)return qn;fu=1;var t=jm(),e=De();function n(o,i,a,s,u){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:t(o,i,a,s,n,u)}return qn=n,qn}var Ln,pu;function Wm(){if(pu)return Ln;pu=1;var t=Wi(),e=Wc(),n=1,o=2;function i(a,s,u,l){var c=u.length,d=c,f=!l;if(a==null)return!d;for(a=Object(a);c--;){var p=u[c];if(f&&p[2]?p[1]!==a[p[0]]:!(p[0]in a))return!1}for(;++c<d;){p=u[c];var m=p[0],y=a[m],g=p[1];if(f&&p[2]){if(y===void 0&&!(m in a))return!1}else{var _=new t;if(l)var h=l(y,g,m,a,s,_);if(!(h===void 0?e(g,y,n|o,l,_):h))return!1}}return!0}return Ln=i,Ln}var Gn,mu;function Hc(){if(mu)return Gn;mu=1;var t=Te();function e(n){return n===n&&!t(n)}return Gn=e,Gn}var jn,hu;function Hm(){if(hu)return jn;hu=1;var t=Hc(),e=jc();function n(o){for(var i=e(o),a=i.length;a--;){var s=i[a],u=o[s];i[a]=[s,u,t(u)]}return i}return jn=n,jn}var Wn,gu;function Kc(){if(gu)return Wn;gu=1;function t(e,n){return function(o){return o==null?!1:o[e]===n&&(n!==void 0||e in Object(o))}}return Wn=t,Wn}var Hn,yu;function Km(){if(yu)return Hn;yu=1;var t=Wm(),e=Hm(),n=Kc();function o(i){var a=e(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return Hn=o,Hn}var Kn,vu;function Zi(){if(vu)return Kn;vu=1;var t=Je(),e=De(),n="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&t(i)==n}return Kn=o,Kn}var $n,_u;function Qi(){if(_u)return $n;_u=1;var t=Ie(),e=Zi(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:o.test(a)||!n.test(a)||s!=null&&a in Object(s)}return $n=i,$n}var Yn,Su;function $m(){if(Su)return Yn;Su=1;var t=ji(),e="Expected a function";function n(o,i){if(typeof o!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],l=a.cache;if(l.has(u))return l.get(u);var c=o.apply(this,s);return a.cache=l.set(u,c)||l,c};return a.cache=new(n.Cache||t),a}return n.Cache=t,Yn=n,Yn}var Jn,wu;function Ym(){if(wu)return Jn;wu=1;var t=$m(),e=500;function n(o){var i=t(o,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Jn=n,Jn}var Zn,Cu;function Jm(){if(Cu)return Zn;Cu=1;var t=Ym(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,l,c){a.push(l?c.replace(n,"$1"):u||s)}),a});return Zn=o,Zn}var Qn,bu;function Zm(){if(bu)return Qn;bu=1;var t=Qt(),e=xc(),n=Ie(),o=Zi(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(n(u))return e(u,s)+"";if(o(u))return a?a.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Qn=s,Qn}var Xn,Au;function Qm(){if(Au)return Xn;Au=1;var t=Zm();function e(n){return n==null?"":t(n)}return Xn=e,Xn}var eo,Eu;function nr(){if(Eu)return eo;Eu=1;var t=Ie(),e=Qi(),n=Jm(),o=Qm();function i(a,s){return t(a)?a:e(a,s)?[a]:n(o(a))}return eo=i,eo}var to,Tu;function St(){if(Tu)return to;Tu=1;var t=Zi();function e(n){if(typeof n=="string"||t(n))return n;var o=n+"";return o=="0"&&1/n==-1/0?"-0":o}return to=e,to}var ro,Iu;function Xi(){if(Iu)return ro;Iu=1;var t=nr(),e=St();function n(o,i){i=t(i,o);for(var a=0,s=i.length;o!=null&&a<s;)o=o[e(i[a++])];return a&&a==s?o:void 0}return ro=n,ro}var no,Pu;function Xm(){if(Pu)return no;Pu=1;var t=Xi();function e(n,o,i){var a=n==null?void 0:t(n,o);return a===void 0?i:a}return no=e,no}var oo,ku;function eh(){if(ku)return oo;ku=1;function t(e,n){return e!=null&&n in Object(e)}return oo=t,oo}var io,Nu;function th(){if(Nu)return io;Nu=1;var t=nr(),e=Hi(),n=Ie(),o=tr(),i=$i(),a=St();function s(u,l,c){l=t(l,u);for(var d=-1,f=l.length,p=!1;++d<f;){var m=a(l[d]);if(!(p=u!=null&&c(u,m)))break;u=u[m]}return p||++d!=f?p:(f=u==null?0:u.length,!!f&&i(f)&&o(m,f)&&(n(u)||e(u)))}return io=s,io}var ao,Mu;function rh(){if(Mu)return ao;Mu=1;var t=eh(),e=th();function n(o,i){return o!=null&&e(o,i,t)}return ao=n,ao}var so,Ru;function nh(){if(Ru)return so;Ru=1;var t=Wc(),e=Xm(),n=rh(),o=Qi(),i=Hc(),a=Kc(),s=St(),u=1,l=2;function c(d,f){return o(d)&&i(f)?a(s(d),f):function(p){var m=e(p,d);return m===void 0&&m===f?n(p,d):t(f,m,u|l)}}return so=c,so}var uo,xu;function ea(){if(xu)return uo;xu=1;function t(e){return e}return uo=t,uo}var lo,Uu;function oh(){if(Uu)return lo;Uu=1;function t(e){return function(n){return n==null?void 0:n[e]}}return lo=t,lo}var co,Fu;function ih(){if(Fu)return co;Fu=1;var t=Xi();function e(n){return function(o){return t(o,n)}}return co=e,co}var fo,Ou;function ah(){if(Ou)return fo;Ou=1;var t=oh(),e=ih(),n=Qi(),o=St();function i(a){return n(a)?t(o(a)):e(a)}return fo=i,fo}var po,Du;function sh(){if(Du)return po;Du=1;var t=Km(),e=nh(),n=ea(),o=Ie(),i=ah();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?o(s)?e(s[0],s[1]):t(s):i(s)}return po=a,po}var mo,Bu;function $c(){if(Bu)return mo;Bu=1;var t=Oe(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return mo=e,mo}var ho,Vu;function ta(){if(Vu)return ho;Vu=1;var t=$c();function e(n,o,i){o=="__proto__"&&t?t(n,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[o]=i}return ho=e,ho}var go,zu;function Yc(){if(zu)return go;zu=1;var t=ta(),e=_t(),n=Object.prototype,o=n.hasOwnProperty;function i(a,s,u){var l=a[s];(!(o.call(a,s)&&e(l,u))||u===void 0&&!(s in a))&&t(a,s,u)}return go=i,go}var yo,qu;function uh(){if(qu)return yo;qu=1;var t=Yc(),e=nr(),n=tr(),o=Te(),i=St();function a(s,u,l,c){if(!o(s))return s;u=e(u,s);for(var d=-1,f=u.length,p=f-1,m=s;m!=null&&++d<f;){var y=i(u[d]),g=l;if(y==="__proto__"||y==="constructor"||y==="prototype")return s;if(d!=p){var _=m[y];g=c?c(_,y,m):void 0,g===void 0&&(g=o(_)?_:n(u[d+1])?[]:{})}t(m,y,g),m=m[y]}return s}return yo=a,yo}var vo,Lu;function lh(){if(Lu)return vo;Lu=1;var t=Xi(),e=uh(),n=nr();function o(i,a,s){for(var u=-1,l=a.length,c={};++u<l;){var d=a[u],f=t(i,d);s(f,d)&&e(c,n(d,i),f)}return c}return vo=o,vo}var _o,Gu;function ra(){if(Gu)return _o;Gu=1;var t=Gc(),e=t(Object.getPrototypeOf,Object);return _o=e,_o}var So,ju;function ch(){if(ju)return So;ju=1;var t=Bc(),e=ra(),n=qc(),o=zc(),i=Object.getOwnPropertySymbols,a=i?function(s){for(var u=[];s;)t(u,n(s)),s=e(s);return u}:o;return So=a,So}var wo,Wu;function dh(){if(Wu)return wo;Wu=1;function t(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}return wo=t,wo}var Co,Hu;function fh(){if(Hu)return Co;Hu=1;var t=Te(),e=Ji(),n=dh(),o=Object.prototype,i=o.hasOwnProperty;function a(s){if(!t(s))return n(s);var u=e(s),l=[];for(var c in s)c=="constructor"&&(u||!i.call(s,c))||l.push(c);return l}return Co=a,Co}var bo,Ku;function na(){if(Ku)return bo;Ku=1;var t=Lc(),e=fh(),n=rr();function o(i){return n(i)?t(i,!0):e(i)}return bo=o,bo}var Ao,$u;function ph(){if($u)return Ao;$u=1;var t=Vc(),e=ch(),n=na();function o(i){return t(i,n,e)}return Ao=o,Ao}var Eo,Yu;function mh(){if(Yu)return Eo;Yu=1;var t=xc(),e=sh(),n=lh(),o=ph();function i(a,s){if(a==null)return{};var u=t(o(a),function(l){return[l]});return s=e(s),n(a,u,function(l,c){return s(l,c[0])})}return Eo=i,Eo}var hh=mh();const gh=qi(hh),yh=!0,vh="",yt=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),_h=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},Sh=t=>{const{phone_number:e,...n}=gh(t,_h);if(Xl(e)&&e!==vh){const{country_code:o}=t;return{...n,phone_number:yt(o,e)}}return n},wh=(t,e,n,o)=>{const{password:i,...a}=e,s=Sh(a),u=o&&o!=="PASSWORD";let l=s;o==="SMS_OTP"&&s.email&&(l={...s,email:""});const c={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:yh,userAttributes:{...n==="phone_number"?{...l,phone_number:t}:l}};return{username:t,password:u?void 0:i,options:c}},Ch=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:i,phone_number:a}=t;return yt(i,a)}if(n==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const o=e[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=t;return yt(i,a)}return t[o]},bh=(t,e)=>{const n=[],o=e!==void 0;n.push("PASSWORD"),(o||t!=null&&t.emailOtpEnabled)&&n.push("EMAIL_OTP"),(o||t!=null&&t.smsOtpEnabled)&&n.push("SMS_OTP"),(o||t!=null&&t.webAuthnEnabled)&&n.push("WEB_AUTHN");const i=e??[],a=n.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:D}=Tc,Ah=D({actorDoneData:void 0}),Eh=D({challengeName:void 0}),Th=D({missingAttributes:void 0}),Ih=D({remoteError:void 0}),Ph=D({formValues:t=>{var e;return{username:(e=t.formValues)==null?void 0:e.username}}}),kh=D({touched:{}}),Nh=D({user:void 0}),Mh=D({validationError:{}}),Rh=D({totpSecretCode:(t,{data:e})=>{var o;const{sharedSecret:n}=((o=e.nextStep)==null?void 0:o.totpSetupDetails)??{};return n}}),xh=D({allowedMfaTypes:(t,{data:e})=>{var n;return(n=e.nextStep)==null?void 0:n.allowedMFATypes}}),Uh=D({step:"SIGN_IN"}),Fh=D({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Oh=D({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Dh=D({challengeName:(t,{data:e})=>{const{signInStep:n}=e.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Bh=D({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:o,country_code:i}=t;return n==="phone_number"?yt(i,o):o}}),Vh=D({username:Ch}),zh=D({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:o,country_code:i}=t;return n==="phone_number"?yt(i,o):o}}),qh=D({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Lh=D({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Gh=D({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),jh=D({missingAttributes:(t,{data:e})=>{var n;return(n=e.nextStep)==null?void 0:n.missingAttributes}}),Wh=D({validationError:(t,{data:e})=>e}),Hh=D({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=(e==null?void 0:e.message)||"";return n.includes("USER_AUTH flow not enabled")?x(O.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?x(O.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?x(O.VERIFICATION_CODE_INVALID):n.includes("session is expired")?x(O.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?x(O.PASSKEY_AUTHENTICATION_CANCELED):n||e}}),Kh=D({user:(t,{data:e})=>e}),Ju=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),$h=D({codeDeliveryDetails:(t,{data:e})=>{var n;return(n=e==null?void 0:e.nextStep)!=null&&n.codeDeliveryDetails?Ju(e.nextStep.codeDeliveryDetails):Ju(e)}}),Yh=D({formValues:(t,{data:e})=>{const{name:n,value:o}=e;return{...t.formValues,[n]:o}}}),Jh=D({formValues:(t,{data:e})=>Hd({...t.formValues,...e},"password")}),Zh=D({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),Qh=D({unverifiedUserAttributes:(t,{data:e})=>{const n=e||t.fetchedUserAttributes;if(!n)return{};const{email:o,phone_number:i}=n;return{...o&&{email:o},...i&&{phone_number:i}}}}),Xh=D({selectedUserAttribute:void 0}),eg=D({selectedUserAttribute:t=>{var e;return(e=t.formValues)==null?void 0:e.unverifiedAttr}}),tg=D({step:"CONFIRM_SIGN_UP"}),rg=D({selectedAuthMethod:(t,{data:e})=>e.method}),ng=D({selectedAuthMethod:(t,{data:e})=>(e==null?void 0:e.__authMethod)||"PASSWORD"}),og=D({step:"SELECT_AUTH_METHOD"}),ig=D({fetchedUserAttributes:(t,e)=>e.data}),ag=D({hasExistingPasskeys:(t,e)=>e.data}),sg=D({hasExistingPasskeys:!1}),wt={clearActorDoneData:Ah,clearChallengeName:Eh,clearError:Ih,clearFormValues:Ph,clearHasExistingPasskeys:sg,clearMissingAttributes:Th,clearSelectedUserAttribute:Xh,clearTouched:kh,clearUser:Nh,clearValidationError:Mh,handleBlur:Zh,handleInput:Yh,handleSubmit:Jh,setAllowedMfaTypes:xh,setChallengeName:Dh,setCodeDeliveryDetails:$h,setFetchedUserAttributes:ig,setFieldErrors:Wh,setHasExistingPasskeys:ag,setMissingAttributes:jh,setNextResetPasswordStep:Gh,setNextSignInStep:qh,setNextSignUpStep:Lh,setRemoteError:Hh,setConfirmAttributeCompleteStep:Oh,setConfirmSignUpSignUpStep:tg,setSelectAuthMethodStep:og,setSelectedAuthMethod:rg,setSelectedAuthMethodFromForm:ng,setShouldVerifyUserAttributeStep:Fh,setSelectedUserAttribute:eg,setSignInStep:Uh,setTotpSecretCode:Rh,setUser:Kh,setUnverifiedUserAttributes:Qh,setUsernameForgotPassword:Bh,setUsernameSignIn:zh,setUsernameSignUp:Vh},ug=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],lg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",cg=(t,{data:e})=>{var n;return((n=e==null?void 0:e.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},dg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_UP",fg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",pg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="DONE",mg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE",hg=(t,{data:e})=>(e==null?void 0:e.nextStep.resetPasswordStep)==="DONE",gg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_COMPLETE",yg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",vg=(t,{data:e})=>(e==null?void 0:e.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",_g=(t,{data:e})=>(e==null?void 0:e.step)==="RESET_PASSWORD",Sg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_SIGN_UP",wg=({step:t})=>ug.includes(t),Cg=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",bg=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Ag=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),Eg=({step:t})=>t==="RESET_PASSWORD",Tg=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Ig=({step:t})=>t==="CONFIRM_SIGN_UP",Pg=(t,e)=>{const n=e.data||t.fetchedUserAttributes;if(!n)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=n;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},kg=(t,{data:e})=>e.message==="User is already confirmed.",Ng=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),Mg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Rg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},xg=({passwordless:t})=>(t==null?void 0:t.passkeyRegistrationPrompts)!=null,Ug=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",or={hasCompletedAttributeConfirmation:gg,hasCompletedResetPassword:hg,hasCompletedSignIn:pg,hasCompletedSignUp:mg,hasPasskeyRegistrationPrompts:xg,isConfirmSignUpStep:Sg,isConfirmUserAttributeStep:yg,isResetPasswordStep:_g,isShouldConfirmUserAttributeStep:vg,isUserAlreadyConfirmed:kg,shouldAutoSignIn:fg,shouldConfirmResetPassword:Tg,shouldConfirmSignIn:wg,shouldConfirmSignInWithNewPassword:lg,shouldConfirmSignUp:Ig,shouldConfirmSignUpFromSignIn:dg,shouldResetPassword:Eg,shouldResetPasswordFromSignIn:cg,shouldReturnToSelectMethod:Ug,shouldSelectAuthMethod:Ng,shouldSetupTotp:Cg,shouldSetupEmail:bg,shouldSelectMfaType:Ag,shouldVerifyAttribute:Pg,shouldPromptPasskeyRegistration:Mg,shouldPromptPasskeyRegistrationAfterSignup:Rg};var To,Zu;function Jc(){if(Zu)return To;Zu=1;var t=ta(),e=_t();function n(o,i,a){(a!==void 0&&!e(o[i],a)||a===void 0&&!(i in o))&&t(o,i,a)}return To=n,To}var Io,Qu;function Fg(){if(Qu)return Io;Qu=1;function t(e){return function(n,o,i){for(var a=-1,s=Object(n),u=i(n),l=u.length;l--;){var c=u[e?l:++a];if(o(s[c],c,s)===!1)break}return n}}return Io=t,Io}var Po,Xu;function Og(){if(Xu)return Po;Xu=1;var t=Fg(),e=t();return Po=e,Po}var ct={exports:{}};ct.exports;var el;function Dg(){return el||(el=1,function(t,e){var n=Se(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a?n.Buffer:void 0,u=s?s.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,p=u?u(f):new c.constructor(f);return c.copy(p),p}t.exports=l}(ct,ct.exports)),ct.exports}var ko,tl;function Bg(){if(tl)return ko;tl=1;var t=Dc();function e(n){var o=new n.constructor(n.byteLength);return new t(o).set(new t(n)),o}return ko=e,ko}var No,rl;function Vg(){if(rl)return No;rl=1;var t=Bg();function e(n,o){var i=o?t(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return No=e,No}var Mo,nl;function zg(){if(nl)return Mo;nl=1;function t(e,n){var o=-1,i=e.length;for(n||(n=Array(i));++o<i;)n[o]=e[o];return n}return Mo=t,Mo}var Ro,ol;function qg(){if(ol)return Ro;ol=1;var t=Te(),e=Object.create,n=function(){function o(){}return function(i){if(!t(i))return{};if(e)return e(i);o.prototype=i;var a=new o;return o.prototype=void 0,a}}();return Ro=n,Ro}var xo,il;function Lg(){if(il)return xo;il=1;var t=qg(),e=ra(),n=Ji();function o(i){return typeof i.constructor=="function"&&!n(i)?t(e(i)):{}}return xo=o,xo}var Uo,al;function Gg(){if(al)return Uo;al=1;var t=rr(),e=De();function n(o){return e(o)&&t(o)}return Uo=n,Uo}var Fo,sl;function jg(){if(sl)return Fo;sl=1;var t=Je(),e=ra(),n=De(),o="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,l=s.call(Object);function c(d){if(!n(d)||t(d)!=o)return!1;var f=e(d);if(f===null)return!0;var p=u.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return Fo=c,Fo}var Oo,ul;function Zc(){if(ul)return Oo;ul=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return Oo=t,Oo}var Do,ll;function Wg(){if(ll)return Do;ll=1;var t=Yc(),e=ta();function n(o,i,a,s){var u=!a;a||(a={});for(var l=-1,c=i.length;++l<c;){var d=i[l],f=s?s(a[d],o[d],d,a,o):void 0;f===void 0&&(f=o[d]),u?e(a,d,f):t(a,d,f)}return a}return Do=n,Do}var Bo,cl;function Hg(){if(cl)return Bo;cl=1;var t=Wg(),e=na();function n(o){return t(o,e(o))}return Bo=n,Bo}var Vo,dl;function Kg(){if(dl)return Vo;dl=1;var t=Jc(),e=Dg(),n=Vg(),o=zg(),i=Lg(),a=Hi(),s=Ie(),u=Gg(),l=Ki(),c=Li(),d=Te(),f=jg(),p=Yi(),m=Zc(),y=Hg();function g(_,h,v,S,w,P,b){var C=m(_,v),E=m(h,v),T=b.get(E);if(T){t(_,v,T);return}var I=P?P(C,E,v+"",_,h,b):void 0,A=I===void 0;if(A){var k=s(E),N=!k&&l(E),R=!k&&!N&&p(E);I=E,k||N||R?s(C)?I=C:u(C)?I=o(C):N?(A=!1,I=e(E,!0)):R?(A=!1,I=n(E,!0)):I=[]:f(E)||a(E)?(I=C,a(C)?I=y(C):(!d(C)||c(C))&&(I=i(E))):A=!1}A&&(b.set(E,I),w(I,E,S,P,b),b.delete(E)),t(_,v,I)}return Vo=g,Vo}var zo,fl;function $g(){if(fl)return zo;fl=1;var t=Wi(),e=Jc(),n=Og(),o=Kg(),i=Te(),a=na(),s=Zc();function u(l,c,d,f,p){l!==c&&n(c,function(m,y){if(p||(p=new t),i(m))o(l,c,y,d,u,f,p);else{var g=f?f(s(l,y),m,y+"",l,c,p):void 0;g===void 0&&(g=m),e(l,y,g)}},a)}return zo=u,zo}var qo,pl;function Yg(){if(pl)return qo;pl=1;function t(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}return qo=t,qo}var Lo,ml;function Jg(){if(ml)return Lo;ml=1;var t=Yg(),e=Math.max;function n(o,i,a){return i=e(i===void 0?o.length-1:i,0),function(){for(var s=arguments,u=-1,l=e(s.length-i,0),c=Array(l);++u<l;)c[u]=s[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=s[u];return d[i]=a(c),t(o,this,d)}}return Lo=n,Lo}var Go,hl;function Zg(){if(hl)return Go;hl=1;function t(e){return function(){return e}}return Go=t,Go}var jo,gl;function Qg(){if(gl)return jo;gl=1;var t=Zg(),e=$c(),n=ea(),o=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:n;return jo=o,jo}var Wo,yl;function Xg(){if(yl)return Wo;yl=1;var t=800,e=16,n=Date.now;function o(i){var a=0,s=0;return function(){var u=n(),l=e-(u-s);if(s=u,l>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wo=o,Wo}var Ho,vl;function ey(){if(vl)return Ho;vl=1;var t=Qg(),e=Xg(),n=e(t);return Ho=n,Ho}var Ko,_l;function ty(){if(_l)return Ko;_l=1;var t=ea(),e=Jg(),n=ey();function o(i,a){return n(e(i,a,t),i+"")}return Ko=o,Ko}var $o,Sl;function ry(){if(Sl)return $o;Sl=1;var t=_t(),e=rr(),n=tr(),o=Te();function i(a,s,u){if(!o(u))return!1;var l=typeof s;return(l=="number"?e(u)&&n(s,u.length):l=="string"&&s in u)?t(u[s],a):!1}return $o=i,$o}var Yo,wl;function ny(){if(wl)return Yo;wl=1;var t=ty(),e=ry();function n(o){return t(function(i,a){var s=-1,u=a.length,l=u>1?a[u-1]:void 0,c=u>2?a[2]:void 0;for(l=o.length>3&&typeof l=="function"?(u--,l):void 0,c&&e(a[0],a[1],c)&&(l=u<3?void 0:l,u=1),i=Object(i);++s<u;){var d=a[s];d&&o(i,d,s,l)}return i})}return Yo=n,Yo}var Jo,Cl;function oy(){if(Cl)return Jo;Cl=1;var t=$g(),e=ny(),n=e(function(o,i,a){t(o,i,a)});return Jo=n,Jo}var iy=oy();const ay=qi(iy),ir=async(t,e,n,o)=>{const i=await Promise.all(o.map(s=>s(t,e,n))),a=ay({},...i);return ec(a)?Promise.resolve():Promise.reject(a)},sy=8,uy=t=>Array.isArray(t),ly=t=>{if(t)return uy(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Re={async getAmplifyConfig(){var c,d,f,p,m,y;const t=cd.Amplify.getConfig(),e=(c=t.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=((d=t.Auth)==null?void 0:d.Cognito)??{},i=n?Object.entries(n).filter(([g,_])=>g!=="oauth").filter(([g,_])=>!!_).map(g=>g[0]==="phone"?"phone_number":g[0]):void 0,a=ly(o),s=(f=n==null?void 0:n.oauth)!=null&&f.providers?(p=n.oauth.providers)==null?void 0:p.map(g=>g.toString().toLowerCase()):void 0,u=(y=(m=t.Auth)==null?void 0:m.Cognito)==null?void 0:y.passwordless,l={emailOtpEnabled:(u==null?void 0:u.emailOtpEnabled)??(u==null?void 0:u.email_otp_enabled)===!0,smsOtpEnabled:(u==null?void 0:u.smsOtpEnabled)??(u==null?void 0:u.sms_otp_enabled)===!0,webAuthnEnabled:!!((u==null?void 0:u.webAuthn)??(u==null?void 0:u.web_authn)),preferredChallenge:(u==null?void 0:u.preferredChallenge)??(u==null?void 0:u.preferred_challenge)};return{...e,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:l}},getCurrentUser:$.getCurrentUser,handleSignIn:$.signIn,handleSignUp:$.signUp,handleConfirmSignIn:$.confirmSignIn,handleConfirmSignUp:$.confirmSignUp,handleForgotPasswordSubmit:$.confirmResetPassword,handleForgotPassword:$.resetPassword,handleResendSignUpCode:$.resendSignUpCode,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,n){const{password:o}=t,{password:i}=e;if(!i||!n)return null;const a=[],s=n.minLength??sy;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!jd(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(t,e){const{password:n,confirm_password:o}=t,{confirm_password:i,password:a}=e;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const n={};return t.password||(n.password="Password is required"),t.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function cy({services:t}){return Ye({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:n}){const{confirmation_code:o,password:i}=e;return t.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(e){return ir(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const Qc=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),dy=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Dt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Pt=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Dt}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function fy({services:t}){return Ye({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...Qc("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await $.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Dt.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Dt.onError]}}}},confirmSignIn:{...Pt(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Dt}}}}}},setupTotp:{...Pt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Pt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Pt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{async fetchUserAttributes(){return $.fetchUserAttributes()},resetPassword({username:e}){return $.resetPassword({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:n,availableAuthMethods:o,preferredChallenge:i}){const a=n??i??(o==null?void 0:o[0])??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:e,username:n,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:n,password:u})}else return t.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:e,step:n}){const o=dy(n),{[o]:i}=e;return t.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:e}){let{password:n,phone_number:o,country_code:i,confirm_password:a,username:s,...u}=e,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:l});const c={challengeResponse:n,options:{userAttributes:u}};return $.confirmSignIn(c)},signInWithRedirect(e,{data:n}){return $.signInWithRedirect(n)},async validateFields(e){return ir(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const py={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},my={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function hy({services:t}){return Ye({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...my}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await $.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...Qc("signUp")},resetPassword:{invoke:{src:"resetPassword",...py}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{autoSignIn(){return $.autoSignIn()},async fetchUserAttributes(){return $.fetchUserAttributes()},confirmSignUp({formValues:e,username:n}){const{confirmation_code:o}=e,i={username:n,confirmationCode:o};return t.handleConfirmSignUp(i)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:n}){return $.signInWithRedirect(n)},handleSignUp(e){const{formValues:n,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=e,u=o[0],c=wh(i,n,u,a??s);return t.handleSignUp(c)},async validateSignUp(e){return ir(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const gy=()=>Ye({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>$.signOut()}});function yy(){return Ye({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...wt,sendUpdate:Yt()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){const e={userAttributeKey:t};return $.sendUserAttributeVerificationCode(e)},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){const n={confirmationCode:t,userAttributeKey:e};return $.confirmUserAttribute(n)},async validateFields(t){return ir(t.formValues,t.touched,t.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const kt=(t,e)=>{var i,a,s,u,l,c,d,f,p,m,y,g;const n=bh(t.passwordlessCapabilities,(a=(i=t.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((u=(s=t.config)==null?void 0:s.passwordless)==null?void 0:u.preferredAuthMethod)??((l=t.passwordlessCapabilities)==null?void 0:l.preferredChallenge);return{...t.actorDoneData,step:((c=t==null?void 0:t.actorDoneData)==null?void 0:c.step)??e,formValues:{},touched:{},validationError:{},formFields:(d=t.config)==null?void 0:d.formFields,loginMechanisms:(f=t.config)==null?void 0:f.loginMechanisms,passwordSettings:(p=t.config)==null?void 0:p.passwordSettings,signUpAttributes:(m=t.config)==null?void 0:m.signUpAttributes,socialProviders:(y=t.config)==null?void 0:y.socialProviders,availableAuthMethods:n,preferredChallenge:o,passwordless:(g=t.config)==null?void 0:g.passwordless}},{choose:vy,stop:_y}=Tc,rt=t=>_y(t),Sy={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},wy={always:{actions:"configure",target:"getConfig"}};function Cy(t){const{useNextWaitConfig:e,...n}={};return Ye({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Re,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?wy:Sy,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...wt,forwardToActor:vy([{cond:"hasActor",actions:Wp(({actorRef:i})=>i)}]),setActorDoneData:Ce({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes,allowedMfaTypes:a.data.allowedMfaTypes})}),applyAmplifyConfig:Ce({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:u=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:c,formFields:d,passwordSettings:f=a.passwordFormat??{},passwordless:p}=i.config;return s.length===0&&s.push("username"),{formFields:by(d)??{},initialState:c,loginMechanisms:s,passwordSettings:f,passwordless:p,signUpAttributes:u,socialProviders:l}}}),spawnSignInActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=fy({services:s}).withContext(kt(i,"SIGN_IN"));return et(u,{name:"signInActor"})}}),spawnSignUpActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=hy({services:s}).withContext(kt(i,"SIGN_UP"));return et(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=cy({services:s}).withContext(kt(i,"FORGOT_PASSWORD"));return et(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Ce({actorRef:i=>{const a=yy().withContext(kt(i));return et(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Ce({actorRef:i=>{const a=gy().withContext({user:i==null?void 0:i.user});return et(a,{name:"signOutActor"})}}),configure:Ce((i,a)=>{const{services:s,...u}=Ed(n)?a.data??{}:n;return{services:{...Re,...s},config:u}}),setHasSetup:Ce({hasSetup:!0})},guards:{...or,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i,hasUser:({user:i})=>!!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function by(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{let o=t[e][n];o.required=o.isRequired})}),t}const ie={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Avatar:"amplify-avatar",AvatarIcon:"amplify-avatar__icon",AvatarImage:"amplify-avatar__image",AvatarLoader:"amplify-avatar__loader",AIConversation:"amplify-ai-conversation",AIConversationScrollView:"amplify-ai-conversation__scrollview",AIConversationAttachment:"amplify-ai-conversation__attachment",AIConversationAttachmentList:"amplify-ai-conversation__attachment__list",AIConversationAttachmentImage:"amplify-ai-conversation__attachment__image",AIConversationAttachmentName:"amplify-ai-conversation__attachment__name",AIConversationAttachmentSize:"amplify-ai-conversation__attachment__size",AIConversationAttachmentRemove:"amplify-ai-conversation__attachment__remove",AIConversationForm:"amplify-ai-conversation__form",AIConversationFormAttach:"amplify-ai-conversation__form__attach",AIConversationFormError:"amplify-ai-conversation__form__error",AIConversationFormSend:"amplify-ai-conversation__form__send",AIConversationFormField:"amplify-ai-conversation__form__field",AIConversationFormDropzone:"amplify-ai-conversation__form__dropzone",AIConversationMessage:"amplify-ai-conversation__message",AIConversationMessageAvatar:"amplify-ai-conversation__message__avatar",AIConversationMessageSender:"amplify-ai-conversation__message__sender",AIConversationMessageSenderUsername:"amplify-ai-conversation__message__sender__username",AIConversationMessageSenderTimestamp:"amplify-ai-conversation__message__sender__timestamp",AIConversationMessageBody:"amplify-ai-conversation__message__body",AIConversationMessageContent:"amplify-ai-conversation__message__content",AIConversationMessageActions:"amplify-ai-conversation__message__actions",AIConversationMessageList:"amplify-ai-conversation__message__list",AIConversationPrompt:"amplify-ai-conversation__prompt",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",FileUploader:"amplify-fileuploader",FileUploaderDropZone:"amplify-fileuploader__dropzone",FileUploaderDropZoneIcon:"amplify-fileuploader__dropzone__icon",FileUploaderDropZoneText:"amplify-fileuploader__dropzone__text",FileUploaderFilePicker:"amplify-fileuploader__file__picker",FileUploaderFile:"amplify-fileuploader__file",FileUploaderFileWrapper:"amplify-fileuploader__file__wrapper",FileUploaderFileList:"amplify-fileuploader__file__list",FileUploaderFileName:"amplify-fileuploader__file__name",FileUploaderFileSize:"amplify-fileuploader__file__size",FileUploaderFileInfo:"amplify-fileuploader__file__info",FileUploaderFileImage:"amplify-fileuploader__file__image",FileUploaderFileMain:"amplify-fileuploader__file__main",FileUploaderFileStatus:"amplify-fileuploader__file__status",FileUploaderLoader:"amplify-fileuploader__loader",FileUploaderPreviewer:"amplify-fileuploader__previewer",FileUploaderPreviewerText:"amplify-fileuploader__previewer__text",FileUploaderPreviewerActions:"amplify-fileuploader__previewer__actions",FileUploaderPreviewerFooter:"amplify-fileuploader__previewer__footer",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},Ay=({componentName:t,packageName:e,version:n})=>{const o=[`ui-${e}`,n];switch(t){case"AIConversation":{F.setCustomUserAgent({...md,additionalDetails:[[t],o]});break}case"Authenticator":{F.setCustomUserAgent({...gd,additionalDetails:[[t],o]});break}case"ChangePassword":case"DeleteUser":{F.setCustomUserAgent({...hd,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{F.setCustomUserAgent({...yd,additionalDetails:[[t],o]});break}case"InAppMessaging":{F.setCustomUserAgent({...vd,additionalDetails:[[t],o]});break}case"LocationSearch":{F.setCustomUserAgent({..._d,additionalDetails:[[t],o]});break}case"MapView":{F.setCustomUserAgent({...Sd,additionalDetails:[[t],o]});break}case"StorageManager":{F.setCustomUserAgent({...wd,additionalDetails:[[t],o]});break}case"StorageBrowser":{F.setCustomUserAgent({...Cd,additionalDetails:[[t],o]});break}}return Id},Ey={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},Ty={class:"amplify-flex amplify-authenticator__icon-wrapper"},Iy=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),Py=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),de=r.defineComponent({__name:"base-alert",setup(t){const e=r.ref(!0),n=x("Dismiss alert");function o(){e.value=!1}return(i,a)=>{const s=oe;return e.value?(r.openBlock(),r.createElementBlock("div",Ey,[r.createElementVNode("div",Ty,[Iy,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[Py]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}}),fe=r.defineComponent({__name:"base-field-set",setup(t){const e=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(e).default&&r.unref(e).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function ky(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Xc(t){let e=0,n,o;const i=()=>{e-=1,o&&e<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(e+=1,n||(o=r.effectScope(!0),n=o.run(()=>t(...a))),ky(i),n)}function Ny(t){return"state"in t}var bl=function(){};function My(t){return"getSnapshot"in t?t.getSnapshot():Ny(t)?t.state:void 0}function Ry(t,e){e===void 0&&(e=My);var n=r.isRef(t)?t:r.shallowRef(t),o=r.shallowRef(e(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,u){o.value=e(a);var l=a.subscribe({next:function(c){return o.value=c},error:bl,complete:bl}).unsubscribe;u(function(){return l()})},{immediate:!0}),{state:o,send:i}}const xy=t=>{var e,n,o;return{...(o=(n=(e=Ri(t))==null?void 0:e.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},oa=Xc(()=>{const t=Cy(),e=Rc(t).start(),n=r.ref("configuring"),{state:o,send:i}=Ry(e),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},u=Pd(e,(l,c)=>tc(l,c,{onSignIn:a,onSignOut:s}));return $.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{u()}),{authStatus:n,service:e,send:i,state:o}}),ne=Xc(()=>{const{authStatus:t,state:e,send:n}=oa(),o=r.reactive({});return r.watchEffect(()=>{const i=Ud({send:n,state:e.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?xy(e.value):null;o.QRFields=a,o.authStatus=t.value,o.send=n,o.state=e}),o});let Uy=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Ct=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(t,{emit:e}){const n=o=>{e("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),Fy={},Oy={"data-amplify-label":""};function Dy(t,e){return r.openBlock(),r.createElementBlock("label",Oy,[r.renderSlot(t.$slots,"default")])}const bt=Gt(Fy,[["render",Dy]]),By=["aria-label","aria-checked"],Vy=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),zy=[Vy],qy=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),Ly=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),Gy=[qy,Ly],jy={inheritAttrs:!1},ia=r.defineComponent({...jy,__name:"password-control",props:{name:null,label:null,autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:null,required:{type:Boolean,default:!0},describedBy:null},setup(t){const e=t,n=x("Show password"),o=x("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:u,label:l,autocomplete:c,hasError:d,labelHidden:f,placeholder:p,required:m}=r.toRefs(e),y=r.ref("");function g(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const _=x((p==null?void 0:p.value)??l.value),h=x(l.value);return(v,S)=>{const w=bt,P=Ct,b=re;return r.openBlock(),r.createBlock(b,{class:r.normalizeClass([r.unref(ie).Flex,r.unref(ie).Field,r.unref(ie).TextField,r.unref(ie).PasswordField])},{default:r.withCtx(()=>[r.createVNode(w,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(f)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["class","for"]),r.createVNode(b,{class:r.normalizeClass([r.unref(ie).Flex,r.unref(ie).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(b,{class:r.normalizeClass(r.unref(ie).FieldGroupFieldWrapper)},{default:r.withCtx(()=>[r.createVNode(P,r.mergeProps(v.$attrs,{modelValue:y.value,"onUpdate:modelValue":S[0]||(S[0]=C=>y.value=C),class:[r.unref(ie).Input,r.unref(ie).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(u),autocomplete:r.unref(c),required:r.unref(m)??!0,placeholder:r.unref(_),type:i.value,"aria-invalid":r.unref(d),"aria-describedBy":t.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),r.createVNode(b,{class:r.normalizeClass(r.unref(ie).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(ie).Button,r.unref(ie).FieldGroupControl,r.unref(ie).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:g},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(ie).Icon)},zy,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(ie).Icon)},Gy,2))],10,By)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),Wy=["value","selected"],Hy=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(t,{emit:e}){const n=t,{options:o,selectValue:i}=r.toRefs(n),a=s=>{e("update:selectValue",s.target.value)};return(s,u)=>(r.openBlock(),r.createElementBlock("select",{onChange:u[0]||(u[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,c)=>(r.openBlock(),r.createElementBlock("option",{key:c,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,Wy))),128))],32))}}),Ky=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),$y=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(t){const e=t,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:u,dialCode:l,dialCodeList:c}=r.toRefs(e),d=Math.floor(Math.random()*999999),f=Math.floor(Math.random()*999999);return(p,m)=>{const y=bt,g=Hy,_=re,h=Ct;return r.openBlock(),r.createBlock(_,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},p.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(_,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(_,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[t.type==="tel"?(r.openBlock(),r.createBlock(_,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(f),class:"amplify-label amplify-visually-hidden"},p.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(_,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(f),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(c),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(_,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[Ky]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(_,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:r.unref(u)??!0,type:t.type,placeholder:r.unref(i),"aria-invalid":t.hasError,"aria-describedBy":t.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),Yy=["id"],ed=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(t){const e=t,{name:n,formField:o}=r.toRefs(e),{validationErrors:i}=r.toRefs(ne()),{type:a}=o.value,s=a==="password",u=Uy(12),l=r.computed(()=>Vd(i.value[n.value])),c=r.computed(()=>{var f;return((f=l.value)==null?void 0:f.length)>0}),d=r.computed(()=>c.value?u:void 0);return(f,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(ia,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock($y,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(c)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(m,y)=>(r.openBlock(),r.createElementBlock("p",{key:y,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(x)(m)),1))),128))],8,Yy)):r.createCommentVNode("",!0)],64))}}),ge=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(t){const e=t,{route:n}=r.toRefs(e),{state:o}=oa();let i=[];return r.onBeforeMount(()=>{i=Jf(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([u,l])=>(r.openBlock(),r.createBlock(ed,{name:u,key:u,formField:l},null,8,["name","formField"]))),128))}}),Nt=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(t){const e=t,{provider:n}=r.toRefs(e),{toFederatedSignIn:o}=ne(),i=()=>{o({provider:n.value})};return(a,s)=>{const u=oe;return r.openBlock(),r.createBlock(u,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),Jy=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),Zy={class:"amplify-text"},Qy=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),Xy={class:"amplify-text"},ev=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),tv={class:"amplify-text"},rv=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),nv={class:"amplify-text"},ov=["data-label"],ar=r.defineComponent({__name:"federated-sign-in",setup(t){const e=ne(),{route:n,socialProviders:o}=e,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),u=o==null?void 0:o.includes("google"),l=s||u||i||a,{getSignInWithFederationText:c,getOrText:d}=ae,f=r.computed(()=>wi),p=r.computed(()=>c(n,"amazon")),m=r.computed(()=>c(n,"apple")),y=r.computed(()=>c(n,"facebook")),g=r.computed(()=>c(n,"google")),_=r.computed(()=>d());return(h,v)=>{const S=re;return r.unref(l)?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Nt,{key:0,provider:r.unref(f).Amazon},{default:r.withCtx(()=>[Jy,r.createElementVNode("span",Zy,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Nt,{key:1,provider:r.unref(f).Apple},{default:r.withCtx(()=>[Qy,r.createElementVNode("span",Xy,r.toDisplayString(r.unref(m)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Nt,{key:2,provider:r.unref(f).Facebook},{default:r.withCtx(()=>[ev,r.createElementVNode("span",tv,r.toDisplayString(r.unref(y)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(u)?(r.openBlock(),r.createBlock(Nt,{key:3,provider:r.unref(f).Google},{default:r.withCtx(()=>[rv,r.createElementVNode("span",nv,r.toDisplayString(r.unref(g)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(_)},null,8,ov)]),_:1})):r.createCommentVNode("",!0)}}}),iv=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),av={"data-amplify-footer":""},aa=r.defineComponent({__name:"sign-in",setup(t){const e=ne(),{submitForm:n,updateForm:o,toForgotPassword:i}=e,{error:a,isPending:s}=r.toRefs(e),{getForgotPasswordText:u,getSignInText:l,getSigningInText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=_=>{const{name:h,value:v}=_.target;o({name:h,value:v})},y=_=>{n(ce(_))},g=()=>{i()};return(_,h)=>{const v=fe,S=de,w=oe,P=re,b=le,C=ue;return r.renderSlot(_.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.renderSlot(_.$slots,"header"),r.createVNode(P,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(b,{"data-amplify-authenticator-signin":"",onInput:m,onSubmit:r.withModifiers(y,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:E})=>[r.renderSlot(_.$slots,"form",{info:E,onSignInSubmit:y,onInput:m,onForgotPasswordClicked:g})]),default:r.withCtx(()=>[r.createVNode(ar),r.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:E})=>[r.renderSlot(_.$slots,"signin-fields",{info:E})]),default:r.withCtx(()=>[iv,r.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(w,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(p):r.unref(f)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(C,null,{default:r.withCtx(()=>[r.renderSlot(_.$slots,"footer",{},()=>[r.createElementVNode("div",av,[r.createVNode(w,{onClick:g,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})])])]),_:3})])}}}),sa=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(ge,{route:"signUp"}))}}),ua=r.defineComponent({__name:"sign-up",setup(t){const e=ne(),{submitForm:n,updateBlur:o,updateForm:i}=e,{error:a,hasValidationErrors:s,isPending:u}=r.toRefs(e),{getCreateAccountText:l}=ae,c=r.computed(()=>l()),d=m=>{const{checked:y,name:g,type:_,value:h}=m.target;i({name:g,value:_==="checkbox"&&!y?void 0:h})};function f(m){const{name:y}=m.target;o({name:y})}const p=m=>{n(ce(m))};return(m,y)=>{const g=fe,_=de,h=oe,v=re,S=le,w=ue;return r.renderSlot(m.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(m.$attrs)),()=>[r.renderSlot(m.$slots,"header"),r.createVNode(v,r.normalizeProps(r.guardReactiveProps(m.$attrs)),{default:r.withCtx(()=>[r.createVNode(S,{onInput:d,onBlurCapture:f,onSubmit:r.withModifiers(p,["prevent"])},{default:r.withCtx(()=>[r.createVNode(ar),r.createVNode(v,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{fieldSetI:r.withCtx(({slotData:P})=>[r.renderSlot(m.$slots,"signup-fields",{info:P})]),default:r.withCtx(()=>[r.createVNode(sa)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(_,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(u)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(w,null,{default:r.withCtx(()=>[r.renderSlot(m.$slots,"footer")]),_:3})])}}}),sv={};function uv(t,e){const n=re;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default")]),_:3})]),_:3})}const lv=Gt(sv,[["render",uv]]),cv=["tabindex","aria-selected","id","aria-controls"],dv=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(t){const e=t,{active:n,id:o,label:i}=r.toRefs(e);return(a,s)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,cv))}}),fv="4.4.3",pv={};function mv(t,e){return r.renderSlot(t.$slots,"textI",r.normalizeProps(r.guardReactiveProps(t.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(t.$attrs,{"data-amplify-text":""}),[r.renderSlot(t.$slots,"default")],16)])}const la=Gt(pv,[["render",mv]]),we=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(t,{slots:e,attrs:n}){var s,u;const o=e.default?e.default():[],i=e.headingI?e.headingI():[],a=`${n.class||""} amplify-heading--${t.level}`;if(((u=(s=i[0])==null?void 0:s.children)==null?void 0:u.length)===0)i[0].children=[r.h(`h${t.level}`,{...n,class:a},[o])];else return()=>r.h(`h${t.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),ca=r.defineComponent({__name:"confirm-sign-up",setup(t){const e=ne(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(e),{resendCode:a,submitForm:s,updateForm:u}=e,{getDeliveryMethodText:l,getDeliveryMessageText:c,getResendCodeText:d,getConfirmText:f}=ae,p=r.computed(()=>l(n.value)),m=r.computed(()=>d()),y=r.computed(()=>f()),g=r.computed(()=>c(n.value)),_=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{v(w)},v=w=>{s(ce(w))},S=()=>{a()};return(w,P)=>{const b=we,C=la,E=fe,T=de,I=oe,A=ue,k=re,N=le;return r.renderSlot(w.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(k,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(N,{onInput:_,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(b,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(C,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1}),r.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(T,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),da=r.defineComponent({__name:"confirm-sign-in",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s,challengeName:u}=r.toRefs(e),l=r.computed(()=>u.value),{getBackToSignInText:c,getConfirmText:d,getChallengeText:f}=ae,p=r.computed(()=>f(l.value)),m=r.computed(()=>c()),y=r.computed(()=>d()),g=v=>{const{name:S,value:w}=v.target;i({name:S,value:w})},_=v=>{n(ce(v))},h=()=>{o()};return(v,S)=>{const w=we,P=re,b=de,C=oe,E=ue,T=fe,I=le;return r.renderSlot(v.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(v.$attrs)),()=>[r.createVNode(P,r.normalizeProps(r.guardReactiveProps(v.$attrs)),{default:r.withCtx(()=>[r.createVNode(I,{"data-amplify-authenticator-confirmsignin":"",onInput:g,onSubmit:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(v.$slots,"header",{},()=>[r.createVNode(w,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmSignIn"})]),_:1}),r.createVNode(E,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(b,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(v.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Ge={},Zo,Al;function hv(){return Al||(Al=1,Zo=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Zo}var Qo={},Ne={},El;function Be(){if(El)return Ne;El=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ne.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},Ne.getSymbolTotalCodewords=function(o){return e[o]},Ne.getBCHDigit=function(n){let o=0;for(;n!==0;)o++,n>>>=1;return o},Ne.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},Ne.isKanjiModeEnabled=function(){return typeof t<"u"},Ne.toSJIS=function(o){return t(o)},Ne}var Xo={},Tl;function fa(){return Tl||(Tl=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,i){if(t.isValid(o))return o;try{return e(o)}catch{return i}}}(Xo)),Xo}var ei,Il;function gv(){if(Il)return ei;Il=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let o=0;o<n;o++)this.putBit((e>>>n-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ei=t,ei}var ti,Pl;function yv(){if(Pl)return ti;Pl=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,o,i){const a=e*this.size+n;this.data[a]=o,i&&(this.reservedBit[a]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,o){this.data[e*this.size+n]^=o},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},ti=t,ti}var ri={},kl;function vv(){return kl||(kl=1,function(t){const e=Be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=e(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,u=[a-7];for(let l=1;l<i-1;l++)u[l]=u[l-1]-s;return u.push(6),u.reverse()},t.getPositions=function(o){const i=[],a=t.getRowColCoords(o),s=a.length;for(let u=0;u<s;u++)for(let l=0;l<s;l++)u===0&&l===0||u===0&&l===s-1||u===s-1&&l===0||i.push([a[u],a[l]]);return i}}(ri)),ri}var ni={},Nl;function _v(){if(Nl)return ni;Nl=1;const t=Be().getSymbolSize,e=7;return ni.getPositions=function(o){const i=t(o);return[[0,0],[i-e,0],[0,i-e]]},ni}var oi={},Ml;function Sv(){return Ml||(Ml=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const a=i.size;let s=0,u=0,l=0,c=null,d=null;for(let f=0;f<a;f++){u=l=0,c=d=null;for(let p=0;p<a;p++){let m=i.get(f,p);m===c?u++:(u>=5&&(s+=e.N1+(u-5)),c=m,u=1),m=i.get(p,f),m===d?l++:(l>=5&&(s+=e.N1+(l-5)),d=m,l=1)}u>=5&&(s+=e.N1+(u-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(i){const a=i.size;let s=0;for(let u=0;u<a-1;u++)for(let l=0;l<a-1;l++){const c=i.get(u,l)+i.get(u,l+1)+i.get(u+1,l)+i.get(u+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(i){const a=i.size;let s=0,u=0,l=0;for(let c=0;c<a;c++){u=l=0;for(let d=0;d<a;d++)u=u<<1&2047|i.get(c,d),d>=10&&(u===1488||u===93)&&s++,l=l<<1&2047|i.get(d,c),d>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*e.N4};function n(o,i,a){switch(o){case t.Patterns.PATTERN000:return(i+a)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(i+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return i*a%2+i*a%3===0;case t.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case t.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(i,a){const s=a.size;for(let u=0;u<s;u++)for(let l=0;l<s;l++)a.isReserved(l,u)||a.xor(l,u,n(i,l,u))},t.getBestMask=function(i,a){const s=Object.keys(t.Patterns).length;let u=0,l=1/0;for(let c=0;c<s;c++){a(c),t.applyMask(c,i);const d=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(c,i),d<l&&(l=d,u=c)}return u}}(oi)),oi}var Mt={},Rl;function td(){if(Rl)return Mt;Rl=1;const t=fa(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Mt.getBlocksCount=function(i,a){switch(a){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},Mt.getTotalCodewordsCount=function(i,a){switch(a){case t.L:return n[(i-1)*4+0];case t.M:return n[(i-1)*4+1];case t.Q:return n[(i-1)*4+2];case t.H:return n[(i-1)*4+3];default:return}},Mt}var ii={},nt={},xl;function wv(){if(xl)return nt;xl=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let o=1;for(let i=0;i<255;i++)t[i]=o,e[o]=i,o<<=1,o&256&&(o^=285);for(let i=255;i<512;i++)t[i]=t[i-255]}(),nt.log=function(o){if(o<1)throw new Error("log("+o+")");return e[o]},nt.exp=function(o){return t[o]},nt.mul=function(o,i){return o===0||i===0?0:t[e[o]+e[i]]},nt}var Ul;function Cv(){return Ul||(Ul=1,function(t){const e=wv();t.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let u=0;u<i.length;u++)a[s+u]^=e.mul(o[s],i[u]);return a},t.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=e.mul(i[l],s);let u=0;for(;u<a.length&&a[u]===0;)u++;a=a.slice(u)}return a},t.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=t.mul(i,new Uint8Array([1,e.exp(a)]));return i}}(ii)),ii}var ai,Fl;function bv(){if(Fl)return ai;Fl=1;const t=Cv();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(o){this.degree=o,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(o.length+this.degree);i.set(o);const a=t.mod(i,this.genPoly),s=this.degree-a.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(a,s),u}return a},ai=e,ai}var si={},ui={},li={},Ol;function rd(){return Ol||(Ol=1,li.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),li}var ve={},Dl;function nd(){if(Dl)return ve;Dl=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
21
|
-
]))+`;ve.KANJI=new RegExp(n,"g"),ve.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ve.BYTE=new RegExp(o,"g"),ve.NUMERIC=new RegExp(t,"g"),ve.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+n+"$"),a=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ve.testKanji=function(l){return i.test(l)},ve.testNumeric=function(l){return a.test(l)},ve.testAlphanumeric=function(l){return s.test(l)},ve}var Bl;function Ve(){return Bl||(Bl=1,function(t){const e=rd(),n=nd();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},t.getBestModeForData=function(a){return n.testNumeric(a)?t.NUMERIC:n.testAlphanumeric(a)?t.ALPHANUMERIC:n.testKanji(a)?t.KANJI:t.BYTE},t.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},t.isValid=function(a){return a&&a.bit&&a.ccBits};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(a,s){if(t.isValid(a))return a;try{return o(a)}catch{return s}}}(ui)),ui}var Vl;function
|
|
22
|
-
Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),o.put(a,13)}},gi=n,gi}var yi={exports:{}},Hl;function
|
|
23
|
-
Suggested mode is: `+e.toString(w));switch(S===e.KANJI&&!u.isKanjiModeEnabled()&&(S=e.BYTE),S){case e.NUMERIC:return new n(h);case e.ALPHANUMERIC:return new o(h);case e.KANJI:return new a(h);case e.BYTE:return new i(h)}}t.fromArray=function(v){return v.reduce(function(S,w){return typeof w=="string"?S.push(_(w,null)):w.data&&S.push(_(w.data,w.mode)),S},[])},t.fromString=function(v,S){const w=f(v,u.isKanjiModeEnabled()),P=y(w),b=g(P,S),C=l.find_path(b.map,"start","end"),E=[];for(let T=1;T<C.length-1;T++)E.push(b.table[C[T]].node);return t.fromArray(m(E))},t.rawSplit=function(v){return t.fromArray(f(v,u.isKanjiModeEnabled()))}}(di)),di}var $l;function
|
|
20
|
+
`).concat(u.message))}else return n.getStateNodeByPath(a)})},t.prototype.formatTransition=function(e){var n=this,o=Sp(e.target),i="internal"in e?e.internal:o?o.some(function(l){return z(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),u=M(M({},e),{actions:be(he(e.actions)),cond:cc(e.cond,a),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return M(M({},u),{target:u.target?u.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return u},t.prototype.formatTransitions=function(){var e,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=tt,u=a[s],l=u===void 0?[]:u,c=Ui(a,[typeof s=="symbol"?s:s+""]);i=W(Object.keys(c).map(function(v){!H&&v===We&&ee(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(o.id,'".'));var S=ze(v,c[v]);return H||Gp(o,v,S),S}).concat(ze(tt,l)))}var d=this.config.always?ze("",this.config.always):[],f=this.config.onDone?ze(String(it(this.id)),this.config.onDone):[];H||ee(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=W(this.invoke.map(function(v){var S=[];return v.onDone&&S.push.apply(S,j([],V(ze(String(ft(v.id)),v.onDone)),!1)),v.onError&&S.push.apply(S,j([],V(ze(String(He(v.id)),v.onError)),!1)),S})),m=this.after,y=W(j(j(j(j([],V(f),!1),V(p),!1),V(i),!1),V(d),!1).map(function(v){return he(v).map(function(S){return o.formatTransition(S)})}));try{for(var g=B(m),_=g.next();!_.done;_=g.next()){var h=_.value;y.push(h)}}catch(v){e={error:v}}finally{try{_&&!_.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}(),Ma=!1;function Ye(t,e){return!H&&!("predictableActionArguments"in t)&&!Ma&&(Ma=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new jp(t,e)}var Ce=bc,Yt=yc,Wp=Ec,It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ur,Ra;function xc(){if(Ra)return ur;Ra=1;function t(e,n){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=n(e[o],o,e);return a}return ur=t,ur}var lr,xa;function Hp(){if(xa)return lr;xa=1;function t(){this.__data__=[],this.size=0}return lr=t,lr}var cr,Ua;function _t(){if(Ua)return cr;Ua=1;function t(e,n){return e===n||e!==e&&n!==n}return cr=t,cr}var dr,Fa;function Jt(){if(Fa)return dr;Fa=1;var t=_t();function e(n,o){for(var i=n.length;i--;)if(t(n[i][0],o))return i;return-1}return dr=e,dr}var fr,Oa;function Kp(){if(Oa)return fr;Oa=1;var t=Jt(),e=Array.prototype,n=e.splice;function o(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():n.call(a,s,1),--this.size,!0}return fr=o,fr}var pr,Da;function $p(){if(Da)return pr;Da=1;var t=Jt();function e(n){var o=this.__data__,i=t(o,n);return i<0?void 0:o[i][1]}return pr=e,pr}var mr,Ba;function Yp(){if(Ba)return mr;Ba=1;var t=Jt();function e(n){return t(this.__data__,n)>-1}return mr=e,mr}var hr,Va;function Jp(){if(Va)return hr;Va=1;var t=Jt();function e(n,o){var i=this.__data__,a=t(i,n);return a<0?(++this.size,i.push([n,o])):i[a][1]=o,this}return hr=e,hr}var gr,za;function Zt(){if(za)return gr;za=1;var t=Hp(),e=Kp(),n=$p(),o=Yp(),i=Jp();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,gr=a,gr}var yr,qa;function Zp(){if(qa)return yr;qa=1;var t=Zt();function e(){this.__data__=new t,this.size=0}return yr=e,yr}var vr,La;function Qp(){if(La)return vr;La=1;function t(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}return vr=t,vr}var _r,Ga;function Xp(){if(Ga)return _r;Ga=1;function t(e){return this.__data__.get(e)}return _r=t,_r}var Sr,ja;function em(){if(ja)return Sr;ja=1;function t(e){return this.__data__.has(e)}return Sr=t,Sr}var wr,Wa;function Uc(){if(Wa)return wr;Wa=1;var t=typeof It=="object"&&It&&It.Object===Object&&It;return wr=t,wr}var Cr,Ha;function Se(){if(Ha)return Cr;Ha=1;var t=Uc(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Cr=n,Cr}var br,Ka;function Qt(){if(Ka)return br;Ka=1;var t=Se(),e=t.Symbol;return br=e,br}var Ar,$a;function tm(){if($a)return Ar;$a=1;var t=Qt(),e=Object.prototype,n=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=n.call(s,i),l=s[i];try{s[i]=void 0;var c=!0}catch{}var d=o.call(s);return c&&(u?s[i]=l:delete s[i]),d}return Ar=a,Ar}var Er,Ya;function rm(){if(Ya)return Er;Ya=1;var t=Object.prototype,e=t.toString;function n(o){return e.call(o)}return Er=n,Er}var Tr,Ja;function Je(){if(Ja)return Tr;Ja=1;var t=Qt(),e=tm(),n=rm(),o="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:o:a&&a in Object(u)?e(u):n(u)}return Tr=s,Tr}var Ir,Za;function Te(){if(Za)return Ir;Za=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return Ir=t,Ir}var Pr,Qa;function Li(){if(Qa)return Pr;Qa=1;var t=Je(),e=Te(),n="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var l=t(u);return l==o||l==i||l==n||l==a}return Pr=s,Pr}var kr,Xa;function nm(){if(Xa)return kr;Xa=1;var t=Se(),e=t["__core-js_shared__"];return kr=e,kr}var Nr,es;function om(){if(es)return Nr;es=1;var t=nm(),e=function(){var o=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function n(o){return!!e&&e in o}return Nr=n,Nr}var Mr,ts;function Fc(){if(ts)return Mr;ts=1;var t=Function.prototype,e=t.toString;function n(o){if(o!=null){try{return e.call(o)}catch{}try{return o+""}catch{}}return""}return Mr=n,Mr}var Rr,rs;function im(){if(rs)return Rr;rs=1;var t=Li(),e=om(),n=Te(),o=Fc(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,c=u.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||e(p))return!1;var m=t(p)?d:a;return m.test(o(p))}return Rr=f,Rr}var xr,ns;function am(){if(ns)return xr;ns=1;function t(e,n){return e==null?void 0:e[n]}return xr=t,xr}var Ur,os;function Oe(){if(os)return Ur;os=1;var t=im(),e=am();function n(o,i){var a=e(o,i);return t(a)?a:void 0}return Ur=n,Ur}var Fr,is;function Gi(){if(is)return Fr;is=1;var t=Oe(),e=Se(),n=t(e,"Map");return Fr=n,Fr}var Or,as;function Xt(){if(as)return Or;as=1;var t=Oe(),e=t(Object,"create");return Or=e,Or}var Dr,ss;function sm(){if(ss)return Dr;ss=1;var t=Xt();function e(){this.__data__=t?t(null):{},this.size=0}return Dr=e,Dr}var Br,us;function um(){if(us)return Br;us=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return Br=t,Br}var Vr,ls;function lm(){if(ls)return Vr;ls=1;var t=Xt(),e="__lodash_hash_undefined__",n=Object.prototype,o=n.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return o.call(s,a)?s[a]:void 0}return Vr=i,Vr}var zr,cs;function cm(){if(cs)return zr;cs=1;var t=Xt(),e=Object.prototype,n=e.hasOwnProperty;function o(i){var a=this.__data__;return t?a[i]!==void 0:n.call(a,i)}return zr=o,zr}var qr,ds;function dm(){if(ds)return qr;ds=1;var t=Xt(),e="__lodash_hash_undefined__";function n(o,i){var a=this.__data__;return this.size+=this.has(o)?0:1,a[o]=t&&i===void 0?e:i,this}return qr=n,qr}var Lr,fs;function fm(){if(fs)return Lr;fs=1;var t=sm(),e=um(),n=lm(),o=cm(),i=dm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Lr=a,Lr}var Gr,ps;function pm(){if(ps)return Gr;ps=1;var t=fm(),e=Zt(),n=Gi();function o(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return Gr=o,Gr}var jr,ms;function mm(){if(ms)return jr;ms=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return jr=t,jr}var Wr,hs;function er(){if(hs)return Wr;hs=1;var t=mm();function e(n,o){var i=n.__data__;return t(o)?i[typeof o=="string"?"string":"hash"]:i.map}return Wr=e,Wr}var Hr,gs;function hm(){if(gs)return Hr;gs=1;var t=er();function e(n){var o=t(this,n).delete(n);return this.size-=o?1:0,o}return Hr=e,Hr}var Kr,ys;function gm(){if(ys)return Kr;ys=1;var t=er();function e(n){return t(this,n).get(n)}return Kr=e,Kr}var $r,vs;function ym(){if(vs)return $r;vs=1;var t=er();function e(n){return t(this,n).has(n)}return $r=e,$r}var Yr,_s;function vm(){if(_s)return Yr;_s=1;var t=er();function e(n,o){var i=t(this,n),a=i.size;return i.set(n,o),this.size+=i.size==a?0:1,this}return Yr=e,Yr}var Jr,Ss;function ji(){if(Ss)return Jr;Ss=1;var t=pm(),e=hm(),n=gm(),o=ym(),i=vm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Jr=a,Jr}var Zr,ws;function _m(){if(ws)return Zr;ws=1;var t=Zt(),e=Gi(),n=ji(),o=200;function i(a,s){var u=this.__data__;if(u instanceof t){var l=u.__data__;if(!e||l.length<o-1)return l.push([a,s]),this.size=++u.size,this;u=this.__data__=new n(l)}return u.set(a,s),this.size=u.size,this}return Zr=i,Zr}var Qr,Cs;function Wi(){if(Cs)return Qr;Cs=1;var t=Zt(),e=Zp(),n=Qp(),o=Xp(),i=em(),a=_m();function s(u){var l=this.__data__=new t(u);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,Qr=s,Qr}var Xr,bs;function Sm(){if(bs)return Xr;bs=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return Xr=e,Xr}var en,As;function wm(){if(As)return en;As=1;function t(e){return this.__data__.has(e)}return en=t,en}var tn,Es;function Cm(){if(Es)return tn;Es=1;var t=ji(),e=Sm(),n=wm();function o(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return o.prototype.add=o.prototype.push=e,o.prototype.has=n,tn=o,tn}var rn,Ts;function bm(){if(Ts)return rn;Ts=1;function t(e,n){for(var o=-1,i=e==null?0:e.length;++o<i;)if(n(e[o],o,e))return!0;return!1}return rn=t,rn}var nn,Is;function Am(){if(Is)return nn;Is=1;function t(e,n){return e.has(n)}return nn=t,nn}var on,Ps;function Oc(){if(Ps)return on;Ps=1;var t=Cm(),e=bm(),n=Am(),o=1,i=2;function a(s,u,l,c,d,f){var p=l&o,m=s.length,y=u.length;if(m!=y&&!(p&&y>m))return!1;var g=f.get(s),_=f.get(u);if(g&&_)return g==u&&_==s;var h=-1,v=!0,S=l&i?new t:void 0;for(f.set(s,u),f.set(u,s);++h<m;){var w=s[h],P=u[h];if(c)var b=p?c(P,w,h,u,s,f):c(w,P,h,s,u,f);if(b!==void 0){if(b)continue;v=!1;break}if(S){if(!e(u,function(C,E){if(!n(S,E)&&(w===C||d(w,C,l,c,f)))return S.push(E)})){v=!1;break}}else if(!(w===P||d(w,P,l,c,f))){v=!1;break}}return f.delete(s),f.delete(u),v}return on=a,on}var an,ks;function Dc(){if(ks)return an;ks=1;var t=Se(),e=t.Uint8Array;return an=e,an}var sn,Ns;function Em(){if(Ns)return sn;Ns=1;function t(e){var n=-1,o=Array(e.size);return e.forEach(function(i,a){o[++n]=[a,i]}),o}return sn=t,sn}var un,Ms;function Tm(){if(Ms)return un;Ms=1;function t(e){var n=-1,o=Array(e.size);return e.forEach(function(i){o[++n]=i}),o}return un=t,un}var ln,Rs;function Im(){if(Rs)return ln;Rs=1;var t=Qt(),e=Dc(),n=_t(),o=Oc(),i=Em(),a=Tm(),s=1,u=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",_="[object Symbol]",h="[object ArrayBuffer]",v="[object DataView]",S=t?t.prototype:void 0,w=S?S.valueOf:void 0;function P(b,C,E,T,I,A,k){switch(E){case v:if(b.byteLength!=C.byteLength||b.byteOffset!=C.byteOffset)return!1;b=b.buffer,C=C.buffer;case h:return!(b.byteLength!=C.byteLength||!A(new e(b),new e(C)));case l:case c:case p:return n(+b,+C);case d:return b.name==C.name&&b.message==C.message;case m:case g:return b==C+"";case f:var N=i;case y:var R=T&s;if(N||(N=a),b.size!=C.size&&!R)return!1;var L=k.get(b);if(L)return L==C;T|=u,k.set(b,C);var K=o(N(b),N(C),T,I,A,k);return k.delete(b),K;case _:if(w)return w.call(b)==w.call(C)}return!1}return ln=P,ln}var cn,xs;function Bc(){if(xs)return cn;xs=1;function t(e,n){for(var o=-1,i=n.length,a=e.length;++o<i;)e[a+o]=n[o];return e}return cn=t,cn}var dn,Us;function Ie(){if(Us)return dn;Us=1;var t=Array.isArray;return dn=t,dn}var fn,Fs;function Vc(){if(Fs)return fn;Fs=1;var t=Bc(),e=Ie();function n(o,i,a){var s=i(o);return e(o)?s:t(s,a(o))}return fn=n,fn}var pn,Os;function Pm(){if(Os)return pn;Os=1;function t(e,n){for(var o=-1,i=e==null?0:e.length,a=0,s=[];++o<i;){var u=e[o];n(u,o,e)&&(s[a++]=u)}return s}return pn=t,pn}var mn,Ds;function zc(){if(Ds)return mn;Ds=1;function t(){return[]}return mn=t,mn}var hn,Bs;function qc(){if(Bs)return hn;Bs=1;var t=Pm(),e=zc(),n=Object.prototype,o=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return o.call(s,u)}))}:e;return hn=a,hn}var gn,Vs;function km(){if(Vs)return gn;Vs=1;function t(e,n){for(var o=-1,i=Array(e);++o<e;)i[o]=n(o);return i}return gn=t,gn}var yn,zs;function De(){if(zs)return yn;zs=1;function t(e){return e!=null&&typeof e=="object"}return yn=t,yn}var vn,qs;function Nm(){if(qs)return vn;qs=1;var t=Je(),e=De(),n="[object Arguments]";function o(i){return e(i)&&t(i)==n}return vn=o,vn}var _n,Ls;function Hi(){if(Ls)return _n;Ls=1;var t=Nm(),e=De(),n=Object.prototype,o=n.hasOwnProperty,i=n.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(s){return e(s)&&o.call(s,"callee")&&!i.call(s,"callee")};return _n=a,_n}var ut={exports:{}},Sn,Gs;function Mm(){if(Gs)return Sn;Gs=1;function t(){return!1}return Sn=t,Sn}ut.exports;var js;function Ki(){return js||(js=1,function(t,e){var n=Se(),o=Mm(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||o;t.exports=c}(ut,ut.exports)),ut.exports}var wn,Ws;function tr(){if(Ws)return wn;Ws=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(o,i){var a=typeof o;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return wn=n,wn}var Cn,Hs;function $i(){if(Hs)return Cn;Hs=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return Cn=e,Cn}var bn,Ks;function Rm(){if(Ks)return bn;Ks=1;var t=Je(),e=$i(),n=De(),o="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",y="[object String]",g="[object WeakMap]",_="[object ArrayBuffer]",h="[object DataView]",v="[object Float32Array]",S="[object Float64Array]",w="[object Int8Array]",P="[object Int16Array]",b="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",A={};A[v]=A[S]=A[w]=A[P]=A[b]=A[C]=A[E]=A[T]=A[I]=!0,A[o]=A[i]=A[_]=A[a]=A[h]=A[s]=A[u]=A[l]=A[c]=A[d]=A[f]=A[p]=A[m]=A[y]=A[g]=!1;function k(N){return n(N)&&e(N.length)&&!!A[t(N)]}return bn=k,bn}var An,$s;function xm(){if($s)return An;$s=1;function t(e){return function(n){return e(n)}}return An=t,An}var lt={exports:{}};lt.exports;var Ys;function Um(){return Ys||(Ys=1,function(t,e){var n=Uc(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&n.process,u=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=u}(lt,lt.exports)),lt.exports}var En,Js;function Yi(){if(Js)return En;Js=1;var t=Rm(),e=xm(),n=Um(),o=n&&n.isTypedArray,i=o?e(o):t;return En=i,En}var Tn,Zs;function Lc(){if(Zs)return Tn;Zs=1;var t=km(),e=Hi(),n=Ie(),o=Ki(),i=tr(),a=Yi(),s=Object.prototype,u=s.hasOwnProperty;function l(c,d){var f=n(c),p=!f&&e(c),m=!f&&!p&&o(c),y=!f&&!p&&!m&&a(c),g=f||p||m||y,_=g?t(c.length,String):[],h=_.length;for(var v in c)(d||u.call(c,v))&&!(g&&(v=="length"||m&&(v=="offset"||v=="parent")||y&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||i(v,h)))&&_.push(v);return _}return Tn=l,Tn}var In,Qs;function Ji(){if(Qs)return In;Qs=1;var t=Object.prototype;function e(n){var o=n&&n.constructor,i=typeof o=="function"&&o.prototype||t;return n===i}return In=e,In}var Pn,Xs;function Gc(){if(Xs)return Pn;Xs=1;function t(e,n){return function(o){return e(n(o))}}return Pn=t,Pn}var kn,eu;function Fm(){if(eu)return kn;eu=1;var t=Gc(),e=t(Object.keys,Object);return kn=e,kn}var Nn,tu;function Om(){if(tu)return Nn;tu=1;var t=Ji(),e=Fm(),n=Object.prototype,o=n.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))o.call(a,u)&&u!="constructor"&&s.push(u);return s}return Nn=i,Nn}var Mn,ru;function rr(){if(ru)return Mn;ru=1;var t=Li(),e=$i();function n(o){return o!=null&&e(o.length)&&!t(o)}return Mn=n,Mn}var Rn,nu;function jc(){if(nu)return Rn;nu=1;var t=Lc(),e=Om(),n=rr();function o(i){return n(i)?t(i):e(i)}return Rn=o,Rn}var xn,ou;function Dm(){if(ou)return xn;ou=1;var t=Vc(),e=qc(),n=jc();function o(i){return t(i,n,e)}return xn=o,xn}var Un,iu;function Bm(){if(iu)return Un;iu=1;var t=Dm(),e=1,n=Object.prototype,o=n.hasOwnProperty;function i(a,s,u,l,c,d){var f=u&e,p=t(a),m=p.length,y=t(s),g=y.length;if(m!=g&&!f)return!1;for(var _=m;_--;){var h=p[_];if(!(f?h in s:o.call(s,h)))return!1}var v=d.get(a),S=d.get(s);if(v&&S)return v==s&&S==a;var w=!0;d.set(a,s),d.set(s,a);for(var P=f;++_<m;){h=p[_];var b=a[h],C=s[h];if(l)var E=f?l(C,b,h,s,a,d):l(b,C,h,a,s,d);if(!(E===void 0?b===C||c(b,C,u,l,d):E)){w=!1;break}P||(P=h=="constructor")}if(w&&!P){var T=a.constructor,I=s.constructor;T!=I&&"constructor"in a&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(w=!1)}return d.delete(a),d.delete(s),w}return Un=i,Un}var Fn,au;function Vm(){if(au)return Fn;au=1;var t=Oe(),e=Se(),n=t(e,"DataView");return Fn=n,Fn}var On,su;function zm(){if(su)return On;su=1;var t=Oe(),e=Se(),n=t(e,"Promise");return On=n,On}var Dn,uu;function qm(){if(uu)return Dn;uu=1;var t=Oe(),e=Se(),n=t(e,"Set");return Dn=n,Dn}var Bn,lu;function Lm(){if(lu)return Bn;lu=1;var t=Oe(),e=Se(),n=t(e,"WeakMap");return Bn=n,Bn}var Vn,cu;function Gm(){if(cu)return Vn;cu=1;var t=Vm(),e=Gi(),n=zm(),o=qm(),i=Lm(),a=Je(),s=Fc(),u="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(t),y=s(e),g=s(n),_=s(o),h=s(i),v=a;return(t&&v(new t(new ArrayBuffer(1)))!=p||e&&v(new e)!=u||n&&v(n.resolve())!=c||o&&v(new o)!=d||i&&v(new i)!=f)&&(v=function(S){var w=a(S),P=w==l?S.constructor:void 0,b=P?s(P):"";if(b)switch(b){case m:return p;case y:return u;case g:return c;case _:return d;case h:return f}return w}),Vn=v,Vn}var zn,du;function jm(){if(du)return zn;du=1;var t=Wi(),e=Oc(),n=Im(),o=Bm(),i=Gm(),a=Ie(),s=Ki(),u=Yi(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function y(g,_,h,v,S,w){var P=a(g),b=a(_),C=P?d:i(g),E=b?d:i(_);C=C==c?f:C,E=E==c?f:E;var T=C==f,I=E==f,A=C==E;if(A&&s(g)){if(!s(_))return!1;P=!0,T=!1}if(A&&!T)return w||(w=new t),P||u(g)?e(g,_,h,v,S,w):n(g,_,C,h,v,S,w);if(!(h&l)){var k=T&&m.call(g,"__wrapped__"),N=I&&m.call(_,"__wrapped__");if(k||N){var R=k?g.value():g,L=N?_.value():_;return w||(w=new t),S(R,L,h,v,w)}}return A?(w||(w=new t),o(g,_,h,v,S,w)):!1}return zn=y,zn}var qn,fu;function Wc(){if(fu)return qn;fu=1;var t=jm(),e=De();function n(o,i,a,s,u){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:t(o,i,a,s,n,u)}return qn=n,qn}var Ln,pu;function Wm(){if(pu)return Ln;pu=1;var t=Wi(),e=Wc(),n=1,o=2;function i(a,s,u,l){var c=u.length,d=c,f=!l;if(a==null)return!d;for(a=Object(a);c--;){var p=u[c];if(f&&p[2]?p[1]!==a[p[0]]:!(p[0]in a))return!1}for(;++c<d;){p=u[c];var m=p[0],y=a[m],g=p[1];if(f&&p[2]){if(y===void 0&&!(m in a))return!1}else{var _=new t;if(l)var h=l(y,g,m,a,s,_);if(!(h===void 0?e(g,y,n|o,l,_):h))return!1}}return!0}return Ln=i,Ln}var Gn,mu;function Hc(){if(mu)return Gn;mu=1;var t=Te();function e(n){return n===n&&!t(n)}return Gn=e,Gn}var jn,hu;function Hm(){if(hu)return jn;hu=1;var t=Hc(),e=jc();function n(o){for(var i=e(o),a=i.length;a--;){var s=i[a],u=o[s];i[a]=[s,u,t(u)]}return i}return jn=n,jn}var Wn,gu;function Kc(){if(gu)return Wn;gu=1;function t(e,n){return function(o){return o==null?!1:o[e]===n&&(n!==void 0||e in Object(o))}}return Wn=t,Wn}var Hn,yu;function Km(){if(yu)return Hn;yu=1;var t=Wm(),e=Hm(),n=Kc();function o(i){var a=e(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return Hn=o,Hn}var Kn,vu;function Zi(){if(vu)return Kn;vu=1;var t=Je(),e=De(),n="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&t(i)==n}return Kn=o,Kn}var $n,_u;function Qi(){if(_u)return $n;_u=1;var t=Ie(),e=Zi(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:o.test(a)||!n.test(a)||s!=null&&a in Object(s)}return $n=i,$n}var Yn,Su;function $m(){if(Su)return Yn;Su=1;var t=ji(),e="Expected a function";function n(o,i){if(typeof o!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],l=a.cache;if(l.has(u))return l.get(u);var c=o.apply(this,s);return a.cache=l.set(u,c)||l,c};return a.cache=new(n.Cache||t),a}return n.Cache=t,Yn=n,Yn}var Jn,wu;function Ym(){if(wu)return Jn;wu=1;var t=$m(),e=500;function n(o){var i=t(o,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Jn=n,Jn}var Zn,Cu;function Jm(){if(Cu)return Zn;Cu=1;var t=Ym(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,l,c){a.push(l?c.replace(n,"$1"):u||s)}),a});return Zn=o,Zn}var Qn,bu;function Zm(){if(bu)return Qn;bu=1;var t=Qt(),e=xc(),n=Ie(),o=Zi(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(n(u))return e(u,s)+"";if(o(u))return a?a.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Qn=s,Qn}var Xn,Au;function Qm(){if(Au)return Xn;Au=1;var t=Zm();function e(n){return n==null?"":t(n)}return Xn=e,Xn}var eo,Eu;function nr(){if(Eu)return eo;Eu=1;var t=Ie(),e=Qi(),n=Jm(),o=Qm();function i(a,s){return t(a)?a:e(a,s)?[a]:n(o(a))}return eo=i,eo}var to,Tu;function St(){if(Tu)return to;Tu=1;var t=Zi();function e(n){if(typeof n=="string"||t(n))return n;var o=n+"";return o=="0"&&1/n==-1/0?"-0":o}return to=e,to}var ro,Iu;function Xi(){if(Iu)return ro;Iu=1;var t=nr(),e=St();function n(o,i){i=t(i,o);for(var a=0,s=i.length;o!=null&&a<s;)o=o[e(i[a++])];return a&&a==s?o:void 0}return ro=n,ro}var no,Pu;function Xm(){if(Pu)return no;Pu=1;var t=Xi();function e(n,o,i){var a=n==null?void 0:t(n,o);return a===void 0?i:a}return no=e,no}var oo,ku;function eh(){if(ku)return oo;ku=1;function t(e,n){return e!=null&&n in Object(e)}return oo=t,oo}var io,Nu;function th(){if(Nu)return io;Nu=1;var t=nr(),e=Hi(),n=Ie(),o=tr(),i=$i(),a=St();function s(u,l,c){l=t(l,u);for(var d=-1,f=l.length,p=!1;++d<f;){var m=a(l[d]);if(!(p=u!=null&&c(u,m)))break;u=u[m]}return p||++d!=f?p:(f=u==null?0:u.length,!!f&&i(f)&&o(m,f)&&(n(u)||e(u)))}return io=s,io}var ao,Mu;function rh(){if(Mu)return ao;Mu=1;var t=eh(),e=th();function n(o,i){return o!=null&&e(o,i,t)}return ao=n,ao}var so,Ru;function nh(){if(Ru)return so;Ru=1;var t=Wc(),e=Xm(),n=rh(),o=Qi(),i=Hc(),a=Kc(),s=St(),u=1,l=2;function c(d,f){return o(d)&&i(f)?a(s(d),f):function(p){var m=e(p,d);return m===void 0&&m===f?n(p,d):t(f,m,u|l)}}return so=c,so}var uo,xu;function ea(){if(xu)return uo;xu=1;function t(e){return e}return uo=t,uo}var lo,Uu;function oh(){if(Uu)return lo;Uu=1;function t(e){return function(n){return n==null?void 0:n[e]}}return lo=t,lo}var co,Fu;function ih(){if(Fu)return co;Fu=1;var t=Xi();function e(n){return function(o){return t(o,n)}}return co=e,co}var fo,Ou;function ah(){if(Ou)return fo;Ou=1;var t=oh(),e=ih(),n=Qi(),o=St();function i(a){return n(a)?t(o(a)):e(a)}return fo=i,fo}var po,Du;function sh(){if(Du)return po;Du=1;var t=Km(),e=nh(),n=ea(),o=Ie(),i=ah();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?o(s)?e(s[0],s[1]):t(s):i(s)}return po=a,po}var mo,Bu;function $c(){if(Bu)return mo;Bu=1;var t=Oe(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return mo=e,mo}var ho,Vu;function ta(){if(Vu)return ho;Vu=1;var t=$c();function e(n,o,i){o=="__proto__"&&t?t(n,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[o]=i}return ho=e,ho}var go,zu;function Yc(){if(zu)return go;zu=1;var t=ta(),e=_t(),n=Object.prototype,o=n.hasOwnProperty;function i(a,s,u){var l=a[s];(!(o.call(a,s)&&e(l,u))||u===void 0&&!(s in a))&&t(a,s,u)}return go=i,go}var yo,qu;function uh(){if(qu)return yo;qu=1;var t=Yc(),e=nr(),n=tr(),o=Te(),i=St();function a(s,u,l,c){if(!o(s))return s;u=e(u,s);for(var d=-1,f=u.length,p=f-1,m=s;m!=null&&++d<f;){var y=i(u[d]),g=l;if(y==="__proto__"||y==="constructor"||y==="prototype")return s;if(d!=p){var _=m[y];g=c?c(_,y,m):void 0,g===void 0&&(g=o(_)?_:n(u[d+1])?[]:{})}t(m,y,g),m=m[y]}return s}return yo=a,yo}var vo,Lu;function lh(){if(Lu)return vo;Lu=1;var t=Xi(),e=uh(),n=nr();function o(i,a,s){for(var u=-1,l=a.length,c={};++u<l;){var d=a[u],f=t(i,d);s(f,d)&&e(c,n(d,i),f)}return c}return vo=o,vo}var _o,Gu;function ra(){if(Gu)return _o;Gu=1;var t=Gc(),e=t(Object.getPrototypeOf,Object);return _o=e,_o}var So,ju;function ch(){if(ju)return So;ju=1;var t=Bc(),e=ra(),n=qc(),o=zc(),i=Object.getOwnPropertySymbols,a=i?function(s){for(var u=[];s;)t(u,n(s)),s=e(s);return u}:o;return So=a,So}var wo,Wu;function dh(){if(Wu)return wo;Wu=1;function t(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}return wo=t,wo}var Co,Hu;function fh(){if(Hu)return Co;Hu=1;var t=Te(),e=Ji(),n=dh(),o=Object.prototype,i=o.hasOwnProperty;function a(s){if(!t(s))return n(s);var u=e(s),l=[];for(var c in s)c=="constructor"&&(u||!i.call(s,c))||l.push(c);return l}return Co=a,Co}var bo,Ku;function na(){if(Ku)return bo;Ku=1;var t=Lc(),e=fh(),n=rr();function o(i){return n(i)?t(i,!0):e(i)}return bo=o,bo}var Ao,$u;function ph(){if($u)return Ao;$u=1;var t=Vc(),e=ch(),n=na();function o(i){return t(i,n,e)}return Ao=o,Ao}var Eo,Yu;function mh(){if(Yu)return Eo;Yu=1;var t=xc(),e=sh(),n=lh(),o=ph();function i(a,s){if(a==null)return{};var u=t(o(a),function(l){return[l]});return s=e(s),n(a,u,function(l,c){return s(l,c[0])})}return Eo=i,Eo}var hh=mh();const gh=qi(hh),yh=!0,vh="",yt=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),_h=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},Sh=t=>{const{phone_number:e,...n}=gh(t,_h);if(Xl(e)&&e!==vh){const{country_code:o}=t;return{...n,phone_number:yt(o,e)}}return n},wh=(t,e,n,o)=>{const{password:i,...a}=e,s=Sh(a),u=o&&o!=="PASSWORD";let l=s;o==="SMS_OTP"&&s.email&&(l={...s,email:""});const c={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:yh,userAttributes:{...n==="phone_number"?{...l,phone_number:t}:l}};return{username:t,password:u?void 0:i,options:c}},Ch=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:i,phone_number:a}=t;return yt(i,a)}if(n==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const o=e[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=t;return yt(i,a)}return t[o]},bh=(t,e)=>{const n=[],o=e!==void 0;n.push("PASSWORD"),(o||t!=null&&t.emailOtpEnabled)&&n.push("EMAIL_OTP"),(o||t!=null&&t.smsOtpEnabled)&&n.push("SMS_OTP"),(o||t!=null&&t.webAuthnEnabled)&&n.push("WEB_AUTHN");const i=e??[],a=n.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:D}=Tc,Ah=D({actorDoneData:void 0}),Eh=D({challengeName:void 0}),Th=D({missingAttributes:void 0}),Ih=D({remoteError:void 0}),Ph=D({formValues:t=>{var e;return{username:(e=t.formValues)==null?void 0:e.username}}}),kh=D({touched:{}}),Nh=D({user:void 0}),Mh=D({validationError:{}}),Rh=D({totpSecretCode:(t,{data:e})=>{var o;const{sharedSecret:n}=((o=e.nextStep)==null?void 0:o.totpSetupDetails)??{};return n}}),xh=D({allowedMfaTypes:(t,{data:e})=>{var n;return(n=e.nextStep)==null?void 0:n.allowedMFATypes}}),Uh=D({step:"SIGN_IN"}),Fh=D({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Oh=D({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Dh=D({challengeName:(t,{data:e})=>{const{signInStep:n}=e.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Bh=D({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:o,country_code:i}=t;return n==="phone_number"?yt(i,o):o}}),Vh=D({username:Ch}),zh=D({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:o,country_code:i}=t;return n==="phone_number"?yt(i,o):o}}),qh=D({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Lh=D({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Gh=D({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),jh=D({missingAttributes:(t,{data:e})=>{var n;return(n=e.nextStep)==null?void 0:n.missingAttributes}}),Wh=D({validationError:(t,{data:e})=>e}),Hh=D({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=(e==null?void 0:e.message)||"";return n.includes("USER_AUTH flow not enabled")?x(O.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?x(O.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?x(O.VERIFICATION_CODE_INVALID):n.includes("session is expired")?x(O.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?x(O.PASSKEY_AUTHENTICATION_CANCELED):n||e}}),Kh=D({user:(t,{data:e})=>e}),Ju=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),$h=D({codeDeliveryDetails:(t,{data:e})=>{var n;return(n=e==null?void 0:e.nextStep)!=null&&n.codeDeliveryDetails?Ju(e.nextStep.codeDeliveryDetails):Ju(e)}}),Yh=D({formValues:(t,{data:e})=>{const{name:n,value:o}=e;return{...t.formValues,[n]:o}}}),Jh=D({formValues:(t,{data:e})=>Hd({...t.formValues,...e},"password")}),Zh=D({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),Qh=D({unverifiedUserAttributes:(t,{data:e})=>{const n=e||t.fetchedUserAttributes;if(!n)return{};const{email:o,phone_number:i}=n;return{...o&&{email:o},...i&&{phone_number:i}}}}),Xh=D({selectedUserAttribute:void 0}),eg=D({selectedUserAttribute:t=>{var e;return(e=t.formValues)==null?void 0:e.unverifiedAttr}}),tg=D({step:"CONFIRM_SIGN_UP"}),rg=D({selectedAuthMethod:(t,{data:e})=>e.method}),ng=D({selectedAuthMethod:(t,{data:e})=>(e==null?void 0:e.__authMethod)||"PASSWORD"}),og=D({step:"SELECT_AUTH_METHOD"}),ig=D({fetchedUserAttributes:(t,e)=>e.data}),ag=D({hasExistingPasskeys:(t,e)=>e.data}),sg=D({hasExistingPasskeys:!1}),wt={clearActorDoneData:Ah,clearChallengeName:Eh,clearError:Ih,clearFormValues:Ph,clearHasExistingPasskeys:sg,clearMissingAttributes:Th,clearSelectedUserAttribute:Xh,clearTouched:kh,clearUser:Nh,clearValidationError:Mh,handleBlur:Zh,handleInput:Yh,handleSubmit:Jh,setAllowedMfaTypes:xh,setChallengeName:Dh,setCodeDeliveryDetails:$h,setFetchedUserAttributes:ig,setFieldErrors:Wh,setHasExistingPasskeys:ag,setMissingAttributes:jh,setNextResetPasswordStep:Gh,setNextSignInStep:qh,setNextSignUpStep:Lh,setRemoteError:Hh,setConfirmAttributeCompleteStep:Oh,setConfirmSignUpSignUpStep:tg,setSelectAuthMethodStep:og,setSelectedAuthMethod:rg,setSelectedAuthMethodFromForm:ng,setShouldVerifyUserAttributeStep:Fh,setSelectedUserAttribute:eg,setSignInStep:Uh,setTotpSecretCode:Rh,setUser:Kh,setUnverifiedUserAttributes:Qh,setUsernameForgotPassword:Bh,setUsernameSignIn:zh,setUsernameSignUp:Vh},ug=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],lg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",cg=(t,{data:e})=>{var n;return((n=e==null?void 0:e.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},dg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_UP",fg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",pg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE"&&t.step==="CONFIRM_SIGN_UP",mg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="DONE",hg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE",gg=(t,{data:e})=>(e==null?void 0:e.nextStep.resetPasswordStep)==="DONE",yg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_COMPLETE",vg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",_g=(t,{data:e})=>(e==null?void 0:e.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",Sg=(t,{data:e})=>(e==null?void 0:e.step)==="RESET_PASSWORD",wg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_SIGN_UP",Cg=({step:t})=>ug.includes(t),bg=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Ag=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Eg=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),Tg=({step:t})=>t==="RESET_PASSWORD",Ig=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Pg=({step:t})=>t==="CONFIRM_SIGN_UP",kg=(t,e)=>{const n=e.data||t.fetchedUserAttributes;if(!n)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=n;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},Ng=(t,{data:e})=>e.message==="User is already confirmed.",Mg=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),Rg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},xg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},Ug=({passwordless:t})=>(t==null?void 0:t.passkeyRegistrationPrompts)!=null,Fg=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",or={hasCompletedAttributeConfirmation:yg,hasCompletedResetPassword:gg,hasCompletedSignIn:mg,hasCompletedSignUp:hg,hasPasskeyRegistrationPrompts:Ug,isConfirmSignUpStep:wg,isConfirmUserAttributeStep:vg,isResetPasswordStep:Sg,isShouldConfirmUserAttributeStep:_g,isUserAlreadyConfirmed:Ng,shouldAutoSignIn:fg,shouldManualSignIn:pg,shouldConfirmResetPassword:Ig,shouldConfirmSignIn:Cg,shouldConfirmSignInWithNewPassword:lg,shouldConfirmSignUp:Pg,shouldConfirmSignUpFromSignIn:dg,shouldResetPassword:Tg,shouldResetPasswordFromSignIn:cg,shouldReturnToSelectMethod:Fg,shouldSelectAuthMethod:Mg,shouldSetupTotp:bg,shouldSetupEmail:Ag,shouldSelectMfaType:Eg,shouldVerifyAttribute:kg,shouldPromptPasskeyRegistration:Rg,shouldPromptPasskeyRegistrationAfterSignup:xg};var To,Zu;function Jc(){if(Zu)return To;Zu=1;var t=ta(),e=_t();function n(o,i,a){(a!==void 0&&!e(o[i],a)||a===void 0&&!(i in o))&&t(o,i,a)}return To=n,To}var Io,Qu;function Og(){if(Qu)return Io;Qu=1;function t(e){return function(n,o,i){for(var a=-1,s=Object(n),u=i(n),l=u.length;l--;){var c=u[e?l:++a];if(o(s[c],c,s)===!1)break}return n}}return Io=t,Io}var Po,Xu;function Dg(){if(Xu)return Po;Xu=1;var t=Og(),e=t();return Po=e,Po}var ct={exports:{}};ct.exports;var el;function Bg(){return el||(el=1,function(t,e){var n=Se(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a?n.Buffer:void 0,u=s?s.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,p=u?u(f):new c.constructor(f);return c.copy(p),p}t.exports=l}(ct,ct.exports)),ct.exports}var ko,tl;function Vg(){if(tl)return ko;tl=1;var t=Dc();function e(n){var o=new n.constructor(n.byteLength);return new t(o).set(new t(n)),o}return ko=e,ko}var No,rl;function zg(){if(rl)return No;rl=1;var t=Vg();function e(n,o){var i=o?t(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return No=e,No}var Mo,nl;function qg(){if(nl)return Mo;nl=1;function t(e,n){var o=-1,i=e.length;for(n||(n=Array(i));++o<i;)n[o]=e[o];return n}return Mo=t,Mo}var Ro,ol;function Lg(){if(ol)return Ro;ol=1;var t=Te(),e=Object.create,n=function(){function o(){}return function(i){if(!t(i))return{};if(e)return e(i);o.prototype=i;var a=new o;return o.prototype=void 0,a}}();return Ro=n,Ro}var xo,il;function Gg(){if(il)return xo;il=1;var t=Lg(),e=ra(),n=Ji();function o(i){return typeof i.constructor=="function"&&!n(i)?t(e(i)):{}}return xo=o,xo}var Uo,al;function jg(){if(al)return Uo;al=1;var t=rr(),e=De();function n(o){return e(o)&&t(o)}return Uo=n,Uo}var Fo,sl;function Wg(){if(sl)return Fo;sl=1;var t=Je(),e=ra(),n=De(),o="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,l=s.call(Object);function c(d){if(!n(d)||t(d)!=o)return!1;var f=e(d);if(f===null)return!0;var p=u.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return Fo=c,Fo}var Oo,ul;function Zc(){if(ul)return Oo;ul=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return Oo=t,Oo}var Do,ll;function Hg(){if(ll)return Do;ll=1;var t=Yc(),e=ta();function n(o,i,a,s){var u=!a;a||(a={});for(var l=-1,c=i.length;++l<c;){var d=i[l],f=s?s(a[d],o[d],d,a,o):void 0;f===void 0&&(f=o[d]),u?e(a,d,f):t(a,d,f)}return a}return Do=n,Do}var Bo,cl;function Kg(){if(cl)return Bo;cl=1;var t=Hg(),e=na();function n(o){return t(o,e(o))}return Bo=n,Bo}var Vo,dl;function $g(){if(dl)return Vo;dl=1;var t=Jc(),e=Bg(),n=zg(),o=qg(),i=Gg(),a=Hi(),s=Ie(),u=jg(),l=Ki(),c=Li(),d=Te(),f=Wg(),p=Yi(),m=Zc(),y=Kg();function g(_,h,v,S,w,P,b){var C=m(_,v),E=m(h,v),T=b.get(E);if(T){t(_,v,T);return}var I=P?P(C,E,v+"",_,h,b):void 0,A=I===void 0;if(A){var k=s(E),N=!k&&l(E),R=!k&&!N&&p(E);I=E,k||N||R?s(C)?I=C:u(C)?I=o(C):N?(A=!1,I=e(E,!0)):R?(A=!1,I=n(E,!0)):I=[]:f(E)||a(E)?(I=C,a(C)?I=y(C):(!d(C)||c(C))&&(I=i(E))):A=!1}A&&(b.set(E,I),w(I,E,S,P,b),b.delete(E)),t(_,v,I)}return Vo=g,Vo}var zo,fl;function Yg(){if(fl)return zo;fl=1;var t=Wi(),e=Jc(),n=Dg(),o=$g(),i=Te(),a=na(),s=Zc();function u(l,c,d,f,p){l!==c&&n(c,function(m,y){if(p||(p=new t),i(m))o(l,c,y,d,u,f,p);else{var g=f?f(s(l,y),m,y+"",l,c,p):void 0;g===void 0&&(g=m),e(l,y,g)}},a)}return zo=u,zo}var qo,pl;function Jg(){if(pl)return qo;pl=1;function t(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}return qo=t,qo}var Lo,ml;function Zg(){if(ml)return Lo;ml=1;var t=Jg(),e=Math.max;function n(o,i,a){return i=e(i===void 0?o.length-1:i,0),function(){for(var s=arguments,u=-1,l=e(s.length-i,0),c=Array(l);++u<l;)c[u]=s[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=s[u];return d[i]=a(c),t(o,this,d)}}return Lo=n,Lo}var Go,hl;function Qg(){if(hl)return Go;hl=1;function t(e){return function(){return e}}return Go=t,Go}var jo,gl;function Xg(){if(gl)return jo;gl=1;var t=Qg(),e=$c(),n=ea(),o=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:n;return jo=o,jo}var Wo,yl;function ey(){if(yl)return Wo;yl=1;var t=800,e=16,n=Date.now;function o(i){var a=0,s=0;return function(){var u=n(),l=e-(u-s);if(s=u,l>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wo=o,Wo}var Ho,vl;function ty(){if(vl)return Ho;vl=1;var t=Xg(),e=ey(),n=e(t);return Ho=n,Ho}var Ko,_l;function ry(){if(_l)return Ko;_l=1;var t=ea(),e=Zg(),n=ty();function o(i,a){return n(e(i,a,t),i+"")}return Ko=o,Ko}var $o,Sl;function ny(){if(Sl)return $o;Sl=1;var t=_t(),e=rr(),n=tr(),o=Te();function i(a,s,u){if(!o(u))return!1;var l=typeof s;return(l=="number"?e(u)&&n(s,u.length):l=="string"&&s in u)?t(u[s],a):!1}return $o=i,$o}var Yo,wl;function oy(){if(wl)return Yo;wl=1;var t=ry(),e=ny();function n(o){return t(function(i,a){var s=-1,u=a.length,l=u>1?a[u-1]:void 0,c=u>2?a[2]:void 0;for(l=o.length>3&&typeof l=="function"?(u--,l):void 0,c&&e(a[0],a[1],c)&&(l=u<3?void 0:l,u=1),i=Object(i);++s<u;){var d=a[s];d&&o(i,d,s,l)}return i})}return Yo=n,Yo}var Jo,Cl;function iy(){if(Cl)return Jo;Cl=1;var t=Yg(),e=oy(),n=e(function(o,i,a){t(o,i,a)});return Jo=n,Jo}var ay=iy();const sy=qi(ay),ir=async(t,e,n,o)=>{const i=await Promise.all(o.map(s=>s(t,e,n))),a=sy({},...i);return ec(a)?Promise.resolve():Promise.reject(a)},uy=8,ly=t=>Array.isArray(t),cy=t=>{if(t)return ly(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Re={async getAmplifyConfig(){var c,d,f,p,m,y;const t=cd.Amplify.getConfig(),e=(c=t.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=((d=t.Auth)==null?void 0:d.Cognito)??{},i=n?Object.entries(n).filter(([g,_])=>g!=="oauth").filter(([g,_])=>!!_).map(g=>g[0]==="phone"?"phone_number":g[0]):void 0,a=cy(o),s=(f=n==null?void 0:n.oauth)!=null&&f.providers?(p=n.oauth.providers)==null?void 0:p.map(g=>g.toString().toLowerCase()):void 0,u=(y=(m=t.Auth)==null?void 0:m.Cognito)==null?void 0:y.passwordless,l={emailOtpEnabled:(u==null?void 0:u.emailOtpEnabled)??(u==null?void 0:u.email_otp_enabled)===!0,smsOtpEnabled:(u==null?void 0:u.smsOtpEnabled)??(u==null?void 0:u.sms_otp_enabled)===!0,webAuthnEnabled:!!((u==null?void 0:u.webAuthn)??(u==null?void 0:u.web_authn)),preferredChallenge:(u==null?void 0:u.preferredChallenge)??(u==null?void 0:u.preferred_challenge)};return{...e,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:l}},getCurrentUser:$.getCurrentUser,handleSignIn:$.signIn,handleSignUp:$.signUp,handleConfirmSignIn:$.confirmSignIn,handleConfirmSignUp:$.confirmSignUp,handleForgotPasswordSubmit:$.confirmResetPassword,handleForgotPassword:$.resetPassword,handleResendSignUpCode:$.resendSignUpCode,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,n){const{password:o}=t,{password:i}=e;if(!i||!n)return null;const a=[],s=n.minLength??uy;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!jd(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(t,e){const{password:n,confirm_password:o}=t,{confirm_password:i,password:a}=e;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const n={};return t.password||(n.password="Password is required"),t.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function dy({services:t}){return Ye({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:n}){const{confirmation_code:o,password:i}=e;return t.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(e){return ir(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const Qc=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),fy=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Dt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Pt=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Dt}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function py({services:t}){return Ye({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...Qc("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await $.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Dt.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Dt.onError]}}}},confirmSignIn:{...Pt(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Dt}}}}}},setupTotp:{...Pt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Pt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Pt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{async fetchUserAttributes(){return $.fetchUserAttributes()},resetPassword({username:e}){return $.resetPassword({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:n,availableAuthMethods:o,preferredChallenge:i}){const a=n??i??(o==null?void 0:o[0])??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:e,username:n,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:n,password:u})}else return t.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:e,step:n}){const o=fy(n),{[o]:i}=e;return t.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:e}){let{password:n,phone_number:o,country_code:i,confirm_password:a,username:s,...u}=e,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:l});const c={challengeResponse:n,options:{userAttributes:u}};return $.confirmSignIn(c)},signInWithRedirect(e,{data:n}){return $.signInWithRedirect(n)},async validateFields(e){return ir(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const my={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},hy={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function gy({services:t}){return Ye({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...hy}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await $.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...Qc("signUp")},resetPassword:{invoke:{src:"resetPassword",...my}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...wt,sendUpdate:Yt()},guards:or,services:{autoSignIn(){return $.autoSignIn()},async fetchUserAttributes(){return $.fetchUserAttributes()},confirmSignUp({formValues:e,username:n}){const{confirmation_code:o}=e,i={username:n,confirmationCode:o};return t.handleConfirmSignUp(i)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:n}){return $.signInWithRedirect(n)},handleSignUp(e){const{formValues:n,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=e,u=o[0],c=wh(i,n,u,a??s);return t.handleSignUp(c)},async validateSignUp(e){return ir(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const yy=()=>Ye({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>$.signOut()}});function vy(){return Ye({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...wt,sendUpdate:Yt()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){const e={userAttributeKey:t};return $.sendUserAttributeVerificationCode(e)},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){const n={confirmationCode:t,userAttributeKey:e};return $.confirmUserAttribute(n)},async validateFields(t){return ir(t.formValues,t.touched,t.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const kt=(t,e)=>{var i,a,s,u,l,c,d,f,p,m,y,g;const n=bh(t.passwordlessCapabilities,(a=(i=t.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((u=(s=t.config)==null?void 0:s.passwordless)==null?void 0:u.preferredAuthMethod)??((l=t.passwordlessCapabilities)==null?void 0:l.preferredChallenge);return{...t.actorDoneData,step:((c=t==null?void 0:t.actorDoneData)==null?void 0:c.step)??e,formValues:{},touched:{},validationError:{},formFields:(d=t.config)==null?void 0:d.formFields,loginMechanisms:(f=t.config)==null?void 0:f.loginMechanisms,passwordSettings:(p=t.config)==null?void 0:p.passwordSettings,signUpAttributes:(m=t.config)==null?void 0:m.signUpAttributes,socialProviders:(y=t.config)==null?void 0:y.socialProviders,availableAuthMethods:n,preferredChallenge:o,passwordless:(g=t.config)==null?void 0:g.passwordless}},{choose:_y,stop:Sy}=Tc,rt=t=>Sy(t),wy={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},Cy={always:{actions:"configure",target:"getConfig"}};function by(t){const{useNextWaitConfig:e,...n}={};return Ye({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Re,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?Cy:wy,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...wt,forwardToActor:_y([{cond:"hasActor",actions:Wp(({actorRef:i})=>i)}]),setActorDoneData:Ce({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes,allowedMfaTypes:a.data.allowedMfaTypes})}),applyAmplifyConfig:Ce({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:u=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:c,formFields:d,passwordSettings:f=a.passwordFormat??{},passwordless:p}=i.config;return s.length===0&&s.push("username"),{formFields:Ay(d)??{},initialState:c,loginMechanisms:s,passwordSettings:f,passwordless:p,signUpAttributes:u,socialProviders:l}}}),spawnSignInActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=py({services:s}).withContext(kt(i,"SIGN_IN"));return et(u,{name:"signInActor"})}}),spawnSignUpActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=gy({services:s}).withContext(kt(i,"SIGN_UP"));return et(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=dy({services:s}).withContext(kt(i,"FORGOT_PASSWORD"));return et(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Ce({actorRef:i=>{const a=vy().withContext(kt(i));return et(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Ce({actorRef:i=>{const a=yy().withContext({user:i==null?void 0:i.user});return et(a,{name:"signOutActor"})}}),configure:Ce((i,a)=>{const{services:s,...u}=Ed(n)?a.data??{}:n;return{services:{...Re,...s},config:u}}),setHasSetup:Ce({hasSetup:!0})},guards:{...or,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i,hasUser:({user:i})=>!!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function Ay(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{let o=t[e][n];o.required=o.isRequired})}),t}const ie={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Avatar:"amplify-avatar",AvatarIcon:"amplify-avatar__icon",AvatarImage:"amplify-avatar__image",AvatarLoader:"amplify-avatar__loader",AIConversation:"amplify-ai-conversation",AIConversationScrollView:"amplify-ai-conversation__scrollview",AIConversationAttachment:"amplify-ai-conversation__attachment",AIConversationAttachmentList:"amplify-ai-conversation__attachment__list",AIConversationAttachmentImage:"amplify-ai-conversation__attachment__image",AIConversationAttachmentName:"amplify-ai-conversation__attachment__name",AIConversationAttachmentSize:"amplify-ai-conversation__attachment__size",AIConversationAttachmentRemove:"amplify-ai-conversation__attachment__remove",AIConversationForm:"amplify-ai-conversation__form",AIConversationFormAttach:"amplify-ai-conversation__form__attach",AIConversationFormError:"amplify-ai-conversation__form__error",AIConversationFormSend:"amplify-ai-conversation__form__send",AIConversationFormField:"amplify-ai-conversation__form__field",AIConversationFormDropzone:"amplify-ai-conversation__form__dropzone",AIConversationMessage:"amplify-ai-conversation__message",AIConversationMessageAvatar:"amplify-ai-conversation__message__avatar",AIConversationMessageSender:"amplify-ai-conversation__message__sender",AIConversationMessageSenderUsername:"amplify-ai-conversation__message__sender__username",AIConversationMessageSenderTimestamp:"amplify-ai-conversation__message__sender__timestamp",AIConversationMessageBody:"amplify-ai-conversation__message__body",AIConversationMessageContent:"amplify-ai-conversation__message__content",AIConversationMessageActions:"amplify-ai-conversation__message__actions",AIConversationMessageList:"amplify-ai-conversation__message__list",AIConversationPrompt:"amplify-ai-conversation__prompt",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",FileUploader:"amplify-fileuploader",FileUploaderDropZone:"amplify-fileuploader__dropzone",FileUploaderDropZoneIcon:"amplify-fileuploader__dropzone__icon",FileUploaderDropZoneText:"amplify-fileuploader__dropzone__text",FileUploaderFilePicker:"amplify-fileuploader__file__picker",FileUploaderFile:"amplify-fileuploader__file",FileUploaderFileWrapper:"amplify-fileuploader__file__wrapper",FileUploaderFileList:"amplify-fileuploader__file__list",FileUploaderFileName:"amplify-fileuploader__file__name",FileUploaderFileSize:"amplify-fileuploader__file__size",FileUploaderFileInfo:"amplify-fileuploader__file__info",FileUploaderFileImage:"amplify-fileuploader__file__image",FileUploaderFileMain:"amplify-fileuploader__file__main",FileUploaderFileStatus:"amplify-fileuploader__file__status",FileUploaderLoader:"amplify-fileuploader__loader",FileUploaderPreviewer:"amplify-fileuploader__previewer",FileUploaderPreviewerText:"amplify-fileuploader__previewer__text",FileUploaderPreviewerActions:"amplify-fileuploader__previewer__actions",FileUploaderPreviewerFooter:"amplify-fileuploader__previewer__footer",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},Ey=({componentName:t,packageName:e,version:n})=>{const o=[`ui-${e}`,n];switch(t){case"AIConversation":{F.setCustomUserAgent({...md,additionalDetails:[[t],o]});break}case"Authenticator":{F.setCustomUserAgent({...gd,additionalDetails:[[t],o]});break}case"ChangePassword":case"DeleteUser":{F.setCustomUserAgent({...hd,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{F.setCustomUserAgent({...yd,additionalDetails:[[t],o]});break}case"InAppMessaging":{F.setCustomUserAgent({...vd,additionalDetails:[[t],o]});break}case"LocationSearch":{F.setCustomUserAgent({..._d,additionalDetails:[[t],o]});break}case"MapView":{F.setCustomUserAgent({...Sd,additionalDetails:[[t],o]});break}case"StorageManager":{F.setCustomUserAgent({...wd,additionalDetails:[[t],o]});break}case"StorageBrowser":{F.setCustomUserAgent({...Cd,additionalDetails:[[t],o]});break}}return Id},Ty={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},Iy={class:"amplify-flex amplify-authenticator__icon-wrapper"},Py=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),ky=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),de=r.defineComponent({__name:"base-alert",setup(t){const e=r.ref(!0),n=x("Dismiss alert");function o(){e.value=!1}return(i,a)=>{const s=oe;return e.value?(r.openBlock(),r.createElementBlock("div",Ty,[r.createElementVNode("div",Iy,[Py,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[ky]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}}),fe=r.defineComponent({__name:"base-field-set",setup(t){const e=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(e).default&&r.unref(e).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function Ny(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Xc(t){let e=0,n,o;const i=()=>{e-=1,o&&e<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(e+=1,n||(o=r.effectScope(!0),n=o.run(()=>t(...a))),Ny(i),n)}function My(t){return"state"in t}var bl=function(){};function Ry(t){return"getSnapshot"in t?t.getSnapshot():My(t)?t.state:void 0}function xy(t,e){e===void 0&&(e=Ry);var n=r.isRef(t)?t:r.shallowRef(t),o=r.shallowRef(e(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,u){o.value=e(a);var l=a.subscribe({next:function(c){return o.value=c},error:bl,complete:bl}).unsubscribe;u(function(){return l()})},{immediate:!0}),{state:o,send:i}}const Uy=t=>{var e,n,o;return{...(o=(n=(e=Ri(t))==null?void 0:e.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},oa=Xc(()=>{const t=by(),e=Rc(t).start(),n=r.ref("configuring"),{state:o,send:i}=xy(e),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},u=Pd(e,(l,c)=>tc(l,c,{onSignIn:a,onSignOut:s}));return $.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{u()}),{authStatus:n,service:e,send:i,state:o}}),ne=Xc(()=>{const{authStatus:t,state:e,send:n}=oa(),o=r.reactive({});return r.watchEffect(()=>{const i=Ud({send:n,state:e.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?Uy(e.value):null;o.QRFields=a,o.authStatus=t.value,o.send=n,o.state=e}),o});let Fy=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Ct=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(t,{emit:e}){const n=o=>{e("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),Oy={},Dy={"data-amplify-label":""};function By(t,e){return r.openBlock(),r.createElementBlock("label",Dy,[r.renderSlot(t.$slots,"default")])}const bt=Gt(Oy,[["render",By]]),Vy=["aria-label","aria-checked"],zy=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),qy=[zy],Ly=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),Gy=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),jy=[Ly,Gy],Wy={inheritAttrs:!1},ia=r.defineComponent({...Wy,__name:"password-control",props:{name:null,label:null,autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:null,required:{type:Boolean,default:!0},describedBy:null},setup(t){const e=t,n=x("Show password"),o=x("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:u,label:l,autocomplete:c,hasError:d,labelHidden:f,placeholder:p,required:m}=r.toRefs(e),y=r.ref("");function g(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const _=x((p==null?void 0:p.value)??l.value),h=x(l.value);return(v,S)=>{const w=bt,P=Ct,b=re;return r.openBlock(),r.createBlock(b,{class:r.normalizeClass([r.unref(ie).Flex,r.unref(ie).Field,r.unref(ie).TextField,r.unref(ie).PasswordField])},{default:r.withCtx(()=>[r.createVNode(w,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(f)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["class","for"]),r.createVNode(b,{class:r.normalizeClass([r.unref(ie).Flex,r.unref(ie).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(b,{class:r.normalizeClass(r.unref(ie).FieldGroupFieldWrapper)},{default:r.withCtx(()=>[r.createVNode(P,r.mergeProps(v.$attrs,{modelValue:y.value,"onUpdate:modelValue":S[0]||(S[0]=C=>y.value=C),class:[r.unref(ie).Input,r.unref(ie).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(u),autocomplete:r.unref(c),required:r.unref(m)??!0,placeholder:r.unref(_),type:i.value,"aria-invalid":r.unref(d),"aria-describedBy":t.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),r.createVNode(b,{class:r.normalizeClass(r.unref(ie).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(ie).Button,r.unref(ie).FieldGroupControl,r.unref(ie).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:g},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(ie).Icon)},qy,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(ie).Icon)},jy,2))],10,Vy)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),Hy=["value","selected"],Ky=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(t,{emit:e}){const n=t,{options:o,selectValue:i}=r.toRefs(n),a=s=>{e("update:selectValue",s.target.value)};return(s,u)=>(r.openBlock(),r.createElementBlock("select",{onChange:u[0]||(u[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,c)=>(r.openBlock(),r.createElementBlock("option",{key:c,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,Hy))),128))],32))}}),$y=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),Yy=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(t){const e=t,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:u,dialCode:l,dialCodeList:c}=r.toRefs(e),d=Math.floor(Math.random()*999999),f=Math.floor(Math.random()*999999);return(p,m)=>{const y=bt,g=Ky,_=re,h=Ct;return r.openBlock(),r.createBlock(_,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},p.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(_,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(_,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[t.type==="tel"?(r.openBlock(),r.createBlock(_,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(y,r.mergeProps({for:"amplify-field-"+r.unref(f),class:"amplify-label amplify-visually-hidden"},p.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(_,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(f),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(c),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(_,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[$y]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(_,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:r.unref(u)??!0,type:t.type,placeholder:r.unref(i),"aria-invalid":t.hasError,"aria-describedBy":t.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),Jy=["id"],ed=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(t){const e=t,{name:n,formField:o}=r.toRefs(e),{validationErrors:i}=r.toRefs(ne()),{type:a}=o.value,s=a==="password",u=Fy(12),l=r.computed(()=>Vd(i.value[n.value])),c=r.computed(()=>{var f;return((f=l.value)==null?void 0:f.length)>0}),d=r.computed(()=>c.value?u:void 0);return(f,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(ia,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(Yy,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(c),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(c)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(m,y)=>(r.openBlock(),r.createElementBlock("p",{key:y,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(x)(m)),1))),128))],8,Jy)):r.createCommentVNode("",!0)],64))}}),ge=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(t){const e=t,{route:n}=r.toRefs(e),{state:o}=oa();let i=[];return r.onBeforeMount(()=>{i=Jf(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([u,l])=>(r.openBlock(),r.createBlock(ed,{name:u,key:u,formField:l},null,8,["name","formField"]))),128))}}),Nt=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(t){const e=t,{provider:n}=r.toRefs(e),{toFederatedSignIn:o}=ne(),i=()=>{o({provider:n.value})};return(a,s)=>{const u=oe;return r.openBlock(),r.createBlock(u,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),Zy=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),Qy={class:"amplify-text"},Xy=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),ev={class:"amplify-text"},tv=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),rv={class:"amplify-text"},nv=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),ov={class:"amplify-text"},iv=["data-label"],ar=r.defineComponent({__name:"federated-sign-in",setup(t){const e=ne(),{route:n,socialProviders:o}=e,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),u=o==null?void 0:o.includes("google"),l=s||u||i||a,{getSignInWithFederationText:c,getOrText:d}=ae,f=r.computed(()=>wi),p=r.computed(()=>c(n,"amazon")),m=r.computed(()=>c(n,"apple")),y=r.computed(()=>c(n,"facebook")),g=r.computed(()=>c(n,"google")),_=r.computed(()=>d());return(h,v)=>{const S=re;return r.unref(l)?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Nt,{key:0,provider:r.unref(f).Amazon},{default:r.withCtx(()=>[Zy,r.createElementVNode("span",Qy,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Nt,{key:1,provider:r.unref(f).Apple},{default:r.withCtx(()=>[Xy,r.createElementVNode("span",ev,r.toDisplayString(r.unref(m)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Nt,{key:2,provider:r.unref(f).Facebook},{default:r.withCtx(()=>[tv,r.createElementVNode("span",rv,r.toDisplayString(r.unref(y)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(u)?(r.openBlock(),r.createBlock(Nt,{key:3,provider:r.unref(f).Google},{default:r.withCtx(()=>[nv,r.createElementVNode("span",ov,r.toDisplayString(r.unref(g)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(_)},null,8,iv)]),_:1})):r.createCommentVNode("",!0)}}}),av=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),sv={"data-amplify-footer":""},aa=r.defineComponent({__name:"sign-in",setup(t){const e=ne(),{submitForm:n,updateForm:o,toForgotPassword:i}=e,{error:a,isPending:s}=r.toRefs(e),{getForgotPasswordText:u,getSignInText:l,getSigningInText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=_=>{const{name:h,value:v}=_.target;o({name:h,value:v})},y=_=>{n(ce(_))},g=()=>{i()};return(_,h)=>{const v=fe,S=de,w=oe,P=re,b=le,C=ue;return r.renderSlot(_.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.renderSlot(_.$slots,"header"),r.createVNode(P,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(b,{"data-amplify-authenticator-signin":"",onInput:m,onSubmit:r.withModifiers(y,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:E})=>[r.renderSlot(_.$slots,"form",{info:E,onSignInSubmit:y,onInput:m,onForgotPasswordClicked:g})]),default:r.withCtx(()=>[r.createVNode(ar),r.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:E})=>[r.renderSlot(_.$slots,"signin-fields",{info:E})]),default:r.withCtx(()=>[av,r.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(w,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(p):r.unref(f)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(C,null,{default:r.withCtx(()=>[r.renderSlot(_.$slots,"footer",{},()=>[r.createElementVNode("div",sv,[r.createVNode(w,{onClick:g,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})])])]),_:3})])}}}),sa=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(ge,{route:"signUp"}))}}),ua=r.defineComponent({__name:"sign-up",setup(t){const e=ne(),{submitForm:n,updateBlur:o,updateForm:i}=e,{error:a,hasValidationErrors:s,isPending:u}=r.toRefs(e),{getCreateAccountText:l}=ae,c=r.computed(()=>l()),d=m=>{const{checked:y,name:g,type:_,value:h}=m.target;i({name:g,value:_==="checkbox"&&!y?void 0:h})};function f(m){const{name:y}=m.target;o({name:y})}const p=m=>{n(ce(m))};return(m,y)=>{const g=fe,_=de,h=oe,v=re,S=le,w=ue;return r.renderSlot(m.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(m.$attrs)),()=>[r.renderSlot(m.$slots,"header"),r.createVNode(v,r.normalizeProps(r.guardReactiveProps(m.$attrs)),{default:r.withCtx(()=>[r.createVNode(S,{onInput:d,onBlurCapture:f,onSubmit:r.withModifiers(p,["prevent"])},{default:r.withCtx(()=>[r.createVNode(ar),r.createVNode(v,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{fieldSetI:r.withCtx(({slotData:P})=>[r.renderSlot(m.$slots,"signup-fields",{info:P})]),default:r.withCtx(()=>[r.createVNode(sa)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(_,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(u)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(c)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(w,null,{default:r.withCtx(()=>[r.renderSlot(m.$slots,"footer")]),_:3})])}}}),uv={};function lv(t,e){const n=re;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default")]),_:3})]),_:3})}const cv=Gt(uv,[["render",lv]]),dv=["tabindex","aria-selected","id","aria-controls"],fv=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(t){const e=t,{active:n,id:o,label:i}=r.toRefs(e);return(a,s)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,dv))}}),pv="4.4.4",mv={};function hv(t,e){return r.renderSlot(t.$slots,"textI",r.normalizeProps(r.guardReactiveProps(t.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(t.$attrs,{"data-amplify-text":""}),[r.renderSlot(t.$slots,"default")],16)])}const la=Gt(mv,[["render",hv]]),we=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(t,{slots:e,attrs:n}){var s,u;const o=e.default?e.default():[],i=e.headingI?e.headingI():[],a=`${n.class||""} amplify-heading--${t.level}`;if(((u=(s=i[0])==null?void 0:s.children)==null?void 0:u.length)===0)i[0].children=[r.h(`h${t.level}`,{...n,class:a},[o])];else return()=>r.h(`h${t.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),ca=r.defineComponent({__name:"confirm-sign-up",setup(t){const e=ne(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(e),{resendCode:a,submitForm:s,updateForm:u}=e,{getDeliveryMethodText:l,getDeliveryMessageText:c,getResendCodeText:d,getConfirmText:f}=ae,p=r.computed(()=>l(n.value)),m=r.computed(()=>d()),y=r.computed(()=>f()),g=r.computed(()=>c(n.value)),_=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{v(w)},v=w=>{s(ce(w))},S=()=>{a()};return(w,P)=>{const b=we,C=la,E=fe,T=de,I=oe,A=ue,k=re,N=le;return r.renderSlot(w.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(k,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(N,{onInput:_,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(b,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(C,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1}),r.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(T,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),da=r.defineComponent({__name:"confirm-sign-in",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s,challengeName:u}=r.toRefs(e),l=r.computed(()=>u.value),{getBackToSignInText:c,getConfirmText:d,getChallengeText:f}=ae,p=r.computed(()=>f(l.value)),m=r.computed(()=>c()),y=r.computed(()=>d()),g=v=>{const{name:S,value:w}=v.target;i({name:S,value:w})},_=v=>{n(ce(v))},h=()=>{o()};return(v,S)=>{const w=we,P=re,b=de,C=oe,E=ue,T=fe,I=le;return r.renderSlot(v.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(v.$attrs)),()=>[r.createVNode(P,r.normalizeProps(r.guardReactiveProps(v.$attrs)),{default:r.withCtx(()=>[r.createVNode(I,{"data-amplify-authenticator-confirmsignin":"",onInput:g,onSubmit:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(v.$slots,"header",{},()=>[r.createVNode(w,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmSignIn"})]),_:1}),r.createVNode(E,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(b,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(v.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Ge={},Zo,Al;function gv(){return Al||(Al=1,Zo=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Zo}var Qo={},Ne={},El;function Be(){if(El)return Ne;El=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ne.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},Ne.getSymbolTotalCodewords=function(o){return e[o]},Ne.getBCHDigit=function(n){let o=0;for(;n!==0;)o++,n>>>=1;return o},Ne.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},Ne.isKanjiModeEnabled=function(){return typeof t<"u"},Ne.toSJIS=function(o){return t(o)},Ne}var Xo={},Tl;function fa(){return Tl||(Tl=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,i){if(t.isValid(o))return o;try{return e(o)}catch{return i}}}(Xo)),Xo}var ei,Il;function yv(){if(Il)return ei;Il=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let o=0;o<n;o++)this.putBit((e>>>n-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ei=t,ei}var ti,Pl;function vv(){if(Pl)return ti;Pl=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,o,i){const a=e*this.size+n;this.data[a]=o,i&&(this.reservedBit[a]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,o){this.data[e*this.size+n]^=o},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},ti=t,ti}var ri={},kl;function _v(){return kl||(kl=1,function(t){const e=Be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=e(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,u=[a-7];for(let l=1;l<i-1;l++)u[l]=u[l-1]-s;return u.push(6),u.reverse()},t.getPositions=function(o){const i=[],a=t.getRowColCoords(o),s=a.length;for(let u=0;u<s;u++)for(let l=0;l<s;l++)u===0&&l===0||u===0&&l===s-1||u===s-1&&l===0||i.push([a[u],a[l]]);return i}}(ri)),ri}var ni={},Nl;function Sv(){if(Nl)return ni;Nl=1;const t=Be().getSymbolSize,e=7;return ni.getPositions=function(o){const i=t(o);return[[0,0],[i-e,0],[0,i-e]]},ni}var oi={},Ml;function wv(){return Ml||(Ml=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const a=i.size;let s=0,u=0,l=0,c=null,d=null;for(let f=0;f<a;f++){u=l=0,c=d=null;for(let p=0;p<a;p++){let m=i.get(f,p);m===c?u++:(u>=5&&(s+=e.N1+(u-5)),c=m,u=1),m=i.get(p,f),m===d?l++:(l>=5&&(s+=e.N1+(l-5)),d=m,l=1)}u>=5&&(s+=e.N1+(u-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(i){const a=i.size;let s=0;for(let u=0;u<a-1;u++)for(let l=0;l<a-1;l++){const c=i.get(u,l)+i.get(u,l+1)+i.get(u+1,l)+i.get(u+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(i){const a=i.size;let s=0,u=0,l=0;for(let c=0;c<a;c++){u=l=0;for(let d=0;d<a;d++)u=u<<1&2047|i.get(c,d),d>=10&&(u===1488||u===93)&&s++,l=l<<1&2047|i.get(d,c),d>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*e.N4};function n(o,i,a){switch(o){case t.Patterns.PATTERN000:return(i+a)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(i+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return i*a%2+i*a%3===0;case t.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case t.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(i,a){const s=a.size;for(let u=0;u<s;u++)for(let l=0;l<s;l++)a.isReserved(l,u)||a.xor(l,u,n(i,l,u))},t.getBestMask=function(i,a){const s=Object.keys(t.Patterns).length;let u=0,l=1/0;for(let c=0;c<s;c++){a(c),t.applyMask(c,i);const d=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(c,i),d<l&&(l=d,u=c)}return u}}(oi)),oi}var Mt={},Rl;function td(){if(Rl)return Mt;Rl=1;const t=fa(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Mt.getBlocksCount=function(i,a){switch(a){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},Mt.getTotalCodewordsCount=function(i,a){switch(a){case t.L:return n[(i-1)*4+0];case t.M:return n[(i-1)*4+1];case t.Q:return n[(i-1)*4+2];case t.H:return n[(i-1)*4+3];default:return}},Mt}var ii={},nt={},xl;function Cv(){if(xl)return nt;xl=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let o=1;for(let i=0;i<255;i++)t[i]=o,e[o]=i,o<<=1,o&256&&(o^=285);for(let i=255;i<512;i++)t[i]=t[i-255]}(),nt.log=function(o){if(o<1)throw new Error("log("+o+")");return e[o]},nt.exp=function(o){return t[o]},nt.mul=function(o,i){return o===0||i===0?0:t[e[o]+e[i]]},nt}var Ul;function bv(){return Ul||(Ul=1,function(t){const e=Cv();t.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let u=0;u<i.length;u++)a[s+u]^=e.mul(o[s],i[u]);return a},t.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=e.mul(i[l],s);let u=0;for(;u<a.length&&a[u]===0;)u++;a=a.slice(u)}return a},t.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=t.mul(i,new Uint8Array([1,e.exp(a)]));return i}}(ii)),ii}var ai,Fl;function Av(){if(Fl)return ai;Fl=1;const t=bv();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(o){this.degree=o,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(o.length+this.degree);i.set(o);const a=t.mod(i,this.genPoly),s=this.degree-a.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(a,s),u}return a},ai=e,ai}var si={},ui={},li={},Ol;function rd(){return Ol||(Ol=1,li.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),li}var ve={},Dl;function nd(){if(Dl)return ve;Dl=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
21
|
+
]))+`;ve.KANJI=new RegExp(n,"g"),ve.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ve.BYTE=new RegExp(o,"g"),ve.NUMERIC=new RegExp(t,"g"),ve.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+n+"$"),a=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ve.testKanji=function(l){return i.test(l)},ve.testNumeric=function(l){return a.test(l)},ve.testAlphanumeric=function(l){return s.test(l)},ve}var Bl;function Ve(){return Bl||(Bl=1,function(t){const e=rd(),n=nd();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},t.getBestModeForData=function(a){return n.testNumeric(a)?t.NUMERIC:n.testAlphanumeric(a)?t.ALPHANUMERIC:n.testKanji(a)?t.KANJI:t.BYTE},t.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},t.isValid=function(a){return a&&a.bit&&a.ccBits};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(a,s){if(t.isValid(a))return a;try{return o(a)}catch{return s}}}(ui)),ui}var Vl;function Ev(){return Vl||(Vl=1,function(t){const e=Be(),n=td(),o=fa(),i=Ve(),a=rd(),s=7973,u=e.getBCHDigit(s);function l(p,m,y){for(let g=1;g<=40;g++)if(m<=t.getCapacity(g,y,p))return g}function c(p,m){return i.getCharCountIndicator(p,m)+4}function d(p,m){let y=0;return p.forEach(function(g){const _=c(g.mode,m);y+=_+g.getBitsLength()}),y}function f(p,m){for(let y=1;y<=40;y++)if(d(p,y)<=t.getCapacity(y,m,i.MIXED))return y}t.from=function(m,y){return a.isValid(m)?parseInt(m,10):y},t.getCapacity=function(m,y,g){if(!a.isValid(m))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=i.BYTE);const _=e.getSymbolTotalCodewords(m),h=n.getTotalCodewordsCount(m,y),v=(_-h)*8;if(g===i.MIXED)return v;const S=v-c(g,m);switch(g){case i.NUMERIC:return Math.floor(S/10*3);case i.ALPHANUMERIC:return Math.floor(S/11*2);case i.KANJI:return Math.floor(S/13);case i.BYTE:default:return Math.floor(S/8)}},t.getBestVersionForData=function(m,y){let g;const _=o.from(y,o.M);if(Array.isArray(m)){if(m.length>1)return f(m,_);if(m.length===0)return 1;g=m[0]}else g=m;return l(g.mode,g.getLength(),_)},t.getEncodedBits=function(m){if(!a.isValid(m)||m<7)throw new Error("Invalid QR Code version");let y=m<<12;for(;e.getBCHDigit(y)-u>=0;)y^=s<<e.getBCHDigit(y)-u;return m<<12|y}}(si)),si}var ci={},zl;function Tv(){if(zl)return ci;zl=1;const t=Be(),e=1335,n=21522,o=t.getBCHDigit(e);return ci.getEncodedBits=function(a,s){const u=a.bit<<3|s;let l=u<<10;for(;t.getBCHDigit(l)-o>=0;)l^=e<<t.getBCHDigit(l)-o;return(u<<10|l)^n},ci}var di={},fi,ql;function Iv(){if(ql)return fi;ql=1;const t=Ve();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(o){let i,a,s;for(i=0;i+3<=this.data.length;i+=3)a=this.data.substr(i,3),s=parseInt(a,10),o.put(s,10);const u=this.data.length-i;u>0&&(a=this.data.substr(i),s=parseInt(a,10),o.put(s,u*3+1))},fi=e,fi}var pi,Ll;function Pv(){if(Ll)return pi;Ll=1;const t=Ve(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(o){this.mode=t.ALPHANUMERIC,this.data=o}return n.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let a;for(a=0;a+2<=this.data.length;a+=2){let s=e.indexOf(this.data[a])*45;s+=e.indexOf(this.data[a+1]),i.put(s,11)}this.data.length%2&&i.put(e.indexOf(this.data[a]),6)},pi=n,pi}var mi,Gl;function kv(){return Gl||(Gl=1,mi=function(e){for(var n=[],o=e.length,i=0;i<o;i++){var a=e.charCodeAt(i);if(a>=55296&&a<=56319&&o>i+1){var s=e.charCodeAt(i+1);s>=56320&&s<=57343&&(a=(a-55296)*1024+s-56320+65536,i+=1)}if(a<128){n.push(a);continue}if(a<2048){n.push(a>>6|192),n.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){n.push(a>>12|224),n.push(a>>6&63|128),n.push(a&63|128);continue}if(a>=65536&&a<=1114111){n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(a&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),mi}var hi,jl;function Nv(){if(jl)return hi;jl=1;const t=kv(),e=Ve();function n(o){this.mode=e.BYTE,this.data=new Uint8Array(t(o))}return n.getBitsLength=function(i){return i*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){for(let i=0,a=this.data.length;i<a;i++)o.put(this.data[i],8)},hi=n,hi}var gi,Wl;function Mv(){if(Wl)return gi;Wl=1;const t=Ve(),e=Be();function n(o){this.mode=t.KANJI,this.data=o}return n.getBitsLength=function(i){return i*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let i;for(i=0;i<this.data.length;i++){let a=e.toSJIS(this.data[i]);if(a>=33088&&a<=40956)a-=33088;else if(a>=57408&&a<=60351)a-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
|
|
22
|
+
Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),o.put(a,13)}},gi=n,gi}var yi={exports:{}},Hl;function Rv(){return Hl||(Hl=1,function(t){var e={single_source_shortest_paths:function(n,o,i){var a={},s={};s[o]=0;var u=e.PriorityQueue.make();u.push(o,0);for(var l,c,d,f,p,m,y,g,_;!u.empty();){l=u.pop(),c=l.value,f=l.cost,p=n[c]||{};for(d in p)p.hasOwnProperty(d)&&(m=p[d],y=f+m,g=s[d],_=typeof s[d]>"u",(_||g>y)&&(s[d]=y,u.push(d,y),a[d]=c))}if(typeof i<"u"&&typeof s[i]>"u"){var h=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(h)}return a},extract_shortest_path_from_predecessor_list:function(n,o){for(var i=[],a=o;a;)i.push(a),n[a],a=n[a];return i.reverse(),i},find_path:function(n,o,i){var a=e.single_source_shortest_paths(n,o,i);return e.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(n){var o=e.PriorityQueue,i={},a;n=n||{};for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);return i.queue=[],i.sorter=n.sorter||o.default_sorter,i},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var i={value:n,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e}(yi)),yi.exports}var Kl;function xv(){return Kl||(Kl=1,function(t){const e=Ve(),n=Iv(),o=Pv(),i=Nv(),a=Mv(),s=nd(),u=Be(),l=Rv();function c(h){return unescape(encodeURIComponent(h)).length}function d(h,v,S){const w=[];let P;for(;(P=h.exec(S))!==null;)w.push({data:P[0],index:P.index,mode:v,length:P[0].length});return w}function f(h){const v=d(s.NUMERIC,e.NUMERIC,h),S=d(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let w,P;return u.isKanjiModeEnabled()?(w=d(s.BYTE,e.BYTE,h),P=d(s.KANJI,e.KANJI,h)):(w=d(s.BYTE_KANJI,e.BYTE,h),P=[]),v.concat(S,w,P).sort(function(C,E){return C.index-E.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function p(h,v){switch(v){case e.NUMERIC:return n.getBitsLength(h);case e.ALPHANUMERIC:return o.getBitsLength(h);case e.KANJI:return a.getBitsLength(h);case e.BYTE:return i.getBitsLength(h)}}function m(h){return h.reduce(function(v,S){const w=v.length-1>=0?v[v.length-1]:null;return w&&w.mode===S.mode?(v[v.length-1].data+=S.data,v):(v.push(S),v)},[])}function y(h){const v=[];for(let S=0;S<h.length;S++){const w=h[S];switch(w.mode){case e.NUMERIC:v.push([w,{data:w.data,mode:e.ALPHANUMERIC,length:w.length},{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.ALPHANUMERIC:v.push([w,{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.KANJI:v.push([w,{data:w.data,mode:e.BYTE,length:c(w.data)}]);break;case e.BYTE:v.push([{data:w.data,mode:e.BYTE,length:c(w.data)}])}}return v}function g(h,v){const S={},w={start:{}};let P=["start"];for(let b=0;b<h.length;b++){const C=h[b],E=[];for(let T=0;T<C.length;T++){const I=C[T],A=""+b+T;E.push(A),S[A]={node:I,lastCount:0},w[A]={};for(let k=0;k<P.length;k++){const N=P[k];S[N]&&S[N].node.mode===I.mode?(w[N][A]=p(S[N].lastCount+I.length,I.mode)-p(S[N].lastCount,I.mode),S[N].lastCount+=I.length):(S[N]&&(S[N].lastCount=I.length),w[N][A]=p(I.length,I.mode)+4+e.getCharCountIndicator(I.mode,v))}}P=E}for(let b=0;b<P.length;b++)w[P[b]].end=0;return{map:w,table:S}}function _(h,v){let S;const w=e.getBestModeForData(h);if(S=e.from(v,w),S!==e.BYTE&&S.bit<w.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(S)+`.
|
|
23
|
+
Suggested mode is: `+e.toString(w));switch(S===e.KANJI&&!u.isKanjiModeEnabled()&&(S=e.BYTE),S){case e.NUMERIC:return new n(h);case e.ALPHANUMERIC:return new o(h);case e.KANJI:return new a(h);case e.BYTE:return new i(h)}}t.fromArray=function(v){return v.reduce(function(S,w){return typeof w=="string"?S.push(_(w,null)):w.data&&S.push(_(w.data,w.mode)),S},[])},t.fromString=function(v,S){const w=f(v,u.isKanjiModeEnabled()),P=y(w),b=g(P,S),C=l.find_path(b.map,"start","end"),E=[];for(let T=1;T<C.length-1;T++)E.push(b.table[C[T]].node);return t.fromArray(m(E))},t.rawSplit=function(v){return t.fromArray(f(v,u.isKanjiModeEnabled()))}}(di)),di}var $l;function Uv(){if($l)return Qo;$l=1;const t=Be(),e=fa(),n=yv(),o=vv(),i=_v(),a=Sv(),s=wv(),u=td(),l=Av(),c=Ev(),d=Tv(),f=Ve(),p=xv();function m(b,C){const E=b.size,T=a.getPositions(C);for(let I=0;I<T.length;I++){const A=T[I][0],k=T[I][1];for(let N=-1;N<=7;N++)if(!(A+N<=-1||E<=A+N))for(let R=-1;R<=7;R++)k+R<=-1||E<=k+R||(N>=0&&N<=6&&(R===0||R===6)||R>=0&&R<=6&&(N===0||N===6)||N>=2&&N<=4&&R>=2&&R<=4?b.set(A+N,k+R,!0,!0):b.set(A+N,k+R,!1,!0))}}function y(b){const C=b.size;for(let E=8;E<C-8;E++){const T=E%2===0;b.set(E,6,T,!0),b.set(6,E,T,!0)}}function g(b,C){const E=i.getPositions(C);for(let T=0;T<E.length;T++){const I=E[T][0],A=E[T][1];for(let k=-2;k<=2;k++)for(let N=-2;N<=2;N++)k===-2||k===2||N===-2||N===2||k===0&&N===0?b.set(I+k,A+N,!0,!0):b.set(I+k,A+N,!1,!0)}}function _(b,C){const E=b.size,T=c.getEncodedBits(C);let I,A,k;for(let N=0;N<18;N++)I=Math.floor(N/3),A=N%3+E-8-3,k=(T>>N&1)===1,b.set(I,A,k,!0),b.set(A,I,k,!0)}function h(b,C,E){const T=b.size,I=d.getEncodedBits(C,E);let A,k;for(A=0;A<15;A++)k=(I>>A&1)===1,A<6?b.set(A,8,k,!0):A<8?b.set(A+1,8,k,!0):b.set(T-15+A,8,k,!0),A<8?b.set(8,T-A-1,k,!0):A<9?b.set(8,15-A-1+1,k,!0):b.set(8,15-A-1,k,!0);b.set(T-8,8,1,!0)}function v(b,C){const E=b.size;let T=-1,I=E-1,A=7,k=0;for(let N=E-1;N>0;N-=2)for(N===6&&N--;;){for(let R=0;R<2;R++)if(!b.isReserved(I,N-R)){let L=!1;k<C.length&&(L=(C[k]>>>A&1)===1),b.set(I,N-R,L),A--,A===-1&&(k++,A=7)}if(I+=T,I<0||E<=I){I-=T,T=-T;break}}}function S(b,C,E){const T=new n;E.forEach(function(R){T.put(R.mode.bit,4),T.put(R.getLength(),f.getCharCountIndicator(R.mode,b)),R.write(T)});const I=t.getSymbolTotalCodewords(b),A=u.getTotalCodewordsCount(b,C),k=(I-A)*8;for(T.getLengthInBits()+4<=k&&T.put(0,4);T.getLengthInBits()%8!==0;)T.putBit(0);const N=(k-T.getLengthInBits())/8;for(let R=0;R<N;R++)T.put(R%2?17:236,8);return w(T,b,C)}function w(b,C,E){const T=t.getSymbolTotalCodewords(C),I=u.getTotalCodewordsCount(C,E),A=T-I,k=u.getBlocksCount(C,E),N=T%k,R=k-N,L=Math.floor(T/k),K=Math.floor(A/k),Y=K+1,J=L-K,Z=new l(J);let ye=0;const X=new Array(k),Pe=new Array(k);let xe=0;const U=new Uint8Array(b.buffer);for(let ke=0;ke<k;ke++){const Qe=ke<R?K:Y;X[ke]=U.slice(ye,ye+Qe),Pe[ke]=Z.encode(X[ke]),ye+=Qe,xe=Math.max(xe,Qe)}const pe=new Uint8Array(T);let Ze=0,me,se;for(me=0;me<xe;me++)for(se=0;se<k;se++)me<X[se].length&&(pe[Ze++]=X[se][me]);for(me=0;me<J;me++)for(se=0;se<k;se++)pe[Ze++]=Pe[se][me];return pe}function P(b,C,E,T){let I;if(Array.isArray(b))I=p.fromArray(b);else if(typeof b=="string"){let L=C;if(!L){const K=p.rawSplit(b);L=c.getBestVersionForData(K,E)}I=p.fromString(b,L||40)}else throw new Error("Invalid data");const A=c.getBestVersionForData(I,E);if(!A)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=A;else if(C<A)throw new Error(`
|
|
24
24
|
The chosen QR Code version cannot contain this amount of data.
|
|
25
25
|
Minimum version required to store current data is: `+A+`.
|
|
26
|
-
`);const k=S(C,E,I),N=t.getSymbolSize(C),R=new o(N);return m(R,C),y(R),g(R,C),h(R,E,0),C>=7&&_(R,C),v(R,k),isNaN(T)&&(T=s.getBestMask(R,h.bind(null,R,E))),s.applyMask(T,R),h(R,E,T),{modules:R,version:C,errorCorrectionLevel:E,maskPattern:T,segments:I}}return Qo.create=function(C,E){if(typeof C>"u"||C==="")throw new Error("No input text");let T=e.M,I,A;return typeof E<"u"&&(T=e.from(E.errorCorrectionLevel,e.M),I=c.from(E.version),A=s.from(E.maskPattern),E.toSJISFunc&&t.setToSJISFunction(E.toSJISFunc)),P(C,I,T,A)},Qo}var vi={},_i={},Yl;function od(){return Yl||(Yl=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(a){return[a,a]}))),o.length===6&&o.push("F","F");const i=parseInt(o.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const i=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,a=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:a,scale:a?4:s,margin:i,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,i){return i.width&&i.width>=o+i.margin*2?i.width/(o+i.margin*2):i.scale},t.getImageWidth=function(o,i){const a=t.getScale(o,i);return Math.floor((o+i.margin*2)*a)},t.qrToImageData=function(o,i,a){const s=i.modules.size,u=i.modules.data,l=t.getScale(s,a),c=Math.floor((s+a.margin*2)*l),d=a.margin*l,f=[a.color.light,a.color.dark];for(let p=0;p<c;p++)for(let m=0;m<c;m++){let y=(p*c+m)*4,g=a.color.light;if(p>=d&&m>=d&&p<c-d&&m<c-d){const _=Math.floor((p-d)/l),h=Math.floor((m-d)/l);g=f[u[_*s+h]?1:0]}o[y++]=g.r,o[y++]=g.g,o[y++]=g.b,o[y]=g.a}}}(_i)),_i}var Jl;function
|
|
27
|
-
`;return typeof u=="function"&&u(null,_),_},Si}var Ql;function Ov(){if(Ql)return Ge;Ql=1;const t=hv(),e=xv(),n=Uv(),o=Fv();function i(a,s,u,l,c){const d=[].slice.call(arguments,1),f=d.length,p=typeof d[f-1]=="function";if(!p&&!t())throw new Error("Callback required as last argument");if(p){if(f<2)throw new Error("Too few arguments provided");f===2?(c=u,u=s,s=l=void 0):f===3&&(s.getContext&&typeof c>"u"?(c=l,l=void 0):(c=l,l=u,u=s,s=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(u=s,s=l=void 0):f===2&&!s.getContext&&(l=u,u=s,s=void 0),new Promise(function(m,y){try{const g=e.create(u,l);m(a(g,s,l))}catch(g){y(g)}})}try{const m=e.create(u,l);c(null,a(m,s,l))}catch(m){c(m)}}return Ge.create=e.create,Ge.toCanvas=i.bind(null,n.render),Ge.toDataURL=i.bind(null,n.renderToDataURL),Ge.toString=i.bind(null,function(a,s,u){return o.render(a,u)}),Ge}var Dv=Ov();const Bv=qi(Dv),Vv={key:0},zv=["src"],qv={"data-amplify-copy-tooltip":""},Lv=r.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})],-1),Gv=r.defineComponent({__name:"setup-totp",setup(t){const e=new Ni.ConsoleLogger("SetupTotp-logger"),n=ne(),{updateForm:o,submitForm:i,toSignIn:a,totpSecretCode:s,username:u,QRFields:l}=n,{error:c,isPending:d}=r.toRefs(n),{totpIssuer:f="AWSCognito",totpUsername:p=u}=l??{},m=Wd(f,p,s),y=r.reactive({qrCodeImageSource:"",isLoading:!0}),{getCopyText:g,getCopiedText:_,getBackToSignInText:h,getConfirmText:v}=ae,S=r.ref(g());function w(){s&&navigator.clipboard.writeText(s),S.value=_()}r.onMounted(async()=>{try{y.qrCodeImageSource=await Bv.toDataURL(m)}catch(I){e.error(I)}finally{y.isLoading=!1}});const P=r.computed(()=>h()),b=r.computed(()=>v()),C=I=>{const{name:A,value:k}=I.target;o({name:A,value:k})},E=I=>{i(ce(I))},T=()=>{a()};return(I,A)=>{const k=we,N=re,R=de,L=oe,K=ue,Y=fe,J=le;return r.renderSlot(I.$slots,"confirmSetupTotpI",r.normalizeProps(r.guardReactiveProps(I.$attrs)),()=>[r.createVNode(N,r.normalizeProps(r.guardReactiveProps(I.$attrs)),{default:r.withCtx(()=>[r.createVNode(J,{"data-amplify-authenticator-setup-totp":"",onInput:C,onSubmit:r.withModifiers(E,["prevent"])},{default:r.withCtx(()=>[r.createVNode(Y,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(d)},{default:r.withCtx(()=>[r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(I.$slots,"header",{},()=>[r.createVNode(k,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(" Setup TOTP ")]),_:1})]),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[y.isLoading?(r.openBlock(),r.createElementBlock("p",Vv,"Loading...")):(r.openBlock(),r.createElementBlock("img",{key:1,class:"amplify-image","data-amplify-qrcode":"",src:y.qrCodeImageSource,alt:"qr code",width:"228",height:"228"},null,8,zv)),r.createVNode(N,{class:"amplify-flex","data-amplify-copy":""},{default:r.withCtx(()=>[r.createElementVNode("div",null,r.toDisplayString(r.unref(s)),1),r.createVNode(N,{"data-amplify-copy-svg":"",onClick:w},{default:r.withCtx(()=>[r.createElementVNode("div",qv,r.toDisplayString(S.value),1),Lv]),_:1})]),_:1}),r.createVNode(ge,{route:"setupTotp"})]),_:1}),r.createVNode(K,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(c)?(r.openBlock(),r.createBlock(R,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(c))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(d)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(T,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)),1)]),_:1},8,["onClick"]),r.renderSlot(I.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),pa=r.defineComponent({__name:"authenticator-force-new-password-form-fields",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(ge,{route:"forceNewPassword"}))}}),ma=r.defineComponent({__name:"force-new-password",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateBlur:i,updateForm:a}=e,{error:s,isPending:u}=r.toRefs(e),{getChangePasswordText:l,getChangingText:c,getBackToSignInText:d}=ae,f=r.computed(()=>l()),p=r.computed(()=>c()),m=r.computed(()=>d()),y=()=>{o()},g=S=>{_(S)},_=S=>{n(ce(S))},h=S=>{const{name:w,value:P}=S.target;a({name:w,value:P})};function v(S){const{name:w}=S.target;i({name:w})}return(S,w)=>{const P=we,b=re,C=de,E=oe,T=ue,I=fe,A=le;return r.renderSlot(S.$slots,"forceNewPasswordI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-forcenewpassword":"",onInput:h,onBlurCapture:v,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(P,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"force-new-password-form-fields",{},()=>[r.createVNode(pa)])]),_:3}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(C,{key:0,"data-ui-error":""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)?r.unref(p)+"…":r.unref(f)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer",{onHaveAccountClicked:y,onForceNewPasswordSubmit:g})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),ha=r.defineComponent({__name:"forgot-password",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s}=r.toRefs(e),{getBackToSignInText:u,getResetYourPasswordText:l,getSendCodeText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=_=>{n(ce(_))},y=_=>{const{name:h,value:v}=_.target;i({name:h,value:v})},g=()=>{o()};return(_,h)=>{const v=we,S=fe,w=de,P=oe,b=ue,C=re,E=le;return r.renderSlot(_.$slots,"forgotPasswordSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(E,r.mergeProps(_.$attrs,{"data-amplify-authenticator-forgotpassword":"",onInput:y,onSubmit:r.withModifiers(m,["prevent"])}),{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(v,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createVNode(ge,{route:"forgotPassword"})]),_:1},8,["disabled"]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer",{onBackToSignInClicked:g,onResetPasswordSubmit:m})]),_:3})]),_:3})]),_:3},16,["onSubmit"])])}}}),ga=r.defineComponent({__name:"confirm-reset-password",setup(t){const e=ne(),{resendCode:n,submitForm:o,updateBlur:i,updateForm:a}=e,{error:s,isPending:u}=r.toRefs(e),{getResendCodeText:l,getResetYourPasswordText:c,getSubmitText:d}=ae,f=r.computed(()=>l()),p=r.computed(()=>c()),m=r.computed(()=>d()),y=S=>{g(S)},g=S=>{o(ce(S))},_=()=>{n()},h=S=>{const{name:w,value:P}=S.target;a({name:w,value:P})};function v(S){const{name:w}=S.target;i({name:w})}return(S,w)=>{const P=we,b=re,C=de,E=oe,T=ue,I=fe,A=le;return r.renderSlot(S.$slots,"confirmResetPasswordSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-confirmResetpassword":"",onInput:h,onBlurCapture:v,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(P,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmResetPassword"})]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(C,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",variation:"primary",fullwidth:!1,type:"submit",disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!1,size:"small",type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),ya=r.defineComponent({__name:"verify-user",setup(t){const e=ne(),{isPending:n,unverifiedUserAttributes:o,error:i}=r.toRefs(e),{skipVerification:a,submitForm:s,updateForm:u}=e,{getAccountRecoveryInfoText:l,getSkipText:c,getVerifyText:d,getVerifyContactText:f}=ae,p=r.computed(()=>l()),m=r.computed(()=>c()),y=r.computed(()=>d()),g=r.computed(()=>f()),_=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{v(w)},v=w=>{s(ce(w))},S=()=>{a()};return(w,P)=>{const b=we,C=bt,E=la,T=Ct,I=re,A=de,k=oe,N=ue,R=fe,L=le;return r.renderSlot(w.$slots,"verifyUserSlotI",{},()=>[r.createVNode(I,null,{default:r.withCtx(()=>[r.createVNode(L,{onInput:_,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(R,{disabled:r.unref(n),class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(b,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(I,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-visually-hidden amplify-label",id:"amplify-field-493c"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":"amplify-field-493c"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(K,Y,J)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:K},[K?(r.openBlock(),r.createBlock(C,{key:0,class:"amplify-flex amplify-radio","data-amplify-verify-label":""},{default:r.withCtx(()=>[r.createVNode(E,{class:"amplify-text amplify-radio__label"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(mt)[Y].label))+": "+r.toDisplayString(r.unref(Gd)(r.unref(mt)[Y].label,K)),1)]),_:2},1024),r.createVNode(T,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-verify-input":"",name:"unverifiedAttr",type:"radio",checked:J===0,value:Y},null,8,["checked","value"]),r.createVNode(E,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"})]),_:2},1024)):r.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(i))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(n)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3})])}}}),va=r.defineComponent({__name:"confirm-verify-user",setup(t){const e=ne(),{error:n,isPending:o}=r.toRefs(e),{skipVerification:i,submitForm:a,updateForm:s}=e,{getAccountRecoveryInfoText:u,getSkipText:l,getSubmitText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=h=>{const{name:v,value:S}=h.target;s({name:v,value:S})},y=h=>{g(h)},g=h=>{a(ce(h))},_=()=>{i()};return(h,v)=>{const S=we,w=re,P=de,b=oe,C=ue,E=fe,T=le;return r.renderSlot(h.$slots,"confirmVerifyUserSlotI",r.normalizeProps(r.guardReactiveProps(h.$attrs)),()=>[r.createVNode(w,r.normalizeProps(r.guardReactiveProps(h.$attrs)),{default:r.withCtx(()=>[r.createVNode(T,{onInput:m,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(o)},{default:r.withCtx(()=>[r.renderSlot(h.$slots,"header",{},()=>[r.createVNode(S,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})]),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmVerifyUser"})]),_:1}),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(P,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(n))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(b,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(o)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(b,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(h.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),_a=r.defineComponent({__name:"select-mfa-type",setup(t){const e=Math.floor(Math.random()*999999),n=ne(),{submitForm:o,toSignIn:i,updateForm:a}=n,{error:s,isPending:u,challengeName:l,allowedMfaTypes:c}=r.toRefs(n),d=r.computed(()=>l.value),{getBackToSignInText:f,getConfirmText:p,getSelectMfaTypeByChallengeName:m,getMfaTypeLabelByValue:y,getSelectMfaTypeText:g}=ae,_=r.computed(()=>m(d.value)),h=r.computed(()=>f()),v=r.computed(()=>p()),S=r.computed(()=>g()),w=C=>{const{name:E,value:T}=C.target;a({name:E,value:T})},P=C=>{o(ce(C))},b=()=>{i()};return(C,E)=>{const T=we,I=bt,A=la,k=Ct,N=re,R=de,L=oe,K=ue,Y=fe,J=le;return r.renderSlot(C.$slots,"selectMfaTypeSlotI",r.normalizeProps(r.guardReactiveProps(C.$attrs)),()=>[r.createVNode(N,r.normalizeProps(r.guardReactiveProps(C.$attrs)),{default:r.withCtx(()=>[r.createVNode(J,{"data-amplify-authenticator-selectmfatype":"",onInput:w,onSubmit:r.withModifiers(P,["prevent"])},{default:r.withCtx(()=>[r.createVNode(Y,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(C.$slots,"header",{},()=>[r.createVNode(T,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(_)),1)]),_:1})]),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-visually-hidden amplify-label",id:`amplify-field-${r.unref(e)}`},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(S)),1)]),_:1},8,["id"]),r.createVNode(N,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":`amplify-field-${r.unref(e)}`},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),(Z,ye)=>(r.openBlock(),r.createBlock(I,{key:Z,class:"amplify-flex amplify-radio","data-amplify-selectmfatype-label":""},{default:r.withCtx(()=>[r.createVNode(A,{class:"amplify-text amplify-radio__label"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)(Z)),1)]),_:2},1024),r.createVNode(k,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-selectmfatype-input":"",name:"mfa_type",type:"radio",value:Z,checked:ye===0},null,8,["value","checked"]),r.createVNode(A,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"})]),_:2},1024))),128))]),_:1},8,["aria-labelledby"])]),_:1}),r.createVNode(K,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(R,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1},8,["disabled"]),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(b,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["onClick"]),r.renderSlot(C.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Sa=r.defineComponent({__name:"setup-email",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s}=r.toRefs(e),{getBackToSignInText:u,getConfirmText:l,getSetupEmailText:c}=ae,d=r.computed(()=>c()),f=r.computed(()=>u()),p=r.computed(()=>l()),m=_=>{const{name:h,value:v}=_.target;i({name:h,value:v})},y=_=>{n(ce(_))},g=()=>{o()};return(_,h)=>{const v=we,S=re,w=de,P=oe,b=ue,C=fe,E=le;return r.renderSlot(_.$slots,"setupEmailSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(S,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(E,{"data-amplify-authenticator-setupemail":"",onInput:m,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(v,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})]),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"setupEmail"})]),_:1}),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),jv=["data-variation"],Wv={"data-amplify-container":""},Hv=["data-amplify-router-content"],Kv={key:1,"data-amplify-router-content":""},id=r.defineComponent({__name:"authenticator",props:{hideSignUp:{type:Boolean},initialState:null,loginMechanisms:null,services:null,signUpAttributes:null,variation:{default:"default"},socialProviders:null,formFields:null},setup(t){const e=t,{initialState:n,loginMechanisms:o,variation:i,services:a,signUpAttributes:s,socialProviders:u,hideSignUp:l,formFields:c}=r.toRefs(e);let d;const f=r.ref(!1),{service:p,send:m,state:y}=oa(),g=p.subscribe(U=>{U.matches("setup")&&!f.value&&(m({type:"INIT",data:{initialState:n.value,loginMechanisms:o.value,socialProviders:u.value,signUpAttributes:s.value,services:a.value,formFields:c.value}}),f.value=!0)}).unsubscribe,_=ne(),{route:h,signOut:v,toSignIn:S,toSignUp:w,user:P}=r.toRefs(_);r.onMounted(()=>{d=Ay({componentName:"Authenticator",packageName:"vue",version:fv})}),r.onUnmounted(()=>{d(),g()});const b=r.ref(),C=r.ref(),E=r.ref(),T=r.ref(),I=r.ref(),A=r.ref(),k=r.ref(),N=r.ref(),R=r.ref(),L=r.ref(),K=r.ref(),Y=r.ref(),{getSignInTabText:J,getSignUpTabText:Z}=ae,ye=r.computed(()=>J()),X=r.computed(()=>Z()),Pe=r.computed(()=>h.value==="signIn"||h.value==="signUp"),xe=r.computed(()=>["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"].includes(h.value));return(U,pe)=>{const Ze=dv,me=lv;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(xe)?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},U.$attrs,{"data-amplify-authenticator":"","data-variation":r.unref(i)}),[r.createElementVNode("div",Wv,[r.renderSlot(U.$slots,"header"),r.createElementVNode("div",{"data-amplify-router":"","data-amplify-router-content":r.unref(Pe)?void 0:""},[r.unref(Pe)&&!r.unref(l)?(r.openBlock(),r.createBlock(me,{key:0},{default:r.withCtx(()=>[r.createVNode(Ze,{active:r.unref(h)==="signIn",id:"signIn",label:r.unref(ye),onClick:r.unref(S)},null,8,["active","label","onClick"]),r.createVNode(Ze,{active:r.unref(h)==="signUp",id:"signUp",label:r.unref(X),onClick:r.unref(w)},null,8,["active","label","onClick"])]),_:1})):r.createCommentVNode("",!0),r.unref(Pe)?(r.openBlock(),r.createElementBlock("div",Kv,[r.unref(h)==="signIn"?(r.openBlock(),r.createBlock(aa,{key:0,id:"signIn-panel",role:"tabpanel",class:"amplify-tabs__panel amplify-tabs__panel--active","aria-labelledby":"signIn-tab",ref_key:"signInComponent",ref:b},{signInSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in")]),form:r.withCtx(({info:se,onSignInSubmit:ke,onForgotPasswordClicked:Qe,onInput:ld})=>[r.renderSlot(U.$slots,"sign-in-form",{info:se,onInput:ld,onSignInSubmit:ke,onForgotPasswordClicked:Qe})]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="signUp"&&!r.unref(l)?(r.openBlock(),r.createBlock(ua,{key:1,id:"signUp-panel",class:"amplify-tabs__panel amplify-tabs__panel--active",role:"tabpanel","aria-labelledby":"signUp-tab",ref_key:"signUpComponent",ref:C},{signUpSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up-header")]),"signup-fields":r.withCtx(({info:se})=>[r.renderSlot(U.$slots,"sign-up-fields",{info:se})]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up-footer")]),_:3},512)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.unref(h)==="confirmSignUp"?(r.openBlock(),r.createBlock(ca,{key:2,ref_key:"confirmSignUpComponent",ref:E},{confirmSignUpSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="forgotPassword"?(r.openBlock(),r.createBlock(ha,{key:3,ref_key:"ForgotPasswordComponent",ref:k},{forgotPasswordSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmResetPassword"?(r.openBlock(),r.createBlock(ga,{key:4,ref_key:"confirmResetPasswordComponent",ref:N},{confirmResetPasswordSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmSignIn"?(r.openBlock(),r.createBlock(da,{key:5,ref_key:"confirmSignInComponent",ref:T},{confirmSignInSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="setupTotp"?(r.openBlock(),r.createBlock(Gv,{key:6,ref_key:"confirmSetupTotpComponent",ref:I},{confirmSetupTotpI:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="forceNewPassword"?(r.openBlock(),r.createBlock(ma,{key:7,ref_key:"forceNewPasswordComponent",ref:A},{forceNewPasswordI:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-header")]),"force-new-password-form-fields":r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-form-fields")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="verifyUser"?(r.openBlock(),r.createBlock(ya,{key:8,ref_key:"verifyUserComponent",ref:R},{verifyUserSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmVerifyUser"?(r.openBlock(),r.createBlock(va,{key:9,ref_key:"confirmVerifyUserComponent",ref:L},{confirmVerifyUserSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="selectMfaType"?(r.openBlock(),r.createBlock(_a,{key:10,ref_key:"selectMfaTypeComponent",ref:K},{selectMfaTypeSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="setupEmail"?(r.openBlock(),r.createBlock(Sa,{key:11,ref_key:"setupEmailComponent",ref:Y},{setupEmailSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email-footer")]),_:3},512)):r.createCommentVNode("",!0)],8,Hv),r.renderSlot(U.$slots,"footer")])],16,jv)):r.createCommentVNode("",!0),r.unref(h)==="authenticated"?r.renderSlot(U.$slots,"default",{key:1,user:r.unref(P),state:r.unref(y),signOut:r.unref(v),send:r.unref(m)}):r.createCommentVNode("",!0)],64)}}}),ad=r.defineComponent({props:{info:{type:Object}},setup(t){return()=>t.info}}),sd=r.defineComponent({__name:"amplify-text-field",props:{label:{default:""},id:{default:""},autocomplete:{default:""},placeholder:{default:""},required:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},name:{default:""},type:{default:"text"},hideLabel:{type:Boolean,default:!0}},setup(t){const e=t,{label:n,id:o,autocomplete:i,placeholder:a,required:s,name:u,type:l}=r.toRefs(e);return(c,d)=>{const f=bt,p=Ct,m=re;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(f,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":t.hideLabel}]),for:r.unref(o)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},8,["class","for"]),r.createVNode(m,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(p,{class:"amplify-input amplify-field-group__control",id:r.unref(o),"aria-invalid":"false",autocomplete:r.unref(i),placeholder:r.unref(a),required:r.unref(s),name:r.unref(u),disabled:t.disabled,type:r.unref(l)},null,8,["id","autocomplete","placeholder","required","name","disabled","type"])]),_:1})],64)}}}),$v={class:"amplify-flex amplify-field amplify-checkboxfield"},Yv={class:"amplify-flex amplify-checkbox"},Jv={class:"amplify-visually-hidden"},Zv=["data-error","data-checked"],Qv=["data-checked"],Xv=r.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1),e_=[Xv],t_={class:"amplify-text amplify-checkbox__label"},r_={key:0,class:"amplify-text amplify-field__error-message"},ud=r.defineComponent({__name:"amplify-check-box",props:{errorMessage:{default:""}},setup(t){const e=t,n=r.ref(!1),o=r.ref(x("I agree with the Terms and Conditions")),{errorMessage:i}=r.toRefs(e);return(a,s)=>(r.openBlock(),r.createElementBlock("div",$v,[r.createElementVNode("label",Yv,[r.createElementVNode("span",Jv,[r.createElementVNode("input",{onClick:s[0]||(s[0]=u=>n.value=!n.value),class:"amplify-input amplify-field-group__control amplify-checkbox__input","aria-invalid":"false",type:"checkbox",name:"acknowledgement",value:"yes"})]),r.createElementVNode("span",{class:r.normalizeClass(["amplify-flex amplify-checkbox__button",{"amplify-checkbox__button--error":!n.value}]),"aria-hidden":"true","data-focus":"false","data-error":!n.value,"data-checked":n.value},[(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:r.normalizeClass(["amplify-icon amplify-checkbox__icon",{"amplify-checkbox__icon--checked":n.value}]),viewBox:"0 0 24 24",fill:"currentColor","data-checked":n.value},e_,10,Qv))],10,Zv),r.createElementVNode("span",t_,r.toDisplayString(o.value),1)]),n.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("p",r_,r.toDisplayString(r.unref(i)),1))]))}}),n_={install:t=>{t.component("SignIn",aa),t.component("SignUp",ua),t.component("FederatedSignIn",ar),t.component("Authenticator",id),t.component("RenderInfo",ad),t.component("PasswordControl",ia),t.component("ForceNewPassword",ma),t.component("ForgotPassword",ha),t.component("ConfirmResetPassword",ga),t.component("ConfirmSignUp",ca),t.component("ConfirmSignIn",da),t.component("VerifyUser",ya),t.component("ConfirmVerifyUser",va),t.component("SelectMfaType",_a),t.component("SetupEmail",Sa),t.component("AmplifyTextField",sd),t.component("AmplifyCheckBox",ud),t.component("AmplifyButton",oe),t.component("BaseFormField",ed),t.component("BaseFormFields",ge),t.component("AuthenticatorSignUpFormFields",sa),t.component("AuthenticatorForceNewPasswordFormFields",pa)}};exports.AmplifyButton=oe;exports.AmplifyCheckBox=ud;exports.AmplifyTextField=sd;exports.Authenticator=id;exports.AuthenticatorForceNewPasswordFormFields=pa;exports.AuthenticatorSignUpFormFields=sa;exports.ConfirmResetPassword=ga;exports.ConfirmSignIn=da;exports.ConfirmSignUp=ca;exports.ConfirmVerifyUser=va;exports.FederatedSignIn=ar;exports.ForceNewPassword=ma;exports.ForgotPassword=ha;exports.PasswordControl=ia;exports.RenderInfo=ad;exports.SelectMfaType=_a;exports.SetupEmail=Sa;exports.SignIn=aa;exports.SignUp=ua;exports.VerifyUser=ya;exports.default=n_;exports.translations=Uf;exports.useAuthenticator=ne;
|
|
26
|
+
`);const k=S(C,E,I),N=t.getSymbolSize(C),R=new o(N);return m(R,C),y(R),g(R,C),h(R,E,0),C>=7&&_(R,C),v(R,k),isNaN(T)&&(T=s.getBestMask(R,h.bind(null,R,E))),s.applyMask(T,R),h(R,E,T),{modules:R,version:C,errorCorrectionLevel:E,maskPattern:T,segments:I}}return Qo.create=function(C,E){if(typeof C>"u"||C==="")throw new Error("No input text");let T=e.M,I,A;return typeof E<"u"&&(T=e.from(E.errorCorrectionLevel,e.M),I=c.from(E.version),A=s.from(E.maskPattern),E.toSJISFunc&&t.setToSJISFunction(E.toSJISFunc)),P(C,I,T,A)},Qo}var vi={},_i={},Yl;function od(){return Yl||(Yl=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(a){return[a,a]}))),o.length===6&&o.push("F","F");const i=parseInt(o.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const i=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,a=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:a,scale:a?4:s,margin:i,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,i){return i.width&&i.width>=o+i.margin*2?i.width/(o+i.margin*2):i.scale},t.getImageWidth=function(o,i){const a=t.getScale(o,i);return Math.floor((o+i.margin*2)*a)},t.qrToImageData=function(o,i,a){const s=i.modules.size,u=i.modules.data,l=t.getScale(s,a),c=Math.floor((s+a.margin*2)*l),d=a.margin*l,f=[a.color.light,a.color.dark];for(let p=0;p<c;p++)for(let m=0;m<c;m++){let y=(p*c+m)*4,g=a.color.light;if(p>=d&&m>=d&&p<c-d&&m<c-d){const _=Math.floor((p-d)/l),h=Math.floor((m-d)/l);g=f[u[_*s+h]?1:0]}o[y++]=g.r,o[y++]=g.g,o[y++]=g.b,o[y]=g.a}}}(_i)),_i}var Jl;function Fv(){return Jl||(Jl=1,function(t){const e=od();function n(i,a,s){i.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(a,s,u){let l=u,c=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(c=o()),l=e.getOptions(l);const d=e.getImageWidth(a.modules.size,l),f=c.getContext("2d"),p=f.createImageData(d,d);return e.qrToImageData(p.data,a,l),n(f,c,d),f.putImageData(p,0,0),c},t.renderToDataURL=function(a,s,u){let l=u;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const c=t.render(a,s,l),d=l.type||"image/png",f=l.rendererOpts||{};return c.toDataURL(d,f.quality)}}(vi)),vi}var Si={},Zl;function Ov(){if(Zl)return Si;Zl=1;const t=od();function e(i,a){const s=i.a/255,u=a+'="'+i.hex+'"';return s<1?u+" "+a+'-opacity="'+s.toFixed(2).slice(1)+'"':u}function n(i,a,s){let u=i+a;return typeof s<"u"&&(u+=" "+s),u}function o(i,a,s){let u="",l=0,c=!1,d=0;for(let f=0;f<i.length;f++){const p=Math.floor(f%a),m=Math.floor(f/a);!p&&!c&&(c=!0),i[f]?(d++,f>0&&p>0&&i[f-1]||(u+=c?n("M",p+s,.5+m+s):n("m",l,0),l=0,c=!1),p+1<a&&i[f+1]||(u+=n("h",d),d=0)):l++}return u}return Si.render=function(a,s,u){const l=t.getOptions(s),c=a.modules.size,d=a.modules.data,f=c+l.margin*2,p=l.color.light.a?"<path "+e(l.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",m="<path "+e(l.color.dark,"stroke")+' d="'+o(d,c,l.margin)+'"/>',y='viewBox="0 0 '+f+" "+f+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+y+' shape-rendering="crispEdges">'+p+m+`</svg>
|
|
27
|
+
`;return typeof u=="function"&&u(null,_),_},Si}var Ql;function Dv(){if(Ql)return Ge;Ql=1;const t=gv(),e=Uv(),n=Fv(),o=Ov();function i(a,s,u,l,c){const d=[].slice.call(arguments,1),f=d.length,p=typeof d[f-1]=="function";if(!p&&!t())throw new Error("Callback required as last argument");if(p){if(f<2)throw new Error("Too few arguments provided");f===2?(c=u,u=s,s=l=void 0):f===3&&(s.getContext&&typeof c>"u"?(c=l,l=void 0):(c=l,l=u,u=s,s=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(u=s,s=l=void 0):f===2&&!s.getContext&&(l=u,u=s,s=void 0),new Promise(function(m,y){try{const g=e.create(u,l);m(a(g,s,l))}catch(g){y(g)}})}try{const m=e.create(u,l);c(null,a(m,s,l))}catch(m){c(m)}}return Ge.create=e.create,Ge.toCanvas=i.bind(null,n.render),Ge.toDataURL=i.bind(null,n.renderToDataURL),Ge.toString=i.bind(null,function(a,s,u){return o.render(a,u)}),Ge}var Bv=Dv();const Vv=qi(Bv),zv={key:0},qv=["src"],Lv={"data-amplify-copy-tooltip":""},Gv=r.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})],-1),jv=r.defineComponent({__name:"setup-totp",setup(t){const e=new Ni.ConsoleLogger("SetupTotp-logger"),n=ne(),{updateForm:o,submitForm:i,toSignIn:a,totpSecretCode:s,username:u,QRFields:l}=n,{error:c,isPending:d}=r.toRefs(n),{totpIssuer:f="AWSCognito",totpUsername:p=u}=l??{},m=Wd(f,p,s),y=r.reactive({qrCodeImageSource:"",isLoading:!0}),{getCopyText:g,getCopiedText:_,getBackToSignInText:h,getConfirmText:v}=ae,S=r.ref(g());function w(){s&&navigator.clipboard.writeText(s),S.value=_()}r.onMounted(async()=>{try{y.qrCodeImageSource=await Vv.toDataURL(m)}catch(I){e.error(I)}finally{y.isLoading=!1}});const P=r.computed(()=>h()),b=r.computed(()=>v()),C=I=>{const{name:A,value:k}=I.target;o({name:A,value:k})},E=I=>{i(ce(I))},T=()=>{a()};return(I,A)=>{const k=we,N=re,R=de,L=oe,K=ue,Y=fe,J=le;return r.renderSlot(I.$slots,"confirmSetupTotpI",r.normalizeProps(r.guardReactiveProps(I.$attrs)),()=>[r.createVNode(N,r.normalizeProps(r.guardReactiveProps(I.$attrs)),{default:r.withCtx(()=>[r.createVNode(J,{"data-amplify-authenticator-setup-totp":"",onInput:C,onSubmit:r.withModifiers(E,["prevent"])},{default:r.withCtx(()=>[r.createVNode(Y,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(d)},{default:r.withCtx(()=>[r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(I.$slots,"header",{},()=>[r.createVNode(k,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(" Setup TOTP ")]),_:1})]),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[y.isLoading?(r.openBlock(),r.createElementBlock("p",zv,"Loading...")):(r.openBlock(),r.createElementBlock("img",{key:1,class:"amplify-image","data-amplify-qrcode":"",src:y.qrCodeImageSource,alt:"qr code",width:"228",height:"228"},null,8,qv)),r.createVNode(N,{class:"amplify-flex","data-amplify-copy":""},{default:r.withCtx(()=>[r.createElementVNode("div",null,r.toDisplayString(r.unref(s)),1),r.createVNode(N,{"data-amplify-copy-svg":"",onClick:w},{default:r.withCtx(()=>[r.createElementVNode("div",Lv,r.toDisplayString(S.value),1),Gv]),_:1})]),_:1}),r.createVNode(ge,{route:"setupTotp"})]),_:1}),r.createVNode(K,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(c)?(r.openBlock(),r.createBlock(R,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(c))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(d)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(b)),1)]),_:1},8,["disabled"]),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(T,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(P)),1)]),_:1},8,["onClick"]),r.renderSlot(I.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),pa=r.defineComponent({__name:"authenticator-force-new-password-form-fields",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(ge,{route:"forceNewPassword"}))}}),ma=r.defineComponent({__name:"force-new-password",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateBlur:i,updateForm:a}=e,{error:s,isPending:u}=r.toRefs(e),{getChangePasswordText:l,getChangingText:c,getBackToSignInText:d}=ae,f=r.computed(()=>l()),p=r.computed(()=>c()),m=r.computed(()=>d()),y=()=>{o()},g=S=>{_(S)},_=S=>{n(ce(S))},h=S=>{const{name:w,value:P}=S.target;a({name:w,value:P})};function v(S){const{name:w}=S.target;i({name:w})}return(S,w)=>{const P=we,b=re,C=de,E=oe,T=ue,I=fe,A=le;return r.renderSlot(S.$slots,"forceNewPasswordI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-forcenewpassword":"",onInput:h,onBlurCapture:v,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(P,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"force-new-password-form-fields",{},()=>[r.createVNode(pa)])]),_:3}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(C,{key:0,"data-ui-error":""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)?r.unref(p)+"…":r.unref(f)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer",{onHaveAccountClicked:y,onForceNewPasswordSubmit:g})]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),ha=r.defineComponent({__name:"forgot-password",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s}=r.toRefs(e),{getBackToSignInText:u,getResetYourPasswordText:l,getSendCodeText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=_=>{n(ce(_))},y=_=>{const{name:h,value:v}=_.target;i({name:h,value:v})},g=()=>{o()};return(_,h)=>{const v=we,S=fe,w=de,P=oe,b=ue,C=re,E=le;return r.renderSlot(_.$slots,"forgotPasswordSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(E,r.mergeProps(_.$attrs,{"data-amplify-authenticator-forgotpassword":"",onInput:y,onSubmit:r.withModifiers(m,["prevent"])}),{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(v,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createVNode(ge,{route:"forgotPassword"})]),_:1},8,["disabled"]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer",{onBackToSignInClicked:g,onResetPasswordSubmit:m})]),_:3})]),_:3})]),_:3},16,["onSubmit"])])}}}),ga=r.defineComponent({__name:"confirm-reset-password",setup(t){const e=ne(),{resendCode:n,submitForm:o,updateBlur:i,updateForm:a}=e,{error:s,isPending:u}=r.toRefs(e),{getResendCodeText:l,getResetYourPasswordText:c,getSubmitText:d}=ae,f=r.computed(()=>l()),p=r.computed(()=>c()),m=r.computed(()=>d()),y=S=>{g(S)},g=S=>{o(ce(S))},_=()=>{n()},h=S=>{const{name:w,value:P}=S.target;a({name:w,value:P})};function v(S){const{name:w}=S.target;i({name:w})}return(S,w)=>{const P=we,b=re,C=de,E=oe,T=ue,I=fe,A=le;return r.renderSlot(S.$slots,"confirmResetPasswordSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-confirmResetpassword":"",onInput:h,onBlurCapture:v,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(S.$slots,"header",{},()=>[r.createVNode(P,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmResetPassword"})]),_:1}),r.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(C,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",variation:"primary",fullwidth:!1,type:"submit",disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!1,size:"small",type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(S.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),ya=r.defineComponent({__name:"verify-user",setup(t){const e=ne(),{isPending:n,unverifiedUserAttributes:o,error:i}=r.toRefs(e),{skipVerification:a,submitForm:s,updateForm:u}=e,{getAccountRecoveryInfoText:l,getSkipText:c,getVerifyText:d,getVerifyContactText:f}=ae,p=r.computed(()=>l()),m=r.computed(()=>c()),y=r.computed(()=>d()),g=r.computed(()=>f()),_=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{v(w)},v=w=>{s(ce(w))},S=()=>{a()};return(w,P)=>{const b=we,C=bt,E=la,T=Ct,I=re,A=de,k=oe,N=ue,R=fe,L=le;return r.renderSlot(w.$slots,"verifyUserSlotI",{},()=>[r.createVNode(I,null,{default:r.withCtx(()=>[r.createVNode(L,{onInput:_,onSubmit:r.withModifiers(h,["prevent"])},{default:r.withCtx(()=>[r.createVNode(R,{disabled:r.unref(n),class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(b,{class:"amplify-heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1})]),r.createVNode(I,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-visually-hidden amplify-label",id:"amplify-field-493c"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":"amplify-field-493c"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(K,Y,J)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:K},[K?(r.openBlock(),r.createBlock(C,{key:0,class:"amplify-flex amplify-radio","data-amplify-verify-label":""},{default:r.withCtx(()=>[r.createVNode(E,{class:"amplify-text amplify-radio__label"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(mt)[Y].label))+": "+r.toDisplayString(r.unref(Gd)(r.unref(mt)[Y].label,K)),1)]),_:2},1024),r.createVNode(T,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-verify-input":"",name:"unverifiedAttr",type:"radio",checked:J===0,value:Y},null,8,["checked","value"]),r.createVNode(E,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"})]),_:2},1024)):r.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(i))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(n)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)),1)]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(m)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3})])}}}),va=r.defineComponent({__name:"confirm-verify-user",setup(t){const e=ne(),{error:n,isPending:o}=r.toRefs(e),{skipVerification:i,submitForm:a,updateForm:s}=e,{getAccountRecoveryInfoText:u,getSkipText:l,getSubmitText:c}=ae,d=r.computed(()=>u()),f=r.computed(()=>l()),p=r.computed(()=>c()),m=h=>{const{name:v,value:S}=h.target;s({name:v,value:S})},y=h=>{g(h)},g=h=>{a(ce(h))},_=()=>{i()};return(h,v)=>{const S=we,w=re,P=de,b=oe,C=ue,E=fe,T=le;return r.renderSlot(h.$slots,"confirmVerifyUserSlotI",r.normalizeProps(r.guardReactiveProps(h.$attrs)),()=>[r.createVNode(w,r.normalizeProps(r.guardReactiveProps(h.$attrs)),{default:r.withCtx(()=>[r.createVNode(T,{onInput:m,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(o)},{default:r.withCtx(()=>[r.renderSlot(h.$slots,"header",{},()=>[r.createVNode(S,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})]),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"confirmVerifyUser"})]),_:1}),r.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(P,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(n))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(b,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"primary",type:"submit",disabled:r.unref(o)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(b,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(_,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(h.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),_a=r.defineComponent({__name:"select-mfa-type",setup(t){const e=Math.floor(Math.random()*999999),n=ne(),{submitForm:o,toSignIn:i,updateForm:a}=n,{error:s,isPending:u,challengeName:l,allowedMfaTypes:c}=r.toRefs(n),d=r.computed(()=>l.value),{getBackToSignInText:f,getConfirmText:p,getSelectMfaTypeByChallengeName:m,getMfaTypeLabelByValue:y,getSelectMfaTypeText:g}=ae,_=r.computed(()=>m(d.value)),h=r.computed(()=>f()),v=r.computed(()=>p()),S=r.computed(()=>g()),w=C=>{const{name:E,value:T}=C.target;a({name:E,value:T})},P=C=>{o(ce(C))},b=()=>{i()};return(C,E)=>{const T=we,I=bt,A=la,k=Ct,N=re,R=de,L=oe,K=ue,Y=fe,J=le;return r.renderSlot(C.$slots,"selectMfaTypeSlotI",r.normalizeProps(r.guardReactiveProps(C.$attrs)),()=>[r.createVNode(N,r.normalizeProps(r.guardReactiveProps(C.$attrs)),{default:r.withCtx(()=>[r.createVNode(J,{"data-amplify-authenticator-selectmfatype":"",onInput:w,onSubmit:r.withModifiers(P,["prevent"])},{default:r.withCtx(()=>[r.createVNode(Y,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(u)},{default:r.withCtx(()=>[r.renderSlot(C.$slots,"header",{},()=>[r.createVNode(T,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(_)),1)]),_:1})]),r.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(I,{class:"amplify-visually-hidden amplify-label",id:`amplify-field-${r.unref(e)}`},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(S)),1)]),_:1},8,["id"]),r.createVNode(N,{class:"amplify-flex amplify-field amplify-radiogroupfield amplify-authenticator__column","aria-labelledby":`amplify-field-${r.unref(e)}`},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),(Z,ye)=>(r.openBlock(),r.createBlock(I,{key:Z,class:"amplify-flex amplify-radio","data-amplify-selectmfatype-label":""},{default:r.withCtx(()=>[r.createVNode(A,{class:"amplify-text amplify-radio__label"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(y)(Z)),1)]),_:2},1024),r.createVNode(k,{class:"amplify-input amplify-field-group__control amplify-visually-hidden amplify-radio__input","aria-invalid":"false","data-amplify-selectmfatype-input":"",name:"mfa_type",type:"radio",value:Z,checked:ye===0},null,8,["value","checked"]),r.createVNode(A,{class:"amplify-flex amplify-radio__button","aria-hidden":"true"})]),_:2},1024))),128))]),_:1},8,["aria-labelledby"])]),_:1}),r.createVNode(K,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(s)?(r.openBlock(),r.createBlock(R,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(s))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(u)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1},8,["disabled"]),r.createVNode(L,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(b,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["onClick"]),r.renderSlot(C.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Sa=r.defineComponent({__name:"setup-email",setup(t){const e=ne(),{submitForm:n,toSignIn:o,updateForm:i}=e,{error:a,isPending:s}=r.toRefs(e),{getBackToSignInText:u,getConfirmText:l,getSetupEmailText:c}=ae,d=r.computed(()=>c()),f=r.computed(()=>u()),p=r.computed(()=>l()),m=_=>{const{name:h,value:v}=_.target;i({name:h,value:v})},y=_=>{n(ce(_))},g=()=>{o()};return(_,h)=>{const v=we,S=re,w=de,P=oe,b=ue,C=fe,E=le;return r.renderSlot(_.$slots,"setupEmailSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(S,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode(E,{"data-amplify-authenticator-setupemail":"",onInput:m,onSubmit:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createVNode(C,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(v,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})]),r.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ge,{route:"setupEmail"})]),_:1}),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(x)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["disabled"]),r.createVNode(P,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Wv=["data-variation"],Hv={"data-amplify-container":""},Kv=["data-amplify-router-content"],$v={key:1,"data-amplify-router-content":""},id=r.defineComponent({__name:"authenticator",props:{hideSignUp:{type:Boolean},initialState:null,loginMechanisms:null,services:null,signUpAttributes:null,variation:{default:"default"},socialProviders:null,formFields:null},setup(t){const e=t,{initialState:n,loginMechanisms:o,variation:i,services:a,signUpAttributes:s,socialProviders:u,hideSignUp:l,formFields:c}=r.toRefs(e);let d;const f=r.ref(!1),{service:p,send:m,state:y}=oa(),g=p.subscribe(U=>{U.matches("setup")&&!f.value&&(m({type:"INIT",data:{initialState:n.value,loginMechanisms:o.value,socialProviders:u.value,signUpAttributes:s.value,services:a.value,formFields:c.value}}),f.value=!0)}).unsubscribe,_=ne(),{route:h,signOut:v,toSignIn:S,toSignUp:w,user:P}=r.toRefs(_);r.onMounted(()=>{d=Ey({componentName:"Authenticator",packageName:"vue",version:pv})}),r.onUnmounted(()=>{d(),g()});const b=r.ref(),C=r.ref(),E=r.ref(),T=r.ref(),I=r.ref(),A=r.ref(),k=r.ref(),N=r.ref(),R=r.ref(),L=r.ref(),K=r.ref(),Y=r.ref(),{getSignInTabText:J,getSignUpTabText:Z}=ae,ye=r.computed(()=>J()),X=r.computed(()=>Z()),Pe=r.computed(()=>h.value==="signIn"||h.value==="signUp"),xe=r.computed(()=>["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"].includes(h.value));return(U,pe)=>{const Ze=fv,me=cv;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(xe)?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},U.$attrs,{"data-amplify-authenticator":"","data-variation":r.unref(i)}),[r.createElementVNode("div",Hv,[r.renderSlot(U.$slots,"header"),r.createElementVNode("div",{"data-amplify-router":"","data-amplify-router-content":r.unref(Pe)?void 0:""},[r.unref(Pe)&&!r.unref(l)?(r.openBlock(),r.createBlock(me,{key:0},{default:r.withCtx(()=>[r.createVNode(Ze,{active:r.unref(h)==="signIn",id:"signIn",label:r.unref(ye),onClick:r.unref(S)},null,8,["active","label","onClick"]),r.createVNode(Ze,{active:r.unref(h)==="signUp",id:"signUp",label:r.unref(X),onClick:r.unref(w)},null,8,["active","label","onClick"])]),_:1})):r.createCommentVNode("",!0),r.unref(Pe)?(r.openBlock(),r.createElementBlock("div",$v,[r.unref(h)==="signIn"?(r.openBlock(),r.createBlock(aa,{key:0,id:"signIn-panel",role:"tabpanel",class:"amplify-tabs__panel amplify-tabs__panel--active","aria-labelledby":"signIn-tab",ref_key:"signInComponent",ref:b},{signInSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in")]),form:r.withCtx(({info:se,onSignInSubmit:ke,onForgotPasswordClicked:Qe,onInput:ld})=>[r.renderSlot(U.$slots,"sign-in-form",{info:se,onInput:ld,onSignInSubmit:ke,onForgotPasswordClicked:Qe})]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-in-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="signUp"&&!r.unref(l)?(r.openBlock(),r.createBlock(ua,{key:1,id:"signUp-panel",class:"amplify-tabs__panel amplify-tabs__panel--active",role:"tabpanel","aria-labelledby":"signUp-tab",ref_key:"signUpComponent",ref:C},{signUpSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up-header")]),"signup-fields":r.withCtx(({info:se})=>[r.renderSlot(U.$slots,"sign-up-fields",{info:se})]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"sign-up-footer")]),_:3},512)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.unref(h)==="confirmSignUp"?(r.openBlock(),r.createBlock(ca,{key:2,ref_key:"confirmSignUpComponent",ref:E},{confirmSignUpSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-up-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="forgotPassword"?(r.openBlock(),r.createBlock(ha,{key:3,ref_key:"ForgotPasswordComponent",ref:k},{forgotPasswordSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"forgot-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmResetPassword"?(r.openBlock(),r.createBlock(ga,{key:4,ref_key:"confirmResetPasswordComponent",ref:N},{confirmResetPasswordSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-reset-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmSignIn"?(r.openBlock(),r.createBlock(da,{key:5,ref_key:"confirmSignInComponent",ref:T},{confirmSignInSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-sign-in-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="setupTotp"?(r.openBlock(),r.createBlock(jv,{key:6,ref_key:"confirmSetupTotpComponent",ref:I},{confirmSetupTotpI:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-totp-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="forceNewPassword"?(r.openBlock(),r.createBlock(ma,{key:7,ref_key:"forceNewPasswordComponent",ref:A},{forceNewPasswordI:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-header")]),"force-new-password-form-fields":r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-form-fields")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"force-new-password-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="verifyUser"?(r.openBlock(),r.createBlock(ya,{key:8,ref_key:"verifyUserComponent",ref:R},{verifyUserSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"verify-user-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="confirmVerifyUser"?(r.openBlock(),r.createBlock(va,{key:9,ref_key:"confirmVerifyUserComponent",ref:L},{confirmVerifyUserSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"confirm-verify-user-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="selectMfaType"?(r.openBlock(),r.createBlock(_a,{key:10,ref_key:"selectMfaTypeComponent",ref:K},{selectMfaTypeSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"select-mfa-type-footer")]),_:3},512)):r.createCommentVNode("",!0),r.unref(h)==="setupEmail"?(r.openBlock(),r.createBlock(Sa,{key:11,ref_key:"setupEmailComponent",ref:Y},{setupEmailSlotI:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email")]),header:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email-header")]),footer:r.withCtx(()=>[r.renderSlot(U.$slots,"setup-email-footer")]),_:3},512)):r.createCommentVNode("",!0)],8,Kv),r.renderSlot(U.$slots,"footer")])],16,Wv)):r.createCommentVNode("",!0),r.unref(h)==="authenticated"?r.renderSlot(U.$slots,"default",{key:1,user:r.unref(P),state:r.unref(y),signOut:r.unref(v),send:r.unref(m)}):r.createCommentVNode("",!0)],64)}}}),ad=r.defineComponent({props:{info:{type:Object}},setup(t){return()=>t.info}}),sd=r.defineComponent({__name:"amplify-text-field",props:{label:{default:""},id:{default:""},autocomplete:{default:""},placeholder:{default:""},required:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},name:{default:""},type:{default:"text"},hideLabel:{type:Boolean,default:!0}},setup(t){const e=t,{label:n,id:o,autocomplete:i,placeholder:a,required:s,name:u,type:l}=r.toRefs(e);return(c,d)=>{const f=bt,p=Ct,m=re;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(f,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":t.hideLabel}]),for:r.unref(o)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},8,["class","for"]),r.createVNode(m,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(p,{class:"amplify-input amplify-field-group__control",id:r.unref(o),"aria-invalid":"false",autocomplete:r.unref(i),placeholder:r.unref(a),required:r.unref(s),name:r.unref(u),disabled:t.disabled,type:r.unref(l)},null,8,["id","autocomplete","placeholder","required","name","disabled","type"])]),_:1})],64)}}}),Yv={class:"amplify-flex amplify-field amplify-checkboxfield"},Jv={class:"amplify-flex amplify-checkbox"},Zv={class:"amplify-visually-hidden"},Qv=["data-error","data-checked"],Xv=["data-checked"],e_=r.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1),t_=[e_],r_={class:"amplify-text amplify-checkbox__label"},n_={key:0,class:"amplify-text amplify-field__error-message"},ud=r.defineComponent({__name:"amplify-check-box",props:{errorMessage:{default:""}},setup(t){const e=t,n=r.ref(!1),o=r.ref(x("I agree with the Terms and Conditions")),{errorMessage:i}=r.toRefs(e);return(a,s)=>(r.openBlock(),r.createElementBlock("div",Yv,[r.createElementVNode("label",Jv,[r.createElementVNode("span",Zv,[r.createElementVNode("input",{onClick:s[0]||(s[0]=u=>n.value=!n.value),class:"amplify-input amplify-field-group__control amplify-checkbox__input","aria-invalid":"false",type:"checkbox",name:"acknowledgement",value:"yes"})]),r.createElementVNode("span",{class:r.normalizeClass(["amplify-flex amplify-checkbox__button",{"amplify-checkbox__button--error":!n.value}]),"aria-hidden":"true","data-focus":"false","data-error":!n.value,"data-checked":n.value},[(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:r.normalizeClass(["amplify-icon amplify-checkbox__icon",{"amplify-checkbox__icon--checked":n.value}]),viewBox:"0 0 24 24",fill:"currentColor","data-checked":n.value},t_,10,Xv))],10,Qv),r.createElementVNode("span",r_,r.toDisplayString(o.value),1)]),n.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("p",n_,r.toDisplayString(r.unref(i)),1))]))}}),o_={install:t=>{t.component("SignIn",aa),t.component("SignUp",ua),t.component("FederatedSignIn",ar),t.component("Authenticator",id),t.component("RenderInfo",ad),t.component("PasswordControl",ia),t.component("ForceNewPassword",ma),t.component("ForgotPassword",ha),t.component("ConfirmResetPassword",ga),t.component("ConfirmSignUp",ca),t.component("ConfirmSignIn",da),t.component("VerifyUser",ya),t.component("ConfirmVerifyUser",va),t.component("SelectMfaType",_a),t.component("SetupEmail",Sa),t.component("AmplifyTextField",sd),t.component("AmplifyCheckBox",ud),t.component("AmplifyButton",oe),t.component("BaseFormField",ed),t.component("BaseFormFields",ge),t.component("AuthenticatorSignUpFormFields",sa),t.component("AuthenticatorForceNewPasswordFormFields",pa)}};exports.AmplifyButton=oe;exports.AmplifyCheckBox=ud;exports.AmplifyTextField=sd;exports.Authenticator=id;exports.AuthenticatorForceNewPasswordFormFields=pa;exports.AuthenticatorSignUpFormFields=sa;exports.ConfirmResetPassword=ga;exports.ConfirmSignIn=da;exports.ConfirmSignUp=ca;exports.ConfirmVerifyUser=va;exports.FederatedSignIn=ar;exports.ForceNewPassword=ma;exports.ForgotPassword=ha;exports.PasswordControl=ia;exports.RenderInfo=ad;exports.SelectMfaType=_a;exports.SetupEmail=Sa;exports.SignIn=aa;exports.SignUp=ua;exports.VerifyUser=ya;exports.default=o_;exports.translations=Uf;exports.useAuthenticator=ne;
|