@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
2 lines • 68 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["vendors~App-7KZ9F~092158aa"],{"../node_modules/@aws-amplify/api/lib-esm/index.js":function(e,t,n){function getLocation(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function highlightSourceAtLocation(e,t){var n=e.locationOffset.column-1,r=whitespace(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,c=t.column+s,u=r.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(a,":").concat(c,")\n")+function printPrefixedLines(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=0,r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var c=a.value[0];n=Math.max(n,c.length)}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return t.map((function(e){var t=e[0],r=e[1];return function lpad(e,t){return whitespace(e-t.length)+t}(n,t)+r})).join("\n")}([["".concat(a-1,": "),u[i-1]],["".concat(a,": "),u[i]],["",whitespace(c-1)+"^"],["".concat(a+1,": "),u[i+1]]])}function whitespace(e){return Array(e+1).join(" ")}function GraphQLError(e,t,n,r,i,o,a){var s=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,c=n;if(!c&&s){var u=s[0];c=u&&u.loc&&u.loc.source}var p,l=r;!l&&s&&(l=s.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),l&&0===l.length&&(l=void 0),r&&n?p=r.map((function(e){return getLocation(n,e)})):s&&(p=s.reduce((function(e,t){return t.loc&&e.push(getLocation(t.loc.source,t.loc.start)),e}),[]));var f=a||o&&o.extensions;Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:p||void 0,enumerable:Boolean(p)},path:{value:i||void 0,enumerable:Boolean(i)},nodes:{value:s||void 0},source:{value:c||void 0},positions:{value:l||void 0},originalError:{value:o},extensions:{value:f||void 0,enumerable:Boolean(f)}}),o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}GraphQLError.prototype=Object.create(Error.prototype,{constructor:{value:GraphQLError},name:{value:"GraphQLError"},toString:{value:function toString(){return function printError(e){var t=[];if(e.nodes){var n=!0,r=!1,i=void 0;try{for(var o,a=e.nodes[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.loc&&t.push(highlightSourceAtLocation(s.loc.source,getLocation(s.loc.source,s.loc.start)))}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}else if(e.source&&e.locations){var c=e.source,u=!0,p=!1,l=void 0;try{for(var f,h=e.locations[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var d=f.value;t.push(highlightSourceAtLocation(c,d))}}catch(e){p=!0,l=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw l}}}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}(this)}}});var r={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},i={};function isNode(e){return Boolean(e&&"string"==typeof e.kind)}function getVisitFn(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}function print(e){return function visit(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=void 0,a=Array.isArray(e),s=[e],c=-1,u=[],p=void 0,l=void 0,f=void 0,h=[],d=[],y=e;do{var v=++c===s.length,m=v&&0!==u.length;if(v){if(l=0===d.length?void 0:h[h.length-1],p=f,f=d.pop(),m){if(a)p=p.slice();else{var g={};for(var I in p)p.hasOwnProperty(I)&&(g[I]=p[I]);p=g}for(var E=0,N=0;N<u.length;N++){var T=u[N][0],b=u[N][1];a&&(T-=E),a&&null===b?(p.splice(T,1),E++):p[T]=b}}c=o.index,s=o.keys,u=o.edits,a=o.inArray,o=o.prev}else{if(l=f?a?c:s[c]:void 0,null==(p=f?f[l]:y))continue;f&&h.push(l)}var _=void 0;if(!Array.isArray(p)){if(!isNode(p))throw new Error("Invalid AST Node: "+JSON.stringify(p));var S=getVisitFn(t,p.kind,v);if(S){if((_=S.call(t,p,l,f,h,d))===i)break;if(!1===_){if(!v){h.pop();continue}}else if(void 0!==_&&(u.push([l,_]),!v)){if(!isNode(_)){h.pop();continue}p=_}}}void 0===_&&m&&u.push([l,p]),v?h.pop():(o={inArray:a,index:c,keys:s,edits:u,prev:o},s=(a=Array.isArray(p))?p:n[p.kind]||[],c=-1,u=[],f&&d.push(f),f=p)}while(void 0!==o);return 0!==u.length&&(y=u[u.length-1][1]),y}(e,{leave:o})}var o={Name:function Name(e){return e.value},Variable:function Variable(e){return"$"+e.name},Document:function Document(e){return join(e.definitions,"\n\n")+"\n"},OperationDefinition:function OperationDefinition(e){var t=e.operation,n=e.name,r=wrap("(",join(e.variableDefinitions,", "),")"),i=join(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?join([t,join([n,r]),i,o]," "):o},VariableDefinition:function VariableDefinition(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+wrap(" = ",r)+wrap(" ",join(i," "))},SelectionSet:function SelectionSet(e){return block(e.selections)},Field:function Field(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return join([wrap("",t,": ")+n+wrap("(",join(r,", "),")"),join(i," "),o]," ")},Argument:function Argument(e){return e.name+": "+e.value},FragmentSpread:function FragmentSpread(e){return"..."+e.name+wrap(" ",join(e.directives," "))},InlineFragment:function InlineFragment(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return join(["...",wrap("on ",t),join(n," "),r]," ")},FragmentDefinition:function FragmentDefinition(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return("fragment ".concat(t).concat(wrap("(",join(r,", "),")")," ")+"on ".concat(n," ").concat(wrap("",join(i," ")," "))+o)},IntValue:function IntValue(e){return e.value},FloatValue:function FloatValue(e){return e.value},StringValue:function StringValue(e,t){var n=e.value;return e.block?function printBlockString(e,t){var n=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'.concat(t?n:indent(n),'\n"""'):'"""'.concat(n.replace(/"$/,'"\n'),'"""')}(n,"description"===t):JSON.stringify(n)},BooleanValue:function BooleanValue(e){return e.value?"true":"false"},NullValue:function NullValue(){return"null"},EnumValue:function EnumValue(e){return e.value},ListValue:function ListValue(e){return"["+join(e.values,", ")+"]"},ObjectValue:function ObjectValue(e){return"{"+join(e.fields,", ")+"}"},ObjectField:function ObjectField(e){return e.name+": "+e.value},Directive:function Directive(e){return"@"+e.name+wrap("(",join(e.arguments,", "),")")},NamedType:function NamedType(e){return e.name},ListType:function ListType(e){return"["+e.type+"]"},NonNullType:function NonNullType(e){return e.type+"!"},SchemaDefinition:function SchemaDefinition(e){var t=e.directives,n=e.operationTypes;return join(["schema",join(t," "),block(n)]," ")},OperationTypeDefinition:function OperationTypeDefinition(e){return e.operation+": "+e.type},ScalarTypeDefinition:addDescription((function(e){return join(["scalar",e.name,join(e.directives," ")]," ")})),ObjectTypeDefinition:addDescription((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return join(["type",t,wrap("implements ",join(n," & ")),join(r," "),block(i)]," ")})),FieldDefinition:addDescription((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(n.every((function(e){return-1===e.indexOf("\n")}))?wrap("(",join(n,", "),")"):wrap("(\n",indent(join(n,"\n")),"\n)"))+": "+r+wrap(" ",join(i," "))})),InputValueDefinition:addDescription((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return join([t+": "+n,wrap("= ",r),join(i," ")]," ")})),InterfaceTypeDefinition:addDescription((function(e){var t=e.name,n=e.directives,r=e.fields;return join(["interface",t,join(n," "),block(r)]," ")})),UnionTypeDefinition:addDescription((function(e){var t=e.name,n=e.directives,r=e.types;return join(["union",t,join(n," "),r&&0!==r.length?"= "+join(r," | "):""]," ")})),EnumTypeDefinition:addDescription((function(e){var t=e.name,n=e.directives,r=e.values;return join(["enum",t,join(n," "),block(r)]," ")})),EnumValueDefinition:addDescription((function(e){return join([e.name,join(e.directives," ")]," ")})),InputObjectTypeDefinition:addDescription((function(e){var t=e.name,n=e.directives,r=e.fields;return join(["input",t,join(n," "),block(r)]," ")})),DirectiveDefinition:addDescription((function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+(n.every((function(e){return-1===e.indexOf("\n")}))?wrap("(",join(n,", "),")"):wrap("(\n",indent(join(n,"\n")),"\n)"))+" on "+join(r," | ")})),SchemaExtension:function SchemaExtension(e){var t=e.directives,n=e.operationTypes;return join(["extend schema",join(t," "),block(n)]," ")},ScalarTypeExtension:function ScalarTypeExtension(e){return join(["extend scalar",e.name,join(e.directives," ")]," ")},ObjectTypeExtension:function ObjectTypeExtension(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return join(["extend type",t,wrap("implements ",join(n," & ")),join(r," "),block(i)]," ")},InterfaceTypeExtension:function InterfaceTypeExtension(e){var t=e.name,n=e.directives,r=e.fields;return join(["extend interface",t,join(n," "),block(r)]," ")},UnionTypeExtension:function UnionTypeExtension(e){var t=e.name,n=e.directives,r=e.types;return join(["extend union",t,join(n," "),r&&0!==r.length?"= "+join(r," | "):""]," ")},EnumTypeExtension:function EnumTypeExtension(e){var t=e.name,n=e.directives,r=e.values;return join(["extend enum",t,join(n," "),block(r)]," ")},InputObjectTypeExtension:function InputObjectTypeExtension(e){var t=e.name,n=e.directives,r=e.fields;return join(["extend input",t,join(n," "),block(r)]," ")}};function addDescription(e){return function(t){return join([t.description,e(t)],"\n")}}function join(e,t){return e?e.filter((function(e){return e})).join(t||""):""}function block(e){return e&&0!==e.length?"{\n"+indent(join(e,"\n"))+"\n}":""}function wrap(e,t,n){return t?e+t+(n||""):""}function indent(e){return e&&" "+e.replace(/\n/g,"\n ")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function inspect(e){return e&&"object"===_typeof(e)?"function"==typeof e.inspect?e.inspect():Array.isArray(e)?"["+e.map(inspect).join(", ")+"]":"{"+Object.keys(e).map((function(t){return"".concat(t,": ").concat(inspect(e[t]))})).join(", ")+"}":"string"==typeof e?'"'+e+'"':"function"==typeof e?"[function ".concat(e.name,"]"):String(e)}function invariant(e,t){if(!e)throw new Error(t)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function Source(e,t,n){_defineProperty(this,"body",void 0),_defineProperty(this,"name",void 0),_defineProperty(this,"locationOffset",void 0),this.body=e,this.name=t||"GraphQL request",this.locationOffset=n||{line:1,column:1},this.locationOffset.line>0||invariant(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||invariant(0,"column in locationOffset is 1-indexed and must be positive")};function syntaxError(e,t,n){return new GraphQLError("Syntax Error: ".concat(n),void 0,e,[t])}function blockStringValue(e){for(var t=e.split(/\r\n|[\n\r]/g),n=null,r=1;r<t.length;r++){var i=t[r],o=leadingWhitespace(i);if(o<i.length&&(null===n||o<n)&&0===(n=o))break}if(n)for(var a=1;a<t.length;a++)t[a]=t[a].slice(n);for(;t.length>0&&isBlank(t[0]);)t.shift();for(;t.length>0&&isBlank(t[t.length-1]);)t.pop();return t.join("\n")}function leadingWhitespace(e){for(var t=0;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;return t}function isBlank(e){return leadingWhitespace(e)===e.length}function createLexer(e,t){var n=new Tok(s.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:advanceLexer,lookahead:lookahead}}function advanceLexer(){return this.lastToken=this.token,this.token=this.lookahead()}function lookahead(){var e=this.token;if(e.kind!==s.EOF)do{e=e.next||(e.next=readToken(this,e))}while(e.kind===s.COMMENT);return e}!function applyToStringTag(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function get(){return this.constructor.name}})}(a);var s=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function getTokenDesc(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}var c=String.prototype.charCodeAt,u=String.prototype.slice;function Tok(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function printCharCode(e){return isNaN(e)?s.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function readToken(e,t){var n=e.source,r=n.body,i=r.length,o=function positionAfterWhitespace(e,t,n){var r=e.length,i=t;for(;i<r;){var o=c.call(e,i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++n.line,n.lineStart=i;else{if(13!==o)break;10===c.call(e,i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}(r,t.end,e),a=e.line,p=1+o-e.lineStart;if(o>=i)return new Tok(s.EOF,i,i,a,p,t);var l=c.call(r,o);switch(l){case 33:return new Tok(s.BANG,o,o+1,a,p,t);case 35:return function readComment(e,t,n,r,i){var o,a=e.body,p=t;do{o=c.call(a,++p)}while(null!==o&&(o>31||9===o));return new Tok(s.COMMENT,t,p,n,r,i,u.call(a,t+1,p))}(n,o,a,p,t);case 36:return new Tok(s.DOLLAR,o,o+1,a,p,t);case 38:return new Tok(s.AMP,o,o+1,a,p,t);case 40:return new Tok(s.PAREN_L,o,o+1,a,p,t);case 41:return new Tok(s.PAREN_R,o,o+1,a,p,t);case 46:if(46===c.call(r,o+1)&&46===c.call(r,o+2))return new Tok(s.SPREAD,o,o+3,a,p,t);break;case 58:return new Tok(s.COLON,o,o+1,a,p,t);case 61:return new Tok(s.EQUALS,o,o+1,a,p,t);case 64:return new Tok(s.AT,o,o+1,a,p,t);case 91:return new Tok(s.BRACKET_L,o,o+1,a,p,t);case 93:return new Tok(s.BRACKET_R,o,o+1,a,p,t);case 123:return new Tok(s.BRACE_L,o,o+1,a,p,t);case 124:return new Tok(s.PIPE,o,o+1,a,p,t);case 125:return new Tok(s.BRACE_R,o,o+1,a,p,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function readName(e,t,n,r,i){var o=e.body,a=o.length,p=t+1,l=0;for(;p!==a&&null!==(l=c.call(o,p))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++p;return new Tok(s.NAME,t,p,n,r,i,u.call(o,t,p))}(n,o,a,p,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function readNumber(e,t,n,r,i,o){var a=e.body,p=n,l=t,f=!1;45===p&&(p=c.call(a,++l));if(48===p){if((p=c.call(a,++l))>=48&&p<=57)throw syntaxError(e,l,"Invalid number, unexpected digit after 0: ".concat(printCharCode(p),"."))}else l=readDigits(e,l,p),p=c.call(a,l);46===p&&(f=!0,p=c.call(a,++l),l=readDigits(e,l,p),p=c.call(a,l));69!==p&&101!==p||(f=!0,43!==(p=c.call(a,++l))&&45!==p||(p=c.call(a,++l)),l=readDigits(e,l,p));return new Tok(f?s.FLOAT:s.INT,t,l,r,i,o,u.call(a,t,l))}(n,o,l,a,p,t);case 34:return 34===c.call(r,o+1)&&34===c.call(r,o+2)?function readBlockString(e,t,n,r,i){var o=e.body,a=t+3,p=a,l=0,f="";for(;a<o.length&&null!==(l=c.call(o,a));){if(34===l&&34===c.call(o,a+1)&&34===c.call(o,a+2))return f+=u.call(o,p,a),new Tok(s.BLOCK_STRING,t,a+3,n,r,i,blockStringValue(f));if(l<32&&9!==l&&10!==l&&13!==l)throw syntaxError(e,a,"Invalid character within String: ".concat(printCharCode(l),"."));92===l&&34===c.call(o,a+1)&&34===c.call(o,a+2)&&34===c.call(o,a+3)?(f+=u.call(o,p,a)+'"""',p=a+=4):++a}throw syntaxError(e,a,"Unterminated string.")}(n,o,a,p,t):function readString(e,t,n,r,i){var o=e.body,a=t+1,p=a,l=0,f="";for(;a<o.length&&null!==(l=c.call(o,a))&&10!==l&&13!==l;){if(34===l)return f+=u.call(o,p,a),new Tok(s.STRING,t,a+1,n,r,i,f);if(l<32&&9!==l)throw syntaxError(e,a,"Invalid character within String: ".concat(printCharCode(l),"."));if(++a,92===l){switch(f+=u.call(o,p,a-1),l=c.call(o,a)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var h=(d=c.call(o,a+1),y=c.call(o,a+2),v=c.call(o,a+3),m=c.call(o,a+4),char2hex(d)<<12|char2hex(y)<<8|char2hex(v)<<4|char2hex(m));if(h<0)throw syntaxError(e,a,"Invalid character escape sequence: "+"\\u".concat(o.slice(a+1,a+5),"."));f+=String.fromCharCode(h),a+=4;break;default:throw syntaxError(e,a,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}++a,p=a}}var d,y,v,m;throw syntaxError(e,a,"Unterminated string.")}(n,o,a,p,t)}throw syntaxError(n,o,function unexpectedCharacterMessage(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(printCharCode(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(printCharCode(e),".")}(l))}function readDigits(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=c.call(r,++i)}while(o>=48&&o<=57);return i}throw syntaxError(e,i,"Invalid number, expected digit but got: ".concat(printCharCode(o),"."))}function char2hex(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Tok.prototype.toJSON=Tok.prototype.inspect=function toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}};var p=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"}),l=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function parse(e,t){var n="string"==typeof e?new a(e):e;if(!(n instanceof a))throw new TypeError("Must provide Source. Received: ".concat(inspect(n)));return function parseDocument(e){var t=e.token;return{kind:p.DOCUMENT,definitions:many(e,s.SOF,parseDefinition,s.EOF),loc:loc(e,t)}}(createLexer(n,t||{}))}function parseName(e){var t=expect(e,s.NAME);return{kind:p.NAME,value:t.value,loc:loc(e,t)}}function parseDefinition(e){if(peek(e,s.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return parseExecutableDefinition(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return parseTypeSystemDefinition(e);case"extend":return function parseTypeSystemExtension(e){var t=e.lookahead();if(t.kind===s.NAME)switch(t.value){case"schema":return function parseSchemaExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"schema");var n=parseDirectives(e,!0),r=peek(e,s.BRACE_L)?many(e,s.BRACE_L,parseOperationTypeDefinition,s.BRACE_R):[];if(0===n.length&&0===r.length)throw unexpected(e);return{kind:p.SCHEMA_EXTENSION,directives:n,operationTypes:r,loc:loc(e,t)}}(e);case"scalar":return function parseScalarTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"scalar");var n=parseName(e),r=parseDirectives(e,!0);if(0===r.length)throw unexpected(e);return{kind:p.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:loc(e,t)}}(e);case"type":return function parseObjectTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"type");var n=parseName(e),r=parseImplementsInterfaces(e),i=parseDirectives(e,!0),o=parseFieldsDefinition(e);if(0===r.length&&0===i.length&&0===o.length)throw unexpected(e);return{kind:p.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:loc(e,t)}}(e);case"interface":return function parseInterfaceTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"interface");var n=parseName(e),r=parseDirectives(e,!0),i=parseFieldsDefinition(e);if(0===r.length&&0===i.length)throw unexpected(e);return{kind:p.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:loc(e,t)}}(e);case"union":return function parseUnionTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"union");var n=parseName(e),r=parseDirectives(e,!0),i=parseUnionMemberTypes(e);if(0===r.length&&0===i.length)throw unexpected(e);return{kind:p.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:loc(e,t)}}(e);case"enum":return function parseEnumTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"enum");var n=parseName(e),r=parseDirectives(e,!0),i=parseEnumValuesDefinition(e);if(0===r.length&&0===i.length)throw unexpected(e);return{kind:p.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:loc(e,t)}}(e);case"input":return function parseInputObjectTypeExtension(e){var t=e.token;expectKeyword(e,"extend"),expectKeyword(e,"input");var n=parseName(e),r=parseDirectives(e,!0),i=parseInputFieldsDefinition(e);if(0===r.length&&0===i.length)throw unexpected(e);return{kind:p.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:loc(e,t)}}(e)}throw unexpected(e,t)}(e)}else{if(peek(e,s.BRACE_L))return parseExecutableDefinition(e);if(peekDescription(e))return parseTypeSystemDefinition(e)}throw unexpected(e)}function parseExecutableDefinition(e){if(peek(e,s.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return parseOperationDefinition(e);case"fragment":return function parseFragmentDefinition(e){var t=e.token;if(expectKeyword(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:p.FRAGMENT_DEFINITION,name:parseFragmentName(e),variableDefinitions:parseVariableDefinitions(e),typeCondition:(expectKeyword(e,"on"),parseNamedType(e)),directives:parseDirectives(e,!1),selectionSet:parseSelectionSet(e),loc:loc(e,t)};return{kind:p.FRAGMENT_DEFINITION,name:parseFragmentName(e),typeCondition:(expectKeyword(e,"on"),parseNamedType(e)),directives:parseDirectives(e,!1),selectionSet:parseSelectionSet(e),loc:loc(e,t)}}(e)}else if(peek(e,s.BRACE_L))return parseOperationDefinition(e);throw unexpected(e)}function parseOperationDefinition(e){var t=e.token;if(peek(e,s.BRACE_L))return{kind:p.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:parseSelectionSet(e),loc:loc(e,t)};var n,r=parseOperationType(e);return peek(e,s.NAME)&&(n=parseName(e)),{kind:p.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:parseVariableDefinitions(e),directives:parseDirectives(e,!1),selectionSet:parseSelectionSet(e),loc:loc(e,t)}}function parseOperationType(e){var t=expect(e,s.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw unexpected(e,t)}function parseVariableDefinitions(e){return peek(e,s.PAREN_L)?many(e,s.PAREN_L,parseVariableDefinition,s.PAREN_R):[]}function parseVariableDefinition(e){var t=e.token;return e.options.experimentalVariableDefinitionDirectives?{kind:p.VARIABLE_DEFINITION,variable:parseVariable(e),type:(expect(e,s.COLON),parseTypeReference(e)),defaultValue:skip(e,s.EQUALS)?parseValueLiteral(e,!0):void 0,directives:parseDirectives(e,!0),loc:loc(e,t)}:{kind:p.VARIABLE_DEFINITION,variable:parseVariable(e),type:(expect(e,s.COLON),parseTypeReference(e)),defaultValue:skip(e,s.EQUALS)?parseValueLiteral(e,!0):void 0,loc:loc(e,t)}}function parseVariable(e){var t=e.token;return expect(e,s.DOLLAR),{kind:p.VARIABLE,name:parseName(e),loc:loc(e,t)}}function parseSelectionSet(e){var t=e.token;return{kind:p.SELECTION_SET,selections:many(e,s.BRACE_L,parseSelection,s.BRACE_R),loc:loc(e,t)}}function parseSelection(e){return peek(e,s.SPREAD)?function parseFragment(e){var t,n=e.token;if(expect(e,s.SPREAD),peek(e,s.NAME)&&"on"!==e.token.value)return{kind:p.FRAGMENT_SPREAD,name:parseFragmentName(e),directives:parseDirectives(e,!1),loc:loc(e,n)};"on"===e.token.value&&(e.advance(),t=parseNamedType(e));return{kind:p.INLINE_FRAGMENT,typeCondition:t,directives:parseDirectives(e,!1),selectionSet:parseSelectionSet(e),loc:loc(e,n)}}(e):function parseField(e){var t,n,r=e.token,i=parseName(e);skip(e,s.COLON)?(t=i,n=parseName(e)):n=i;return{kind:p.FIELD,alias:t,name:n,arguments:parseArguments(e,!1),directives:parseDirectives(e,!1),selectionSet:peek(e,s.BRACE_L)?parseSelectionSet(e):void 0,loc:loc(e,r)}}(e)}function parseArguments(e,t){var n=t?parseConstArgument:parseArgument;return peek(e,s.PAREN_L)?many(e,s.PAREN_L,n,s.PAREN_R):[]}function parseArgument(e){var t=e.token;return{kind:p.ARGUMENT,name:parseName(e),value:(expect(e,s.COLON),parseValueLiteral(e,!1)),loc:loc(e,t)}}function parseConstArgument(e){var t=e.token;return{kind:p.ARGUMENT,name:parseName(e),value:(expect(e,s.COLON),parseConstValue(e)),loc:loc(e,t)}}function parseFragmentName(e){if("on"===e.token.value)throw unexpected(e);return parseName(e)}function parseValueLiteral(e,t){var n=e.token;switch(n.kind){case s.BRACKET_L:return function parseList(e,t){var n=e.token,r=t?parseConstValue:parseValueValue;return{kind:p.LIST,values:any(e,s.BRACKET_L,r,s.BRACKET_R),loc:loc(e,n)}}(e,t);case s.BRACE_L:return function parseObject(e,t){var n=e.token;expect(e,s.BRACE_L);var r=[];for(;!skip(e,s.BRACE_R);)r.push(parseObjectField(e,t));return{kind:p.OBJECT,fields:r,loc:loc(e,n)}}(e,t);case s.INT:return e.advance(),{kind:p.INT,value:n.value,loc:loc(e,n)};case s.FLOAT:return e.advance(),{kind:p.FLOAT,value:n.value,loc:loc(e,n)};case s.STRING:case s.BLOCK_STRING:return parseStringLiteral(e);case s.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:p.BOOLEAN,value:"true"===n.value,loc:loc(e,n)}):"null"===n.value?(e.advance(),{kind:p.NULL,loc:loc(e,n)}):(e.advance(),{kind:p.ENUM,value:n.value,loc:loc(e,n)});case s.DOLLAR:if(!t)return parseVariable(e)}throw unexpected(e)}function parseStringLiteral(e){var t=e.token;return e.advance(),{kind:p.STRING,value:t.value,block:t.kind===s.BLOCK_STRING,loc:loc(e,t)}}function parseConstValue(e){return parseValueLiteral(e,!0)}function parseValueValue(e){return parseValueLiteral(e,!1)}function parseObjectField(e,t){var n=e.token;return{kind:p.OBJECT_FIELD,name:parseName(e),value:(expect(e,s.COLON),parseValueLiteral(e,t)),loc:loc(e,n)}}function parseDirectives(e,t){for(var n=[];peek(e,s.AT);)n.push(parseDirective(e,t));return n}function parseDirective(e,t){var n=e.token;return expect(e,s.AT),{kind:p.DIRECTIVE,name:parseName(e),arguments:parseArguments(e,t),loc:loc(e,n)}}function parseTypeReference(e){var t,n=e.token;return skip(e,s.BRACKET_L)?(t=parseTypeReference(e),expect(e,s.BRACKET_R),t={kind:p.LIST_TYPE,type:t,loc:loc(e,n)}):t=parseNamedType(e),skip(e,s.BANG)?{kind:p.NON_NULL_TYPE,type:t,loc:loc(e,n)}:t}function parseNamedType(e){var t=e.token;return{kind:p.NAMED_TYPE,name:parseName(e),loc:loc(e,t)}}function parseTypeSystemDefinition(e){var t=peekDescription(e)?e.lookahead():e.token;if(t.kind===s.NAME)switch(t.value){case"schema":return function parseSchemaDefinition(e){var t=e.token;expectKeyword(e,"schema");var n=parseDirectives(e,!0),r=many(e,s.BRACE_L,parseOperationTypeDefinition,s.BRACE_R);return{kind:p.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:loc(e,t)}}(e);case"scalar":return function parseScalarTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"scalar");var r=parseName(e),i=parseDirectives(e,!0);return{kind:p.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:loc(e,t)}}(e);case"type":return function parseObjectTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"type");var r=parseName(e),i=parseImplementsInterfaces(e),o=parseDirectives(e,!0),a=parseFieldsDefinition(e);return{kind:p.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a,loc:loc(e,t)}}(e);case"interface":return function parseInterfaceTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"interface");var r=parseName(e),i=parseDirectives(e,!0),o=parseFieldsDefinition(e);return{kind:p.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:loc(e,t)}}(e);case"union":return function parseUnionTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"union");var r=parseName(e),i=parseDirectives(e,!0),o=parseUnionMemberTypes(e);return{kind:p.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:loc(e,t)}}(e);case"enum":return function parseEnumTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"enum");var r=parseName(e),i=parseDirectives(e,!0),o=parseEnumValuesDefinition(e);return{kind:p.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:loc(e,t)}}(e);case"input":return function parseInputObjectTypeDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"input");var r=parseName(e),i=parseDirectives(e,!0),o=parseInputFieldsDefinition(e);return{kind:p.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:loc(e,t)}}(e);case"directive":return function parseDirectiveDefinition(e){var t=e.token,n=parseDescription(e);expectKeyword(e,"directive"),expect(e,s.AT);var r=parseName(e),i=parseArgumentDefs(e);expectKeyword(e,"on");var o=function parseDirectiveLocations(e){skip(e,s.PIPE);var t=[];do{t.push(parseDirectiveLocation(e))}while(skip(e,s.PIPE));return t}(e);return{kind:p.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:loc(e,t)}}(e)}throw unexpected(e,t)}function peekDescription(e){return peek(e,s.STRING)||peek(e,s.BLOCK_STRING)}function parseDescription(e){if(peekDescription(e))return parseStringLiteral(e)}function parseOperationTypeDefinition(e){var t=e.token,n=parseOperationType(e);expect(e,s.COLON);var r=parseNamedType(e);return{kind:p.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:loc(e,t)}}function parseImplementsInterfaces(e){var t=[];if("implements"===e.token.value){e.advance(),skip(e,s.AMP);do{t.push(parseNamedType(e))}while(skip(e,s.AMP)||e.options.allowLegacySDLImplementsInterfaces&&peek(e,s.NAME))}return t}function parseFieldsDefinition(e){return e.options.allowLegacySDLEmptyFields&&peek(e,s.BRACE_L)&&e.lookahead().kind===s.BRACE_R?(e.advance(),e.advance(),[]):peek(e,s.BRACE_L)?many(e,s.BRACE_L,parseFieldDefinition,s.BRACE_R):[]}function parseFieldDefinition(e){var t=e.token,n=parseDescription(e),r=parseName(e),i=parseArgumentDefs(e);expect(e,s.COLON);var o=parseTypeReference(e),a=parseDirectives(e,!0);return{kind:p.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a,loc:loc(e,t)}}function parseArgumentDefs(e){return peek(e,s.PAREN_L)?many(e,s.PAREN_L,parseInputValueDef,s.PAREN_R):[]}function parseInputValueDef(e){var t=e.token,n=parseDescription(e),r=parseName(e);expect(e,s.COLON);var i,o=parseTypeReference(e);skip(e,s.EQUALS)&&(i=parseConstValue(e));var a=parseDirectives(e,!0);return{kind:p.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:a,loc:loc(e,t)}}function parseUnionMemberTypes(e){var t=[];if(skip(e,s.EQUALS)){skip(e,s.PIPE);do{t.push(parseNamedType(e))}while(skip(e,s.PIPE))}return t}function parseEnumValuesDefinition(e){return peek(e,s.BRACE_L)?many(e,s.BRACE_L,parseEnumValueDefinition,s.BRACE_R):[]}function parseEnumValueDefinition(e){var t=e.token,n=parseDescription(e),r=parseName(e),i=parseDirectives(e,!0);return{kind:p.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:loc(e,t)}}function parseInputFieldsDefinition(e){return peek(e,s.BRACE_L)?many(e,s.BRACE_L,parseInputValueDef,s.BRACE_R):[]}function parseDirectiveLocation(e){var t=e.token,n=parseName(e);if(l.hasOwnProperty(n.value))return n;throw unexpected(e,t)}function loc(e,t){if(!e.options.noLocation)return new Loc(t,e.lastToken,e.source)}function Loc(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function peek(e,t){return e.token.kind===t}function skip(e,t){var n=e.token.kind===t;return n&&e.advance(),n}function expect(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw syntaxError(e.source,n.start,"Expected ".concat(t,", found ").concat(getTokenDesc(n)))}function expectKeyword(e,t){var n=e.token;if(n.kind===s.NAME&&n.value===t)return e.advance(),n;throw syntaxError(e.source,n.start,'Expected "'.concat(t,'", found ').concat(getTokenDesc(n)))}function unexpected(e,t){var n=t||e.token;return syntaxError(e.source,n.start,"Unexpected ".concat(getTokenDesc(n)))}function any(e,t,n,r){expect(e,t);for(var i=[];!skip(e,r);)i.push(n(e));return i}function many(e,t,n,r){expect(e,t);for(var i=[n(e)];!skip(e,r);)i.push(n(e));return i}Loc.prototype.toJSON=Loc.prototype.inspect=function toJSON(){return{start:this.start,end:this.end}};var f=n("../node_modules/zen-observable/index.js"),h=n("../node_modules/@aws-amplify/core/lib-esm/index.js"),d=n("../node_modules/axios/index.js"),y=n.n(d),__assign=function(){return(__assign=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)},__awaiter=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r.throw(e))}catch(e){o(e)}}function step(e){e.done?i(e.value):function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))},__generator=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function verb(o){return function(s){return function step(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},__rest=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 h.c("RestClient"),m=n("../node_modules/url/url.js"),g=function(){function RestClient(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0;e.endpoints;this._options=e,v.debug("API Options",this._options)}return RestClient.prototype.ajax=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,c,u,p,l,f,d=this;return __generator(this,(function(y){switch(y.label){case 0:return v.debug(t+" "+e),r=this._parseUrl(e),i={method:t,url:e,host:r.host,path:r.path,headers:{},data:null,responseType:"json",timeout:0},o={},h.k.isReactNative&&(a=h.k.userAgent||"aws-amplify/0.1.x",o={"User-Agent":a}),s=Object.assign({},n),c=s.response,s.body&&(o["Content-Type"]="application/json; charset=UTF-8",i.data=JSON.stringify(s.body)),s.responseType&&(i.responseType=s.responseType),s.withCredentials&&(i.withCredentials=s.withCredentials),s.timeout&&(i.timeout=s.timeout),i.signerServiceInfo=s.signerServiceInfo,this._custom_header?[4,this._custom_header()]:[3,2];case 1:return p=y.sent(),[3,3];case 2:p=void 0,y.label=3;case 3:return u=p,i.headers=__assign(__assign(__assign({},o),u),s.headers),l=m.parse(e,!0,!0),l.search,f=__rest(l,["search"]),i.url=m.format(__assign(__assign({},f),{query:__assign(__assign({},f.query),s.queryStringParameters||{})})),void 0!==i.headers.Authorization?(i.headers=Object.keys(i.headers).reduce((function(e,t){return i.headers[t]&&(e[t]=i.headers[t]),e}),{}),[2,this._request(i,c)]):[2,h.e.get().then((function(e){return d._signed(__assign({},i),e,c)}),(function(e){return v.debug("No credentials available, the request will be unsigned"),d._request(i,c)}))]}}))}))},RestClient.prototype.get=function(e,t){return this.ajax(e,"GET",t)},RestClient.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},RestClient.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},RestClient.prototype.post=function(e,t){return this.ajax(e,"POST",t)},RestClient.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},RestClient.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},RestClient.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},RestClient.prototype._signed=function(e,t,n){var r=e.signerServiceInfo,i=__rest(e,["signerServiceInfo"]),o=this._region||this._options.region,a=this._service||this._options.service,s={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},c={region:o,service:a},u=Object.assign(c,r),p=h.m.sign(i,s,u);return p.data&&(p.body=p.data),v.debug("Signed Request: ",p),delete p.headers.host,y()(p).then((function(e){return n?e:e.data})).catch((function(e){throw v.debug(e),e}))},RestClient.prototype._request=function(e,t){return void 0===t&&(t=!1),y()(e).then((function(e){return t?e:e.data})).catch((function(e){throw v.debug(e),e}))},RestClient.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},RestClient}(),I=n("../node_modules/@aws-amplify/auth/lib-esm/index.js"),E=n("../node_modules/@aws-amplify/cache/lib-esm/index.js"),N=n("../node_modules/@aws-amplify/core/lib/constants.js"),T=n("../node_modules/uuid/index.js"),API_assign=function(){return(API_assign=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)},API_awaiter=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r.throw(e))}catch(e){o(e)}}function step(e){e.done?i(e.value):function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))},API_generator=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function verb(o){return function(s){return function step(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},API_rest=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},b=new h.c("API"),_=function(){function APIClass(e){this._api=null,this._pubSub=h.o.PubSub,this.clientIdentifier=Object(T.v4)(),this._options=e,b.debug("API Options",this._options)}return APIClass.prototype.getModuleName=function(){return"API"},APIClass.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=API_rest(t,["API"]),o=API_assign(API_assign({},i),r);if(b.debug("configure API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var a=o.aws_cloud_logic_custom;o.endpoints="string"==typeof a?JSON.parse(a):a}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)||(o.endpoints=[]),o.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(b.warn("API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})),void 0!==o.graphql_headers&&"function"!=typeof o.graphql_headers&&(b.warn("graphql_headers should be a function"),o.graphql_headers=void 0),this._options=Object.assign({},this._options,o),this.createInstance(),this._options},APIClass.prototype.createInstance=function(){return b.debug("create API instance"),this._options?(this._api=new g(this._options),!0):Promise.reject("API not configured")},APIClass.prototype.get=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.get(i+t,n)]}}))}))},APIClass.prototype.post=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.post(i+t,n)]}}))}))},APIClass.prototype.put=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.put(i+t,n)]}}))}))},APIClass.prototype.patch=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.patch(i+t,n)]}}))}))},APIClass.prototype.del=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.del(i+t,n)]}}))}))},APIClass.prototype.head=function(e,t,n){return API_awaiter(this,void 0,void 0,(function(){var r,i;return API_generator(this,(function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return 0===(i=this._api.endpoint(e)).length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.head(i+t,n)]}}))}))},APIClass.prototype.endpoint=function(e){return API_awaiter(this,void 0,void 0,(function(){var t;return API_generator(this,(function(n){switch(n.label){case 0:if(this._api)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),[2,Promise.reject(t)];case 4:return[2,this._api.endpoint(e)]}}))}))},APIClass.prototype._headerBasedAuth=function(e){return API_awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,a;return API_generator(this,(function(s){switch(s.label){case 0:switch(t=this._options,n=t.aws_appsync_authenticationType,r=t.aws_appsync_apiKey,i={},e||n||"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,6]}return[3,8];case 1:if(!r)throw new Error("No api-key configured");return i={Authorization:null,"X-Api-Key":r},[3,9];case 2:return[4,this._ensureCredentials()];case 3:if(!s.sent())throw new Error("No credentials");return[3,9];case 4:return[4,E.a.getItem("federatedInfo")];case 5:if(!(o=s.sent())||!o.token)throw new Error("No federated jwt");return i={Authorization:o.token},[3,9];case 6:return[4,I.a.currentSession()];case 7:return a=s.sent(),i={Authorization:a.getAccessToken().getJwtToken()},[3,9];case 8:return i={Authorization:null},[3,9];case 9:return[2,i]}}))}))},APIClass.prototype.getGraphqlOperationType=function(e){return parse(e).definitions[0].operation},APIClass.prototype.graphql=function(e){var t=e.query,n=e.variables,r=void 0===n?{}:n,i=e.authMode,o=parse("string"==typeof t?t:print(t)),a=o.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0],s=(void 0===a?{}:a).operation;switch(s){case"query":case"mutation":return this._graphql({query:o,variables:r,authMode:i});case"subscription":return this._graphqlSubscribe({query:o,variables:r,authMode:i})}throw new Error("invalid operation type: "+s)},APIClass.prototype._graphql=function(e,t){var n=e.query,r=e.variables,i=e.authMode;return void 0===t&&(t={}),API_awaiter(this,void 0,void 0,(function(){var e,o,a,s,c,u,p,l,f,d,y,v,m,g,I,E,N,T,b,_,S;return API_generator(this,(function(k){switch(k.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:k.sent(),k.label=2;case 2:return e=this._options,o=e.aws_appsync_region,a=e.aws_appsync_graphqlEndpoint,s=e.graphql_headers,c=void 0===s?function(){return{}}:s,u=e.graphql_endpoint,p=e.graphql_endpoint_iam_region,f=[{}],(d=!u)?[4,this._headerBasedAuth(i)]:[3,4];case 3:d=k.sent(),k.label=4;case 4:return y=[API_assign.apply(void 0,f.concat([d]))],(v=u)?p?[4,this._headerBasedAuth(i)]:[3,6]:[3,8];case 5:return m=k.sent(),[3,7];case 6:m={Authorization:null},k.label=7;case 7:v=m,k.label=8;case 8:return g=[API_assign.apply(void 0,y.concat([v]))],[4,c({query:n,variables:r})];case 9:if(l=API_assign.apply(void 0,[API_assign.apply(void 0,[API_assign.apply(void 0,g.concat([k.sent()])),t]),!u&&(S={},S["x-amz-user-agent"]=h.d.userAgent,S)]),I={query:print(n),variables:r},E={headers:l,body:I,signerServiceInfo:{service:u?"execute-api":"appsync",region:u?p:o}},!(N=u||a))throw{data:{},errors:[new GraphQLError("No graphql endpoint provided.")]};k.label=10;case 10:return k.trys.push([10,12,,13]),[4,this._api.post(N,E)];case 11:return T=k.sent(),[3,13];case 12:return b=k.sent(),T={data:{},errors:[new GraphQLError(b.message)]},[3,13];case 13:if((_=T.errors)&&_.length)throw T;return[2,T]}}))}))},APIClass.prototype._graphqlSubscribe=function(e){var t=this,n=e.query,r=e.variables,i=e.authMode;if(h.o.PubSub&&"function"==typeof h.o.PubSub.subscribe)return new f((function(e){var o=null;return API_awaiter(t,void 0,void 0,(function(){var t,a,s,c,u,p,l;return API_generator(this,(function(f){switch(f.label){case 0:t=this._options.aws_appsync_authenticationType,a=API_assign({},"API_KEY"===(i||t)?{"x-amz-subscriber-id":this.clientIdentifier}:{}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this._graphql({query:n,variables:r,authMode:i},a)];case 2:return s=f.sent().extensions.subscription,c=s.newSubscriptions,u=Object.getOwnPropertyNames(c).map((function(e){return c[e].topic})),p=h.o.PubSub.subscribe(u,API_assign(API_assign({},s),{provider:N.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER})),o=p.subscribe({next:function(t){return e.next(t)},complete:function(){return e.complete()},error:function(t){var n=API_assign({},t);n.errors||(n.errors=[API_assign({},new GraphQLError("Network Error"))]),e.error(n)}}),[3,4];case 3:return l=f.sent(),e.error(l),[3,4];case 4:return[2]}}))})),function(){o&&o.unsubscribe()}}));throw b.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},APIClass.prototype._ensureCredentials=function(){return h.e.get().then((function(e){if(!e)return!1;var t=h.e.shear(e);return b.debug("set credentials for api",t),!0})).catch((function(e){return b.warn("ensure credentials error",e),!1}))},APIClass}(),S=new h.c("API"),k=null;k||(S.debug("Create API Instance"),k=new _(null));var C=k;h.o.register(C);t.a=C},"../node_modules/@aws-amplify/cache/lib-esm/index.js":function(e,t,n){var r=n("../node_modules/@aws-amplify/core/lib-esm/index.js"),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new r.n).getStorage()};function getByteLength(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 getCurrTime(){return(new Date).getTime()}function isInteger(e){return Number.isInteger?Number.isInteger(e):function _isInteger(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var o,a={},s=function(){function CacheObject(){}return CacheObject.clear=function(){a={}},CacheObject.getItem=function(e){return a[e]||null},CacheObject.setItem=function(e,t){a[e]=t},CacheObject.removeItem=function(e){delete a[e]},CacheObject}(),c=function c(e){this.key=e||"",this.prevNode=null,this.nextNode=null},u=function(){function CacheList(){this.head=new c,this.tail=new c,this.hashtable={},this.length=0,this.head.nextNode=this.tail,this.tail.prevNode=this.head}return CacheList.prototype.insertNodeToHead=function(e){var t=this.head.nextNode;this.head.nextNode=e,e.nextNode=t,e.prevNode=this.head,t.prevNode=e,this.length=this.length+1},CacheList.prototype.removeNode=function(e){e.prevNode.nextNode=e.nextNode,e.nextNode.prevNode=e.prevNode,e.prevNode=null,e.nextNode=null,this.length=this.length-1},CacheList.prototype.isEmpty=function(){return 0===this.length},CacheList.prototype.refresh=function(e){var t=this.hashtable[e];this.removeNode(t),this.insertNodeToHead(t)},CacheList.prototype.insertItem=function(e){var t=new c(e);this.hashtable[e]=t,this.insertNodeToHead(t)},CacheList.prototype.getLastItem=function(){return this.tail.prevNode.key},CacheList.prototype.removeItem=function(e){var t=this.hashtable[e];this.removeNode(t),delete this.hashtable[e]},CacheList.prototype.getSize=function(){return this.length},CacheList.prototype.containsKey=function(e){return e in this.hashtable},CacheList.prototype.clearList=function(){for(var e=0,t=Object.keys(this.hashtable);e<t.length;e++){var n=t[e];this.hashtable.hasOwnProperty(n)&&delete this.hashtable[n]}this.head.nextNode=this.tail,this.tail.prevNode=this.head,this.length=0},CacheList.prototype.getKeys=function(){return Object.keys(this.hashtable)},CacheList.prototype.isHeadNode=function(e){return this.hashtable[e].prevNode===this.head},CacheList.prototype.isTailNode=function(e){return this.hashtable[e].nextNode===this.tail},CacheList}(),p=new r.c("StorageCache"),l=function(){function StorageCache(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return StorageCache.prototype.getModuleName=function(){return"Cache"},StorageCache.prototype.checkConfig=function(){isInteger(this.config.capacityInBytes)||(p.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),isInteger(this.config.itemMaxSize)||(p.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),isInteger(this.config.defaultTTL)||(p.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),isInteger(this.config.defaultPriority)||(p.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(p.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)&&(p.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)&&(p.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(p.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},StorageCache.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:getCurrTime(),visitedTime:getCurrTime(),priority:n.priority,expires:n.expires,type:typeof t,byteSize:0};return r.byteSize=getByteLength(JSON.stringify(r)),r.byteSize=getByteLength(JSON.stringify(r)),r},StorageCache.prototype.configure=function(e){return e?(e.keyPrefix&&p.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},StorageCache}(),f=(o=function(e,t){return(o=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)},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),h=new r.c("Cache"),d=new(function(e){function BrowserStorageCache(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 f(BrowserStorageCache,e),BrowserStorageCache.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},BrowserStorageCache.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},BrowserStorageCache.prototype._refreshItem=function(e,t){return e.visitedTime=getCurrTime(),this.config.storage.setItem(t,JSON.stringify(e)),e},BrowserStorageCache.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return getCurrTime()>=n.expires},BrowserStorageCache.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},BrowserStorageCache.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(e){this._decreaseCurSizeInBytes(t.byteSize),h.error("Failed to set item "+e)}},BrowserStorageCache.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},BrowserStorageCache.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},BrowserStorageCache.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},BrowserStorageCache.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 a=JSON.parse(o);n.push(a)}}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},BrowserStorageCache.prototype.setItem=function(e,t,n){h.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(void 0!==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+getCurrTime()};if(i.priority<1||i.priority>5)h.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)h.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 s=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(s,c)}}this._setItem(r,o)}catch(e){h.warn("setItem failed! "+e)}}}else h.warn("The value of item should not be undefined!");else h.warn("Invalid key: should not be empty or 'CurSize'")},BrowserStorageCache.prototype.getItem=function(e,t){h.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 h.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(e){return h.warn("getItem failed! "+e),null}},BrowserStorageCache.prototype.removeItem=function(e){h.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(e){h.warn("removeItem failed! "+e)}},BrowserStorageCache.prototype.clear=function(){h.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(e){h.warn("clear failed! "+e)}},BrowserStorageCache.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},BrowserStorageCache.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},BrowserStorageCache.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==i.keyPrefix||(h.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=getCurrTime.toString()),new BrowserStorageCache(e)},BrowserStorageCache}(l)),y=function(){var extendStatics=function(e,t){return(extendStatics=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)};return function(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),v=new r.c("InMemoryCache");new(function(e){function InMemoryCache(t){var n=this,r=t?Object.assign({},i,t):i;n=e.call(this,r)||this,v.debug("now we start!"),n.cacheList=[],n.curSizeInBytes=0,n.maxPriority=5,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n);for(var o=0;o<n.maxPriority;o+=1)n.cacheList[o]=new u;return n}return y(InMemoryCache,e),InMemoryCache.prototype._decreaseCurSizeInBytes=function(e){this.curSizeInBytes-=e},InMemoryCache.prototype._increaseCurSizeInBytes=function(e){this.curSizeInBytes+=e},InMemoryCache.prototype._isExpired=function(e){var t=s.getItem(e),n=JSON.parse(t);return getCurrTime()>=n.expires},InMemoryCache.prototype._removeItem=function(e,t){this.cacheList[t].removeItem(e),this._decreaseCurSizeInBytes(JSON.parse(s.getItem(e)).byteSize),s.removeItem(e)},InMemoryCache.prototype._setItem=function(e,t,n){this.cacheList[n].insertItem(e),this._increaseCurSizeInBytes(t.byteSize),s.setItem(e,JSON.stringify(t))},InMemoryCache.prototype._isCacheFull=function(e){return this.curSizeInBytes+e>this.config.capacityInBytes},InMemoryCache.prototype.containsKey=function(e){for(var t=this.config.keyPrefix+e,n=0;n<this.maxPriority;n+=1)if(this.cacheList[n].containsKey(t))return n+1;return-1},InMemoryCache.prototype.setItem=function(e,t,n){var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if(void 0!==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+getCurrTime()};if(i.priority<1||i.priority>5)v.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)v.warn("Item with key: "+e+" you are trying to put into is too big!");else{var a=this.containsKey(e);-1!==a&&this._removeItem(r,a-1);for(var s=this.maxPriority-1;this._isCacheFull(o.byteSize)&&s>=0;)if(this.cacheList[s].isEmpty())s-=1;else{var c=this.cacheList[s].getLastItem();this._removeItem(c,s)}this._setItem(r,o,Number(o.priority)-1)}}}else v.warn("The value of item should not be undefined!");else v.warn("Invalid key: should not be empty or 'CurSize'")},InMemoryCache.prototype.getItem=function(e,t){var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return v.warn("Invalid key: should not be empty or 'CurSize'"),null;var i=this.containsKey(e);if(-1!==i){if(!this._isExpired(r)){n=s.getItem(r);var o=JSON.parse(n);return this.cacheList[o.priority-1].refresh(r),o.data}this._removeItem(r,i-1)}if(t&&void 0!==t.callback){var a=t.callback();return null!==a&&this.setItem(e,a,t),a}return null},InMemoryCache.prototype.removeItem=function(e){var t=this.config.keyPrefix+e,n=this.containsKey(e);-1!==n&&this._removeItem(t,n-1)},InMemoryCache.prototype.clear=function(){for(var e=0;e<this.maxPriority;e+=1)for(var t=0,n=this.cacheList[e].getKeys();t<n.length;t++){var r=n[t];this._removeItem(r,e)}},InMemoryCache.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.maxPriority;t+=1)for(var n=0,r=this.cacheList[t].getKeys();n<r.length;n++){var i=r[n];e.push(i.substring(this.config.keyPrefix.length))}return e},InMemoryCache.prototype.getCacheCurSize=function(){return this.curSizeInBytes},InMemoryCache.prototype.createInstance=function(e){return new InMemoryCache(e)},InMemoryCache}(l)),t.a=d;r.o.register(d)},"../node_modules/@aws-amplify/core/lib/constants.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"!=typeof Symbol&&"function"==typeof Symbol.for;t.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER=r?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"}}]);
//# sourceMappingURL=vendors~App-7KZ9F~092158aa.chunk.eaa5497fb7f7db0479e3.js.map