PageSourceSearch

https://plus.innotrans.de/static/js/2518.fa5ff64b.js

js innotrans.de collected 2026-09-24 15:28:41 UTC 147,230 bytes, 2 lines download raw bytes

1/*! For license information please see 2518.fa5ff64b.js.LICENSE.txt */
2"use strict";(self.webpackChunkvirtual_guide=self.webpackChunkvirtual_guide||[]).push([[2518],{3438:(e,t,n)=>{n.d(t,{E:()=>i});var r=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i={clockOffset:0,getDateWithClockOffset:function(){return i.clockOffset?new Date((new Date).getTime()+i.clockOffset):new Date},getClockOffset:function(){return i.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=i.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=r(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],u=t[6];return new Date(Date.UTC(Number(n),Number(i)-1,Number(o),Number(s),Number(a),Number(u)))},isClockSkewed:function(e){return Math.abs(e.getTime()-i.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean(["BadRequestException","InvalidSignatureException"].includes(t["x-amzn-errortype"])&&(t.date||t.Date))},setClockOffset:function(e){i.clockOffset=e}}},7444:(e,t,n)=>{n.d(t,{i1:()=>o});var r={},i=function(){function e(){}return e.setItem=function(e,t){return r[e]=t,r[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},e.removeItem=function(e){return delete r[e]},e.clear=function(){return r={}},e}(),o=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=i}}return e.prototype.getStorage=function(){return this.storageWindow},e}()},9900:(e,t,n)=>{n.d(t,{n:()=>K});var r=n(14958),i=n(23588),o=n(46614),s=n(15902),a=n(88218),u=n(3438),c=n(51070),l=n(97928),f=n.n(l),h=n(9270),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d.apply(this,arguments)},p=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},g=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},v=new o.C("RestClient"),b=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=s.Ji,this._options=e,v.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return e.prototype.ajax=function(e,t,n){return p(this,void 0,void 0,function(){var r,i,o,s,c,l,f,p,b,m,_,w,I,S,A=this;return g(this,function(g){switch(g.label){case 0:return v.debug(t,e),o="us-east-1",s="execute-api",c=void 0,"string"===typeof e?(r=this._parseUrl(e),i=e):(i=e.endpoint,c=e.custom_header,o=e.region,s=e.service,r=this._parseUrl(e.endpoint)),l={method:t,url:i,host:r.host,path:r.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},f={},a.OD.isReactNative&&(p=a.OD.userAgent||"aws-amplify/0.1.x",f={"User-Agent":p}),b=Object.assign({},n),m=b.response,b.body&&("function"===typeof FormData&&b.body instanceof FormData?(f["Content-Type"]="multipart/form-data",l.data=b.body):(f["Content-Type"]="application/json; charset=UTF-8",l.data=JSON.stringify(b.body))),b.responseType&&(l.responseType=b.responseType),b.withCredentials&&(l.withCredentials=b.withCredentials),b.timeout&&(l.timeout=b.timeout),b.cancellableToken&&
2(l.cancelToken=b.cancellableToken.token),l.signerServiceInfo=b.signerServiceInfo,"function"!==typeof c?[3,2]:[4,c()];case 1:return w=g.sent(),[3,3];case 2:w=void 0,g.label=3;case 3:return _=w,l.headers=d(d(d({},f),_),b.headers),I=(0,h.parse)(i,!0,!0),I.search,S=y(I,["search"]),l.url=(0,h.format)(d(d({},S),{query:d(d({},S.query),b.queryStringParameters||{})})),"undefined"!==typeof l.headers.Authorization?(l.headers=Object.keys(l.headers).reduce(function(e,t){return l.headers[t]&&(e[t]=l.headers[t]),e},{}),[2,this._request(l,m)]):[2,this.Credentials.get().then(function(r){return A._signed(d({},l),r,m,{region:o,service:s}).catch(function(r){if(u.E.isClockSkewError(r)){var i=r.response.headers,o=i&&(i.date||i.Date),s=new Date(o),a=u.E.getDateFromHeaderString(l.headers["x-amz-date"]);if(u.E.isClockSkewed(s))return u.E.setClockOffset(s.getTime()-a.getTime()),A.ajax(e,t,n)}throw r})},function(e){return v.debug("No credentials available, the request will be unsigned"),A._request(l,m)})]}})})},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.cancel=function(e,t){var n=this._cancelTokenMap.get(e);return!!n&&(n.cancel(t),!0)},e.prototype.hasCancelToken=function(e){return this._cancelTokenMap.has(e)},e.prototype.isCancel=function(e){return f().isCancel(e)},e.prototype.getCancellableToken=function(){return f().CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach(function(n){n.name===e&&(r=n.endpoint,"string"===typeof n.region?t._region=n.region:"string"===typeof t._options.region&&(t._region=t._options.region),"string"===typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"===typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)}),r):r},e.prototype._signed=function(e,t,n,r){var i=r.service,o=r.region,s=e.signerServiceInfo,a=y(e,["
2signerServiceInfo"]),u=o||this._region||this._options.region,l=i||this._service||this._options.service,h={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},d={region:u,service:l},p=Object.assign(d,s),g=c.l.sign(a,h,p);return g.data&&(g.body=g.data),v.debug("Signed Request: ",g),delete g.headers.host,f()(g).then(function(e){return n?e:e.data}).catch(function(e){throw v.debug(e),e})},e.prototype._request=function(e,t){return void 0===t&&(t=!1),f()(e).then(function(e){return t?e:e.data}).catch(function(e){throw v.debug(e),e})},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}(),m=n(79906),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},w=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},I=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},A=new o.C("RestAPI"),P=function(){function e(e){this._api=null,this.Credentials=s.Ji,this._options=e,A.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=S(t,["API"]),o=_(_({},i),r);if(A.debug("configure Rest API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var s=o.aws_cloud_logic_custom;o.endpoints="string"===typeof s?JSON.parse(s):s}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)?o.endpoints.forEach(function(e){"undefined"!==typeof e.custom_header&&"function"!==typeof e.custom_header&&(A.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)}):this._options&&Array.isArray(this._options.endpoints)?o.endpoints=this._options.endpoints:o.endpoints=[],this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return A.debug("create Rest API instance"),this._api=new b(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.get(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.post(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.put(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.patch(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.del(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.head(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(a){return Promise.reject(a.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype.endpoint=function(e){return w(this,void 0,void 0,function(){return I(this,function(t){return[2,this._api.endpoint(e)]})})},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find(function(t){return t.name===e});if(!r)throw new Error("API "+e+" does not exist");var i={endpoint:r.endpoint+t};return"string"===typeof r.region?i.region=r.region:"string"===typeof this._options.region&&(i.region=this._options.region),"string"===typeof r.service?i.service=r.service||"execute-api":i.service="execute-api","function"===typeof r.custom_header?i.custom_header=r.custom_header:i.custom_header=void 0,i},e}(),C=new P(null);m.HA.register(C);var k,O=n(34125),E=n(54342),T=n(50137),x=n(34303),U=n(7638),j=n(10807);!function(e){e.NO_API_KEY="No api-key configured",e.NO_CURRENT_USER="No current user",e.NO_CREDENTIALS="No credentials",e.NO_FEDERATED_JWT="No federated jwt",e.NO_AUTH_TOKEN="No auth token specified"}(k||(k={}));var N=function(){return N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},N.apply(this,arguments)}
2,M=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},R=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},L=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},D=new o.C("GraphQLAPI"),B=function(){function e(e){this._api=null,this.Auth=j.Ay,this.Cache=i.Ay,this.Credentials=s.Ji,this._options=e,D.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"GraphQLAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=F(t,["API"]),o=N(N({},i),r);return D.debug("configure GraphQL API",{opt:o}),o.aws_project_region&&(o=Object.assign({},o,{region:o.aws_project_region,header:{}})),"undefined"!==typeof o.graphql_headers&&"function"!==typeof o.graphql_headers&&(D.warn("graphql_headers should be a function"),o.graphql_headers=void 0),this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return D.debug("create Rest instance"),this._options?(this._api=new b(this._options),this._api.Credentials=this.Credentials,!0):Promise.reject("API not configured")},e.prototype._headerBasedAuth=function(e,t){return void 0===t&&(t={}),M(this,void 0,void 0,function(){var n,r,o,s,a,u,c,l;return R(this,function(f){switch(f.label){case 0:switch(n=this._options,r=n.aws_appsync_authenticationType,o=n.aws_appsync_apiKey,s={},e||r||"AWS_IAM"){case"API_KEY":return[3,1];case"AWS_IAM":return[3,2];case"OPENID_CONNECT":return[3,4];case"AMAZON_COGNITO_USER_POOLS":return[3,11];case"AWS_LAMBDA":return[3,15]}return[3,16];case 1:if(!o)throw new Error(k.NO_API_KEY);return s={Authorization:null,"X-Api-Key":o},[3,17];case 2:return[4,this._ensureCredentials()];case 3:if(!f.sent())throw new Error(k.NO_CREDENTIALS);return[3,17];case 4:return f.trys.push([4,9,,10]),a=void 0,[4,i.Ay.getItem("federatedInfo")];case 5:return(u=f.sent())?(a=u.token,[3,8]):[3,6];case 6:return[4,j.Ay.currentAuthenticatedUser()];case 7:(c=f.sent())&&(a=c.token),f.label=8;case 8:if(!a)throw new Error(k.NO_FEDERATED_JWT);return s={Authorization:a},[3,10];case 9:throw f.sent(),new Error(k.NO_CURRENT_USER);case 10:return[3,17];case 11:return f.trys.push([11,13,,14]),[4,this.Auth.currentSession()];case 12:return l=f.sent(),s={Authorization:l.getAccessToken().getJwtToken()},[3,14];case 13:throw f.sent(),new Error(k.NO_CURRENT_USER);case 14:return[3,17];case 15:if(!t.Authorization)throw new Error(k.NO_AUTH_TOKEN);return s={Authorization:t.Authorization},[3,17];case 16:return s={Authorization:null},[3,17];case 17:return[2,s]}})})},e.prototype.getGraphqlOperationType=function(e){var t=(0,O.qg)(e).definitions;return L(t,1)[0].operation},e.prototype.graphql=function(e,t){var n=e.query,r=e.variables,i=void 0===r?{}:r,o=e.authMode,s=e.authToken,a=e.userAgentSuffix,u="string"===typeof n?(0,O.qg)(n):(0,O.qg)((0,E.y)(n)),c=L(u.definitions.filter(function(e){return"OperationDefinition"===e.kind}),1)[0],l=(void 0===c?{}:c).operation,f=t||{};switch(s&&(f.Authorization=s),l){case"query":case"mutation":this.createInstanceIfNotCreated();var h=this._api.getCancellableToken(),d={cancellableToken:h},p=this._graphql({query:u,variables:i,authMode:o,userAgentSuffix:a},f,d);return this._api.updateRequestToBeCancellable(p,h),p;case"subscription":return this._graphqlSubscribe({query:u,variables:i,authMode:o},f);default:throw new Error("invalid operation type: "+l)}},e.prototype._graphql=function(e,t,n){var r=e.query,i=e.variables,o=e.authMode,s=e.userAgentSuffix;return void 0===t&&(t={}),void 0===n&&(n={}),M(this,void 0,void 0,function(){var e,u,c,l,f,h,d,p,g,y,v,b,m,_,w,I,S,A,P,C,k;return R(this,function(O){switch(O.label){case 0:return this.createInstanceIfNotCreated(),e=this._options,u=e.aws_appsync_regi
2on,c=e.aws_appsync_graphqlEndpoint,l=e.graphql_headers,f=void 0===l?function(){return{}}:l,h=e.graphql_endpoint,d=e.graphql_endpoint_iam_region,g=[{}],(y=!h)?[4,this._headerBasedAuth(o,t)]:[3,2];case 1:y=O.sent(),O.label=2;case 2:return v=[N.apply(void 0,g.concat([y]))],(b=h)?d?[4,this._headerBasedAuth(o,t)]:[3,4]:[3,6];case 3:return m=O.sent(),[3,5];case 4:m={Authorization:null},O.label=5;case 5:b=m,O.label=6;case 6:return _=[N.apply(void 0,v.concat([b]))],[4,f({query:r,variables:i})];case 7:if(p=N.apply(void 0,[N.apply(void 0,[N.apply(void 0,_.concat([O.sent()])),t]),!h&&(k={},k["x-amz-user-agent"]=(0,a.fE)(s),k)]),w={query:(0,E.y)(r),variables:i},I=Object.assign({headers:p,body:w,signerServiceInfo:{service:h?"execute-api":"appsync",region:h?d:u}},n),!(S=h||c))throw{data:{},errors:[new T.e("No graphql endpoint provided.")]};O.label=8;case 8:return O.trys.push([8,10,,11]),[4,this._api.post(S,I)];case 9:return A=O.sent(),[3,11];case 10:if(P=O.sent(),this._api.isCancel(P))throw P;return A={data:{},errors:[new T.e(P.message,null,null,null,null,P)]},[3,11];case 11:if((C=A.errors)&&C.length)throw A;return[2,A]}})})},e.prototype.createInstanceIfNotCreated=function(){return M(this,void 0,void 0,function(){return R(this,function(e){switch(e.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype._graphqlSubscribe=function(e,t){var n=e.query,r=e.variables,i=e.authMode,o=e.authToken;void 0===t&&(t={});var s=this._options,a=s.aws_appsync_region,u=s.aws_appsync_graphqlEndpoint,c=s.aws_appsync_authenticationType,l=s.aws_appsync_apiKey,f=s.graphql_headers,h=void 0===f?function(){return{}}:f,d=i||c||"AWS_IAM";if(U.G&&"function"===typeof U.G.subscribe)return U.G.subscribe("",{provider:x.bB,appSyncGraphqlEndpoint:u,authenticationType:d,apiKey:l,query:(0,E.y)(n),region:a,variables:r,graphql_headers:h,additionalHeaders:t,authToken:o});throw D.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},e.prototype._ensureCredentials=function(){var e=this;return this.Credentials.get().then(function(t){if(!t)return!1;var n=e.Credentials.shear(t);return D.debug("set credentials for api",n),!0}).catch(function(e){return D.warn("ensure credentials error",e),!1})},e}(),z=new B(null);m.HA.register(z);var W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)},q=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},G=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=new o.C("API"),K=new(function(){function e(e){this.Auth=r.N,this.Cache=i.Ay,this.Credentials=s.Ji,this._options=e,this._restApi=new P(e),this._graphqlApi=new B(e),H.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){this._options=Object.assign({},this._options,e),this._restApi.Credentials=this.Credentials,this._graphqlApi.Auth=this.Auth,this._graphqlApi.Cache=this.Cache,this._graphqlApi.Credentials=this.Credentials;var t=this._restApi.configure(this._options),n=this._graphqlApi.configure(this._options);return W(W({},t),n)},e.prototype.get=function(e,t,n){return this._restApi.get(e,t,n)},e.prototype.post=function(e,t,n){return this._restApi.post(e,t,n)},e.prototype.put=function(e,t,n){return this._restApi.put(e,t,n)},e.prototype.patch=function(e,t,n){return this._restApi.patch(e,t,n
2)},e.prototype.del=function(e,t,n){return this._restApi.del(e,t,n)},e.prototype.head=function(e,t,n){return this._restApi.head(e,t,n)},e.prototype.isCancel=function(e){return this._restApi.isCancel(e)},e.prototype.cancel=function(e,t){return this._restApi.hasCancelToken(e)?this._restApi.cancel(e,t):!!this._graphqlApi.hasCancelToken(e)&&this._graphqlApi.cancel(e,t)},e.prototype.endpoint=function(e){return q(this,void 0,void 0,function(){return G(this,function(t){return[2,this._restApi.endpoint(e)]})})},e.prototype.getGraphqlOperationType=function(e){return this._graphqlApi.getGraphqlOperationType(e)},e.prototype.graphql=function(e,t){return this._graphqlApi.graphql(e,t)},e}())(null);m.HA.register(K)},10807:(e,t,n)=>{n.d(t,{Ay:()=>i});var r=n(14958);n(17453);const i=r.N},11128:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(33267),i=n(48386),o=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};const s=function(){function e(){}return e.prototype.networkMonitor=function(t){if((0,r.gy)().isNode)return i.A.from([{online:!0}]);var n=(0,r.p7)()?self:window;return new i.A(function(t){t.next({online:n.navigator.onLine});var r=function(){return t.next({online:!0})},i=function(){return t.next({online:!1})};return n.addEventListener("online",r),n.addEventListener("offline",i),e._observers.push(t),function(){n.removeEventListener("online",r),n.removeEventListener("offline",i),e._observers=e._observers.filter(function(e){return e!==t})}})},e._observerOverride=function(t){var n,r,i=function(n){if(n.closed)return e._observers=e._observers.filter(function(e){return e!==n}),"continue";n.next(t)};try{for(var s=o(e._observers),a=s.next();!a.done;a=s.next()){i(a.value)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},e._observers=[],e}()},14958:(e,t,n)=>{var r,i,o;function s(e){return e&&!!["provider"].find(function(t){return e.hasOwnProperty(t)})}function a(e){return void 0!==e.redirectSignIn}n.d(t,{N:()=>V}),function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(r||(r={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError"}(i||(i={})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.AWS_LAMBDA="AWS_LAMBDA"}(o||(o={}));var u=n(46614),c=n(71977),l=n(15902),f=n(92719),h=n(15359),d=n(33267),p=(0,d.gy)().isBrowser,g=function(){function e(e){void 0===e&&(e={}),this.cookies=new h.A,this.store=p?window.localStorage:Object.create(null),this.cookies=e.req?new h.A(e.req.headers.cookie):new h.A,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map(function(t,n){return e.key(n)}).forEach(function(t){return e.removeItem(t)})},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"refreshToken":case"idToken":p?this.setUniversalItem(e,t):this.setLocalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),y=n(7444);var v=n(79906),b=n(17453),m=n(9270),_=function(e){var t=window.open(e,"_self");
2return t?Promise.resolve(t):Promise.reject()},w=n(8370),I=n.n(w),S=n(43597),A=n.n(S),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},P.apply(this,arguments)},C=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},k=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},O=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},E="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",T=function(e,t,n){c.YZ.dispatch("auth",{event:e,data:t,message:n},"Auth",E)},x=new u.C("OAuth");const U=function(){function e(e){var t=e.config,n=e.cognitoClientId,r=e.scopes,i=void 0===r?[]:r;if(this._urlOpener=t.urlOpener||_,this._config=t,this._cognitoClientId=n,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every(function(e){return"string"===typeof e})},e.prototype.oauthSignIn=function(e,t,n,i,o,s){void 0===e&&(e="code"),void 0===o&&(o=r.Cognito);var a=this._generateState(32),u=s?a+"-"+s.split("").map(function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")}).join(""):a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(u);var c,l=this._generateRandom(128);c=l,window.sessionStorage.setItem("ouath_pkce_key",c);var f=this._generateChallenge(l),h=this._scopes.join(" "),d="https://"+t+"/oauth2/authorize?"+Object.entries(P(P({redirect_uri:n,response_type:e,client_id:i,identity_provider:o,scope:h,state:u},"code"===e?{code_challenge:f}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map(function(e){var t=O(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)}).join("&");x.debug("Redirecting to "+d),this._urlOpener(d,n)},e.prototype._handleCodeFlow=function(e){return C(this,void 0,void 0,function(){var t,n,r,i,o,s,u,c,l,f,h,d,p,g;return k(this,function(y){switch(y.label){case 0:return t=((0,m.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n,r=O(t,2),i=r[0],o=r[1];return P(P({},e),((n={})[i]=o,n))},{code:void 0}).code,n=(0,m.parse)(e).pathname||"/",r=(0,m.parse)(this._config.redirectSignIn).pathname||"/",t&&n===r?(i="https://"+this._config.domain+"/oauth2/token",T("codeFlow",{},"Retrieving tokens from "+i),o=a(this._config)?this._cognitoClientId:this._config.clientID,s=a(this._config)?this._config.redirectSignIn:this._config.redirectUri,u=function(){var e=window.sessionStorage.getItem("ouath_pkce_key");return window.sessionStorage.removeItem("ouath_pkce_key"),e}(),c=P({grant_type:"authorization_code",code:t,client_id:o,redirect_uri:s},u?{code_verifier:u}:{}),x.debug("Calling token endpoint: "+i+" with",c),l=Object.entries(c).map(function(e){var t=O(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)}).join("&"),[4,fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l})]):[2];case 1:return[4,y.sent().json()];case 2:if(f=y.sent(),h=f.access_token,d=f.refresh_token,p=f.id_token,g=f.error)throw new Error(g);return[2,{accessToken:h,refreshToken:d,idToken:p}]}})})},e.prototype._handleImplicitFlow=function(e){return C(this,void 0,void 0,function(){var t,n,r;return k(this,function(i){return t=((0,m.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n,r=O(t,2),i=r[0],o=r[1];return P(P({},e),((n={})[i]=o,n))},{id_token:void 0,access_token:void 0}),n=t.id_token,r=t.access_token,T("implicitFlow",{},"Got tokens from "+e),x.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:r,idToken:n,refreshToken:null}]})})},e.prototype.handleAuthResponse=function(e){return C(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return k(this,function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?P(P({},((0,m.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n=O(t,2),r=n[0],i=n[1];return e[r]=i,e},{})),((0,m.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n=O(t,2),r=n[0],i=n[1];return e[r]=i,e},{})):{},n=t.error,r=t.error_description,n)throw new Error(r);
2return i=this._validateState(t),x.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,P.apply(void 0,[P.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,P.apply(void 0,[P.apply(void 0,s.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw a=u.sent(),x.error("Error handling auth response.",a),a;case 6:return[2]}})})},e.prototype._validateState=function(e){if(e){var t=function(){var e=window.sessionStorage.getItem("oauth_state");return window.sessionStorage.removeItem("oauth_state"),e}(),n=e.state;if(t&&t!==n)throw new Error("Invalid state in OAuth flow");return n}},e.prototype.signOut=function(){return C(this,void 0,void 0,function(){var e,t,n;return k(this,function(r){return e="https://"+this._config.domain+"/logout?",t=a(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=a(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map(function(e){var t=O(e,2);return t[0]+"="+t[1]}).join("&"),T("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),x.debug("Signing out from "+e),[2,this._urlOpener(e,n)]})})},e.prototype._generateState=function(e){for(var t="",n=e,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=r[Math.round(61*Math.random())];return t},e.prototype._generateChallenge=function(e){return this._base64URL(I()(e))},e.prototype._base64URL=function(e){return e.toString(A()).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!==typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=66*Math.random()|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=0;r<e.byteLength;r+=1){var i=e[r]%62;n.push(t[i])}return n.join("")},e}();var j;!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in"}(j||(j={}));var N=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=new u.C("AuthError"),R=function(e){function t(n){var r=this,i=L[n],o=i.message,s=i.log;return(r=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="AuthError",r.log=s||o,M.error(r.log),r}return N(t,e),t}(Error),F=function(e){function t(n){var r=e.call(this,n)||this;return r.constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="NoUserPoolError",r}return N(t,e),t}(R),L={noConfig:{message:j.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly.\n            This error is typically caused by one of the following scenarios:\n\n            1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n                See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n            \n            2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n        "},missingAuthConfig:{message:j.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly. \n            The configuration object is missing required auth properties.\n            This error is typically caused by one of the following scenarios:\n\n            1. Did you run `amplify push` after adding auth via `amplify add auth`?\n                See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n            2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n        "},emptyUsername:{message:j.EMPTY_USERNAME},invalidUsername:{message:j.INVALID_USERNAME},emptyPassword:{message:j.EMPTY_PASSWORD},emptyCode:{message:j.EMPTY_CODE},signUpError:{message:j.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:j.NO_MFA},invalidMFA:{message:j.INVALID_MFA},emptyChallengeResponse:{message:j.EMPTY_CHALLENGE},noUserSession:{message:j.NO_USER_SESSION},deviceConfig:{message:j.DEVICE_CONFIG}
2,networkError:{message:j.NETWORK_ERROR},autoSignInError:{message:j.AUTOSIGNIN_ERROR},default:{message:j.DEFAULT_MSG}},D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},D.apply(this,arguments)},B=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},z=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},W=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},q=new u.C("AuthClass"),G="aws.cognito.signin.user.admin",H="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",K=function(e,t,n){c.YZ.dispatch("auth",{event:e,data:t,message:n},"Auth",H)},V=new(function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.autoSignInInitiated=!1,this.Credentials=l.Ji,this.wrapRefreshSessionCallback=function(e){return function(t,n){return n?K("tokenRefresh",void 0,"New token retrieved"):K("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,n)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),c.YZ.listen("auth",function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}})}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};q.debug("configure Auth");var n=Object.assign({},this._config,f.iX.parseMobilehubConfig(e).Auth,e);this._config=n;var r=this._config,o=r.userPoolId,s=r.userPoolWebClientId,u=r.cookieStorage,c=r.oauth,l=r.region,h=r.identityPoolId,p=r.mandatorySignIn,v=r.refreshHandlers,m=r.identityPoolRegion,_=r.clientMetadata,w=r.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw q.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=u?new b.W6(u):e.ssr?new g:(new y.i1).getStorage();if(this._storageSync=Promise.resolve(),"function"===typeof this._storage.sync&&(this._storageSync=this._storage.sync()),o){var I={UserPoolId:o,ClientId:s,endpoint:w};I.Storage=this._storage,this.userPool=new b.NE(I,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:p,region:m||l,userPoolId:o,identityPoolId:h,refreshHandlers:v,storage:this._storage});var S=c?a(this._config.oauth)?c:c.awsCognito:void 0;if(S){var A=Object.assign({cognitoClientId:s,UserPoolId:o,domain:S.domain,scopes:S.scope,redirectSignIn:S.redirectSignIn,redirectSignOut:S.redirectSignOut,responseType:S.responseType,Storage:this._storage,urlOpener:S.urlOpener,clientMetadata:_},S.options);this._oAuthHandler=new U({scopes:A.scopes,config:A,cognitoClientId:A.cognitoClientId});var P={};!function(e){if((0,d.gy)().isBrowser&&window.location)e({url:window.location.href});else if(!(0,d.gy)().isNode)throw new Error("Not supported")}(function(e){var n=e.url;P[n]||(P[n]=!0,t._handleAuthResponse(n))})}(K("configured",null,"The Auth category has been configured successfully"),this.autoSignInInitiated||"function"!==typeof this._storage.getItem)||(this.isTrueStorageValue("amplify-polling-started")&&(K("autoSignIn_failure",null,i.AutoSignInError),this._storage.removeItem("amplify-auto-sign-in")),this._storage.removeItem("amplify-polling-started"));return this._config},e.prototype.signUp=function(e){for(var t,n,r,o=this,s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];if(!this.userPool)return this.rejectNoUserPool();var u,c=null,l=null,f=[],h=null,d={enabled:!1},p={},g={};if(e&&"string"===typeof e){c=e,l=s?s[0]:null;var y=s?s[1]:null,v=s?s[2]:null;y&&f.push(new b.HB({Name:"email",Value:y}
2)),v&&f.push(new b.HB({Name:"phone_number",Value:v}))}else{if(!e||"object"!==typeof e)return this.rejectAuthError(i.SignUpError);c=e.username,l=e.password,e&&e.clientMetadata?u=e.clientMetadata:this._config.clientMetadata&&(u=this._config.clientMetadata);var m=e.attributes;m&&Object.keys(m).map(function(e){f.push(new b.HB({Name:e,Value:m[e]}))});var _=e.validationData;_&&(h=[],Object.keys(_).map(function(e){h.push(new b.HB({Name:e,Value:_[e]}))})),(d=null!==(t=e.autoSignIn)&&void 0!==t?t:{enabled:!1}).enabled&&(this._storage.setItem("amplify-auto-sign-in","true"),p=null!==(n=d.validationData)&&void 0!==n?n:{},g=null!==(r=d.clientMetaData)&&void 0!==r?r:{})}return c?l?(q.debug("signUp attrs:",f),q.debug("signUp validation data:",h),new Promise(function(e,t){o.userPool.signUp(c,l,f,h,function(n,r){n?(K("signUp_failure",n,c+" failed to signup"),t(n)):(K("signUp",r,c+" has signed up successfully"),d.enabled&&o.handleAutoSignIn(c,l,p,g,r),e(r))},u)})):this.rejectAuthError(i.EmptyPassword):this.rejectAuthError(i.EmptyUsername)},e.prototype.handleAutoSignIn=function(e,t,n,r,i){this.autoSignInInitiated=!0;var o=new b.By({Username:e,Password:t,ValidationData:n,ClientMetadata:r});i.userConfirmed?this.signInAfterUserConfirmed(o):"link"===this._config.signUpVerificationMethod?this.handleLinkAutoSignIn(o):this.handleCodeAutoSignIn(o)},e.prototype.handleCodeAutoSignIn=function(e){var t=this,n=function(r){"confirmSignUp"===r.payload.event&&t.signInAfterUserConfirmed(e,n)};c.YZ.listen("auth",n)},e.prototype.handleLinkAutoSignIn=function(e){var t=this;this._storage.setItem("amplify-polling-started","true");var n=Date.now(),r=setInterval(function(){Date.now()-n>18e4?(clearInterval(r),K("autoSignIn_failure",null,"Please confirm your account and use your credentials to sign in."),t._storage.removeItem("amplify-auto-sign-in")):t.signInAfterUserConfirmed(e,null,r)},5e3)},e.prototype.signInAfterUserConfirmed=function(e,t,n){return B(this,void 0,void 0,function(){var r,i,o=this;return z(this,function(s){switch(s.label){case 0:r=this.createCognitoUser(e.getUsername()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r.authenticateUser(e,this.authCallbacks(r,function(r){K("autoSignIn",r,e.getUsername()+" has signed in successfully"),t&&c.YZ.remove("auth",t),n&&(clearInterval(n),o._storage.removeItem("amplify-polling-started")),o._storage.removeItem("amplify-auto-sign-in")},function(e){q.error(e),o._storage.removeItem("amplify-auto-sign-in")}))];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),q.error(i),[3,4];case 4:return[2]}})})},e.prototype.confirmSignUp=function(e,t,n){var r=this;if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);var o,s=this.createCognitoUser(e),a=!n||"boolean"!==typeof n.forceAliasCreation||n.forceAliasCreation;return n&&n.clientMetadata?o=n.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata),new Promise(function(n,u){s.confirmRegistration(t,a,function(t,o){t?u(t):(K("confirmSignUp",o,e+" has been confirmed successfully"),r.isTrueStorageValue("amplify-auto-sign-in")&&!r.autoSignInInitiated&&(K("autoSignIn_failure",null,i.AutoSignInError),r._storage.removeItem("amplify-auto-sign-in")),n(o))},o)})},e.prototype.isTrueStorageValue=function(e){var t=this._storage.getItem(e);return!!t&&"true"===t},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var n=this.createCognitoUser(e);return new Promise(function(e,r){n.resendConfirmationCode(function(t,n){t?r(t):e(n)},t)})},e.prototype.signIn=function(e,t,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var r=null,o=null,s={};if("string"===typeof e)r=e,o=t;else{if(!e.username)return this.rejectAuthError(i.InvalidUsername);"undefined"!==typeof t&&q.warn("The password should be defined under the first parameter object!"),r=e.username,o=e.password,s=e.validationData}if(!r)return this.rejectAuthError(i.EmptyUsername);var a=new b.By({Username:r,Password:o,ValidationData:s,ClientMetadata:n});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,n){var r=this,i=this;return{onSuccess:function(o){return B(r,void 0,void 0,function(){var r,s,a,u;return z(this,function(c){switch(c.label){case 0:q.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return r=c.sent(),q.debug("succeed to get cognito credentials",r),[3,9];case 4:return s=c.sent(),q.debug("cannot get cognito credentials",s),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];
2case 6:return a=c.sent(),i.user=a,K("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return u=c.sent(),q.error("Failed to get the signed in user",u),n(u),[3,8];case 8:return[7];case 9:return[2]}})})},onFailure:function(t){q.debug("signIn failure",t),K("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){q.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=n,t(e)},mfaRequired:function(n,r){q.debug("signIn MFA required"),e.challengeName=n,e.challengeParam=r,t(e)},mfaSetup:function(n,r){q.debug("signIn mfa setup",n),e.challengeName=n,e.challengeParam=r,t(e)},newPasswordRequired:function(n,r){q.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:n,requiredAttributes:r},t(e)},totpRequired:function(n,r){q.debug("signIn totpRequired"),e.challengeName=n,e.challengeParam=r,t(e)},selectMFAType:function(n,r){q.debug("signIn selectMFAType",n),e.challengeName=n,e.challengeParam=r,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var n=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise(function(r,i){n.authenticateUser(e,t.authCallbacks(n,function(e){t.pendingSignIn=null,r(e)},function(e){t.pendingSignIn=null,i(e)}))}),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise(function(r,i){n.initiateAuth(e,t.authCallbacks(n,r,i))})},e.prototype.getMFAOptions=function(e){return new Promise(function(t,n){e.getMFAOptions(function(e,r){if(e)return q.debug("get MFA Options failed",e),void n(e);q.debug("get MFA options success",r),t(r)})})},e.prototype.getPreferredMFA=function(e,t){var n=this,r=this;return new Promise(function(i,o){var s=n._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData(function(t,s){return B(n,void 0,void 0,function(){var n,a;return z(this,function(u){switch(u.label){case 0:if(!t)return[3,5];if(q.debug("getting preferred mfa failed",t),!this.isSessionInvalid(t))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return u.sent(),[3,4];case 3:return n=u.sent(),o(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+n.message)),[2];case 4:return o(t),[2];case 5:return(a=r._getMfaTypeFromUserData(s))?(i(a),[2]):(o("invalid MFA Type"),[2])}})})},{bypassCache:a,clientMetadata:s})})},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var r=e.UserMFASettingList;if(r)0===r.length?t="NOMFA":q.debug("invalid case for getPreferredMFA",e);else t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){var n=this;return new Promise(function(r,i){e.getUserData(function(t,o){return B(n,void 0,void 0,function(){var n;return z(this,function(s){switch(s.label){case 0:if(!t)return[3,5];if(q.debug("getting user data failed",t),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return n=s.sent(),i(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+n.message)),[2];case 4:return i(t),[2];case 5:r(o),s.label=6;case 6:return[2]}})})},t)})},e.prototype.setPreferredMFA=function(e,t){return B(this,void 0,void 0,function(){var n,r,o,s,a,u,c=this;return z(this,function(l){switch(l.label){case 0:return n=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:n})];case 1:switch(r=l.sent(),o=null,s=null,t){case"TOTP":case"SOFTWARE_TOKEN_MFA":return[3,2];case"SMS":case"SMS_MFA":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return s={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=r.UserMFASettingList,[4,this._getMfaTypeFromUserData(r)];case 5:if("NOMFA"===(u=l.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(i.InvalidMFA)
2];s={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach(function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(s={PreferredMfa:!1,Enabled:!1})}),[3,7];case 6:return q.debug("no validmfa method provided"),[2,this.rejectAuthError(i.NoMFA)];case 7:return[2,new Promise(function(t,r){e.setUserMfaPreference(o,s,function(i,o){if(i)return q.debug("Set user mfa preference error",i),r(i);q.debug("Set user mfa success",o),q.debug("Caching the latest user data into local"),e.getUserData(function(n,i){return B(c,void 0,void 0,function(){var i;return z(this,function(s){switch(s.label){case 0:if(!n)return[3,5];if(q.debug("getting user data failed",n),!this.isSessionInvalid(n))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),r(new Error("Session is invalid due to: "+n.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,r(n)];case 5:return[2,t(o)]}})})},{bypassCache:!0,clientMetadata:n})})})]}})})},e.prototype.disableSMS=function(e){return new Promise(function(t,n){e.disableMFA(function(e,r){if(e)return q.debug("disable mfa failed",e),void n(e);q.debug("disable mfa succeed",r),t(r)})})},e.prototype.enableSMS=function(e){return new Promise(function(t,n){e.enableMFA(function(e,r){if(e)return q.debug("enable mfa failed",e),void n(e);q.debug("enable mfa succeed",r),t(r)})})},e.prototype.setupTOTP=function(e){return new Promise(function(t,n){e.associateSoftwareToken({onFailure:function(e){q.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){q.debug("associateSoftwareToken sucess",e),t(e)}})})},e.prototype.verifyTotpToken=function(e,t){return q.debug("verification totp token",e,t),new Promise(function(n,r){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){q.debug("verifyTotpToken failed",e),r(e)},onSuccess:function(t){K("signIn",e,"A user "+e.getUsername()+" has been signed in"),q.debug("verifyTotpToken success",t),n(t)}})})},e.prototype.confirmSignIn=function(e,t,n,r){var o=this;if(void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyCode);var s=this;return new Promise(function(i,a){e.sendMFACode(t,{onSuccess:function(t){return B(o,void 0,void 0,function(){var n,r;return z(this,function(o){switch(o.label){case 0:q.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),q.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),q.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,K("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}})})},onFailure:function(e){q.debug("confirm signIn failure",e),a(e)}},n,r)})},e.prototype.completeNewPassword=function(e,t,n,r){var o=this;if(void 0===n&&(n={}),void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyPassword);var s=this;return new Promise(function(i,a){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return B(o,void 0,void 0,function(){var n,r;return z(this,function(o){switch(o.label){case 0:q.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),q.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),q.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,K("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}})})},onFailure:function(e){q.debug("completeNewPassword failure",e),K("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,n){q.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=n,i(e)},mfaSetup:function(t,n){q.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,i(e)},totpRequired:function(t,n){q.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,i(e)}},r)})},e.prototype.sendCustomChallengeAnswer=function(e,t,n){var r=this;if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(i.EmptyChallengeResponse);return new Promise(function(i,o){e.sendCustomChallengeAnswer(t,r.authCallbacks(e,i,o),n)})},e.prototype.deleteUserAttributes=function(e,t){var n=this;return new Promise(function(r,i){n.userSession(e).then(function(n){e.deleteAttributes(t,function(e,t){return e?i(e):r(t)})})})},e.prototype.deleteUser=function(){return B(this,void 0,void 0,function(){var e,t,n=this;return z(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this._storageSync];case 1:return r.sent(),[3,3];case 2:throw e=r.sent(),q.debug("Failed to sync cache info into memory",e),new Error(e);case 3:return t=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(e,r){return B(n,void 0,void 0,function(){var n,i=this;
2return z(this,function(o){if(this.userPool){if(!(n=this.userPool.getCurrentUser()))return q.debug("Failed to get user from user pool"),[2,r(new Error("No current user."))];n.getSession(function(o,s){return B(i,void 0,void 0,function(){var i,s=this;return z(this,function(a){switch(a.label){case 0:if(!o)return[3,5];if(q.debug("Failed to get the user session",o),!this.isSessionInvalid(o))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(n)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),r(new Error("Session is invalid due to: "+o.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,r(o)];case 5:n.deleteUser(function(i,o){if(i)r(i);else{K("userDeleted",o,"The authenticated user has been deleted."),n.signOut(),s.user=null;try{s.cleanCachedItems()}catch(a){q.debug("failed to clear cached items")}t?s.oAuthSignOutRedirect(e,r):(K("signOut",s.user,"A user has been signed out"),e(o))}}),a.label=6;case 6:return[2]}})})})}else q.debug("no Congito User pool"),r(new Error("Cognito User pool does not exist"));return[2]})})})]}})})},e.prototype.updateUserAttributes=function(e,t,n){void 0===n&&(n=this._config.clientMetadata);var r=[],i=this;return new Promise(function(o,s){i.userSession(e).then(function(i){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var u={Name:a,Value:t[a]};r.push(u)}e.updateAttributes(r,function(e,t){return e?s(e):o(t)},n)})})},e.prototype.userAttributes=function(e){var t=this;return new Promise(function(n,r){t.userSession(e).then(function(t){e.getUserAttributes(function(e,t){e?r(e):n(t)})})})},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then(function(e){var n=t.attributesToObject(e),r={},i={};return n.email&&(n.email_verified?i.email=n.email:r.email=n.email),n.phone_number&&(n.phone_number_verified?i.phone_number=n.phone_number:r.phone_number=n.phone_number),{verified:i,unverified:r}})},e.prototype.isErrorWithMessage=function(e){return"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"message")},e.prototype.isTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Access Token has been revoked"===e.message},e.prototype.isRefreshTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has been revoked"===e.message},e.prototype.isUserDisabledError=function(e){return this.isErrorWithMessage(e)&&"User is disabled."===e.message},e.prototype.isUserDoesNotExistError=function(e){return this.isErrorWithMessage(e)&&"User does not exist."===e.message},e.prototype.isRefreshTokenExpiredError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has expired"===e.message},e.prototype.isSignedInHostedUI=function(){return this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI")},e.prototype.isSessionInvalid=function(e){return this.isUserDisabledError(e)||this.isUserDoesNotExistError(e)||this.isTokenRevokedError(e)||this.isRefreshTokenRevokedError(e)||this.isRefreshTokenExpiredError(e)},e.prototype.cleanUpInvalidSession=function(e){return B(this,void 0,void 0,function(){var t=this;return z(this,function(n){switch(n.label){case 0:e.signOut(),this.user=null,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.cleanCachedItems()];case 2:return n.sent(),[3,4];case 3:return n.sent(),q.debug("failed to clear cached items"),[3,4];case 4:return this.isSignedInHostedUI()?[2,new Promise(function(e,n){t.oAuthSignOutRedirect(e,n)})]:(K("signOut",this.user,"A user has been signed out"),[2])}})})},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise(function(n,r){t._storageSync.then(function(){return B(t,void 0,void 0,function(){var t,i,o=this;return z(this,function(s){switch(s.label){case 0:return this.isOAuthInProgress()?(q.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise(function(e){var t=setTimeout(function(){q.debug("OAuth signIn in progress timeout"),c.YZ.remove("auth",n),e()},1e4);function n(r){var i=r.payload.event;"cognitoHostedUI"!==i&&"cognitoHostedUI_failure"!==i||(q.debug("OAuth signIn resolved: "+i),clearTimeout(t),c.YZ.remove("auth",n),e())}c.YZ.listen("auth",n)})]):[3,2];case 1:s.sent(),s.label=2;case 2:return(t=this.userPool.getCurrentUser())?(i=this._config.clientMetadata,t.getSession(function(i,s){return B(o,void 0,void 0,function(){var o,a,u,c,l=this;return z(this,function(f){switch(f.label){case 0:if(!i)return[3,5];if(q.debug("Failed to get the user session",i),!this.isSessionInvalid(i))return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return f.sent(),[3,4];
2case 3:return o=f.sent(),r(new Error("Session is invalid due to: "+i.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return r(i),[2];case 5:return(a=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,7];case 6:f.sent(),f.label=7;case 7:return u=this._config.clientMetadata,c=s.getAccessToken().decodePayload().scope,(void 0===c?"":c).split(" ").includes(G)?(t.getUserData(function(e,i){return B(l,void 0,void 0,function(){var o,s,a,u,c,l,f;return z(this,function(h){switch(h.label){case 0:if(!e)return[3,7];if(q.debug("getting user data failed",e),!this.isSessionInvalid(e))return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return h.sent(),[3,4];case 3:return o=h.sent(),r(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return r(e),[3,6];case 5:n(t),h.label=6;case 6:return[2];case 7:for(s=i.PreferredMfaSetting||"NOMFA",a=[],u=0;u<i.UserAttributes.length;u++)c={Name:i.UserAttributes[u].Name,Value:i.UserAttributes[u].Value},l=new b.HB(c),a.push(l);return f=this.attributesToObject(a),Object.assign(t,{attributes:f,preferredMFA:s}),[2,n(t)]}})})},{bypassCache:a,clientMetadata:u}),[2]):(q.debug("Unable to get the user data because the "+G+" is not in the scopes of the access token"),[2,n(t)])}})})},{clientMetadata:i}),[2]):(q.debug("Failed to get user from user pool"),r("No current user"),[2])}})})}).catch(function(e){return q.debug("Failed to sync cache info into memory",e),r(e)})}):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return B(this,void 0,void 0,function(){var t,n,r,i,o;return z(this,function(s){switch(s.label){case 0:q.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw n=s.sent(),q.debug("Failed to sync cache info into memory",n),n;case 4:try{(r=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=D(D({},r.user),{token:r.token}))}catch(a){q.debug("cannot load federated user from auth storage")}return t?(this.user=t,q.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:q.debug("get current authenticated userpool user"),i=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=s.sent(),[3,9];case 8:return"No userPool"===(o=s.sent())&&q.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),q.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}})})},e.prototype.currentSession=function(){var e=this;return q.debug("Getting current session"),this.userPool?new Promise(function(t,n){e.currentUserPoolUser().then(function(r){e.userSession(r).then(function(e){t(e)}).catch(function(e){q.debug("Failed to get the current session",e),n(e)})}).catch(function(e){q.debug("Failed to get the current user",e),n(e)})}):Promise.reject(new Error("No User Pool in the configuration."))},e.prototype.userSession=function(e){var t=this;if(!e)return q.debug("the user is null"),this.rejectAuthError(i.NoUserSession);var n=this._config.clientMetadata;return new Promise(function(r,i){q.debug("Getting the session from this user:",e),e.getSession(function(n,o){return B(t,void 0,void 0,function(){var t;return z(this,function(s){switch(s.label){case 0:if(!n)return[3,5];if(q.debug("Failed to get the session from user",e),!this.isSessionInvalid(n))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return t=s.sent(),i(new Error("Session is invalid due to: "+n.message+" and failed to clean up invalid session: "+t.message)),[2];case 4:return i(n),[2];case 5:return q.debug("Succeed to get the user session",o),r(o),[2]}})})},{clientMetadata:n})})},e.prototype.currentUserCredentials=function(){return B(this,void 0,void 0,function(){var e,t,n=this;return z(this,function(r){switch(r.label){case 0:q.debug("Getting current user credentials"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[3,4];case 3:throw e=r.sent(),q.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(i){q.debug("failed to get or parse item aws-amplify-federatedInfo",i)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then(function(e){return q.debug("getting session success",e),n.Credentials.set(e,"session")}
2).catch(function(){return q.debug("getting guest credentials"),n.Credentials.set(null,"guest")})]}})})},e.prototype.currentCredentials=function(){return q.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,n){return void 0===n&&(n=this._config.clientMetadata),new Promise(function(r,i){e.getAttributeVerificationCode(t,{onSuccess:function(e){return r(e)},onFailure:function(e){return i(e)}},n)})},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise(function(r,i){e.verifyAttribute(t,n,{onSuccess:function(e){r(e)},onFailure:function(e){i(e)}})}):this.rejectAuthError(i.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then(function(n){return t.verifyUserAttribute(n,e)})},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then(function(r){return n.verifyUserAttributeSubmit(r,e,t)})},e.prototype.cognitoIdentitySignOut=function(e,t){return B(this,void 0,void 0,function(){var n,r,i=this;return z(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),q.debug("Failed to sync cache info into memory",n),n;case 3:return r=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(n,o){if(e&&e.global){q.debug("user global sign out",t);var s=i._config.clientMetadata;t.getSession(function(e,s){return B(i,void 0,void 0,function(){var i,s=this;return z(this,function(a){switch(a.label){case 0:if(!e)return[3,5];if(q.debug("failed to get the user session",e),!this.isSessionInvalid(e))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),o(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,o(e)];case 5:return t.globalSignOut({onSuccess:function(e){if(q.debug("global sign out success"),!r)return n();s.oAuthSignOutRedirect(n,o)},onFailure:function(e){return q.debug("global sign out failed",e),o(e)}}),[2]}})})},{clientMetadata:s})}else q.debug("user sign out",t),t.signOut(function(){if(!r)return n();i.oAuthSignOutRedirect(n,o)})})]}})})},e.prototype.oAuthSignOutRedirect=function(e,t){(0,d.gy)().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout(function(){return e(Error("Signout timeout fail"))},3e3)},e.prototype.signOut=function(e){return B(this,void 0,void 0,function(){var t;return z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return n.sent(),[3,3];case 2:return n.sent(),q.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return n.sent(),[3,6];case 5:q.debug("no current Cognito user"),n.label=6;case 6:return[3,8];case 7:q.debug("no Cognito User pool"),n.label=8;case 8:return K("signOut",this.user,"A user has been signed out"),this.user=null,[2]}})})},e.prototype.cleanCachedItems=function(){return B(this,void 0,void 0,function(){return z(this,function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}})})},e.prototype.changePassword=function(e,t,n,r){var i=this;return void 0===r&&(r=this._config.clientMetadata),new Promise(function(o,s){i.userSession(e).then(function(i){e.changePassword(t,n,function(e,t){return e?(q.debug("change password failure",e),s(e)):o(t)},r)})})},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var n=this.createCognitoUser(e);return new Promise(function(r,i){n.forgotPassword({onSuccess:function(){r()},onFailure:function(t){q.debug("forgot password failure",t),K("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){K("forgotPassword",n,e+" has initiated forgot password flow"),r(t)}},t)})},e.prototype.forgotPasswordSubmit=function(e,t,n,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);if(!n)return this.rejectAuthError(i.EmptyPassword);var o=this.createCognitoUser(e);return new Promise(function(i,s){o.confirmPassword(t,n,{onSuccess:function(t){K("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i(t)}
2,onFailure:function(t){K("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},r)})},e.prototype.currentUserInfo=function(){return B(this,void 0,void 0,function(){var e,t,n,r,i,o,s;return z(this,function(a){switch(a.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch(function(e){return q.error(e)})];case 1:if(!(s=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(s)];case 3:t=a.sent(),n=this.attributesToObject(t),r=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return r=a.sent(),[3,7];case 6:return i=a.sent(),q.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:r?r.identityId:void 0,username:s.getUsername(),attributes:n}];case 8:return o=a.sent(),q.error("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(s=this.user)||{}]:[2]}})})},e.prototype.federatedSignIn=function(e,t,n){return B(this,void 0,void 0,function(){var i,o,u,c,l,f,h,d,p,g,y;return z(this,function(v){switch(v.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if("undefined"===typeof e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return s(e)||(b=e)&&["customProvider"].find(function(e){return b.hasOwnProperty(e)})||function(e){return e&&!!["customState"].find(function(t){return e.hasOwnProperty(t)})}(e)||"undefined"===typeof e?(i=e||{provider:r.Cognito},l=s(i)?i.provider:i.customProvider,s(i),o=i.customState,this._config.userPoolId&&(u=a(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,c=a(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,c,u,l,o)),[3,4]):[3,1];case 1:l=e;try{(f=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&q.warn("There is already a signed in user: "+f+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(m){}return h=t.token,d=t.identity_id,p=t.expires_at,[4,this.Credentials.set({provider:l,token:h,identity_id:d,user:n,expires_at:p},"federation")];case 2:return g=v.sent(),[4,this.currentAuthenticatedUser()];case 3:return y=v.sent(),K("signIn",y,"A user "+y.username+" has been signed in"),q.debug("federated sign in credentials",g),[2,g];case 4:return[2]}var b})})},e.prototype._handleAuthResponse=function(e){return B(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u,c,l,f,h,p,g;return z(this,function(y){switch(y.label){case 0:if(this.oAuthFlowInProgress)return q.debug("Skipping URL "+e+" current flow in progress"),[2];y.label=1;case 1:if(y.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(K("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||((0,d.gy)().isBrowser?window.location.href:""),n=!!((0,m.parse)(t).query||"").split("&").map(function(e){return e.split("=")}).find(function(e){var t=W(e,1)[0];return"code"===t||"error"===t}),r=!!((0,m.parse)(t).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).find(function(e){var t=W(e,1)[0];return"access_token"===t||"error"===t}),!n&&!r)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),y.label=2;case 2:return y.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return i=y.sent(),o=i.accessToken,s=i.idToken,a=i.refreshToken,u=i.state,c=new b.p4({IdToken:new b.Yw({IdToken:s}),RefreshToken:new b.c9({RefreshToken:a}),AccessToken:new b.pD({AccessToken:o})}),l=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];case 4:l=y.sent(),q.debug("AWS credentials",l),y.label=5;case 5:return f=/-/.test(u),(h=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&"undefined"!==typeof window.history&&window.history.replaceState({}
2,null,this._config.oauth.redirectSignIn),K("signIn",h,"A user "+h.getUsername()+" has been signed in"),K("cognitoHostedUI",h,"A user "+h.getUsername()+" has been signed in via Cognito Hosted UI"),f&&(p=u.split("-").splice(1).join("-"),K("customOAuthState",p.match(/.{2}/g).map(function(e){return String.fromCharCode(parseInt(e,16))}).join(""),"State for user "+h.getUsername())),[2,l];case 6:return g=y.sent(),q.debug("Error in cognito hosted auth response",g),window&&"undefined"!==typeof window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),K("signIn_failure",g,"The OAuth response flow failed"),K("cognitoHostedUI_failure",g,"A failure occurred when returning to the Cognito Hosted UI"),K("customState_failure",g,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}})})},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,n={};return e&&e.map(function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?n[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:n[e.Name]=e.Value}),n},e.prototype.isTruthyString=function(e){return"function"===typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var n=this._config.authenticationFlowType,r=new b.TU(t);return n&&r.setAuthenticationFlowType(n),r},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"===typeof e.getItem&&"function"===typeof e.setItem&&"function"===typeof e.removeItem&&"function"===typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i.NoConfig:i.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new R(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new F(e))},e.prototype.rememberDevice=function(){return B(this,void 0,void 0,function(){var e,t;return z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:return t=n.sent(),q.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,n){e.setDeviceStatusRemembered({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?n(new R(i.DeviceConfig)):"NetworkError"===e.code?n(new R(i.NetworkError)):n(e)}})})]}})})},e.prototype.forgetDevice=function(){return B(this,void 0,void 0,function(){var e,t;return z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:return t=n.sent(),q.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,n){e.forgetDevice({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?n(new R(i.DeviceConfig)):"NetworkError"===e.code?n(new R(i.NetworkError)):n(e)}})})]}})})},e.prototype.fetchDevices=function(){return B(this,void 0,void 0,function(){var e,t;return z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:throw t=n.sent(),q.debug("The user is not authenticated by the error",t),new Error("The user is not authenticated");case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,n){var r={onSuccess:function(e){var n=e.Devices.map(function(e){var t=e.DeviceAttributes.find(function(e){return"device_name"===e.Name})||{};return{id:e.DeviceKey,name:t.Value}});t(n)},onFailure:function(e){"InvalidParameterException"===e.code?n(new R(i.DeviceConfig)):"NetworkError"===e.code?n(new R(i.NetworkError)):n(e)}};e.listDevices(60,null,r)})]}})})},e}())(null);v.HA.register(V)}
2,15902:(e,t,n)=>{n.d(t,{Ji:()=>U});var r=n(46614),i=n(7444),o=n(33267),s=n(60921),a=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},u=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=new r.C("CognitoCredentials"),l=new Promise(function(e,t){return(0,o.gy)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(c.debug("google api already loaded"),e()):void setTimeout(function(){return e()},2e3):(c.debug("not in the browser, directly resolved"),e())}),f=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(c.debug("need to wait for the Google SDK loaded"),[4,l]);case 1:e.sent(),this.initialized=!0,c.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}})})},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return(0,o.gy)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise(function(t,n){e.getAuthInstance().then(function(e){e||(c.debug("google Auth undefined"),n(new s.OI("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(c.debug("refreshing the google access token"),r.reloadAuthResponse().then(function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})}).catch(function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new s.OI("Failed to reload google auth response"))})):n(new s.OI("User is not signed in with Google"))}).catch(function(e){c.debug("Failed to refresh google token",e),n(new s.OI("Failed to refresh google token"))})}):(c.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}();var h=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},d=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},p=new r.C("CognitoCredentials"),g=new Promise(function(e,t){return(0,o.gy)().isBrowser?window.FB?(p.debug("FB SDK already loaded"),e()):void setTimeout(function(){return e()},2e3):(p.debug("not in the browser, directly resolved"),e())}),y=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return h(this,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(p.debug("need to wait for the Facebook SDK loaded"),[4,g]);case 1:e.sent(),this.initialized=!0,p.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}})})},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if((0,o.gy)().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return p.debug(t),Promise.reject(new s.OI(t))}return new Promise(function(t,n){e.getLoginStatus(function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,o=1e3*r.expires
2In+(new Date).getTime();if(!i){a="the jwtToken is undefined";p.debug(a),n(new s.OI(a))}t({token:i,expires_at:o})}else{var a="no response from facebook when refreshing the jwt token";p.debug(a),n(new s.OI(a))}},{scope:"public_profile,email"})})},e}();var v=new f,b=new y,m=n(79906),_=n(17772),w=n(58323),I=n(10032),S=n(25994),A=n(70902),P=n(88218),C=function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},C.apply(this,arguments)};function k(e){var t=new A.D({region:e.region,customUserAgent:(0,P.fE)()});return t.middlewareStack.add(function(e,t){return function(t){return e(function(e){return C(C({},e),{request:C(C({},e.request),{headers:C(C({},e.request.headers),{"cache-control":"no-store"})})})}(t))}},{step:"build",name:"cacheControlMiddleWare"}),t}var O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},O.apply(this,arguments)},E=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},T=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},x=new r.C("Credentials"),U=new(function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=v.refreshGoogleToken,this._refreshHandlers.facebook=b.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=O(O({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new i.i1).getStorage()),this._storageSync=Promise.resolve(),"function"===typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return x.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"CognitoIdentityId-"+e},e.prototype._pickupCredentials=function(){return x.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?x.debug("getting old cred promise"):(x.debug("getting new cred promise"),this._gettingCredPromise=(0,o.VN)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return E(this,void 0,void 0,function(){var e,t,n,r,i,o,s;return T(this,function(a){switch(a.label){case 0:if(x.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return x.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(x.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?m.HA.Auth:t)||"function"!==typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];x.debug("ttl has passed but token is not yet expired"),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=a.sent(),[4,n.currentSession()];case 3:return i=a.sent(),o=i.refreshToken,[4,new Promise(function(e,t){r.refreshSession(o,function(n,r){return n?t(n):e(r)})})];case 4:return a.sent(),[3,6];case 5:return s=a.sent(),x.debug("Error attempting to refreshing the session",s),[3,6];case 6:return[2,n.currentUserCredentials()]}})})},e.prototype.refreshFederatedToken=function(e){x.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var s=this;return x.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(x.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:i,expires_at:o})):s._refreshHandlers[t]&&"function"===typeof s._refreshHandlers[t]?(x.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:s._refreshHandlers[t],provider:t,user:n})):(x.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,i=e.user;return(0,s.hu)(n,[],1e4).then(function(e){return x.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:i,identity_id:e.identity_id,expires_at:e.expires_at})}).catch(function(e){return"string"===typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),x.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)})},e.prototype._isExpired=function(e){if(!e)return x.debug("no credentials for expiration check"),!0;x.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return E(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,c=this;return T(this,function(l){switch(l.label){case 0:return x.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,e.mandatorySignIn?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:t?n?(i=this,[4,this._getGuestIdentityId()]):(x.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(x.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return r=i._identityId=l.sent(),o=k({region:n}),s=void 0,r?(a={identityId:r,client:o},s=(0,_.c)(a)()):(u=function(){return E(c,void 0,void 0,function(){var e,n;return T(this,function(r){switch(r.label){case 0:return[4,o.send(new I.x({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,n={client:o,identityId:e},[2,(0,_.c)(n)()]}})})},s=u().catch(function(e){return E(c,void 0,void 0,function(){return T(this,function(t){throw e})})})),[2,this._loadCredentials(s,"guest",!1,null).then(function(e){return e}).catch(function(e){return E(c,void 0,void 0,function(){var n,i=this;return T(this,function(a){switch(a.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '"+r+"' not found."?[3,2]:(x.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return a.sent(),n=function(){return E(i,void 0,void 0,function(){var e,n;return T(this,function(r){switch(r.label){case 0:return[4,o.send(new I.x({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,n={client:o,identityId:e},[2,(0,_.c)(n)()]}})})},s=n().catch(function(e){return E(i,void 0,void 0,function(){return T(this,function(t){throw e})})}),[2,this._loadCredentials(s,"guest",!1,null)];case 2:return[2,e]}})})})]}})})},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,r=e.identity_id,i={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!i)return Promise.reject("You must specify a federated provider");var o={};o[i]=n;var s=this._config,a=s.identityPoolId,u=s.region;if(!a)return x.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");
2if(!u)return x.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=k({region:u}),l=void 0;if(r){var f={identityId:r,logins:o,client:c};l=(0,_.c)(f)()}else{f={logins:o,identityPoolId:a,client:c};l=(0,w.s)(f)()}return this._loadCredentials(l,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;x.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,i=r.region,o=r.userPoolId,s=r.identityPoolId;if(!s)return x.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!i)return x.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var a={};a["cognito-idp."+i+".amazonaws.com/"+o]=n;var u=k({region:i}),c=E(t,void 0,void 0,function(){var e,t,n,r,i,o,c,l,f,h;return T(this,function(d){switch(d.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=d.sent())?[3,3]:[4,u.send(new I.x({IdentityPoolId:s,Logins:a}))];case 2:n=d.sent().IdentityId,t=n,d.label=3;case 3:return[4,u.send(new S.t({IdentityId:e||t,Logins:a}))];case 4:return r=d.sent(),i=r.Credentials,o=i.AccessKeyId,c=i.Expiration,l=i.SecretKey,f=i.SessionToken,h=r.IdentityId,this._identityId=h,e?(x.debug("The guest identity "+e+" has been successfully linked to the logins"),e===h&&x.debug("The guest identity "+e+" has become the primary identity"),[4,this._removeGuestIdentityId()]):[3,6];case 5:d.sent(),d.label=6;case 6:return[2,{accessKeyId:o,secretAccessKey:l,sessionToken:f,expiration:c,identityId:h}]}})}).catch(function(e){return E(t,void 0,void 0,function(){return T(this,function(t){throw e})})});return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var i=this,o=this;return new Promise(function(s,a){e.then(function(e){return E(i,void 0,void 0,function(){var i,a,u,c,l;return T(this,function(f){switch(f.label){case 0:if(x.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=n,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},r.user),a=r.provider,u=r.token,c=r.expires_at,l=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:u,user:i,expires_at:c,identity_id:l}))}catch(h){x.debug("Failed to put federated info into auth storage",h)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:f.sent(),f.label=2;case 2:return s(o._credentials),[2]}})})}).catch(function(t){if(t)return x.debug("Failed to load credentials",e),x.debug("Error loading credentials",t),void a(t)})})},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(x.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return E(this,void 0,void 0,function(){return T(this,function(e){return this._credentials=null,this._credentials_source=null,x.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]})})},e.prototype._getGuestIdentityId=function(){return E(this,void 0,void 0,function(){var e,t;return T(this,function(n){switch(n.label){case 0:e=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=n.sent(),x.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}})})},e.prototype._setGuestIdentityId=function(e){return E(this,void 0,void 0,function(){var t,n;return T(this,function(r){switch(r.label){case 0:t=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return n=r.sent(),x.debug("Failed to cache guest identityId",n),[3,4];case 4:return[2]}})})},e.prototype._removeGuestIdentityId=function(){return E(this,void 0,void 0,function(){var e;return T(this,function(t){return e=this._config.identityPoolId,x.debug("removing "+this._getCognitoIdentityIdStorageKey(e)+" from storage"),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]})})},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}())(null);m.HA.register(U)},19373:(e,t,n)=>
2{Object.defineProperty(t,"__esModule",{value:!0});var r=n(23857),i=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var i=this.bufferLength;i<r.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(r.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var h=this.temp[f-2],d=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[f-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[f]=(d+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=u,u=a,a=s+g|0,s=o,o=i,i=n,n=g+y|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},23588:(e,t,n)=>{n.d(t,{l2:()=>p,Ay:()=>g});var r=n(79906),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(n(7444).i1)).getStorage()};function o(e){var t=0;t=e.length;for(var n=e.length;n>=0;n-=1){var r=e.charCodeAt(n);r>127&&r<=2047?t+=1:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&(n-=1)}return t}function s(){return(new Date).getTime()}function a(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var u={},c=(function(){function e(){}e.clear=function(){u={}},e.getItem=function(e){return u[e]||null},e.setItem=function(e,t){u[e]=t},e.removeItem=function(e){delete u[e]}}(),n(46614)),l=new c.C("StorageCache"),f=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){a(this.config.capacityInBytes)||(l.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),a(this.config.itemMaxSize)||(l.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),a(this.config.defaultTTL)||(l.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),a(this.config.defaultPriority)||(l.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(l.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(l.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(l.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(l.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:s(),visitedTime:s(),priority:n.priority,expires:n.expires,type:typeof t,byteSize:0};return r.byteSize=o(JSON.stringify(r)),r.byteSize=o(JSON.stringify(r)),r},e.prototype.configure=function(e){return e?(e.keyPrefix&&l.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}();var h=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=new c.C("Cache"),p=new(function(e){function t(t){var n=this,r=t?Object.assign({},i,t):i;return(n=e.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return h(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=s(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return s()>=n.expires},t.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(n){this._decreaseCurSizeInBytes(t.byteSize),d.error("Failed to set item "+n)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var s=JSON.parse(o);n.push(s)}}n.sort(function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1});for(i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){d.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if("undefined"!==typeof t){var i={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+s()};if(i.priority<1||i.priority>5)d.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,t,i);if(o.byteSize>this.config.itemMaxSize)d.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var a=this.config.storage.getItem(r);if(a&&this._removeItem(r,JSON.parse(a).byteSize),this._isCacheFull(o.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(u,c)}}this._setItem(r,o)}catch(l){d.warn("setItem failed! "+l)}}}else d.warn("The value of item should not be undefined!");else d.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){d.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return d.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(s){return d.warn("getItem failed! "+s),null}},t.prototype.removeItem=function(e){d.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(r){d.warn("removeItem failed! "+r)}},t.prototype.clear=function(){d.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(r){d.warn("clear failed! "+r)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&e.push(n.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==i.keyPrefix||(d.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=s.toString()),new t(e)},t}(f));const g=p;r.HA.register(p)},23857:(e,t)=>
2{Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},33267:(e,t,n)=>{n.d(t,{VN:()=>f,gy:()=>d,p7:()=>h});var r=n(74351),i=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],o=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},s=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort(function(e,n){var i=e[t],o=n[t];return"undefined"===typeof o?"undefined"===typeof i?0:1*r:"undefined"===typeof i||i<o?-1*r:i>o?1*r:0}),!0},a=function(e,t){var n=Object.assign({},e);return t&&("string"===typeof t?delete n[t]:t.forEach(function(e){delete n[e]})),n},u=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),r=i.filter(function(e){return n.endsWith("."+e.ext)});return r.length>0?r[0].type:t},c=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},l=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(62*Math.random())];return e},f=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then(function(e){return r=!0,t=!1,e},function(e){throw n=!0,t=!1,e});return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},h=function(){if("undefined"===typeof self)return!1;var e=self;return"undefined"!==typeof e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!==typeof window&&"undefined"!==typeof window.document,isNode:"undefined"!==typeof r&&null!=r.versions&&null!=r.versions.node}},p=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!y(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=n.includes(i)?e[i]:p(e[i],t,n)}return r},g=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!y(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=n.includes(i)?e[i]:g(e[i],t,n)}return r},y=function(e){return e instanceof Object&&!(e instanceof Array)&&!(e instanceof Function)&&!(e instanceof Number)&&!(e instanceof String)&&!(e instanceof Boolean)};!function(){function e(){}e.isEmpty=o,e.sortByField=s,e.objectLessAttributes=a,e.filenameToContentType=u,e.isTextFile=c,e.generateRandomString=l,e.makeQuerablePromise=f,e.isWebWorker=h,e.browserOrNode=d,e.transferKeyToLowerCase=p,e.transferKeyToUpperCase=g,e.isStrictObject=y}()},34303:(e,t,n)=>{n.d(t,{Hm:()=>i,YJ:()=>s,bB:()=>o});var r="undefined"!==typeof Symbol&&"function"===typeof Symbol.for,i=r?Symbol.for("INT
2ERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",o=r?Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",s="x-amz-user-agent"},46614:(e,t,n)=>{n.d(t,{C:()=>u});var r,i=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(r||(r={}));var u=function(){function e(e,t){void 0===t&&(t=r.WARN),this.name=e,this.level=t,this._pluggables=[]}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var n,o,s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];var c=this.level;if(e.LOG_LEVEL&&(c=e.LOG_LEVEL),"undefined"!==typeof window&&window.LOG_LEVEL&&(c=window.LOG_LEVEL),a[t]>=a[c]){var l=console.log.bind(console);t===r.ERROR&&console.error&&(l=console.error.bind(console)),t===r.WARN&&console.warn&&(l=console.warn.bind(console));var f="["+t+"] "+this._ts()+" "+this.name,h="";if(1===s.length&&"string"===typeof s[0])l(h=f+" - "+s[0]);else if(1===s.length)h=f+" "+s[0],l(f,s[0]);else if("string"===typeof s[0]){var d=s.slice(1);1===d.length&&(d=d[0]),h=f+" - "+s[0]+" "+d,l(f+" - "+s[0],d)}else h=f+" "+s,l(f,s);try{for(var p=i(this._pluggables),g=p.next();!g.done;g=p.next()){var y=g.value,v={message:h,timestamp:Date.now()};y.pushLogs([v])}}catch(b){n={error:b}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&"Logging"===e.getCategoryName()&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}()},51070:(e,t,n)=>{n.d(t,{l:()=>P});for(var r=n(46614),i=n(85260),o={},s={},a=0;a<256;a++){var u=a.toString(16).toLowerCase();1===u.length&&(u="0"+u),o[a]=u,s[u]=a}function c(e){for(var t="",n=0;n<e.byteLength;n++)t+=o[e[n]];return t}var l=n(9270),f=n(3438),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},p=new r.C("Signer"),g="AWS4-HMAC-SHA256",y=function(e,t){var n=new i.Sha256(e);return n.update(t),n.digestSync()},v=function(e){var t=e||"",n=new i.Sha256;return n.update(t),c(n.digestSync())},b=function(e){return Object.keys(e).map(function(e){return e.toLowerCase()}).sort().join(";")},m=function(e){var t,n,r=(0,l.parse)(e.url);return[e.method||"/",encodeURIComponent(r.pathname).replace(/%2F/gi,"/"),(n=r.query,n&&0!==n.length?n.split("&").map(function(e){var t=e.split("=");if(1===t.length)return e;var n=t[1].replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()});return t[0]+"="+n}).sort(function(e,t){var n=e.split("=")[0],r=t.split("=")[0];return n===r?e<t?-1:1:n<r?-1:1}).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map(function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}}).sort(function(e,t){return e.key<t.key?-1:1}).map(function(e){return e.key+":"+e.value}).join("\n")+"\n":""),b(e.headers),v(e.data)].join("\n")},_=function(e){var t=((0,l.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},w=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},I=function(e,t,n,r){return[e,n,r,v(t)].join("\n")},S=function(e,t,n){p.debug(n);var r=y("AWS4"+e,t),i=y(r,n.region),o=y(i,n.service);return y(o,"aws4_request")},A=function(e,t){return c(y(e,t))},P=function(){function e(){}return e.sign=function(e,t,n){if(void 0===n&&(n=null),e.headers=e.headers||{},e.body&&!e.data)throw new Error('The attribute "body" was found on the request object. Please use the attribute "data" instead.');var r=f.E.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),i=r.substr(0,8),o=(0,l.parse)(e.url);e.headers.host=o.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var s=m(e);p.debug(s);var a=n||_(e),u=w(i,a.region,a.service),c=I(g,s,r,u),h=S(t.secret_key,i,a),d=A(h,c),y=function(e,t,n,r,i){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+i].join(", ")}(g,t.access_key,u,b(e.headers),d);return e.headers.Authorization=y,e},e.signUrl=function(e,t,n,r){var i="object"===typeof e?e.url:e,o="object"===typeof e?e.method:"GET",s="object"===typeof e?e.body:void 0,a=f.E.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),u=a.substr(0,8),c=(0,l.parse)(i,!0,!0),p=(c.search,d(c,["search"])),y={host:p.host},v=n||_({url:(0,l.format)(p)}),b=v.region,P=v.service,C=w(u,b,P),k=t.session_token&&"iotdevicegateway"!==P,O=h(h(h({"X-Amz-Algorithm":g,"X-Amz-Credential":[t.access_key,C].join("/"),"X-Amz-Date":a.substr(0,16)},k?{"X-Amz-Security-Token":""+t.session_token}:{}),r?{"X-Amz-Expires":""+r}:{}),{"X-Amz-SignedHeaders":Object.keys(y).join(",")}),E=m({method:o,url:(0,l.format)(h(h({},p),{query:h(h({},p.query),O)})),headers:y,data:s}),T=I(g,E,a,C),x=S(t.secret_key,u,{region:b,service:P}),U=A(x,T),j=h({"X-Amz-Signature":U},t.session_token&&{"X-Amz-Security-Token":t.session_token});return(0,l.format)({protocol:p.protocol,slashes:!0,hostname:p.hostname,port:p.port,pathname:p.pathname,query:h(h(h({},p.query),O),j)})},e}()},56947:(e,t,n)=>{n.d(t,{YM:()=>h});var r=n(88218),i=n(46614),o=new i.C("I18n"),s=function(){function e(e){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},e),this._lang=this._options.language,!this._lang&&"undefined"!==typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),o.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return"undefined"!==typeof t?t:e;var n=this._lang,r=this.getByLanguage(e,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(e,n.split("-")[0])),r||("undefined"!==typeof t?t:e))},e.prototype.getByLanguage=function(e,t,n){if(void 0===n&&(n=null),!t)return n;var r=this._dict[t];return r?r[e]:n},e.prototype.putVocabulariesForLanguage=function(e,t){var n=this._dict[e];n||(n=this._dict[e]={}),Object.assign(n,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map(function(n){t.putVocabulariesForLanguage(n,e[n])})},e}(),a=n(79906),u=new i.C("I18n"),c=null,l=null,f=function(){function e(){}return e.configure=function(t){return u.debug("configure I18n"),t?(c=Object.assign({},c,t.I18n||t),e.createInstance(),c):c},e.getModuleName=function(){return"I18n"},e.createInstance=function(){u.debug("create I18n instance"),l||(l=new s(c))},e.setLanguage=function(t){return e.checkConfig(),l.setLanguage(t)},e.get=function(t,n){return e.checkConfig()?l.get(t,n):"undefined"===typeof n?t:n},e.putVocabulariesForLanguage=function(t,n){return e.checkConfig(),l.putVocabulariesForLanguage(t,n)},e.putVocabularies=function(t){return e.checkConfig(),l.putVocabularies(t)},e.checkConfig=function(){return l||(l=new s(c)),!0},e}();a.HA.register(f);n(15902);var h={userAgent:r.OD.userAgent}}
2,57648:(e,t,n)=>{var r=n(5889),i="undefined"===typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"===typeof i[r[t]]&&(e[e.length]=r[t]);return e}},60921:(e,t,n)=>{n.d(t,{OI:()=>l,hu:()=>h});var r=n(46614),i=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},u=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},c=new r.C("Util"),l=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return i(t,e),t}(Error);var f=3e5;var h=function(e,t,n,r){return void 0===n&&(n=f),function(e,t,n,r){return o(this,void 0,void 0,function(){var i=this;return s(this,function(a){if("function"!==typeof e)throw Error("functionToRetry must be a function");return[2,new Promise(function(a,l){return o(i,void 0,void 0,function(){var i,o,f,h,d,p,g;return s(this,function(y){switch(y.label){case 0:i=0,o=!1,h=function(){},r&&r.then(function(){o=!0,clearTimeout(f),h()}),p=function(){var r,p,g,y;return s(this,function(s){switch(s.label){case 0:i++,c.debug(e.name+" attempt #"+i+" with this vars: "+JSON.stringify(t)),s.label=1;case 1:return s.trys.push([1,3,,7]),r={},p=a,[4,e.apply(void 0,u(t))];case 2:return[2,(r.value=p.apply(void 0,[s.sent()]),r)];case 3:return g=s.sent(),d=g,c.debug("error on "+e.name,g),(v=g)&&v.nonRetryable?(c.debug(e.name+" non retryable error",g),[2,{value:l(g)}]):(y=n(i,t,g),c.debug(e.name+" retrying in "+y+" ms"),!1===y||o?[2,{value:l(g)}]:[3,4]);case 4:return[4,new Promise(function(e){h=e,f=setTimeout(h,y)})];case 5:s.sent(),s.label=6;case 6:return[3,7];case 7:return[2]}var v})},y.label=1;case 1:return o?[3,3]:[5,p()];case 2:return"object"===typeof(g=y.sent())?[2,g.value]:[3,1];case 3:return l(d),[2]}})})})]})})}(e,t,function(e){return void 0===e&&(e=f),function(t){var n=100*Math.pow(2,t)+100*Math.random();return!(n>e)&&n}}(n),r)}},61012:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>m,__asyncValues:()=>w,__await:()=>b,__awaiter:()=>l,__classPrivateFieldGet:()=>P,__classPrivateFieldSet:()=>C,__createBinding:()=>h,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>f,__importDefault:()=>A,__importStar:()=>
vendor: 5,214 bytes, line 2
2S,__makeTemplateObject:()=>I,__metadata:()=>c,__param:()=>u,__read:()=>g,__rest:()=>s,__spread:()=>y,__spreadArrays:()=>v,__values:()=>p});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function h(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function d(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})})}function a(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,i,(t=e[n](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
2function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}function P(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},64382:(e,t,n)=>{n.r(t),n.d(t,{fromUtf8:()=>r,toUtf8:()=>i});var r=function(e){return"function"===typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296===(64512&i)&&56320===(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"===typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++n],e[++n],e[++n]].map(function(e){return e.toString(16)}).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},71977:(e,t,n)=>{n.d(t,{YZ:()=>c});var r=n(46614),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=new r.C("Hub"),u="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var c=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find(function(t){return t.pattern.source===e.source});if(!n)return void a.warn("No listeners for "+e);this.patterns=s(this.patterns.filter(function(e){return e!==n}))}else{var r=this.listeners[e];if(!r)return void a.warn("No listeners for "+e);this.listeners[e]=s(r.filter(function(e){return e.callback!==t}))}},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===u||a.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:i({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(s){a.error(s)}},e.prototype.listen=function(e,t,n){var r,i=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))a.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!==typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:r})}return function(){i.remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach(function(r){a.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(i){a.error(i)}}),this.patterns.length>0){if(!n.message)return void a.warn("Cannot perform pattern matching without a message 
2key");var s=n.message;this.patterns.forEach(function(t){var n=s.match(t.pattern);if(n){var r=o(n).slice(1),u=i(i({},e),{patternInfo:r});try{t.callback(u)}catch(c){a.error(c)}}})}},e}())("__default__")},79906:(e,t,n)=>{n.d(t,{HA:()=>s});var r=n(46614),i=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=new r.C("Amplify"),s=new(function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=r.C,this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"===typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEach(function(e){var n=i(e,2),r=(n[0],n[1]);Object.keys(r).forEach(function(e){t._modules[e]&&(r[e]=t._modules[e])})}),this._components.map(function(e){e.configure(t._config)}),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"===typeof e.getCategory&&this._components.map(function(t){t.addPluggable&&"function"===typeof t.addPluggable&&t.addPluggable(e)})},e}())},85260:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),n(61012).__exportStar(n(99858),t)},88218:(e,t,n)=>{n.d(t,{OD:()=>i,fE:()=>o});var r="aws-amplify/4.7.14",i={userAgent:r+" js",product:"",navigator:null,isReactNative:!1};if("undefined"!==typeof navigator&&navigator.product)if(i.product=navigator.product||"",i.navigator=navigator||null,"ReactNative"===navigator.product)i.userAgent=r+" react-native",i.isReactNative=!0;else i.userAgent=r+" js",i.isReactNative=!1;var o=function(e){return""+i.userAgent+(e||"")}},89335:(e,t,n)=>{n.d(t,{default:()=>c});var r=n(79906),i=n(46614),o=n(33267),s=function(){function e(){this._logger=new i.C("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===e&&(e="/service-worker.js"),void 0===t&&(t="/"),this._logger.debug("registering "+e),this._logger.debug("registering service worker with scope "+t),new Promise(function(r,i){if(!navigator||!("serviceWorker"in navigator))return i(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then(function(e){return e.installing?n._serviceWorker=e.installing:e.waiting?n._serviceWorker=e.waiting:e.active&&(n._serviceWorker=e.active),n._registration=e,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+e),r(e)}).catch(function(e){return n._logger.debug("Service Worker Registration Failed "+e),i(e)})})},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise(function(n,r){if(!(0,o.gy)().isBrowser)return r(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then(function(r){if(!r)return t._logger.debug("User is NOT subscribed to push"),t._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t._urlB64ToUint8Array(e)}).then(function(e){t._subscription=e,t._logger.debug("User subscribed: "+JSON.stringify(e)),n(e)}).catch(function(e){t._logger.error(e)});t._subscription=r,t._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)})})},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"===typeof e?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",function(t){var n=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+n),r.HA.Analytics&&"function"===typeof r.HA.Analytics.record&&r.HA.Analytics.record({name:"ServiceWorker",attributes:{state:n}})}),this._serviceWorker.addEventListener("message",function(t){e._logger.debug("ServiceWorker message event: "+t)})},e}();var a=n(14958),u=n(23588);n(40458),n(42225);r.HA.Auth=a.N,r.HA.Cache=u.l2,r.HA.ServiceWorker=s;const c=r.HA},92719:(e,t,n)=>{n.d(t,{iX:()=>a});var r=n(46614),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=new r.C("Parser"),s=function(e){var t,n={};if(e.aws_mobile_analytics_app_id){var r={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};n.Analytics=r}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(n.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_regi
2on,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(n.Logging=i(i({},e.Logging),{region:e.aws_project_region})),e.geo&&(n.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(n.Geo={AmazonLocationService:e.geo.amazon_location_service})),n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),n.Logging=Object.assign({},n.Logging,e.Logging),o.debug("parse config",e,"to amplifyconfig",n),n},a=function(){function e(){}return e.parseMobilehubConfig=s,e}()},99858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(61012),i=n(23857),o=n(19373),s=n(64382),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=u(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!function(e){if("string"===typeof e)return 0===e.length;return 0===e.byteLength}(e)&&!this.error)try{this.hash.update(u(e))}catch(t){this.error=t}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e}();function u(e){return"string"===typeof e?s.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.