@aws-amplify/ui-vue 4.3.8 → 4.4.0
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ Event: `).concat(JSON.stringify(f.data))),o.state;if(o.status!==Y.Running&&!o.op
|
|
|
17
17
|
Event: `).concat(JSON.stringify(f.data)));return o.scheduler.schedule(function(){o.forward(f);var p=o._nextState(f);o.update(p,f)}),o._state},this.sendTo=function(d,m,f){var p=o.parent&&(m===Pe.Parent||o.parent.id===m),g=p?o.parent:B(m)?m===Pe.Internal?o:o.children.get(m)||it.get(m):jl(m)?m:void 0;if(!g){if(!p)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(o.id,"'."));W||q(!1,"Service '".concat(o.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in g){if(o.status!==Y.Stopped||o.parent!==g||o.state.done){var y=b(b({},d),{name:d.name===dr?"".concat(Le(o.id)):d.name,origin:o.sessionId});!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([g,y]):g.send(y)}}else!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([g,d.data]):g.send(d.data)},this._exec=function(d,m,f,p){p===void 0&&(p=o.machine.options.actions);var g=d.exec||Zt(d.type,p),y=V(g)?g:g?g.exec:d.exec;if(y)try{return y(m,f.data,o.machine.config.predictableActionArguments?{action:d,_event:f}:{action:d,state:o.state,_event:f})}catch(H){throw o.parent&&o.parent.send({type:"xstate.error",data:H}),H}switch(d.type){case Ye:{var w=d;o.defer(w);break}case bt:var h=d;if(typeof h.delay=="number"){o.defer(h);return}else h.to?o.sendTo(h._event,h.to,f===Ue):o.send(h._event);break;case ur:o.cancel(d.sendId);break;case Kt:{if(o.status!==Y.Running)return;var S=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[S.id||S.type])break;if(S.type===z.Invoke){var v=yi(S.src),_=o.machine.options.services?o.machine.options.services[v.type]:void 0,C=S.id,E=S.data;W||q(!("forward"in S),"`forward` property is deprecated (found in invocation of '".concat(S.src,"' in in machine '").concat(o.machine.id,"'). ")+"Please use `autoForward` instead.");var A="autoForward"in S?S.autoForward:!!S.forward;if(!_){W||q(!1,"No service found for invocation '".concat(S.src,"' in machine '").concat(o.machine.id,"'."));return}var T=E?Jt(E,m,f):void 0;if(typeof _=="string")return;var P=V(_)?_(m,f.data,{data:T,src:v,meta:S.meta}):_;if(!P)return;var k=void 0;be(P)&&(P=T?P.withContext(T):P,k={autoForward:A}),o.spawn(P,C,k)}else o.spawnActivity(S);break}case cn:{o.stopChild(d.activity.id);break}case dn:var N=d,U=N.label,F=N.value;U?o.logger(U,F):o.logger(F);break;default:W||q(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var i=b(b({},e.defaultOptions),r),a=i.clock,s=i.logger,l=i.parent,c=i.id,u=c!==void 0?c:t.id;this.id=u,this.logger=s,this.clock=a,this.parent=l,this.options=i,this.scheduler=new co({deferEvents:this.options.deferEvents}),this.sessionId=it.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Ve(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return W||q(this.status!==Y.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var o,i;try{for(var a=D(t.actions),s=a.next();!s.done;s=a.next()){var l=s.value;this.exec(l,t,r)}}catch(c){o={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},e.prototype.update=function(t,r){var o,i,a,s,l,c,u,d,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Ue)&&this.options.execute)this.execute(this.state);else for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);if(this.children.forEach(function(P){m.state.children[P.id]=P}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var p=D(this.eventListeners),g=p.next();!g.done;g=p.next()){var y=g.value;y(t.event)}}catch(P){o={error:P}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var w=D(this.listeners),h=w.next();!h.done;h=w.next()){var y=h.value;y(t,t.event)}}catch(P){a={error:P}}finally{try{h&&!h.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}try{for(var S=D(this.contextListeners),v=S.next();!v.done;v=S.next()){var _=v.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){l={error:P}}finally{try{v&&!v.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}if(this.state.done){var C=t.configuration.find(function(P){return P.type==="final"&&P.parent===m.machine}),E=C&&C.doneData?Jt(C.doneData,t.context,r):void 0;this._doneEvent=gt(this.id,E);try{for(var A=D(this.doneListeners),T=A.next();!T.done;T=A.next()){var y=T.value;y(this._doneEvent)}}catch(P){u={error:P}}finally{try{T&&!T.done&&(d=A.return)&&d.call(A)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),it.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Y.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,o){var i=this,a=jt(t,r,o);this.listeners.add(a.next),this.status!==Y.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===Y.Stopped?a.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(a.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Y.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===Y.Running)return this;this.machine._init(),it.register(this.sessionId,this),this.initialized=!0,this.status=Y.Running;var o=t===void 0?this.initialState:Ve(this,function(){return dc(t)?r.machine.resolveState(t):r.machine.resolveState(he.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(o,Ue)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){V(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,o,i,a,s,l,c,u,d;try{for(var m=D(this.listeners),f=m.next();!f.done;f=m.next()){var p=f.value;this.listeners.delete(p)}}catch(A){t={error:A}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}try{for(var g=D(this.stopListeners),y=g.next();!y.done;y=g.next()){var p=y.value;p(),this.stopListeners.delete(p)}}catch(A){o={error:A}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=D(this.contextListeners),h=w.next();!h.done;h=w.next()){var p=h.value;this.contextListeners.delete(p)}}catch(A){a={error:A}}finally{try{h&&!h.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}try{for(var S=D(this.doneListeners),v=S.next();!v.done;v=S.next()){var p=v.value;this.doneListeners.delete(p)}}catch(A){l={error:A}}finally{try{v&&!v.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Y.Stopped,this._initialState=void 0;try{for(var _=D(Object.keys(this.delayedEventsMap)),C=_.next();!C.done;C=_.next()){var E=C.value;this.clock.clearTimeout(this.delayedEventsMap[E])}}catch(A){u={error:A}}finally{try{C&&!C.done&&(d=_.return)&&d.call(_)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new co({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var o=Q({type:"xstate.stop"}),i=Ve(t,function(){var a=j(L([],$(t.state.configuration),!1).sort(function(d,m){return m.order-d.order}).map(function(d){return we(d.onExit,t.machine.options.actions)})),s=$(St(t.machine,t.state,t.state.context,o,[{type:"exit",actions:a}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),l=s[0],c=s[1],u=new he({value:t.state.value,context:c,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:l.filter(function(d){return!Hn(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(i,o),t._stopChildren(),it.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===Y.NotStarted&&this.options.deferEvents)W||q(!1,"".concat(t.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!==Y.Running)throw new Error("".concat(t.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(t.length){var o=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,a,s=r.state,l=!1,c=[],u=function(p){var g=Q(p);r.forward(g),s=Ve(r,function(){return r.machine.transition(s,g,void 0,o||void 0)}),c.push.apply(c,L([],$(r.machine.config.predictableActionArguments?s.actions:s.actions.map(function(y){return fc(y,s)})),!1)),l=l||!!s.changed};try{for(var d=D(t),m=d.next();!m.done;m=d.next()){var f=m.value;u(f)}}catch(p){i={error:p}}finally{try{m&&!m.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}s.changed=l,s.actions=c,r.update(s,Q(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var o=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var i=Q(t);if(i.name.indexOf(Gn)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Gn)===0}))throw i.data.data;var a=Ve(this,function(){return o.machine.transition(o.state,i,void 0,r||void 0)});return a},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,o;try{for(var i=D(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,l=this.children.get(s);if(!l)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));l.send(t)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,o=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=o)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,o){o===void 0&&(o=this.machine.options.actions),this._exec(t,r.context,r._event,o)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),V(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,o){if(this.status!==Y.Running)return mr(t,r);if(ao(t))return this.spawnPromise(Promise.resolve(t),r);if(V(t))return this.spawnCallback(t,r);if(ac(t))return this.spawnActor(t,r);if(Gl(t))return this.spawnObservable(t,r);if(be(t))return this.spawnMachine(t,b(b({},o),{id:r}));if(Vl(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var o=this;r===void 0&&(r={});var i=new e(t,b(b({},this.options),{parent:this,id:r.id||t.id})),a=b(b({},Yn),r);a.sync&&i.onTransition(function(l){o.send(fn,{state:l,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(l){o.removeChild(i.id),o.send(Q(l,{origin:i.id}))}).start(),s},e.prototype.spawnBehavior=function(t,r){var o=yc(t,{id:r,parent:this});return this.children.set(r,o),o},e.prototype.spawnPromise=function(t,r){var o,i=this,a=!1,s;t.then(function(c){a||(s=c,i.removeChild(r),i.send(Q(gt(r,c),{origin:r})))},function(c){if(!a){i.removeChild(r);var u=Le(r,c);try{i.send(Q(u,{origin:r}))}catch(d){Kl(c,d,r),i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var l=(o={id:r,send:function(){},subscribe:function(c,u,d){var m=jt(c,u,d),f=!1;return t.then(function(p){f||(m.next(p),!f&&m.complete())},function(p){f||m.error(p)}),{unsubscribe:function(){return f=!0}}},stop:function(){a=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return s}},o[Te]=function(){return this},o);return this.children.set(r,l),l},e.prototype.spawnCallback=function(t,r){var o,i=this,a=!1,s=new Set,l=new Set,c,u=function(f){c=f,l.forEach(function(p){return p(f)}),!a&&i.send(Q(f,{origin:r}))},d;try{d=t(u,function(f){s.add(f)})}catch(f){this.send(Le(r,f))}if(ao(d))return this.spawnPromise(d,r);var m=(o={id:r,send:function(f){return s.forEach(function(p){return p(f)})},subscribe:function(f){var p=jt(f);return l.add(p.next),{unsubscribe:function(){l.delete(p.next)}}},stop:function(){a=!0,V(d)&&d()},toJSON:function(){return{id:r}},getSnapshot:function(){return c}},o[Te]=function(){return this},o);return this.children.set(r,m),m},e.prototype.spawnObservable=function(t,r){var o,i=this,a,s=t.subscribe(function(c){a=c,i.send(Q(c,{origin:r}))},function(c){i.removeChild(r),i.send(Q(Le(r,c),{origin:r}))},function(){i.removeChild(r),i.send(Q(gt(r),{origin:r}))}),l=(o={id:r,send:function(){},subscribe:function(c,u,d){return t.subscribe(c,u,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:r}}},o[Te]=function(){return this},o);return this.children.set(r,l),l},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){W||q(!1,"No implementation found for activity '".concat(t.type,"'"));return}var o=r(this.state.context,t);this.spawnEffect(t.id,o)},e.prototype.spawnEffect=function(t,r){var o;this.children.set(t,(o={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},o[Te]=function(){return this},o))},e.prototype.attachDev=function(){var t=gr();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(b(b({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},r),{features:b({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}hc(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Te]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Y.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Ri,e}(),Sc=function(e){return B(e)?b(b({},Yn),{name:e}):b(b(b({},Yn),{name:Wl()}),e)};function at(e,t){var r=Sc(t);return rc(function(o){if(!W){var i=be(e)||V(e);q(!!o||i,'Attempted to spawn an Actor (ID: "'.concat(be(e)?e.id:"undefined",'") outside of a service. This will have no effect.'))}return o?o.spawn(e,r.name,r):mr(e,r.name)})}function Ri(e,t){var r=new vc(e,t);return r}function _c(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Ut(e){return b(b({type:Yt},e),{toJSON:function(){e.onDone,e.onError;var t=cr(e,["onDone","onError"]);return b(b({},t),{type:Yt,src:_c(e.src)})}})}var ze="",qn="#",st="*",$e={},Be=function(e){return e[0]===qn},wc=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Cc=function(e,t,r){var o=r.slice(0,-1).some(function(a){return!("cond"in a)&&!("in"in a)&&(B(a.target)||be(a.target))}),i=t===ze?"the transient event":"event '".concat(t,"'");q(!o,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},bc=function(){function e(t,r,o,i){o===void 0&&(o="context"in t?t.context:void 0);var a=this,s;this.config=t,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(wc(),r),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:di),this.id=this.config.id||L([this.machine.key],$(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,W||q(!("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?ut(this.config.states,function(u,d){var m,f=new e(u,{},void 0,{parent:a,key:d});return Object.assign(a.idMap,b((m={},m[f.id]=f,m),f.idMap)),f}):$e;var l=0;function c(u){var d,m;u.order=l++;try{for(var f=D(xi(u)),p=f.next();!p.done;p=f.next()){var g=p.value;c(g)}}catch(y){d={error:y}}finally{try{p&&!p.done&&(m=f.return)&&m.call(f)}finally{if(d)throw d.error}}}c(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(u){var d=u.event;return d===ze}):ze in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=me(this.config.entry||this.config.onEntry).map(function(u){return Ge(u)}),this.onExit=me(this.config.exit||this.config.onExit).map(function(u){return Ge(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=me(this.config.invoke).map(function(u,d){var m,f;if(be(u)){var p=xt(a.id,d);return a.machine.options.services=b((m={},m[p]=u,m),a.machine.options.services),Ut({src:p,id:p})}else if(B(u.src)){var p=u.id||xt(a.id,d);return Ut(b(b({},u),{id:p,src:u.src}))}else if(be(u.src)||V(u.src)){var p=u.id||xt(a.id,d);return a.machine.options.services=b((f={},f[p]=u.src,f),a.machine.options.services),Ut(b(b({id:p},u),{src:p}))}else{var g=u.src;return Ut(b(b({id:xt(a.id,d)},u),{src:g}))}}),this.activities=me(this.config.activities).concat(this.invoke).map(function(u){return mn(u)}),this.transition=this.transition.bind(this),this.tags=me(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Ui(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var o=this.options,i=o.actions,a=o.activities,s=o.guards,l=o.services,c=o.delays;return new e(this.config,{actions:b(b({},i),t.actions),activities:b(b({},a),t.activities),guards:b(b({},s),t.guards),services:b(b({},l),t.services),delays:b(b({},c),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return V(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.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:ut(this.states,function(t){return t.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}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,o){return r[o.eventType]=r[o.eventType]||[],r[o.eventType].push(o),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===ze,o=this.transitions.filter(function(i){var a=i.eventType===t;return r?a:a||i.eventType===st});return this.__cache.candidates[t]=o,o},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var o=function(a,s){var l=V(a)?"".concat(t.id,":delay[").concat(s,"]"):a,c=Pi(l,t.id);return t.onEntry.push(Je(c,{delay:a})),t.onExit.push(bi(c)),c},i=qe(r)?r.map(function(a,s){var l=o(a.delay,s);return b(b({},a),{event:l})}):j(Object.keys(r).map(function(a,s){var l=r[a],c=B(l)?{target:l}:l,u=isNaN(+a)?a:+a,d=o(u,s);return me(c).map(function(m){return b(b({},m),{event:d,delay:u})})}));return i.map(function(a){var s=a.delay;return b(b({},t.formatTransition(a)),{delay:s})})},e.prototype.getStateNodes=function(t){var r,o=this;if(!t)return[];var i=t instanceof he?t.value:mt(t,this.delimiter);if(B(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((r={},r[i]=a,r)):[this,this.states[i]]}var s=Object.keys(i),l=[this];return l.push.apply(l,L([],$(j(s.map(function(c){return o.getStateNode(c).getStateNodes(i[c])}))),!1)),l},e.prototype.handles=function(t){var r=fi(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof he?t:he.create(t),o=Array.from(ft([],this.getStateNodes(r.value)));return new he(b(b({},r),{value:this.resolve(r.value),configuration:o,done:Wt(o,this),tags:lo(o),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,o){var i=this.getStateNode(t),a=i.next(r,o);return!a||!a.transitions.length?this.next(r,o):a},e.prototype.transitionCompoundNode=function(t,r,o){var i=Object.keys(t),a=this.getStateNode(i[0]),s=a._transition(t[i[0]],r,o);return!s||!s.transitions.length?this.next(r,o):s},e.prototype.transitionParallelNode=function(t,r,o){var i,a,s={};try{for(var l=D(Object.keys(t)),c=l.next();!c.done;c=l.next()){var u=c.value,d=t[u];if(d){var m=this.getStateNode(u),f=m._transition(d,r,o);f&&(s[u]=f)}}}catch(h){i={error:h}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}var p=Object.keys(s).map(function(h){return s[h]}),g=j(p.map(function(h){return h.transitions})),y=p.some(function(h){return h.transitions.length>0});if(!y)return this.next(r,o);var w=j(Object.keys(s).map(function(h){return s[h].configuration}));return{transitions:g,exitSet:j(p.map(function(h){return h.exitSet})),configuration:w,source:r,actions:j(Object.keys(s).map(function(h){return s[h].actions}))}},e.prototype._transition=function(t,r,o){return B(t)?this.transitionLeafNode(t,r,o):Object.keys(t).length===1?this.transitionCompoundNode(t,r,o):this.transitionParallelNode(t,r,o)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Q(r))},e.prototype.next=function(t,r){var o,i,a=this,s=r.name,l=[],c=[],u;try{for(var d=D(this.getCandidates(s)),m=d.next();!m.done;m=d.next()){var f=m.value,p=f.cond,g=f.in,y=t.context,w=g?B(g)&&Be(g)?t.matches(mt(this.getStateNodeById(g).path,this.delimiter)):fr(mt(g,this.delimiter),Dl(this.path.slice(0,-2))(t.value)):!0,h=!1;try{h=!p||hi(this.machine,p,y,r,t)}catch(_){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
19
19
|
`).concat(_.message))}if(h&&w){f.target!==void 0&&(c=f.target),l.push.apply(l,L([],$(f.actions),!1)),u=f;break}}}catch(_){o={error:_}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:l};var S=j(c.map(function(_){return a.getRelativeStateNodes(_,t.historyValue)})),v=!!u.internal;return{transitions:[u],exitSet:v?[]:j(c.map(function(_){return a.getPotentiallyReenteringNodes(_)})),configuration:S,source:t,actions:l}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],o=this,i=t;o&&o!==i;)r.push(o),o=o.parent;return o!==i?[]:(r.push(i),r)},e.prototype.getActions=function(t,r,o,i,a,s,l){var c,u,d,m,f=this,p=s?ft([],this.getStateNodes(s.value)):[],g=new Set;try{for(var y=D(Array.from(t).sort(function(N,U){return N.order-U.order})),w=y.next();!w.done;w=y.next()){var h=w.value;(!pt(p,h)||pt(o.exitSet,h)||h.parent&&g.has(h.parent))&&g.add(h)}}catch(N){c={error:N}}finally{try{w&&!w.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var S=D(p),v=S.next();!v.done;v=S.next()){var h=v.value;(!pt(t,h)||pt(o.exitSet,h.parent))&&o.exitSet.push(h)}}catch(N){d={error:N}}finally{try{v&&!v.done&&(m=S.return)&&m.call(S)}finally{if(d)throw d.error}}o.exitSet.sort(function(N,U){return U.order-N.order});var _=Array.from(g).sort(function(N,U){return N.order-U.order}),C=new Set(o.exitSet),E=j(_.map(function(N){var U=[];if(N.type!=="final")return U;var F=N.parent;if(!F.parent)return U;U.push(dt(N.id,N.doneData),dt(F.id,N.doneData?Jt(N.doneData,i,a):void 0));var H=F.parent;return H.type==="parallel"&&_t(H).every(function(re){return Wt(o.configuration,re)})&&U.push(dt(H.id)),U})),A=_.map(function(N){var U=N.onEntry,F=N.activities.map(function(H){return Ai(H)});return{type:"entry",actions:we(l?L(L([],$(U),!1),$(F),!1):L(L([],$(F),!1),$(U),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:E.map(function(N){return vi(N)})}),T=Array.from(C).map(function(N){return{type:"exit",actions:we(L(L([],$(N.onExit),!1),$(N.activities.map(function(U){return Ei(U)})),!1),f.machine.options.actions)}}),P=T.concat({type:"transition",actions:we(o.actions,this.machine.options.actions)}).concat(A);if(r){var k=we(j(L([],$(t),!1).sort(function(N,U){return U.order-N.order}).map(function(N){return N.onExit})),this.machine.options.actions).filter(function(N){return!Hn(N)});return P.concat({type:"stop",actions:k})}return P},e.prototype.transition=function(t,r,o,i){t===void 0&&(t=this.initialState);var a=Q(r),s;if(t instanceof he)s=o===void 0?t:this.resolveState(he.from(t,o));else{var l=B(t)?this.resolve(qt(this.getResolvedPath(t))):this.resolve(t),c=o??this.machine.context;s=this.resolveState(he.from(l,c))}if(!W&&a.name===st)throw new Error("An event cannot have the wildcard type ('".concat(st,"')"));if(this.strict&&!this.events.includes(a.name)&&!Bl(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var u=this._transition(s.value,s,a)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},d=ft([],this.getStateNodes(s.value)),m=u.configuration.length?ft(d,u.configuration):d;return u.configuration=L([],$(m),!1),this.resolveTransition(u,s,s.context,i,a)},e.prototype.resolveRaisedTransition=function(t,r,o,i){var a,s=t.actions;return t=this.transition(t,r,void 0,i),t._event=o,t.event=o.data,(a=t.actions).unshift.apply(a,L([],$(s),!1)),t},e.prototype.resolveTransition=function(t,r,o,i,a){var s,l,c,u,d=this;a===void 0&&(a=Ue);var m=t.configuration,f=!r||t.transitions.length>0,p=f?t.configuration:r?r.configuration:[],g=Wt(p,this),y=f?lc(this.machine,m):void 0,w=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,h=this.getActions(new Set(p),g,t,o,a,r,i),S=r?b({},r.activities):{};try{for(var v=D(h),_=v.next();!_.done;_=v.next()){var C=_.value;try{for(var E=(c=void 0,D(C.actions)),A=E.next();!A.done;A=E.next()){var T=A.value;T.type===Kt?S[T.activity.id||T.activity.type]=T:T.type===cn&&(S[T.activity.id||T.activity.type]=!1)}}catch(M){c={error:M}}finally{try{A&&!A.done&&(u=E.return)&&u.call(E)}finally{if(c)throw c.error}}}}catch(M){s={error:M}}finally{try{_&&!_.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}var P=$(St(this,r,o,a,h,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),k=P[0],N=P[1],U=$(zl(k,Hn),2),F=U[0],H=U[1],re=k.filter(function(M){var Me;return M.type===Kt&&((Me=M.activity)===null||Me===void 0?void 0:Me.type)===Yt}),ae=re.reduce(function(M,Me){return M[Me.activity.id]=oc(Me.activity,d.machine,N,a),M},r?b({},r.children):{}),J=new he({value:y||r.value,context:N,_event:a,_sessionid:r?r._sessionid:null,historyValue:y?w?Ll(w,y):void 0:r?r.historyValue:void 0,history:!y||t.source?r:void 0,actions:y?H:[],activities:y?S:r?r.activities:{},events:[],configuration:p,transitions:t.transitions,children:ae,done:g,tags:lo(p),machine:this}),te=o!==N;J.changed=a.name===fn||te;var Z=J.history;Z&&delete Z.history;var Re=!g&&(this._transient||m.some(function(M){return M._transient}));if(!f&&(!Re||a.name===ze))return J;var se=J;if(!g)for(Re&&(se=this.resolveRaisedTransition(se,{type:si},a,i));F.length;){var ot=F.shift();se=this.resolveRaisedTransition(se,ot._event,a,i)}var Mn=se.changed||(Z?!!se.actions.length||te||typeof Z.value!=typeof se.value||!Oi(se.value,Z.value):void 0);return se.changed=Mn,se.history=Z,se},e.prototype.getStateNode=function(t){if(Be(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=Be(t)?t.slice(qn.length):t;if(r===this.id)return this;var o=this.machine.idMap[r];if(!o)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return o},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Be(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=Wn(t,this.delimiter).slice(),o=this;r.length;){var i=r.shift();if(!i.length)break;o=o.getStateNode(i)}return o},e.prototype.resolve=function(t){var r,o=this;if(!t)return this.initialStateValue||$e;switch(this.type){case"parallel":return ut(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(t[s]||a):$e});case"compound":if(B(t)){var i=this.getStateNode(t);return i.type==="parallel"||i.type==="compound"?(r={},r[t]=i.initialStateValue,r):t}return Object.keys(t).length?ut(t,function(a,s){return a?o.getStateNode(s).resolve(a):$e}):this.initialStateValue||{};default:return t||$e}},e.prototype.getResolvedPath=function(t){if(Be(t)){var r=this.machine.idMap[t.slice(qn.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return Wn(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=io(this.states,function(o){return o.initialStateValue||$e},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,"'"));r=Xt(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var o=this.getStateNodes(t);return this.resolveTransition({configuration:o,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;B(r.target)?t=Be(r.target)?qt(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,o){return o===void 0&&(o=!0),o?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Xt(this))return[this];if(this.type==="compound"&&!this.initial)return W||q(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Gt(this.initialStateValue);return j(r.map(function(o){return t.getFromRelativePath(o)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=$(t),o=r[0],i=r.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)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:io(this.states,function(r,o){if(!t)return r.historyValue();var i=B(t)?void 0:t[o];return r.historyValue(i||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var o=this.parent;if(!t){var i=this.target;return i?j(Gt(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=$l(o.path,"states")(t).current;return B(a)?[o.getStateNode(a)]:j(Gt(a).map(function(s){return r.history==="deep"?o.getFromRelativePath(s):[o.states[s[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=j(Object.keys(this.states).map(function(o){return t.states[o].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,o,i;if(this.__cache.events)return this.__cache.events;var a=this.states,s=new Set(this.ownEvents);if(a)try{for(var l=D(Object.keys(a)),c=l.next();!c.done;c=l.next()){var u=c.value,d=a[u];if(d.states)try{for(var m=(o=void 0,D(d.events)),f=m.next();!f.done;f=m.next()){var p=f.value;s.add("".concat(p))}}catch(g){o={error:g}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(o){if(!B(o))return o;var i=o[0]===r.delimiter;if(i&&!r.parent)return r.getStateNodeByPath(o.slice(1));var a=i?r.key+o:o;if(r.parent)try{var s=r.parent.getStateNodeByPath(a);return s}catch(l){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
|
|
20
|
-
`).concat(l.message))}else return r.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var r=this,o=Hl(t.target),i="internal"in t?t.internal:o?o.some(function(c){return B(c)&&c[0]===r.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),l=b(b({},t),{actions:we(me(t.actions)),cond:gi(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return b(b({},l),{target:l.target?l.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(r.id)})}});return l},e.prototype.formatTransitions=function(){var t,r,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=st,l=a[s],c=l===void 0?[]:l,u=cr(a,[typeof s=="symbol"?s:s+""]);i=j(Object.keys(u).map(function(S){!W&&S===ze&&q(!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 v=De(S,u[S]);return W||Cc(o,S,v),v}).concat(De(st,c)))}var d=this.config.always?De("",this.config.always):[],m=this.config.onDone?De(String(dt(this.id)),this.config.onDone):[];W||q(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var f=j(this.invoke.map(function(S){var v=[];return S.onDone&&v.push.apply(v,L([],$(De(String(gt(S.id)),S.onDone)),!1)),S.onError&&v.push.apply(v,L([],$(De(String(Le(S.id)),S.onError)),!1)),v})),p=this.after,g=j(L(L(L(L([],$(m),!1),$(f),!1),$(i),!1),$(d),!1).map(function(S){return me(S).map(function(v){return o.formatTransition(v)})}));try{for(var y=D(p),w=y.next();!w.done;w=y.next()){var h=w.value;g.push(h)}}catch(S){t={error:S}}finally{try{w&&!w.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}return g},e}(),uo=!1;function Ze(e,t){return!W&&!("predictableActionArguments"in e)&&!uo&&(uo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new bc(e,t)}var _e=Ii,gn=wi,Ac=ki,Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ec(e,t){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=t(e[r],r,e);return i}var $i=Ec;function Tc(){this.__data__=[],this.size=0}var Ic=Tc;function Pc(e,t){return e===t||e!==e&&t!==t}var At=Pc,kc=At;function Nc(e,t){for(var r=e.length;r--;)if(kc(e[r][0],t))return r;return-1}var hn=Nc,Mc=hn,xc=Array.prototype,Uc=xc.splice;function Fc(e){var t=this.__data__,r=Mc(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():Uc.call(t,r,1),--this.size,!0}var Oc=Fc,Rc=hn;function Dc(e){var t=this.__data__,r=Rc(t,e);return r<0?void 0:t[r][1]}var $c=Dc,Bc=hn;function Vc(e){return Bc(this.__data__,e)>-1}var zc=Vc,Lc=hn;function Gc(e,t){var r=this.__data__,o=Lc(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}var jc=Gc,Wc=Ic,Hc=Oc,Kc=$c,Yc=zc,qc=jc;function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Qe.prototype.clear=Wc;Qe.prototype.delete=Hc;Qe.prototype.get=Kc;Qe.prototype.has=Yc;Qe.prototype.set=qc;var yn=Qe,Jc=yn;function Zc(){this.__data__=new Jc,this.size=0}var Qc=Zc;function Xc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var eu=Xc;function tu(e){return this.__data__.get(e)}var nu=tu;function ru(e){return this.__data__.has(e)}var ou=ru,iu=typeof Ft=="object"&&Ft&&Ft.Object===Object&&Ft,Bi=iu,au=Bi,su=typeof self=="object"&&self&&self.Object===Object&&self,lu=au||su||Function("return this")(),ye=lu,cu=ye,uu=cu.Symbol,vn=uu,fo=vn,Vi=Object.prototype,du=Vi.hasOwnProperty,fu=Vi.toString,lt=fo?fo.toStringTag:void 0;function pu(e){var t=du.call(e,lt),r=e[lt];try{e[lt]=void 0;var o=!0}catch{}var i=fu.call(e);return o&&(t?e[lt]=r:delete e[lt]),i}var mu=pu,gu=Object.prototype,hu=gu.toString;function yu(e){return hu.call(e)}var vu=yu,po=vn,Su=mu,_u=vu,wu="[object Null]",Cu="[object Undefined]",mo=po?po.toStringTag:void 0;function bu(e){return e==null?e===void 0?Cu:wu:mo&&mo in Object(e)?Su(e):_u(e)}var Xe=bu;function Au(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ae=Au,Eu=Xe,Tu=Ae,Iu="[object AsyncFunction]",Pu="[object Function]",ku="[object GeneratorFunction]",Nu="[object Proxy]";function Mu(e){if(!Tu(e))return!1;var t=Eu(e);return t==Pu||t==ku||t==Iu||t==Nu}var hr=Mu,xu=ye,Uu=xu["__core-js_shared__"],Fu=Uu,Fn=Fu,go=function(){var e=/[^.]+$/.exec(Fn&&Fn.keys&&Fn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ou(e){return!!go&&go in e}var Ru=Ou,Du=Function.prototype,$u=Du.toString;function Bu(e){if(e!=null){try{return $u.call(e)}catch{}try{return e+""}catch{}}return""}var zi=Bu,Vu=hr,zu=Ru,Lu=Ae,Gu=zi,ju=/[\\^$.*+?()[\]{}|]/g,Wu=/^\[object .+?Constructor\]$/,Hu=Function.prototype,Ku=Object.prototype,Yu=Hu.toString,qu=Ku.hasOwnProperty,Ju=RegExp("^"+Yu.call(qu).replace(ju,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zu(e){if(!Lu(e)||zu(e))return!1;var t=Vu(e)?Ju:Wu;return t.test(Gu(e))}var Qu=Zu;function Xu(e,t){return e==null?void 0:e[t]}var ed=Xu,td=Qu,nd=ed;function rd(e,t){var r=nd(e,t);return td(r)?r:void 0}var Fe=rd,od=Fe,id=ye,ad=od(id,"Map"),yr=ad,sd=Fe,ld=sd(Object,"create"),Sn=ld,ho=Sn;function cd(){this.__data__=ho?ho(null):{},this.size=0}var ud=cd;function dd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fd=dd,pd=Sn,md="__lodash_hash_undefined__",gd=Object.prototype,hd=gd.hasOwnProperty;function yd(e){var t=this.__data__;if(pd){var r=t[e];return r===md?void 0:r}return hd.call(t,e)?t[e]:void 0}var vd=yd,Sd=Sn,_d=Object.prototype,wd=_d.hasOwnProperty;function Cd(e){var t=this.__data__;return Sd?t[e]!==void 0:wd.call(t,e)}var bd=Cd,Ad=Sn,Ed="__lodash_hash_undefined__";function Td(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ad&&t===void 0?Ed:t,this}var Id=Td,Pd=ud,kd=fd,Nd=vd,Md=bd,xd=Id;function et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}et.prototype.clear=Pd;et.prototype.delete=kd;et.prototype.get=Nd;et.prototype.has=Md;et.prototype.set=xd;var Ud=et,yo=Ud,Fd=yn,Od=yr;function Rd(){this.size=0,this.__data__={hash:new yo,map:new(Od||Fd),string:new yo}}var Dd=Rd;function $d(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Bd=$d,Vd=Bd;function zd(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var _n=zd,Ld=_n;function Gd(e){var t=Ld(this,e).delete(e);return this.size-=t?1:0,t}var jd=Gd,Wd=_n;function Hd(e){return Wd(this,e).get(e)}var Kd=Hd,Yd=_n;function qd(e){return Yd(this,e).has(e)}var Jd=qd,Zd=_n;function Qd(e,t){var r=Zd(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}var Xd=Qd,ef=Dd,tf=jd,nf=Kd,rf=Jd,of=Xd;function tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=ef;tt.prototype.delete=tf;tt.prototype.get=nf;tt.prototype.has=rf;tt.prototype.set=of;var vr=tt,af=yn,sf=yr,lf=vr,cf=200;function uf(e,t){var r=this.__data__;if(r instanceof af){var o=r.__data__;if(!sf||o.length<cf-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new lf(o)}return r.set(e,t),this.size=r.size,this}var df=uf,ff=yn,pf=Qc,mf=eu,gf=nu,hf=ou,yf=df;function nt(e){var t=this.__data__=new ff(e);this.size=t.size}nt.prototype.clear=pf;nt.prototype.delete=mf;nt.prototype.get=gf;nt.prototype.has=hf;nt.prototype.set=yf;var Sr=nt,vf="__lodash_hash_undefined__";function Sf(e){return this.__data__.set(e,vf),this}var _f=Sf;function wf(e){return this.__data__.has(e)}var Cf=wf,bf=vr,Af=_f,Ef=Cf;function en(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bf;++t<r;)this.add(e[t])}en.prototype.add=en.prototype.push=Af;en.prototype.has=Ef;var Tf=en;function If(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}var Pf=If;function kf(e,t){return e.has(t)}var Nf=kf,Mf=Tf,xf=Pf,Uf=Nf,Ff=1,Of=2;function Rf(e,t,r,o,i,a){var s=r&Ff,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var m=-1,f=!0,p=r&Of?new Mf:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var g=e[m],y=t[m];if(o)var w=s?o(y,g,m,t,e,a):o(g,y,m,e,t,a);if(w!==void 0){if(w)continue;f=!1;break}if(p){if(!xf(t,function(h,S){if(!Uf(p,S)&&(g===h||i(g,h,r,o,a)))return p.push(S)})){f=!1;break}}else if(!(g===y||i(g,y,r,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Li=Rf,Df=ye,$f=Df.Uint8Array,Gi=$f;function Bf(e){var t=-1,r=Array(e.size);return e.forEach(function(o,i){r[++t]=[i,o]}),r}var Vf=Bf;function zf(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}var Lf=zf,vo=vn,So=Gi,Gf=At,jf=Li,Wf=Vf,Hf=Lf,Kf=1,Yf=2,qf="[object Boolean]",Jf="[object Date]",Zf="[object Error]",Qf="[object Map]",Xf="[object Number]",ep="[object RegExp]",tp="[object Set]",np="[object String]",rp="[object Symbol]",op="[object ArrayBuffer]",ip="[object DataView]",_o=vo?vo.prototype:void 0,On=_o?_o.valueOf:void 0;function ap(e,t,r,o,i,a,s){switch(r){case ip:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case op:return!(e.byteLength!=t.byteLength||!a(new So(e),new So(t)));case qf:case Jf:case Xf:return Gf(+e,+t);case Zf:return e.name==t.name&&e.message==t.message;case ep:case np:return e==t+"";case Qf:var l=Wf;case tp:var c=o&Kf;if(l||(l=Hf),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;o|=Yf,s.set(e,t);var d=jf(l(e),l(t),o,i,a,s);return s.delete(e),d;case rp:if(On)return On.call(e)==On.call(t)}return!1}var sp=ap;function lp(e,t){for(var r=-1,o=t.length,i=e.length;++r<o;)e[i+r]=t[r];return e}var ji=lp,cp=Array.isArray,Ee=cp,up=ji,dp=Ee;function fp(e,t,r){var o=t(e);return dp(e)?o:up(o,r(e))}var Wi=fp;function pp(e,t){for(var r=-1,o=e==null?0:e.length,i=0,a=[];++r<o;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var mp=pp;function gp(){return[]}var Hi=gp,hp=mp,yp=Hi,vp=Object.prototype,Sp=vp.propertyIsEnumerable,wo=Object.getOwnPropertySymbols,_p=wo?function(e){return e==null?[]:(e=Object(e),hp(wo(e),function(t){return Sp.call(e,t)}))}:yp,Ki=_p;function wp(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}var Cp=wp;function bp(e){return e!=null&&typeof e=="object"}var Oe=bp,Ap=Xe,Ep=Oe,Tp="[object Arguments]";function Ip(e){return Ep(e)&&Ap(e)==Tp}var Pp=Ip,Co=Pp,kp=Oe,Yi=Object.prototype,Np=Yi.hasOwnProperty,Mp=Yi.propertyIsEnumerable,xp=Co(function(){return arguments}())?Co:function(e){return kp(e)&&Np.call(e,"callee")&&!Mp.call(e,"callee")},_r=xp,tn={exports:{}};function Up(){return!1}var Fp=Up;tn.exports;(function(e,t){var r=ye,o=Fp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||o;e.exports=u})(tn,tn.exports);var wr=tn.exports,Op=9007199254740991,Rp=/^(?:0|[1-9]\d*)$/;function Dp(e,t){var r=typeof e;return t=t??Op,!!t&&(r=="number"||r!="symbol"&&Rp.test(e))&&e>-1&&e%1==0&&e<t}var wn=Dp,$p=9007199254740991;function Bp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$p}var Cr=Bp,Vp=Xe,zp=Cr,Lp=Oe,Gp="[object Arguments]",jp="[object Array]",Wp="[object Boolean]",Hp="[object Date]",Kp="[object Error]",Yp="[object Function]",qp="[object Map]",Jp="[object Number]",Zp="[object Object]",Qp="[object RegExp]",Xp="[object Set]",em="[object String]",tm="[object WeakMap]",nm="[object ArrayBuffer]",rm="[object DataView]",om="[object Float32Array]",im="[object Float64Array]",am="[object Int8Array]",sm="[object Int16Array]",lm="[object Int32Array]",cm="[object Uint8Array]",um="[object Uint8ClampedArray]",dm="[object Uint16Array]",fm="[object Uint32Array]",G={};G[om]=G[im]=G[am]=G[sm]=G[lm]=G[cm]=G[um]=G[dm]=G[fm]=!0;G[Gp]=G[jp]=G[nm]=G[Wp]=G[rm]=G[Hp]=G[Kp]=G[Yp]=G[qp]=G[Jp]=G[Zp]=G[Qp]=G[Xp]=G[em]=G[tm]=!1;function pm(e){return Lp(e)&&zp(e.length)&&!!G[Vp(e)]}var mm=pm;function gm(e){return function(t){return e(t)}}var hm=gm,nn={exports:{}};nn.exports;(function(e,t){var r=Bi,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&r.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(nn,nn.exports);var ym=nn.exports,vm=mm,Sm=hm,bo=ym,Ao=bo&&bo.isTypedArray,_m=Ao?Sm(Ao):vm,br=_m,wm=Cp,Cm=_r,bm=Ee,Am=wr,Em=wn,Tm=br,Im=Object.prototype,Pm=Im.hasOwnProperty;function km(e,t){var r=bm(e),o=!r&&Cm(e),i=!r&&!o&&Am(e),a=!r&&!o&&!i&&Tm(e),s=r||o||i||a,l=s?wm(e.length,String):[],c=l.length;for(var u in e)(t||Pm.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Em(u,c)))&&l.push(u);return l}var qi=km,Nm=Object.prototype;function Mm(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Nm;return e===r}var Ar=Mm;function xm(e,t){return function(r){return e(t(r))}}var Ji=xm,Um=Ji,Fm=Um(Object.keys,Object),Om=Fm,Rm=Ar,Dm=Om,$m=Object.prototype,Bm=$m.hasOwnProperty;function Vm(e){if(!Rm(e))return Dm(e);var t=[];for(var r in Object(e))Bm.call(e,r)&&r!="constructor"&&t.push(r);return t}var zm=Vm,Lm=hr,Gm=Cr;function jm(e){return e!=null&&Gm(e.length)&&!Lm(e)}var Cn=jm,Wm=qi,Hm=zm,Km=Cn;function Ym(e){return Km(e)?Wm(e):Hm(e)}var Zi=Ym,qm=Wi,Jm=Ki,Zm=Zi;function Qm(e){return qm(e,Zm,Jm)}var Xm=Qm,Eo=Xm,eg=1,tg=Object.prototype,ng=tg.hasOwnProperty;function rg(e,t,r,o,i,a){var s=r&eg,l=Eo(e),c=l.length,u=Eo(t),d=u.length;if(c!=d&&!s)return!1;for(var m=c;m--;){var f=l[m];if(!(s?f in t:ng.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=s;++m<c;){f=l[m];var h=e[f],S=t[f];if(o)var v=s?o(S,h,f,t,e,a):o(h,S,f,e,t,a);if(!(v===void 0?h===S||i(h,S,r,o,a):v)){y=!1;break}w||(w=f=="constructor")}if(y&&!w){var _=e.constructor,C=t.constructor;_!=C&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(e),a.delete(t),y}var og=rg,ig=Fe,ag=ye,sg=ig(ag,"DataView"),lg=sg,cg=Fe,ug=ye,dg=cg(ug,"Promise"),fg=dg,pg=Fe,mg=ye,gg=pg(mg,"Set"),hg=gg,yg=Fe,vg=ye,Sg=yg(vg,"WeakMap"),_g=Sg,Jn=lg,Zn=yr,Qn=fg,Xn=hg,er=_g,Qi=Xe,rt=zi,To="[object Map]",wg="[object Object]",Io="[object Promise]",Po="[object Set]",ko="[object WeakMap]",No="[object DataView]",Cg=rt(Jn),bg=rt(Zn),Ag=rt(Qn),Eg=rt(Xn),Tg=rt(er),xe=Qi;(Jn&&xe(new Jn(new ArrayBuffer(1)))!=No||Zn&&xe(new Zn)!=To||Qn&&xe(Qn.resolve())!=Io||Xn&&xe(new Xn)!=Po||er&&xe(new er)!=ko)&&(xe=function(e){var t=Qi(e),r=t==wg?e.constructor:void 0,o=r?rt(r):"";if(o)switch(o){case Cg:return No;case bg:return To;case Ag:return Io;case Eg:return Po;case Tg:return ko}return t});var Ig=xe,Rn=Sr,Pg=Li,kg=sp,Ng=og,Mo=Ig,xo=Ee,Uo=wr,Mg=br,xg=1,Fo="[object Arguments]",Oo="[object Array]",Ot="[object Object]",Ug=Object.prototype,Ro=Ug.hasOwnProperty;function Fg(e,t,r,o,i,a){var s=xo(e),l=xo(t),c=s?Oo:Mo(e),u=l?Oo:Mo(t);c=c==Fo?Ot:c,u=u==Fo?Ot:u;var d=c==Ot,m=u==Ot,f=c==u;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new Rn),s||Mg(e)?Pg(e,t,r,o,i,a):kg(e,t,c,r,o,i,a);if(!(r&xg)){var p=d&&Ro.call(e,"__wrapped__"),g=m&&Ro.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,w=g?t.value():t;return a||(a=new Rn),i(y,w,r,o,a)}}return f?(a||(a=new Rn),Ng(e,t,r,o,i,a)):!1}var Og=Fg,Rg=Og,Do=Oe;function Xi(e,t,r,o,i){return e===t?!0:e==null||t==null||!Do(e)&&!Do(t)?e!==e&&t!==t:Rg(e,t,r,o,Xi,i)}var ea=Xi,Dg=Sr,$g=ea,Bg=1,Vg=2;function zg(e,t,r,o){var i=r.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var m=new Dg;if(o)var f=o(u,d,c,e,t,m);if(!(f===void 0?$g(d,u,Bg|Vg,o,m):f))return!1}}return!0}var Lg=zg,Gg=Ae;function jg(e){return e===e&&!Gg(e)}var ta=jg,Wg=ta,Hg=Zi;function Kg(e){for(var t=Hg(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,Wg(i)]}return t}var Yg=Kg;function qg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var na=qg,Jg=Lg,Zg=Yg,Qg=na;function Xg(e){var t=Zg(e);return t.length==1&&t[0][2]?Qg(t[0][0],t[0][1]):function(r){return r===e||Jg(r,e,t)}}var eh=Xg,th=Xe,nh=Oe,rh="[object Symbol]";function oh(e){return typeof e=="symbol"||nh(e)&&th(e)==rh}var Er=oh,ih=Ee,ah=Er,sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lh=/^\w*$/;function ch(e,t){if(ih(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ah(e)?!0:lh.test(e)||!sh.test(e)||t!=null&&e in Object(t)}var Tr=ch,ra=vr,uh="Expected a function";function Ir(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(uh);var r=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return r.cache=a.set(i,s)||a,s};return r.cache=new(Ir.Cache||ra),r}Ir.Cache=ra;var dh=Ir,fh=dh,ph=500;function mh(e){var t=fh(e,function(o){return r.size===ph&&r.clear(),o}),r=t.cache;return t}var gh=mh,hh=gh,yh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vh=/\\(\\)?/g,Sh=hh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yh,function(r,o,i,a){t.push(i?a.replace(vh,"$1"):o||r)}),t}),_h=Sh,$o=vn,wh=$i,Ch=Ee,bh=Er,Bo=$o?$o.prototype:void 0,Vo=Bo?Bo.toString:void 0;function oa(e){if(typeof e=="string")return e;if(Ch(e))return wh(e,oa)+"";if(bh(e))return Vo?Vo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ah=oa,Eh=Ah;function Th(e){return e==null?"":Eh(e)}var Ih=Th,Ph=Ee,kh=Tr,Nh=_h,Mh=Ih;function xh(e,t){return Ph(e)?e:kh(e,t)?[e]:Nh(Mh(e))}var bn=xh,Uh=Er;function Fh(e){if(typeof e=="string"||Uh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Et=Fh,Oh=bn,Rh=Et;function Dh(e,t){t=Oh(t,e);for(var r=0,o=t.length;e!=null&&r<o;)e=e[Rh(t[r++])];return r&&r==o?e:void 0}var Pr=Dh,$h=Pr;function Bh(e,t,r){var o=e==null?void 0:$h(e,t);return o===void 0?r:o}var Vh=Bh;function zh(e,t){return e!=null&&t in Object(e)}var Lh=zh,Gh=bn,jh=_r,Wh=Ee,Hh=wn,Kh=Cr,Yh=Et;function qh(e,t,r){t=Gh(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Yh(t[o]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Kh(i)&&Hh(s,i)&&(Wh(e)||jh(e)))}var Jh=qh,Zh=Lh,Qh=Jh;function Xh(e,t){return e!=null&&Qh(e,t,Zh)}var ey=Xh,ty=ea,ny=Vh,ry=ey,oy=Tr,iy=ta,ay=na,sy=Et,ly=1,cy=2;function uy(e,t){return oy(e)&&iy(t)?ay(sy(e),t):function(r){var o=ny(r,e);return o===void 0&&o===t?ry(r,e):ty(t,o,ly|cy)}}var dy=uy;function fy(e){return e}var kr=fy;function py(e){return function(t){return t==null?void 0:t[e]}}var my=py,gy=Pr;function hy(e){return function(t){return gy(t,e)}}var yy=hy,vy=my,Sy=yy,_y=Tr,wy=Et;function Cy(e){return _y(e)?vy(wy(e)):Sy(e)}var by=Cy,Ay=eh,Ey=dy,Ty=kr,Iy=Ee,Py=by;function ky(e){return typeof e=="function"?e:e==null?Ty:typeof e=="object"?Iy(e)?Ey(e[0],e[1]):Ay(e):Py(e)}var Ny=ky,My=Fe,xy=function(){try{var e=My(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ia=xy,zo=ia;function Uy(e,t,r){t=="__proto__"&&zo?zo(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Nr=Uy,Fy=Nr,Oy=At,Ry=Object.prototype,Dy=Ry.hasOwnProperty;function $y(e,t,r){var o=e[t];(!(Dy.call(e,t)&&Oy(o,r))||r===void 0&&!(t in e))&&Fy(e,t,r)}var aa=$y,By=aa,Vy=bn,zy=wn,Lo=Ae,Ly=Et;function Gy(e,t,r,o){if(!Lo(e))return e;t=Vy(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var c=Ly(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=s){var d=l[c];u=o?o(d,c,l):void 0,u===void 0&&(u=Lo(d)?d:zy(t[i+1])?[]:{})}By(l,c,u),l=l[c]}return e}var jy=Gy,Wy=Pr,Hy=jy,Ky=bn;function Yy(e,t,r){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],l=Wy(e,s);r(l,s)&&Hy(a,Ky(s,e),l)}return a}var qy=Yy,Jy=Ji,Zy=Jy(Object.getPrototypeOf,Object),Mr=Zy,Qy=ji,Xy=Mr,ev=Ki,tv=Hi,nv=Object.getOwnPropertySymbols,rv=nv?function(e){for(var t=[];e;)Qy(t,ev(e)),e=Xy(e);return t}:tv,ov=rv;function iv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var av=iv,sv=Ae,lv=Ar,cv=av,uv=Object.prototype,dv=uv.hasOwnProperty;function fv(e){if(!sv(e))return cv(e);var t=lv(e),r=[];for(var o in e)o=="constructor"&&(t||!dv.call(e,o))||r.push(o);return r}var pv=fv,mv=qi,gv=pv,hv=Cn;function yv(e){return hv(e)?mv(e,!0):gv(e)}var xr=yv,vv=Wi,Sv=ov,_v=xr;function wv(e){return vv(e,_v,Sv)}var Cv=wv,bv=$i,Av=Ny,Ev=qy,Tv=Cv;function Iv(e,t){if(e==null)return{};var r=bv(Tv(e),function(o){return[o]});return t=Av(t),Ev(e,r,function(o,i){return t(o,i[0])})}var Pv=Iv;const kv=Di(Pv),Nv=!0,Mv="",wt=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),xv=(e,t)=>{switch(t){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 t.startsWith("custom:")}},Uv=e=>{const{phone_number:t,...r}=kv(e,xv);if(ni(t)&&t!==Mv){const{country_code:o}=e;return{...r,phone_number:wt(o,t)}}return r},Fv=(e,t,r,o)=>{const{password:i,...a}=t,s=Uv(a),l=o&&o!=="PASSWORD";let c=s;o==="SMS_OTP"&&s.email&&(c={...s,email:""});const u={autoSignIn:l?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:Nv,userAttributes:{...r==="phone_number"?{...c,phone_number:e}:c}};return{username:e,password:l?void 0:i,options:u}},Ov=({formValues:e,loginMechanisms:t})=>{const r=e.__authMethod;if(r==="SMS_OTP"){const{country_code:i,phone_number:a}=e;return wt(i,a)}if(r==="EMAIL_OTP")return e.email;if(t.includes("username"))return e.username;const o=t[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=e;return wt(i,a)}return e[o]},Rv=(e,t)=>{const r=[],o=t!==void 0;r.push("PASSWORD"),(o||e!=null&&e.emailOtpEnabled)&&r.push("EMAIL_OTP"),(o||e!=null&&e.smsOtpEnabled)&&r.push("SMS_OTP"),(o||e!=null&&e.webAuthnEnabled)&&r.push("WEB_AUTHN");const i=t??[],a=r.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:R}=Ni,Dv=R({actorDoneData:void 0}),$v=R({challengeName:void 0}),Bv=R({missingAttributes:void 0}),Vv=R({remoteError:void 0}),zv=R({formValues:e=>{var t;return{username:(t=e.formValues)==null?void 0:t.username}}}),Lv=R({touched:{}}),Gv=R({user:void 0}),jv=R({validationError:{}}),Wv=R({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:r}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),Hv=R({allowedMfaTypes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.allowedMFATypes}}),Kv=R({step:"SIGN_IN"}),Yv=R({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),qv=R({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Jv=R({challengeName:(e,{data:t})=>{const{signInStep:r}=t.nextStep;switch(r){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}}}),Zv=R({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?wt(i,o):o}}),Qv=R({username:Ov}),Xv=R({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?wt(i,o):o}}),eS=R({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),tS=R({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),nS=R({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),rS=R({missingAttributes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.missingAttributes}}),oS=R({validationError:(e,{data:t})=>t}),iS=R({remoteError:(e,{data:t})=>{if(t.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const r=(t==null?void 0:t.message)||"";return r.includes("USER_AUTH flow not enabled")?I(O.PASSWORDLESS_NOT_ENABLED):r.includes("Cannot send code to either")?I(O.CODE_DELIVERY_FAILED):r.includes("Invalid code or auth state")?I(O.VERIFICATION_CODE_INVALID):r.includes("session is expired")?I(O.VERIFICATION_CODE_EXPIRED):r.includes("ceremony has been canceled")?I(O.PASSKEY_AUTHENTICATION_CANCELED):r||t}}),aS=R({user:(e,{data:t})=>t}),Go=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),sS=R({codeDeliveryDetails:(e,{data:t})=>{var r;return(r=t==null?void 0:t.nextStep)!=null&&r.codeDeliveryDetails?Go(t.nextStep.codeDeliveryDetails):Go(t)}}),lS=R({formValues:(e,{data:t})=>{const{name:r,value:o}=t;return{...e.formValues,[r]:o}}}),cS=R({formValues:(e,{data:t})=>_s({...e.formValues,...t},"password")}),uS=R({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),dS=R({unverifiedUserAttributes:(e,{data:t})=>{const r=t||e.fetchedUserAttributes;if(!r)return{};const{email:o,phone_number:i}=r;return{...o&&{email:o},...i&&{phone_number:i}}}}),fS=R({selectedUserAttribute:void 0}),pS=R({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),mS=R({step:"CONFIRM_SIGN_UP"}),gS=R({selectedAuthMethod:(e,{data:t})=>t.method}),hS=R({selectedAuthMethod:(e,{data:t})=>(t==null?void 0:t.__authMethod)||"PASSWORD"}),yS=R({step:"SELECT_AUTH_METHOD"}),vS=R({fetchedUserAttributes:(e,t)=>t.data}),SS=R({hasExistingPasskeys:(e,t)=>t.data}),_S=R({hasExistingPasskeys:!1}),Tt={clearActorDoneData:Dv,clearChallengeName:$v,clearError:Vv,clearFormValues:zv,clearHasExistingPasskeys:_S,clearMissingAttributes:Bv,clearSelectedUserAttribute:fS,clearTouched:Lv,clearUser:Gv,clearValidationError:jv,handleBlur:uS,handleInput:lS,handleSubmit:cS,setAllowedMfaTypes:Hv,setChallengeName:Jv,setCodeDeliveryDetails:sS,setFetchedUserAttributes:vS,setFieldErrors:oS,setHasExistingPasskeys:SS,setMissingAttributes:rS,setNextResetPasswordStep:nS,setNextSignInStep:eS,setNextSignUpStep:tS,setRemoteError:iS,setConfirmAttributeCompleteStep:qv,setConfirmSignUpSignUpStep:mS,setSelectAuthMethodStep:yS,setSelectedAuthMethod:gS,setSelectedAuthMethodFromForm:hS,setShouldVerifyUserAttributeStep:Yv,setSelectedUserAttribute:pS,setSignInStep:Kv,setTotpSecretCode:Wv,setUser:aS,setUnverifiedUserAttributes:dS,setUsernameForgotPassword:Zv,setUsernameSignIn:Xv,setUsernameSignUp:Qv},wS=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],CS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",bS=(e,{data:t})=>{var r;return((r=t==null?void 0:t.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},AS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",ES=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",TS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",IS=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",PS=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",kS=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",NS=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",MS=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",xS=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",US=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",FS=({step:e})=>wS.includes(e),OS=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",RS=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",DS=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),$S=({step:e})=>e==="RESET_PASSWORD",BS=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",VS=({step:e})=>e==="CONFIRM_SIGN_UP",zS=(e,t)=>{const r=t.data||e.fetchedUserAttributes;if(!r)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=r;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},LS=(e,{data:t})=>t.message==="User is already confirmed.",GS=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:r})=>e&&e.length>1&&(!t||r===null),jS=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:r}=e||{};return!r||t?!1:typeof r=="boolean"?r:r.afterSignin==="ALWAYS"},WS=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:r}=e||{};return!r||t?!1:typeof r=="boolean"?r:r.afterSignup==="ALWAYS"},HS=({passwordless:e})=>(e==null?void 0:e.passkeyRegistrationPrompts)!=null,KS=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",An={hasCompletedAttributeConfirmation:kS,hasCompletedResetPassword:PS,hasCompletedSignIn:TS,hasCompletedSignUp:IS,hasPasskeyRegistrationPrompts:HS,isConfirmSignUpStep:US,isConfirmUserAttributeStep:NS,isResetPasswordStep:xS,isShouldConfirmUserAttributeStep:MS,isUserAlreadyConfirmed:LS,shouldAutoSignIn:ES,shouldConfirmResetPassword:BS,shouldConfirmSignIn:FS,shouldConfirmSignInWithNewPassword:CS,shouldConfirmSignUp:VS,shouldConfirmSignUpFromSignIn:AS,shouldResetPassword:$S,shouldResetPasswordFromSignIn:bS,shouldReturnToSelectMethod:KS,shouldSelectAuthMethod:GS,shouldSetupTotp:OS,shouldSetupEmail:RS,shouldSelectMfaType:DS,shouldVerifyAttribute:zS,shouldPromptPasskeyRegistration:jS,shouldPromptPasskeyRegistrationAfterSignup:WS};var YS=Nr,qS=At;function JS(e,t,r){(r!==void 0&&!qS(e[t],r)||r===void 0&&!(t in e))&&YS(e,t,r)}var sa=JS;function ZS(e){return function(t,r,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var c=s[e?l:++i];if(r(a[c],c,a)===!1)break}return t}}var QS=ZS,XS=QS,e_=XS(),t_=e_,rn={exports:{}};rn.exports;(function(e,t){var r=ye,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var m=u.length,f=l?l(m):new u.constructor(m);return u.copy(f),f}e.exports=c})(rn,rn.exports);var n_=rn.exports,jo=Gi;function r_(e){var t=new e.constructor(e.byteLength);return new jo(t).set(new jo(e)),t}var o_=r_,i_=o_;function a_(e,t){var r=t?i_(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var s_=a_;function l_(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}var c_=l_,u_=Ae,Wo=Object.create,d_=function(){function e(){}return function(t){if(!u_(t))return{};if(Wo)return Wo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),f_=d_,p_=f_,m_=Mr,g_=Ar;function h_(e){return typeof e.constructor=="function"&&!g_(e)?p_(m_(e)):{}}var y_=h_,v_=Cn,S_=Oe;function __(e){return S_(e)&&v_(e)}var w_=__,C_=Xe,b_=Mr,A_=Oe,E_="[object Object]",T_=Function.prototype,I_=Object.prototype,la=T_.toString,P_=I_.hasOwnProperty,k_=la.call(Object);function N_(e){if(!A_(e)||C_(e)!=E_)return!1;var t=b_(e);if(t===null)return!0;var r=P_.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&la.call(r)==k_}var M_=N_;function x_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ca=x_,U_=aa,F_=Nr;function O_(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),i?F_(r,l,c):U_(r,l,c)}return r}var R_=O_,D_=R_,$_=xr;function B_(e){return D_(e,$_(e))}var V_=B_,Ho=sa,z_=n_,L_=s_,G_=c_,j_=y_,Ko=_r,Yo=Ee,W_=w_,H_=wr,K_=hr,Y_=Ae,q_=M_,J_=br,qo=ca,Z_=V_;function Q_(e,t,r,o,i,a,s){var l=qo(e,r),c=qo(t,r),u=s.get(c);if(u){Ho(e,r,u);return}var d=a?a(l,c,r+"",e,t,s):void 0,m=d===void 0;if(m){var f=Yo(c),p=!f&&H_(c),g=!f&&!p&&J_(c);d=c,f||p||g?Yo(l)?d=l:W_(l)?d=G_(l):p?(m=!1,d=z_(c,!0)):g?(m=!1,d=L_(c,!0)):d=[]:q_(c)||Ko(c)?(d=l,Ko(l)?d=Z_(l):(!Y_(l)||K_(l))&&(d=j_(c))):m=!1}m&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),Ho(e,r,d)}var X_=Q_,ew=Sr,tw=sa,nw=t_,rw=X_,ow=Ae,iw=xr,aw=ca;function ua(e,t,r,o,i){e!==t&&nw(t,function(a,s){if(i||(i=new ew),ow(a))rw(e,t,s,r,ua,o,i);else{var l=o?o(aw(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),tw(e,s,l)}},iw)}var sw=ua;function lw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cw=lw,uw=cw,Jo=Math.max;function dw(e,t,r){return t=Jo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Jo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=r(s),uw(e,this,l)}}var fw=dw;function pw(e){return function(){return e}}var mw=pw,gw=mw,Zo=ia,hw=kr,yw=Zo?function(e,t){return Zo(e,"toString",{configurable:!0,enumerable:!1,value:gw(t),writable:!0})}:hw,vw=yw,Sw=800,_w=16,ww=Date.now;function Cw(e){var t=0,r=0;return function(){var o=ww(),i=_w-(o-r);if(r=o,i>0){if(++t>=Sw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bw=Cw,Aw=vw,Ew=bw,Tw=Ew(Aw),Iw=Tw,Pw=kr,kw=fw,Nw=Iw;function Mw(e,t){return Nw(kw(e,t,Pw),e+"")}var xw=Mw,Uw=At,Fw=Cn,Ow=wn,Rw=Ae;function Dw(e,t,r){if(!Rw(r))return!1;var o=typeof t;return(o=="number"?Fw(r)&&Ow(t,r.length):o=="string"&&t in r)?Uw(r[t],e):!1}var $w=Dw,Bw=xw,Vw=$w;function zw(e){return Bw(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Vw(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t})}var Lw=zw,Gw=sw,jw=Lw,Ww=jw(function(e,t,r){Gw(e,t,r)}),Hw=Ww;const Kw=Di(Hw),En=async(e,t,r,o)=>{const i=await Promise.all(o.map(s=>s(e,t,r))),a=Kw({},...i);return ri(a)?Promise.resolve():Promise.reject(a)},Yw=8,qw=e=>Array.isArray(e),Jw=e=>{if(e)return qw(e)?Object.entries(e).map(([t,r])=>Object.keys(r)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var u,d,m,f,p,g;const e=$a.Amplify.getConfig(),t=(u=e.Auth)==null?void 0:u.Cognito,{loginWith:r,userAttributes:o}=((d=e.Auth)==null?void 0:d.Cognito)??{},i=r?Object.entries(r).filter(([y,w])=>y!=="oauth").filter(([y,w])=>!!w).map(y=>y[0]==="phone"?"phone_number":y[0]):void 0,a=Jw(o),s=(m=r==null?void 0:r.oauth)!=null&&m.providers?(f=r.oauth.providers)==null?void 0:f.map(y=>y.toString().toLowerCase()):void 0,l=(g=(p=e.Auth)==null?void 0:p.Cognito)==null?void 0:g.passwordless,c={emailOtpEnabled:(l==null?void 0:l.emailOtpEnabled)??(l==null?void 0:l.email_otp_enabled)===!0,smsOtpEnabled:(l==null?void 0:l.smsOtpEnabled)??(l==null?void 0:l.sms_otp_enabled)===!0,webAuthnEnabled:!!((l==null?void 0:l.webAuthn)??(l==null?void 0:l.web_authn)),preferredChallenge:(l==null?void 0:l.preferredChallenge)??(l==null?void 0:l.preferred_challenge)};return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:c}},getCurrentUser:K.getCurrentUser,handleSignIn:K.signIn,handleSignUp:K.signUp,handleConfirmSignIn:K.confirmSignIn,handleConfirmSignUp:K.confirmSignUp,handleForgotPasswordSubmit:K.confirmResetPassword,handleForgotPassword:K.resetPassword,handleResendSignUpCode:K.resendSignUpCode,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,r){const{password:o}=e,{password:i}=t;if(!i||!r)return null;const a=[],s=r.minLength??Yw;return o.length<s&&a.push(`Password must have at least ${s} characters`),r.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),r.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),r.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),r.requireSpecialCharacters&&!vs(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:r,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!r&&!o)return null;if((r||o)&&r!==o&&(i&&a||(r==null?void 0:r.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){},async validateRequiredFieldsForAuthMethod(e){const t=e.__authMethod;if(!t)return null;if(t==="EMAIL_OTP"&&!e.email)return{email:"Email is required for Email OTP sign up"};if(t==="SMS_OTP"&&!e.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(t==="PASSWORD"){const r={};return e.password||(r.password="Password is required"),e.confirm_password||(r.confirm_password="Confirm Password is required"),Object.keys(r).length>0?r:null}return null}};function Zw({services:e}){return Ze({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:t})=>({step:t})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:r}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:r})},validateFields(t){return En(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const da=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),Qw=e=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e)?"mfa_type":e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Ht={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"}},Rt=e=>({initial:"edit",exit:e,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",...Ht}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Xw({services:e}){return Ze({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:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...da("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 t=await K.listWebAuthnCredentials();return t.credentials&&t.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:Ht.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Ht.onError]}}}},confirmSignIn:{...Rt(["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",...Ht}}}}}},setupTotp:{...Rt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Rt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Rt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{async fetchUserAttributes(){return K.fetchUserAttributes()},resetPassword({username:t}){return K.resetPassword({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},resendSignInCode({username:t,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:i}){const a=r??i??(o==null?void 0:o[0])??"PASSWORD";return e.handleSignIn({username:t,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:t,username:r,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:l}=t;return e.handleSignIn({username:r,password:l})}else return e.handleSignIn({username:r,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:t,step:r}){const o=Qw(r),{[o]:i}=t;return e.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:t}){let{password:r,phone_number:o,country_code:i,confirm_password:a,...s}=t,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:l});const c={challengeResponse:r,options:{userAttributes:s}};return K.confirmSignIn(c)},signInWithRedirect(t,{data:r}){return K.signInWithRedirect(r)},async validateFields(t){return En(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const eC={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},tC={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 nC({services:e}){return Ze({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...tC}},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 t=await K.listWebAuthnCredentials();return t.credentials&&t.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:{...da("signUp")},resetPassword:{invoke:{src:"resetPassword",...eC}},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:{target:"resolved"},SUBMIT:{target:"resolved"}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,username:t.username,unverifiedUserAttributes:t.unverifiedUserAttributes,allowedMfaTypes:t.allowedMfaTypes})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{autoSignIn(){return K.autoSignIn()},async fetchUserAttributes(){return K.fetchUserAttributes()},confirmSignUp({formValues:t,username:r}){const{confirmation_code:o}=t,i={username:r,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},signInWithRedirect(t,{data:r}){return K.signInWithRedirect(r)},handleSignUp(t){const{formValues:r,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=t,l=o[0],u=Fv(i,r,l,a??s);return e.handleSignUp(u)},async validateSignUp(t){return En(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const rC=()=>Ze({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:()=>K.signOut()}});function oC(){return Ze({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:e})=>({step:e})}}},{actions:{...Tt,sendUpdate:gn()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return K.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const r={confirmationCode:e,userAttributeKey:t};return K.confirmUserAttribute(r)},async validateFields(e){return En(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Dt=(e,t)=>{var i,a,s,l,c,u,d,m,f,p,g,y;const r=Rv(e.passwordlessCapabilities,(a=(i=e.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((l=(s=e.config)==null?void 0:s.passwordless)==null?void 0:l.preferredAuthMethod)??((c=e.passwordlessCapabilities)==null?void 0:c.preferredChallenge);return{...e.actorDoneData,step:((u=e==null?void 0:e.actorDoneData)==null?void 0:u.step)??t,formValues:{},touched:{},validationError:{},formFields:(d=e.config)==null?void 0:d.formFields,loginMechanisms:(m=e.config)==null?void 0:m.loginMechanisms,passwordSettings:(f=e.config)==null?void 0:f.passwordSettings,signUpAttributes:(p=e.config)==null?void 0:p.signUpAttributes,socialProviders:(g=e.config)==null?void 0:g.socialProviders,availableAuthMethods:r,preferredChallenge:o,passwordless:(y=e.config)==null?void 0:y.passwordless}},{choose:iC,stop:aC}=Ni,ct=e=>aC(e),sC={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},lC={always:{actions:"configure",target:"getConfig"}};function cC(e){const{useNextWaitConfig:t,...r}={};return Ze({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:ke,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:t?lC:sC,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:ct("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:ct("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:ct("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:ct("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:ct("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:{...Tt,forwardToActor:iC([{cond:"hasActor",actions:Ac(({actorRef:i})=>i)}]),setActorDoneData:_e({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:_e({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:l=a.signUpAttributes??[],socialProviders:c=a.socialProviders??[],initialState:u,formFields:d,passwordSettings:m=a.passwordFormat??{},passwordless:f}=i.config;return s.length===0&&s.push("username"),{formFields:uC(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,passwordless:f,signUpAttributes:l,socialProviders:c}}}),spawnSignInActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=Xw({services:s}).withContext(Dt(i,"SIGN_IN"));return at(l,{name:"signInActor"})}}),spawnSignUpActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=nC({services:s}).withContext(Dt(i,"SIGN_UP"));return at(l,{name:"signUpActor"})}}),spawnForgotPasswordActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=Zw({services:s}).withContext(Dt(i,"FORGOT_PASSWORD"));return at(l,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_e({actorRef:i=>{const a=oC().withContext(Dt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_e({actorRef:i=>{const a=rC().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:_e((i,a)=>{const{services:s,...l}=Xa(r)?a.data??{}:r;return{services:{...ke,...s},config:l}}),setHasSetup:_e({hasSetup:!0})},guards:{...An,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 uC(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{let o=e[t][r];o.required=o.isRequired})}),e}const oe={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"},dC=({componentName:e,packageName:t,version:r})=>{const o=[`ui-${t}`,r];switch(e){case"AIConversation":{x.setCustomUserAgent({...La,additionalDetails:[[e],o]});break}case"Authenticator":{x.setCustomUserAgent({...ja,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{x.setCustomUserAgent({...Ga,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{x.setCustomUserAgent({...Wa,additionalDetails:[[e],o]});break}case"InAppMessaging":{x.setCustomUserAgent({...Ha,additionalDetails:[[e],o]});break}case"LocationSearch":{x.setCustomUserAgent({...Ka,additionalDetails:[[e],o]});break}case"MapView":{x.setCustomUserAgent({...Ya,additionalDetails:[[e],o]});break}case"StorageManager":{x.setCustomUserAgent({...qa,additionalDetails:[[e],o]});break}case"StorageBrowser":{x.setCustomUserAgent({...Ja,additionalDetails:[[e],o]});break}}return ts},fC={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},pC={class:"amplify-flex amplify-authenticator__icon-wrapper"},mC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.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),gC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.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),fe=n.defineComponent({__name:"base-alert",setup(e){const t=n.ref(!0),r=I("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ne;return t.value?(n.openBlock(),n.createElementBlock("div",fC,[n.createElementVNode("div",pC,[mC,n.createElementVNode("div",null,[n.renderSlot(i.$slots,"default")])]),n.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":n.unref(r),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:n.withCtx(()=>[gC]),_:1},8,["aria-label"])])):n.createCommentVNode("",!0)}}}),pe=n.defineComponent({__name:"base-field-set",setup(e){const t=n.useSlots();return(r,o)=>n.renderSlot(r.$slots,"fieldSetI",n.mergeProps(r.$attrs,{slotData:n.unref(t).default&&n.unref(t).default()}),()=>[n.createElementVNode("fieldset",n.mergeProps(r.$attrs,{"data-amplify-fieldset":""}),[n.renderSlot(r.$slots,"default")],16)])}});function hC(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function fa(e){let t=0,r,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),r=void 0,o=void 0)};return(...a)=>(t+=1,r||(o=n.effectScope(!0),r=o.run(()=>e(...a))),hC(i),r)}function yC(e){return"state"in e}var Qo=function(){};function vC(e){return"getSnapshot"in e?e.getSnapshot():yC(e)?e.state:void 0}function SC(e,t){t===void 0&&(t=vC);var r=n.isRef(e)?e:n.shallowRef(e),o=n.shallowRef(t(r.value)),i=function(a){r.value.send(a)};return n.watch(r,function(a,s,l){o.value=t(a);var c=a.subscribe({next:function(u){return o.value=u},error:Qo,complete:Qo}).unsubscribe;l(function(){return c()})},{immediate:!0}),{state:o,send:i}}const _C=e=>{var t,r,o;return{...(o=(r=(t=sr(e))==null?void 0:t.formFields)==null?void 0:r.setupTotp)==null?void 0:o.QR}},Ur=fa(()=>{const e=cC(),t=Ri(e).start(),r=n.ref("configuring"),{state:o,send:i}=SC(t),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},l=ns(t,(c,u)=>oi(c,u,{onSignIn:a,onSignOut:s}));return K.getCurrentUser().then(()=>{r.value="authenticated"}).catch(()=>{r.value="unauthenticated"}),n.onScopeDispose(()=>{l()}),{authStatus:r,service:t,send:i,state:o}}),ee=fa(()=>{const{authStatus:e,state:t,send:r}=Ur(),o=n.reactive({});return n.watchEffect(()=>{const i=ls({send:r,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?_C(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=r,o.state=t}),o});let wC=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const It=n.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const r=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(n.openBlock(),n.createElementBlock("input",{onChange:i[0]||(i[0]=a=>r(a)),"data-amplify-input":""},null,32))}}),CC={},bC={"data-amplify-label":""};function AC(e,t){return n.openBlock(),n.createElementBlock("label",bC,[n.renderSlot(e.$slots,"default")])}const Pt=sn(CC,[["render",AC]]),EC=["aria-label","aria-checked"],TC=n.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),IC=[TC],PC=n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),kC=n.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),NC=[PC,kC],MC={inheritAttrs:!1},Fr=n.defineComponent({...MC,__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(e){const t=e,r=I("Show password"),o=I("Hide password"),i=n.ref("password"),a=n.ref(r),s=Math.floor(Math.random()*999999),{name:l,label:c,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=n.toRefs(t),g=n.ref("");function y(){a.value=a.value===r?o:r,i.value=i.value==="password"?"text":"password"}const w=I((f==null?void 0:f.value)??c.value),h=I(c.value);return(S,v)=>{const _=Pt,C=It,E=X;return n.openBlock(),n.createBlock(E,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).Field,n.unref(oe).TextField,n.unref(oe).PasswordField])},{default:n.withCtx(()=>[n.createVNode(_,{class:n.normalizeClass(["amplify-label",{"amplify-visually-hidden":n.unref(m)}]),for:"amplify-field-"+n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(h)),1)]),_:1},8,["class","for"]),n.createVNode(E,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(E,{class:n.normalizeClass(n.unref(oe).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(C,n.mergeProps(S.$attrs,{modelValue:g.value,"onUpdate:modelValue":v[0]||(v[0]=A=>g.value=A),class:[n.unref(oe).Input,n.unref(oe).FieldGroupControl],id:"amplify-field-"+n.unref(s),"data-amplify-password":"true",name:n.unref(l),autocomplete:n.unref(u),required:n.unref(p)??!0,placeholder:n.unref(w),type:i.value,"aria-invalid":n.unref(d),"aria-describedBy":e.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),n.createVNode(E,{class:n.normalizeClass(n.unref(oe).FieldGroupOuterEnd)},{default:n.withCtx(()=>[n.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:n.normalizeClass([n.unref(oe).Button,n.unref(oe).FieldGroupControl,n.unref(oe).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:y},[i.value==="password"?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(oe).Icon)},IC,2)):(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(oe).Icon)},NC,2))],10,EC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),xC=["value","selected"],UC=n.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const r=e,{options:o,selectValue:i}=n.toRefs(r),a=s=>{t("update:selectValue",s.target.value)};return(s,l)=>(n.openBlock(),n.createElementBlock("select",{onChange:l[0]||(l[0]=c=>a(c))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(o),(c,u)=>(n.openBlock(),n.createElementBlock("option",{key:u,value:c,selected:c==n.unref(i)?!0:void 0},n.toDisplayString(c),9,xC))),128))],32))}}),FC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[n.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),OC=n.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(e){const t=e,{label:r,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:l,dialCode:c,dialCodeList:u}=n.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const g=Pt,y=UC,w=X,h=It;return n.openBlock(),n.createBlock(w,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(g,n.mergeProps({for:"amplify-field-"+n.unref(d),class:["amplify-label",{"amplify-visually-hidden":n.unref(s)}]},f.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)),1)]),_:1},16,["for","class"]),n.createVNode(w,{class:"amplify-flex amplify-field-group"},{default:n.withCtx(()=>[n.createVNode(w,{class:"amplify-field-group__outer-start"},{default:n.withCtx(()=>[e.type==="tel"?(n.openBlock(),n.createBlock(w,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(g,n.mergeProps({for:"amplify-field-"+n.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString("Country Code"))]),_:1},16,["for"]),n.createVNode(w,{class:"amplify-select__wrapper"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+n.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:n.unref(u),"select-value":n.unref(c)},null,8,["id","options","select-value"]),n.createVNode(w,{class:"amplify-flex amplify-select__icon"},{default:n.withCtx(()=>[FC]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(w,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+n.unref(d),autocomplete:n.unref(a),name:n.unref(o),required:n.unref(l)??!0,type:e.type,placeholder:n.unref(i),"aria-invalid":e.hasError,"aria-describedBy":e.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),RC=["id"],pa=n.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:r,formField:o}=n.toRefs(t),{validationErrors:i}=n.toRefs(ee()),{type:a}=o.value,s=a==="password",l=wC(12),c=n.computed(()=>ps(i.value[r.value])),u=n.computed(()=>{var m;return((m=c.value)==null?void 0:m.length)>0}),d=n.computed(()=>u.value?l:void 0);return(m,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s?(n.openBlock(),n.createBlock(Fr,{key:0,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,hasError:n.unref(u),describedBy:n.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(n.openBlock(),n.createBlock(OC,{key:1,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,"dial-code":n.unref(o).dialCode,"dial-code-list":n.unref(o).dialCodeList,type:n.unref(o).type,hasError:n.unref(u),describedBy:n.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),n.unref(u)?(n.openBlock(),n.createElementBlock("div",{key:2,id:n.unref(d)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(c),(p,g)=>(n.openBlock(),n.createElementBlock("p",{key:g,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(I)(p)),1))),128))],8,RC)):n.createCommentVNode("",!0)],64))}}),ge=n.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:r}=n.toRefs(t),{state:o}=Ur();let i=[];return n.onBeforeMount(()=>{i=bl(r.value,o.value)}),(a,s)=>(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(i),([l,c])=>(n.openBlock(),n.createBlock(pa,{name:l,key:l,formField:c},null,8,["name","formField"]))),128))}}),$t=n.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:r}=n.toRefs(t),{toFederatedSignIn:o}=ee(),i=()=>{o({provider:r.value})};return(a,s)=>{const l=ne;return n.openBlock(),n.createBlock(l,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default")]),_:3})}}}),DC=n.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[n.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),$C={class:"amplify-text"},BC=n.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"},[n.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),VC={class:"amplify-text"},zC=n.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[n.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),LC={class:"amplify-text"},GC=n.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[n.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"}),n.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"}),n.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"}),n.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),jC={class:"amplify-text"},WC=["data-label"],Tn=n.defineComponent({__name:"federated-sign-in",setup(e){const t=ee(),{route:r,socialProviders:o}=t,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),l=o==null?void 0:o.includes("google"),c=s||l||i||a,{getSignInWithFederationText:u,getOrText:d}=ie,m=n.computed(()=>Ln),f=n.computed(()=>u(r,"amazon")),p=n.computed(()=>u(r,"apple")),g=n.computed(()=>u(r,"facebook")),y=n.computed(()=>u(r,"google")),w=n.computed(()=>d());return(h,S)=>{const v=X;return n.unref(c)?(n.openBlock(),n.createBlock(v,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:n.withCtx(()=>[n.unref(i)?(n.openBlock(),n.createBlock($t,{key:0,provider:n.unref(m).Amazon},{default:n.withCtx(()=>[DC,n.createElementVNode("span",$C,n.toDisplayString(n.unref(f)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(a)?(n.openBlock(),n.createBlock($t,{key:1,provider:n.unref(m).Apple},{default:n.withCtx(()=>[BC,n.createElementVNode("span",VC,n.toDisplayString(n.unref(p)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock($t,{key:2,provider:n.unref(m).Facebook},{default:n.withCtx(()=>[zC,n.createElementVNode("span",LC,n.toDisplayString(n.unref(g)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(l)?(n.openBlock(),n.createBlock($t,{key:3,provider:n.unref(m).Google},{default:n.withCtx(()=>[GC,n.createElementVNode("span",jC,n.toDisplayString(n.unref(y)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":n.unref(w)},null,8,WC)]),_:1})):n.createCommentVNode("",!0)}}}),HC=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),KC={"data-amplify-footer":""},Or=n.defineComponent({__name:"sign-in",setup(e){const t=ee(),{submitForm:r,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=n.toRefs(t),{getForgotPasswordText:l,getSignInText:c,getSigningInText:u}=ie,d=n.computed(()=>l()),m=n.computed(()=>c()),f=n.computed(()=>u()),p=w=>{const{name:h,value:S}=w.target;o({name:h,value:S})},g=w=>{r(de(w))},y=()=>{i()};return(w,h)=>{const S=pe,v=fe,_=ne,C=X,E=ue,A=ce;return n.renderSlot(w.$slots,"signInSlotI",n.normalizeProps(n.guardReactiveProps(w.$attrs)),()=>[n.renderSlot(w.$slots,"header"),n.createVNode(C,n.normalizeProps(n.guardReactiveProps(w.$attrs)),{default:n.withCtx(()=>[n.createVNode(E,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:n.withModifiers(g,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"form",{info:T,onSignInSubmit:g,onInput:p,onForgotPasswordClicked:y})]),default:n.withCtx(()=>[n.createVNode(Tn),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(S,{disabled:n.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"signin-fields",{info:T})]),default:n.withCtx(()=>[HC,n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(v,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(_,{disabled:n.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)?n.unref(f):n.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),n.createVNode(A,null,{default:n.withCtx(()=>[n.renderSlot(w.$slots,"footer",{},()=>[n.createElementVNode("div",KC,[n.createVNode(_,{onClick:y,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(d)),1)]),_:1})])])]),_:3})])}}}),Rr=n.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,r)=>(n.openBlock(),n.createBlock(ge,{route:"signUp"}))}}),Dr=n.defineComponent({__name:"sign-up",setup(e){const t=ee(),{submitForm:r,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:l}=n.toRefs(t),{getCreateAccountText:c}=ie,u=n.computed(()=>c()),d=p=>{const{checked:g,name:y,type:w,value:h}=p.target;i({name:y,value:w==="checkbox"&&!g?void 0:h})};function m(p){const{name:g}=p.target;o({name:g})}const f=p=>{r(de(p))};return(p,g)=>{const y=pe,w=fe,h=ne,S=X,v=ue,_=ce;return n.renderSlot(p.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(p.$attrs)),()=>[n.renderSlot(p.$slots,"header"),n.createVNode(S,n.normalizeProps(n.guardReactiveProps(p.$attrs)),{default:n.withCtx(()=>[n.createVNode(v,{onInput:d,onBlurCapture:m,onSubmit:n.withModifiers(f,["prevent"])},{default:n.withCtx(()=>[n.createVNode(Tn),n.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(l)},{fieldSetI:n.withCtx(({slotData:C})=>[n.renderSlot(p.$slots,"signup-fields",{info:C})]),default:n.withCtx(()=>[n.createVNode(Rr)]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(w,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:n.unref(l)||n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),n.createVNode(_,null,{default:n.withCtx(()=>[n.renderSlot(p.$slots,"footer")]),_:3})])}}}),YC={};function qC(e,t){const r=X;return n.openBlock(),n.createBlock(r,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:n.withCtx(()=>[n.createVNode(r,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3})]),_:3})}const JC=sn(YC,[["render",qC]]),ZC=["tabindex","aria-selected","id","aria-controls"],QC=n.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:r,id:o,label:i}=n.toRefs(t);return(a,s)=>(n.openBlock(),n.createElementBlock("button",{tabindex:n.unref(r)?0:-1,"aria-selected":n.unref(r)?"true":"false",class:n.normalizeClass([{"amplify-tabs__item--active":n.unref(r)},"amplify-tabs__item"]),id:`${n.unref(o)}-tab`,"aria-controls":`${n.unref(o)}-panel`,role:"tab"},n.toDisplayString(n.unref(i)),11,ZC))}}),XC="4.3.8",eb={};function tb(e,t){return n.renderSlot(e.$slots,"textI",n.normalizeProps(n.guardReactiveProps(e.$attrs)),()=>[n.createElementVNode("span",n.mergeProps(e.$attrs,{"data-amplify-text":""}),[n.renderSlot(e.$slots,"default")],16)])}const $r=sn(eb,[["render",tb]]),ve=n.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:r}){var s,l;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${r.class||""} amplify-heading--${e.level}`;if(((l=(s=i[0])==null?void 0:s.children)==null?void 0:l.length)===0)i[0].children=[n.h(`h${e.level}`,{...r,class:a},[o])];else return()=>n.h(`h${e.level}`,{"data-amplify-heading":"",...r,class:a},[i[0]?n.h(i[0].children[0]):n.h(o[0])]);return()=>i}}),Br=n.defineComponent({__name:"confirm-sign-up",setup(e){const t=ee(),{codeDeliveryDetails:r,error:o,isPending:i}=n.toRefs(t),{resendCode:a,submitForm:s,updateForm:l}=t,{getDeliveryMethodText:c,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=ie,f=n.computed(()=>c(r.value)),p=n.computed(()=>d()),g=n.computed(()=>m()),y=n.computed(()=>u(r.value)),w=_=>{const{name:C,value:E}=_.target;l({name:C,value:E})},h=_=>{S(_)},S=_=>{s(de(_))},v=()=>{a()};return(_,C)=>{const E=ve,A=$r,T=pe,P=fe,k=ne,N=ce,U=X,F=ue;return n.renderSlot(_.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(_.$attrs)),()=>[n.createVNode(U,n.normalizeProps(n.guardReactiveProps(_.$attrs)),{default:n.withCtx(()=>[n.createVNode(F,{onInput:w,onSubmit:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createVNode(U,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(_.$slots,"header",{},()=>[n.createVNode(E,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(A,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(y)),1)]),_:1}),n.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),n.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(o)?(n.openBlock(),n.createBlock(P,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(o))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(g)),1)]),_:1},8,["disabled"]),n.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(v,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Vr=n.defineComponent({__name:"confirm-sign-in",setup(e){const t=ee(),{submitForm:r,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:l}=n.toRefs(t),c=n.computed(()=>l.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=ie,f=n.computed(()=>m(c.value)),p=n.computed(()=>u()),g=n.computed(()=>d()),y=S=>{const{name:v,value:_}=S.target;i({name:v,value:_})},w=S=>{r(de(S))},h=()=>{o()};return(S,v)=>{const _=ve,C=X,E=fe,A=ne,T=ce,P=pe,k=ue;return n.renderSlot(S.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.createVNode(C,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:y,onSubmit:n.withModifiers(w,["prevent"])},{default:n.withCtx(()=>[n.createVNode(P,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(S.$slots,"header",{},()=>[n.createVNode(_,{level:3,class:"amplify-heading"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignIn"})]),_:1}),n.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(a)?(n.openBlock(),n.createBlock(E,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(g)),1)]),_:1},8,["disabled"]),n.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(S.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var kt={},nb=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ma={},le={};let zr;const rb=[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];le.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};le.getSymbolTotalCodewords=function(t){return rb[t]};le.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};le.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');zr=t};le.isKanjiModeEnabled=function(){return typeof zr<"u"};le.toSJIS=function(t){return zr(t)};var In={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,i){if(e.isValid(o))return o;try{return t(o)}catch{return i}}})(In);function ga(){this.buffer=[],this.length=0}ga.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var ob=ga;function Nt(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)}Nt.prototype.set=function(e,t,r,o){const i=e*this.size+t;this.data[i]=r,o&&(this.reservedBit[i]=!0)};Nt.prototype.get=function(e,t){return this.data[e*this.size+t]};Nt.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};Nt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var ib=Nt,ha={};(function(e){const t=le.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=t(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,l=[a-7];for(let c=1;c<i-1;c++)l[c]=l[c-1]-s;return l.push(6),l.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let l=0;l<s;l++)for(let c=0;c<s;c++)l===0&&c===0||l===0&&c===s-1||l===s-1&&c===0||i.push([a[l],a[c]]);return i}})(ha);var ya={};const ab=le.getSymbolSize,Xo=7;ya.getPositions=function(t){const r=ab(t);return[[0,0],[r-Xo,0],[0,r-Xo]]};var va={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const a=i.size;let s=0,l=0,c=0,u=null,d=null;for(let m=0;m<a;m++){l=c=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?l++:(l>=5&&(s+=t.N1+(l-5)),u=p,l=1),p=i.get(f,m),p===d?c++:(c>=5&&(s+=t.N1+(c-5)),d=p,c=1)}l>=5&&(s+=t.N1+(l-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let l=0;l<a-1;l++)for(let c=0;c<a-1;c++){const u=i.get(l,c)+i.get(l,c+1)+i.get(l+1,c)+i.get(l+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,l=0,c=0;for(let u=0;u<a;u++){l=c=0;for(let d=0;d<a;d++)l=l<<1&2047|i.get(u,d),d>=10&&(l===1488||l===93)&&s++,c=c<<1&2047|i.get(d,u),d>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let c=0;c<s;c++)a+=i.data[c];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function r(o,i,a){switch(o){case e.Patterns.PATTERN000:return(i+a)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(i+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return i*a%2+i*a%3===0;case e.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case e.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(i,a){const s=a.size;for(let l=0;l<s;l++)for(let c=0;c<s;c++)a.isReserved(c,l)||a.xor(c,l,r(i,c,l))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let l=0,c=1/0;for(let u=0;u<s;u++){a(u),e.applyMask(u,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),d<c&&(c=d,l=u)}return l}})(va);var Pn={};const Ie=In,Bt=[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],Vt=[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];Pn.getBlocksCount=function(t,r){switch(r){case Ie.L:return Bt[(t-1)*4+0];case Ie.M:return Bt[(t-1)*4+1];case Ie.Q:return Bt[(t-1)*4+2];case Ie.H:return Bt[(t-1)*4+3];default:return}};Pn.getTotalCodewordsCount=function(t,r){switch(r){case Ie.L:return Vt[(t-1)*4+0];case Ie.M:return Vt[(t-1)*4+1];case Ie.Q:return Vt[(t-1)*4+2];case Ie.H:return Vt[(t-1)*4+3];default:return}};var Sa={},kn={};const ht=new Uint8Array(512),on=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ht[r]=t,on[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ht[r]=ht[r-255]})();kn.log=function(t){if(t<1)throw new Error("log("+t+")");return on[t]};kn.exp=function(t){return ht[t]};kn.mul=function(t,r){return t===0||r===0?0:ht[on[t]+on[r]]};(function(e){const t=kn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let l=0;l<i.length;l++)a[s+l]^=t.mul(o[s],i[l]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let c=0;c<i.length;c++)a[c]^=t.mul(i[c],s);let l=0;for(;l<a.length&&a[l]===0;)l++;a=a.slice(l)}return a},e.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}})(Sa);const _a=Sa;function Lr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Lr.prototype.initialize=function(t){this.degree=t,this.genPoly=_a.generateECPolynomial(this.degree)};Lr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(t.length+this.degree);r.set(t);const o=_a.mod(r,this.genPoly),i=this.degree-o.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(o,i),a}return o};var sb=Lr,wa={},Ne={},Gr={};Gr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Se={};const Ca="[0-9]+",lb="[A-Z $%*+\\-./:]+";let Ct="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ct=Ct.replace(/u/g,"\\u");const cb="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ct+`)(?:.|[\r
|
|
20
|
+
`).concat(l.message))}else return r.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var r=this,o=Hl(t.target),i="internal"in t?t.internal:o?o.some(function(c){return B(c)&&c[0]===r.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),l=b(b({},t),{actions:we(me(t.actions)),cond:gi(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return b(b({},l),{target:l.target?l.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(r.id)})}});return l},e.prototype.formatTransitions=function(){var t,r,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=st,l=a[s],c=l===void 0?[]:l,u=cr(a,[typeof s=="symbol"?s:s+""]);i=j(Object.keys(u).map(function(S){!W&&S===ze&&q(!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 v=De(S,u[S]);return W||Cc(o,S,v),v}).concat(De(st,c)))}var d=this.config.always?De("",this.config.always):[],m=this.config.onDone?De(String(dt(this.id)),this.config.onDone):[];W||q(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var f=j(this.invoke.map(function(S){var v=[];return S.onDone&&v.push.apply(v,L([],$(De(String(gt(S.id)),S.onDone)),!1)),S.onError&&v.push.apply(v,L([],$(De(String(Le(S.id)),S.onError)),!1)),v})),p=this.after,g=j(L(L(L(L([],$(m),!1),$(f),!1),$(i),!1),$(d),!1).map(function(S){return me(S).map(function(v){return o.formatTransition(v)})}));try{for(var y=D(p),w=y.next();!w.done;w=y.next()){var h=w.value;g.push(h)}}catch(S){t={error:S}}finally{try{w&&!w.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}return g},e}(),uo=!1;function Ze(e,t){return!W&&!("predictableActionArguments"in e)&&!uo&&(uo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new bc(e,t)}var _e=Ii,gn=wi,Ac=ki,Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ec(e,t){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=t(e[r],r,e);return i}var $i=Ec;function Tc(){this.__data__=[],this.size=0}var Ic=Tc;function Pc(e,t){return e===t||e!==e&&t!==t}var At=Pc,kc=At;function Nc(e,t){for(var r=e.length;r--;)if(kc(e[r][0],t))return r;return-1}var hn=Nc,Mc=hn,xc=Array.prototype,Uc=xc.splice;function Fc(e){var t=this.__data__,r=Mc(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():Uc.call(t,r,1),--this.size,!0}var Oc=Fc,Rc=hn;function Dc(e){var t=this.__data__,r=Rc(t,e);return r<0?void 0:t[r][1]}var $c=Dc,Bc=hn;function Vc(e){return Bc(this.__data__,e)>-1}var zc=Vc,Lc=hn;function Gc(e,t){var r=this.__data__,o=Lc(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}var jc=Gc,Wc=Ic,Hc=Oc,Kc=$c,Yc=zc,qc=jc;function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Qe.prototype.clear=Wc;Qe.prototype.delete=Hc;Qe.prototype.get=Kc;Qe.prototype.has=Yc;Qe.prototype.set=qc;var yn=Qe,Jc=yn;function Zc(){this.__data__=new Jc,this.size=0}var Qc=Zc;function Xc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var eu=Xc;function tu(e){return this.__data__.get(e)}var nu=tu;function ru(e){return this.__data__.has(e)}var ou=ru,iu=typeof Ft=="object"&&Ft&&Ft.Object===Object&&Ft,Bi=iu,au=Bi,su=typeof self=="object"&&self&&self.Object===Object&&self,lu=au||su||Function("return this")(),ye=lu,cu=ye,uu=cu.Symbol,vn=uu,fo=vn,Vi=Object.prototype,du=Vi.hasOwnProperty,fu=Vi.toString,lt=fo?fo.toStringTag:void 0;function pu(e){var t=du.call(e,lt),r=e[lt];try{e[lt]=void 0;var o=!0}catch{}var i=fu.call(e);return o&&(t?e[lt]=r:delete e[lt]),i}var mu=pu,gu=Object.prototype,hu=gu.toString;function yu(e){return hu.call(e)}var vu=yu,po=vn,Su=mu,_u=vu,wu="[object Null]",Cu="[object Undefined]",mo=po?po.toStringTag:void 0;function bu(e){return e==null?e===void 0?Cu:wu:mo&&mo in Object(e)?Su(e):_u(e)}var Xe=bu;function Au(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ae=Au,Eu=Xe,Tu=Ae,Iu="[object AsyncFunction]",Pu="[object Function]",ku="[object GeneratorFunction]",Nu="[object Proxy]";function Mu(e){if(!Tu(e))return!1;var t=Eu(e);return t==Pu||t==ku||t==Iu||t==Nu}var hr=Mu,xu=ye,Uu=xu["__core-js_shared__"],Fu=Uu,Fn=Fu,go=function(){var e=/[^.]+$/.exec(Fn&&Fn.keys&&Fn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ou(e){return!!go&&go in e}var Ru=Ou,Du=Function.prototype,$u=Du.toString;function Bu(e){if(e!=null){try{return $u.call(e)}catch{}try{return e+""}catch{}}return""}var zi=Bu,Vu=hr,zu=Ru,Lu=Ae,Gu=zi,ju=/[\\^$.*+?()[\]{}|]/g,Wu=/^\[object .+?Constructor\]$/,Hu=Function.prototype,Ku=Object.prototype,Yu=Hu.toString,qu=Ku.hasOwnProperty,Ju=RegExp("^"+Yu.call(qu).replace(ju,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zu(e){if(!Lu(e)||zu(e))return!1;var t=Vu(e)?Ju:Wu;return t.test(Gu(e))}var Qu=Zu;function Xu(e,t){return e==null?void 0:e[t]}var ed=Xu,td=Qu,nd=ed;function rd(e,t){var r=nd(e,t);return td(r)?r:void 0}var Fe=rd,od=Fe,id=ye,ad=od(id,"Map"),yr=ad,sd=Fe,ld=sd(Object,"create"),Sn=ld,ho=Sn;function cd(){this.__data__=ho?ho(null):{},this.size=0}var ud=cd;function dd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fd=dd,pd=Sn,md="__lodash_hash_undefined__",gd=Object.prototype,hd=gd.hasOwnProperty;function yd(e){var t=this.__data__;if(pd){var r=t[e];return r===md?void 0:r}return hd.call(t,e)?t[e]:void 0}var vd=yd,Sd=Sn,_d=Object.prototype,wd=_d.hasOwnProperty;function Cd(e){var t=this.__data__;return Sd?t[e]!==void 0:wd.call(t,e)}var bd=Cd,Ad=Sn,Ed="__lodash_hash_undefined__";function Td(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ad&&t===void 0?Ed:t,this}var Id=Td,Pd=ud,kd=fd,Nd=vd,Md=bd,xd=Id;function et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}et.prototype.clear=Pd;et.prototype.delete=kd;et.prototype.get=Nd;et.prototype.has=Md;et.prototype.set=xd;var Ud=et,yo=Ud,Fd=yn,Od=yr;function Rd(){this.size=0,this.__data__={hash:new yo,map:new(Od||Fd),string:new yo}}var Dd=Rd;function $d(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Bd=$d,Vd=Bd;function zd(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var _n=zd,Ld=_n;function Gd(e){var t=Ld(this,e).delete(e);return this.size-=t?1:0,t}var jd=Gd,Wd=_n;function Hd(e){return Wd(this,e).get(e)}var Kd=Hd,Yd=_n;function qd(e){return Yd(this,e).has(e)}var Jd=qd,Zd=_n;function Qd(e,t){var r=Zd(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}var Xd=Qd,ef=Dd,tf=jd,nf=Kd,rf=Jd,of=Xd;function tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=ef;tt.prototype.delete=tf;tt.prototype.get=nf;tt.prototype.has=rf;tt.prototype.set=of;var vr=tt,af=yn,sf=yr,lf=vr,cf=200;function uf(e,t){var r=this.__data__;if(r instanceof af){var o=r.__data__;if(!sf||o.length<cf-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new lf(o)}return r.set(e,t),this.size=r.size,this}var df=uf,ff=yn,pf=Qc,mf=eu,gf=nu,hf=ou,yf=df;function nt(e){var t=this.__data__=new ff(e);this.size=t.size}nt.prototype.clear=pf;nt.prototype.delete=mf;nt.prototype.get=gf;nt.prototype.has=hf;nt.prototype.set=yf;var Sr=nt,vf="__lodash_hash_undefined__";function Sf(e){return this.__data__.set(e,vf),this}var _f=Sf;function wf(e){return this.__data__.has(e)}var Cf=wf,bf=vr,Af=_f,Ef=Cf;function en(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bf;++t<r;)this.add(e[t])}en.prototype.add=en.prototype.push=Af;en.prototype.has=Ef;var Tf=en;function If(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}var Pf=If;function kf(e,t){return e.has(t)}var Nf=kf,Mf=Tf,xf=Pf,Uf=Nf,Ff=1,Of=2;function Rf(e,t,r,o,i,a){var s=r&Ff,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var m=-1,f=!0,p=r&Of?new Mf:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var g=e[m],y=t[m];if(o)var w=s?o(y,g,m,t,e,a):o(g,y,m,e,t,a);if(w!==void 0){if(w)continue;f=!1;break}if(p){if(!xf(t,function(h,S){if(!Uf(p,S)&&(g===h||i(g,h,r,o,a)))return p.push(S)})){f=!1;break}}else if(!(g===y||i(g,y,r,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Li=Rf,Df=ye,$f=Df.Uint8Array,Gi=$f;function Bf(e){var t=-1,r=Array(e.size);return e.forEach(function(o,i){r[++t]=[i,o]}),r}var Vf=Bf;function zf(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}var Lf=zf,vo=vn,So=Gi,Gf=At,jf=Li,Wf=Vf,Hf=Lf,Kf=1,Yf=2,qf="[object Boolean]",Jf="[object Date]",Zf="[object Error]",Qf="[object Map]",Xf="[object Number]",ep="[object RegExp]",tp="[object Set]",np="[object String]",rp="[object Symbol]",op="[object ArrayBuffer]",ip="[object DataView]",_o=vo?vo.prototype:void 0,On=_o?_o.valueOf:void 0;function ap(e,t,r,o,i,a,s){switch(r){case ip:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case op:return!(e.byteLength!=t.byteLength||!a(new So(e),new So(t)));case qf:case Jf:case Xf:return Gf(+e,+t);case Zf:return e.name==t.name&&e.message==t.message;case ep:case np:return e==t+"";case Qf:var l=Wf;case tp:var c=o&Kf;if(l||(l=Hf),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;o|=Yf,s.set(e,t);var d=jf(l(e),l(t),o,i,a,s);return s.delete(e),d;case rp:if(On)return On.call(e)==On.call(t)}return!1}var sp=ap;function lp(e,t){for(var r=-1,o=t.length,i=e.length;++r<o;)e[i+r]=t[r];return e}var ji=lp,cp=Array.isArray,Ee=cp,up=ji,dp=Ee;function fp(e,t,r){var o=t(e);return dp(e)?o:up(o,r(e))}var Wi=fp;function pp(e,t){for(var r=-1,o=e==null?0:e.length,i=0,a=[];++r<o;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var mp=pp;function gp(){return[]}var Hi=gp,hp=mp,yp=Hi,vp=Object.prototype,Sp=vp.propertyIsEnumerable,wo=Object.getOwnPropertySymbols,_p=wo?function(e){return e==null?[]:(e=Object(e),hp(wo(e),function(t){return Sp.call(e,t)}))}:yp,Ki=_p;function wp(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}var Cp=wp;function bp(e){return e!=null&&typeof e=="object"}var Oe=bp,Ap=Xe,Ep=Oe,Tp="[object Arguments]";function Ip(e){return Ep(e)&&Ap(e)==Tp}var Pp=Ip,Co=Pp,kp=Oe,Yi=Object.prototype,Np=Yi.hasOwnProperty,Mp=Yi.propertyIsEnumerable,xp=Co(function(){return arguments}())?Co:function(e){return kp(e)&&Np.call(e,"callee")&&!Mp.call(e,"callee")},_r=xp,tn={exports:{}};function Up(){return!1}var Fp=Up;tn.exports;(function(e,t){var r=ye,o=Fp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||o;e.exports=u})(tn,tn.exports);var wr=tn.exports,Op=9007199254740991,Rp=/^(?:0|[1-9]\d*)$/;function Dp(e,t){var r=typeof e;return t=t??Op,!!t&&(r=="number"||r!="symbol"&&Rp.test(e))&&e>-1&&e%1==0&&e<t}var wn=Dp,$p=9007199254740991;function Bp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$p}var Cr=Bp,Vp=Xe,zp=Cr,Lp=Oe,Gp="[object Arguments]",jp="[object Array]",Wp="[object Boolean]",Hp="[object Date]",Kp="[object Error]",Yp="[object Function]",qp="[object Map]",Jp="[object Number]",Zp="[object Object]",Qp="[object RegExp]",Xp="[object Set]",em="[object String]",tm="[object WeakMap]",nm="[object ArrayBuffer]",rm="[object DataView]",om="[object Float32Array]",im="[object Float64Array]",am="[object Int8Array]",sm="[object Int16Array]",lm="[object Int32Array]",cm="[object Uint8Array]",um="[object Uint8ClampedArray]",dm="[object Uint16Array]",fm="[object Uint32Array]",G={};G[om]=G[im]=G[am]=G[sm]=G[lm]=G[cm]=G[um]=G[dm]=G[fm]=!0;G[Gp]=G[jp]=G[nm]=G[Wp]=G[rm]=G[Hp]=G[Kp]=G[Yp]=G[qp]=G[Jp]=G[Zp]=G[Qp]=G[Xp]=G[em]=G[tm]=!1;function pm(e){return Lp(e)&&zp(e.length)&&!!G[Vp(e)]}var mm=pm;function gm(e){return function(t){return e(t)}}var hm=gm,nn={exports:{}};nn.exports;(function(e,t){var r=Bi,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&r.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(nn,nn.exports);var ym=nn.exports,vm=mm,Sm=hm,bo=ym,Ao=bo&&bo.isTypedArray,_m=Ao?Sm(Ao):vm,br=_m,wm=Cp,Cm=_r,bm=Ee,Am=wr,Em=wn,Tm=br,Im=Object.prototype,Pm=Im.hasOwnProperty;function km(e,t){var r=bm(e),o=!r&&Cm(e),i=!r&&!o&&Am(e),a=!r&&!o&&!i&&Tm(e),s=r||o||i||a,l=s?wm(e.length,String):[],c=l.length;for(var u in e)(t||Pm.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Em(u,c)))&&l.push(u);return l}var qi=km,Nm=Object.prototype;function Mm(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Nm;return e===r}var Ar=Mm;function xm(e,t){return function(r){return e(t(r))}}var Ji=xm,Um=Ji,Fm=Um(Object.keys,Object),Om=Fm,Rm=Ar,Dm=Om,$m=Object.prototype,Bm=$m.hasOwnProperty;function Vm(e){if(!Rm(e))return Dm(e);var t=[];for(var r in Object(e))Bm.call(e,r)&&r!="constructor"&&t.push(r);return t}var zm=Vm,Lm=hr,Gm=Cr;function jm(e){return e!=null&&Gm(e.length)&&!Lm(e)}var Cn=jm,Wm=qi,Hm=zm,Km=Cn;function Ym(e){return Km(e)?Wm(e):Hm(e)}var Zi=Ym,qm=Wi,Jm=Ki,Zm=Zi;function Qm(e){return qm(e,Zm,Jm)}var Xm=Qm,Eo=Xm,eg=1,tg=Object.prototype,ng=tg.hasOwnProperty;function rg(e,t,r,o,i,a){var s=r&eg,l=Eo(e),c=l.length,u=Eo(t),d=u.length;if(c!=d&&!s)return!1;for(var m=c;m--;){var f=l[m];if(!(s?f in t:ng.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=s;++m<c;){f=l[m];var h=e[f],S=t[f];if(o)var v=s?o(S,h,f,t,e,a):o(h,S,f,e,t,a);if(!(v===void 0?h===S||i(h,S,r,o,a):v)){y=!1;break}w||(w=f=="constructor")}if(y&&!w){var _=e.constructor,C=t.constructor;_!=C&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(e),a.delete(t),y}var og=rg,ig=Fe,ag=ye,sg=ig(ag,"DataView"),lg=sg,cg=Fe,ug=ye,dg=cg(ug,"Promise"),fg=dg,pg=Fe,mg=ye,gg=pg(mg,"Set"),hg=gg,yg=Fe,vg=ye,Sg=yg(vg,"WeakMap"),_g=Sg,Jn=lg,Zn=yr,Qn=fg,Xn=hg,er=_g,Qi=Xe,rt=zi,To="[object Map]",wg="[object Object]",Io="[object Promise]",Po="[object Set]",ko="[object WeakMap]",No="[object DataView]",Cg=rt(Jn),bg=rt(Zn),Ag=rt(Qn),Eg=rt(Xn),Tg=rt(er),xe=Qi;(Jn&&xe(new Jn(new ArrayBuffer(1)))!=No||Zn&&xe(new Zn)!=To||Qn&&xe(Qn.resolve())!=Io||Xn&&xe(new Xn)!=Po||er&&xe(new er)!=ko)&&(xe=function(e){var t=Qi(e),r=t==wg?e.constructor:void 0,o=r?rt(r):"";if(o)switch(o){case Cg:return No;case bg:return To;case Ag:return Io;case Eg:return Po;case Tg:return ko}return t});var Ig=xe,Rn=Sr,Pg=Li,kg=sp,Ng=og,Mo=Ig,xo=Ee,Uo=wr,Mg=br,xg=1,Fo="[object Arguments]",Oo="[object Array]",Ot="[object Object]",Ug=Object.prototype,Ro=Ug.hasOwnProperty;function Fg(e,t,r,o,i,a){var s=xo(e),l=xo(t),c=s?Oo:Mo(e),u=l?Oo:Mo(t);c=c==Fo?Ot:c,u=u==Fo?Ot:u;var d=c==Ot,m=u==Ot,f=c==u;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new Rn),s||Mg(e)?Pg(e,t,r,o,i,a):kg(e,t,c,r,o,i,a);if(!(r&xg)){var p=d&&Ro.call(e,"__wrapped__"),g=m&&Ro.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,w=g?t.value():t;return a||(a=new Rn),i(y,w,r,o,a)}}return f?(a||(a=new Rn),Ng(e,t,r,o,i,a)):!1}var Og=Fg,Rg=Og,Do=Oe;function Xi(e,t,r,o,i){return e===t?!0:e==null||t==null||!Do(e)&&!Do(t)?e!==e&&t!==t:Rg(e,t,r,o,Xi,i)}var ea=Xi,Dg=Sr,$g=ea,Bg=1,Vg=2;function zg(e,t,r,o){var i=r.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var m=new Dg;if(o)var f=o(u,d,c,e,t,m);if(!(f===void 0?$g(d,u,Bg|Vg,o,m):f))return!1}}return!0}var Lg=zg,Gg=Ae;function jg(e){return e===e&&!Gg(e)}var ta=jg,Wg=ta,Hg=Zi;function Kg(e){for(var t=Hg(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,Wg(i)]}return t}var Yg=Kg;function qg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var na=qg,Jg=Lg,Zg=Yg,Qg=na;function Xg(e){var t=Zg(e);return t.length==1&&t[0][2]?Qg(t[0][0],t[0][1]):function(r){return r===e||Jg(r,e,t)}}var eh=Xg,th=Xe,nh=Oe,rh="[object Symbol]";function oh(e){return typeof e=="symbol"||nh(e)&&th(e)==rh}var Er=oh,ih=Ee,ah=Er,sh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lh=/^\w*$/;function ch(e,t){if(ih(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ah(e)?!0:lh.test(e)||!sh.test(e)||t!=null&&e in Object(t)}var Tr=ch,ra=vr,uh="Expected a function";function Ir(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(uh);var r=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return r.cache=a.set(i,s)||a,s};return r.cache=new(Ir.Cache||ra),r}Ir.Cache=ra;var dh=Ir,fh=dh,ph=500;function mh(e){var t=fh(e,function(o){return r.size===ph&&r.clear(),o}),r=t.cache;return t}var gh=mh,hh=gh,yh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vh=/\\(\\)?/g,Sh=hh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yh,function(r,o,i,a){t.push(i?a.replace(vh,"$1"):o||r)}),t}),_h=Sh,$o=vn,wh=$i,Ch=Ee,bh=Er,Bo=$o?$o.prototype:void 0,Vo=Bo?Bo.toString:void 0;function oa(e){if(typeof e=="string")return e;if(Ch(e))return wh(e,oa)+"";if(bh(e))return Vo?Vo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ah=oa,Eh=Ah;function Th(e){return e==null?"":Eh(e)}var Ih=Th,Ph=Ee,kh=Tr,Nh=_h,Mh=Ih;function xh(e,t){return Ph(e)?e:kh(e,t)?[e]:Nh(Mh(e))}var bn=xh,Uh=Er;function Fh(e){if(typeof e=="string"||Uh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Et=Fh,Oh=bn,Rh=Et;function Dh(e,t){t=Oh(t,e);for(var r=0,o=t.length;e!=null&&r<o;)e=e[Rh(t[r++])];return r&&r==o?e:void 0}var Pr=Dh,$h=Pr;function Bh(e,t,r){var o=e==null?void 0:$h(e,t);return o===void 0?r:o}var Vh=Bh;function zh(e,t){return e!=null&&t in Object(e)}var Lh=zh,Gh=bn,jh=_r,Wh=Ee,Hh=wn,Kh=Cr,Yh=Et;function qh(e,t,r){t=Gh(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Yh(t[o]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Kh(i)&&Hh(s,i)&&(Wh(e)||jh(e)))}var Jh=qh,Zh=Lh,Qh=Jh;function Xh(e,t){return e!=null&&Qh(e,t,Zh)}var ey=Xh,ty=ea,ny=Vh,ry=ey,oy=Tr,iy=ta,ay=na,sy=Et,ly=1,cy=2;function uy(e,t){return oy(e)&&iy(t)?ay(sy(e),t):function(r){var o=ny(r,e);return o===void 0&&o===t?ry(r,e):ty(t,o,ly|cy)}}var dy=uy;function fy(e){return e}var kr=fy;function py(e){return function(t){return t==null?void 0:t[e]}}var my=py,gy=Pr;function hy(e){return function(t){return gy(t,e)}}var yy=hy,vy=my,Sy=yy,_y=Tr,wy=Et;function Cy(e){return _y(e)?vy(wy(e)):Sy(e)}var by=Cy,Ay=eh,Ey=dy,Ty=kr,Iy=Ee,Py=by;function ky(e){return typeof e=="function"?e:e==null?Ty:typeof e=="object"?Iy(e)?Ey(e[0],e[1]):Ay(e):Py(e)}var Ny=ky,My=Fe,xy=function(){try{var e=My(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ia=xy,zo=ia;function Uy(e,t,r){t=="__proto__"&&zo?zo(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Nr=Uy,Fy=Nr,Oy=At,Ry=Object.prototype,Dy=Ry.hasOwnProperty;function $y(e,t,r){var o=e[t];(!(Dy.call(e,t)&&Oy(o,r))||r===void 0&&!(t in e))&&Fy(e,t,r)}var aa=$y,By=aa,Vy=bn,zy=wn,Lo=Ae,Ly=Et;function Gy(e,t,r,o){if(!Lo(e))return e;t=Vy(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var c=Ly(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=s){var d=l[c];u=o?o(d,c,l):void 0,u===void 0&&(u=Lo(d)?d:zy(t[i+1])?[]:{})}By(l,c,u),l=l[c]}return e}var jy=Gy,Wy=Pr,Hy=jy,Ky=bn;function Yy(e,t,r){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],l=Wy(e,s);r(l,s)&&Hy(a,Ky(s,e),l)}return a}var qy=Yy,Jy=Ji,Zy=Jy(Object.getPrototypeOf,Object),Mr=Zy,Qy=ji,Xy=Mr,ev=Ki,tv=Hi,nv=Object.getOwnPropertySymbols,rv=nv?function(e){for(var t=[];e;)Qy(t,ev(e)),e=Xy(e);return t}:tv,ov=rv;function iv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var av=iv,sv=Ae,lv=Ar,cv=av,uv=Object.prototype,dv=uv.hasOwnProperty;function fv(e){if(!sv(e))return cv(e);var t=lv(e),r=[];for(var o in e)o=="constructor"&&(t||!dv.call(e,o))||r.push(o);return r}var pv=fv,mv=qi,gv=pv,hv=Cn;function yv(e){return hv(e)?mv(e,!0):gv(e)}var xr=yv,vv=Wi,Sv=ov,_v=xr;function wv(e){return vv(e,_v,Sv)}var Cv=wv,bv=$i,Av=Ny,Ev=qy,Tv=Cv;function Iv(e,t){if(e==null)return{};var r=bv(Tv(e),function(o){return[o]});return t=Av(t),Ev(e,r,function(o,i){return t(o,i[0])})}var Pv=Iv;const kv=Di(Pv),Nv=!0,Mv="",wt=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),xv=(e,t)=>{switch(t){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 t.startsWith("custom:")}},Uv=e=>{const{phone_number:t,...r}=kv(e,xv);if(ni(t)&&t!==Mv){const{country_code:o}=e;return{...r,phone_number:wt(o,t)}}return r},Fv=(e,t,r,o)=>{const{password:i,...a}=t,s=Uv(a),l=o&&o!=="PASSWORD";let c=s;o==="SMS_OTP"&&s.email&&(c={...s,email:""});const u={autoSignIn:l?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:Nv,userAttributes:{...r==="phone_number"?{...c,phone_number:e}:c}};return{username:e,password:l?void 0:i,options:u}},Ov=({formValues:e,loginMechanisms:t})=>{const r=e.__authMethod;if(r==="SMS_OTP"){const{country_code:i,phone_number:a}=e;return wt(i,a)}if(r==="EMAIL_OTP")return e.email;if(t.includes("username"))return e.username;const o=t[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=e;return wt(i,a)}return e[o]},Rv=(e,t)=>{const r=[],o=t!==void 0;r.push("PASSWORD"),(o||e!=null&&e.emailOtpEnabled)&&r.push("EMAIL_OTP"),(o||e!=null&&e.smsOtpEnabled)&&r.push("SMS_OTP"),(o||e!=null&&e.webAuthnEnabled)&&r.push("WEB_AUTHN");const i=t??[],a=r.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:R}=Ni,Dv=R({actorDoneData:void 0}),$v=R({challengeName:void 0}),Bv=R({missingAttributes:void 0}),Vv=R({remoteError:void 0}),zv=R({formValues:e=>{var t;return{username:(t=e.formValues)==null?void 0:t.username}}}),Lv=R({touched:{}}),Gv=R({user:void 0}),jv=R({validationError:{}}),Wv=R({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:r}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),Hv=R({allowedMfaTypes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.allowedMFATypes}}),Kv=R({step:"SIGN_IN"}),Yv=R({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),qv=R({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Jv=R({challengeName:(e,{data:t})=>{const{signInStep:r}=t.nextStep;switch(r){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}}}),Zv=R({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?wt(i,o):o}}),Qv=R({username:Ov}),Xv=R({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?wt(i,o):o}}),eS=R({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),tS=R({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),nS=R({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),rS=R({missingAttributes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.missingAttributes}}),oS=R({validationError:(e,{data:t})=>t}),iS=R({remoteError:(e,{data:t})=>{if(t.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const r=(t==null?void 0:t.message)||"";return r.includes("USER_AUTH flow not enabled")?I(O.PASSWORDLESS_NOT_ENABLED):r.includes("Cannot send code to either")?I(O.CODE_DELIVERY_FAILED):r.includes("Invalid code or auth state")?I(O.VERIFICATION_CODE_INVALID):r.includes("session is expired")?I(O.VERIFICATION_CODE_EXPIRED):r.includes("ceremony has been canceled")?I(O.PASSKEY_AUTHENTICATION_CANCELED):r||t}}),aS=R({user:(e,{data:t})=>t}),Go=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),sS=R({codeDeliveryDetails:(e,{data:t})=>{var r;return(r=t==null?void 0:t.nextStep)!=null&&r.codeDeliveryDetails?Go(t.nextStep.codeDeliveryDetails):Go(t)}}),lS=R({formValues:(e,{data:t})=>{const{name:r,value:o}=t;return{...e.formValues,[r]:o}}}),cS=R({formValues:(e,{data:t})=>_s({...e.formValues,...t},"password")}),uS=R({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),dS=R({unverifiedUserAttributes:(e,{data:t})=>{const r=t||e.fetchedUserAttributes;if(!r)return{};const{email:o,phone_number:i}=r;return{...o&&{email:o},...i&&{phone_number:i}}}}),fS=R({selectedUserAttribute:void 0}),pS=R({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),mS=R({step:"CONFIRM_SIGN_UP"}),gS=R({selectedAuthMethod:(e,{data:t})=>t.method}),hS=R({selectedAuthMethod:(e,{data:t})=>(t==null?void 0:t.__authMethod)||"PASSWORD"}),yS=R({step:"SELECT_AUTH_METHOD"}),vS=R({fetchedUserAttributes:(e,t)=>t.data}),SS=R({hasExistingPasskeys:(e,t)=>t.data}),_S=R({hasExistingPasskeys:!1}),Tt={clearActorDoneData:Dv,clearChallengeName:$v,clearError:Vv,clearFormValues:zv,clearHasExistingPasskeys:_S,clearMissingAttributes:Bv,clearSelectedUserAttribute:fS,clearTouched:Lv,clearUser:Gv,clearValidationError:jv,handleBlur:uS,handleInput:lS,handleSubmit:cS,setAllowedMfaTypes:Hv,setChallengeName:Jv,setCodeDeliveryDetails:sS,setFetchedUserAttributes:vS,setFieldErrors:oS,setHasExistingPasskeys:SS,setMissingAttributes:rS,setNextResetPasswordStep:nS,setNextSignInStep:eS,setNextSignUpStep:tS,setRemoteError:iS,setConfirmAttributeCompleteStep:qv,setConfirmSignUpSignUpStep:mS,setSelectAuthMethodStep:yS,setSelectedAuthMethod:gS,setSelectedAuthMethodFromForm:hS,setShouldVerifyUserAttributeStep:Yv,setSelectedUserAttribute:pS,setSignInStep:Kv,setTotpSecretCode:Wv,setUser:aS,setUnverifiedUserAttributes:dS,setUsernameForgotPassword:Zv,setUsernameSignIn:Xv,setUsernameSignUp:Qv},wS=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],CS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",bS=(e,{data:t})=>{var r;return((r=t==null?void 0:t.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},AS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",ES=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",TS=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",IS=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",PS=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",kS=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",NS=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",MS=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",xS=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",US=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",FS=({step:e})=>wS.includes(e),OS=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",RS=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",DS=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),$S=({step:e})=>e==="RESET_PASSWORD",BS=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",VS=({step:e})=>e==="CONFIRM_SIGN_UP",zS=(e,t)=>{const r=t.data||e.fetchedUserAttributes;if(!r)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=r;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},LS=(e,{data:t})=>t.message==="User is already confirmed.",GS=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:r})=>e&&e.length>1&&(!t||r===null),jS=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:r}=e||{};return!r||t?!1:typeof r=="boolean"?r:r.afterSignin==="ALWAYS"},WS=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:r}=e||{};return!r||t?!1:typeof r=="boolean"?r:r.afterSignup==="ALWAYS"},HS=({passwordless:e})=>(e==null?void 0:e.passkeyRegistrationPrompts)!=null,KS=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",An={hasCompletedAttributeConfirmation:kS,hasCompletedResetPassword:PS,hasCompletedSignIn:TS,hasCompletedSignUp:IS,hasPasskeyRegistrationPrompts:HS,isConfirmSignUpStep:US,isConfirmUserAttributeStep:NS,isResetPasswordStep:xS,isShouldConfirmUserAttributeStep:MS,isUserAlreadyConfirmed:LS,shouldAutoSignIn:ES,shouldConfirmResetPassword:BS,shouldConfirmSignIn:FS,shouldConfirmSignInWithNewPassword:CS,shouldConfirmSignUp:VS,shouldConfirmSignUpFromSignIn:AS,shouldResetPassword:$S,shouldResetPasswordFromSignIn:bS,shouldReturnToSelectMethod:KS,shouldSelectAuthMethod:GS,shouldSetupTotp:OS,shouldSetupEmail:RS,shouldSelectMfaType:DS,shouldVerifyAttribute:zS,shouldPromptPasskeyRegistration:jS,shouldPromptPasskeyRegistrationAfterSignup:WS};var YS=Nr,qS=At;function JS(e,t,r){(r!==void 0&&!qS(e[t],r)||r===void 0&&!(t in e))&&YS(e,t,r)}var sa=JS;function ZS(e){return function(t,r,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var c=s[e?l:++i];if(r(a[c],c,a)===!1)break}return t}}var QS=ZS,XS=QS,e_=XS(),t_=e_,rn={exports:{}};rn.exports;(function(e,t){var r=ye,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var m=u.length,f=l?l(m):new u.constructor(m);return u.copy(f),f}e.exports=c})(rn,rn.exports);var n_=rn.exports,jo=Gi;function r_(e){var t=new e.constructor(e.byteLength);return new jo(t).set(new jo(e)),t}var o_=r_,i_=o_;function a_(e,t){var r=t?i_(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var s_=a_;function l_(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}var c_=l_,u_=Ae,Wo=Object.create,d_=function(){function e(){}return function(t){if(!u_(t))return{};if(Wo)return Wo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),f_=d_,p_=f_,m_=Mr,g_=Ar;function h_(e){return typeof e.constructor=="function"&&!g_(e)?p_(m_(e)):{}}var y_=h_,v_=Cn,S_=Oe;function __(e){return S_(e)&&v_(e)}var w_=__,C_=Xe,b_=Mr,A_=Oe,E_="[object Object]",T_=Function.prototype,I_=Object.prototype,la=T_.toString,P_=I_.hasOwnProperty,k_=la.call(Object);function N_(e){if(!A_(e)||C_(e)!=E_)return!1;var t=b_(e);if(t===null)return!0;var r=P_.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&la.call(r)==k_}var M_=N_;function x_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ca=x_,U_=aa,F_=Nr;function O_(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),i?F_(r,l,c):U_(r,l,c)}return r}var R_=O_,D_=R_,$_=xr;function B_(e){return D_(e,$_(e))}var V_=B_,Ho=sa,z_=n_,L_=s_,G_=c_,j_=y_,Ko=_r,Yo=Ee,W_=w_,H_=wr,K_=hr,Y_=Ae,q_=M_,J_=br,qo=ca,Z_=V_;function Q_(e,t,r,o,i,a,s){var l=qo(e,r),c=qo(t,r),u=s.get(c);if(u){Ho(e,r,u);return}var d=a?a(l,c,r+"",e,t,s):void 0,m=d===void 0;if(m){var f=Yo(c),p=!f&&H_(c),g=!f&&!p&&J_(c);d=c,f||p||g?Yo(l)?d=l:W_(l)?d=G_(l):p?(m=!1,d=z_(c,!0)):g?(m=!1,d=L_(c,!0)):d=[]:q_(c)||Ko(c)?(d=l,Ko(l)?d=Z_(l):(!Y_(l)||K_(l))&&(d=j_(c))):m=!1}m&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),Ho(e,r,d)}var X_=Q_,ew=Sr,tw=sa,nw=t_,rw=X_,ow=Ae,iw=xr,aw=ca;function ua(e,t,r,o,i){e!==t&&nw(t,function(a,s){if(i||(i=new ew),ow(a))rw(e,t,s,r,ua,o,i);else{var l=o?o(aw(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),tw(e,s,l)}},iw)}var sw=ua;function lw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cw=lw,uw=cw,Jo=Math.max;function dw(e,t,r){return t=Jo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Jo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=r(s),uw(e,this,l)}}var fw=dw;function pw(e){return function(){return e}}var mw=pw,gw=mw,Zo=ia,hw=kr,yw=Zo?function(e,t){return Zo(e,"toString",{configurable:!0,enumerable:!1,value:gw(t),writable:!0})}:hw,vw=yw,Sw=800,_w=16,ww=Date.now;function Cw(e){var t=0,r=0;return function(){var o=ww(),i=_w-(o-r);if(r=o,i>0){if(++t>=Sw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bw=Cw,Aw=vw,Ew=bw,Tw=Ew(Aw),Iw=Tw,Pw=kr,kw=fw,Nw=Iw;function Mw(e,t){return Nw(kw(e,t,Pw),e+"")}var xw=Mw,Uw=At,Fw=Cn,Ow=wn,Rw=Ae;function Dw(e,t,r){if(!Rw(r))return!1;var o=typeof t;return(o=="number"?Fw(r)&&Ow(t,r.length):o=="string"&&t in r)?Uw(r[t],e):!1}var $w=Dw,Bw=xw,Vw=$w;function zw(e){return Bw(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Vw(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t})}var Lw=zw,Gw=sw,jw=Lw,Ww=jw(function(e,t,r){Gw(e,t,r)}),Hw=Ww;const Kw=Di(Hw),En=async(e,t,r,o)=>{const i=await Promise.all(o.map(s=>s(e,t,r))),a=Kw({},...i);return ri(a)?Promise.resolve():Promise.reject(a)},Yw=8,qw=e=>Array.isArray(e),Jw=e=>{if(e)return qw(e)?Object.entries(e).map(([t,r])=>Object.keys(r)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var u,d,m,f,p,g;const e=$a.Amplify.getConfig(),t=(u=e.Auth)==null?void 0:u.Cognito,{loginWith:r,userAttributes:o}=((d=e.Auth)==null?void 0:d.Cognito)??{},i=r?Object.entries(r).filter(([y,w])=>y!=="oauth").filter(([y,w])=>!!w).map(y=>y[0]==="phone"?"phone_number":y[0]):void 0,a=Jw(o),s=(m=r==null?void 0:r.oauth)!=null&&m.providers?(f=r.oauth.providers)==null?void 0:f.map(y=>y.toString().toLowerCase()):void 0,l=(g=(p=e.Auth)==null?void 0:p.Cognito)==null?void 0:g.passwordless,c={emailOtpEnabled:(l==null?void 0:l.emailOtpEnabled)??(l==null?void 0:l.email_otp_enabled)===!0,smsOtpEnabled:(l==null?void 0:l.smsOtpEnabled)??(l==null?void 0:l.sms_otp_enabled)===!0,webAuthnEnabled:!!((l==null?void 0:l.webAuthn)??(l==null?void 0:l.web_authn)),preferredChallenge:(l==null?void 0:l.preferredChallenge)??(l==null?void 0:l.preferred_challenge)};return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:c}},getCurrentUser:K.getCurrentUser,handleSignIn:K.signIn,handleSignUp:K.signUp,handleConfirmSignIn:K.confirmSignIn,handleConfirmSignUp:K.confirmSignUp,handleForgotPasswordSubmit:K.confirmResetPassword,handleForgotPassword:K.resetPassword,handleResendSignUpCode:K.resendSignUpCode,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,r){const{password:o}=e,{password:i}=t;if(!i||!r)return null;const a=[],s=r.minLength??Yw;return o.length<s&&a.push(`Password must have at least ${s} characters`),r.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),r.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),r.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),r.requireSpecialCharacters&&!vs(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:r,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!r&&!o)return null;if((r||o)&&r!==o&&(i&&a||(r==null?void 0:r.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){},async validateRequiredFieldsForAuthMethod(e){const t=e.__authMethod;if(!t)return null;if(t==="EMAIL_OTP"&&!e.email)return{email:"Email is required for Email OTP sign up"};if(t==="SMS_OTP"&&!e.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(t==="PASSWORD"){const r={};return e.password||(r.password="Password is required"),e.confirm_password||(r.confirm_password="Confirm Password is required"),Object.keys(r).length>0?r:null}return null}};function Zw({services:e}){return Ze({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:t})=>({step:t})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:r}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:r})},validateFields(t){return En(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const da=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),Qw=e=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e)?"mfa_type":e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Ht={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"}},Rt=e=>({initial:"edit",exit:e,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",...Ht}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Xw({services:e}){return Ze({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:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...da("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 t=await K.listWebAuthnCredentials();return t.credentials&&t.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:Ht.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Ht.onError]}}}},confirmSignIn:{...Rt(["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",...Ht}}}}}},setupTotp:{...Rt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Rt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Rt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{async fetchUserAttributes(){return K.fetchUserAttributes()},resetPassword({username:t}){return K.resetPassword({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},resendSignInCode({username:t,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:i}){const a=r??i??(o==null?void 0:o[0])??"PASSWORD";return e.handleSignIn({username:t,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:t,username:r,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:l}=t;return e.handleSignIn({username:r,password:l})}else return e.handleSignIn({username:r,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:t,step:r}){const o=Qw(r),{[o]:i}=t;return e.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:t}){let{password:r,phone_number:o,country_code:i,confirm_password:a,...s}=t,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:l});const c={challengeResponse:r,options:{userAttributes:s}};return K.confirmSignIn(c)},signInWithRedirect(t,{data:r}){return K.signInWithRedirect(r)},async validateFields(t){return En(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const eC={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},tC={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 nC({services:e}){return Ze({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...tC}},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 t=await K.listWebAuthnCredentials();return t.credentials&&t.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:{...da("signUp")},resetPassword:{invoke:{src:"resetPassword",...eC}},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:{target:"resolved"},SUBMIT:{target:"resolved"}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,username:t.username,unverifiedUserAttributes:t.unverifiedUserAttributes,allowedMfaTypes:t.allowedMfaTypes})}}},{actions:{...Tt,sendUpdate:gn()},guards:An,services:{autoSignIn(){return K.autoSignIn()},async fetchUserAttributes(){return K.fetchUserAttributes()},confirmSignUp({formValues:t,username:r}){const{confirmation_code:o}=t,i={username:r,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},signInWithRedirect(t,{data:r}){return K.signInWithRedirect(r)},handleSignUp(t){const{formValues:r,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=t,l=o[0],u=Fv(i,r,l,a??s);return e.handleSignUp(u)},async validateSignUp(t){return En(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const rC=()=>Ze({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:()=>K.signOut()}});function oC(){return Ze({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:e})=>({step:e})}}},{actions:{...Tt,sendUpdate:gn()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return K.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const r={confirmationCode:e,userAttributeKey:t};return K.confirmUserAttribute(r)},async validateFields(e){return En(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Dt=(e,t)=>{var i,a,s,l,c,u,d,m,f,p,g,y;const r=Rv(e.passwordlessCapabilities,(a=(i=e.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((l=(s=e.config)==null?void 0:s.passwordless)==null?void 0:l.preferredAuthMethod)??((c=e.passwordlessCapabilities)==null?void 0:c.preferredChallenge);return{...e.actorDoneData,step:((u=e==null?void 0:e.actorDoneData)==null?void 0:u.step)??t,formValues:{},touched:{},validationError:{},formFields:(d=e.config)==null?void 0:d.formFields,loginMechanisms:(m=e.config)==null?void 0:m.loginMechanisms,passwordSettings:(f=e.config)==null?void 0:f.passwordSettings,signUpAttributes:(p=e.config)==null?void 0:p.signUpAttributes,socialProviders:(g=e.config)==null?void 0:g.socialProviders,availableAuthMethods:r,preferredChallenge:o,passwordless:(y=e.config)==null?void 0:y.passwordless}},{choose:iC,stop:aC}=Ni,ct=e=>aC(e),sC={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},lC={always:{actions:"configure",target:"getConfig"}};function cC(e){const{useNextWaitConfig:t,...r}={};return Ze({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:ke,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:t?lC:sC,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:ct("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:ct("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:ct("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:ct("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:ct("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:{...Tt,forwardToActor:iC([{cond:"hasActor",actions:Ac(({actorRef:i})=>i)}]),setActorDoneData:_e({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:_e({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:l=a.signUpAttributes??[],socialProviders:c=a.socialProviders??[],initialState:u,formFields:d,passwordSettings:m=a.passwordFormat??{},passwordless:f}=i.config;return s.length===0&&s.push("username"),{formFields:uC(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,passwordless:f,signUpAttributes:l,socialProviders:c}}}),spawnSignInActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=Xw({services:s}).withContext(Dt(i,"SIGN_IN"));return at(l,{name:"signInActor"})}}),spawnSignUpActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=nC({services:s}).withContext(Dt(i,"SIGN_UP"));return at(l,{name:"signUpActor"})}}),spawnForgotPasswordActor:_e({actorRef:(i,a)=>{const{services:s}=i,l=Zw({services:s}).withContext(Dt(i,"FORGOT_PASSWORD"));return at(l,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_e({actorRef:i=>{const a=oC().withContext(Dt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_e({actorRef:i=>{const a=rC().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:_e((i,a)=>{const{services:s,...l}=Xa(r)?a.data??{}:r;return{services:{...ke,...s},config:l}}),setHasSetup:_e({hasSetup:!0})},guards:{...An,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 uC(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{let o=e[t][r];o.required=o.isRequired})}),e}const oe={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"},dC=({componentName:e,packageName:t,version:r})=>{const o=[`ui-${t}`,r];switch(e){case"AIConversation":{x.setCustomUserAgent({...La,additionalDetails:[[e],o]});break}case"Authenticator":{x.setCustomUserAgent({...ja,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{x.setCustomUserAgent({...Ga,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{x.setCustomUserAgent({...Wa,additionalDetails:[[e],o]});break}case"InAppMessaging":{x.setCustomUserAgent({...Ha,additionalDetails:[[e],o]});break}case"LocationSearch":{x.setCustomUserAgent({...Ka,additionalDetails:[[e],o]});break}case"MapView":{x.setCustomUserAgent({...Ya,additionalDetails:[[e],o]});break}case"StorageManager":{x.setCustomUserAgent({...qa,additionalDetails:[[e],o]});break}case"StorageBrowser":{x.setCustomUserAgent({...Ja,additionalDetails:[[e],o]});break}}return ts},fC={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},pC={class:"amplify-flex amplify-authenticator__icon-wrapper"},mC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.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),gC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.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),fe=n.defineComponent({__name:"base-alert",setup(e){const t=n.ref(!0),r=I("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ne;return t.value?(n.openBlock(),n.createElementBlock("div",fC,[n.createElementVNode("div",pC,[mC,n.createElementVNode("div",null,[n.renderSlot(i.$slots,"default")])]),n.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":n.unref(r),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:n.withCtx(()=>[gC]),_:1},8,["aria-label"])])):n.createCommentVNode("",!0)}}}),pe=n.defineComponent({__name:"base-field-set",setup(e){const t=n.useSlots();return(r,o)=>n.renderSlot(r.$slots,"fieldSetI",n.mergeProps(r.$attrs,{slotData:n.unref(t).default&&n.unref(t).default()}),()=>[n.createElementVNode("fieldset",n.mergeProps(r.$attrs,{"data-amplify-fieldset":""}),[n.renderSlot(r.$slots,"default")],16)])}});function hC(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function fa(e){let t=0,r,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),r=void 0,o=void 0)};return(...a)=>(t+=1,r||(o=n.effectScope(!0),r=o.run(()=>e(...a))),hC(i),r)}function yC(e){return"state"in e}var Qo=function(){};function vC(e){return"getSnapshot"in e?e.getSnapshot():yC(e)?e.state:void 0}function SC(e,t){t===void 0&&(t=vC);var r=n.isRef(e)?e:n.shallowRef(e),o=n.shallowRef(t(r.value)),i=function(a){r.value.send(a)};return n.watch(r,function(a,s,l){o.value=t(a);var c=a.subscribe({next:function(u){return o.value=u},error:Qo,complete:Qo}).unsubscribe;l(function(){return c()})},{immediate:!0}),{state:o,send:i}}const _C=e=>{var t,r,o;return{...(o=(r=(t=sr(e))==null?void 0:t.formFields)==null?void 0:r.setupTotp)==null?void 0:o.QR}},Ur=fa(()=>{const e=cC(),t=Ri(e).start(),r=n.ref("configuring"),{state:o,send:i}=SC(t),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},l=ns(t,(c,u)=>oi(c,u,{onSignIn:a,onSignOut:s}));return K.getCurrentUser().then(()=>{r.value="authenticated"}).catch(()=>{r.value="unauthenticated"}),n.onScopeDispose(()=>{l()}),{authStatus:r,service:t,send:i,state:o}}),ee=fa(()=>{const{authStatus:e,state:t,send:r}=Ur(),o=n.reactive({});return n.watchEffect(()=>{const i=ls({send:r,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?_C(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=r,o.state=t}),o});let wC=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const It=n.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const r=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(n.openBlock(),n.createElementBlock("input",{onChange:i[0]||(i[0]=a=>r(a)),"data-amplify-input":""},null,32))}}),CC={},bC={"data-amplify-label":""};function AC(e,t){return n.openBlock(),n.createElementBlock("label",bC,[n.renderSlot(e.$slots,"default")])}const Pt=sn(CC,[["render",AC]]),EC=["aria-label","aria-checked"],TC=n.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),IC=[TC],PC=n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),kC=n.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),NC=[PC,kC],MC={inheritAttrs:!1},Fr=n.defineComponent({...MC,__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(e){const t=e,r=I("Show password"),o=I("Hide password"),i=n.ref("password"),a=n.ref(r),s=Math.floor(Math.random()*999999),{name:l,label:c,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=n.toRefs(t),g=n.ref("");function y(){a.value=a.value===r?o:r,i.value=i.value==="password"?"text":"password"}const w=I((f==null?void 0:f.value)??c.value),h=I(c.value);return(S,v)=>{const _=Pt,C=It,E=X;return n.openBlock(),n.createBlock(E,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).Field,n.unref(oe).TextField,n.unref(oe).PasswordField])},{default:n.withCtx(()=>[n.createVNode(_,{class:n.normalizeClass(["amplify-label",{"amplify-visually-hidden":n.unref(m)}]),for:"amplify-field-"+n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(h)),1)]),_:1},8,["class","for"]),n.createVNode(E,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(E,{class:n.normalizeClass(n.unref(oe).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(C,n.mergeProps(S.$attrs,{modelValue:g.value,"onUpdate:modelValue":v[0]||(v[0]=A=>g.value=A),class:[n.unref(oe).Input,n.unref(oe).FieldGroupControl],id:"amplify-field-"+n.unref(s),"data-amplify-password":"true",name:n.unref(l),autocomplete:n.unref(u),required:n.unref(p)??!0,placeholder:n.unref(w),type:i.value,"aria-invalid":n.unref(d),"aria-describedBy":e.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),n.createVNode(E,{class:n.normalizeClass(n.unref(oe).FieldGroupOuterEnd)},{default:n.withCtx(()=>[n.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:n.normalizeClass([n.unref(oe).Button,n.unref(oe).FieldGroupControl,n.unref(oe).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:y},[i.value==="password"?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(oe).Icon)},IC,2)):(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(oe).Icon)},NC,2))],10,EC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),xC=["value","selected"],UC=n.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const r=e,{options:o,selectValue:i}=n.toRefs(r),a=s=>{t("update:selectValue",s.target.value)};return(s,l)=>(n.openBlock(),n.createElementBlock("select",{onChange:l[0]||(l[0]=c=>a(c))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(o),(c,u)=>(n.openBlock(),n.createElementBlock("option",{key:u,value:c,selected:c==n.unref(i)?!0:void 0},n.toDisplayString(c),9,xC))),128))],32))}}),FC=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[n.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),OC=n.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(e){const t=e,{label:r,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:l,dialCode:c,dialCodeList:u}=n.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const g=Pt,y=UC,w=X,h=It;return n.openBlock(),n.createBlock(w,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(g,n.mergeProps({for:"amplify-field-"+n.unref(d),class:["amplify-label",{"amplify-visually-hidden":n.unref(s)}]},f.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)),1)]),_:1},16,["for","class"]),n.createVNode(w,{class:"amplify-flex amplify-field-group"},{default:n.withCtx(()=>[n.createVNode(w,{class:"amplify-field-group__outer-start"},{default:n.withCtx(()=>[e.type==="tel"?(n.openBlock(),n.createBlock(w,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(g,n.mergeProps({for:"amplify-field-"+n.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString("Country Code"))]),_:1},16,["for"]),n.createVNode(w,{class:"amplify-select__wrapper"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+n.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:n.unref(u),"select-value":n.unref(c)},null,8,["id","options","select-value"]),n.createVNode(w,{class:"amplify-flex amplify-select__icon"},{default:n.withCtx(()=>[FC]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(w,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+n.unref(d),autocomplete:n.unref(a),name:n.unref(o),required:n.unref(l)??!0,type:e.type,placeholder:n.unref(i),"aria-invalid":e.hasError,"aria-describedBy":e.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),RC=["id"],pa=n.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:r,formField:o}=n.toRefs(t),{validationErrors:i}=n.toRefs(ee()),{type:a}=o.value,s=a==="password",l=wC(12),c=n.computed(()=>ps(i.value[r.value])),u=n.computed(()=>{var m;return((m=c.value)==null?void 0:m.length)>0}),d=n.computed(()=>u.value?l:void 0);return(m,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s?(n.openBlock(),n.createBlock(Fr,{key:0,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,hasError:n.unref(u),describedBy:n.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(n.openBlock(),n.createBlock(OC,{key:1,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,"dial-code":n.unref(o).dialCode,"dial-code-list":n.unref(o).dialCodeList,type:n.unref(o).type,hasError:n.unref(u),describedBy:n.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),n.unref(u)?(n.openBlock(),n.createElementBlock("div",{key:2,id:n.unref(d)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(c),(p,g)=>(n.openBlock(),n.createElementBlock("p",{key:g,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(I)(p)),1))),128))],8,RC)):n.createCommentVNode("",!0)],64))}}),ge=n.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:r}=n.toRefs(t),{state:o}=Ur();let i=[];return n.onBeforeMount(()=>{i=bl(r.value,o.value)}),(a,s)=>(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(i),([l,c])=>(n.openBlock(),n.createBlock(pa,{name:l,key:l,formField:c},null,8,["name","formField"]))),128))}}),$t=n.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:r}=n.toRefs(t),{toFederatedSignIn:o}=ee(),i=()=>{o({provider:r.value})};return(a,s)=>{const l=ne;return n.openBlock(),n.createBlock(l,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default")]),_:3})}}}),DC=n.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[n.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),$C={class:"amplify-text"},BC=n.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"},[n.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),VC={class:"amplify-text"},zC=n.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[n.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),LC={class:"amplify-text"},GC=n.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[n.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"}),n.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"}),n.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"}),n.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),jC={class:"amplify-text"},WC=["data-label"],Tn=n.defineComponent({__name:"federated-sign-in",setup(e){const t=ee(),{route:r,socialProviders:o}=t,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),l=o==null?void 0:o.includes("google"),c=s||l||i||a,{getSignInWithFederationText:u,getOrText:d}=ie,m=n.computed(()=>Ln),f=n.computed(()=>u(r,"amazon")),p=n.computed(()=>u(r,"apple")),g=n.computed(()=>u(r,"facebook")),y=n.computed(()=>u(r,"google")),w=n.computed(()=>d());return(h,S)=>{const v=X;return n.unref(c)?(n.openBlock(),n.createBlock(v,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:n.withCtx(()=>[n.unref(i)?(n.openBlock(),n.createBlock($t,{key:0,provider:n.unref(m).Amazon},{default:n.withCtx(()=>[DC,n.createElementVNode("span",$C,n.toDisplayString(n.unref(f)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(a)?(n.openBlock(),n.createBlock($t,{key:1,provider:n.unref(m).Apple},{default:n.withCtx(()=>[BC,n.createElementVNode("span",VC,n.toDisplayString(n.unref(p)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock($t,{key:2,provider:n.unref(m).Facebook},{default:n.withCtx(()=>[zC,n.createElementVNode("span",LC,n.toDisplayString(n.unref(g)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(l)?(n.openBlock(),n.createBlock($t,{key:3,provider:n.unref(m).Google},{default:n.withCtx(()=>[GC,n.createElementVNode("span",jC,n.toDisplayString(n.unref(y)),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":n.unref(w)},null,8,WC)]),_:1})):n.createCommentVNode("",!0)}}}),HC=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),KC={"data-amplify-footer":""},Or=n.defineComponent({__name:"sign-in",setup(e){const t=ee(),{submitForm:r,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=n.toRefs(t),{getForgotPasswordText:l,getSignInText:c,getSigningInText:u}=ie,d=n.computed(()=>l()),m=n.computed(()=>c()),f=n.computed(()=>u()),p=w=>{const{name:h,value:S}=w.target;o({name:h,value:S})},g=w=>{r(de(w))},y=()=>{i()};return(w,h)=>{const S=pe,v=fe,_=ne,C=X,E=ue,A=ce;return n.renderSlot(w.$slots,"signInSlotI",n.normalizeProps(n.guardReactiveProps(w.$attrs)),()=>[n.renderSlot(w.$slots,"header"),n.createVNode(C,n.normalizeProps(n.guardReactiveProps(w.$attrs)),{default:n.withCtx(()=>[n.createVNode(E,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:n.withModifiers(g,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"form",{info:T,onSignInSubmit:g,onInput:p,onForgotPasswordClicked:y})]),default:n.withCtx(()=>[n.createVNode(Tn),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(S,{disabled:n.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"signin-fields",{info:T})]),default:n.withCtx(()=>[HC,n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(v,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(_,{disabled:n.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)?n.unref(f):n.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),n.createVNode(A,null,{default:n.withCtx(()=>[n.renderSlot(w.$slots,"footer",{},()=>[n.createElementVNode("div",KC,[n.createVNode(_,{onClick:y,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(d)),1)]),_:1})])])]),_:3})])}}}),Rr=n.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,r)=>(n.openBlock(),n.createBlock(ge,{route:"signUp"}))}}),Dr=n.defineComponent({__name:"sign-up",setup(e){const t=ee(),{submitForm:r,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:l}=n.toRefs(t),{getCreateAccountText:c}=ie,u=n.computed(()=>c()),d=p=>{const{checked:g,name:y,type:w,value:h}=p.target;i({name:y,value:w==="checkbox"&&!g?void 0:h})};function m(p){const{name:g}=p.target;o({name:g})}const f=p=>{r(de(p))};return(p,g)=>{const y=pe,w=fe,h=ne,S=X,v=ue,_=ce;return n.renderSlot(p.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(p.$attrs)),()=>[n.renderSlot(p.$slots,"header"),n.createVNode(S,n.normalizeProps(n.guardReactiveProps(p.$attrs)),{default:n.withCtx(()=>[n.createVNode(v,{onInput:d,onBlurCapture:m,onSubmit:n.withModifiers(f,["prevent"])},{default:n.withCtx(()=>[n.createVNode(Tn),n.createVNode(S,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(l)},{fieldSetI:n.withCtx(({slotData:C})=>[n.renderSlot(p.$slots,"signup-fields",{info:C})]),default:n.withCtx(()=>[n.createVNode(Rr)]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(w,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:n.unref(l)||n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),n.createVNode(_,null,{default:n.withCtx(()=>[n.renderSlot(p.$slots,"footer")]),_:3})])}}}),YC={};function qC(e,t){const r=X;return n.openBlock(),n.createBlock(r,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:n.withCtx(()=>[n.createVNode(r,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3})]),_:3})}const JC=sn(YC,[["render",qC]]),ZC=["tabindex","aria-selected","id","aria-controls"],QC=n.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:r,id:o,label:i}=n.toRefs(t);return(a,s)=>(n.openBlock(),n.createElementBlock("button",{tabindex:n.unref(r)?0:-1,"aria-selected":n.unref(r)?"true":"false",class:n.normalizeClass([{"amplify-tabs__item--active":n.unref(r)},"amplify-tabs__item"]),id:`${n.unref(o)}-tab`,"aria-controls":`${n.unref(o)}-panel`,role:"tab"},n.toDisplayString(n.unref(i)),11,ZC))}}),XC="4.4.0",eb={};function tb(e,t){return n.renderSlot(e.$slots,"textI",n.normalizeProps(n.guardReactiveProps(e.$attrs)),()=>[n.createElementVNode("span",n.mergeProps(e.$attrs,{"data-amplify-text":""}),[n.renderSlot(e.$slots,"default")],16)])}const $r=sn(eb,[["render",tb]]),ve=n.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:r}){var s,l;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${r.class||""} amplify-heading--${e.level}`;if(((l=(s=i[0])==null?void 0:s.children)==null?void 0:l.length)===0)i[0].children=[n.h(`h${e.level}`,{...r,class:a},[o])];else return()=>n.h(`h${e.level}`,{"data-amplify-heading":"",...r,class:a},[i[0]?n.h(i[0].children[0]):n.h(o[0])]);return()=>i}}),Br=n.defineComponent({__name:"confirm-sign-up",setup(e){const t=ee(),{codeDeliveryDetails:r,error:o,isPending:i}=n.toRefs(t),{resendCode:a,submitForm:s,updateForm:l}=t,{getDeliveryMethodText:c,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=ie,f=n.computed(()=>c(r.value)),p=n.computed(()=>d()),g=n.computed(()=>m()),y=n.computed(()=>u(r.value)),w=_=>{const{name:C,value:E}=_.target;l({name:C,value:E})},h=_=>{S(_)},S=_=>{s(de(_))},v=()=>{a()};return(_,C)=>{const E=ve,A=$r,T=pe,P=fe,k=ne,N=ce,U=X,F=ue;return n.renderSlot(_.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(_.$attrs)),()=>[n.createVNode(U,n.normalizeProps(n.guardReactiveProps(_.$attrs)),{default:n.withCtx(()=>[n.createVNode(F,{onInput:w,onSubmit:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createVNode(U,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(_.$slots,"header",{},()=>[n.createVNode(E,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(A,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(y)),1)]),_:1}),n.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),n.createVNode(N,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(o)?(n.openBlock(),n.createBlock(P,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(o))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(g)),1)]),_:1},8,["disabled"]),n.createVNode(k,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(v,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Vr=n.defineComponent({__name:"confirm-sign-in",setup(e){const t=ee(),{submitForm:r,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:l}=n.toRefs(t),c=n.computed(()=>l.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=ie,f=n.computed(()=>m(c.value)),p=n.computed(()=>u()),g=n.computed(()=>d()),y=S=>{const{name:v,value:_}=S.target;i({name:v,value:_})},w=S=>{r(de(S))},h=()=>{o()};return(S,v)=>{const _=ve,C=X,E=fe,A=ne,T=ce,P=pe,k=ue;return n.renderSlot(S.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.createVNode(C,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:y,onSubmit:n.withModifiers(w,["prevent"])},{default:n.withCtx(()=>[n.createVNode(P,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(S.$slots,"header",{},()=>[n.createVNode(_,{level:3,class:"amplify-heading"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignIn"})]),_:1}),n.createVNode(T,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(a)?(n.openBlock(),n.createBlock(E,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(I)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(g)),1)]),_:1},8,["disabled"]),n.createVNode(A,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(S.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var kt={},nb=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ma={},le={};let zr;const rb=[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];le.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};le.getSymbolTotalCodewords=function(t){return rb[t]};le.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};le.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');zr=t};le.isKanjiModeEnabled=function(){return typeof zr<"u"};le.toSJIS=function(t){return zr(t)};var In={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,i){if(e.isValid(o))return o;try{return t(o)}catch{return i}}})(In);function ga(){this.buffer=[],this.length=0}ga.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var ob=ga;function Nt(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)}Nt.prototype.set=function(e,t,r,o){const i=e*this.size+t;this.data[i]=r,o&&(this.reservedBit[i]=!0)};Nt.prototype.get=function(e,t){return this.data[e*this.size+t]};Nt.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};Nt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var ib=Nt,ha={};(function(e){const t=le.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=t(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,l=[a-7];for(let c=1;c<i-1;c++)l[c]=l[c-1]-s;return l.push(6),l.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let l=0;l<s;l++)for(let c=0;c<s;c++)l===0&&c===0||l===0&&c===s-1||l===s-1&&c===0||i.push([a[l],a[c]]);return i}})(ha);var ya={};const ab=le.getSymbolSize,Xo=7;ya.getPositions=function(t){const r=ab(t);return[[0,0],[r-Xo,0],[0,r-Xo]]};var va={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const a=i.size;let s=0,l=0,c=0,u=null,d=null;for(let m=0;m<a;m++){l=c=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?l++:(l>=5&&(s+=t.N1+(l-5)),u=p,l=1),p=i.get(f,m),p===d?c++:(c>=5&&(s+=t.N1+(c-5)),d=p,c=1)}l>=5&&(s+=t.N1+(l-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let l=0;l<a-1;l++)for(let c=0;c<a-1;c++){const u=i.get(l,c)+i.get(l,c+1)+i.get(l+1,c)+i.get(l+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,l=0,c=0;for(let u=0;u<a;u++){l=c=0;for(let d=0;d<a;d++)l=l<<1&2047|i.get(u,d),d>=10&&(l===1488||l===93)&&s++,c=c<<1&2047|i.get(d,u),d>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let c=0;c<s;c++)a+=i.data[c];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function r(o,i,a){switch(o){case e.Patterns.PATTERN000:return(i+a)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(i+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return i*a%2+i*a%3===0;case e.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case e.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(i,a){const s=a.size;for(let l=0;l<s;l++)for(let c=0;c<s;c++)a.isReserved(c,l)||a.xor(c,l,r(i,c,l))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let l=0,c=1/0;for(let u=0;u<s;u++){a(u),e.applyMask(u,i);const d=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),d<c&&(c=d,l=u)}return l}})(va);var Pn={};const Ie=In,Bt=[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],Vt=[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];Pn.getBlocksCount=function(t,r){switch(r){case Ie.L:return Bt[(t-1)*4+0];case Ie.M:return Bt[(t-1)*4+1];case Ie.Q:return Bt[(t-1)*4+2];case Ie.H:return Bt[(t-1)*4+3];default:return}};Pn.getTotalCodewordsCount=function(t,r){switch(r){case Ie.L:return Vt[(t-1)*4+0];case Ie.M:return Vt[(t-1)*4+1];case Ie.Q:return Vt[(t-1)*4+2];case Ie.H:return Vt[(t-1)*4+3];default:return}};var Sa={},kn={};const ht=new Uint8Array(512),on=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ht[r]=t,on[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ht[r]=ht[r-255]})();kn.log=function(t){if(t<1)throw new Error("log("+t+")");return on[t]};kn.exp=function(t){return ht[t]};kn.mul=function(t,r){return t===0||r===0?0:ht[on[t]+on[r]]};(function(e){const t=kn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let l=0;l<i.length;l++)a[s+l]^=t.mul(o[s],i[l]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let c=0;c<i.length;c++)a[c]^=t.mul(i[c],s);let l=0;for(;l<a.length&&a[l]===0;)l++;a=a.slice(l)}return a},e.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}})(Sa);const _a=Sa;function Lr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Lr.prototype.initialize=function(t){this.degree=t,this.genPoly=_a.generateECPolynomial(this.degree)};Lr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(t.length+this.degree);r.set(t);const o=_a.mod(r,this.genPoly),i=this.degree-o.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(o,i),a}return o};var sb=Lr,wa={},Ne={},Gr={};Gr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Se={};const Ca="[0-9]+",lb="[A-Z $%*+\\-./:]+";let Ct="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ct=Ct.replace(/u/g,"\\u");const cb="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ct+`)(?:.|[\r
|
|
21
21
|
]))+`;Se.KANJI=new RegExp(Ct,"g");Se.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Se.BYTE=new RegExp(cb,"g");Se.NUMERIC=new RegExp(Ca,"g");Se.ALPHANUMERIC=new RegExp(lb,"g");const ub=new RegExp("^"+Ct+"$"),db=new RegExp("^"+Ca+"$"),fb=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Se.testKanji=function(t){return ub.test(t)};Se.testNumeric=function(t){return db.test(t)};Se.testAlphanumeric=function(t){return fb.test(t)};(function(e){const t=Gr,r=Se;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return r.testNumeric(a)?e.NUMERIC:r.testAlphanumeric(a)?e.ALPHANUMERIC:r.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.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 e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(a,s){if(e.isValid(a))return a;try{return o(a)}catch{return s}}})(Ne);(function(e){const t=le,r=Pn,o=In,i=Ne,a=Gr,s=7973,l=t.getBCHDigit(s);function c(f,p,g){for(let y=1;y<=40;y++)if(p<=e.getCapacity(y,g,f))return y}function u(f,p){return i.getCharCountIndicator(f,p)+4}function d(f,p){let g=0;return f.forEach(function(y){const w=u(y.mode,p);g+=w+y.getBitsLength()}),g}function m(f,p){for(let g=1;g<=40;g++)if(d(f,g)<=e.getCapacity(g,p,i.MIXED))return g}e.from=function(p,g){return a.isValid(p)?parseInt(p,10):g},e.getCapacity=function(p,g,y){if(!a.isValid(p))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=i.BYTE);const w=t.getSymbolTotalCodewords(p),h=r.getTotalCodewordsCount(p,g),S=(w-h)*8;if(y===i.MIXED)return S;const v=S-u(y,p);switch(y){case i.NUMERIC:return Math.floor(v/10*3);case i.ALPHANUMERIC:return Math.floor(v/11*2);case i.KANJI:return Math.floor(v/13);case i.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(p,g){let y;const w=o.from(g,o.M);if(Array.isArray(p)){if(p.length>1)return m(p,w);if(p.length===0)return 1;y=p[0]}else y=p;return c(y.mode,y.getLength(),w)},e.getEncodedBits=function(p){if(!a.isValid(p)||p<7)throw new Error("Invalid QR Code version");let g=p<<12;for(;t.getBCHDigit(g)-l>=0;)g^=s<<t.getBCHDigit(g)-l;return p<<12|g}})(wa);var ba={};const tr=le,Aa=1335,pb=21522,ei=tr.getBCHDigit(Aa);ba.getEncodedBits=function(t,r){const o=t.bit<<3|r;let i=o<<10;for(;tr.getBCHDigit(i)-ei>=0;)i^=Aa<<tr.getBCHDigit(i)-ei;return(o<<10|i)^pb};var Ea={};const mb=Ne;function je(e){this.mode=mb.NUMERIC,this.data=e.toString()}je.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};je.prototype.getLength=function(){return this.data.length};je.prototype.getBitsLength=function(){return je.getBitsLength(this.data.length)};je.prototype.write=function(t){let r,o,i;for(r=0;r+3<=this.data.length;r+=3)o=this.data.substr(r,3),i=parseInt(o,10),t.put(i,10);const a=this.data.length-r;a>0&&(o=this.data.substr(r),i=parseInt(o,10),t.put(i,a*3+1))};var gb=je;const hb=Ne,Dn=["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 We(e){this.mode=hb.ALPHANUMERIC,this.data=e}We.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};We.prototype.getLength=function(){return this.data.length};We.prototype.getBitsLength=function(){return We.getBitsLength(this.data.length)};We.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let o=Dn.indexOf(this.data[r])*45;o+=Dn.indexOf(this.data[r+1]),t.put(o,11)}this.data.length%2&&t.put(Dn.indexOf(this.data[r]),6)};var yb=We,vb=function(t){for(var r=[],o=t.length,i=0;i<o;i++){var a=t.charCodeAt(i);if(a>=55296&&a<=56319&&o>i+1){var s=t.charCodeAt(i+1);s>=56320&&s<=57343&&(a=(a-55296)*1024+s-56320+65536,i+=1)}if(a<128){r.push(a);continue}if(a<2048){r.push(a>>6|192),r.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){r.push(a>>12|224),r.push(a>>6&63|128),r.push(a&63|128);continue}if(a>=65536&&a<=1114111){r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(a&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Sb=vb,_b=Ne;function He(e){this.mode=_b.BYTE,this.data=new Uint8Array(Sb(e))}He.getBitsLength=function(t){return t*8};He.prototype.getLength=function(){return this.data.length};He.prototype.getBitsLength=function(){return He.getBitsLength(this.data.length)};He.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)};var wb=He;const Cb=Ne,bb=le;function Ke(e){this.mode=Cb.KANJI,this.data=e}Ke.getBitsLength=function(t){return t*13};Ke.prototype.getLength=function(){return this.data.length};Ke.prototype.getBitsLength=function(){return Ke.getBitsLength(this.data.length)};Ke.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=bb.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
22
22
|
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var Ab=Ke,Ta={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,o,i){var a={},s={};s[o]=0;var l=t.PriorityQueue.make();l.push(o,0);for(var c,u,d,m,f,p,g,y,w;!l.empty();){c=l.pop(),u=c.value,m=c.cost,f=r[u]||{};for(d in f)f.hasOwnProperty(d)&&(p=f[d],g=m+p,y=s[d],w=typeof s[d]>"u",(w||y>g)&&(s[d]=g,l.push(d,g),a[d]=u))}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(r,o){for(var i=[],a=o;a;)i.push(a),r[a],a=r[a];return i.reverse(),i},find_path:function(r,o,i){var a=t.single_source_shortest_paths(r,o,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(r){var o=t.PriorityQueue,i={},a;r=r||{};for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);return i.queue=[],i.sorter=r.sorter||o.default_sorter,i},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var i={value:r,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ta);var Eb=Ta.exports;(function(e){const t=Ne,r=gb,o=yb,i=wb,a=Ab,s=Se,l=le,c=Eb;function u(h){return unescape(encodeURIComponent(h)).length}function d(h,S,v){const _=[];let C;for(;(C=h.exec(v))!==null;)_.push({data:C[0],index:C.index,mode:S,length:C[0].length});return _}function m(h){const S=d(s.NUMERIC,t.NUMERIC,h),v=d(s.ALPHANUMERIC,t.ALPHANUMERIC,h);let _,C;return l.isKanjiModeEnabled()?(_=d(s.BYTE,t.BYTE,h),C=d(s.KANJI,t.KANJI,h)):(_=d(s.BYTE_KANJI,t.BYTE,h),C=[]),S.concat(v,_,C).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function f(h,S){switch(S){case t.NUMERIC:return r.getBitsLength(h);case t.ALPHANUMERIC:return o.getBitsLength(h);case t.KANJI:return a.getBitsLength(h);case t.BYTE:return i.getBitsLength(h)}}function p(h){return h.reduce(function(S,v){const _=S.length-1>=0?S[S.length-1]:null;return _&&_.mode===v.mode?(S[S.length-1].data+=v.data,S):(S.push(v),S)},[])}function g(h){const S=[];for(let v=0;v<h.length;v++){const _=h[v];switch(_.mode){case t.NUMERIC:S.push([_,{data:_.data,mode:t.ALPHANUMERIC,length:_.length},{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.ALPHANUMERIC:S.push([_,{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.KANJI:S.push([_,{data:_.data,mode:t.BYTE,length:u(_.data)}]);break;case t.BYTE:S.push([{data:_.data,mode:t.BYTE,length:u(_.data)}])}}return S}function y(h,S){const v={},_={start:{}};let C=["start"];for(let E=0;E<h.length;E++){const A=h[E],T=[];for(let P=0;P<A.length;P++){const k=A[P],N=""+E+P;T.push(N),v[N]={node:k,lastCount:0},_[N]={};for(let U=0;U<C.length;U++){const F=C[U];v[F]&&v[F].node.mode===k.mode?(_[F][N]=f(v[F].lastCount+k.length,k.mode)-f(v[F].lastCount,k.mode),v[F].lastCount+=k.length):(v[F]&&(v[F].lastCount=k.length),_[F][N]=f(k.length,k.mode)+4+t.getCharCountIndicator(k.mode,S))}}C=T}for(let E=0;E<C.length;E++)_[C[E]].end=0;return{map:_,table:v}}function w(h,S){let v;const _=t.getBestModeForData(h);if(v=t.from(S,_),v!==t.BYTE&&v.bit<_.bit)throw new Error('"'+h+'" cannot be encoded with mode '+t.toString(v)+`.
|
|
23
23
|
Suggested mode is: `+t.toString(_));switch(v===t.KANJI&&!l.isKanjiModeEnabled()&&(v=t.BYTE),v){case t.NUMERIC:return new r(h);case t.ALPHANUMERIC:return new o(h);case t.KANJI:return new a(h);case t.BYTE:return new i(h)}}e.fromArray=function(S){return S.reduce(function(v,_){return typeof _=="string"?v.push(w(_,null)):_.data&&v.push(w(_.data,_.mode)),v},[])},e.fromString=function(S,v){const _=m(S,l.isKanjiModeEnabled()),C=g(_),E=y(C,v),A=c.find_path(E.map,"start","end"),T=[];for(let P=1;P<A.length-1;P++)T.push(E.table[A[P]].node);return e.fromArray(p(T))},e.rawSplit=function(S){return e.fromArray(m(S,l.isKanjiModeEnabled()))}})(Ea);const Nn=le,$n=In,Tb=ob,Ib=ib,Pb=ha,kb=ya,nr=va,rr=Pn,Nb=sb,an=wa,Mb=ba,xb=Ne,Bn=Ea;function Ub(e,t){const r=e.size,o=kb.getPositions(t);for(let i=0;i<o.length;i++){const a=o[i][0],s=o[i][1];for(let l=-1;l<=7;l++)if(!(a+l<=-1||r<=a+l))for(let c=-1;c<=7;c++)s+c<=-1||r<=s+c||(l>=0&&l<=6&&(c===0||c===6)||c>=0&&c<=6&&(l===0||l===6)||l>=2&&l<=4&&c>=2&&c<=4?e.set(a+l,s+c,!0,!0):e.set(a+l,s+c,!1,!0))}}function Fb(e){const t=e.size;for(let r=8;r<t-8;r++){const o=r%2===0;e.set(r,6,o,!0),e.set(6,r,o,!0)}}function Ob(e,t){const r=Pb.getPositions(t);for(let o=0;o<r.length;o++){const i=r[o][0],a=r[o][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0)}}function Rb(e,t){const r=e.size,o=an.getEncodedBits(t);let i,a,s;for(let l=0;l<18;l++)i=Math.floor(l/3),a=l%3+r-8-3,s=(o>>l&1)===1,e.set(i,a,s,!0),e.set(a,i,s,!0)}function Vn(e,t,r){const o=e.size,i=Mb.getEncodedBits(t,r);let a,s;for(a=0;a<15;a++)s=(i>>a&1)===1,a<6?e.set(a,8,s,!0):a<8?e.set(a+1,8,s,!0):e.set(o-15+a,8,s,!0),a<8?e.set(8,o-a-1,s,!0):a<9?e.set(8,15-a-1+1,s,!0):e.set(8,15-a-1,s,!0);e.set(o-8,8,1,!0)}function Db(e,t){const r=e.size;let o=-1,i=r-1,a=7,s=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let c=0;c<2;c++)if(!e.isReserved(i,l-c)){let u=!1;s<t.length&&(u=(t[s]>>>a&1)===1),e.set(i,l-c,u),a--,a===-1&&(s++,a=7)}if(i+=o,i<0||r<=i){i-=o,o=-o;break}}}function $b(e,t,r){const o=new Tb;r.forEach(function(c){o.put(c.mode.bit,4),o.put(c.getLength(),xb.getCharCountIndicator(c.mode,e)),c.write(o)});const i=Nn.getSymbolTotalCodewords(e),a=rr.getTotalCodewordsCount(e,t),s=(i-a)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const l=(s-o.getLengthInBits())/8;for(let c=0;c<l;c++)o.put(c%2?17:236,8);return Bb(o,e,t)}function Bb(e,t,r){const o=Nn.getSymbolTotalCodewords(t),i=rr.getTotalCodewordsCount(t,r),a=o-i,s=rr.getBlocksCount(t,r),l=o%s,c=s-l,u=Math.floor(o/s),d=Math.floor(a/s),m=d+1,f=u-d,p=new Nb(f);let g=0;const y=new Array(s),w=new Array(s);let h=0;const S=new Uint8Array(e.buffer);for(let A=0;A<s;A++){const T=A<c?d:m;y[A]=S.slice(g,g+T),w[A]=p.encode(y[A]),g+=T,h=Math.max(h,T)}const v=new Uint8Array(o);let _=0,C,E;for(C=0;C<h;C++)for(E=0;E<s;E++)C<y[E].length&&(v[_++]=y[E][C]);for(C=0;C<f;C++)for(E=0;E<s;E++)v[_++]=w[E][C];return v}function Vb(e,t,r,o){let i;if(Array.isArray(e))i=Bn.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){const d=Bn.rawSplit(e);u=an.getBestVersionForData(d,r)}i=Bn.fromString(e,u||40)}else throw new Error("Invalid data");const a=an.getBestVersionForData(i,r);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=a;else if(t<a)throw new Error(`
|