@aws-amplify/ui-vue 4.3.6 → 4.3.7
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 +3 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ Event: `).concat(JSON.stringify(f.data))),o.state;if(o.status!==K.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),h=p?o.parent:D(m)?m===Pe.Internal?o:o.children.get(m)||it.get(m):jl(m)?m:void 0;if(!h){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 h){if(o.status!==K.Stopped||o.parent!==h||o.state.done){var v=b(b({},d),{name:d.name===dr?"".concat(Le(o.id)):d.name,origin:o.sessionId});!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([h,v]):h.send(v)}}else!f&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([h,d.data]):h.send(d.data)},this._exec=function(d,m,f,p){p===void 0&&(p=o.machine.options.actions);var h=d.exec||qt(d.type,p),v=B(h)?h:h?h.exec:d.exec;if(v)try{return v(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 Ct:var g=d;if(typeof g.delay=="number"){o.defer(g);return}else g.to?o.sendTo(g._event,g.to,f===Ue):o.send(g._event);break;case ur:o.cancel(d.sendId);break;case Wt:{if(o.status!==K.Running)return;var _=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[_.id||_.type])break;if(_.type===z.Invoke){var y=yi(_.src),S=o.machine.options.services?o.machine.options.services[y.type]:void 0,C=_.id,A=_.data;W||q(!("forward"in _),"`forward` property is deprecated (found in invocation of '".concat(_.src,"' in in machine '").concat(o.machine.id,"'). ")+"Please use `autoForward` instead.");var E="autoForward"in _?_.autoForward:!!_.forward;if(!S){W||q(!1,"No service found for invocation '".concat(_.src,"' in machine '").concat(o.machine.id,"'."));return}var T=A?Yt(A,m,f):void 0;if(typeof S=="string")return;var I=B(S)?S(m,f.data,{data:T,src:y,meta:_.meta}):S;if(!I)return;var k=void 0;be(I)&&(I=T?I.withContext(T):I,k={autoForward:E}),o.spawn(I,C,k)}else o.spawnActivity(_);break}case sn:{o.stopChild(d.activity.id);break}case cn: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!==K.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=R(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(I){m.state.children[I.id]=I}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var p=R(this.eventListeners),h=p.next();!h.done;h=p.next()){var v=h.value;v(t.event)}}catch(I){o={error:I}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var w=R(this.listeners),g=w.next();!g.done;g=w.next()){var v=g.value;v(t,t.event)}}catch(I){a={error:I}}finally{try{g&&!g.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}try{for(var _=R(this.contextListeners),y=_.next();!y.done;y=_.next()){var S=y.value;S(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(I){l={error:I}}finally{try{y&&!y.done&&(c=_.return)&&c.call(_)}finally{if(l)throw l.error}}if(this.state.done){var C=t.configuration.find(function(I){return I.type==="final"&&I.parent===m.machine}),A=C&&C.doneData?Yt(C.doneData,t.context,r):void 0;this._doneEvent=gt(this.id,A);try{for(var E=R(this.doneListeners),T=E.next();!T.done;T=E.next()){var v=T.value;v(this._doneEvent)}}catch(I){u={error:I}}finally{try{T&&!T.done&&(d=E.return)&&d.call(E)}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===K.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,o){var i=this,a=Gt(t,r,o);this.listeners.add(a.next),this.status!==K.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===K.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===K.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===K.Running)return this;this.machine._init(),it.register(this.sessionId,this),this.initialized=!0,this.status=K.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){B(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=R(this.listeners),f=m.next();!f.done;f=m.next()){var p=f.value;this.listeners.delete(p)}}catch(E){t={error:E}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}try{for(var h=R(this.stopListeners),v=h.next();!v.done;v=h.next()){var p=v.value;p(),this.stopListeners.delete(p)}}catch(E){o={error:E}}finally{try{v&&!v.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}try{for(var w=R(this.contextListeners),g=w.next();!g.done;g=w.next()){var p=g.value;this.contextListeners.delete(p)}}catch(E){a={error:E}}finally{try{g&&!g.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}try{for(var _=R(this.doneListeners),y=_.next();!y.done;y=_.next()){var p=y.value;this.doneListeners.delete(p)}}catch(E){l={error:E}}finally{try{y&&!y.done&&(c=_.return)&&c.call(_)}finally{if(l)throw l.error}}if(!this.initialized)return this;this.initialized=!1,this.status=K.Stopped,this._initialState=void 0;try{for(var S=R(Object.keys(this.delayedEventsMap)),C=S.next();!C.done;C=S.next()){var A=C.value;this.clock.clearTimeout(this.delayedEventsMap[A])}}catch(E){u={error:E}}finally{try{C&&!C.done&&(d=S.return)&&d.call(S)}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=$(_t(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!Wn(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===K.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!==K.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 h=Q(p);r.forward(h),s=Ve(r,function(){return r.machine.transition(s,h,void 0,o||void 0)}),c.push.apply(c,L([],$(r.machine.config.predictableActionArguments?s.actions:s.actions.map(function(v){return fc(v,s)})),!1)),l=l||!!s.changed};try{for(var d=R(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(Ln)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Ln)===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=R(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),B(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,o){if(this.status!==K.Running)return mr(t,r);if(ao(t))return this.spawnPromise(Promise.resolve(t),r);if(B(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({},Kn),r);a.sync&&i.onTransition(function(l){o.send(un,{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=Gt(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=Gt(f);return l.add(p.next),{unsubscribe:function(){l.delete(p.next)}}},stop:function(){a=!0,B(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===K.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}(),_c=function(e){return D(e)?b(b({},Kn),{name:e}):b(b(b({},Kn),{name:Wl()}),e)};function at(e,t){var r=_c(t);return rc(function(o){if(!W){var i=be(e)||B(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 Sc(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function xt(e){return b(b({type:Ht},e),{toJSON:function(){e.onDone,e.onError;var t=cr(e,["onDone","onError"]);return b(b({},t),{type:Ht,src:Sc(e.src)})}})}var ze="",Yn="#",st="*",De={},Be=function(e){return e[0]===Yn},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)&&(D(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}):De;var l=0;function c(u){var d,m;u.order=l++;try{for(var f=R(xi(u)),p=f.next();!p.done;p=f.next()){var h=p.value;c(h)}}catch(v){d={error:v}}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=Mt(a.id,d);return a.machine.options.services=b((m={},m[p]=u,m),a.machine.options.services),xt({src:p,id:p})}else if(D(u.src)){var p=u.id||Mt(a.id,d);return xt(b(b({},u),{id:p,src:u.src}))}else if(be(u.src)||B(u.src)){var p=u.id||Mt(a.id,d);return a.machine.options.services=b((f={},f[p]=u.src,f),a.machine.options.services),xt(b(b({id:p},u),{src:p}))}else{var h=u.src;return xt(b(b({id:Mt(a.id,d)},u),{src:h}))}}),this.activities=me(this.config.activities).concat(this.invoke).map(function(u){return fn(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 B(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=B(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=D(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(D(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:jt(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=R(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(g){i={error:g}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}var p=Object.keys(s).map(function(g){return s[g]}),h=j(p.map(function(g){return g.transitions})),v=p.some(function(g){return g.transitions.length>0});if(!v)return this.next(r,o);var w=j(Object.keys(s).map(function(g){return s[g].configuration}));return{transitions:h,exitSet:j(p.map(function(g){return g.exitSet})),configuration:w,source:r,actions:j(Object.keys(s).map(function(g){return s[g].actions}))}},e.prototype._transition=function(t,r,o){return D(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=R(this.getCandidates(s)),m=d.next();!m.done;m=d.next()){var f=m.value,p=f.cond,h=f.in,v=t.context,w=h?D(h)&&Be(h)?t.matches(mt(this.getStateNodeById(h).path,this.delimiter)):fr(mt(h,this.delimiter),$l(this.path.slice(0,-2))(t.value)):!0,g=!1;try{g=!p||hi(this.machine,p,v,r,t)}catch(S){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(S.message))}if(g&&w){f.target!==void 0&&(c=f.target),l.push.apply(l,L([],$(f.actions),!1)),u=f;break}}}catch(S){o={error:S}}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 _=j(c.map(function(S){return a.getRelativeStateNodes(S,t.historyValue)})),y=!!u.internal;return{transitions:[u],exitSet:y?[]:j(c.map(function(S){return a.getPotentiallyReenteringNodes(S)})),configuration:_,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)):[],h=new Set;try{for(var v=R(Array.from(t).sort(function(N,U){return N.order-U.order})),w=v.next();!w.done;w=v.next()){var g=w.value;(!pt(p,g)||pt(o.exitSet,g)||g.parent&&h.has(g.parent))&&h.add(g)}}catch(N){c={error:N}}finally{try{w&&!w.done&&(u=v.return)&&u.call(v)}finally{if(c)throw c.error}}try{for(var _=R(p),y=_.next();!y.done;y=_.next()){var g=y.value;(!pt(t,g)||pt(o.exitSet,g.parent))&&o.exitSet.push(g)}}catch(N){d={error:N}}finally{try{y&&!y.done&&(m=_.return)&&m.call(_)}finally{if(d)throw d.error}}o.exitSet.sort(function(N,U){return U.order-N.order});var S=Array.from(h).sort(function(N,U){return N.order-U.order}),C=new Set(o.exitSet),A=j(S.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?Yt(N.doneData,i,a):void 0));var H=F.parent;return H.type==="parallel"&&St(H).every(function(re){return jt(o.configuration,re)})&&U.push(dt(H.id)),U})),E=S.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:A.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)}}),I=T.concat({type:"transition",actions:we(o.actions,this.machine.options.actions)}).concat(E);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!Wn(N)});return I.concat({type:"stop",actions:k})}return I},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=D(t)?this.resolve(Kt(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:[],h=jt(p,this),v=f?lc(this.machine,m):void 0,w=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,g=this.getActions(new Set(p),h,t,o,a,r,i),_=r?b({},r.activities):{};try{for(var y=R(g),S=y.next();!S.done;S=y.next()){var C=S.value;try{for(var A=(c=void 0,R(C.actions)),E=A.next();!E.done;E=A.next()){var T=E.value;T.type===Wt?_[T.activity.id||T.activity.type]=T:T.type===sn&&(_[T.activity.id||T.activity.type]=!1)}}catch(M){c={error:M}}finally{try{E&&!E.done&&(u=A.return)&&u.call(A)}finally{if(c)throw c.error}}}}catch(M){s={error:M}}finally{try{S&&!S.done&&(l=y.return)&&l.call(y)}finally{if(s)throw s.error}}var I=$(_t(this,r,o,a,g,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),k=I[0],N=I[1],U=$(zl(k,Wn),2),F=U[0],H=U[1],re=k.filter(function(M){var Me;return M.type===Wt&&((Me=M.activity)===null||Me===void 0?void 0:Me.type)===Ht}),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:v||r.value,context:N,_event:a,_sessionid:r?r._sessionid:null,historyValue:v?w?Ll(w,v):void 0:r?r.historyValue:void 0,history:!v||t.source?r:void 0,actions:v?H:[],activities:v?_:r?r.activities:{},events:[],configuration:p,transitions:t.transitions,children:ae,done:h,tags:lo(p),machine:this}),te=o!==N;J.changed=a.name===un||te;var Z=J.history;Z&&delete Z.history;var Re=!h&&(this._transient||m.some(function(M){return M._transient}));if(!f&&(!Re||a.name===ze))return J;var se=J;if(!h)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 Nn=se.changed||(Z?!!se.actions.length||te||typeof Z.value!=typeof se.value||!Oi(se.value,Z.value):void 0);return se.changed=Nn,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(Yn.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=jn(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||De;switch(this.type){case"parallel":return ut(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(t[s]||a):De});case"compound":if(D(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):De}):this.initialStateValue||{};default:return t||De}},e.prototype.getResolvedPath=function(t){if(Be(t)){var r=this.machine.idMap[t.slice(Yn.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return jn(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||De},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=Zt(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;D(r.target)?t=Be(r.target)?Kt(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(Zt(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=Lt(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=D(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(Lt(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=Dl(o.path,"states")(t).current;return D(a)?[o.getStateNode(a)]:j(Lt(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=R(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,R(d.events)),f=m.next();!f.done;f=m.next()){var p=f.value;s.add("".concat(p))}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(h){t={error:h}}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(!D(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 D(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(_){!W&&_===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 y=$e(_,u[_]);return W||Cc(o,_,y),y}).concat($e(st,c)))}var d=this.config.always?$e("",this.config.always):[],m=this.config.onDone?$e(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(_){var y=[];return _.onDone&&y.push.apply(y,L([],$($e(String(gt(_.id)),_.onDone)),!1)),_.onError&&y.push.apply(y,L([],$($e(String(Le(_.id)),_.onError)),!1)),y})),p=this.after,h=j(L(L(L(L([],$(m),!1),$(f),!1),$(i),!1),$(d),!1).map(function(_){return me(_).map(function(y){return o.formatTransition(y)})}));try{for(var v=R(p),w=v.next();!w.done;w=v.next()){var g=w.value;h.push(g)}}catch(_){t={error:_}}finally{try{w&&!w.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return h},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 Se=Ii,pn=wi,Ac=ki,Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $i(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 Di=Ec;function Tc(){this.__data__=[],this.size=0}var Ic=Tc;function Pc(e,t){return e===t||e!==e&&t!==t}var bt=Pc,kc=bt;function Nc(e,t){for(var r=e.length;r--;)if(kc(e[r][0],t))return r;return-1}var mn=Nc,Mc=mn,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=mn;function $c(e){var t=this.__data__,r=Rc(t,e);return r<0?void 0:t[r][1]}var Dc=$c,Bc=mn;function Vc(e){return Bc(this.__data__,e)>-1}var zc=Vc,Lc=mn;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=Dc,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 gn=Qe,Jc=gn;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 Ut=="object"&&Ut&&Ut.Object===Object&&Ut,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,hn=uu,fo=hn,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=hn,_u=mu,Su=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)?_u(e):Su(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,Un=Fu,go=function(){var e=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ou(e){return!!go&&go in e}var Ru=Ou,$u=Function.prototype,Du=$u.toString;function Bu(e){if(e!=null){try{return Du.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"),yn=ld,ho=yn;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=yn,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,_d=yn,Sd=Object.prototype,wd=Sd.hasOwnProperty;function Cd(e){var t=this.__data__;return _d?t[e]!==void 0:wd.call(t,e)}var bd=Cd,Ad=yn,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=gn,Od=yr;function Rd(){this.size=0,this.__data__={hash:new yo,map:new(Od||Fd),string:new yo}}var $d=Rd;function Dd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Bd=Dd,Vd=Bd;function zd(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var vn=zd,Ld=vn;function Gd(e){var t=Ld(this,e).delete(e);return this.size-=t?1:0,t}var jd=Gd,Wd=vn;function Hd(e){return Wd(this,e).get(e)}var Kd=Hd,Yd=vn;function qd(e){return Yd(this,e).has(e)}var Jd=qd,Zd=vn;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=$d,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=gn,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=gn,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 _r=nt,vf="__lodash_hash_undefined__";function _f(e){return this.__data__.set(e,vf),this}var Sf=_f;function wf(e){return this.__data__.has(e)}var Cf=wf,bf=vr,Af=Sf,Ef=Cf;function Qt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bf;++t<r;)this.add(e[t])}Qt.prototype.add=Qt.prototype.push=Af;Qt.prototype.has=Ef;var Tf=Qt;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 h=e[m],v=t[m];if(o)var w=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(w!==void 0){if(w)continue;f=!1;break}if(p){if(!xf(t,function(g,_){if(!Uf(p,_)&&(h===g||i(h,g,r,o,a)))return p.push(_)})){f=!1;break}}else if(!(h===v||i(h,v,r,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Li=Rf,$f=ye,Df=$f.Uint8Array,Gi=Df;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=hn,_o=Gi,Gf=bt,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]",So=vo?vo.prototype:void 0,Fn=So?So.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 _o(e),new _o(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(Fn)return Fn.call(e)==Fn.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,_p=vp.propertyIsEnumerable,wo=Object.getOwnPropertySymbols,Sp=wo?function(e){return e==null?[]:(e=Object(e),hp(wo(e),function(t){return _p.call(e,t)}))}:yp,Ki=Sp;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")},Sr=xp,Xt={exports:{}};function Up(){return!1}var Fp=Up;Xt.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})(Xt,Xt.exports);var wr=Xt.exports,Op=9007199254740991,Rp=/^(?:0|[1-9]\d*)$/;function $p(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 _n=$p,Dp=9007199254740991;function Bp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dp}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,en={exports:{}};en.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})(en,en.exports);var ym=en.exports,vm=mm,_m=hm,bo=ym,Ao=bo&&bo.isTypedArray,Sm=Ao?_m(Ao):vm,br=Sm,wm=Cp,Cm=Sr,bm=Ee,Am=wr,Em=_n,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,$m=Om,Dm=Object.prototype,Bm=Dm.hasOwnProperty;function Vm(e){if(!Rm(e))return $m(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 Sn=jm,Wm=qi,Hm=zm,Km=Sn;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),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var w=s;++m<c;){f=l[m];var g=e[f],_=t[f];if(o)var y=s?o(_,g,f,t,e,a):o(g,_,f,e,t,a);if(!(y===void 0?g===_||i(g,_,r,o,a):y)){v=!1;break}w||(w=f=="constructor")}if(v&&!w){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(e),a.delete(t),v}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,_g=yg(vg,"WeakMap"),Sg=_g,qn=lg,Jn=yr,Zn=fg,Qn=hg,Xn=Sg,Qi=Xe,rt=zi,To="[object Map]",wg="[object Object]",Io="[object Promise]",Po="[object Set]",ko="[object WeakMap]",No="[object DataView]",Cg=rt(qn),bg=rt(Jn),Ag=rt(Zn),Eg=rt(Qn),Tg=rt(Xn),xe=Qi;(qn&&xe(new qn(new ArrayBuffer(1)))!=No||Jn&&xe(new Jn)!=To||Zn&&xe(Zn.resolve())!=Io||Qn&&xe(new Qn)!=Po||Xn&&xe(new Xn)!=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,On=_r,Pg=Li,kg=sp,Ng=og,Mo=Ig,xo=Ee,Uo=wr,Mg=br,xg=1,Fo="[object Arguments]",Oo="[object Array]",Ft="[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?Ft:c,u=u==Fo?Ft:u;var d=c==Ft,m=u==Ft,f=c==u;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new On),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__"),h=m&&Ro.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,w=h?t.value():t;return a||(a=new On),i(v,w,r,o,a)}}return f?(a||(a=new On),Ng(e,t,r,o,i,a)):!1}var Og=Fg,Rg=Og,$o=Oe;function Xi(e,t,r,o,i){return e===t?!0:e==null||t==null||!$o(e)&&!$o(t)?e!==e&&t!==t:Rg(e,t,r,o,Xi,i)}var ea=Xi,$g=_r,Dg=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 $g;if(o)var f=o(u,d,c,e,t,m);if(!(f===void 0?Dg(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,_h=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}),Sh=_h,Do=hn,wh=Di,Ch=Ee,bh=Er,Bo=Do?Do.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=Sh,Mh=Ih;function xh(e,t){return Ph(e)?e:kh(e,t)?[e]:Nh(Mh(e))}var wn=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 At=Fh,Oh=wn,Rh=At;function $h(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=$h,Dh=Pr;function Bh(e,t,r){var o=e==null?void 0:Dh(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=wn,jh=Sr,Wh=Ee,Hh=_n,Kh=Cr,Yh=At;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=At,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,_y=yy,Sy=Tr,wy=At;function Cy(e){return Sy(e)?vy(wy(e)):_y(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=bt,Ry=Object.prototype,$y=Ry.hasOwnProperty;function Dy(e,t,r){var o=e[t];(!($y.call(e,t)&&Oy(o,r))||r===void 0&&!(t in e))&&Fy(e,t,r)}var aa=Dy,By=aa,Vy=wn,zy=_n,Lo=Ae,Ly=At;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=wn;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=Sn;function yv(e){return hv(e)?mv(e,!0):gv(e)}var xr=yv,vv=Wi,_v=ov,Sv=xr;function wv(e){return vv(e,Sv,_v)}var Cv=wv,bv=Di,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=$i(Pv),Nv=!0,Mv="",Cn=(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:Cn(o,t)}}return r},Fv=(e,t,r)=>{const{password:o,...i}=t,a=Uv(i),s={autoSignIn:Nv,userAttributes:{...r==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},Ov=({formValues:e,loginMechanisms:t})=>{const r=t[0];if(r==="phone_number"){const{country_code:o,phone_number:i}=e;return Cn(o,i)}return e[r]},{assign:V}=Ni,Rv=V({actorDoneData:void 0}),$v=V({challengeName:void 0}),Dv=V({missingAttributes:void 0}),Bv=V({remoteError:void 0}),Vv=V({formValues:{}}),zv=V({touched:{}}),Lv=V({user:void 0}),Gv=V({validationError:{}}),jv=V({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:r}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),Wv=V({allowedMfaTypes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.allowedMFATypes}}),Hv=V({step:"SIGN_IN"}),Kv=V({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Yv=V({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),qv=V({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}}}),Jv=V({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?Cn(i,o):o}}),Zv=V({username:Ov}),Qv=V({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?Cn(i,o):o}}),Xv=V({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),e_=V({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),t_=V({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),n_=V({missingAttributes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.missingAttributes}}),r_=V({validationError:(e,{data:t})=>t}),o_=V({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) – please contact the administrator":(t==null?void 0:t.message)||t}),i_=V({user:(e,{data:t})=>t}),Go=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),a_=V({codeDeliveryDetails:(e,{data:t})=>{var r;return(r=t==null?void 0:t.nextStep)!=null&&r.codeDeliveryDetails?Go(t.nextStep.codeDeliveryDetails):Go(t)}}),s_=V({formValues:(e,{data:t})=>{const{name:r,value:o}=t;return{...e.formValues,[r]:o}}}),l_=V({formValues:(e,{data:t})=>Ss({...e.formValues,...t},"password")}),c_=V({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),u_=V({unverifiedUserAttributes:(e,{data:t})=>{const{email:r,phone_number:o}=t;return{...r&&{email:r},...o&&{phone_number:o}}}}),d_=V({selectedUserAttribute:void 0}),f_=V({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),p_=V({step:"CONFIRM_SIGN_UP"}),Et={clearActorDoneData:Rv,clearChallengeName:$v,clearError:Bv,clearFormValues:Vv,clearMissingAttributes:Dv,clearSelectedUserAttribute:d_,clearTouched:zv,clearUser:Lv,clearValidationError:Gv,handleBlur:c_,handleInput:s_,handleSubmit:l_,setAllowedMfaTypes:Wv,setChallengeName:qv,setCodeDeliveryDetails:a_,setFieldErrors:r_,setMissingAttributes:n_,setNextResetPasswordStep:t_,setNextSignInStep:Xv,setNextSignUpStep:e_,setRemoteError:o_,setConfirmAttributeCompleteStep:Yv,setConfirmSignUpSignUpStep:p_,setShouldVerifyUserAttributeStep:Kv,setSelectedUserAttribute:f_,setSignInStep:Hv,setTotpSecretCode:jv,setUser:i_,setUnverifiedUserAttributes:u_,setUsernameForgotPassword:Jv,setUsernameSignIn:Qv,setUsernameSignUp:Zv},m_=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],g_=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",h_=(e,{data:t})=>{var r;return((r=t==null?void 0:t.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},y_=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",v_=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",__=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",S_=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",w_=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",C_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",b_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",A_=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",E_=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",T_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",I_=({step:e})=>m_.includes(e),P_=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",k_=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",N_=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),M_=({step:e})=>e==="RESET_PASSWORD",x_=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",U_=({step:e})=>e==="CONFIRM_SIGN_UP",F_=(e,{data:t})=>{const{email:r,phone_number:o,phone_number_verified:i,email_verified:a}=t;return!r&&!o?!1:(a===void 0||a==="false")&&(i===void 0||i==="false")},O_=(e,{data:t})=>t.message==="User is already confirmed.",bn={hasCompletedAttributeConfirmation:C_,hasCompletedResetPassword:w_,hasCompletedSignIn:__,hasCompletedSignUp:S_,isConfirmSignUpStep:T_,isConfirmUserAttributeStep:b_,isResetPasswordStep:E_,isShouldConfirmUserAttributeStep:A_,isUserAlreadyConfirmed:O_,shouldAutoSignIn:v_,shouldConfirmResetPassword:x_,shouldConfirmSignIn:I_,shouldConfirmSignInWithNewPassword:g_,shouldConfirmSignUp:U_,shouldConfirmSignUpFromSignIn:y_,shouldResetPassword:M_,shouldResetPasswordFromSignIn:h_,shouldSetupTotp:P_,shouldSetupEmail:k_,shouldSelectMfaType:N_,shouldVerifyAttribute:F_};var R_=Nr,$_=bt;function D_(e,t,r){(r!==void 0&&!$_(e[t],r)||r===void 0&&!(t in e))&&R_(e,t,r)}var sa=D_;function B_(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 V_=B_,z_=V_,L_=z_(),G_=L_,tn={exports:{}};tn.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})(tn,tn.exports);var j_=tn.exports,jo=Gi;function W_(e){var t=new e.constructor(e.byteLength);return new jo(t).set(new jo(e)),t}var H_=W_,K_=H_;function Y_(e,t){var r=t?K_(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var q_=Y_;function J_(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}var Z_=J_,Q_=Ae,Wo=Object.create,X_=function(){function e(){}return function(t){if(!Q_(t))return{};if(Wo)return Wo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),eS=X_,tS=eS,nS=Mr,rS=Ar;function oS(e){return typeof e.constructor=="function"&&!rS(e)?tS(nS(e)):{}}var iS=oS,aS=Sn,sS=Oe;function lS(e){return sS(e)&&aS(e)}var cS=lS,uS=Xe,dS=Mr,fS=Oe,pS="[object Object]",mS=Function.prototype,gS=Object.prototype,la=mS.toString,hS=gS.hasOwnProperty,yS=la.call(Object);function vS(e){if(!fS(e)||uS(e)!=pS)return!1;var t=dS(e);if(t===null)return!0;var r=hS.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&la.call(r)==yS}var _S=vS;function SS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ca=SS,wS=aa,CS=Nr;function bS(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?CS(r,l,c):wS(r,l,c)}return r}var AS=bS,ES=AS,TS=xr;function IS(e){return ES(e,TS(e))}var PS=IS,Ho=sa,kS=j_,NS=q_,MS=Z_,xS=iS,Ko=Sr,Yo=Ee,US=cS,FS=wr,OS=hr,RS=Ae,$S=_S,DS=br,qo=ca,BS=PS;function VS(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&&FS(c),h=!f&&!p&&DS(c);d=c,f||p||h?Yo(l)?d=l:US(l)?d=MS(l):p?(m=!1,d=kS(c,!0)):h?(m=!1,d=NS(c,!0)):d=[]:$S(c)||Ko(c)?(d=l,Ko(l)?d=BS(l):(!RS(l)||OS(l))&&(d=xS(c))):m=!1}m&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),Ho(e,r,d)}var zS=VS,LS=_r,GS=sa,jS=G_,WS=zS,HS=Ae,KS=xr,YS=ca;function ua(e,t,r,o,i){e!==t&&jS(t,function(a,s){if(i||(i=new LS),HS(a))WS(e,t,s,r,ua,o,i);else{var l=o?o(YS(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),GS(e,s,l)}},KS)}var qS=ua;function JS(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 ZS=JS,QS=ZS,Jo=Math.max;function XS(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),QS(e,this,l)}}var ew=XS;function tw(e){return function(){return e}}var nw=tw,rw=nw,Zo=ia,ow=kr,iw=Zo?function(e,t){return Zo(e,"toString",{configurable:!0,enumerable:!1,value:rw(t),writable:!0})}:ow,aw=iw,sw=800,lw=16,cw=Date.now;function uw(e){var t=0,r=0;return function(){var o=cw(),i=lw-(o-r);if(r=o,i>0){if(++t>=sw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dw=uw,fw=aw,pw=dw,mw=pw(fw),gw=mw,hw=kr,yw=ew,vw=gw;function _w(e,t){return vw(yw(e,t,hw),e+"")}var Sw=_w,ww=bt,Cw=Sn,bw=_n,Aw=Ae;function Ew(e,t,r){if(!Aw(r))return!1;var o=typeof t;return(o=="number"?Cw(r)&&bw(t,r.length):o=="string"&&t in r)?ww(r[t],e):!1}var Tw=Ew,Iw=Sw,Pw=Tw;function kw(e){return Iw(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&&Pw(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 Nw=kw,Mw=qS,xw=Nw,Uw=xw(function(e,t,r){Mw(e,t,r)}),Fw=Uw;const Ow=$i(Fw),An=async(e,t,r,o)=>{const i=await Promise.all(o.map(s=>s(e,t,r))),a=Ow({},...i);return ri(a)?Promise.resolve():Promise.reject(a)},Rw=8,$w=e=>Array.isArray(e),Dw=e=>{if(e)return $w(e)?Object.entries(e).map(([t,r])=>Object.keys(r)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var l,c,u,d;const e=Da.Amplify.getConfig(),t=(l=e.Auth)==null?void 0:l.Cognito,{loginWith:r,userAttributes:o}=((c=e.Auth)==null?void 0:c.Cognito)??{},i=r?Object.entries(r).filter(([m,f])=>m!=="oauth").filter(([m,f])=>!!f).map(m=>m[0]==="phone"?"phone_number":m[0]):void 0,a=Dw(o),s=(u=r==null?void 0:r.oauth)!=null&&u.providers?(d=r.oauth.providers)==null?void 0:d.map(m=>m.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:Y.getCurrentUser,handleSignIn:Y.signIn,handleSignUp:Y.signUp,handleConfirmSignIn:Y.confirmSignIn,handleConfirmSignUp:Y.confirmSignUp,handleForgotPasswordSubmit:Y.confirmResetPassword,handleForgotPassword:Y.resetPassword,handleResendSignUpCode:Y.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??Rw;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){}};function Bw({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:{...Et,sendUpdate:pn()},guards:bn,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 An(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}}}),Vw=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",er={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"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},zw={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}},Ot=e=>({initial:"edit",exit:e,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...er}}}});function Lw({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",...zw}},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"},SUBMIT:{actions:"handleSubmit",target:"submit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",...er}}}},confirmSignIn:Ot(["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",...er}}}}}},setupTotp:Ot(["clearFormValues","clearError","clearTouched"]),setupEmail:Ot(["clearFormValues","clearError","clearTouched"]),selectMfaType:Ot(["clearFormValues","clearError","clearTouched"]),resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Et,sendUpdate:pn()},guards:bn,services:{async fetchUserAttributes(){return Y.fetchUserAttributes()},resetPassword({username:t}){return Y.resetPassword({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},handleSignIn({formValues:t,username:r}){const{password:o}=t;return e.handleSignIn({username:r,password:o})},confirmSignIn({formValues:t,step:r}){const o=Vw(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 Y.confirmSignIn(c)},signInWithRedirect(t,{data:r}){return Y.signInWithRedirect(r)},async validateFields(t){return An(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Gw={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},jw={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"}},Ww={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function Hw({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",...jw}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...Ww}},federatedSignIn:da("signUp"),resetPassword:{invoke:{src:"resetPassword",...Gw}},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"]}]}},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:"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"}}}}},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:{...Et,sendUpdate:pn()},guards:bn,services:{autoSignIn(){return Y.autoSignIn()},async fetchUserAttributes(){return Y.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 Y.signInWithRedirect(r)},handleSignUp(t){const{formValues:r,loginMechanisms:o,username:i}=t,a=o[0],s=Fv(i,r,a);return e.handleSignUp(s)},async validateSignUp(t){return An(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const Kw=()=>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:()=>Y.signOut()}});function Yw(){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:{...Et,sendUpdate:pn()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return Y.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const r={confirmationCode:e,userAttributeKey:t};return Y.confirmUserAttribute(r)},async validateFields(e){return An(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Rt=(e,t)=>{var r,o,i,a,s,l;return{...e.actorDoneData,step:((r=e==null?void 0:e.actorDoneData)==null?void 0:r.step)??t,formValues:{},touched:{},validationError:{},formFields:(o=e.config)==null?void 0:o.formFields,loginMechanisms:(i=e.config)==null?void 0:i.loginMechanisms,passwordSettings:(a=e.config)==null?void 0:a.passwordSettings,signUpAttributes:(s=e.config)==null?void 0:s.signUpAttributes,socialProviders:(l=e.config)==null?void 0:l.socialProviders}},{choose:qw,stop:Jw}=Ni,ct=e=>Jw(e),Zw={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},Qw={always:{actions:"configure",target:"getConfig"}};function Xw(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?Qw:Zw,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",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:{...Et,forwardToActor:qw([{cond:"hasActor",actions:Ac(({actorRef:i})=>i)}]),setActorDoneData:Se({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:Se({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??{}}=i.config;return s.length===0&&s.push("username"),{formFields:eC(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:l,socialProviders:c}}}),spawnSignInActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Lw({services:s}).withContext(Rt(i,"SIGN_IN"));return at(l,{name:"signInActor"})}}),spawnSignUpActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Hw({services:s}).withContext(Rt(i,"SIGN_UP"));return at(l,{name:"signUpActor"})}}),spawnForgotPasswordActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Bw({services:s}).withContext(Rt(i,"FORGOT_PASSWORD"));return at(l,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Se({actorRef:i=>{const a=Yw().withContext(Rt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Se({actorRef:i=>{const a=Kw().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:Se((i,a)=>{const{services:s,...l}=Xa(r)?a.data??{}:r;return{services:{...ke,...s},config:l}}),setHasSetup:Se({hasSetup:!0})},guards:{...bn,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 eC(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"},tC=({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},nC={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},rC={class:"amplify-flex amplify-authenticator__icon-wrapper"},oC=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),iC=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=P("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ne;return t.value?(n.openBlock(),n.createElementBlock("div",nC,[n.createElementVNode("div",rC,[oC,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(()=>[iC]),_: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 aC(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))),aC(i),r)}function sC(e){return"state"in e}var Qo=function(){};function lC(e){return"getSnapshot"in e?e.getSnapshot():sC(e)?e.state:void 0}function cC(e,t){t===void 0&&(t=lC);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 uC=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=Xw(),t=Ri(e).start(),r=n.ref("configuring"),{state:o,send:i}=cC(t),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},l=ns(t,(c,u)=>oi(c,u,{onSignIn:a,onSignOut:s}));return Y.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"?uC(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=r,o.state=t}),o});let dC=(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 Tt=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))}}),fC={},pC={"data-amplify-label":""};function mC(e,t){return n.openBlock(),n.createElementBlock("label",pC,[n.renderSlot(e.$slots,"default")])}const It=on(fC,[["render",mC]]),gC=["aria-label","aria-checked"],hC=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),yC=[hC],vC=n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),_C=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),SC=[vC,_C],wC={inheritAttrs:!1},Fr=n.defineComponent({...wC,__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=P("Show password"),o=P("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),h=n.ref("");function v(){a.value=a.value===r?o:r,i.value=i.value==="password"?"text":"password"}const w=P((f==null?void 0:f.value)??c.value),g=P(c.value);return(_,y)=>{const S=It,C=Tt,A=X;return n.openBlock(),n.createBlock(A,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).Field,n.unref(oe).TextField,n.unref(oe).PasswordField])},{default:n.withCtx(()=>[n.createVNode(S,{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(g)),1)]),_:1},8,["class","for"]),n.createVNode(A,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(A,{class:n.normalizeClass(n.unref(oe).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(C,n.mergeProps(_.$attrs,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=E=>h.value=E),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(A,{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:v},[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)},yC,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)},SC,2))],10,gC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),CC=["value","selected"],bC=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,CC))),128))],32))}}),AC=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),EC=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 h=It,v=bC,w=X,g=Tt;return n.openBlock(),n.createBlock(w,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(h,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(h,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(v,{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(()=>[AC]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(w,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(g,{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})}}}),TC=["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=dC(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(EC,{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,h)=>(n.openBlock(),n.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(P)(p)),1))),128))],8,TC)):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})}}}),IC=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),PC={class:"amplify-text"},kC=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),NC={class:"amplify-text"},MC=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),xC={class:"amplify-text"},UC=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),FC={class:"amplify-text"},OC=["data-label"],En=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(()=>zn),f=n.computed(()=>u(r,"amazon")),p=n.computed(()=>u(r,"apple")),h=n.computed(()=>u(r,"facebook")),v=n.computed(()=>u(r,"google")),w=n.computed(()=>d());return(g,_)=>{const y=X;return n.unref(c)?(n.openBlock(),n.createBlock(y,{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(()=>[IC,n.createElementVNode("span",PC,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(()=>[kC,n.createElementVNode("span",NC,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(()=>[MC,n.createElementVNode("span",xC,n.toDisplayString(n.unref(h)),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(()=>[UC,n.createElementVNode("span",FC,n.toDisplayString(n.unref(v)),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,OC)]),_:1})):n.createCommentVNode("",!0)}}}),RC=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),$C={"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:g,value:_}=w.target;o({name:g,value:_})},h=w=>{r(de(w))},v=()=>{i()};return(w,g)=>{const _=pe,y=fe,S=ne,C=X,A=ue,E=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(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:n.withModifiers(h,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"form",{info:T,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:n.withCtx(()=>[n.createVNode(En),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(_,{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(()=>[RC,n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(y,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(S,{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(E,null,{default:n.withCtx(()=>[n.renderSlot(w.$slots,"footer",{},()=>[n.createElementVNode("div",$C,[n.createVNode(S,{onClick:v,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"}))}}),$r=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:h,name:v,type:w,value:g}=p.target;i({name:v,value:w==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{r(de(p))};return(p,h)=>{const v=pe,w=fe,g=ne,_=X,y=ue,S=ce;return n.renderSlot(p.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(p.$attrs)),()=>[n.renderSlot(p.$slots,"header"),n.createVNode(_,n.normalizeProps(n.guardReactiveProps(p.$attrs)),{default:n.withCtx(()=>[n.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:n.withModifiers(f,["prevent"])},{default:n.withCtx(()=>[n.createVNode(En),n.createVNode(_,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(v,{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(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(g,{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(S,null,{default:n.withCtx(()=>[n.renderSlot(p.$slots,"footer")]),_:3})])}}}),DC={};function BC(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 VC=on(DC,[["render",BC]]),zC=["tabindex","aria-selected","id","aria-controls"],LC=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))}}),GC="4.3.6",jC={};function WC(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 Dr=on(jC,[["render",WC]]),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()),h=n.computed(()=>m()),v=n.computed(()=>u(r.value)),w=S=>{const{name:C,value:A}=S.target;l({name:C,value:A})},g=S=>{_(S)},_=S=>{s(de(S))},y=()=>{a()};return(S,C)=>{const A=ve,E=Dr,T=pe,I=fe,k=ne,N=ce,U=X,F=ue;return n.renderSlot(S.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.createVNode(U,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(F,{onInput:w,onSubmit:n.withModifiers(g,["prevent"])},{default:n.withCtx(()=>[n.createVNode(U,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(S.$slots,"header",{},()=>[n.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)),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(I,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(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(h)),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(y,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(S.$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()),h=n.computed(()=>d()),v=_=>{const{name:y,value:S}=_.target;i({name:y,value:S})},w=_=>{r(de(_))},g=()=>{o()};return(_,y)=>{const S=ve,C=X,A=fe,E=ne,T=ce,I=pe,k=ue;return n.renderSlot(_.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(_.$attrs)),()=>[n.createVNode(C,n.normalizeProps(n.guardReactiveProps(_.$attrs)),{default:n.withCtx(()=>[n.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:n.withModifiers(w,["prevent"])},{default:n.withCtx(()=>[n.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(_.$slots,"header",{},()=>[n.createVNode(S,{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(A,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(E,{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(h)),1)]),_:1},8,["disabled"]),n.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(g,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(_.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Pt={},HC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ma={},le={};let zr;const KC=[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 KC[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 Tn={};(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}}})(Tn);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 YC=ga;function kt(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)}kt.prototype.set=function(e,t,r,o){const i=e*this.size+t;this.data[i]=r,o&&(this.reservedBit[i]=!0)};kt.prototype.get=function(e,t){return this.data[e*this.size+t]};kt.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};kt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var qC=kt,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 JC=le.getSymbolSize,Xo=7;ya.getPositions=function(t){const r=JC(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 In={};const Ie=Tn,Dt=[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],Bt=[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];In.getBlocksCount=function(t,r){switch(r){case Ie.L:return Dt[(t-1)*4+0];case Ie.M:return Dt[(t-1)*4+1];case Ie.Q:return Dt[(t-1)*4+2];case Ie.H:return Dt[(t-1)*4+3];default:return}};In.getTotalCodewordsCount=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}};var _a={},Pn={};const ht=new Uint8Array(512),nn=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ht[r]=t,nn[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ht[r]=ht[r-255]})();Pn.log=function(t){if(t<1)throw new Error("log("+t+")");return nn[t]};Pn.exp=function(t){return ht[t]};Pn.mul=function(t,r){return t===0||r===0?0:ht[nn[t]+nn[r]]};(function(e){const t=Pn;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}})(_a);const Sa=_a;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=Sa.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=Sa.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 ZC=Lr,wa={},Ne={},Gr={};Gr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _e={};const Ca="[0-9]+",QC="[A-Z $%*+\\-./:]+";let wt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";wt=wt.replace(/u/g,"\\u");const XC="(?:(?![A-Z0-9 $%*+\\-./:]|"+wt+`)(?:.|[\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 D(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(_){!W&&_===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 y=$e(_,u[_]);return W||Cc(o,_,y),y}).concat($e(st,c)))}var d=this.config.always?$e("",this.config.always):[],m=this.config.onDone?$e(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(_){var y=[];return _.onDone&&y.push.apply(y,L([],$($e(String(gt(_.id)),_.onDone)),!1)),_.onError&&y.push.apply(y,L([],$($e(String(Le(_.id)),_.onError)),!1)),y})),p=this.after,h=j(L(L(L(L([],$(m),!1),$(f),!1),$(i),!1),$(d),!1).map(function(_){return me(_).map(function(y){return o.formatTransition(y)})}));try{for(var v=R(p),w=v.next();!w.done;w=v.next()){var g=w.value;h.push(g)}}catch(_){t={error:_}}finally{try{w&&!w.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return h},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 Se=Ii,pn=wi,Ac=ki,Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $i(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 Di=Ec;function Tc(){this.__data__=[],this.size=0}var Ic=Tc;function Pc(e,t){return e===t||e!==e&&t!==t}var bt=Pc,kc=bt;function Nc(e,t){for(var r=e.length;r--;)if(kc(e[r][0],t))return r;return-1}var mn=Nc,Mc=mn,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=mn;function $c(e){var t=this.__data__,r=Rc(t,e);return r<0?void 0:t[r][1]}var Dc=$c,Bc=mn;function Vc(e){return Bc(this.__data__,e)>-1}var zc=Vc,Lc=mn;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=Dc,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 gn=Qe,Jc=gn;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 Ut=="object"&&Ut&&Ut.Object===Object&&Ut,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,hn=uu,fo=hn,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=hn,_u=mu,Su=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)?_u(e):Su(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,Un=Fu,go=function(){var e=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ou(e){return!!go&&go in e}var Ru=Ou,$u=Function.prototype,Du=$u.toString;function Bu(e){if(e!=null){try{return Du.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"),yn=ld,ho=yn;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=yn,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,_d=yn,Sd=Object.prototype,wd=Sd.hasOwnProperty;function Cd(e){var t=this.__data__;return _d?t[e]!==void 0:wd.call(t,e)}var bd=Cd,Ad=yn,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=gn,Od=yr;function Rd(){this.size=0,this.__data__={hash:new yo,map:new(Od||Fd),string:new yo}}var $d=Rd;function Dd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Bd=Dd,Vd=Bd;function zd(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var vn=zd,Ld=vn;function Gd(e){var t=Ld(this,e).delete(e);return this.size-=t?1:0,t}var jd=Gd,Wd=vn;function Hd(e){return Wd(this,e).get(e)}var Kd=Hd,Yd=vn;function qd(e){return Yd(this,e).has(e)}var Jd=qd,Zd=vn;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=$d,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=gn,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=gn,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 _r=nt,vf="__lodash_hash_undefined__";function _f(e){return this.__data__.set(e,vf),this}var Sf=_f;function wf(e){return this.__data__.has(e)}var Cf=wf,bf=vr,Af=Sf,Ef=Cf;function Qt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bf;++t<r;)this.add(e[t])}Qt.prototype.add=Qt.prototype.push=Af;Qt.prototype.has=Ef;var Tf=Qt;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 h=e[m],v=t[m];if(o)var w=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(w!==void 0){if(w)continue;f=!1;break}if(p){if(!xf(t,function(g,_){if(!Uf(p,_)&&(h===g||i(h,g,r,o,a)))return p.push(_)})){f=!1;break}}else if(!(h===v||i(h,v,r,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Li=Rf,$f=ye,Df=$f.Uint8Array,Gi=Df;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=hn,_o=Gi,Gf=bt,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]",So=vo?vo.prototype:void 0,Fn=So?So.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 _o(e),new _o(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(Fn)return Fn.call(e)==Fn.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,_p=vp.propertyIsEnumerable,wo=Object.getOwnPropertySymbols,Sp=wo?function(e){return e==null?[]:(e=Object(e),hp(wo(e),function(t){return _p.call(e,t)}))}:yp,Ki=Sp;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")},Sr=xp,Xt={exports:{}};function Up(){return!1}var Fp=Up;Xt.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})(Xt,Xt.exports);var wr=Xt.exports,Op=9007199254740991,Rp=/^(?:0|[1-9]\d*)$/;function $p(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 _n=$p,Dp=9007199254740991;function Bp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dp}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,en={exports:{}};en.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})(en,en.exports);var ym=en.exports,vm=mm,_m=hm,bo=ym,Ao=bo&&bo.isTypedArray,Sm=Ao?_m(Ao):vm,br=Sm,wm=Cp,Cm=Sr,bm=Ee,Am=wr,Em=_n,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,$m=Om,Dm=Object.prototype,Bm=Dm.hasOwnProperty;function Vm(e){if(!Rm(e))return $m(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 Sn=jm,Wm=qi,Hm=zm,Km=Sn;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),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var w=s;++m<c;){f=l[m];var g=e[f],_=t[f];if(o)var y=s?o(_,g,f,t,e,a):o(g,_,f,e,t,a);if(!(y===void 0?g===_||i(g,_,r,o,a):y)){v=!1;break}w||(w=f=="constructor")}if(v&&!w){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(e),a.delete(t),v}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,_g=yg(vg,"WeakMap"),Sg=_g,qn=lg,Jn=yr,Zn=fg,Qn=hg,Xn=Sg,Qi=Xe,rt=zi,To="[object Map]",wg="[object Object]",Io="[object Promise]",Po="[object Set]",ko="[object WeakMap]",No="[object DataView]",Cg=rt(qn),bg=rt(Jn),Ag=rt(Zn),Eg=rt(Qn),Tg=rt(Xn),xe=Qi;(qn&&xe(new qn(new ArrayBuffer(1)))!=No||Jn&&xe(new Jn)!=To||Zn&&xe(Zn.resolve())!=Io||Qn&&xe(new Qn)!=Po||Xn&&xe(new Xn)!=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,On=_r,Pg=Li,kg=sp,Ng=og,Mo=Ig,xo=Ee,Uo=wr,Mg=br,xg=1,Fo="[object Arguments]",Oo="[object Array]",Ft="[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?Ft:c,u=u==Fo?Ft:u;var d=c==Ft,m=u==Ft,f=c==u;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new On),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__"),h=m&&Ro.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,w=h?t.value():t;return a||(a=new On),i(v,w,r,o,a)}}return f?(a||(a=new On),Ng(e,t,r,o,i,a)):!1}var Og=Fg,Rg=Og,$o=Oe;function Xi(e,t,r,o,i){return e===t?!0:e==null||t==null||!$o(e)&&!$o(t)?e!==e&&t!==t:Rg(e,t,r,o,Xi,i)}var ea=Xi,$g=_r,Dg=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 $g;if(o)var f=o(u,d,c,e,t,m);if(!(f===void 0?Dg(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,_h=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}),Sh=_h,Do=hn,wh=Di,Ch=Ee,bh=Er,Bo=Do?Do.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=Sh,Mh=Ih;function xh(e,t){return Ph(e)?e:kh(e,t)?[e]:Nh(Mh(e))}var wn=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 At=Fh,Oh=wn,Rh=At;function $h(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=$h,Dh=Pr;function Bh(e,t,r){var o=e==null?void 0:Dh(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=wn,jh=Sr,Wh=Ee,Hh=_n,Kh=Cr,Yh=At;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=At,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,_y=yy,Sy=Tr,wy=At;function Cy(e){return Sy(e)?vy(wy(e)):_y(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=bt,Ry=Object.prototype,$y=Ry.hasOwnProperty;function Dy(e,t,r){var o=e[t];(!($y.call(e,t)&&Oy(o,r))||r===void 0&&!(t in e))&&Fy(e,t,r)}var aa=Dy,By=aa,Vy=wn,zy=_n,Lo=Ae,Ly=At;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=wn;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=Sn;function yv(e){return hv(e)?mv(e,!0):gv(e)}var xr=yv,vv=Wi,_v=ov,Sv=xr;function wv(e){return vv(e,Sv,_v)}var Cv=wv,bv=Di,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=$i(Pv),Nv=!0,Mv="",Cn=(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:Cn(o,t)}}return r},Fv=(e,t,r)=>{const{password:o,...i}=t,a=Uv(i),s={autoSignIn:Nv,userAttributes:{...r==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},Ov=({formValues:e,loginMechanisms:t})=>{if(t.includes("username"))return e.username;const r=t[0];if(r==="phone_number"){const{country_code:o,phone_number:i}=e;return Cn(o,i)}return e[r]},{assign:V}=Ni,Rv=V({actorDoneData:void 0}),$v=V({challengeName:void 0}),Dv=V({missingAttributes:void 0}),Bv=V({remoteError:void 0}),Vv=V({formValues:{}}),zv=V({touched:{}}),Lv=V({user:void 0}),Gv=V({validationError:{}}),jv=V({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:r}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),Wv=V({allowedMfaTypes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.allowedMFATypes}}),Hv=V({step:"SIGN_IN"}),Kv=V({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Yv=V({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),qv=V({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}}}),Jv=V({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?Cn(i,o):o}}),Zv=V({username:Ov}),Qv=V({username:({formValues:e,loginMechanisms:t})=>{const r=t[0],{username:o,country_code:i}=e;return r==="phone_number"?Cn(i,o):o}}),Xv=V({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),e_=V({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),t_=V({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),n_=V({missingAttributes:(e,{data:t})=>{var r;return(r=t.nextStep)==null?void 0:r.missingAttributes}}),r_=V({validationError:(e,{data:t})=>t}),o_=V({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) – please contact the administrator":(t==null?void 0:t.message)||t}),i_=V({user:(e,{data:t})=>t}),Go=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),a_=V({codeDeliveryDetails:(e,{data:t})=>{var r;return(r=t==null?void 0:t.nextStep)!=null&&r.codeDeliveryDetails?Go(t.nextStep.codeDeliveryDetails):Go(t)}}),s_=V({formValues:(e,{data:t})=>{const{name:r,value:o}=t;return{...e.formValues,[r]:o}}}),l_=V({formValues:(e,{data:t})=>Ss({...e.formValues,...t},"password")}),c_=V({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),u_=V({unverifiedUserAttributes:(e,{data:t})=>{const{email:r,phone_number:o}=t;return{...r&&{email:r},...o&&{phone_number:o}}}}),d_=V({selectedUserAttribute:void 0}),f_=V({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),p_=V({step:"CONFIRM_SIGN_UP"}),Et={clearActorDoneData:Rv,clearChallengeName:$v,clearError:Bv,clearFormValues:Vv,clearMissingAttributes:Dv,clearSelectedUserAttribute:d_,clearTouched:zv,clearUser:Lv,clearValidationError:Gv,handleBlur:c_,handleInput:s_,handleSubmit:l_,setAllowedMfaTypes:Wv,setChallengeName:qv,setCodeDeliveryDetails:a_,setFieldErrors:r_,setMissingAttributes:n_,setNextResetPasswordStep:t_,setNextSignInStep:Xv,setNextSignUpStep:e_,setRemoteError:o_,setConfirmAttributeCompleteStep:Yv,setConfirmSignUpSignUpStep:p_,setShouldVerifyUserAttributeStep:Kv,setSelectedUserAttribute:f_,setSignInStep:Hv,setTotpSecretCode:jv,setUser:i_,setUnverifiedUserAttributes:u_,setUsernameForgotPassword:Jv,setUsernameSignIn:Qv,setUsernameSignUp:Zv},m_=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],g_=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",h_=(e,{data:t})=>{var r;return((r=t==null?void 0:t.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},y_=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",v_=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",__=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",S_=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",w_=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",C_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",b_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",A_=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",E_=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",T_=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",I_=({step:e})=>m_.includes(e),P_=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",k_=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",N_=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),M_=({step:e})=>e==="RESET_PASSWORD",x_=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",U_=({step:e})=>e==="CONFIRM_SIGN_UP",F_=(e,{data:t})=>{const{email:r,phone_number:o,phone_number_verified:i,email_verified:a}=t;return!r&&!o?!1:(a===void 0||a==="false")&&(i===void 0||i==="false")},O_=(e,{data:t})=>t.message==="User is already confirmed.",bn={hasCompletedAttributeConfirmation:C_,hasCompletedResetPassword:w_,hasCompletedSignIn:__,hasCompletedSignUp:S_,isConfirmSignUpStep:T_,isConfirmUserAttributeStep:b_,isResetPasswordStep:E_,isShouldConfirmUserAttributeStep:A_,isUserAlreadyConfirmed:O_,shouldAutoSignIn:v_,shouldConfirmResetPassword:x_,shouldConfirmSignIn:I_,shouldConfirmSignInWithNewPassword:g_,shouldConfirmSignUp:U_,shouldConfirmSignUpFromSignIn:y_,shouldResetPassword:M_,shouldResetPasswordFromSignIn:h_,shouldSetupTotp:P_,shouldSetupEmail:k_,shouldSelectMfaType:N_,shouldVerifyAttribute:F_};var R_=Nr,$_=bt;function D_(e,t,r){(r!==void 0&&!$_(e[t],r)||r===void 0&&!(t in e))&&R_(e,t,r)}var sa=D_;function B_(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 V_=B_,z_=V_,L_=z_(),G_=L_,tn={exports:{}};tn.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})(tn,tn.exports);var j_=tn.exports,jo=Gi;function W_(e){var t=new e.constructor(e.byteLength);return new jo(t).set(new jo(e)),t}var H_=W_,K_=H_;function Y_(e,t){var r=t?K_(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var q_=Y_;function J_(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}var Z_=J_,Q_=Ae,Wo=Object.create,X_=function(){function e(){}return function(t){if(!Q_(t))return{};if(Wo)return Wo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),eS=X_,tS=eS,nS=Mr,rS=Ar;function oS(e){return typeof e.constructor=="function"&&!rS(e)?tS(nS(e)):{}}var iS=oS,aS=Sn,sS=Oe;function lS(e){return sS(e)&&aS(e)}var cS=lS,uS=Xe,dS=Mr,fS=Oe,pS="[object Object]",mS=Function.prototype,gS=Object.prototype,la=mS.toString,hS=gS.hasOwnProperty,yS=la.call(Object);function vS(e){if(!fS(e)||uS(e)!=pS)return!1;var t=dS(e);if(t===null)return!0;var r=hS.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&la.call(r)==yS}var _S=vS;function SS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ca=SS,wS=aa,CS=Nr;function bS(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?CS(r,l,c):wS(r,l,c)}return r}var AS=bS,ES=AS,TS=xr;function IS(e){return ES(e,TS(e))}var PS=IS,Ho=sa,kS=j_,NS=q_,MS=Z_,xS=iS,Ko=Sr,Yo=Ee,US=cS,FS=wr,OS=hr,RS=Ae,$S=_S,DS=br,qo=ca,BS=PS;function VS(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&&FS(c),h=!f&&!p&&DS(c);d=c,f||p||h?Yo(l)?d=l:US(l)?d=MS(l):p?(m=!1,d=kS(c,!0)):h?(m=!1,d=NS(c,!0)):d=[]:$S(c)||Ko(c)?(d=l,Ko(l)?d=BS(l):(!RS(l)||OS(l))&&(d=xS(c))):m=!1}m&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),Ho(e,r,d)}var zS=VS,LS=_r,GS=sa,jS=G_,WS=zS,HS=Ae,KS=xr,YS=ca;function ua(e,t,r,o,i){e!==t&&jS(t,function(a,s){if(i||(i=new LS),HS(a))WS(e,t,s,r,ua,o,i);else{var l=o?o(YS(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),GS(e,s,l)}},KS)}var qS=ua;function JS(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 ZS=JS,QS=ZS,Jo=Math.max;function XS(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),QS(e,this,l)}}var ew=XS;function tw(e){return function(){return e}}var nw=tw,rw=nw,Zo=ia,ow=kr,iw=Zo?function(e,t){return Zo(e,"toString",{configurable:!0,enumerable:!1,value:rw(t),writable:!0})}:ow,aw=iw,sw=800,lw=16,cw=Date.now;function uw(e){var t=0,r=0;return function(){var o=cw(),i=lw-(o-r);if(r=o,i>0){if(++t>=sw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dw=uw,fw=aw,pw=dw,mw=pw(fw),gw=mw,hw=kr,yw=ew,vw=gw;function _w(e,t){return vw(yw(e,t,hw),e+"")}var Sw=_w,ww=bt,Cw=Sn,bw=_n,Aw=Ae;function Ew(e,t,r){if(!Aw(r))return!1;var o=typeof t;return(o=="number"?Cw(r)&&bw(t,r.length):o=="string"&&t in r)?ww(r[t],e):!1}var Tw=Ew,Iw=Sw,Pw=Tw;function kw(e){return Iw(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&&Pw(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 Nw=kw,Mw=qS,xw=Nw,Uw=xw(function(e,t,r){Mw(e,t,r)}),Fw=Uw;const Ow=$i(Fw),An=async(e,t,r,o)=>{const i=await Promise.all(o.map(s=>s(e,t,r))),a=Ow({},...i);return ri(a)?Promise.resolve():Promise.reject(a)},Rw=8,$w=e=>Array.isArray(e),Dw=e=>{if(e)return $w(e)?Object.entries(e).map(([t,r])=>Object.keys(r)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var l,c,u,d;const e=Da.Amplify.getConfig(),t=(l=e.Auth)==null?void 0:l.Cognito,{loginWith:r,userAttributes:o}=((c=e.Auth)==null?void 0:c.Cognito)??{},i=r?Object.entries(r).filter(([m,f])=>m!=="oauth").filter(([m,f])=>!!f).map(m=>m[0]==="phone"?"phone_number":m[0]):void 0,a=Dw(o),s=(u=r==null?void 0:r.oauth)!=null&&u.providers?(d=r.oauth.providers)==null?void 0:d.map(m=>m.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:Y.getCurrentUser,handleSignIn:Y.signIn,handleSignUp:Y.signUp,handleConfirmSignIn:Y.confirmSignIn,handleConfirmSignUp:Y.confirmSignUp,handleForgotPasswordSubmit:Y.confirmResetPassword,handleForgotPassword:Y.resetPassword,handleResendSignUpCode:Y.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??Rw;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){}};function Bw({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:{...Et,sendUpdate:pn()},guards:bn,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 An(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}}}),Vw=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",er={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"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},zw={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}},Ot=e=>({initial:"edit",exit:e,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...er}}}});function Lw({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",...zw}},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"},SUBMIT:{actions:"handleSubmit",target:"submit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",...er}}}},confirmSignIn:Ot(["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",...er}}}}}},setupTotp:Ot(["clearFormValues","clearError","clearTouched"]),setupEmail:Ot(["clearFormValues","clearError","clearTouched"]),selectMfaType:Ot(["clearFormValues","clearError","clearTouched"]),resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Et,sendUpdate:pn()},guards:bn,services:{async fetchUserAttributes(){return Y.fetchUserAttributes()},resetPassword({username:t}){return Y.resetPassword({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},handleSignIn({formValues:t,username:r}){const{password:o}=t;return e.handleSignIn({username:r,password:o})},confirmSignIn({formValues:t,step:r}){const o=Vw(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 Y.confirmSignIn(c)},signInWithRedirect(t,{data:r}){return Y.signInWithRedirect(r)},async validateFields(t){return An(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Gw={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},jw={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"}},Ww={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function Hw({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",...jw}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...Ww}},federatedSignIn:da("signUp"),resetPassword:{invoke:{src:"resetPassword",...Gw}},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"]}]}},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:"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"}}}}},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:{...Et,sendUpdate:pn()},guards:bn,services:{autoSignIn(){return Y.autoSignIn()},async fetchUserAttributes(){return Y.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 Y.signInWithRedirect(r)},handleSignUp(t){const{formValues:r,loginMechanisms:o,username:i}=t,a=o[0],s=Fv(i,r,a);return e.handleSignUp(s)},async validateSignUp(t){return An(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const Kw=()=>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:()=>Y.signOut()}});function Yw(){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:{...Et,sendUpdate:pn()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return Y.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const r={confirmationCode:e,userAttributeKey:t};return Y.confirmUserAttribute(r)},async validateFields(e){return An(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Rt=(e,t)=>{var r,o,i,a,s,l;return{...e.actorDoneData,step:((r=e==null?void 0:e.actorDoneData)==null?void 0:r.step)??t,formValues:{},touched:{},validationError:{},formFields:(o=e.config)==null?void 0:o.formFields,loginMechanisms:(i=e.config)==null?void 0:i.loginMechanisms,passwordSettings:(a=e.config)==null?void 0:a.passwordSettings,signUpAttributes:(s=e.config)==null?void 0:s.signUpAttributes,socialProviders:(l=e.config)==null?void 0:l.socialProviders}},{choose:qw,stop:Jw}=Ni,ct=e=>Jw(e),Zw={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},Qw={always:{actions:"configure",target:"getConfig"}};function Xw(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?Qw:Zw,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",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:{...Et,forwardToActor:qw([{cond:"hasActor",actions:Ac(({actorRef:i})=>i)}]),setActorDoneData:Se({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:Se({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??{}}=i.config;return s.length===0&&s.push("username"),{formFields:eC(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:l,socialProviders:c}}}),spawnSignInActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Lw({services:s}).withContext(Rt(i,"SIGN_IN"));return at(l,{name:"signInActor"})}}),spawnSignUpActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Hw({services:s}).withContext(Rt(i,"SIGN_UP"));return at(l,{name:"signUpActor"})}}),spawnForgotPasswordActor:Se({actorRef:(i,a)=>{const{services:s}=i,l=Bw({services:s}).withContext(Rt(i,"FORGOT_PASSWORD"));return at(l,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Se({actorRef:i=>{const a=Yw().withContext(Rt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Se({actorRef:i=>{const a=Kw().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:Se((i,a)=>{const{services:s,...l}=Xa(r)?a.data??{}:r;return{services:{...ke,...s},config:l}}),setHasSetup:Se({hasSetup:!0})},guards:{...bn,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 eC(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"},tC=({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},nC={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},rC={class:"amplify-flex amplify-authenticator__icon-wrapper"},oC=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),iC=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=P("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=ne;return t.value?(n.openBlock(),n.createElementBlock("div",nC,[n.createElementVNode("div",rC,[oC,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(()=>[iC]),_: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 aC(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))),aC(i),r)}function sC(e){return"state"in e}var Qo=function(){};function lC(e){return"getSnapshot"in e?e.getSnapshot():sC(e)?e.state:void 0}function cC(e,t){t===void 0&&(t=lC);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 uC=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=Xw(),t=Ri(e).start(),r=n.ref("configuring"),{state:o,send:i}=cC(t),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},l=ns(t,(c,u)=>oi(c,u,{onSignIn:a,onSignOut:s}));return Y.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"?uC(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=r,o.state=t}),o});let dC=(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 Tt=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))}}),fC={},pC={"data-amplify-label":""};function mC(e,t){return n.openBlock(),n.createElementBlock("label",pC,[n.renderSlot(e.$slots,"default")])}const It=on(fC,[["render",mC]]),gC=["aria-label","aria-checked"],hC=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),yC=[hC],vC=n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),_C=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),SC=[vC,_C],wC={inheritAttrs:!1},Fr=n.defineComponent({...wC,__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=P("Show password"),o=P("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),h=n.ref("");function v(){a.value=a.value===r?o:r,i.value=i.value==="password"?"text":"password"}const w=P((f==null?void 0:f.value)??c.value),g=P(c.value);return(_,y)=>{const S=It,C=Tt,A=X;return n.openBlock(),n.createBlock(A,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).Field,n.unref(oe).TextField,n.unref(oe).PasswordField])},{default:n.withCtx(()=>[n.createVNode(S,{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(g)),1)]),_:1},8,["class","for"]),n.createVNode(A,{class:n.normalizeClass([n.unref(oe).Flex,n.unref(oe).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(A,{class:n.normalizeClass(n.unref(oe).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(C,n.mergeProps(_.$attrs,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=E=>h.value=E),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(A,{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:v},[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)},yC,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)},SC,2))],10,gC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),CC=["value","selected"],bC=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,CC))),128))],32))}}),AC=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),EC=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 h=It,v=bC,w=X,g=Tt;return n.openBlock(),n.createBlock(w,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(h,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(h,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(v,{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(()=>[AC]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(w,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(g,{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})}}}),TC=["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=dC(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(EC,{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,h)=>(n.openBlock(),n.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(P)(p)),1))),128))],8,TC)):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})}}}),IC=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),PC={class:"amplify-text"},kC=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),NC={class:"amplify-text"},MC=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),xC={class:"amplify-text"},UC=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),FC={class:"amplify-text"},OC=["data-label"],En=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(()=>zn),f=n.computed(()=>u(r,"amazon")),p=n.computed(()=>u(r,"apple")),h=n.computed(()=>u(r,"facebook")),v=n.computed(()=>u(r,"google")),w=n.computed(()=>d());return(g,_)=>{const y=X;return n.unref(c)?(n.openBlock(),n.createBlock(y,{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(()=>[IC,n.createElementVNode("span",PC,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(()=>[kC,n.createElementVNode("span",NC,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(()=>[MC,n.createElementVNode("span",xC,n.toDisplayString(n.unref(h)),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(()=>[UC,n.createElementVNode("span",FC,n.toDisplayString(n.unref(v)),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,OC)]),_:1})):n.createCommentVNode("",!0)}}}),RC=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),$C={"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:g,value:_}=w.target;o({name:g,value:_})},h=w=>{r(de(w))},v=()=>{i()};return(w,g)=>{const _=pe,y=fe,S=ne,C=X,A=ue,E=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(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:n.withModifiers(h,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:T})=>[n.renderSlot(w.$slots,"form",{info:T,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:n.withCtx(()=>[n.createVNode(En),n.createVNode(C,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(_,{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(()=>[RC,n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(y,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(S,{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(E,null,{default:n.withCtx(()=>[n.renderSlot(w.$slots,"footer",{},()=>[n.createElementVNode("div",$C,[n.createVNode(S,{onClick:v,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"}))}}),$r=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:h,name:v,type:w,value:g}=p.target;i({name:v,value:w==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{r(de(p))};return(p,h)=>{const v=pe,w=fe,g=ne,_=X,y=ue,S=ce;return n.renderSlot(p.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(p.$attrs)),()=>[n.renderSlot(p.$slots,"header"),n.createVNode(_,n.normalizeProps(n.guardReactiveProps(p.$attrs)),{default:n.withCtx(()=>[n.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:n.withModifiers(f,["prevent"])},{default:n.withCtx(()=>[n.createVNode(En),n.createVNode(_,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(v,{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(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(g,{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(S,null,{default:n.withCtx(()=>[n.renderSlot(p.$slots,"footer")]),_:3})])}}}),DC={};function BC(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 VC=on(DC,[["render",BC]]),zC=["tabindex","aria-selected","id","aria-controls"],LC=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))}}),GC="4.3.7",jC={};function WC(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 Dr=on(jC,[["render",WC]]),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()),h=n.computed(()=>m()),v=n.computed(()=>u(r.value)),w=S=>{const{name:C,value:A}=S.target;l({name:C,value:A})},g=S=>{_(S)},_=S=>{s(de(S))},y=()=>{a()};return(S,C)=>{const A=ve,E=Dr,T=pe,I=fe,k=ne,N=ce,U=X,F=ue;return n.renderSlot(S.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.createVNode(U,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(F,{onInput:w,onSubmit:n.withModifiers(g,["prevent"])},{default:n.withCtx(()=>[n.createVNode(U,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(S.$slots,"header",{},()=>[n.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f)),1)]),_:1})]),n.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)),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(I,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(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(h)),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(y,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(S.$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()),h=n.computed(()=>d()),v=_=>{const{name:y,value:S}=_.target;i({name:y,value:S})},w=_=>{r(de(_))},g=()=>{o()};return(_,y)=>{const S=ve,C=X,A=fe,E=ne,T=ce,I=pe,k=ue;return n.renderSlot(_.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(_.$attrs)),()=>[n.createVNode(C,n.normalizeProps(n.guardReactiveProps(_.$attrs)),{default:n.withCtx(()=>[n.createVNode(k,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:n.withModifiers(w,["prevent"])},{default:n.withCtx(()=>[n.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(_.$slots,"header",{},()=>[n.createVNode(S,{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(A,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(P)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(E,{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(h)),1)]),_:1},8,["disabled"]),n.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(g,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(p)),1)]),_:1},8,["onClick"]),n.renderSlot(_.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var Pt={},HC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ma={},le={};let zr;const KC=[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 KC[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 Tn={};(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}}})(Tn);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 YC=ga;function kt(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)}kt.prototype.set=function(e,t,r,o){const i=e*this.size+t;this.data[i]=r,o&&(this.reservedBit[i]=!0)};kt.prototype.get=function(e,t){return this.data[e*this.size+t]};kt.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};kt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var qC=kt,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 JC=le.getSymbolSize,Xo=7;ya.getPositions=function(t){const r=JC(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 In={};const Ie=Tn,Dt=[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],Bt=[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];In.getBlocksCount=function(t,r){switch(r){case Ie.L:return Dt[(t-1)*4+0];case Ie.M:return Dt[(t-1)*4+1];case Ie.Q:return Dt[(t-1)*4+2];case Ie.H:return Dt[(t-1)*4+3];default:return}};In.getTotalCodewordsCount=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}};var _a={},Pn={};const ht=new Uint8Array(512),nn=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ht[r]=t,nn[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ht[r]=ht[r-255]})();Pn.log=function(t){if(t<1)throw new Error("log("+t+")");return nn[t]};Pn.exp=function(t){return ht[t]};Pn.mul=function(t,r){return t===0||r===0?0:ht[nn[t]+nn[r]]};(function(e){const t=Pn;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}})(_a);const Sa=_a;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=Sa.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=Sa.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 ZC=Lr,wa={},Ne={},Gr={};Gr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _e={};const Ca="[0-9]+",QC="[A-Z $%*+\\-./:]+";let wt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";wt=wt.replace(/u/g,"\\u");const XC="(?:(?![A-Z0-9 $%*+\\-./:]|"+wt+`)(?:.|[\r
|
|
21
21
|
]))+`;_e.KANJI=new RegExp(wt,"g");_e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_e.BYTE=new RegExp(XC,"g");_e.NUMERIC=new RegExp(Ca,"g");_e.ALPHANUMERIC=new RegExp(QC,"g");const eb=new RegExp("^"+wt+"$"),tb=new RegExp("^"+Ca+"$"),nb=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_e.testKanji=function(t){return eb.test(t)};_e.testNumeric=function(t){return tb.test(t)};_e.testAlphanumeric=function(t){return nb.test(t)};(function(e){const t=Gr,r=_e;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=In,o=Tn,i=Ne,a=Gr,s=7973,l=t.getBCHDigit(s);function c(f,p,h){for(let v=1;v<=40;v++)if(p<=e.getCapacity(v,h,f))return v}function u(f,p){return i.getCharCountIndicator(f,p)+4}function d(f,p){let h=0;return f.forEach(function(v){const w=u(v.mode,p);h+=w+v.getBitsLength()}),h}function m(f,p){for(let h=1;h<=40;h++)if(d(f,h)<=e.getCapacity(h,p,i.MIXED))return h}e.from=function(p,h){return a.isValid(p)?parseInt(p,10):h},e.getCapacity=function(p,h,v){if(!a.isValid(p))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=i.BYTE);const w=t.getSymbolTotalCodewords(p),g=r.getTotalCodewordsCount(p,h),_=(w-g)*8;if(v===i.MIXED)return _;const y=_-u(v,p);switch(v){case i.NUMERIC:return Math.floor(y/10*3);case i.ALPHANUMERIC:return Math.floor(y/11*2);case i.KANJI:return Math.floor(y/13);case i.BYTE:default:return Math.floor(y/8)}},e.getBestVersionForData=function(p,h){let v;const w=o.from(h,o.M);if(Array.isArray(p)){if(p.length>1)return m(p,w);if(p.length===0)return 1;v=p[0]}else v=p;return c(v.mode,v.getLength(),w)},e.getEncodedBits=function(p){if(!a.isValid(p)||p<7)throw new Error("Invalid QR Code version");let h=p<<12;for(;t.getBCHDigit(h)-l>=0;)h^=s<<t.getBCHDigit(h)-l;return p<<12|h}})(wa);var ba={};const tr=le,Aa=1335,rb=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)^rb};var Ea={};const ob=Ne;function je(e){this.mode=ob.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 ib=je;const ab=Ne,Rn=["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=ab.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=Rn.indexOf(this.data[r])*45;o+=Rn.indexOf(this.data[r+1]),t.put(o,11)}this.data.length%2&&t.put(Rn.indexOf(this.data[r]),6)};var sb=We,lb=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 cb=lb,ub=Ne;function He(e){this.mode=ub.BYTE,this.data=new Uint8Array(cb(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 db=He;const fb=Ne,pb=le;function Ke(e){this.mode=fb.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=pb.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 mb=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,h,v,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],h=m+p,v=s[d],w=typeof s[d]>"u",(w||v>h)&&(s[d]=h,l.push(d,h),a[d]=u))}if(typeof i<"u"&&typeof s[i]>"u"){var g=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(g)}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 gb=Ta.exports;(function(e){const t=Ne,r=ib,o=sb,i=db,a=mb,s=_e,l=le,c=gb;function u(g){return unescape(encodeURIComponent(g)).length}function d(g,_,y){const S=[];let C;for(;(C=g.exec(y))!==null;)S.push({data:C[0],index:C.index,mode:_,length:C[0].length});return S}function m(g){const _=d(s.NUMERIC,t.NUMERIC,g),y=d(s.ALPHANUMERIC,t.ALPHANUMERIC,g);let S,C;return l.isKanjiModeEnabled()?(S=d(s.BYTE,t.BYTE,g),C=d(s.KANJI,t.KANJI,g)):(S=d(s.BYTE_KANJI,t.BYTE,g),C=[]),_.concat(y,S,C).sort(function(E,T){return E.index-T.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function f(g,_){switch(_){case t.NUMERIC:return r.getBitsLength(g);case t.ALPHANUMERIC:return o.getBitsLength(g);case t.KANJI:return a.getBitsLength(g);case t.BYTE:return i.getBitsLength(g)}}function p(g){return g.reduce(function(_,y){const S=_.length-1>=0?_[_.length-1]:null;return S&&S.mode===y.mode?(_[_.length-1].data+=y.data,_):(_.push(y),_)},[])}function h(g){const _=[];for(let y=0;y<g.length;y++){const S=g[y];switch(S.mode){case t.NUMERIC:_.push([S,{data:S.data,mode:t.ALPHANUMERIC,length:S.length},{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.ALPHANUMERIC:_.push([S,{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.KANJI:_.push([S,{data:S.data,mode:t.BYTE,length:u(S.data)}]);break;case t.BYTE:_.push([{data:S.data,mode:t.BYTE,length:u(S.data)}])}}return _}function v(g,_){const y={},S={start:{}};let C=["start"];for(let A=0;A<g.length;A++){const E=g[A],T=[];for(let I=0;I<E.length;I++){const k=E[I],N=""+A+I;T.push(N),y[N]={node:k,lastCount:0},S[N]={};for(let U=0;U<C.length;U++){const F=C[U];y[F]&&y[F].node.mode===k.mode?(S[F][N]=f(y[F].lastCount+k.length,k.mode)-f(y[F].lastCount,k.mode),y[F].lastCount+=k.length):(y[F]&&(y[F].lastCount=k.length),S[F][N]=f(k.length,k.mode)+4+t.getCharCountIndicator(k.mode,_))}}C=T}for(let A=0;A<C.length;A++)S[C[A]].end=0;return{map:S,table:y}}function w(g,_){let y;const S=t.getBestModeForData(g);if(y=t.from(_,S),y!==t.BYTE&&y.bit<S.bit)throw new Error('"'+g+'" cannot be encoded with mode '+t.toString(y)+`.
|
|
23
23
|
Suggested mode is: `+t.toString(S));switch(y===t.KANJI&&!l.isKanjiModeEnabled()&&(y=t.BYTE),y){case t.NUMERIC:return new r(g);case t.ALPHANUMERIC:return new o(g);case t.KANJI:return new a(g);case t.BYTE:return new i(g)}}e.fromArray=function(_){return _.reduce(function(y,S){return typeof S=="string"?y.push(w(S,null)):S.data&&y.push(w(S.data,S.mode)),y},[])},e.fromString=function(_,y){const S=m(_,l.isKanjiModeEnabled()),C=h(S),A=v(C,y),E=c.find_path(A.map,"start","end"),T=[];for(let I=1;I<E.length-1;I++)T.push(A.table[E[I]].node);return e.fromArray(p(T))},e.rawSplit=function(_){return e.fromArray(m(_,l.isKanjiModeEnabled()))}})(Ea);const kn=le,$n=Tn,hb=YC,yb=qC,vb=ha,_b=ya,nr=va,rr=In,Sb=ZC,rn=wa,wb=ba,Cb=Ne,Dn=Ea;function bb(e,t){const r=e.size,o=_b.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 Ab(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 Eb(e,t){const r=vb.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 Tb(e,t){const r=e.size,o=rn.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 Bn(e,t,r){const o=e.size,i=wb.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 Ib(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 Pb(e,t,r){const o=new hb;r.forEach(function(c){o.put(c.mode.bit,4),o.put(c.getLength(),Cb.getCharCountIndicator(c.mode,e)),c.write(o)});const i=kn.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 kb(o,e,t)}function kb(e,t,r){const o=kn.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 Sb(f);let h=0;const v=new Array(s),w=new Array(s);let g=0;const _=new Uint8Array(e.buffer);for(let E=0;E<s;E++){const T=E<c?d:m;v[E]=_.slice(h,h+T),w[E]=p.encode(v[E]),h+=T,g=Math.max(g,T)}const y=new Uint8Array(o);let S=0,C,A;for(C=0;C<g;C++)for(A=0;A<s;A++)C<v[A].length&&(y[S++]=v[A][C]);for(C=0;C<f;C++)for(A=0;A<s;A++)y[S++]=w[A][C];return y}function Nb(e,t,r,o){let i;if(Array.isArray(e))i=Dn.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){const d=Dn.rawSplit(e);u=rn.getBestVersionForData(d,r)}i=Dn.fromString(e,u||40)}else throw new Error("Invalid data");const a=rn.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(`
|
package/dist/index.js
CHANGED
|
@@ -6844,6 +6844,8 @@ const T_ = /* @__PURE__ */ oa(E_), I_ = !0, P_ = "", Kn = (e, t) => `${e}${t}`.r
|
|
|
6844
6844
|
};
|
|
6845
6845
|
return { username: e, password: r, options: a };
|
|
6846
6846
|
}, U_ = ({ formValues: e, loginMechanisms: t }) => {
|
|
6847
|
+
if (t.includes("username"))
|
|
6848
|
+
return e.username;
|
|
6847
6849
|
const n = t[0];
|
|
6848
6850
|
if (n === "phone_number") {
|
|
6849
6851
|
const { country_code: r, phone_number: o } = e;
|
|
@@ -9605,7 +9607,7 @@ const xC = /* @__PURE__ */ Mn($C, [["render", RC]]), DC = ["tabindex", "aria-sel
|
|
|
9605
9607
|
role: "tab"
|
|
9606
9608
|
}, N(u(o)), 11, DC));
|
|
9607
9609
|
}
|
|
9608
|
-
}), BC = "4.3.
|
|
9610
|
+
}), BC = "4.3.7", LC = {};
|
|
9609
9611
|
function GC(e, t) {
|
|
9610
9612
|
return A(e.$slots, "textI", ne(re(e.$attrs)), () => [
|
|
9611
9613
|
z("span", Te(e.$attrs, { "data-amplify-text": "" }), [
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-vue",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typecheck": "vue-tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@aws-amplify/ui": "6.
|
|
41
|
+
"@aws-amplify/ui": "6.13.0",
|
|
42
42
|
"@vueuse/core": "7.5.5",
|
|
43
43
|
"@xstate/vue": "0.8.1",
|
|
44
44
|
"nanoid": "3.3.8",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"aws-amplify": "^6.14.3",
|
|
70
70
|
"vue": "^3.0"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|