@aws-amplify/ui-vue 4.2.20 → 4.2.21

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 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===Ne.Parent||o.parent.id===m),h=p?o.parent:D(m)?m===Ne.Internal?o:o.children.get(m)||it.get(m):Uc(m)?m:void 0;if(!h){if(!p)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(o.id,"'."));j||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=C(C({},d),{name:d.name===cr?"".concat(Ge(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||Ht(d.type,p),v=M(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(Y){throw o.parent&&o.parent.send({type:"xstate.error",data:Y}),Y}switch(d.type){case qe:{var S=d;o.defer(S);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===Re):o.send(g._event);break;case sr:o.cancel(d.sendId);break;case zt:{if(o.status!==K.Running)return;var w=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[w.id||w.type])break;if(w.type===L.Invoke){var y=di(w.src),_=o.machine.options.services?o.machine.options.services[y.type]:void 0,b=w.id,A=w.data;j||q(!("forward"in w),"`forward` property is deprecated (found in invocation of '".concat(w.src,"' in in machine '").concat(o.machine.id,"'). ")+"Please use `autoForward` instead.");var E="autoForward"in w?w.autoForward:!!w.forward;if(!_){j||q(!1,"No service found for invocation '".concat(w.src,"' in machine '").concat(o.machine.id,"'."));return}var I=A?jt(A,m,f):void 0;if(typeof _=="string")return;var P=M(_)?_(m,f.data,{data:I,src:y,meta:w.meta}):_;if(!P)return;var N=void 0;Ce(P)&&(P=I?P.withContext(I):P,N={autoForward:E}),o.spawn(P,b,N)}else o.spawnActivity(w);break}case rn:{o.stopChild(d.activity.id);break}case an:var k=d,x=k.label,$=k.value;x?o.logger(x,$):o.logger($);break;default:j||q(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var i=C(C({},e.defaultOptions),n),a=i.clock,s=i.logger,c=i.parent,l=i.id,u=l!==void 0?l:t.id;this.id=u,this.logger=s,this.clock=a,this.parent=c,this.options=i,this.scheduler=new ro({deferEvents:this.options.deferEvents}),this.sessionId=it.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Le(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return j||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,n){var o,i;try{for(var a=F(t.actions),s=a.next();!s.done;s=a.next()){var c=s.value;this.exec(c,t,n)}}catch(l){o={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},e.prototype.update=function(t,n){var o,i,a,s,c,l,u,d,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===Re)&&this.options.execute)this.execute(this.state);else for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);if(this.children.forEach(function(P){m.state.children[P.id]=P}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var p=F(this.eventListeners),h=p.next();!h.done;h=p.next()){var v=h.value;v(t.event)}}catch(P){o={error:P}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var S=F(this.listeners),g=S.next();!g.done;g=S.next()){var v=g.value;v(t,t.event)}}catch(P){a={error:P}}finally{try{g&&!g.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=F(this.contextListeners),y=w.next();!y.done;y=w.next()){var _=y.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){c={error:P}}finally{try{y&&!y.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}if(this.state.done){var b=t.configuration.find(function(P){return P.type==="final"&&P.parent===m.machine}),A=b&&b.doneData?jt(b.doneData,t.context,n):void 0;this._doneEvent=gt(this.id,A);try{for(var E=F(this.doneListeners),I=E.next();!I.done;I=E.next()){var v=I.value;v(this._doneEvent)}}catch(P){u={error:P}}finally{try{I&&!I.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,n,o){var i=this,a=Vt(t,n,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 n=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:Le(this,function(){return Xc(t)?n.machine.resolveState(t):n.machine.resolveState(de.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(o,Re)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){M(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,o,i,a,s,c,l,u,d;try{for(var m=F(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&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var h=F(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 S=F(this.contextListeners),g=S.next();!g.done;g=S.next()){var p=g.value;this.contextListeners.delete(p)}}catch(E){a={error:E}}finally{try{g&&!g.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=F(this.doneListeners),y=w.next();!y.done;y=w.next()){var p=y.value;this.doneListeners.delete(p)}}catch(E){c={error:E}}finally{try{y&&!y.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}if(!this.initialized)return this;this.initialized=!1,this.status=K.Stopped,this._initialState=void 0;try{for(var _=F(Object.keys(this.delayedEventsMap)),b=_.next();!b.done;b=_.next()){var A=b.value;this.clock.clearTimeout(this.delayedEventsMap[A])}}catch(E){u={error:E}}finally{try{b&&!b.done&&(d=_.return)&&d.call(_)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new ro({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var o=J({type:"xstate.stop"}),i=Le(t,function(){var a=W(z([],O(t.state.configuration),!1).sort(function(d,m){return m.order-d.order}).map(function(d){return Se(d.onExit,t.machine.options.actions)})),s=O(wt(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),c=s[0],l=s[1],u=new de({value:t.state.value,context:l,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:c.filter(function(d){return!Gn(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 n=this;if(this.status===K.NotStarted&&this.options.deferEvents)j||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=n.state,c=!1,l=[],u=function(p){var h=J(p);n.forward(h),s=Le(n,function(){return n.machine.transition(s,h,void 0,o||void 0)}),l.push.apply(l,z([],O(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(v){return el(v,s)})),!1)),c=c||!!s.changed};try{for(var d=F(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=c,s.actions=l,n.update(s,J(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var o=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=J(t);if(i.name.indexOf(Vn)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Vn)===0}))throw i.data.data;var a=Le(this,function(){return o.machine.transition(o.state,i,void 0,n||void 0)});return a},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,o;try{for(var i=F(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,c=this.children.get(s);if(!c)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));c.send(t)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,o=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.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,n,o){o===void 0&&(o=this.machine.options.actions),this._exec(t,n.context,n._event,o)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),M(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,o){if(this.status!==K.Running)return dr(t,n);if(eo(t))return this.spawnPromise(Promise.resolve(t),n);if(M(t))return this.spawnCallback(t,n);if(Kc(t))return this.spawnActor(t,n);if(xc(t))return this.spawnObservable(t,n);if(Ce(t))return this.spawnMachine(t,C(C({},o),{id:n}));if(Pc(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var o=this;n===void 0&&(n={});var i=new e(t,C(C({},this.options),{parent:this,id:n.id||t.id})),a=C(C({},jn),n);a.sync&&i.onTransition(function(c){o.send(sn,{state:c,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(c){o.removeChild(i.id),o.send(J(c,{origin:i.id}))}).start(),s},e.prototype.spawnBehavior=function(t,n){var o=il(t,{id:n,parent:this});return this.children.set(n,o),o},e.prototype.spawnPromise=function(t,n){var o,i=this,a=!1,s;t.then(function(l){a||(s=l,i.removeChild(n),i.send(J(gt(n,l),{origin:n})))},function(l){if(!a){i.removeChild(n);var u=Ge(n,l);try{i.send(J(u,{origin:n}))}catch(d){Fc(l,d,n),i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var c=(o={id:n,send:function(){},subscribe:function(l,u,d){var m=Vt(l,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:n}},getSnapshot:function(){return s}},o[Ie]=function(){return this},o);return this.children.set(n,c),c},e.prototype.spawnCallback=function(t,n){var o,i=this,a=!1,s=new Set,c=new Set,l,u=function(f){l=f,c.forEach(function(p){return p(f)}),!a&&i.send(J(f,{origin:n}))},d;try{d=t(u,function(f){s.add(f)})}catch(f){this.send(Ge(n,f))}if(eo(d))return this.spawnPromise(d,n);var m=(o={id:n,send:function(f){return s.forEach(function(p){return p(f)})},subscribe:function(f){var p=Vt(f);return c.add(p.next),{unsubscribe:function(){c.delete(p.next)}}},stop:function(){a=!0,M(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},o[Ie]=function(){return this},o);return this.children.set(n,m),m},e.prototype.spawnObservable=function(t,n){var o,i=this,a,s=t.subscribe(function(l){a=l,i.send(J(l,{origin:n}))},function(l){i.removeChild(n),i.send(J(Ge(n,l),{origin:n}))},function(){i.removeChild(n),i.send(J(gt(n),{origin:n}))}),c=(o={id:n,send:function(){},subscribe:function(l,u,d){return t.subscribe(l,u,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:n}}},o[Ie]=function(){return this},o);return this.children.set(n,c),c},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){j||q(!1,"No implementation found for activity '".concat(t.type,"'"));return}var o=n(this.state.context,t);this.spawnEffect(t.id,o)},e.prototype.spawnEffect=function(t,n){var o;this.children.set(t,(o={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},o[Ie]=function(){return this},o))},e.prototype.attachDev=function(){var t=fr();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(C(C({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},n),{features:C({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}ol(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Ie]=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,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=ki,e}(),sl=function(e){return D(e)?C(C({},jn),{name:e}):C(C(C({},jn),{name:$c()}),e)};function at(e,t){var n=sl(t);return jc(function(o){if(!j){var i=Ce(e)||M(e);q(!!o||i,'Attempted to spawn an Actor (ID: "'.concat(Ce(e)?e.id:"undefined",'") outside of a service. This will have no effect.'))}return o?o.spawn(e,n.name,n):dr(e,n.name)})}function ki(e,t){var n=new al(e,t);return n}function cl(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function kt(e){return C(C({type:Gt},e),{toJSON:function(){e.onDone,e.onError;var t=ar(e,["onDone","onError"]);return C(C({},t),{type:Gt,src:cl(e.src)})}})}var ze="",Hn="#",st="*",Be={},Ve=function(e){return e[0]===Hn},ll=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},ul=function(e,t,n){var o=n.slice(0,-1).some(function(a){return!("cond"in a)&&!("in"in a)&&(D(a.target)||Ce(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.")},dl=function(){function e(t,n,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(ll(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:ii),this.id=this.config.id||z([this.machine.key],O(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,j||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,C((m={},m[f.id]=f,m),f.idMap)),f}):Be;var c=0;function l(u){var d,m;u.order=c++;try{for(var f=F(Ii(u)),p=f.next();!p.done;p=f.next()){var h=p.value;l(h)}}catch(v){d={error:v}}finally{try{p&&!p.done&&(m=f.return)&&m.call(f)}finally{if(d)throw d.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var d=u.event;return d===ze}):ze in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=ue(this.config.entry||this.config.onEntry).map(function(u){return We(u)}),this.onExit=ue(this.config.exit||this.config.onExit).map(function(u){return We(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=ue(this.config.invoke).map(function(u,d){var m,f;if(Ce(u)){var p=Nt(a.id,d);return a.machine.options.services=C((m={},m[p]=u,m),a.machine.options.services),kt({src:p,id:p})}else if(D(u.src)){var p=u.id||Nt(a.id,d);return kt(C(C({},u),{id:p,src:u.src}))}else if(Ce(u.src)||M(u.src)){var p=u.id||Nt(a.id,d);return a.machine.options.services=C((f={},f[p]=u.src,f),a.machine.options.services),kt(C(C({id:p},u),{src:p}))}else{var h=u.src;return kt(C(C({id:Nt(a.id,d)},u),{src:h}))}}),this.activities=ue(this.config.activities).concat(this.invoke).map(function(u){return ln(u)}),this.transition=this.transition.bind(this),this.tags=ue(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Ti(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var o=this.options,i=o.actions,a=o.activities,s=o.guards,c=o.services,l=o.delays;return new e(this.config,{actions:C(C({},i),t.actions),activities:C(C({},a),t.activities),guards:C(C({},s),t.guards),services:C(C({},c),t.services),delays:C(C({},l),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return M(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(n,o){return n[o.eventType]=n[o.eventType]||[],n[o.eventType].push(o),n},{})},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 n=t===ze,o=this.transitions.filter(function(i){var a=i.eventType===t;return n?a:a||i.eventType===st});return this.__cache.candidates[t]=o,o},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var o=function(a,s){var c=M(a)?"".concat(t.id,":delay[").concat(s,"]"):a,l=Ci(c,t.id);return t.onEntry.push(Ze(l,{delay:a})),t.onExit.push(yi(l)),l},i=Je(n)?n.map(function(a,s){var c=o(a.delay,s);return C(C({},a),{event:c})}):W(Object.keys(n).map(function(a,s){var c=n[a],l=D(c)?{target:c}:c,u=isNaN(+a)?a:+a,d=o(u,s);return ue(l).map(function(m){return C(C({},m),{event:d,delay:u})})}));return i.map(function(a){var s=a.delay;return C(C({},t.formatTransition(a)),{delay:s})})},e.prototype.getStateNodes=function(t){var n,o=this;if(!t)return[];var i=t instanceof de?t.value:mt(t,this.delimiter);if(D(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((n={},n[i]=a,n)):[this,this.states[i]]}var s=Object.keys(i),c=[this];return c.push.apply(c,z([],O(W(s.map(function(l){return o.getStateNode(l).getStateNodes(i[l])}))),!1)),c},e.prototype.handles=function(t){var n=ai(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof de?t:de.create(t),o=Array.from(ft([],this.getStateNodes(n.value)));return new de(C(C({},n),{value:this.resolve(n.value),configuration:o,done:Lt(o,this),tags:no(o),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,o){var i=this.getStateNode(t),a=i.next(n,o);return!a||!a.transitions.length?this.next(n,o):a},e.prototype.transitionCompoundNode=function(t,n,o){var i=Object.keys(t),a=this.getStateNode(i[0]),s=a._transition(t[i[0]],n,o);return!s||!s.transitions.length?this.next(n,o):s},e.prototype.transitionParallelNode=function(t,n,o){var i,a,s={};try{for(var c=F(Object.keys(t)),l=c.next();!l.done;l=c.next()){var u=l.value,d=t[u];if(d){var m=this.getStateNode(u),f=m._transition(d,n,o);f&&(s[u]=f)}}}catch(g){i={error:g}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var p=Object.keys(s).map(function(g){return s[g]}),h=W(p.map(function(g){return g.transitions})),v=p.some(function(g){return g.transitions.length>0});if(!v)return this.next(n,o);var S=W(Object.keys(s).map(function(g){return s[g].configuration}));return{transitions:h,exitSet:W(p.map(function(g){return g.exitSet})),configuration:S,source:n,actions:W(Object.keys(s).map(function(g){return s[g].actions}))}},e.prototype._transition=function(t,n,o){return D(t)?this.transitionLeafNode(t,n,o):Object.keys(t).length===1?this.transitionCompoundNode(t,n,o):this.transitionParallelNode(t,n,o)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,J(n))},e.prototype.next=function(t,n){var o,i,a=this,s=n.name,c=[],l=[],u;try{for(var d=F(this.getCandidates(s)),m=d.next();!m.done;m=d.next()){var f=m.value,p=f.cond,h=f.in,v=t.context,S=h?D(h)&&Ve(h)?t.matches(mt(this.getStateNodeById(h).path,this.delimiter)):lr(mt(h,this.delimiter),Ec(this.path.slice(0,-2))(t.value)):!0,g=!1;try{g=!p||ui(this.machine,p,v,n,t)}catch(_){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
19
19
  `).concat(_.message))}if(g&&S){f.target!==void 0&&(l=f.target),c.push.apply(c,z([],O(f.actions),!1)),u=f;break}}}catch(_){o={error:_}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var w=W(l.map(function(_){return a.getRelativeStateNodes(_,t.historyValue)})),y=!!u.internal;return{transitions:[u],exitSet:y?[]:W(l.map(function(_){return a.getPotentiallyReenteringNodes(_)})),configuration:w,source:t,actions:c}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],o=this,i=t;o&&o!==i;)n.push(o),o=o.parent;return o!==i?[]:(n.push(i),n)},e.prototype.getActions=function(t,n,o,i,a,s,c){var l,u,d,m,f=this,p=s?ft([],this.getStateNodes(s.value)):[],h=new Set;try{for(var v=F(Array.from(t).sort(function(k,x){return k.order-x.order})),S=v.next();!S.done;S=v.next()){var g=S.value;(!pt(p,g)||pt(o.exitSet,g)||g.parent&&h.has(g.parent))&&h.add(g)}}catch(k){l={error:k}}finally{try{S&&!S.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=F(p),y=w.next();!y.done;y=w.next()){var g=y.value;(!pt(t,g)||pt(o.exitSet,g.parent))&&o.exitSet.push(g)}}catch(k){d={error:k}}finally{try{y&&!y.done&&(m=w.return)&&m.call(w)}finally{if(d)throw d.error}}o.exitSet.sort(function(k,x){return x.order-k.order});var _=Array.from(h).sort(function(k,x){return k.order-x.order}),b=new Set(o.exitSet),A=W(_.map(function(k){var x=[];if(k.type!=="final")return x;var $=k.parent;if(!$.parent)return x;x.push(dt(k.id,k.doneData),dt($.id,k.doneData?jt(k.doneData,i,a):void 0));var Y=$.parent;return Y.type==="parallel"&&_t(Y).every(function(se){return Lt(o.configuration,se)})&&x.push(dt(Y.id)),x})),E=_.map(function(k){var x=k.onEntry,$=k.activities.map(function(Y){return vi(Y)});return{type:"entry",actions:Se(c?z(z([],O(x),!1),O($),!1):z(z([],O($),!1),O(x),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:A.map(function(k){return fi(k)})}),I=Array.from(b).map(function(k){return{type:"exit",actions:Se(z(z([],O(k.onExit),!1),O(k.activities.map(function(x){return wi(x)})),!1),f.machine.options.actions)}}),P=I.concat({type:"transition",actions:Se(o.actions,this.machine.options.actions)}).concat(E);if(n){var N=Se(W(z([],O(t),!1).sort(function(k,x){return x.order-k.order}).map(function(k){return k.onExit})),this.machine.options.actions).filter(function(k){return!Gn(k)});return P.concat({type:"stop",actions:N})}return P},e.prototype.transition=function(t,n,o,i){t===void 0&&(t=this.initialState);var a=J(n),s;if(t instanceof de)s=o===void 0?t:this.resolveState(de.from(t,o));else{var c=D(t)?this.resolve(Wt(this.getResolvedPath(t))):this.resolve(t),l=o??this.machine.context;s=this.resolveState(de.from(c,l))}if(!j&&a.name===st)throw new Error("An event cannot have the wildcard type ('".concat(st,"')"));if(this.strict&&!this.events.includes(a.name)&&!Tc(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=z([],O(m),!1),this.resolveTransition(u,s,s.context,i,a)},e.prototype.resolveRaisedTransition=function(t,n,o,i){var a,s=t.actions;return t=this.transition(t,n,void 0,i),t._event=o,t.event=o.data,(a=t.actions).unshift.apply(a,z([],O(s),!1)),t},e.prototype.resolveTransition=function(t,n,o,i,a){var s,c,l,u,d=this;a===void 0&&(a=Re);var m=t.configuration,f=!n||t.transitions.length>0,p=f?t.configuration:n?n.configuration:[],h=Lt(p,this),v=f?Jc(this.machine,m):void 0,S=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,g=this.getActions(new Set(p),h,t,o,a,n,i),w=n?C({},n.activities):{};try{for(var y=F(g),_=y.next();!_.done;_=y.next()){var b=_.value;try{for(var A=(l=void 0,F(b.actions)),E=A.next();!E.done;E=A.next()){var I=E.value;I.type===zt?w[I.activity.id||I.activity.type]=I:I.type===rn&&(w[I.activity.id||I.activity.type]=!1)}}catch(ne){l={error:ne}}finally{try{E&&!E.done&&(u=A.return)&&u.call(A)}finally{if(l)throw l.error}}}}catch(ne){s={error:ne}}finally{try{_&&!_.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}var P=O(wt(this,n,o,a,g,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),N=P[0],k=P[1],x=O(Nc(N,Gn),2),$=x[0],Y=x[1],se=N.filter(function(ne){var Ee;return ne.type===zt&&((Ee=ne.activity)===null||Ee===void 0?void 0:Ee.type)===Gt}),le=se.reduce(function(ne,Ee){return ne[Ee.activity.id]=Hc(Ee.activity,d.machine,k,a),ne},n?C({},n.children):{}),Z=new de({value:v||n.value,context:k,_event:a,_sessionid:n?n._sessionid:null,historyValue:v?S?kc(S,v):void 0:n?n.historyValue:void 0,history:!v||t.source?n:void 0,actions:v?Y:[],activities:v?w:n?n.activities:{},events:[],configuration:p,transitions:t.transitions,children:le,done:h,tags:no(p),machine:this}),te=o!==k;Z.changed=a.name===sn||te;var oe=Z.history;oe&&delete oe.history;var De=!h&&(this._transient||m.some(function(ne){return ne._transient}));if(!f&&(!De||a.name===ze))return Z;var ie=Z;if(!h)for(De&&(ie=this.resolveRaisedTransition(ie,{type:ti},a,i));$.length;){var U=$.shift();ie=this.resolveRaisedTransition(ie,U._event,a,i)}var Kr=ie.changed||(oe?!!ie.actions.length||te||typeof oe.value!=typeof ie.value||!Ni(ie.value,oe.value):void 0);return ie.changed=Kr,ie.history=oe,ie},e.prototype.getStateNode=function(t){if(Ve(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 n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Ve(t)?t.slice(Hn.length):t;if(n===this.id)return this;var o=this.machine.idMap[n];if(!o)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return o},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Ve(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=zn(t,this.delimiter).slice(),o=this;n.length;){var i=n.shift();if(!i.length)break;o=o.getStateNode(i)}return o},e.prototype.resolve=function(t){var n,o=this;if(!t)return this.initialStateValue||Be;switch(this.type){case"parallel":return ut(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(t[s]||a):Be});case"compound":if(D(t)){var i=this.getStateNode(t);return i.type==="parallel"||i.type==="compound"?(n={},n[t]=i.initialStateValue,n):t}return Object.keys(t).length?ut(t,function(a,s){return a?o.getStateNode(s).resolve(a):Be}):this.initialStateValue||{};default:return t||Be}},e.prototype.getResolvedPath=function(t){if(Ve(t)){var n=this.machine.idMap[t.slice(Hn.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return zn(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Xr(this.states,function(o){return o.initialStateValue||Be},function(o){return o.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Kt(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var o=this.getStateNodes(t);return this.resolveTransition({configuration:o,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??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 n=this.config;D(n.target)?t=Ve(n.target)?Wt(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,o){return o===void 0&&(o=!0),o?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Kt(this))return[this];if(this.type==="compound"&&!this.initial)return j||q(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=Bt(this.initialStateValue);return W(n.map(function(o){return t.getFromRelativePath(o)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=O(t),o=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(o,"' from node with no states"));var a=this.getStateNode(o);if(a.type==="history")return a.resolveHistory();if(!this.states[o])throw new Error("Child state '".concat(o,"' does not exist on '").concat(this.id,"'"));return this.states[o].getFromRelativePath(i)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Xr(this.states,function(n,o){if(!t)return n.historyValue();var i=D(t)?void 0:t[o];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var o=this.parent;if(!t){var i=this.target;return i?W(Bt(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=Ic(o.path,"states")(t).current;return D(a)?[o.getStateNode(a)]:W(Bt(a).map(function(s){return n.history==="deep"?o.getFromRelativePath(s):[o.states[s[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=W(Object.keys(this.states).map(function(o){return t.states[o].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,o,i;if(this.__cache.events)return this.__cache.events;var a=this.states,s=new Set(this.ownEvents);if(a)try{for(var c=F(Object.keys(a)),l=c.next();!l.done;l=c.next()){var u=l.value,d=a[u];if(d.states)try{for(var m=(o=void 0,F(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{l&&!l.done&&(n=c.return)&&n.call(c)}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(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(o){if(!D(o))return o;var i=o[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(o.slice(1));var a=i?n.key+o:o;if(n.parent)try{var s=n.parent.getStateNodeByPath(a);return s}catch(c){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
20
- `).concat(c.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=Rc(t.target),i="internal"in t?t.internal:o?o.some(function(l){return D(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),c=C(C({},t),{actions:Se(ue(t.actions)),cond:li(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return C(C({},c),{target:c.target?c.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return c},e.prototype.formatTransitions=function(){var t,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=st,c=a[s],l=c===void 0?[]:c,u=ar(a,[typeof s=="symbol"?s:s+""]);i=W(Object.keys(u).map(function(w){!j&&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=Me(w,u[w]);return j||ul(o,w,y),y}).concat(Me(st,l)))}var d=this.config.always?Me("",this.config.always):[],m=this.config.onDone?Me(String(dt(this.id)),this.config.onDone):[];j||q(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var f=W(this.invoke.map(function(w){var y=[];return w.onDone&&y.push.apply(y,z([],O(Me(String(gt(w.id)),w.onDone)),!1)),w.onError&&y.push.apply(y,z([],O(Me(String(Ge(w.id)),w.onError)),!1)),y})),p=this.after,h=W(z(z(z(z([],O(m),!1),O(f),!1),O(i),!1),O(d),!1).map(function(w){return ue(w).map(function(y){return o.formatTransition(y)})}));try{for(var v=F(p),S=v.next();!S.done;S=v.next()){var g=S.value;h.push(g)}}catch(w){t={error:w}}finally{try{S&&!S.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return h},e}(),oo=!1;function Qe(e,t){return!j&&!("predictableActionArguments"in e)&&!oo&&(oo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new dl(e,t)}var _e=Si,un=gi,fl=bi,xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var Ui=pl;function ml(){this.__data__=[],this.size=0}var gl=ml;function hl(e,t){return e===t||e!==e&&t!==t}var bt=hl,yl=bt;function vl(e,t){for(var n=e.length;n--;)if(yl(e[n][0],t))return n;return-1}var dn=vl,wl=dn,_l=Array.prototype,Sl=_l.splice;function Cl(e){var t=this.__data__,n=wl(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Sl.call(t,n,1),--this.size,!0}var bl=Cl,Al=dn;function El(e){var t=this.__data__,n=Al(t,e);return n<0?void 0:t[n][1]}var Il=El,Tl=dn;function Pl(e){return Tl(this.__data__,e)>-1}var Nl=Pl,kl=dn;function xl(e,t){var n=this.__data__,o=kl(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Ul=xl,$l=gl,Rl=bl,Fl=Il,Ol=Nl,Dl=Ul;function Xe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Xe.prototype.clear=$l;Xe.prototype.delete=Rl;Xe.prototype.get=Fl;Xe.prototype.has=Ol;Xe.prototype.set=Dl;var fn=Xe,Ml=fn;function Bl(){this.__data__=new Ml,this.size=0}var Vl=Bl;function Ll(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var zl=Ll;function Gl(e){return this.__data__.get(e)}var Wl=Gl;function jl(e){return this.__data__.has(e)}var Hl=jl,Yl=typeof xt=="object"&&xt&&xt.Object===Object&&xt,$i=Yl,Kl=$i,ql=typeof self=="object"&&self&&self.Object===Object&&self,Jl=Kl||ql||Function("return this")(),ge=Jl,Zl=ge,Ql=Zl.Symbol,pn=Ql,io=pn,Ri=Object.prototype,Xl=Ri.hasOwnProperty,eu=Ri.toString,ct=io?io.toStringTag:void 0;function tu(e){var t=Xl.call(e,ct),n=e[ct];try{e[ct]=void 0;var o=!0}catch{}var i=eu.call(e);return o&&(t?e[ct]=n:delete e[ct]),i}var nu=tu,ru=Object.prototype,ou=ru.toString;function iu(e){return ou.call(e)}var au=iu,ao=pn,su=nu,cu=au,lu="[object Null]",uu="[object Undefined]",so=ao?ao.toStringTag:void 0;function du(e){return e==null?e===void 0?uu:lu:so&&so in Object(e)?su(e):cu(e)}var et=du;function fu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var be=fu,pu=et,mu=be,gu="[object AsyncFunction]",hu="[object Function]",yu="[object GeneratorFunction]",vu="[object Proxy]";function wu(e){if(!mu(e))return!1;var t=pu(e);return t==hu||t==yu||t==gu||t==vu}var pr=wu,_u=ge,Su=_u["__core-js_shared__"],Cu=Su,xn=Cu,co=function(){var e=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bu(e){return!!co&&co in e}var Au=bu,Eu=Function.prototype,Iu=Eu.toString;function Tu(e){if(e!=null){try{return Iu.call(e)}catch{}try{return e+""}catch{}}return""}var Fi=Tu,Pu=pr,Nu=Au,ku=be,xu=Fi,Uu=/[\\^$.*+?()[\]{}|]/g,$u=/^\[object .+?Constructor\]$/,Ru=Function.prototype,Fu=Object.prototype,Ou=Ru.toString,Du=Fu.hasOwnProperty,Mu=RegExp("^"+Ou.call(Du).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bu(e){if(!ku(e)||Nu(e))return!1;var t=Pu(e)?Mu:$u;return t.test(xu(e))}var Vu=Bu;function Lu(e,t){return e==null?void 0:e[t]}var zu=Lu,Gu=Vu,Wu=zu;function ju(e,t){var n=Wu(e,t);return Gu(n)?n:void 0}var Fe=ju,Hu=Fe,Yu=ge,Ku=Hu(Yu,"Map"),mr=Ku,qu=Fe,Ju=qu(Object,"create"),mn=Ju,lo=mn;function Zu(){this.__data__=lo?lo(null):{},this.size=0}var Qu=Zu;function Xu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ed=Xu,td=mn,nd="__lodash_hash_undefined__",rd=Object.prototype,od=rd.hasOwnProperty;function id(e){var t=this.__data__;if(td){var n=t[e];return n===nd?void 0:n}return od.call(t,e)?t[e]:void 0}var ad=id,sd=mn,cd=Object.prototype,ld=cd.hasOwnProperty;function ud(e){var t=this.__data__;return sd?t[e]!==void 0:ld.call(t,e)}var dd=ud,fd=mn,pd="__lodash_hash_undefined__";function md(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fd&&t===void 0?pd:t,this}var gd=md,hd=Qu,yd=ed,vd=ad,wd=dd,_d=gd;function tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=hd;tt.prototype.delete=yd;tt.prototype.get=vd;tt.prototype.has=wd;tt.prototype.set=_d;var Sd=tt,uo=Sd,Cd=fn,bd=mr;function Ad(){this.size=0,this.__data__={hash:new uo,map:new(bd||Cd),string:new uo}}var Ed=Ad;function Id(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Td=Id,Pd=Td;function Nd(e,t){var n=e.__data__;return Pd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var gn=Nd,kd=gn;function xd(e){var t=kd(this,e).delete(e);return this.size-=t?1:0,t}var Ud=xd,$d=gn;function Rd(e){return $d(this,e).get(e)}var Fd=Rd,Od=gn;function Dd(e){return Od(this,e).has(e)}var Md=Dd,Bd=gn;function Vd(e,t){var n=Bd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var Ld=Vd,zd=Ed,Gd=Ud,Wd=Fd,jd=Md,Hd=Ld;function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nt.prototype.clear=zd;nt.prototype.delete=Gd;nt.prototype.get=Wd;nt.prototype.has=jd;nt.prototype.set=Hd;var gr=nt,Yd=fn,Kd=mr,qd=gr,Jd=200;function Zd(e,t){var n=this.__data__;if(n instanceof Yd){var o=n.__data__;if(!Kd||o.length<Jd-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new qd(o)}return n.set(e,t),this.size=n.size,this}var Qd=Zd,Xd=fn,ef=Vl,tf=zl,nf=Wl,rf=Hl,of=Qd;function rt(e){var t=this.__data__=new Xd(e);this.size=t.size}rt.prototype.clear=ef;rt.prototype.delete=tf;rt.prototype.get=nf;rt.prototype.has=rf;rt.prototype.set=of;var hr=rt,af="__lodash_hash_undefined__";function sf(e){return this.__data__.set(e,af),this}var cf=sf;function lf(e){return this.__data__.has(e)}var uf=lf,df=gr,ff=cf,pf=uf;function qt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new df;++t<n;)this.add(e[t])}qt.prototype.add=qt.prototype.push=ff;qt.prototype.has=pf;var mf=qt;function gf(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var hf=gf;function yf(e,t){return e.has(t)}var vf=yf,wf=mf,_f=hf,Sf=vf,Cf=1,bf=2;function Af(e,t,n,o,i,a){var s=n&Cf,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))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=n&bf?new wf:void 0;for(a.set(e,t),a.set(t,e);++m<c;){var h=e[m],v=t[m];if(o)var S=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(S!==void 0){if(S)continue;f=!1;break}if(p){if(!_f(t,function(g,w){if(!Sf(p,w)&&(h===g||i(h,g,n,o,a)))return p.push(w)})){f=!1;break}}else if(!(h===v||i(h,v,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Oi=Af,Ef=ge,If=Ef.Uint8Array,Di=If;function Tf(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var Pf=Tf;function Nf(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var kf=Nf,fo=pn,po=Di,xf=bt,Uf=Oi,$f=Pf,Rf=kf,Ff=1,Of=2,Df="[object Boolean]",Mf="[object Date]",Bf="[object Error]",Vf="[object Map]",Lf="[object Number]",zf="[object RegExp]",Gf="[object Set]",Wf="[object String]",jf="[object Symbol]",Hf="[object ArrayBuffer]",Yf="[object DataView]",mo=fo?fo.prototype:void 0,Un=mo?mo.valueOf:void 0;function Kf(e,t,n,o,i,a,s){switch(n){case Yf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Hf:return!(e.byteLength!=t.byteLength||!a(new po(e),new po(t)));case Df:case Mf:case Lf:return xf(+e,+t);case Bf:return e.name==t.name&&e.message==t.message;case zf:case Wf:return e==t+"";case Vf:var c=$f;case Gf:var l=o&Ff;if(c||(c=Rf),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;o|=Of,s.set(e,t);var d=Uf(c(e),c(t),o,i,a,s);return s.delete(e),d;case jf:if(Un)return Un.call(e)==Un.call(t)}return!1}var qf=Kf;function Jf(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Mi=Jf,Zf=Array.isArray,Ae=Zf,Qf=Mi,Xf=Ae;function ep(e,t,n){var o=t(e);return Xf(e)?o:Qf(o,n(e))}var Bi=ep;function tp(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var np=tp;function rp(){return[]}var Vi=rp,op=np,ip=Vi,ap=Object.prototype,sp=ap.propertyIsEnumerable,go=Object.getOwnPropertySymbols,cp=go?function(e){return e==null?[]:(e=Object(e),op(go(e),function(t){return sp.call(e,t)}))}:ip,Li=cp;function lp(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var up=lp;function dp(e){return e!=null&&typeof e=="object"}var Oe=dp,fp=et,pp=Oe,mp="[object Arguments]";function gp(e){return pp(e)&&fp(e)==mp}var hp=gp,ho=hp,yp=Oe,zi=Object.prototype,vp=zi.hasOwnProperty,wp=zi.propertyIsEnumerable,_p=ho(function(){return arguments}())?ho:function(e){return yp(e)&&vp.call(e,"callee")&&!wp.call(e,"callee")},yr=_p,Jt={exports:{}};function Sp(){return!1}var Cp=Sp;Jt.exports;(function(e,t){var n=ge,o=Cp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,c=s?n.Buffer:void 0,l=c?c.isBuffer:void 0,u=l||o;e.exports=u})(Jt,Jt.exports);var vr=Jt.exports,bp=9007199254740991,Ap=/^(?:0|[1-9]\d*)$/;function Ep(e,t){var n=typeof e;return t=t??bp,!!t&&(n=="number"||n!="symbol"&&Ap.test(e))&&e>-1&&e%1==0&&e<t}var hn=Ep,Ip=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ip}var wr=Tp,Pp=et,Np=wr,kp=Oe,xp="[object Arguments]",Up="[object Array]",$p="[object Boolean]",Rp="[object Date]",Fp="[object Error]",Op="[object Function]",Dp="[object Map]",Mp="[object Number]",Bp="[object Object]",Vp="[object RegExp]",Lp="[object Set]",zp="[object String]",Gp="[object WeakMap]",Wp="[object ArrayBuffer]",jp="[object DataView]",Hp="[object Float32Array]",Yp="[object Float64Array]",Kp="[object Int8Array]",qp="[object Int16Array]",Jp="[object Int32Array]",Zp="[object Uint8Array]",Qp="[object Uint8ClampedArray]",Xp="[object Uint16Array]",em="[object Uint32Array]",G={};G[Hp]=G[Yp]=G[Kp]=G[qp]=G[Jp]=G[Zp]=G[Qp]=G[Xp]=G[em]=!0;G[xp]=G[Up]=G[Wp]=G[$p]=G[jp]=G[Rp]=G[Fp]=G[Op]=G[Dp]=G[Mp]=G[Bp]=G[Vp]=G[Lp]=G[zp]=G[Gp]=!1;function tm(e){return kp(e)&&Np(e.length)&&!!G[Pp(e)]}var nm=tm;function rm(e){return function(t){return e(t)}}var om=rm,Zt={exports:{}};Zt.exports;(function(e,t){var n=$i,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,c=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(Zt,Zt.exports);var im=Zt.exports,am=nm,sm=om,yo=im,vo=yo&&yo.isTypedArray,cm=vo?sm(vo):am,_r=cm,lm=up,um=yr,dm=Ae,fm=vr,pm=hn,mm=_r,gm=Object.prototype,hm=gm.hasOwnProperty;function ym(e,t){var n=dm(e),o=!n&&um(e),i=!n&&!o&&fm(e),a=!n&&!o&&!i&&mm(e),s=n||o||i||a,c=s?lm(e.length,String):[],l=c.length;for(var u in e)(t||hm.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pm(u,l)))&&c.push(u);return c}var Gi=ym,vm=Object.prototype;function wm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vm;return e===n}var Sr=wm;function _m(e,t){return function(n){return e(t(n))}}var Wi=_m,Sm=Wi,Cm=Sm(Object.keys,Object),bm=Cm,Am=Sr,Em=bm,Im=Object.prototype,Tm=Im.hasOwnProperty;function Pm(e){if(!Am(e))return Em(e);var t=[];for(var n in Object(e))Tm.call(e,n)&&n!="constructor"&&t.push(n);return t}var Nm=Pm,km=pr,xm=wr;function Um(e){return e!=null&&xm(e.length)&&!km(e)}var yn=Um,$m=Gi,Rm=Nm,Fm=yn;function Om(e){return Fm(e)?$m(e):Rm(e)}var ji=Om,Dm=Bi,Mm=Li,Bm=ji;function Vm(e){return Dm(e,Bm,Mm)}var Lm=Vm,wo=Lm,zm=1,Gm=Object.prototype,Wm=Gm.hasOwnProperty;function jm(e,t,n,o,i,a){var s=n&zm,c=wo(e),l=c.length,u=wo(t),d=u.length;if(l!=d&&!s)return!1;for(var m=l;m--;){var f=c[m];if(!(s?f in t:Wm.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 S=s;++m<l;){f=c[m];var g=e[f],w=t[f];if(o)var y=s?o(w,g,f,t,e,a):o(g,w,f,e,t,a);if(!(y===void 0?g===w||i(g,w,n,o,a):y)){v=!1;break}S||(S=f=="constructor")}if(v&&!S){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof b=="function"&&b instanceof b)&&(v=!1)}return a.delete(e),a.delete(t),v}var Hm=jm,Ym=Fe,Km=ge,qm=Ym(Km,"DataView"),Jm=qm,Zm=Fe,Qm=ge,Xm=Zm(Qm,"Promise"),eg=Xm,tg=Fe,ng=ge,rg=tg(ng,"Set"),og=rg,ig=Fe,ag=ge,sg=ig(ag,"WeakMap"),cg=sg,Yn=Jm,Kn=mr,qn=eg,Jn=og,Zn=cg,Hi=et,ot=Fi,_o="[object Map]",lg="[object Object]",So="[object Promise]",Co="[object Set]",bo="[object WeakMap]",Ao="[object DataView]",ug=ot(Yn),dg=ot(Kn),fg=ot(qn),pg=ot(Jn),mg=ot(Zn),$e=Hi;(Yn&&$e(new Yn(new ArrayBuffer(1)))!=Ao||Kn&&$e(new Kn)!=_o||qn&&$e(qn.resolve())!=So||Jn&&$e(new Jn)!=Co||Zn&&$e(new Zn)!=bo)&&($e=function(e){var t=Hi(e),n=t==lg?e.constructor:void 0,o=n?ot(n):"";if(o)switch(o){case ug:return Ao;case dg:return _o;case fg:return So;case pg:return Co;case mg:return bo}return t});var gg=$e,$n=hr,hg=Oi,yg=qf,vg=Hm,Eo=gg,Io=Ae,To=vr,wg=_r,_g=1,Po="[object Arguments]",No="[object Array]",Ut="[object Object]",Sg=Object.prototype,ko=Sg.hasOwnProperty;function Cg(e,t,n,o,i,a){var s=Io(e),c=Io(t),l=s?No:Eo(e),u=c?No:Eo(t);l=l==Po?Ut:l,u=u==Po?Ut:u;var d=l==Ut,m=u==Ut,f=l==u;if(f&&To(e)){if(!To(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new $n),s||wg(e)?hg(e,t,n,o,i,a):yg(e,t,l,n,o,i,a);if(!(n&_g)){var p=d&&ko.call(e,"__wrapped__"),h=m&&ko.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,S=h?t.value():t;return a||(a=new $n),i(v,S,n,o,a)}}return f?(a||(a=new $n),vg(e,t,n,o,i,a)):!1}var bg=Cg,Ag=bg,xo=Oe;function Yi(e,t,n,o,i){return e===t?!0:e==null||t==null||!xo(e)&&!xo(t)?e!==e&&t!==t:Ag(e,t,n,o,Yi,i)}var Ki=Yi,Eg=hr,Ig=Ki,Tg=1,Pg=2;function Ng(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){c=n[i];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===void 0&&!(l in e))return!1}else{var m=new Eg;if(o)var f=o(u,d,l,e,t,m);if(!(f===void 0?Ig(d,u,Tg|Pg,o,m):f))return!1}}return!0}var kg=Ng,xg=be;function Ug(e){return e===e&&!xg(e)}var qi=Ug,$g=qi,Rg=ji;function Fg(e){for(var t=Rg(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,$g(i)]}return t}var Og=Fg;function Dg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Ji=Dg,Mg=kg,Bg=Og,Vg=Ji;function Lg(e){var t=Bg(e);return t.length==1&&t[0][2]?Vg(t[0][0],t[0][1]):function(n){return n===e||Mg(n,e,t)}}var zg=Lg,Gg=et,Wg=Oe,jg="[object Symbol]";function Hg(e){return typeof e=="symbol"||Wg(e)&&Gg(e)==jg}var Cr=Hg,Yg=Ae,Kg=Cr,qg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jg=/^\w*$/;function Zg(e,t){if(Yg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Kg(e)?!0:Jg.test(e)||!qg.test(e)||t!=null&&e in Object(t)}var br=Zg,Zi=gr,Qg="Expected a function";function Ar(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qg);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Ar.Cache||Zi),n}Ar.Cache=Zi;var Xg=Ar,eh=Xg,th=500;function nh(e){var t=eh(e,function(o){return n.size===th&&n.clear(),o}),n=t.cache;return t}var rh=nh,oh=rh,ih=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ah=/\\(\\)?/g,sh=oh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ih,function(n,o,i,a){t.push(i?a.replace(ah,"$1"):o||n)}),t}),ch=sh,Uo=pn,lh=Ui,uh=Ae,dh=Cr,fh=1/0,$o=Uo?Uo.prototype:void 0,Ro=$o?$o.toString:void 0;function Qi(e){if(typeof e=="string")return e;if(uh(e))return lh(e,Qi)+"";if(dh(e))return Ro?Ro.call(e):"";var t=e+"";return t=="0"&&1/e==-fh?"-0":t}var ph=Qi,mh=ph;function gh(e){return e==null?"":mh(e)}var hh=gh,yh=Ae,vh=br,wh=ch,_h=hh;function Sh(e,t){return yh(e)?e:vh(e,t)?[e]:wh(_h(e))}var vn=Sh,Ch=Cr,bh=1/0;function Ah(e){if(typeof e=="string"||Ch(e))return e;var t=e+"";return t=="0"&&1/e==-bh?"-0":t}var At=Ah,Eh=vn,Ih=At;function Th(e,t){t=Eh(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Ih(t[n++])];return n&&n==o?e:void 0}var Er=Th,Ph=Er;function Nh(e,t,n){var o=e==null?void 0:Ph(e,t);return o===void 0?n:o}var kh=Nh;function xh(e,t){return e!=null&&t in Object(e)}var Uh=xh,$h=vn,Rh=yr,Fh=Ae,Oh=hn,Dh=wr,Mh=At;function Bh(e,t,n){t=$h(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Mh(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Dh(i)&&Oh(s,i)&&(Fh(e)||Rh(e)))}var Vh=Bh,Lh=Uh,zh=Vh;function Gh(e,t){return e!=null&&zh(e,t,Lh)}var Wh=Gh,jh=Ki,Hh=kh,Yh=Wh,Kh=br,qh=qi,Jh=Ji,Zh=At,Qh=1,Xh=2;function ey(e,t){return Kh(e)&&qh(t)?Jh(Zh(e),t):function(n){var o=Hh(n,e);return o===void 0&&o===t?Yh(n,e):jh(t,o,Qh|Xh)}}var ty=ey;function ny(e){return e}var Ir=ny;function ry(e){return function(t){return t==null?void 0:t[e]}}var oy=ry,iy=Er;function ay(e){return function(t){return iy(t,e)}}var sy=ay,cy=oy,ly=sy,uy=br,dy=At;function fy(e){return uy(e)?cy(dy(e)):ly(e)}var py=fy,my=zg,gy=ty,hy=Ir,yy=Ae,vy=py;function wy(e){return typeof e=="function"?e:e==null?hy:typeof e=="object"?yy(e)?gy(e[0],e[1]):my(e):vy(e)}var _y=wy,Sy=Fe,Cy=function(){try{var e=Sy(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Xi=Cy,Fo=Xi;function by(e,t,n){t=="__proto__"&&Fo?Fo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Tr=by,Ay=Tr,Ey=bt,Iy=Object.prototype,Ty=Iy.hasOwnProperty;function Py(e,t,n){var o=e[t];(!(Ty.call(e,t)&&Ey(o,n))||n===void 0&&!(t in e))&&Ay(e,t,n)}var ea=Py,Ny=ea,ky=vn,xy=hn,Oo=be,Uy=At;function $y(e,t,n,o){if(!Oo(e))return e;t=ky(t,e);for(var i=-1,a=t.length,s=a-1,c=e;c!=null&&++i<a;){var l=Uy(t[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=s){var d=c[l];u=o?o(d,l,c):void 0,u===void 0&&(u=Oo(d)?d:xy(t[i+1])?[]:{})}Ny(c,l,u),c=c[l]}return e}var Ry=$y,Fy=Er,Oy=Ry,Dy=vn;function My(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],c=Fy(e,s);n(c,s)&&Oy(a,Dy(s,e),c)}return a}var By=My,Vy=Wi,Ly=Vy(Object.getPrototypeOf,Object),Pr=Ly,zy=Mi,Gy=Pr,Wy=Li,jy=Vi,Hy=Object.getOwnPropertySymbols,Yy=Hy?function(e){for(var t=[];e;)zy(t,Wy(e)),e=Gy(e);return t}:jy,Ky=Yy;function qy(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Jy=qy,Zy=be,Qy=Sr,Xy=Jy,ev=Object.prototype,tv=ev.hasOwnProperty;function nv(e){if(!Zy(e))return Xy(e);var t=Qy(e),n=[];for(var o in e)o=="constructor"&&(t||!tv.call(e,o))||n.push(o);return n}var rv=nv,ov=Gi,iv=rv,av=yn;function sv(e){return av(e)?ov(e,!0):iv(e)}var Nr=sv,cv=Bi,lv=Ky,uv=Nr;function dv(e){return cv(e,uv,lv)}var fv=dv,pv=Ui,mv=_y,gv=By,hv=fv;function yv(e,t){if(e==null)return{};var n=pv(hv(e),function(o){return[o]});return t=mv(t),gv(e,n,function(o,i){return t(o,i[0])})}var vv=yv;const wv=xi(vv),_v=!0,Sv="",wn=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),Cv=(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:")}},bv=e=>{const{phone_number:t,...n}=wv(e,Cv);if(Jo(t)&&t!==Sv){const{country_code:o}=e;return{...n,phone_number:wn(o,t)}}return n},Av=(e,t,n)=>{const{password:o,...i}=t,a=bv(i),s={autoSignIn:_v,userAttributes:{...n==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},Ev=({formValues:e,loginMechanisms:t})=>{const n=t[0];if(n==="phone_number"){const{country_code:o,phone_number:i}=e;return wn(o,i)}return e[n]},{assign:V}=Ai,Iv=V({actorDoneData:void 0}),Tv=V({challengeName:void 0}),Pv=V({missingAttributes:void 0}),Nv=V({remoteError:void 0}),kv=V({formValues:{}}),xv=V({touched:{}}),Uv=V({user:void 0}),$v=V({validationError:{}}),Rv=V({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:n}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return n}}),Fv=V({step:"SIGN_IN"}),Ov=V({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Dv=V({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Mv=V({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;return n==="CONFIRM_SIGN_IN_WITH_SMS_CODE"?"SMS_MFA":n==="CONFIRM_SIGN_IN_WITH_TOTP_CODE"?"SOFTWARE_TOKEN_MFA":void 0}}),Bv=V({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?wn(i,o):o}}),Vv=V({username:Ev}),Lv=V({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?wn(i,o):o}}),zv=V({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),Gv=V({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),Wv=V({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),jv=V({missingAttributes:(e,{data:t})=>{var n;return(n=t.nextStep)==null?void 0:n.missingAttributes}}),Hv=V({validationError:(e,{data:t})=>t}),Yv=V({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) – please contact the administrator":(t==null?void 0:t.message)||t}),Kv=V({user:(e,{data:t})=>t}),Do=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),qv=V({codeDeliveryDetails:(e,{data:t})=>{var n;return(n=t==null?void 0:t.nextStep)!=null&&n.codeDeliveryDetails?Do(t.nextStep.codeDeliveryDetails):Do(t)}}),Jv=V({formValues:(e,{data:t})=>{const{name:n,value:o}=t;return{...e.formValues,[n]:o}}}),Zv=V({formValues:(e,{data:t})=>fs({...e.formValues,...t},"password")}),Qv=V({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Xv=V({unverifiedUserAttributes:(e,{data:t})=>{const{email:n,phone_number:o}=t;return{...n&&{email:n},...o&&{phone_number:o}}}}),ew=V({selectedUserAttribute:void 0}),tw=V({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),nw=V({step:"CONFIRM_SIGN_UP"}),Et={clearActorDoneData:Iv,clearChallengeName:Tv,clearError:Nv,clearFormValues:kv,clearMissingAttributes:Pv,clearSelectedUserAttribute:ew,clearTouched:xv,clearUser:Uv,clearValidationError:$v,handleBlur:Qv,handleInput:Jv,handleSubmit:Zv,setChallengeName:Mv,setCodeDeliveryDetails:qv,setFieldErrors:Hv,setMissingAttributes:jv,setNextResetPasswordStep:Wv,setNextSignInStep:zv,setNextSignUpStep:Gv,setRemoteError:Yv,setConfirmAttributeCompleteStep:Dv,setConfirmSignUpSignUpStep:nw,setShouldVerifyUserAttributeStep:Ov,setSelectedUserAttribute:tw,setSignInStep:Fv,setTotpSecretCode:Rv,setUser:Kv,setUnverifiedUserAttributes:Xv,setUsernameForgotPassword:Bv,setUsernameSignIn:Lv,setUsernameSignUp:Vv},rw=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE"],ow=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",iw=(e,{data:t})=>{var n;return((n=t==null?void 0:t.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},aw=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",sw=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",cw=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",lw=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",uw=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",dw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",fw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",pw=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",mw=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",gw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",hw=({step:e})=>rw.includes(e),yw=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",vw=({step:e})=>e==="RESET_PASSWORD",ww=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",_w=({step:e})=>e==="CONFIRM_SIGN_UP",Sw=(e,{data:t})=>{const{phone_number_verified:n,email_verified:o}=t;return(o===void 0||o==="false")&&(n===void 0||n==="false")},Cw=(e,{data:t})=>t.message==="User is already confirmed.",_n={hasCompletedAttributeConfirmation:dw,hasCompletedResetPassword:uw,hasCompletedSignIn:cw,hasCompletedSignUp:lw,isConfirmSignUpStep:gw,isConfirmUserAttributeStep:fw,isResetPasswordStep:mw,isShouldConfirmUserAttributeStep:pw,isUserAlreadyConfirmed:Cw,shouldAutoSignIn:sw,shouldConfirmResetPassword:ww,shouldConfirmSignIn:hw,shouldConfirmSignInWithNewPassword:ow,shouldConfirmSignUp:_w,shouldConfirmSignUpFromSignIn:aw,shouldResetPassword:vw,shouldResetPasswordFromSignIn:iw,shouldSetupTotp:yw,shouldVerifyAttribute:Sw};var bw=Tr,Aw=bt;function Ew(e,t,n){(n!==void 0&&!Aw(e[t],n)||n===void 0&&!(t in e))&&bw(e,t,n)}var ta=Ew;function Iw(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),c=s.length;c--;){var l=s[e?c:++i];if(n(a[l],l,a)===!1)break}return t}}var Tw=Iw,Pw=Tw,Nw=Pw(),kw=Nw,Qt={exports:{}};Qt.exports;(function(e,t){var n=ge,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var m=u.length,f=c?c(m):new u.constructor(m);return u.copy(f),f}e.exports=l})(Qt,Qt.exports);var xw=Qt.exports,Mo=Di;function Uw(e){var t=new e.constructor(e.byteLength);return new Mo(t).set(new Mo(e)),t}var $w=Uw,Rw=$w;function Fw(e,t){var n=t?Rw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ow=Fw;function Dw(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Mw=Dw,Bw=be,Bo=Object.create,Vw=function(){function e(){}return function(t){if(!Bw(t))return{};if(Bo)return Bo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Lw=Vw,zw=Lw,Gw=Pr,Ww=Sr;function jw(e){return typeof e.constructor=="function"&&!Ww(e)?zw(Gw(e)):{}}var Hw=jw,Yw=yn,Kw=Oe;function qw(e){return Kw(e)&&Yw(e)}var Jw=qw,Zw=et,Qw=Pr,Xw=Oe,e_="[object Object]",t_=Function.prototype,n_=Object.prototype,na=t_.toString,r_=n_.hasOwnProperty,o_=na.call(Object);function i_(e){if(!Xw(e)||Zw(e)!=e_)return!1;var t=Qw(e);if(t===null)return!0;var n=r_.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&na.call(n)==o_}var a_=i_;function s_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ra=s_,c_=ea,l_=Tr;function u_(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;l===void 0&&(l=e[c]),i?l_(n,c,l):c_(n,c,l)}return n}var d_=u_,f_=d_,p_=Nr;function m_(e){return f_(e,p_(e))}var g_=m_,Vo=ta,h_=xw,y_=Ow,v_=Mw,w_=Hw,Lo=yr,zo=Ae,__=Jw,S_=vr,C_=pr,b_=be,A_=a_,E_=_r,Go=ra,I_=g_;function T_(e,t,n,o,i,a,s){var c=Go(e,n),l=Go(t,n),u=s.get(l);if(u){Vo(e,n,u);return}var d=a?a(c,l,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=zo(l),p=!f&&S_(l),h=!f&&!p&&E_(l);d=l,f||p||h?zo(c)?d=c:__(c)?d=v_(c):p?(m=!1,d=h_(l,!0)):h?(m=!1,d=y_(l,!0)):d=[]:A_(l)||Lo(l)?(d=c,Lo(c)?d=I_(c):(!b_(c)||C_(c))&&(d=w_(l))):m=!1}m&&(s.set(l,d),i(d,l,o,a,s),s.delete(l)),Vo(e,n,d)}var P_=T_,N_=hr,k_=ta,x_=kw,U_=P_,$_=be,R_=Nr,F_=ra;function oa(e,t,n,o,i){e!==t&&x_(t,function(a,s){if(i||(i=new N_),$_(a))U_(e,t,s,n,oa,o,i);else{var c=o?o(F_(e,s),a,s+"",e,t,i):void 0;c===void 0&&(c=a),k_(e,s,c)}},R_)}var O_=oa;function D_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var M_=D_,B_=M_,Wo=Math.max;function V_(e,t,n){return t=Wo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Wo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(s),B_(e,this,c)}}var L_=V_;function z_(e){return function(){return e}}var G_=z_,W_=G_,jo=Xi,j_=Ir,H_=jo?function(e,t){return jo(e,"toString",{configurable:!0,enumerable:!1,value:W_(t),writable:!0})}:j_,Y_=H_,K_=800,q_=16,J_=Date.now;function Z_(e){var t=0,n=0;return function(){var o=J_(),i=q_-(o-n);if(n=o,i>0){if(++t>=K_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Q_=Z_,X_=Y_,eS=Q_,tS=eS(X_),nS=tS,rS=Ir,oS=L_,iS=nS;function aS(e,t){return iS(oS(e,t,rS),e+"")}var sS=aS,cS=bt,lS=yn,uS=hn,dS=be;function fS(e,t,n){if(!dS(n))return!1;var o=typeof t;return(o=="number"?lS(n)&&uS(t,n.length):o=="string"&&t in n)?cS(n[t],e):!1}var pS=fS,mS=sS,gS=pS;function hS(e){return mS(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&gS(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var c=n[o];c&&e(t,c,o,a)}return t})}var yS=hS,vS=O_,wS=yS,_S=wS(function(e,t,n){vS(e,t,n)}),SS=_S;const CS=xi(SS),Sn=async(e,t,n,o)=>{const i=await Promise.all(o.map(s=>s(e,t,n))),a=CS({},...i);return Zo(a)?Promise.resolve():Promise.reject(a)},bS=8,AS=e=>Array.isArray(e),ES=e=>{if(e)return AS(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var c,l,u,d;const e=Ua.Amplify.getConfig(),t=(c=e.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=((l=e.Auth)==null?void 0:l.Cognito)??{},i=n?Object.entries(n).filter(([m,f])=>m!=="oauth").filter(([m,f])=>!!f).map(m=>m[0]==="phone"?"phone_number":m[0]):void 0,a=ES(o),s=(u=n==null?void 0:n.oauth)!=null&&u.providers?(d=n.oauth.providers)==null?void 0:d.map(m=>m.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:H.getCurrentUser,handleSignIn:H.signIn,handleSignUp:H.signUp,handleConfirmSignIn:H.confirmSignIn,handleConfirmSignUp:H.confirmSignUp,handleForgotPasswordSubmit:H.confirmResetPassword,handleForgotPassword:H.resetPassword,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=n.minLength??bS;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!us(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){}};function IS({services:e}){return Qe({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:un()},guards:_n,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(t){return Sn(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const ia=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),$t={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"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},TS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}};function PS({services:e}){return Qe({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:ia("signIn"),fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...TS}},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",...$t}}}},confirmSignIn:{initial:"edit",exit:["clearChallengeName","clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignIn",...$t}}}},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",...$t}}}}}},setupTotp:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],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",...$t}}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Et,sendUpdate:un()},guards:_n,services:{async fetchUserAttributes(){return H.fetchUserAttributes()},resetPassword({username:t}){return H.resetPassword({username:t})},handleResendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},handleSignIn({formValues:t,username:n}){const{password:o}=t;return e.handleSignIn({username:n,password:o})},confirmSignIn({formValues:t}){const{confirmation_code:n}=t;return e.handleConfirmSignIn({challengeResponse:n})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:o,country_code:i,confirm_password:a,...s}=t,c;o&&(c=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:c});const l={challengeResponse:n,options:{userAttributes:s}};return H.confirmSignIn(l)},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},async validateFields(t){return Sn(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const NS={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},kS={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"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}},xS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function US({services:e}){return Qe({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...kS}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...xS}},federatedSignIn:ia("signUp"),resetPassword:{invoke:{src:"resetPassword",...NS}},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})}}},{actions:{...Et,sendUpdate:un()},guards:_n,services:{autoSignIn(){return H.autoSignIn()},async fetchUserAttributes(){return H.fetchUserAttributes()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:o}=t,i={username:n,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},handleSignUp(t){const{formValues:n,loginMechanisms:o,username:i}=t,a=o[0],s=Av(i,n,a);return e.handleSignUp(s)},async validateSignUp(t){return Sn(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const $S=()=>Qe({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:()=>H.signOut()}});function RS(){return Qe({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:un()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return H.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const n={confirmationCode:e,userAttributeKey:t};return H.confirmUserAttribute(n)},async validateFields(e){return Sn(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Rt=(e,t)=>{var n,o,i,a,s,c;return{...e.actorDoneData,step:((n=e==null?void 0:e.actorDoneData)==null?void 0:n.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:(c=e.config)==null?void 0:c.socialProviders}},{choose:FS,stop:OS}=Ai,lt=e=>OS(e),DS={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},MS={always:{actions:"configure",target:"getConfig"}};function BS(e){const{useNextWaitConfig:t,...n}={};return Qe({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?MS:DS,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:lt("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:lt("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:lt("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:lt("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:lt("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:FS([{cond:"hasActor",actions:fl(({actorRef:i})=>i)}]),setActorDoneData:_e({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes})}),applyAmplifyConfig:_e({config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:c=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:u,formFields:d,passwordSettings:m=a.passwordFormat??{}}=i.config;return s.length===0&&s.push("username"),{formFields:VS(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:c,socialProviders:l}}}),spawnSignInActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=PS({services:s}).withContext(Rt(i,"SIGN_IN"));return at(c,{name:"signInActor"})}}),spawnSignUpActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=US({services:s}).withContext(Rt(i,"SIGN_UP"));return at(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=IS({services:s}).withContext(Rt(i,"FORGOT_PASSWORD"));return at(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_e({actorRef:i=>{const a=RS().withContext(Rt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_e({actorRef:i=>{const a=$S().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:_e((i,a)=>{const{services:s,...c}=ja(n)?a.data??{}:n;return{services:{...ke,...s},config:c}}),setHasSetup:_e({hasSetup:!0})},guards:{..._n,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 VS(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let o=e[t][n];o.required=o.isRequired})}),e}const Q={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",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",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"},LS=({componentName:e,packageName:t,version:n})=>{const o=[`ui-${t}`,n];switch(e){case"Authenticator":{B.setCustomUserAgent({...Da,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{B.setCustomUserAgent({...Oa,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{B.setCustomUserAgent({...Ma,additionalDetails:[[e],o]});break}case"InAppMessaging":{B.setCustomUserAgent({...Ba,additionalDetails:[[e],o]});break}case"LocationSearch":{B.setCustomUserAgent({...Va,additionalDetails:[[e],o]});break}case"MapView":{B.setCustomUserAgent({...La,additionalDetails:[[e],o]});break}case"StorageManager":{B.setCustomUserAgent({...za,additionalDetails:[[e],o]});break}}return Ya},zS={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},GS={class:"amplify-flex amplify-authenticator__icon-wrapper"},WS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),jS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),he=r.defineComponent({__name:"base-alert",setup(e){const t=r.ref(!0),n=T("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=re;return t.value?(r.openBlock(),r.createElementBlock("div",zS,[r.createElementVNode("div",GS,[WS,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[jS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}}),ye=r.defineComponent({__name:"base-field-set",setup(e){const t=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(t).default&&r.unref(t).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function HS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function aa(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(t+=1,n||(o=r.effectScope(!0),n=o.run(()=>e(...a))),HS(i),n)}function YS(e){return"state"in e}var Ho=function(){};function KS(e){return"getSnapshot"in e?e.getSnapshot():YS(e)?e.state:void 0}function qS(e,t){t===void 0&&(t=KS);var n=r.isRef(e)?e:r.shallowRef(e),o=r.shallowRef(t(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,c){o.value=t(a);var l=a.subscribe({next:function(u){return o.value=u},error:Ho,complete:Ho}).unsubscribe;c(function(){return l()})},{immediate:!0}),{state:o,send:i}}const JS=e=>{var t,n,o;return{...(o=(n=(t=or(e))==null?void 0:t.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},kr=aa(()=>{const e=BS(),t=ki(e).start(),n=r.ref("configuring"),{state:o,send:i}=qS(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},c=Ka(t,(l,u)=>Qo(l,u,{onSignIn:a,onSignOut:s}));return H.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{c()}),{authStatus:n,service:t,send:i,state:o}}),ee=aa(()=>{const{authStatus:e,state:t,send:n}=kr(),o=r.reactive({});return r.watchEffect(()=>{const i=es({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?JS(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let ZS=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=n[e]&63;o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o<63?t+="_":t+="-"}return t};const Cn=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const n=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),QS={},XS={"data-amplify-label":""};function eC(e,t){return r.openBlock(),r.createElementBlock("label",XS,[r.renderSlot(e.$slots,"default")])}const bn=tn(QS,[["render",eC]]),tC=["aria-label","aria-checked"],nC=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),rC=[nC],oC=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),iC=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),aC=[oC,iC],sC={inheritAttrs:!1},xr=r.defineComponent({...sC,__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,n=T("Show password"),o=T("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:c,label:l,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=r.toRefs(t),h=r.ref("");function v(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const S=T((f==null?void 0:f.value)??l.value),g=T(l.value);return(w,y)=>{const _=bn,b=Cn,A=X;return r.openBlock(),r.createBlock(A,{class:r.normalizeClass([r.unref(Q).Flex,r.unref(Q).Field,r.unref(Q).TextField,r.unref(Q).PasswordField])},{default:r.withCtx(()=>[r.createVNode(_,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(m)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1},8,["class","for"]),r.createVNode(A,{class:r.normalizeClass([r.unref(Q).Flex,r.unref(Q).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(A,{class:r.normalizeClass(r.unref(Q).FieldGroupFieldWrapper)},{default:r.withCtx(()=>[r.createVNode(b,r.mergeProps(w.$attrs,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=E=>h.value=E),class:[r.unref(Q).Input,r.unref(Q).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(c),autocomplete:r.unref(u),required:r.unref(p)??!0,placeholder:r.unref(S),type:i.value,"aria-invalid":r.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"]),r.createVNode(A,{class:r.normalizeClass(r.unref(Q).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(Q).Button,r.unref(Q).FieldGroupControl,r.unref(Q).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:v},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(Q).Icon)},rC,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(Q).Icon)},aC,2))],10,tC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),cC=["value","selected"],lC=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const n=e,{options:o,selectValue:i}=r.toRefs(n),a=s=>{t("update:selectValue",s.target.value)};return(s,c)=>(r.openBlock(),r.createElementBlock("select",{onChange:c[0]||(c[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,u)=>(r.openBlock(),r.createElementBlock("option",{key:u,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,cC))),128))],32))}}),uC=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),dC=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(e){const t=e,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:c,dialCode:l,dialCodeList:u}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const h=bn,v=lC,S=X,g=Cn;return r.openBlock(),r.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(h,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(S,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(S,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(h,r.mergeProps({for:"amplify-field-"+r.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(S,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(u),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[uC]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:r.unref(c)??!0,type:e.type,placeholder:r.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})}}}),fC=["id"],sa=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:n,formField:o}=r.toRefs(t),{validationErrors:i}=r.toRefs(ee()),{type:a}=o.value,s=a==="password",c=ZS(12),l=r.computed(()=>is(i.value[n.value])),u=r.computed(()=>{var m;return((m=l.value)==null?void 0:m.length)>0}),d=r.computed(()=>u.value?c:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(xr,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(dC,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(u)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(p,h)=>(r.openBlock(),r.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(T)(p)),1))),128))],8,fC)):r.createCommentVNode("",!0)],64))}}),ve=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=kr();let i=[];return r.onBeforeMount(()=>{i=pc(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([c,l])=>(r.openBlock(),r.createBlock(sa,{name:c,key:c,formField:l},null,8,["name","formField"]))),128))}}),Ft=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=ee(),i=()=>{o({provider:n.value})};return(a,s)=>{const c=re;return r.openBlock(),r.createBlock(c,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),pC=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),mC={class:"amplify-text"},gC=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),hC={class:"amplify-text"},yC=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),vC={class:"amplify-text"},wC=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),_C={class:"amplify-text"},SC=["data-label"],An=r.defineComponent({__name:"federated-sign-in",setup(e){const t=ee(),{route:n,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"),c=o==null?void 0:o.includes("google"),l=s||c||i||a,{getSignInWithFederationText:u,getOrText:d}=ce,m=r.computed(()=>Bn),f=r.computed(()=>u(n,"amazon")),p=r.computed(()=>u(n,"apple")),h=r.computed(()=>u(n,"facebook")),v=r.computed(()=>u(n,"google")),S=r.computed(()=>d());return(g,w)=>{const y=X;return r.unref(l)?(r.openBlock(),r.createBlock(y,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Ft,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[pC,r.createElementVNode("span",mC,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Ft,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[gC,r.createElementVNode("span",hC,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Ft,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[yC,r.createElementVNode("span",vC,r.toDisplayString(r.unref(h)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock(Ft,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[wC,r.createElementVNode("span",_C,r.toDisplayString(r.unref(v)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(S)},null,8,SC)]),_:1})):r.createCommentVNode("",!0)}}}),CC=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),bC={"data-amplify-footer":""},Ur=r.defineComponent({__name:"sign-in",setup(e){const t=ee(),{submitForm:n,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=r.toRefs(t),{getForgotPasswordText:c,getSignInText:l,getSigningInText:u}=ce,d=r.computed(()=>c()),m=r.computed(()=>l()),f=r.computed(()=>u()),p=S=>{const{name:g,value:w}=S.target;o({name:g,value:w})},h=S=>{n(me(S))},v=()=>{i()};return(S,g)=>{const w=ye,y=he,_=re,b=X,A=pe,E=fe;return r.renderSlot(S.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.renderSlot(S.$slots,"header"),r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(h,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:I})=>[r.renderSlot(S.$slots,"form",{info:I,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:r.withCtx(()=>[r.createVNode(An),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:I})=>[r.renderSlot(S.$slots,"signin-fields",{info:I})]),default:r.withCtx(()=>[CC,r.createVNode(ve,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(y,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(_,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(f):r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(E,null,{default:r.withCtx(()=>[r.renderSlot(S.$slots,"footer",{},()=>[r.createElementVNode("div",bC,[r.createVNode(_,{onClick:v,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})])])]),_:3})])}}}),$r=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ve,{route:"signUp"}))}}),Rr=r.defineComponent({__name:"sign-up",setup(e){const t=ee(),{submitForm:n,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:c}=r.toRefs(t),{getCreateAccountText:l}=ce,u=r.computed(()=>l()),d=p=>{const{checked:h,name:v,type:S,value:g}=p.target;i({name:v,value:S==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{n(me(p))};return(p,h)=>{const v=ye,S=he,g=re,w=X,y=pe,_=fe;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(w,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:r.withModifiers(f,["prevent"])},{default:r.withCtx(()=>[r.createVNode(An),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{fieldSetI:r.withCtx(({slotData:b})=>[r.renderSlot(p.$slots,"signup-fields",{info:b})]),default:r.withCtx(()=>[r.createVNode($r)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(g,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(c)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(_,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),AC={};function EC(e,t){const n=X;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}const IC=tn(AC,[["render",EC]]),TC=["tabindex","aria-selected","id","aria-controls"],PC=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:n,id:o,label:i}=r.toRefs(t);return(a,s)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,TC))}}),NC="4.2.20",kC={};function xC(e,t){return r.renderSlot(e.$slots,"textI",r.normalizeProps(r.guardReactiveProps(e.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(e.$attrs,{"data-amplify-text":""}),[r.renderSlot(e.$slots,"default")],16)])}const ca=tn(kC,[["render",xC]]),xe=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,c;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((c=(s=i[0])==null?void 0:s.children)==null?void 0:c.length)===0)i[0].children=[r.h(`h${e.level}`,{...n,class:a},[o])];else return()=>r.h(`h${e.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),Fr=r.defineComponent({__name:"confirm-sign-up",setup(e){const t=ee(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(t),{resendCode:a,submitForm:s,updateForm:c}=t,{getDeliveryMethodText:l,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=ce,f=r.computed(()=>l(n.value)),p=r.computed(()=>d()),h=r.computed(()=>m()),v=r.computed(()=>u(n.value)),S=_=>{const{name:b,value:A}=_.target;c({name:b,value:A})},g=_=>{w(_)},w=_=>{s(me(_))},y=()=>{a()};return(_,b)=>{const A=xe,E=ca,I=ye,P=he,N=re,k=fe,x=X,$=pe;return r.renderSlot(_.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(x,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode($,{onInput:S,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(ve,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(P,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Or=r.defineComponent({__name:"confirm-sign-in",setup(e){const t=ee(),{submitForm:n,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:c}=r.toRefs(t),l=r.computed(()=>c.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=ce,f=r.computed(()=>m(l.value)),p=r.computed(()=>u()),h=r.computed(()=>d()),v=w=>{const{name:y,value:_}=w.target;i({name:y,value:_})},S=w=>{n(me(w))},g=()=>{o()};return(w,y)=>{const _=xe,b=X,A=he,E=re,I=fe,P=ye,N=pe;return r.renderSlot(w.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(N,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createVNode(P,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(_,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ve,{route:"confirmSignIn"})]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var It={},UC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},la={},ae={};let Dr;const $C=[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];ae.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};ae.getSymbolTotalCodewords=function(t){return $C[t]};ae.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};ae.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Dr=t};ae.isKanjiModeEnabled=function(){return typeof Dr<"u"};ae.toSJIS=function(t){return Dr(t)};var En={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.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: "+n)}}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}}})(En);function ua(){this.buffer=[],this.length=0}ua.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 n=0;n<t;n++)this.putBit((e>>>t-n-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 RC=ua;function Tt(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)}Tt.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};Tt.prototype.get=function(e,t){return this.data[e*this.size+t]};Tt.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};Tt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var FC=Tt,da={};(function(e){const t=ae.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,c=[a-7];for(let l=1;l<i-1;l++)c[l]=c[l-1]-s;return c.push(6),c.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let c=0;c<s;c++)for(let l=0;l<s;l++)c===0&&l===0||c===0&&l===s-1||c===s-1&&l===0||i.push([a[c],a[l]]);return i}})(da);var fa={};const OC=ae.getSymbolSize,Yo=7;fa.getPositions=function(t){const n=OC(t);return[[0,0],[n-Yo,0],[0,n-Yo]]};var pa={};(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,c=0,l=0,u=null,d=null;for(let m=0;m<a;m++){c=l=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?c++:(c>=5&&(s+=t.N1+(c-5)),u=p,c=1),p=i.get(f,m),p===d?l++:(l>=5&&(s+=t.N1+(l-5)),d=p,l=1)}c>=5&&(s+=t.N1+(c-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let c=0;c<a-1;c++)for(let l=0;l<a-1;l++){const u=i.get(c,l)+i.get(c,l+1)+i.get(c+1,l)+i.get(c+1,l+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,c=0,l=0;for(let u=0;u<a;u++){c=l=0;for(let d=0;d<a;d++)c=c<<1&2047|i.get(u,d),d>=10&&(c===1488||c===93)&&s++,l=l<<1&2047|i.get(d,u),d>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(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 c=0;c<s;c++)for(let l=0;l<s;l++)a.isReserved(l,c)||a.xor(l,c,n(i,l,c))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let c=0,l=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<l&&(l=d,c=u)}return c}})(pa);var In={};const Te=En,Ot=[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],Dt=[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,n){switch(n){case Te.L:return Ot[(t-1)*4+0];case Te.M:return Ot[(t-1)*4+1];case Te.Q:return Ot[(t-1)*4+2];case Te.H:return Ot[(t-1)*4+3];default:return}};In.getTotalCodewordsCount=function(t,n){switch(n){case Te.L:return Dt[(t-1)*4+0];case Te.M:return Dt[(t-1)*4+1];case Te.Q:return Dt[(t-1)*4+2];case Te.H:return Dt[(t-1)*4+3];default:return}};var ma={},Tn={};const ht=new Uint8Array(512),Xt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)ht[n]=t,Xt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ht[n]=ht[n-255]})();Tn.log=function(t){if(t<1)throw new Error("log("+t+")");return Xt[t]};Tn.exp=function(t){return ht[t]};Tn.mul=function(t,n){return t===0||n===0?0:ht[Xt[t]+Xt[n]]};(function(e){const t=Tn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let c=0;c<i.length;c++)a[s+c]^=t.mul(o[s],i[c]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=t.mul(i[l],s);let c=0;for(;c<a.length&&a[c]===0;)c++;a=a.slice(c)}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}})(ma);const ga=ma;function Mr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Mr.prototype.initialize=function(t){this.degree=t,this.genPoly=ga.generateECPolynomial(this.degree)};Mr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=ga.mod(n,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 DC=Mr,ha={},Ue={},Br={};Br.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var we={};const ya="[0-9]+",MC="[A-Z $%*+\\-./:]+";let St="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";St=St.replace(/u/g,"\\u");const BC="(?:(?![A-Z0-9 $%*+\\-./:]|"+St+`)(?:.|[\r
20
+ `).concat(c.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,o=Rc(t.target),i="internal"in t?t.internal:o?o.some(function(l){return D(l)&&l[0]===n.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),c=C(C({},t),{actions:Se(ue(t.actions)),cond:li(t.cond,a),target:s,source:this,internal:i,eventType:t.event,toJSON:function(){return C(C({},c),{target:c.target?c.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return c},e.prototype.formatTransitions=function(){var t,n,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=st,c=a[s],l=c===void 0?[]:c,u=ar(a,[typeof s=="symbol"?s:s+""]);i=W(Object.keys(u).map(function(w){!j&&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=Me(w,u[w]);return j||ul(o,w,y),y}).concat(Me(st,l)))}var d=this.config.always?Me("",this.config.always):[],m=this.config.onDone?Me(String(dt(this.id)),this.config.onDone):[];j||q(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var f=W(this.invoke.map(function(w){var y=[];return w.onDone&&y.push.apply(y,z([],O(Me(String(gt(w.id)),w.onDone)),!1)),w.onError&&y.push.apply(y,z([],O(Me(String(Ge(w.id)),w.onError)),!1)),y})),p=this.after,h=W(z(z(z(z([],O(m),!1),O(f),!1),O(i),!1),O(d),!1).map(function(w){return ue(w).map(function(y){return o.formatTransition(y)})}));try{for(var v=F(p),S=v.next();!S.done;S=v.next()){var g=S.value;h.push(g)}}catch(w){t={error:w}}finally{try{S&&!S.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return h},e}(),oo=!1;function Qe(e,t){return!j&&!("predictableActionArguments"in e)&&!oo&&(oo=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new dl(e,t)}var _e=Si,un=gi,fl=bi,xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var Ui=pl;function ml(){this.__data__=[],this.size=0}var gl=ml;function hl(e,t){return e===t||e!==e&&t!==t}var bt=hl,yl=bt;function vl(e,t){for(var n=e.length;n--;)if(yl(e[n][0],t))return n;return-1}var dn=vl,wl=dn,_l=Array.prototype,Sl=_l.splice;function Cl(e){var t=this.__data__,n=wl(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Sl.call(t,n,1),--this.size,!0}var bl=Cl,Al=dn;function El(e){var t=this.__data__,n=Al(t,e);return n<0?void 0:t[n][1]}var Il=El,Tl=dn;function Pl(e){return Tl(this.__data__,e)>-1}var Nl=Pl,kl=dn;function xl(e,t){var n=this.__data__,o=kl(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Ul=xl,$l=gl,Rl=bl,Fl=Il,Ol=Nl,Dl=Ul;function Xe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Xe.prototype.clear=$l;Xe.prototype.delete=Rl;Xe.prototype.get=Fl;Xe.prototype.has=Ol;Xe.prototype.set=Dl;var fn=Xe,Ml=fn;function Bl(){this.__data__=new Ml,this.size=0}var Vl=Bl;function Ll(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var zl=Ll;function Gl(e){return this.__data__.get(e)}var Wl=Gl;function jl(e){return this.__data__.has(e)}var Hl=jl,Yl=typeof xt=="object"&&xt&&xt.Object===Object&&xt,$i=Yl,Kl=$i,ql=typeof self=="object"&&self&&self.Object===Object&&self,Jl=Kl||ql||Function("return this")(),ge=Jl,Zl=ge,Ql=Zl.Symbol,pn=Ql,io=pn,Ri=Object.prototype,Xl=Ri.hasOwnProperty,eu=Ri.toString,ct=io?io.toStringTag:void 0;function tu(e){var t=Xl.call(e,ct),n=e[ct];try{e[ct]=void 0;var o=!0}catch{}var i=eu.call(e);return o&&(t?e[ct]=n:delete e[ct]),i}var nu=tu,ru=Object.prototype,ou=ru.toString;function iu(e){return ou.call(e)}var au=iu,ao=pn,su=nu,cu=au,lu="[object Null]",uu="[object Undefined]",so=ao?ao.toStringTag:void 0;function du(e){return e==null?e===void 0?uu:lu:so&&so in Object(e)?su(e):cu(e)}var et=du;function fu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var be=fu,pu=et,mu=be,gu="[object AsyncFunction]",hu="[object Function]",yu="[object GeneratorFunction]",vu="[object Proxy]";function wu(e){if(!mu(e))return!1;var t=pu(e);return t==hu||t==yu||t==gu||t==vu}var pr=wu,_u=ge,Su=_u["__core-js_shared__"],Cu=Su,xn=Cu,co=function(){var e=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bu(e){return!!co&&co in e}var Au=bu,Eu=Function.prototype,Iu=Eu.toString;function Tu(e){if(e!=null){try{return Iu.call(e)}catch{}try{return e+""}catch{}}return""}var Fi=Tu,Pu=pr,Nu=Au,ku=be,xu=Fi,Uu=/[\\^$.*+?()[\]{}|]/g,$u=/^\[object .+?Constructor\]$/,Ru=Function.prototype,Fu=Object.prototype,Ou=Ru.toString,Du=Fu.hasOwnProperty,Mu=RegExp("^"+Ou.call(Du).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bu(e){if(!ku(e)||Nu(e))return!1;var t=Pu(e)?Mu:$u;return t.test(xu(e))}var Vu=Bu;function Lu(e,t){return e==null?void 0:e[t]}var zu=Lu,Gu=Vu,Wu=zu;function ju(e,t){var n=Wu(e,t);return Gu(n)?n:void 0}var Fe=ju,Hu=Fe,Yu=ge,Ku=Hu(Yu,"Map"),mr=Ku,qu=Fe,Ju=qu(Object,"create"),mn=Ju,lo=mn;function Zu(){this.__data__=lo?lo(null):{},this.size=0}var Qu=Zu;function Xu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ed=Xu,td=mn,nd="__lodash_hash_undefined__",rd=Object.prototype,od=rd.hasOwnProperty;function id(e){var t=this.__data__;if(td){var n=t[e];return n===nd?void 0:n}return od.call(t,e)?t[e]:void 0}var ad=id,sd=mn,cd=Object.prototype,ld=cd.hasOwnProperty;function ud(e){var t=this.__data__;return sd?t[e]!==void 0:ld.call(t,e)}var dd=ud,fd=mn,pd="__lodash_hash_undefined__";function md(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fd&&t===void 0?pd:t,this}var gd=md,hd=Qu,yd=ed,vd=ad,wd=dd,_d=gd;function tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}tt.prototype.clear=hd;tt.prototype.delete=yd;tt.prototype.get=vd;tt.prototype.has=wd;tt.prototype.set=_d;var Sd=tt,uo=Sd,Cd=fn,bd=mr;function Ad(){this.size=0,this.__data__={hash:new uo,map:new(bd||Cd),string:new uo}}var Ed=Ad;function Id(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Td=Id,Pd=Td;function Nd(e,t){var n=e.__data__;return Pd(t)?n[typeof t=="string"?"string":"hash"]:n.map}var gn=Nd,kd=gn;function xd(e){var t=kd(this,e).delete(e);return this.size-=t?1:0,t}var Ud=xd,$d=gn;function Rd(e){return $d(this,e).get(e)}var Fd=Rd,Od=gn;function Dd(e){return Od(this,e).has(e)}var Md=Dd,Bd=gn;function Vd(e,t){var n=Bd(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var Ld=Vd,zd=Ed,Gd=Ud,Wd=Fd,jd=Md,Hd=Ld;function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nt.prototype.clear=zd;nt.prototype.delete=Gd;nt.prototype.get=Wd;nt.prototype.has=jd;nt.prototype.set=Hd;var gr=nt,Yd=fn,Kd=mr,qd=gr,Jd=200;function Zd(e,t){var n=this.__data__;if(n instanceof Yd){var o=n.__data__;if(!Kd||o.length<Jd-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new qd(o)}return n.set(e,t),this.size=n.size,this}var Qd=Zd,Xd=fn,ef=Vl,tf=zl,nf=Wl,rf=Hl,of=Qd;function rt(e){var t=this.__data__=new Xd(e);this.size=t.size}rt.prototype.clear=ef;rt.prototype.delete=tf;rt.prototype.get=nf;rt.prototype.has=rf;rt.prototype.set=of;var hr=rt,af="__lodash_hash_undefined__";function sf(e){return this.__data__.set(e,af),this}var cf=sf;function lf(e){return this.__data__.has(e)}var uf=lf,df=gr,ff=cf,pf=uf;function qt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new df;++t<n;)this.add(e[t])}qt.prototype.add=qt.prototype.push=ff;qt.prototype.has=pf;var mf=qt;function gf(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var hf=gf;function yf(e,t){return e.has(t)}var vf=yf,wf=mf,_f=hf,Sf=vf,Cf=1,bf=2;function Af(e,t,n,o,i,a){var s=n&Cf,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))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=n&bf?new wf:void 0;for(a.set(e,t),a.set(t,e);++m<c;){var h=e[m],v=t[m];if(o)var S=s?o(v,h,m,t,e,a):o(h,v,m,e,t,a);if(S!==void 0){if(S)continue;f=!1;break}if(p){if(!_f(t,function(g,w){if(!Sf(p,w)&&(h===g||i(h,g,n,o,a)))return p.push(w)})){f=!1;break}}else if(!(h===v||i(h,v,n,o,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Oi=Af,Ef=ge,If=Ef.Uint8Array,Di=If;function Tf(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var Pf=Tf;function Nf(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var kf=Nf,fo=pn,po=Di,xf=bt,Uf=Oi,$f=Pf,Rf=kf,Ff=1,Of=2,Df="[object Boolean]",Mf="[object Date]",Bf="[object Error]",Vf="[object Map]",Lf="[object Number]",zf="[object RegExp]",Gf="[object Set]",Wf="[object String]",jf="[object Symbol]",Hf="[object ArrayBuffer]",Yf="[object DataView]",mo=fo?fo.prototype:void 0,Un=mo?mo.valueOf:void 0;function Kf(e,t,n,o,i,a,s){switch(n){case Yf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Hf:return!(e.byteLength!=t.byteLength||!a(new po(e),new po(t)));case Df:case Mf:case Lf:return xf(+e,+t);case Bf:return e.name==t.name&&e.message==t.message;case zf:case Wf:return e==t+"";case Vf:var c=$f;case Gf:var l=o&Ff;if(c||(c=Rf),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;o|=Of,s.set(e,t);var d=Uf(c(e),c(t),o,i,a,s);return s.delete(e),d;case jf:if(Un)return Un.call(e)==Un.call(t)}return!1}var qf=Kf;function Jf(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Mi=Jf,Zf=Array.isArray,Ae=Zf,Qf=Mi,Xf=Ae;function ep(e,t,n){var o=t(e);return Xf(e)?o:Qf(o,n(e))}var Bi=ep;function tp(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var np=tp;function rp(){return[]}var Vi=rp,op=np,ip=Vi,ap=Object.prototype,sp=ap.propertyIsEnumerable,go=Object.getOwnPropertySymbols,cp=go?function(e){return e==null?[]:(e=Object(e),op(go(e),function(t){return sp.call(e,t)}))}:ip,Li=cp;function lp(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var up=lp;function dp(e){return e!=null&&typeof e=="object"}var Oe=dp,fp=et,pp=Oe,mp="[object Arguments]";function gp(e){return pp(e)&&fp(e)==mp}var hp=gp,ho=hp,yp=Oe,zi=Object.prototype,vp=zi.hasOwnProperty,wp=zi.propertyIsEnumerable,_p=ho(function(){return arguments}())?ho:function(e){return yp(e)&&vp.call(e,"callee")&&!wp.call(e,"callee")},yr=_p,Jt={exports:{}};function Sp(){return!1}var Cp=Sp;Jt.exports;(function(e,t){var n=ge,o=Cp,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,c=s?n.Buffer:void 0,l=c?c.isBuffer:void 0,u=l||o;e.exports=u})(Jt,Jt.exports);var vr=Jt.exports,bp=9007199254740991,Ap=/^(?:0|[1-9]\d*)$/;function Ep(e,t){var n=typeof e;return t=t??bp,!!t&&(n=="number"||n!="symbol"&&Ap.test(e))&&e>-1&&e%1==0&&e<t}var hn=Ep,Ip=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ip}var wr=Tp,Pp=et,Np=wr,kp=Oe,xp="[object Arguments]",Up="[object Array]",$p="[object Boolean]",Rp="[object Date]",Fp="[object Error]",Op="[object Function]",Dp="[object Map]",Mp="[object Number]",Bp="[object Object]",Vp="[object RegExp]",Lp="[object Set]",zp="[object String]",Gp="[object WeakMap]",Wp="[object ArrayBuffer]",jp="[object DataView]",Hp="[object Float32Array]",Yp="[object Float64Array]",Kp="[object Int8Array]",qp="[object Int16Array]",Jp="[object Int32Array]",Zp="[object Uint8Array]",Qp="[object Uint8ClampedArray]",Xp="[object Uint16Array]",em="[object Uint32Array]",G={};G[Hp]=G[Yp]=G[Kp]=G[qp]=G[Jp]=G[Zp]=G[Qp]=G[Xp]=G[em]=!0;G[xp]=G[Up]=G[Wp]=G[$p]=G[jp]=G[Rp]=G[Fp]=G[Op]=G[Dp]=G[Mp]=G[Bp]=G[Vp]=G[Lp]=G[zp]=G[Gp]=!1;function tm(e){return kp(e)&&Np(e.length)&&!!G[Pp(e)]}var nm=tm;function rm(e){return function(t){return e(t)}}var om=rm,Zt={exports:{}};Zt.exports;(function(e,t){var n=$i,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,c=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(Zt,Zt.exports);var im=Zt.exports,am=nm,sm=om,yo=im,vo=yo&&yo.isTypedArray,cm=vo?sm(vo):am,_r=cm,lm=up,um=yr,dm=Ae,fm=vr,pm=hn,mm=_r,gm=Object.prototype,hm=gm.hasOwnProperty;function ym(e,t){var n=dm(e),o=!n&&um(e),i=!n&&!o&&fm(e),a=!n&&!o&&!i&&mm(e),s=n||o||i||a,c=s?lm(e.length,String):[],l=c.length;for(var u in e)(t||hm.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pm(u,l)))&&c.push(u);return c}var Gi=ym,vm=Object.prototype;function wm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vm;return e===n}var Sr=wm;function _m(e,t){return function(n){return e(t(n))}}var Wi=_m,Sm=Wi,Cm=Sm(Object.keys,Object),bm=Cm,Am=Sr,Em=bm,Im=Object.prototype,Tm=Im.hasOwnProperty;function Pm(e){if(!Am(e))return Em(e);var t=[];for(var n in Object(e))Tm.call(e,n)&&n!="constructor"&&t.push(n);return t}var Nm=Pm,km=pr,xm=wr;function Um(e){return e!=null&&xm(e.length)&&!km(e)}var yn=Um,$m=Gi,Rm=Nm,Fm=yn;function Om(e){return Fm(e)?$m(e):Rm(e)}var ji=Om,Dm=Bi,Mm=Li,Bm=ji;function Vm(e){return Dm(e,Bm,Mm)}var Lm=Vm,wo=Lm,zm=1,Gm=Object.prototype,Wm=Gm.hasOwnProperty;function jm(e,t,n,o,i,a){var s=n&zm,c=wo(e),l=c.length,u=wo(t),d=u.length;if(l!=d&&!s)return!1;for(var m=l;m--;){var f=c[m];if(!(s?f in t:Wm.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 S=s;++m<l;){f=c[m];var g=e[f],w=t[f];if(o)var y=s?o(w,g,f,t,e,a):o(g,w,f,e,t,a);if(!(y===void 0?g===w||i(g,w,n,o,a):y)){v=!1;break}S||(S=f=="constructor")}if(v&&!S){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof b=="function"&&b instanceof b)&&(v=!1)}return a.delete(e),a.delete(t),v}var Hm=jm,Ym=Fe,Km=ge,qm=Ym(Km,"DataView"),Jm=qm,Zm=Fe,Qm=ge,Xm=Zm(Qm,"Promise"),eg=Xm,tg=Fe,ng=ge,rg=tg(ng,"Set"),og=rg,ig=Fe,ag=ge,sg=ig(ag,"WeakMap"),cg=sg,Yn=Jm,Kn=mr,qn=eg,Jn=og,Zn=cg,Hi=et,ot=Fi,_o="[object Map]",lg="[object Object]",So="[object Promise]",Co="[object Set]",bo="[object WeakMap]",Ao="[object DataView]",ug=ot(Yn),dg=ot(Kn),fg=ot(qn),pg=ot(Jn),mg=ot(Zn),$e=Hi;(Yn&&$e(new Yn(new ArrayBuffer(1)))!=Ao||Kn&&$e(new Kn)!=_o||qn&&$e(qn.resolve())!=So||Jn&&$e(new Jn)!=Co||Zn&&$e(new Zn)!=bo)&&($e=function(e){var t=Hi(e),n=t==lg?e.constructor:void 0,o=n?ot(n):"";if(o)switch(o){case ug:return Ao;case dg:return _o;case fg:return So;case pg:return Co;case mg:return bo}return t});var gg=$e,$n=hr,hg=Oi,yg=qf,vg=Hm,Eo=gg,Io=Ae,To=vr,wg=_r,_g=1,Po="[object Arguments]",No="[object Array]",Ut="[object Object]",Sg=Object.prototype,ko=Sg.hasOwnProperty;function Cg(e,t,n,o,i,a){var s=Io(e),c=Io(t),l=s?No:Eo(e),u=c?No:Eo(t);l=l==Po?Ut:l,u=u==Po?Ut:u;var d=l==Ut,m=u==Ut,f=l==u;if(f&&To(e)){if(!To(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new $n),s||wg(e)?hg(e,t,n,o,i,a):yg(e,t,l,n,o,i,a);if(!(n&_g)){var p=d&&ko.call(e,"__wrapped__"),h=m&&ko.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,S=h?t.value():t;return a||(a=new $n),i(v,S,n,o,a)}}return f?(a||(a=new $n),vg(e,t,n,o,i,a)):!1}var bg=Cg,Ag=bg,xo=Oe;function Yi(e,t,n,o,i){return e===t?!0:e==null||t==null||!xo(e)&&!xo(t)?e!==e&&t!==t:Ag(e,t,n,o,Yi,i)}var Ki=Yi,Eg=hr,Ig=Ki,Tg=1,Pg=2;function Ng(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){c=n[i];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===void 0&&!(l in e))return!1}else{var m=new Eg;if(o)var f=o(u,d,l,e,t,m);if(!(f===void 0?Ig(d,u,Tg|Pg,o,m):f))return!1}}return!0}var kg=Ng,xg=be;function Ug(e){return e===e&&!xg(e)}var qi=Ug,$g=qi,Rg=ji;function Fg(e){for(var t=Rg(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,$g(i)]}return t}var Og=Fg;function Dg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Ji=Dg,Mg=kg,Bg=Og,Vg=Ji;function Lg(e){var t=Bg(e);return t.length==1&&t[0][2]?Vg(t[0][0],t[0][1]):function(n){return n===e||Mg(n,e,t)}}var zg=Lg,Gg=et,Wg=Oe,jg="[object Symbol]";function Hg(e){return typeof e=="symbol"||Wg(e)&&Gg(e)==jg}var Cr=Hg,Yg=Ae,Kg=Cr,qg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jg=/^\w*$/;function Zg(e,t){if(Yg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Kg(e)?!0:Jg.test(e)||!qg.test(e)||t!=null&&e in Object(t)}var br=Zg,Zi=gr,Qg="Expected a function";function Ar(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qg);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Ar.Cache||Zi),n}Ar.Cache=Zi;var Xg=Ar,eh=Xg,th=500;function nh(e){var t=eh(e,function(o){return n.size===th&&n.clear(),o}),n=t.cache;return t}var rh=nh,oh=rh,ih=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ah=/\\(\\)?/g,sh=oh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ih,function(n,o,i,a){t.push(i?a.replace(ah,"$1"):o||n)}),t}),ch=sh,Uo=pn,lh=Ui,uh=Ae,dh=Cr,fh=1/0,$o=Uo?Uo.prototype:void 0,Ro=$o?$o.toString:void 0;function Qi(e){if(typeof e=="string")return e;if(uh(e))return lh(e,Qi)+"";if(dh(e))return Ro?Ro.call(e):"";var t=e+"";return t=="0"&&1/e==-fh?"-0":t}var ph=Qi,mh=ph;function gh(e){return e==null?"":mh(e)}var hh=gh,yh=Ae,vh=br,wh=ch,_h=hh;function Sh(e,t){return yh(e)?e:vh(e,t)?[e]:wh(_h(e))}var vn=Sh,Ch=Cr,bh=1/0;function Ah(e){if(typeof e=="string"||Ch(e))return e;var t=e+"";return t=="0"&&1/e==-bh?"-0":t}var At=Ah,Eh=vn,Ih=At;function Th(e,t){t=Eh(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Ih(t[n++])];return n&&n==o?e:void 0}var Er=Th,Ph=Er;function Nh(e,t,n){var o=e==null?void 0:Ph(e,t);return o===void 0?n:o}var kh=Nh;function xh(e,t){return e!=null&&t in Object(e)}var Uh=xh,$h=vn,Rh=yr,Fh=Ae,Oh=hn,Dh=wr,Mh=At;function Bh(e,t,n){t=$h(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Mh(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Dh(i)&&Oh(s,i)&&(Fh(e)||Rh(e)))}var Vh=Bh,Lh=Uh,zh=Vh;function Gh(e,t){return e!=null&&zh(e,t,Lh)}var Wh=Gh,jh=Ki,Hh=kh,Yh=Wh,Kh=br,qh=qi,Jh=Ji,Zh=At,Qh=1,Xh=2;function ey(e,t){return Kh(e)&&qh(t)?Jh(Zh(e),t):function(n){var o=Hh(n,e);return o===void 0&&o===t?Yh(n,e):jh(t,o,Qh|Xh)}}var ty=ey;function ny(e){return e}var Ir=ny;function ry(e){return function(t){return t==null?void 0:t[e]}}var oy=ry,iy=Er;function ay(e){return function(t){return iy(t,e)}}var sy=ay,cy=oy,ly=sy,uy=br,dy=At;function fy(e){return uy(e)?cy(dy(e)):ly(e)}var py=fy,my=zg,gy=ty,hy=Ir,yy=Ae,vy=py;function wy(e){return typeof e=="function"?e:e==null?hy:typeof e=="object"?yy(e)?gy(e[0],e[1]):my(e):vy(e)}var _y=wy,Sy=Fe,Cy=function(){try{var e=Sy(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Xi=Cy,Fo=Xi;function by(e,t,n){t=="__proto__"&&Fo?Fo(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Tr=by,Ay=Tr,Ey=bt,Iy=Object.prototype,Ty=Iy.hasOwnProperty;function Py(e,t,n){var o=e[t];(!(Ty.call(e,t)&&Ey(o,n))||n===void 0&&!(t in e))&&Ay(e,t,n)}var ea=Py,Ny=ea,ky=vn,xy=hn,Oo=be,Uy=At;function $y(e,t,n,o){if(!Oo(e))return e;t=ky(t,e);for(var i=-1,a=t.length,s=a-1,c=e;c!=null&&++i<a;){var l=Uy(t[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=s){var d=c[l];u=o?o(d,l,c):void 0,u===void 0&&(u=Oo(d)?d:xy(t[i+1])?[]:{})}Ny(c,l,u),c=c[l]}return e}var Ry=$y,Fy=Er,Oy=Ry,Dy=vn;function My(e,t,n){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],c=Fy(e,s);n(c,s)&&Oy(a,Dy(s,e),c)}return a}var By=My,Vy=Wi,Ly=Vy(Object.getPrototypeOf,Object),Pr=Ly,zy=Mi,Gy=Pr,Wy=Li,jy=Vi,Hy=Object.getOwnPropertySymbols,Yy=Hy?function(e){for(var t=[];e;)zy(t,Wy(e)),e=Gy(e);return t}:jy,Ky=Yy;function qy(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Jy=qy,Zy=be,Qy=Sr,Xy=Jy,ev=Object.prototype,tv=ev.hasOwnProperty;function nv(e){if(!Zy(e))return Xy(e);var t=Qy(e),n=[];for(var o in e)o=="constructor"&&(t||!tv.call(e,o))||n.push(o);return n}var rv=nv,ov=Gi,iv=rv,av=yn;function sv(e){return av(e)?ov(e,!0):iv(e)}var Nr=sv,cv=Bi,lv=Ky,uv=Nr;function dv(e){return cv(e,uv,lv)}var fv=dv,pv=Ui,mv=_y,gv=By,hv=fv;function yv(e,t){if(e==null)return{};var n=pv(hv(e),function(o){return[o]});return t=mv(t),gv(e,n,function(o,i){return t(o,i[0])})}var vv=yv;const wv=xi(vv),_v=!0,Sv="",wn=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),Cv=(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:")}},bv=e=>{const{phone_number:t,...n}=wv(e,Cv);if(Jo(t)&&t!==Sv){const{country_code:o}=e;return{...n,phone_number:wn(o,t)}}return n},Av=(e,t,n)=>{const{password:o,...i}=t,a=bv(i),s={autoSignIn:_v,userAttributes:{...n==="phone_number"?{...a,phone_number:e}:a}};return{username:e,password:o,options:s}},Ev=({formValues:e,loginMechanisms:t})=>{const n=t[0];if(n==="phone_number"){const{country_code:o,phone_number:i}=e;return wn(o,i)}return e[n]},{assign:V}=Ai,Iv=V({actorDoneData:void 0}),Tv=V({challengeName:void 0}),Pv=V({missingAttributes:void 0}),Nv=V({remoteError:void 0}),kv=V({formValues:{}}),xv=V({touched:{}}),Uv=V({user:void 0}),$v=V({validationError:{}}),Rv=V({totpSecretCode:(e,{data:t})=>{var o;const{sharedSecret:n}=((o=t.nextStep)==null?void 0:o.totpSetupDetails)??{};return n}}),Fv=V({step:"SIGN_IN"}),Ov=V({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Dv=V({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Mv=V({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;return n==="CONFIRM_SIGN_IN_WITH_SMS_CODE"?"SMS_MFA":n==="CONFIRM_SIGN_IN_WITH_TOTP_CODE"?"SOFTWARE_TOKEN_MFA":void 0}}),Bv=V({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?wn(i,o):o}}),Vv=V({username:Ev}),Lv=V({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:o,country_code:i}=e;return n==="phone_number"?wn(i,o):o}}),zv=V({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),Gv=V({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),Wv=V({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),jv=V({missingAttributes:(e,{data:t})=>{var n;return(n=t.nextStep)==null?void 0:n.missingAttributes}}),Hv=V({validationError:(e,{data:t})=>t}),Yv=V({remoteError:(e,{data:t})=>t.name==="NoUserPoolError"?"Configuration error (see console) – please contact the administrator":(t==null?void 0:t.message)||t}),Kv=V({user:(e,{data:t})=>t}),Do=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),qv=V({codeDeliveryDetails:(e,{data:t})=>{var n;return(n=t==null?void 0:t.nextStep)!=null&&n.codeDeliveryDetails?Do(t.nextStep.codeDeliveryDetails):Do(t)}}),Jv=V({formValues:(e,{data:t})=>{const{name:n,value:o}=t;return{...e.formValues,[n]:o}}}),Zv=V({formValues:(e,{data:t})=>fs({...e.formValues,...t},"password")}),Qv=V({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Xv=V({unverifiedUserAttributes:(e,{data:t})=>{const{email:n,phone_number:o}=t;return{...n&&{email:n},...o&&{phone_number:o}}}}),ew=V({selectedUserAttribute:void 0}),tw=V({selectedUserAttribute:e=>{var t;return(t=e.formValues)==null?void 0:t.unverifiedAttr}}),nw=V({step:"CONFIRM_SIGN_UP"}),Et={clearActorDoneData:Iv,clearChallengeName:Tv,clearError:Nv,clearFormValues:kv,clearMissingAttributes:Pv,clearSelectedUserAttribute:ew,clearTouched:xv,clearUser:Uv,clearValidationError:$v,handleBlur:Qv,handleInput:Jv,handleSubmit:Zv,setChallengeName:Mv,setCodeDeliveryDetails:qv,setFieldErrors:Hv,setMissingAttributes:jv,setNextResetPasswordStep:Wv,setNextSignInStep:zv,setNextSignUpStep:Gv,setRemoteError:Yv,setConfirmAttributeCompleteStep:Dv,setConfirmSignUpSignUpStep:nw,setShouldVerifyUserAttributeStep:Ov,setSelectedUserAttribute:tw,setSignInStep:Fv,setTotpSecretCode:Rv,setUser:Kv,setUnverifiedUserAttributes:Xv,setUsernameForgotPassword:Bv,setUsernameSignIn:Lv,setUsernameSignUp:Vv},rw=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE"],ow=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",iw=(e,{data:t})=>{var n;return((n=t==null?void 0:t.nextStep)==null?void 0:n.signInStep)==="RESET_PASSWORD"},aw=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="CONFIRM_SIGN_UP",sw=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",cw=(e,{data:t})=>(t==null?void 0:t.nextStep.signInStep)==="DONE",lw=(e,{data:t})=>(t==null?void 0:t.nextStep.signUpStep)==="DONE",uw=(e,{data:t})=>(t==null?void 0:t.nextStep.resetPasswordStep)==="DONE",dw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_COMPLETE",fw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",pw=(e,{data:t})=>(t==null?void 0:t.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",mw=(e,{data:t})=>(t==null?void 0:t.step)==="RESET_PASSWORD",gw=(e,{data:t})=>(t==null?void 0:t.step)==="CONFIRM_SIGN_UP",hw=({step:e})=>rw.includes(e),yw=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",vw=({step:e})=>e==="RESET_PASSWORD",ww=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",_w=({step:e})=>e==="CONFIRM_SIGN_UP",Sw=(e,{data:t})=>{const{phone_number_verified:n,email_verified:o}=t;return(o===void 0||o==="false")&&(n===void 0||n==="false")},Cw=(e,{data:t})=>t.message==="User is already confirmed.",_n={hasCompletedAttributeConfirmation:dw,hasCompletedResetPassword:uw,hasCompletedSignIn:cw,hasCompletedSignUp:lw,isConfirmSignUpStep:gw,isConfirmUserAttributeStep:fw,isResetPasswordStep:mw,isShouldConfirmUserAttributeStep:pw,isUserAlreadyConfirmed:Cw,shouldAutoSignIn:sw,shouldConfirmResetPassword:ww,shouldConfirmSignIn:hw,shouldConfirmSignInWithNewPassword:ow,shouldConfirmSignUp:_w,shouldConfirmSignUpFromSignIn:aw,shouldResetPassword:vw,shouldResetPasswordFromSignIn:iw,shouldSetupTotp:yw,shouldVerifyAttribute:Sw};var bw=Tr,Aw=bt;function Ew(e,t,n){(n!==void 0&&!Aw(e[t],n)||n===void 0&&!(t in e))&&bw(e,t,n)}var ta=Ew;function Iw(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),c=s.length;c--;){var l=s[e?c:++i];if(n(a[l],l,a)===!1)break}return t}}var Tw=Iw,Pw=Tw,Nw=Pw(),kw=Nw,Qt={exports:{}};Qt.exports;(function(e,t){var n=ge,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var m=u.length,f=c?c(m):new u.constructor(m);return u.copy(f),f}e.exports=l})(Qt,Qt.exports);var xw=Qt.exports,Mo=Di;function Uw(e){var t=new e.constructor(e.byteLength);return new Mo(t).set(new Mo(e)),t}var $w=Uw,Rw=$w;function Fw(e,t){var n=t?Rw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ow=Fw;function Dw(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Mw=Dw,Bw=be,Bo=Object.create,Vw=function(){function e(){}return function(t){if(!Bw(t))return{};if(Bo)return Bo(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Lw=Vw,zw=Lw,Gw=Pr,Ww=Sr;function jw(e){return typeof e.constructor=="function"&&!Ww(e)?zw(Gw(e)):{}}var Hw=jw,Yw=yn,Kw=Oe;function qw(e){return Kw(e)&&Yw(e)}var Jw=qw,Zw=et,Qw=Pr,Xw=Oe,e_="[object Object]",t_=Function.prototype,n_=Object.prototype,na=t_.toString,r_=n_.hasOwnProperty,o_=na.call(Object);function i_(e){if(!Xw(e)||Zw(e)!=e_)return!1;var t=Qw(e);if(t===null)return!0;var n=r_.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&na.call(n)==o_}var a_=i_;function s_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ra=s_,c_=ea,l_=Tr;function u_(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;l===void 0&&(l=e[c]),i?l_(n,c,l):c_(n,c,l)}return n}var d_=u_,f_=d_,p_=Nr;function m_(e){return f_(e,p_(e))}var g_=m_,Vo=ta,h_=xw,y_=Ow,v_=Mw,w_=Hw,Lo=yr,zo=Ae,__=Jw,S_=vr,C_=pr,b_=be,A_=a_,E_=_r,Go=ra,I_=g_;function T_(e,t,n,o,i,a,s){var c=Go(e,n),l=Go(t,n),u=s.get(l);if(u){Vo(e,n,u);return}var d=a?a(c,l,n+"",e,t,s):void 0,m=d===void 0;if(m){var f=zo(l),p=!f&&S_(l),h=!f&&!p&&E_(l);d=l,f||p||h?zo(c)?d=c:__(c)?d=v_(c):p?(m=!1,d=h_(l,!0)):h?(m=!1,d=y_(l,!0)):d=[]:A_(l)||Lo(l)?(d=c,Lo(c)?d=I_(c):(!b_(c)||C_(c))&&(d=w_(l))):m=!1}m&&(s.set(l,d),i(d,l,o,a,s),s.delete(l)),Vo(e,n,d)}var P_=T_,N_=hr,k_=ta,x_=kw,U_=P_,$_=be,R_=Nr,F_=ra;function oa(e,t,n,o,i){e!==t&&x_(t,function(a,s){if(i||(i=new N_),$_(a))U_(e,t,s,n,oa,o,i);else{var c=o?o(F_(e,s),a,s+"",e,t,i):void 0;c===void 0&&(c=a),k_(e,s,c)}},R_)}var O_=oa;function D_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var M_=D_,B_=M_,Wo=Math.max;function V_(e,t,n){return t=Wo(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Wo(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(s),B_(e,this,c)}}var L_=V_;function z_(e){return function(){return e}}var G_=z_,W_=G_,jo=Xi,j_=Ir,H_=jo?function(e,t){return jo(e,"toString",{configurable:!0,enumerable:!1,value:W_(t),writable:!0})}:j_,Y_=H_,K_=800,q_=16,J_=Date.now;function Z_(e){var t=0,n=0;return function(){var o=J_(),i=q_-(o-n);if(n=o,i>0){if(++t>=K_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Q_=Z_,X_=Y_,eS=Q_,tS=eS(X_),nS=tS,rS=Ir,oS=L_,iS=nS;function aS(e,t){return iS(oS(e,t,rS),e+"")}var sS=aS,cS=bt,lS=yn,uS=hn,dS=be;function fS(e,t,n){if(!dS(n))return!1;var o=typeof t;return(o=="number"?lS(n)&&uS(t,n.length):o=="string"&&t in n)?cS(n[t],e):!1}var pS=fS,mS=sS,gS=pS;function hS(e){return mS(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&gS(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var c=n[o];c&&e(t,c,o,a)}return t})}var yS=hS,vS=O_,wS=yS,_S=wS(function(e,t,n){vS(e,t,n)}),SS=_S;const CS=xi(SS),Sn=async(e,t,n,o)=>{const i=await Promise.all(o.map(s=>s(e,t,n))),a=CS({},...i);return Zo(a)?Promise.resolve():Promise.reject(a)},bS=8,AS=e=>Array.isArray(e),ES=e=>{if(e)return AS(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},ke={async getAmplifyConfig(){var c,l,u,d;const e=Ua.Amplify.getConfig(),t=(c=e.Auth)==null?void 0:c.Cognito,{loginWith:n,userAttributes:o}=((l=e.Auth)==null?void 0:l.Cognito)??{},i=n?Object.entries(n).filter(([m,f])=>m!=="oauth").filter(([m,f])=>!!f).map(m=>m[0]==="phone"?"phone_number":m[0]):void 0,a=ES(o),s=(u=n==null?void 0:n.oauth)!=null&&u.providers?(d=n.oauth.providers)==null?void 0:d.map(m=>m.toString().toLowerCase()):void 0;return{...t,loginMechanisms:i,signUpAttributes:a,socialProviders:s}},getCurrentUser:H.getCurrentUser,handleSignIn:H.signIn,handleSignUp:H.signUp,handleConfirmSignIn:H.confirmSignIn,handleConfirmSignUp:H.confirmSignUp,handleForgotPasswordSubmit:H.confirmResetPassword,handleForgotPassword:H.resetPassword,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){const{password:o}=e,{password:i}=t;if(!i||!n)return null;const a=[],s=n.minLength??bS;return o.length<s&&a.push(`Password must have at least ${s} characters`),n.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!us(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:o}=e,{confirm_password:i,password:a}=t;if(!n&&!o)return null;if((n||o)&&n!==o&&(i&&a||(n==null?void 0:n.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){}};function IS({services:e}){return Qe({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:un()},guards:_n,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:o,password:i}=t;return e.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:n})},validateFields(t){return Sn(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const ia=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),$t={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"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},TS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}};function PS({services:e}){return Qe({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:ia("signIn"),fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...TS}},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",...$t}}}},confirmSignIn:{initial:"edit",exit:["clearChallengeName","clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignIn",...$t}}}},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",...$t}}}}}},setupTotp:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],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",...$t}}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Et,sendUpdate:un()},guards:_n,services:{async fetchUserAttributes(){return H.fetchUserAttributes()},resetPassword({username:t}){return H.resetPassword({username:t})},handleResendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},handleSignIn({formValues:t,username:n}){const{password:o}=t;return e.handleSignIn({username:n,password:o})},confirmSignIn({formValues:t}){const{confirmation_code:n}=t;return e.handleConfirmSignIn({challengeResponse:n})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:o,country_code:i,confirm_password:a,...s}=t,c;o&&(c=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),s={...s,phone_number:c});const l={challengeResponse:n,options:{userAttributes:s}};return H.confirmSignIn(l)},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},async validateFields(t){return Sn(t.formValues,t.touched,t.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const NS={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},kS={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"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}},xS={onDone:[{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}};function US({services:e}){return Qe({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...kS}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",...xS}},federatedSignIn:ia("signUp"),resetPassword:{invoke:{src:"resetPassword",...NS}},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})}}},{actions:{...Et,sendUpdate:un()},guards:_n,services:{autoSignIn(){return H.autoSignIn()},async fetchUserAttributes(){return H.fetchUserAttributes()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:o}=t,i={username:n,confirmationCode:o};return e.handleConfirmSignUp(i)},resendSignUpCode({username:t}){return H.resendSignUpCode({username:t})},signInWithRedirect(t,{data:n}){return H.signInWithRedirect(n)},handleSignUp(t){const{formValues:n,loginMechanisms:o,username:i}=t,a=o[0],s=Av(i,n,a);return e.handleSignUp(s)},async validateSignUp(t){return Sn(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateCustomSignUp])}}})}const $S=()=>Qe({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:()=>H.signOut()}});function RS(){return Qe({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:un()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){const t={userAttributeKey:e};return H.sendUserAttributeVerificationCode(t)},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){const n={confirmationCode:e,userAttributeKey:t};return H.confirmUserAttribute(n)},async validateFields(e){return Sn(e.formValues,e.touched,e.passwordSettings,[ke.validateFormPassword,ke.validateConfirmPassword])}}})}const Rt=(e,t)=>{var n,o,i,a,s,c;return{...e.actorDoneData,step:((n=e==null?void 0:e.actorDoneData)==null?void 0:n.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:(c=e.config)==null?void 0:c.socialProviders}},{choose:FS,stop:OS}=Ai,lt=e=>OS(e),DS={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},MS={always:{actions:"configure",target:"getConfig"}};function BS(e){const{useNextWaitConfig:t,...n}={};return Qe({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?MS:DS,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:lt("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:lt("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:lt("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:lt("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:lt("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:FS([{cond:"hasActor",actions:fl(({actorRef:i})=>i)}]),setActorDoneData:_e({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes})}),applyAmplifyConfig:_e({config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:c=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:u,formFields:d,passwordSettings:m=a.passwordFormat??{}}=i.config;return s.length===0&&s.push("username"),{formFields:VS(d)??{},initialState:u,loginMechanisms:s,passwordSettings:m,signUpAttributes:c,socialProviders:l}}}),spawnSignInActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=PS({services:s}).withContext(Rt(i,"SIGN_IN"));return at(c,{name:"signInActor"})}}),spawnSignUpActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=US({services:s}).withContext(Rt(i,"SIGN_UP"));return at(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:_e({actorRef:(i,a)=>{const{services:s}=i,c=IS({services:s}).withContext(Rt(i,"FORGOT_PASSWORD"));return at(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_e({actorRef:i=>{const a=RS().withContext(Rt(i));return at(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_e({actorRef:i=>{const a=$S().withContext({user:i==null?void 0:i.user});return at(a,{name:"signOutActor"})}}),configure:_e((i,a)=>{const{services:s,...c}=ja(n)?a.data??{}:n;return{services:{...ke,...s},config:c}}),setHasSetup:_e({hasSetup:!0})},guards:{..._n,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 VS(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let o=e[t][n];o.required=o.isRequired})}),e}const Q={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",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",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"},LS=({componentName:e,packageName:t,version:n})=>{const o=[`ui-${t}`,n];switch(e){case"Authenticator":{B.setCustomUserAgent({...Da,additionalDetails:[[e],o]});break}case"ChangePassword":case"DeleteUser":{B.setCustomUserAgent({...Oa,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{B.setCustomUserAgent({...Ma,additionalDetails:[[e],o]});break}case"InAppMessaging":{B.setCustomUserAgent({...Ba,additionalDetails:[[e],o]});break}case"LocationSearch":{B.setCustomUserAgent({...Va,additionalDetails:[[e],o]});break}case"MapView":{B.setCustomUserAgent({...La,additionalDetails:[[e],o]});break}case"StorageManager":{B.setCustomUserAgent({...za,additionalDetails:[[e],o]});break}}return Ya},zS={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},GS={class:"amplify-flex amplify-authenticator__icon-wrapper"},WS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),jS=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1),he=r.defineComponent({__name:"base-alert",setup(e){const t=r.ref(!0),n=T("Dismiss alert");function o(){t.value=!1}return(i,a)=>{const s=re;return t.value?(r.openBlock(),r.createElementBlock("div",zS,[r.createElementVNode("div",GS,[WS,r.createElementVNode("div",null,[r.renderSlot(i.$slots,"default")])]),r.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":r.unref(n),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:r.withCtx(()=>[jS]),_:1},8,["aria-label"])])):r.createCommentVNode("",!0)}}}),ye=r.defineComponent({__name:"base-field-set",setup(e){const t=r.useSlots();return(n,o)=>r.renderSlot(n.$slots,"fieldSetI",r.mergeProps(n.$attrs,{slotData:r.unref(t).default&&r.unref(t).default()}),()=>[r.createElementVNode("fieldset",r.mergeProps(n.$attrs,{"data-amplify-fieldset":""}),[r.renderSlot(n.$slots,"default")],16)])}});function HS(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function aa(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...a)=>(t+=1,n||(o=r.effectScope(!0),n=o.run(()=>e(...a))),HS(i),n)}function YS(e){return"state"in e}var Ho=function(){};function KS(e){return"getSnapshot"in e?e.getSnapshot():YS(e)?e.state:void 0}function qS(e,t){t===void 0&&(t=KS);var n=r.isRef(e)?e:r.shallowRef(e),o=r.shallowRef(t(n.value)),i=function(a){n.value.send(a)};return r.watch(n,function(a,s,c){o.value=t(a);var l=a.subscribe({next:function(u){return o.value=u},error:Ho,complete:Ho}).unsubscribe;c(function(){return l()})},{immediate:!0}),{state:o,send:i}}const JS=e=>{var t,n,o;return{...(o=(n=(t=or(e))==null?void 0:t.formFields)==null?void 0:n.setupTotp)==null?void 0:o.QR}},kr=aa(()=>{const e=BS(),t=ki(e).start(),n=r.ref("configuring"),{state:o,send:i}=qS(t),a=()=>{n.value="authenticated"},s=()=>{n.value="unauthenticated"},c=Ka(t,(l,u)=>Qo(l,u,{onSignIn:a,onSignOut:s}));return H.getCurrentUser().then(()=>{n.value="authenticated"}).catch(()=>{n.value="unauthenticated"}),r.onScopeDispose(()=>{c()}),{authStatus:n,service:t,send:i,state:o}}),ee=aa(()=>{const{authStatus:e,state:t,send:n}=kr(),o=r.reactive({});return r.watchEffect(()=>{const i=es({send:n,state:t.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?JS(t.value):null;o.QRFields=a,o.authStatus=e.value,o.send=n,o.state=t}),o});let ZS=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=n[e]&63;o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o<63?t+="_":t+="-"}return t};const Cn=r.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(e,{emit:t}){const n=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(r.openBlock(),r.createElementBlock("input",{onChange:i[0]||(i[0]=a=>n(a)),"data-amplify-input":""},null,32))}}),QS={},XS={"data-amplify-label":""};function eC(e,t){return r.openBlock(),r.createElementBlock("label",XS,[r.renderSlot(e.$slots,"default")])}const bn=tn(QS,[["render",eC]]),tC=["aria-label","aria-checked"],nC=r.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1),rC=[nC],oC=r.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),iC=r.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1),aC=[oC,iC],sC={inheritAttrs:!1},xr=r.defineComponent({...sC,__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,n=T("Show password"),o=T("Hide password"),i=r.ref("password"),a=r.ref(n),s=Math.floor(Math.random()*999999),{name:c,label:l,autocomplete:u,hasError:d,labelHidden:m,placeholder:f,required:p}=r.toRefs(t),h=r.ref("");function v(){a.value=a.value===n?o:n,i.value=i.value==="password"?"text":"password"}const S=T((f==null?void 0:f.value)??l.value),g=T(l.value);return(w,y)=>{const _=bn,b=Cn,A=X;return r.openBlock(),r.createBlock(A,{class:r.normalizeClass([r.unref(Q).Flex,r.unref(Q).Field,r.unref(Q).TextField,r.unref(Q).PasswordField])},{default:r.withCtx(()=>[r.createVNode(_,{class:r.normalizeClass(["amplify-label",{"amplify-visually-hidden":r.unref(m)}]),for:"amplify-field-"+r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(g)),1)]),_:1},8,["class","for"]),r.createVNode(A,{class:r.normalizeClass([r.unref(Q).Flex,r.unref(Q).FieldGroup])},{default:r.withCtx(()=>[r.createVNode(A,{class:r.normalizeClass(r.unref(Q).FieldGroupFieldWrapper)},{default:r.withCtx(()=>[r.createVNode(b,r.mergeProps(w.$attrs,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=E=>h.value=E),class:[r.unref(Q).Input,r.unref(Q).FieldGroupControl],id:"amplify-field-"+r.unref(s),"data-amplify-password":"true",name:r.unref(c),autocomplete:r.unref(u),required:r.unref(p)??!0,placeholder:r.unref(S),type:i.value,"aria-invalid":r.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"]),r.createVNode(A,{class:r.normalizeClass(r.unref(Q).FieldGroupOuterEnd)},{default:r.withCtx(()=>[r.createElementVNode("button",{"aria-label":a.value,"aria-checked":i.value!=="password",class:r.normalizeClass([r.unref(Q).Button,r.unref(Q).FieldGroupControl,r.unref(Q).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:v},[i.value==="password"?(r.openBlock(),r.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(Q).Icon)},rC,2)):(r.openBlock(),r.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:r.normalizeClass(r.unref(Q).Icon)},aC,2))],10,tC)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),cC=["value","selected"],lC=r.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:null},emits:["update:selectValue"],setup(e,{emit:t}){const n=e,{options:o,selectValue:i}=r.toRefs(n),a=s=>{t("update:selectValue",s.target.value)};return(s,c)=>(r.openBlock(),r.createElementBlock("select",{onChange:c[0]||(c[0]=l=>a(l))},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),(l,u)=>(r.openBlock(),r.createElementBlock("option",{key:u,value:l,selected:l==r.unref(i)?!0:void 0},r.toDisplayString(l),9,cC))),128))],32))}}),uC=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[r.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1),dC=r.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:null,dialCodeList:null,type:{default:"text"},hasError:{type:Boolean},describedBy:null},setup(e){const t=e,{label:n,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:c,dialCode:l,dialCodeList:u}=r.toRefs(t),d=Math.floor(Math.random()*999999),m=Math.floor(Math.random()*999999);return(f,p)=>{const h=bn,v=lC,S=X,g=Cn;return r.openBlock(),r.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:r.withCtx(()=>[r.createVNode(h,r.mergeProps({for:"amplify-field-"+r.unref(d),class:["amplify-label",{"amplify-visually-hidden":r.unref(s)}]},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)),1)]),_:1},16,["for","class"]),r.createVNode(S,{class:"amplify-flex amplify-field-group"},{default:r.withCtx(()=>[r.createVNode(S,{class:"amplify-field-group__outer-start"},{default:r.withCtx(()=>[e.type==="tel"?(r.openBlock(),r.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(h,r.mergeProps({for:"amplify-field-"+r.unref(m),class:"amplify-label amplify-visually-hidden"},f.$attrs),{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString("Country Code"))]),_:1},16,["for"]),r.createVNode(S,{class:"amplify-select__wrapper"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+r.unref(m),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:r.unref(u),"select-value":r.unref(l)},null,8,["id","options","select-value"]),r.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:r.withCtx(()=>[uC]),_:1})]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:r.withCtx(()=>[r.createVNode(g,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+r.unref(d),autocomplete:r.unref(a),name:r.unref(o),required:r.unref(c)??!0,type:e.type,placeholder:r.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})}}}),fC=["id"],sa=r.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(e){const t=e,{name:n,formField:o}=r.toRefs(t),{validationErrors:i}=r.toRefs(ee()),{type:a}=o.value,s=a==="password",c=ZS(12),l=r.computed(()=>is(i.value[n.value])),u=r.computed(()=>{var m;return((m=l.value)==null?void 0:m.length)>0}),d=r.computed(()=>u.value?c:void 0);return(m,f)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s?(r.openBlock(),r.createBlock(xr,{key:0,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,hasError:r.unref(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(r.openBlock(),r.createBlock(dC,{key:1,name:r.unref(n),label:r.unref(o).label,placeholder:r.unref(o).placeholder,required:r.unref(o).isRequired,"label-hidden":r.unref(o).labelHidden,autocomplete:r.unref(o).autocomplete,"dial-code":r.unref(o).dialCode,"dial-code-list":r.unref(o).dialCodeList,type:r.unref(o).type,hasError:r.unref(u),describedBy:r.unref(d)},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),r.unref(u)?(r.openBlock(),r.createElementBlock("div",{key:2,id:r.unref(d)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l),(p,h)=>(r.openBlock(),r.createElementBlock("p",{key:h,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},r.toDisplayString(r.unref(T)(p)),1))),128))],8,fC)):r.createCommentVNode("",!0)],64))}}),ve=r.defineComponent({__name:"base-form-fields",props:{route:null},setup(e){const t=e,{route:n}=r.toRefs(t),{state:o}=kr();let i=[];return r.onBeforeMount(()=>{i=pc(n.value,o.value)}),(a,s)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i),([c,l])=>(r.openBlock(),r.createBlock(sa,{name:c,key:c,formField:l},null,8,["name","formField"]))),128))}}),Ft=r.defineComponent({__name:"federated-sign-in-button",props:{provider:null},setup(e){const t=e,{provider:n}=r.toRefs(t),{toFederatedSignIn:o}=ee(),i=()=>{o({provider:n.value})};return(a,s)=>{const c=re;return r.openBlock(),r.createBlock(c,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3})}}}),pC=r.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[r.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1),mC={class:"amplify-text"},gC=r.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[r.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1),hC={class:"amplify-text"},yC=r.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[r.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1),vC={class:"amplify-text"},wC=r.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[r.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),r.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),r.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),r.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1),_C={class:"amplify-text"},SC=["data-label"],An=r.defineComponent({__name:"federated-sign-in",setup(e){const t=ee(),{route:n,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"),c=o==null?void 0:o.includes("google"),l=s||c||i||a,{getSignInWithFederationText:u,getOrText:d}=ce,m=r.computed(()=>Bn),f=r.computed(()=>u(n,"amazon")),p=r.computed(()=>u(n,"apple")),h=r.computed(()=>u(n,"facebook")),v=r.computed(()=>u(n,"google")),S=r.computed(()=>d());return(g,w)=>{const y=X;return r.unref(l)?(r.openBlock(),r.createBlock(y,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(Ft,{key:0,provider:r.unref(m).Amazon},{default:r.withCtx(()=>[pC,r.createElementVNode("span",mC,r.toDisplayString(r.unref(f)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(a)?(r.openBlock(),r.createBlock(Ft,{key:1,provider:r.unref(m).Apple},{default:r.withCtx(()=>[gC,r.createElementVNode("span",hC,r.toDisplayString(r.unref(p)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(s)?(r.openBlock(),r.createBlock(Ft,{key:2,provider:r.unref(m).Facebook},{default:r.withCtx(()=>[yC,r.createElementVNode("span",vC,r.toDisplayString(r.unref(h)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.unref(c)?(r.openBlock(),r.createBlock(Ft,{key:3,provider:r.unref(m).Google},{default:r.withCtx(()=>[wC,r.createElementVNode("span",_C,r.toDisplayString(r.unref(v)),1)]),_:1},8,["provider"])):r.createCommentVNode("",!0),r.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":r.unref(S)},null,8,SC)]),_:1})):r.createCommentVNode("",!0)}}}),CC=r.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1),bC={"data-amplify-footer":""},Ur=r.defineComponent({__name:"sign-in",setup(e){const t=ee(),{submitForm:n,updateForm:o,toForgotPassword:i}=t,{error:a,isPending:s}=r.toRefs(t),{getForgotPasswordText:c,getSignInText:l,getSigningInText:u}=ce,d=r.computed(()=>c()),m=r.computed(()=>l()),f=r.computed(()=>u()),p=S=>{const{name:g,value:w}=S.target;o({name:g,value:w})},h=S=>{n(me(S))},v=()=>{i()};return(S,g)=>{const w=ye,y=he,_=re,b=X,A=pe,E=fe;return r.renderSlot(S.$slots,"signInSlotI",r.normalizeProps(r.guardReactiveProps(S.$attrs)),()=>[r.renderSlot(S.$slots,"header"),r.createVNode(b,r.normalizeProps(r.guardReactiveProps(S.$attrs)),{default:r.withCtx(()=>[r.createVNode(A,{"data-amplify-authenticator-signin":"",onInput:p,onSubmit:r.withModifiers(h,["prevent"]),method:"post"},{formt:r.withCtx(({slotData:I})=>[r.renderSlot(S.$slots,"form",{info:I,onSignInSubmit:h,onInput:p,onForgotPasswordClicked:v})]),default:r.withCtx(()=>[r.createVNode(An),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(w,{disabled:r.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:r.withCtx(({slotData:I})=>[r.renderSlot(S.$slots,"signin-fields",{info:I})]),default:r.withCtx(()=>[CC,r.createVNode(ve,{route:"signIn"})]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(y,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(_,{disabled:r.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(s)?r.unref(f):r.unref(m)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(E,null,{default:r.withCtx(()=>[r.renderSlot(S.$slots,"footer",{},()=>[r.createElementVNode("div",bC,[r.createVNode(_,{onClick:v,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(d)),1)]),_:1})])])]),_:3})])}}}),$r=r.defineComponent({__name:"authenticator-sign-up-form-fields",setup(e){return(t,n)=>(r.openBlock(),r.createBlock(ve,{route:"signUp"}))}}),Rr=r.defineComponent({__name:"sign-up",setup(e){const t=ee(),{submitForm:n,updateBlur:o,updateForm:i}=t,{error:a,hasValidationErrors:s,isPending:c}=r.toRefs(t),{getCreateAccountText:l}=ce,u=r.computed(()=>l()),d=p=>{const{checked:h,name:v,type:S,value:g}=p.target;i({name:v,value:S==="checkbox"&&!h?void 0:g})};function m(p){const{name:h}=p.target;o({name:h})}const f=p=>{n(me(p))};return(p,h)=>{const v=ye,S=he,g=re,w=X,y=pe,_=fe;return r.renderSlot(p.$slots,"signUpSlotI",r.normalizeProps(r.guardReactiveProps(p.$attrs)),()=>[r.renderSlot(p.$slots,"header"),r.createVNode(w,r.normalizeProps(r.guardReactiveProps(p.$attrs)),{default:r.withCtx(()=>[r.createVNode(y,{onInput:d,onBlurCapture:m,onSubmit:r.withModifiers(f,["prevent"])},{default:r.withCtx(()=>[r.createVNode(An),r.createVNode(w,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(v,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(c)},{fieldSetI:r.withCtx(({slotData:b})=>[r.renderSlot(p.$slots,"signup-fields",{info:b})]),default:r.withCtx(()=>[r.createVNode($r)]),_:3},8,["disabled"]),r.unref(a)?(r.openBlock(),r.createBlock(S,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(g,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:r.unref(c)||r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(u)),1)]),_:1},8,["disabled"])]),_:3})]),_:3},8,["onSubmit"])]),_:3},16),r.createVNode(_,null,{default:r.withCtx(()=>[r.renderSlot(p.$slots,"footer")]),_:3})])}}}),AC={};function EC(e,t){const n=X;return r.openBlock(),r.createBlock(n,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:r.withCtx(()=>[r.createVNode(n,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"default")]),_:3})]),_:3})}const IC=tn(AC,[["render",EC]]),TC=["tabindex","aria-selected","id","aria-controls"],PC=r.defineComponent({__name:"base-two-tab-item",props:{label:null,id:null,active:{type:Boolean,default:!1}},setup(e){const t=e,{active:n,id:o,label:i}=r.toRefs(t);return(a,s)=>(r.openBlock(),r.createElementBlock("button",{tabindex:r.unref(n)?0:-1,"aria-selected":r.unref(n)?"true":"false",class:r.normalizeClass([{"amplify-tabs__item--active":r.unref(n)},"amplify-tabs__item"]),id:`${r.unref(o)}-tab`,"aria-controls":`${r.unref(o)}-panel`,role:"tab"},r.toDisplayString(r.unref(i)),11,TC))}}),NC="4.2.21",kC={};function xC(e,t){return r.renderSlot(e.$slots,"textI",r.normalizeProps(r.guardReactiveProps(e.$attrs)),()=>[r.createElementVNode("span",r.mergeProps(e.$attrs,{"data-amplify-text":""}),[r.renderSlot(e.$slots,"default")],16)])}const ca=tn(kC,[["render",xC]]),xe=r.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n}){var s,c;const o=t.default?t.default():[],i=t.headingI?t.headingI():[],a=`${n.class||""} amplify-heading--${e.level}`;if(((c=(s=i[0])==null?void 0:s.children)==null?void 0:c.length)===0)i[0].children=[r.h(`h${e.level}`,{...n,class:a},[o])];else return()=>r.h(`h${e.level}`,{"data-amplify-heading":"",...n,class:a},[i[0]?r.h(i[0].children[0]):r.h(o[0])]);return()=>i}}),Fr=r.defineComponent({__name:"confirm-sign-up",setup(e){const t=ee(),{codeDeliveryDetails:n,error:o,isPending:i}=r.toRefs(t),{resendCode:a,submitForm:s,updateForm:c}=t,{getDeliveryMethodText:l,getDeliveryMessageText:u,getResendCodeText:d,getConfirmText:m}=ce,f=r.computed(()=>l(n.value)),p=r.computed(()=>d()),h=r.computed(()=>m()),v=r.computed(()=>u(n.value)),S=_=>{const{name:b,value:A}=_.target;c({name:b,value:A})},g=_=>{w(_)},w=_=>{s(me(_))},y=()=>{a()};return(_,b)=>{const A=xe,E=ca,I=ye,P=he,N=re,k=fe,x=X,$=pe;return r.renderSlot(_.$slots,"confirmSignUpSlotI",r.normalizeProps(r.guardReactiveProps(_.$attrs)),()=>[r.createVNode(x,r.normalizeProps(r.guardReactiveProps(_.$attrs)),{default:r.withCtx(()=>[r.createVNode($,{onInput:S,onSubmit:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createVNode(x,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.renderSlot(_.$slots,"header",{},()=>[r.createVNode(A,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(E,{class:"amplify-authenticator__subtitle"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(v)),1)]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createVNode(ve,{route:"confirmSignUp"})]),_:1},8,["disabled"]),r.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createBlock(P,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(o))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:r.unref(i)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(N,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(y,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(_.$slots,"footer")]),_:3})]),_:3})]),_:3},8,["onSubmit"])]),_:3},16)])}}}),Or=r.defineComponent({__name:"confirm-sign-in",setup(e){const t=ee(),{submitForm:n,toSignIn:o,updateForm:i}=t,{error:a,isPending:s,challengeName:c}=r.toRefs(t),l=r.computed(()=>c.value),{getBackToSignInText:u,getConfirmText:d,getChallengeText:m}=ce,f=r.computed(()=>m(l.value)),p=r.computed(()=>u()),h=r.computed(()=>d()),v=w=>{const{name:y,value:_}=w.target;i({name:y,value:_})},S=w=>{n(me(w))},g=()=>{o()};return(w,y)=>{const _=xe,b=X,A=he,E=re,I=fe,P=ye,N=pe;return r.renderSlot(w.$slots,"confirmSignInSlotI",r.normalizeProps(r.guardReactiveProps(w.$attrs)),()=>[r.createVNode(b,r.normalizeProps(r.guardReactiveProps(w.$attrs)),{default:r.withCtx(()=>[r.createVNode(N,{"data-amplify-authenticator-confirmsignin":"",onInput:v,onSubmit:r.withModifiers(S,["prevent"])},{default:r.withCtx(()=>[r.createVNode(P,{class:"amplify-flex amplify-authenticator__column",disabled:r.unref(s)},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"header",{},()=>[r.createVNode(_,{level:3,class:"amplify-heading"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(f)),1)]),_:1})]),r.createVNode(b,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.createVNode(ve,{route:"confirmSignIn"})]),_:1}),r.createVNode(I,{class:"amplify-flex amplify-authenticator__column"},{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(A,{key:0},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(T)(r.unref(a))),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:r.unref(s)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(h)),1)]),_:1},8,["disabled"]),r.createVNode(E,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:r.withModifiers(g,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(p)),1)]),_:1},8,["onClick"]),r.renderSlot(w.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3},8,["onSubmit"])]),_:3},16)])}}});var It={},UC=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},la={},ae={};let Dr;const $C=[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];ae.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};ae.getSymbolTotalCodewords=function(t){return $C[t]};ae.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};ae.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Dr=t};ae.isKanjiModeEnabled=function(){return typeof Dr<"u"};ae.toSJIS=function(t){return Dr(t)};var En={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.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: "+n)}}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}}})(En);function ua(){this.buffer=[],this.length=0}ua.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 n=0;n<t;n++)this.putBit((e>>>t-n-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 RC=ua;function Tt(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)}Tt.prototype.set=function(e,t,n,o){const i=e*this.size+t;this.data[i]=n,o&&(this.reservedBit[i]=!0)};Tt.prototype.get=function(e,t){return this.data[e*this.size+t]};Tt.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};Tt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var FC=Tt,da={};(function(e){const t=ae.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,c=[a-7];for(let l=1;l<i-1;l++)c[l]=c[l-1]-s;return c.push(6),c.reverse()},e.getPositions=function(o){const i=[],a=e.getRowColCoords(o),s=a.length;for(let c=0;c<s;c++)for(let l=0;l<s;l++)c===0&&l===0||c===0&&l===s-1||c===s-1&&l===0||i.push([a[c],a[l]]);return i}})(da);var fa={};const OC=ae.getSymbolSize,Yo=7;fa.getPositions=function(t){const n=OC(t);return[[0,0],[n-Yo,0],[0,n-Yo]]};var pa={};(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,c=0,l=0,u=null,d=null;for(let m=0;m<a;m++){c=l=0,u=d=null;for(let f=0;f<a;f++){let p=i.get(m,f);p===u?c++:(c>=5&&(s+=t.N1+(c-5)),u=p,c=1),p=i.get(f,m),p===d?l++:(l>=5&&(s+=t.N1+(l-5)),d=p,l=1)}c>=5&&(s+=t.N1+(c-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(i){const a=i.size;let s=0;for(let c=0;c<a-1;c++)for(let l=0;l<a-1;l++){const u=i.get(c,l)+i.get(c,l+1)+i.get(c+1,l)+i.get(c+1,l+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const a=i.size;let s=0,c=0,l=0;for(let u=0;u<a;u++){c=l=0;for(let d=0;d<a;d++)c=c<<1&2047|i.get(u,d),d>=10&&(c===1488||c===93)&&s++,l=l<<1&2047|i.get(d,u),d>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(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 c=0;c<s;c++)for(let l=0;l<s;l++)a.isReserved(l,c)||a.xor(l,c,n(i,l,c))},e.getBestMask=function(i,a){const s=Object.keys(e.Patterns).length;let c=0,l=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<l&&(l=d,c=u)}return c}})(pa);var In={};const Te=En,Ot=[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],Dt=[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,n){switch(n){case Te.L:return Ot[(t-1)*4+0];case Te.M:return Ot[(t-1)*4+1];case Te.Q:return Ot[(t-1)*4+2];case Te.H:return Ot[(t-1)*4+3];default:return}};In.getTotalCodewordsCount=function(t,n){switch(n){case Te.L:return Dt[(t-1)*4+0];case Te.M:return Dt[(t-1)*4+1];case Te.Q:return Dt[(t-1)*4+2];case Te.H:return Dt[(t-1)*4+3];default:return}};var ma={},Tn={};const ht=new Uint8Array(512),Xt=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)ht[n]=t,Xt[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)ht[n]=ht[n-255]})();Tn.log=function(t){if(t<1)throw new Error("log("+t+")");return Xt[t]};Tn.exp=function(t){return ht[t]};Tn.mul=function(t,n){return t===0||n===0?0:ht[Xt[t]+Xt[n]]};(function(e){const t=Tn;e.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let c=0;c<i.length;c++)a[s+c]^=t.mul(o[s],i[c]);return a},e.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=t.mul(i[l],s);let c=0;for(;c<a.length&&a[c]===0;)c++;a=a.slice(c)}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}})(ma);const ga=ma;function Mr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Mr.prototype.initialize=function(t){this.degree=t,this.genPoly=ga.generateECPolynomial(this.degree)};Mr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=ga.mod(n,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 DC=Mr,ha={},Ue={},Br={};Br.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var we={};const ya="[0-9]+",MC="[A-Z $%*+\\-./:]+";let St="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";St=St.replace(/u/g,"\\u");const BC="(?:(?![A-Z0-9 $%*+\\-./:]|"+St+`)(?:.|[\r
21
21
  ]))+`;we.KANJI=new RegExp(St,"g");we.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");we.BYTE=new RegExp(BC,"g");we.NUMERIC=new RegExp(ya,"g");we.ALPHANUMERIC=new RegExp(MC,"g");const VC=new RegExp("^"+St+"$"),LC=new RegExp("^"+ya+"$"),zC=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");we.testKanji=function(t){return VC.test(t)};we.testNumeric=function(t){return LC.test(t)};we.testAlphanumeric=function(t){return zC.test(t)};(function(e){const t=Br,n=we;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 n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.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}}})(Ue);(function(e){const t=ae,n=In,o=En,i=Ue,a=Br,s=7973,c=t.getBCHDigit(s);function l(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 S=u(v.mode,p);h+=S+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 S=t.getSymbolTotalCodewords(p),g=n.getTotalCodewordsCount(p,h),w=(S-g)*8;if(v===i.MIXED)return w;const y=w-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 S=o.from(h,o.M);if(Array.isArray(p)){if(p.length>1)return m(p,S);if(p.length===0)return 1;v=p[0]}else v=p;return l(v.mode,v.getLength(),S)},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)-c>=0;)h^=s<<t.getBCHDigit(h)-c;return p<<12|h}})(ha);var va={};const Qn=ae,wa=1335,GC=21522,Ko=Qn.getBCHDigit(wa);va.getEncodedBits=function(t,n){const o=t.bit<<3|n;let i=o<<10;for(;Qn.getBCHDigit(i)-Ko>=0;)i^=wa<<Qn.getBCHDigit(i)-Ko;return(o<<10|i)^GC};var _a={};const WC=Ue;function je(e){this.mode=WC.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 n,o,i;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),i=parseInt(o,10),t.put(i,10);const a=this.data.length-n;a>0&&(o=this.data.substr(n),i=parseInt(o,10),t.put(i,a*3+1))};var jC=je;const HC=Ue,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 He(e){this.mode=HC.ALPHANUMERIC,this.data=e}He.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};He.prototype.getLength=function(){return this.data.length};He.prototype.getBitsLength=function(){return He.getBitsLength(this.data.length)};He.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=Rn.indexOf(this.data[n])*45;o+=Rn.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(Rn.indexOf(this.data[n]),6)};var YC=He,KC=function(t){for(var n=[],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){n.push(a);continue}if(a<2048){n.push(a>>6|192),n.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){n.push(a>>12|224),n.push(a>>6&63|128),n.push(a&63|128);continue}if(a>=65536&&a<=1114111){n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(a&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const qC=KC,JC=Ue;function Ye(e){this.mode=JC.BYTE,this.data=new Uint8Array(qC(e))}Ye.getBitsLength=function(t){return t*8};Ye.prototype.getLength=function(){return this.data.length};Ye.prototype.getBitsLength=function(){return Ye.getBitsLength(this.data.length)};Ye.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var ZC=Ye;const QC=Ue,XC=ae;function Ke(e){this.mode=QC.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 n=XC.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
22
22
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var eb=Ke,Sa={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,o,i){var a={},s={};s[o]=0;var c=t.PriorityQueue.make();c.push(o,0);for(var l,u,d,m,f,p,h,v,S;!c.empty();){l=c.pop(),u=l.value,m=l.cost,f=n[u]||{};for(d in f)f.hasOwnProperty(d)&&(p=f[d],h=m+p,v=s[d],S=typeof s[d]>"u",(S||v>h)&&(s[d]=h,c.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(n,o){for(var i=[],a=o;a;)i.push(a),n[a],a=n[a];return i.reverse(),i},find_path:function(n,o,i){var a=t.single_source_shortest_paths(n,o,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(n){var o=t.PriorityQueue,i={},a;n=n||{};for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);return i.queue=[],i.sorter=n.sorter||o.default_sorter,i},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var i={value:n,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Sa);var tb=Sa.exports;(function(e){const t=Ue,n=jC,o=YC,i=ZC,a=eb,s=we,c=ae,l=tb;function u(g){return unescape(encodeURIComponent(g)).length}function d(g,w,y){const _=[];let b;for(;(b=g.exec(y))!==null;)_.push({data:b[0],index:b.index,mode:w,length:b[0].length});return _}function m(g){const w=d(s.NUMERIC,t.NUMERIC,g),y=d(s.ALPHANUMERIC,t.ALPHANUMERIC,g);let _,b;return c.isKanjiModeEnabled()?(_=d(s.BYTE,t.BYTE,g),b=d(s.KANJI,t.KANJI,g)):(_=d(s.BYTE_KANJI,t.BYTE,g),b=[]),w.concat(y,_,b).sort(function(E,I){return E.index-I.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function f(g,w){switch(w){case t.NUMERIC:return n.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(w,y){const _=w.length-1>=0?w[w.length-1]:null;return _&&_.mode===y.mode?(w[w.length-1].data+=y.data,w):(w.push(y),w)},[])}function h(g){const w=[];for(let y=0;y<g.length;y++){const _=g[y];switch(_.mode){case t.NUMERIC:w.push([_,{data:_.data,mode:t.ALPHANUMERIC,length:_.length},{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.ALPHANUMERIC:w.push([_,{data:_.data,mode:t.BYTE,length:_.length}]);break;case t.KANJI:w.push([_,{data:_.data,mode:t.BYTE,length:u(_.data)}]);break;case t.BYTE:w.push([{data:_.data,mode:t.BYTE,length:u(_.data)}])}}return w}function v(g,w){const y={},_={start:{}};let b=["start"];for(let A=0;A<g.length;A++){const E=g[A],I=[];for(let P=0;P<E.length;P++){const N=E[P],k=""+A+P;I.push(k),y[k]={node:N,lastCount:0},_[k]={};for(let x=0;x<b.length;x++){const $=b[x];y[$]&&y[$].node.mode===N.mode?(_[$][k]=f(y[$].lastCount+N.length,N.mode)-f(y[$].lastCount,N.mode),y[$].lastCount+=N.length):(y[$]&&(y[$].lastCount=N.length),_[$][k]=f(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,w))}}b=I}for(let A=0;A<b.length;A++)_[b[A]].end=0;return{map:_,table:y}}function S(g,w){let y;const _=t.getBestModeForData(g);if(y=t.from(w,_),y!==t.BYTE&&y.bit<_.bit)throw new Error('"'+g+'" cannot be encoded with mode '+t.toString(y)+`.
23
23
  Suggested mode is: `+t.toString(_));switch(y===t.KANJI&&!c.isKanjiModeEnabled()&&(y=t.BYTE),y){case t.NUMERIC:return new n(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(w){return w.reduce(function(y,_){return typeof _=="string"?y.push(S(_,null)):_.data&&y.push(S(_.data,_.mode)),y},[])},e.fromString=function(w,y){const _=m(w,c.isKanjiModeEnabled()),b=h(_),A=v(b,y),E=l.find_path(A.map,"start","end"),I=[];for(let P=1;P<E.length-1;P++)I.push(A.table[E[P]].node);return e.fromArray(p(I))},e.rawSplit=function(w){return e.fromArray(m(w,c.isKanjiModeEnabled()))}})(_a);const Pn=ae,Fn=En,nb=RC,rb=FC,ob=da,ib=fa,Xn=pa,er=In,ab=DC,en=ha,sb=va,cb=Ue,On=_a;function lb(e,t){const n=e.size,o=ib.getPositions(t);for(let i=0;i<o.length;i++){const a=o[i][0],s=o[i][1];for(let c=-1;c<=7;c++)if(!(a+c<=-1||n<=a+c))for(let l=-1;l<=7;l++)s+l<=-1||n<=s+l||(c>=0&&c<=6&&(l===0||l===6)||l>=0&&l<=6&&(c===0||c===6)||c>=2&&c<=4&&l>=2&&l<=4?e.set(a+c,s+l,!0,!0):e.set(a+c,s+l,!1,!0))}}function ub(e){const t=e.size;for(let n=8;n<t-8;n++){const o=n%2===0;e.set(n,6,o,!0),e.set(6,n,o,!0)}}function db(e,t){const n=ob.getPositions(t);for(let o=0;o<n.length;o++){const i=n[o][0],a=n[o][1];for(let s=-2;s<=2;s++)for(let c=-2;c<=2;c++)s===-2||s===2||c===-2||c===2||s===0&&c===0?e.set(i+s,a+c,!0,!0):e.set(i+s,a+c,!1,!0)}}function fb(e,t){const n=e.size,o=en.getEncodedBits(t);let i,a,s;for(let c=0;c<18;c++)i=Math.floor(c/3),a=c%3+n-8-3,s=(o>>c&1)===1,e.set(i,a,s,!0),e.set(a,i,s,!0)}function Dn(e,t,n){const o=e.size,i=sb.getEncodedBits(t,n);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 pb(e,t){const n=e.size;let o=-1,i=n-1,a=7,s=0;for(let c=n-1;c>0;c-=2)for(c===6&&c--;;){for(let l=0;l<2;l++)if(!e.isReserved(i,c-l)){let u=!1;s<t.length&&(u=(t[s]>>>a&1)===1),e.set(i,c-l,u),a--,a===-1&&(s++,a=7)}if(i+=o,i<0||n<=i){i-=o,o=-o;break}}}function mb(e,t,n){const o=new nb;n.forEach(function(l){o.put(l.mode.bit,4),o.put(l.getLength(),cb.getCharCountIndicator(l.mode,e)),l.write(o)});const i=Pn.getSymbolTotalCodewords(e),a=er.getTotalCodewordsCount(e,t),s=(i-a)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const c=(s-o.getLengthInBits())/8;for(let l=0;l<c;l++)o.put(l%2?17:236,8);return gb(o,e,t)}function gb(e,t,n){const o=Pn.getSymbolTotalCodewords(t),i=er.getTotalCodewordsCount(t,n),a=o-i,s=er.getBlocksCount(t,n),c=o%s,l=s-c,u=Math.floor(o/s),d=Math.floor(a/s),m=d+1,f=u-d,p=new ab(f);let h=0;const v=new Array(s),S=new Array(s);let g=0;const w=new Uint8Array(e.buffer);for(let E=0;E<s;E++){const I=E<l?d:m;v[E]=w.slice(h,h+I),S[E]=p.encode(v[E]),h+=I,g=Math.max(g,I)}const y=new Uint8Array(o);let _=0,b,A;for(b=0;b<g;b++)for(A=0;A<s;A++)b<v[A].length&&(y[_++]=v[A][b]);for(b=0;b<f;b++)for(A=0;A<s;A++)y[_++]=S[A][b];return y}function hb(e,t,n,o){let i;if(Array.isArray(e))i=On.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){const d=On.rawSplit(e);u=en.getBestVersionForData(d,n)}i=On.fromString(e,u||40)}else throw new Error("Invalid data");const a=en.getBestVersionForData(i,n);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(`