(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{65341:function(e,t,r){"use strict";r.d(t,{ApolloCache:function(){return j},Cache:function(){return U},InMemoryCache:function(){return Ie},MissingFieldError:function(){return B},cacheSlot:function(){return fe},defaultDataIdFromObject:function(){return ye},makeVar:function(){return de}});var n=null,i={},o=1,a="@wry/context:Slot",s=Array,u=s[a]||function(){var e=function(){function e(){this.id=["slot",o++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=n;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===i)break;return e!==n&&(n.slots[this.id]=t),!0}return n&&(n.slots[this.id]=i),!1},e.prototype.getValue=function(){if(this.hasValue())return n.slots[this.id]},e.prototype.withValue=function(e,t,r,i){var o,a=((o={__proto__:null})[this.id]=e,o),s=n;n={parent:s,slots:a};try{return t.apply(i,r)}finally{n=s}},e.bind=function(e){var t=n;return function(){var r=n;try{return n=t,e.apply(this,arguments)}finally{n=r}}},e.noContext=function(e,t,r){if(!n)return e.apply(r,t);var i=n;try{return n=null,e.apply(r,t)}finally{n=i}},e}();try{Object.defineProperty(s,a,{value:s[a]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();u.bind,u.noContext;function c(){}var f=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=c),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),l=new u;function h(e){var t=e.unsubscribe;"function"===typeof t&&(e.unsubscribe=void 0,t())}var d=[];function p(e,t){if(!e)throw new Error(t||"assertion failure")}function v(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var y=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!b(this))return this.value[0]},e.prototype.recompute=function(e){return p(!this.recomputing,"already recomputing"),function(e){var t=l.getValue();if(t)e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),b(e)?_(t,e):S(t,e)}(this),b(this)?function(e,t){A(e),l.withValue(e,g,[e,t]),function(e,t){if("function"===typeof e.subscribe)try{h(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(r){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,b(e))return;w(e)}(e);return v(e.value)}(this,e):v(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,m(this),A(this),h(this))},e.prototype.dispose=function(){var e=this;A(this),h(this),this.parents.forEach((function(t){t.setDirty(),k(t,e)}))},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=d.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(this.deps.forEach((function(t){return t.delete(e)})),this.deps.clear(),d.push(this.deps),this.deps=null)},e.count=0,e}();function g(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(r){e.value[1]=r}e.recomputing=!1}function b(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function m(e){e.parents.forEach((function(t){return _(t,e)}))}function w(e){e.parents.forEach((function(t){return S(t,e)}))}function _(e,t){if(p(e.childValues.has(t)),p(b(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=d.pop()||new Set;e.dirtyChildren.add(t),m(e)}function S(e,t){p(e.childValues.has(t)),p(!b(t));var r=e.childValues.get(t);0===r.length?e.childValues.set(t,t.value.slice(0)):function(e,t){var r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}(r,t.value)||e.setDirty(),E(e,t),b(e)||w(e)}function E(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(d.length<100&&d.push(r),e.dirtyChildren=null))}function A(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){k(e,r)})),e.forgetDeps(),p(null===e.dirtyChildren)}function k(e,t){t.parents.delete(e),e.childValues.delete(t),E(e,t)}var M=function(){return Object.create(null)},x=Array.prototype,C=x.forEach,I=x.slice,O=function(){function e(e,t){void 0===t&&(t=M),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof ee?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){K.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof ee;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!K.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=new Set([this.data[e]]),n=function(e){return null!==e&&"object"===typeof e};r.forEach((function(e){(0,D.hh)(e)?t[e.__ref]=!0:n(e)&&Object.values(e).filter(n).forEach(r.add,r)}))}return this.refs[e]},e.prototype.makeCacheKey=function(){for(var e=[],t=0;t0;if(f&&!s)throw c.missing[0];return{result:c.result,missing:c.missing,complete:!f}},e.prototype.isFresh=function(e,t,r,n){if(re(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n);if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.context;if((0,D.hh)(n)&&!i.policies.rootTypenamesById[n.__ref]&&!i.store.has(n.__ref))return{result:{},missing:[ne(new q.ej(4),i)]};var o=i.variables,a=i.policies,s=i.store,u=[],c={result:null},f=s.getFieldValue(n,"__typename");function l(){return c.missing||(c.missing=[])}function h(e){var t;return e.missing&&(t=l()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"===typeof f&&!a.rootIdsByTypename[f]&&u.push({__typename:f});var d=new Set(r.selections);return d.forEach((function(e){var r;if((0,D.LZ)(e,o))if((0,D.My)(e)){var s=a.readField({fieldName:e.name.value,field:e,variables:i.variables,from:n},i),c=(0,D.u2)(e);i.path.push(c);var p=i.clientOnly;i.clientOnly=p||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0===s?D.Gw.added(e)||l().push(ne(new q.ej(5),i)):Array.isArray(s)?s=h(t.executeSubSelectedArray({field:e,array:s,context:i})):e.selectionSet&&null!=s&&(s=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:s,context:i}))),void 0!==s&&u.push(((r={})[c]=s,r)),i.clientOnly=p,(0,q.kG)(i.path.pop()===c)}else{var v=(0,D.hi)(e,i.fragmentMap);v&&a.fragmentMatches(v,f)&&v.selectionSet.selections.forEach(d.add,d)}})),c.result=(0,D.bw)(u),this.knownResults.set(c.result,r),c},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.context;function a(e,r){return e.missing&&(t=t||[]).push.apply(t,e.missing),(0,q.kG)(o.path.pop()===r),e.result}return n.selectionSet&&(i=i.filter(o.store.canRead)),{result:i=i.map((function(e,t){return null===e?null:(o.path.push(t),Array.isArray(e)?a(r.executeSubSelectedArray({field:n,array:e,context:o}),t):n.selectionSet?a(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,context:o}),t):((0,q.kG)(o.path.pop()===t),e))})),missing:t}},e}();var oe=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e){var t=e.query,r=e.result,n=e.dataId,i=e.store,o=e.variables,a=(0,D.$H)(t),s=new D.w0;o=(0,F.__assign)((0,F.__assign)({},(0,D.O4)(a)),o);var u=this.processSelectionSet({result:r||Object.create(null),dataId:n,selectionSet:a.selectionSet,mergeTree:{map:new Map},context:{store:i,written:Object.create(null),merge:function(e,t){return s.merge(e,t)},variables:o,varString:JSON.stringify(o),fragmentMap:(0,D.F)((0,D.kU)(t))}});if(!(0,D.hh)(u))throw new q.ej(7);return i.retain(u.__ref),u},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=s.identify(n,i,o.fragmentMap),c=u[0],f=u[1];if("string"===typeof(r=r||c)){var l=o.written[r]||(o.written[r]=[]),h=(0,D.kQ)(r);if(l.indexOf(i)>=0)return h;if(l.push(i),this.reader&&this.reader.isFresh(n,h,i,o))return h}var d=Object.create(null);f&&(d=o.merge(d,f));var p=r&&s.rootTypenamesById[r]||(0,D.qw)(n,i,o.fragmentMap)||r&&o.store.get(r,"__typename");"string"===typeof p&&(d.__typename=p);var v=new Set(i.selections);if(v.forEach((function(e){var r;if((0,D.LZ)(e,o.variables))if((0,D.My)(e)){var i=(0,D.u2)(e),u=n[i];if("undefined"!==typeof u){var c=s.getStoreFieldName({typename:p,fieldName:e.name.value,field:e,variables:o.variables}),f=se(a,c),l=t.processFieldValue(u,e,o,f),h=e.selectionSet&&o.store.getFieldValue(l,"__typename")||void 0,y=s.getMergeFunction(p,e.name.value,h);y?f.info={field:e,typename:p,merge:y}:ue(a,c),d=o.merge(d,((r={})[c]=l,r))}else if(s.usingPossibleTypes&&!(0,D.FS)(["defer","client"],e))throw new q.ej(8)}else{var g=(0,D.hi)(e,o.fragmentMap);g&&s.fragmentMatches(g,p,n,o.variables)&&g.selectionSet.selections.forEach(v.add,v)}})),"string"===typeof r){var y=(0,D.kQ)(r);return a.map.size&&(d=this.applyMerges(a,y,d,o)),o.store.merge(r,d),y}return d},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,r,se(n,o));return ue(n,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):e},e.prototype.applyMerges=function(e,t,r,n,i){var o,a=this;if(e.map.size&&!(0,D.hh)(r)){var s,u=Array.isArray(r)||!(0,D.hh)(t)&&!G(t)?void 0:t,c=r;u&&!i&&(i=[(0,D.hh)(u)?u.__ref:u]);var f=function(e,t){return Array.isArray(e)?"number"===typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){i&&i.push(t);var r=f(u,t),o=f(c,t),l=a.applyMerges(e,r,o,n,i);l!==o&&(s=s||new Map).set(t,l),i&&(0,q.kG)(i.pop()===t)})),s&&(r=Array.isArray(c)?c.slice(0):(0,F.__assign)({},c),s.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(o=n.store).getStorage.apply(o,i)):r},e}(),ae=[];function se(e,t){var r=e.map;return r.has(t)||r.set(t,ae.pop()||{map:new Map}),r.get(t)}function ue(e,t){var r=e.map,n=r.get(t);!n||n.info||n.map.size||(ae.push(n),r.delete(t))}new Set;var ce=T(),fe=new u;function le(e,t){if(e.size){var r=[];e.forEach((function(e){return r.push(e)})),e.clear(),r.forEach(t)}}var he=new WeakMap;function de(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0)e!==o&&(e=o,ce.dirty(n),t.forEach(pe),le(r,(function(t){return t(e)})));else{var a=fe.getValue();a&&i(a),ce(n)}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){t.add(e);var r=he.get(e);return r||he.set(e,r=new Set),r.add(n),n};return n.forgetCache=function(e){var r=t.delete(e);if(r){var i=he.get(e);i&&i.delete(n)}return r},n}function pe(e){e.broadcastWatches&&e.broadcastWatches()}function ve(e){return void 0!==e.args?e.args:e.field?(0,D.NC)(e.field,e.variables):null}var ye=function(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"===typeof r&&(t&&(t.keyObject=void 0!==n?{id:n}:void 0!==i?{_id:i}:void 0),void 0===n&&(n=i),void 0!==n))return r+":"+("number"===typeof n||"string"===typeof n?n:JSON.stringify(n))},ge=function(){},be=function(e,t){return t.fieldName},me=function(e,t,r){return(0,r.mergeObjects)(e,t)},we=function(e,t){return t},_e=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,F.__assign)({dataIdFromObject:ye},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,r){var n=t&&r?(0,D.qw)(e,t,r):e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,o={typename:n,selectionSet:t,fragmentMap:r},a=n&&this.getTypePolicy(n),s=a&&a.keyFn||this.config.dataIdFromObject;s;){var u=s(e,o);if(!Array.isArray(u)){i=u;break}s=ke(u)}return i=i&&String(i),o.keyObject?[i,o.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var n=e[r],i=n.queryType,o=n.mutationType,a=n.subscriptionType,s=(0,F.__rest)(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),o&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),K.call(t.toBeAdded,r)?t.toBeAdded[r].push(s):t.toBeAdded[r]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"===typeof t?t:!0===t?me:!1===t?we:e.merge}a(n,t.merge),n.keyFn=!1===i?ge:Array.isArray(i)?ke(i):"function"===typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"===typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?be:Array.isArray(s)?Ae(s):"function"===typeof s?s:n.keyFn,"function"===typeof u&&(n.read=u),a(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||be)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,q.kG)(!n||n===e,1),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(V);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!K.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);n&&n.size&&n.forEach((function(e){var n=t.getTypePolicy(e),i=n.fields,o=(0,F.__rest)(n,["fields"]);Object.assign(r,o),Object.assign(r.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&this.updateTypePolicy(e,D.oA.apply(void 0,i.splice(0))),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!r||!this.fuzzySubtypes.size),f=0;f=e.lastRequestId){if(o&&"none"===r.errorPolicy)throw e.markError(new c.c({graphQLErrors:i.errors}));e.markResult(i,r,t),e.markReady()}var s={data:i.data,loading:!1,networkStatus:e.networkStatus||l.I.ready};return o&&"ignore"!==r.errorPolicy&&(s.errors=i.errors),s}),(function(t){var r=(0,c.M)(t)?t:new c.c({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=l.I.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),u=s.networkStatus,c=t.fetchPolicy,f=void 0===c?"cache-first":c,h=t.errorPolicy,d=void 0===h?"none":h,p=t.returnPartialData,v=void 0!==p&&p,y=t.notifyOnNetworkStatusChange,g=void 0!==y&&y,b=t.context,m=void 0===b?{}:b;("cache-first"===f||"cache-and-network"===f||"network-only"===f||"no-cache"===f)&&g&&"number"===typeof u&&u!==r&&(0,l.O)(r)&&("cache-first"!==f&&(f="cache-and-network"),v=!0);var w=Object.assign({},t,{query:i,variables:o,fetchPolicy:f,errorPolicy:d,returnPartialData:v,notifyOnNetworkStatusChange:g,context:m}),_=function(e){return w.variables=e,n.fetchQueryByPolicy(s,w,r)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return S.cancel(e)}))}));var S=new a.X_(this.transform(w.query).hasClientExports?this.localState.addExportedVariables(w.query,w.variables,w.context).then(_):_(w.variables));return S.cleanup((function(){n.fetchCancelFns.delete(e);var r=t.nextFetchPolicy;r&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"===typeof r?r.call(t,t.fetchPolicy||"cache-first"):r)})),S},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,u=t.fetchPolicy,c=t.errorPolicy,f=t.returnPartialData,h=t.context;e.init({document:o,variables:s,lastRequestId:this.generateRequestId(),networkStatus:r});var d=function(){return e.getDiff(s)},p=function(t,r){void 0===r&&(r=e.networkStatus||l.I.loading);var u=t.result;var c=function(e){return a.y$.of((0,n.__assign)({data:e,loading:(0,l.O)(r),networkStatus:r},t.complete?null:{partial:!0}))};return i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:u},context:h,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return c(e.data)})):c(u)},v=function(t){return i.getResultsFromLink(e,t,{variables:s,context:h,fetchPolicy:u,errorPolicy:c})};switch(u){default:case"cache-first":return(y=d()).complete?[p(y,e.markReady())]:f?[p(y),v(!0)]:[v(!0)];case"cache-and-network":var y;return(y=d()).complete||f?[p(y),v(!0)]:[v(!0)];case"cache-only":return[p(d(),e.markReady())];case"network-only":return[v(!0)];case"no-cache":return[v(!1)];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new b(this.cache)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function S(e,t){return(0,a.oA)(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e.variables),t.variables)})}var E=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,a=e.headers,u=e.cache,c=e.ssrMode,f=void 0!==c&&c,l=e.ssrForceFetchDelay,h=void 0===l?0:l,d=e.connectToDevTools,v=void 0===d?"object"===typeof window&&!window.__APOLLO_CLIENT__&&!1:d,y=e.queryDeduplication,g=void 0===y||y,b=e.defaultOptions,m=e.assumeImmutableResults,w=void 0!==m&&m,S=e.resolvers,E=e.typeDefs,A=e.fragmentMatcher,k=e.name,M=e.version,x=e.link;if(x||(x=r?new s.uG({uri:r,credentials:n,headers:a}):o.ApolloLink.empty()),!u)throw new i.ej(9);this.link=x,this.cache=u,this.disableNetworkFetches=f||h>0,this.queryDeduplication=g,this.defaultOptions=b||{},this.typeDefs=E,h&&setTimeout((function(){return t.disableNetworkFetches=!1}),h),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),v&&"object"===typeof window&&(window.__APOLLO_CLIENT__=this),this.version="3.3.6",this.localState=new p({cache:u,client:this,resolvers:S,fragmentMatcher:A}),this.queryManager=new _({cache:this.cache,link:this.link,queryDeduplication:g,ssrMode:f,clientAwareness:{name:k,version:M},localState:this.localState,assumeImmutableResults:w,onBroadcast:v?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=S(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=S(this.defaultOptions.query,e)),(0,i.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=S(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,o.execute)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},13910:function(e,t,r){"use strict";r.d(t,{u:function(){return c}});var n=r(70655),i=r(86554),o=r(82152),a=r(85942),s=r(49247),u=function(){function e(e,t,r,n){this.observer=e,this.options=t,this.fetch=r,this.shouldFetch=n}return e.prototype.reobserve=function(e,t){e?this.updateOptions(e):this.updatePolling();var r=this.fetch(this.options,t);return this.concast&&this.concast.removeObserver(this.observer,!0),r.addObserver(this.observer),(this.concast=r).promise},e.prototype.updateOptions=function(e){return Object.assign(this.options,(0,s.oA)(e)),this.updatePolling(),this},e.prototype.stop=function(){this.concast&&(this.concast.removeObserver(this.observer),delete this.concast),this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),this.options.pollInterval=0,this.updatePolling())},e.prototype.updatePolling=function(){var e=this,t=this.pollingInfo,r=this.options.pollInterval;if(r){if((!t||t.interval!==r)&&((0,i.kG)(r,20),!1!==this.shouldFetch)){(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(e.shouldFetch&&e.shouldFetch()?e.reobserve({fetchPolicy:"network-only",nextFetchPolicy:e.options.fetchPolicy||"cache-first"},a.I.poll).then(o,o):o())},o=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};o()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)},e}(),c=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,u=e.call(this,(function(e){return u.onSubscribe(e)}))||this;u.observers=new Set,u.subscriptions=new Set,u.observer={next:function(e){(u.lastError||u.isDifferentFromLastResult(e))&&(u.updateLastResult(e),(0,s.pM)(u.observers,"next",e))},error:function(e){u.updateLastResult((0,n.__assign)((0,n.__assign)({},u.lastResult),{error:e,errors:e.graphQLErrors,networkStatus:a.I.error,loading:!1})),(0,s.pM)(u.observers,"error",u.lastError=e)}},u.isTornDown=!1,u.options=o,u.queryId=r.generateQueryId();var c=(0,s.$H)(o.query);return u.queryName=c&&c.name&&c.name.value,u.queryManager=r,u.queryInfo=i,u}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.lastResult,r=this.queryInfo.networkStatus||t&&t.networkStatus||a.I.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:(0,a.O)(r),networkStatus:r});if(this.isTornDown)return i;var o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("no-cache"===s||"network-only"===s)delete i.partial;else if(!i.data||!this.queryManager.transform(this.options.query).hasForcedResolvers){var u=this.queryInfo.getDiff();i.data=u.complete||this.options.returnPartialData?u.result:void 0,u.complete?(i.networkStatus!==a.I.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=a.I.ready,i.loading=!1),delete i.partial):i.partial=!0}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e){return!(0,o.D)(this.lastResultSnapshot,e)},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t={pollInterval:0},r=this.options.fetchPolicy;return"no-cache"!==r&&"cache-and-network"!==r&&(t.fetchPolicy="network-only",t.nextFetchPolicy=r||"cache-first"),e&&!(0,o.D)(this.options.variables,e)&&(t.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.newReobserver(!1).reobserve(t,a.I.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId();return r.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=a.I.fetchMore,this.observe()),this.queryManager.fetchQuery(i,r,a.I.fetchMore).then((function(n){var i=n.data,o=e.updateQuery;return o?t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:r.variables})})):t.queryManager.cache.writeQuery({query:r.query,variables:r.variables,data:i}),n})).finally((function(){t.queryManager.stopQuery(i),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){if((0,o.D)(this.variables,e))return this.observers.size?this.result():Promise.resolve();if(this.options.variables=e,!this.observers.size)return Promise.resolve();var t=this.options.fetchPolicy,r=void 0===t?"cache-first":t,n={fetchPolicy:r,variables:e};return"cache-first"!==r&&"no-cache"!==r&&"network-only"!==r&&(n.fetchPolicy="cache-and-network",n.nextFetchPolicy=r),this.reobserve(n,a.I.setVariables)},t.prototype.updateQuery=function(e){var t,r=this.queryManager,n=e(r.cache.diff({query:this.options.query,variables:this.variables,previousResult:null===(t=this.lastResult)||void 0===t?void 0:t.data,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(r.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(e){this.getReobserver().updateOptions({pollInterval:e})},t.prototype.stopPolling=function(){this.reobserver&&this.reobserver.updateOptions({pollInterval:0})},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:(0,s.Xh)(e),(0,s.Of)(e.errors)||delete this.lastError,t},t.prototype.onSubscribe=function(e){var t=this;if(e===this.observer)return function(){};try{var r=e._subscription._observer;r&&!r.error&&(r.error=f)}catch(i){}var n=!this.observers.size;return this.observers.add(e),this.lastError?e.error&&e.error(this.lastError):this.lastResult&&e.next&&e.next(this.lastResult),n&&this.reobserve().catch((function(e){})),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.getReobserver=function(){return this.reobserver||(this.reobserver=this.newReobserver(!0))},t.prototype.newReobserver=function(e){var t=this,r=this.queryManager,i=this.queryId;return r.setObservableQuery(this),new u(this.observer,e?this.options:(0,n.__assign)({},this.options),(function(e,n){return r.setObservableQuery(t),r.fetchQueryObservable(i,e,n)}),!r.ssrMode&&function(){return!(0,a.O)(t.queryInfo.networkStatus)})},t.prototype.reobserve=function(e,t){return this.isTornDown=!1,this.getReobserver().reobserve(e,t)},t.prototype.observe=function(){this.observer.next(this.getCurrentResult(!1))},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.reobserver&&(this.reobserver.stop(),delete this.reobserver),delete this.options.context,this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(s.y$);function f(e){}},71439:function(e,t,r){"use strict";r.r(t),r.d(t,{ApolloCache:function(){return f.ApolloCache},ApolloClient:function(){return n.f},ApolloError:function(){return c.c},Cache:function(){return f.Cache},HttpLink:function(){return d.uG},InMemoryCache:function(){return f.InMemoryCache},MissingFieldError:function(){return f.MissingFieldError},NetworkStatus:function(){return o.I},Observable:function(){return v.y$},ObservableQuery:function(){return i.u},checkFetcher:function(){return d.U2},createHttpLink:function(){return d.LQ},createSignalIfSupported:function(){return d.$g},defaultDataIdFromObject:function(){return f.defaultDataIdFromObject},disableExperimentalFragmentVariables:function(){return S},disableFragmentWarnings:function(){return w},enableExperimentalFragmentVariables:function(){return _},fallbackHttpConfig:function(){return d.SC},fromError:function(){return p.Qc},fromPromise:function(){return p.p4},gql:function(){return b.a},isApolloError:function(){return c.M},isReference:function(){return v.hh},makeReference:function(){return v.kQ},makeVar:function(){return f.makeVar},mergeOptions:function(){return n.J},parseAndCheckHttpResponse:function(){return d.dO},resetCaches:function(){return m},rewriteURIForGET:function(){return d.Hg},selectHttpOptionsAndBody:function(){return d.E4},selectURI:function(){return d.rg},serializeFetchParameter:function(){return d.gE},setLogVerbosity:function(){return y.U6},throwServerError:function(){return p.PW},toPromise:function(){return p.Vi}});var n=r(5870),i=r(13910),o=r(85942),a=r(72191),s={};for(var u in a)["default","ApolloClient","mergeOptions","ObservableQuery","NetworkStatus","isApolloError","ApolloError","Cache","ApolloCache","InMemoryCache","MissingFieldError","defaultDataIdFromObject","makeVar","fromError","toPromise","fromPromise","throwServerError","Observable","isReference","makeReference","setLogVerbosity","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","gql"].indexOf(u)<0&&(s[u]=function(e){return a[e]}.bind(0,u));r.d(t,s);var c=r(21498),f=r(65341),l=r(35367);s={};for(var u in l)["default","ApolloClient","mergeOptions","ObservableQuery","NetworkStatus","isApolloError","ApolloError","Cache","ApolloCache","InMemoryCache","MissingFieldError","defaultDataIdFromObject","makeVar","fromError","toPromise","fromPromise","throwServerError","Observable","isReference","makeReference","setLogVerbosity","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","gql"].indexOf(u)<0&&(s[u]=function(e){return l[e]}.bind(0,u));r.d(t,s);var h=r(81707);s={};for(var u in h)["default","ApolloClient","mergeOptions","ObservableQuery","NetworkStatus","isApolloError","ApolloError","Cache","ApolloCache","InMemoryCache","MissingFieldError","defaultDataIdFromObject","makeVar","fromError","toPromise","fromPromise","throwServerError","Observable","isReference","makeReference","setLogVerbosity","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","gql"].indexOf(u)<0&&(s[u]=function(e){return h[e]}.bind(0,u));r.d(t,s);var d=r(66414),p=r(26822),v=r(49247),y=r(86554),g=r(44119),b=r.n(g);(0,y.U6)("log");var m=b().resetCaches,w=b().disableFragmentWarnings,_=b().enableExperimentalFragmentVariables,S=b().disableExperimentalFragmentVariables},85942:function(e,t,r){"use strict";var n;function i(e){return!!e&&e<7}r.d(t,{I:function(){return n},O:function(){return i}}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}))},72191:function(){},21498:function(e,t,r){"use strict";r.d(t,{M:function(){return o},c:function(){return a}});var n=r(70655),i=r(49247);function o(e){return e.hasOwnProperty("graphQLErrors")}var a=function(e){function t(r){var n=r.graphQLErrors,o=r.networkError,a=r.errorMessage,s=r.extraInfo,u=e.call(this,a)||this;return u.graphQLErrors=n||[],u.networkError=o||null,u.message=a||function(e){var t="";return(0,i.Of)(e.graphQLErrors)&&e.graphQLErrors.forEach((function(e){var r=e?e.message:"Error message not found.";t+=r+"\n"})),e.networkError&&(t+=e.networkError.message+"\n"),t=t.replace(/\n$/,"")}(u),u.extraInfo=s,u.__proto__=t.prototype,u}return(0,n.__extends)(t,e),t}(Error)},46829:function(e,t,r){"use strict";r.d(t,{ApolloProvider:function(){return i.ApolloProvider},useLazyQuery:function(){return i.useLazyQuery},useMutation:function(){return i.useMutation},useQuery:function(){return i.useQuery}});var n=r(71439);r.o(n,"ApolloLink")&&r.d(t,{ApolloLink:function(){return n.ApolloLink}}),r.o(n,"ApolloProvider")&&r.d(t,{ApolloProvider:function(){return n.ApolloProvider}}),r.o(n,"useLazyQuery")&&r.d(t,{useLazyQuery:function(){return n.useLazyQuery}}),r.o(n,"useMutation")&&r.d(t,{useMutation:function(){return n.useMutation}}),r.o(n,"useQuery")&&r.d(t,{useQuery:function(){return n.useQuery}});var i=r(63341);r.o(i,"ApolloLink")&&r.d(t,{ApolloLink:function(){return i.ApolloLink}})},97222:function(e,t,r){"use strict";r.d(t,{i:function(){return f}});var n=r(70655),i=r(86554),o=r(49247),a=r(26822);function s(e,t){return t?t(e):o.y$.of()}function u(e){return"function"===typeof e?new f(e):e}function c(e){return e.request.length<=1}!function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}(0,n.__extends)(t,e)}(Error);var f=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return o.y$.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(u).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=u(r),a=u(n||new e(s));return c(i)&&c(a)?new e((function(e){return t(e)?i.request(e)||o.y$.of():a.request(e)||o.y$.of()})):new e((function(e,r){return t(e)?i.request(e,r)||o.y$.of():a.request(e,r)||o.y$.of()}))},e.execute=function(e,t){return e.request((0,a.zi)(t.context,(0,a.DQ)((0,a.Ak)(t))))||o.y$.of()},e.concat=function(t,r){var n=u(t);if(c(n))return n;var i=u(r);return c(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||o.y$.of()}))||o.y$.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||o.y$.of()}))||o.y$.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(s)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw new i.ej(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},24957:function(e,t,r){"use strict";r.d(t,{z:function(){return n}});var n=r(97222).i.concat},67325:function(e,t,r){"use strict";r.d(t,{c:function(){return n}});var n=r(97222).i.empty},2550:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n=r(97222).i.execute},34674:function(e,t,r){"use strict";r.d(t,{D:function(){return n}});var n=r(97222).i.from},81707:function(e,t,r){"use strict";r.r(t),r.d(t,{ApolloLink:function(){return u.i},concat:function(){return a.z},empty:function(){return n.c},execute:function(){return s.h},from:function(){return i.D},split:function(){return o.V}});var n=r(67325),i=r(34674),o=r(64738),a=r(24957),s=r(2550),u=r(97222),c=r(79875),f={};for(var l in c)["default","empty","from","split","concat","execute","ApolloLink"].indexOf(l)<0&&(f[l]=function(e){return c[e]}.bind(0,l));r.d(t,f)},64738:function(e,t,r){"use strict";r.d(t,{V:function(){return n}});var n=r(97222).i.split},79875:function(){},66414:function(e,t,r){"use strict";r.d(t,{uG:function(){return w},U2:function(){return h},LQ:function(){return m},$g:function(){return d},SC:function(){return f},dO:function(){return o},Hg:function(){return b},E4:function(){return l},rg:function(){return p},gE:function(){return s}});var n=r(26822),i=Object.prototype.hasOwnProperty;function o(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(n){var r=n;throw r.name="ServerParseError",r.response=t,r.statusCode=t.status,r.bodyText=e,r}})).then((function(r){return t.status>=300&&(0,n.PW)(t,r,"Response not successful: Received status code "+t.status),Array.isArray(r)||i.call(r,"data")||i.call(r,"errors")||(0,n.PW)(t,r,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),r}))}}var a=r(86554),s=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=new a.ej(23);throw n.parseError=i,n}return r},u=r(70655),c=r(39011),f={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},l=function(e,t){for(var r=[],n=2;n0&&(this.previousOptions.subscription!==this.getOptions().subscription||!(0,s.D)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),t=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),(0,a.__assign)((0,a.__assign)({},t),{variables:this.getOptions().variables})},t.prototype.afterExecute=function(){this.isMounted=!0},t.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},t.prototype.initialize=function(e){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},t.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},t.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},t.prototype.updateResult=function(e){this.isMounted&&this.setResult(e)},t.prototype.updateCurrentData=function(e){var t=this.getOptions().onSubscriptionData;this.updateResult({data:e.data,loading:!1,error:void 0}),t&&t({client:this.refreshClient().client,subscriptionData:e})},t.prototype.updateError=function(e){this.updateResult({error:e,loading:!1})},t.prototype.completeSubscription=function(){var e=this.getOptions().onSubscriptionComplete;e&&e(),this.endSubscription()},t.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)}}(c),r(21498)),l=r(71439),h=function(e){function t(t){var r=t.options,n=t.context,i=t.result,o=t.setResult,a=e.call(this,r,n)||this;return a.runMutation=function(e){void 0===e&&(e={}),a.onMutationStart();var t=a.generateNewMutationId();return a.mutate(e).then((function(e){return a.onMutationCompleted(e,t),e})).catch((function(e){if(a.onMutationError(e,t),!a.getOptions().onError)throw e}))},a.verifyDocumentType(r.mutation,u.n_.Mutation),a.result=i,a.setResult=o,a.mostRecentMutationId=0,a}return(0,a.__extends)(t,e),t.prototype.execute=function(e){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,u.n_.Mutation),[this.runMutation,(0,a.__assign)((0,a.__assign)({},e),{client:this.refreshClient().client})]},t.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},t.prototype.cleanup=function(){},t.prototype.mutate=function(e){return this.refreshClient().client.mutate((0,l.mergeOptions)(this.getOptions(),e))},t.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},t.prototype.onMutationCompleted=function(e,t){var r=this.getOptions(),n=r.onCompleted,i=r.ignoreResults,o=e.data,a=e.errors,s=a&&a.length>0?new f.c({graphQLErrors:a}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:o,error:s}),n&&n(o)},t.prototype.onMutationError=function(e,t){var r=this.getOptions().onError;this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0}),r&&r(e)},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){!this.isMounted||this.previousResult&&(0,s.D)(this.previousResult,e)||(this.setResult(e),this.previousResult=e)},t}(c),d=function(e){function t(t){var r=t.options,n=t.context,i=t.onNewData,o=e.call(this,r,n)||this;return o.runLazy=!1,o.previous=Object.create(null),o.runLazyQuery=function(e){o.cleanup(),o.runLazy=!0,o.lazyOptions=e,o.onNewData()},o.getQueryResult=function(){var e=o.observableQueryFields(),t=o.getOptions();if(t.skip)e=(0,a.__assign)((0,a.__assign)({},e),{data:void 0,error:void 0,loading:!1,called:!0});else if(o.currentObservable){var r=o.currentObservable.getCurrentResult(),n=r.data,i=r.loading,s=r.partial,u=r.networkStatus,c=r.errors,h=r.error;if(c&&c.length>0&&(h=new f.c({graphQLErrors:c})),e=(0,a.__assign)((0,a.__assign)({},e),{data:n,loading:i,networkStatus:u,error:h,called:!0}),i);else if(h)Object.assign(e,{data:(o.currentObservable.getLastResult()||{}).data});else{var d=o.currentObservable.options.fetchPolicy;if(t.partialRefetch&&s&&(!n||0===Object.keys(n).length)&&"cache-only"!==d)return Object.assign(e,{loading:!0,networkStatus:l.NetworkStatus.loading}),e.refetch(),e}}e.client=o.client,o.setOptions(t,!0);var p=o.previous.result;return o.previous.loading=p&&p.loading||!1,e.previousData=p&&(p.data||p.previousData),o.previous.result=e,o.currentObservable&&o.currentObservable.resetQueryStoreErrors(),e},o.obsRefetch=function(e){var t;return null===(t=o.currentObservable)||void 0===t?void 0:t.refetch(e)},o.obsFetchMore=function(e){return o.currentObservable.fetchMore(e)},o.obsUpdateQuery=function(e){return o.currentObservable.updateQuery(e)},o.obsStartPolling=function(e){var t;null===(t=o.currentObservable)||void 0===t||t.startPolling(e)},o.obsStopPolling=function(){var e;null===(e=o.currentObservable)||void 0===e||e.stopPolling()},o.obsSubscribeToMore=function(e){return o.currentObservable.subscribeToMore(e)},o.onNewData=i,o}return(0,a.__extends)(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,r=e.query;return(t||r!==this.previous.query)&&(this.removeQuerySubscription(),this.removeObservable(!t),this.previous.query=r),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:l.NetworkStatus.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this,t=this.getOptions();return!t.skip&&!1!==t.ssr&&new Promise((function(t){return e.startQuerySubscription(t)}))},t.prototype.afterExecute=function(e){var t=(void 0===e?{}:e).lazy,r=void 0!==t&&t;return this.isMounted=!0,r&&!this.runLazy||this.handleErrorOrCompleted(),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),this.removeObservable(!0),delete this.previous.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=(0,a.__assign)((0,a.__assign)({},t.variables),this.lazyOptions.variables),t.context=(0,a.__assign)((0,a.__assign)({},t.context),this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.ssrInitiated=function(){return this.context&&this.context.renderPromises},t.prototype.getExecuteResult=function(){var e=this.getQueryResult();return this.startQuerySubscription(),e},t.prototype.getExecuteSsrResult=function(){var e,t=this.getOptions(),r=t.ssr,n=t.skip,i=!1===r||n,o=this.refreshClient().client.disableNetworkFetches,s=(0,a.__assign)({loading:!0,networkStatus:l.NetworkStatus.loading,called:!0,data:void 0,stale:!1,client:this.client},this.observableQueryFields());return i&&(this.ssrInitiated()||o)?(this.previous.result=s,s):(this.ssrInitiated()&&(e=this.context.renderPromises.addQueryPromise(this,this.getQueryResult)||s),e)},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,u.n_.Query);var t=e.displayName||"Query";return!this.ssrInitiated()||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e.fetchPolicy="cache-first"),(0,a.__assign)((0,a.__assign)({},e),{displayName:t,context:e.context})},t.prototype.initializeObservableQuery=function(){if(this.ssrInitiated()&&(this.currentObservable=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable){var e=this.prepareObservableQueryOptions();this.previous.observableQueryOptions=(0,a.__assign)((0,a.__assign)({},e),{children:null}),this.currentObservable=this.refreshClient().client.watchQuery((0,a.__assign)({},e)),this.ssrInitiated()&&this.context.renderPromises.registerSSRObservable(this.currentObservable,e)}},t.prototype.updateObservableQuery=function(){if(this.currentObservable){if(!this.getOptions().skip){var e=(0,a.__assign)((0,a.__assign)({},this.prepareObservableQueryOptions()),{children:null});(0,s.D)(e,this.previous.observableQueryOptions)||(this.previous.observableQueryOptions=e,this.currentObservable.setOptions(e).catch((function(){})))}}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(e){var t=this;void 0===e&&(e=this.onNewData),this.currentSubscription||this.getOptions().skip||(this.currentSubscription=this.currentObservable.subscribe({next:function(r){var n=r.loading,i=r.networkStatus,o=r.data,a=t.previous.result;a&&a.loading===n&&a.networkStatus===i&&(0,s.D)(a.data,o)||e()},error:function(r){if(t.resubscribeToQuery(),!r.hasOwnProperty("graphQLErrors"))throw r;var n=t.previous.result;(n&&n.loading||!(0,s.D)(r,t.previous.error))&&(t.previous.error=r,e())}}))},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable;if(e){var t=e.getLastError(),r=e.getLastResult();e.resetLastResults(),this.startQuerySubscription(),Object.assign(e,{lastError:t,lastResult:r})}},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable&&this.previous.result){var e=this.previous.result,t=e.data,r=e.loading,n=e.error;if(!r){var i=this.getOptions(),o=i.query,a=i.variables,u=i.onCompleted,c=i.onError,f=i.skip;if(this.previousOptions&&!this.previous.loading&&(0,s.D)(this.previousOptions.query,o)&&(0,s.D)(this.previousOptions.variables,a))return;!u||n||f?c&&n&&c(n):u(t)}}},t.prototype.removeQuerySubscription=function(){this.currentSubscription&&(this.currentSubscription.unsubscribe(),delete this.currentSubscription)},t.prototype.removeObservable=function(e){this.currentObservable&&(this.currentObservable.tearDownQuery(),e&&delete this.currentObservable)},t.prototype.observableQueryFields=function(){var e;return{variables:null===(e=this.currentObservable)||void 0===e?void 0:e.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(c);function p(e,t,r){void 0===r&&(r=!1);var i=(0,n.useContext)((0,o.KZ)()),u=(0,n.useReducer)((function(e){return e+1}),0),c=u[0],f=u[1],l=t?(0,a.__assign)((0,a.__assign)({},t),{query:e}):{query:e},h=(0,n.useRef)(),p=h.current||new d({options:l,context:i,onNewData:function(){p.ssrInitiated()?f():Promise.resolve().then(f)}});p.setOptions(l),p.context=i,p.ssrInitiated()&&!h.current&&(h.current=p);var v=function(e,t){var r=(0,n.useRef)();return r.current&&(0,s.D)(t,r.current.key)||(r.current={key:t,value:e()}),r.current.value}((function(){return r?p.executeLazy():p.execute()}),{options:(0,a.__assign)((0,a.__assign)({},l),{onError:void 0,onCompleted:void 0}),context:i,tick:c}),y=r?v[1]:v;return(0,n.useEffect)((function(){return h.current||(h.current=p),function(){return p.cleanup()}}),[]),(0,n.useEffect)((function(){return p.afterExecute({lazy:r})}),[y.loading,y.networkStatus,y.error,y.data]),v}function v(e,t){return p(e,t,!0)}function y(e,t){var r=(0,n.useContext)((0,o.KZ)()),i=(0,n.useState)({called:!1,loading:!1}),s=i[0],u=i[1],c=t?(0,a.__assign)((0,a.__assign)({},t),{mutation:e}):{mutation:e},f=(0,n.useRef)();var l=(f.current||(f.current=new h({options:c,context:r,result:s,setResult:u})),f.current);return l.setOptions(c),l.context=r,(0,n.useEffect)((function(){return l.afterExecute()})),l.execute(s)}function g(e,t){return p(e,t,!1)}},63341:function(e,t,r){"use strict";r.d(t,{ApolloProvider:function(){return n.eT},useLazyQuery:function(){return i.td},useMutation:function(){return i.Db},useQuery:function(){return i.aM}});var n=r(30811),i=r(42100),o=(r(94901),r(95923));r.o(o,"ApolloLink")&&r.d(t,{ApolloLink:function(){return o.ApolloLink}})},94901:function(e,t,r){"use strict";r.d(t,{E2:function(){return s},mw:function(){return a},n_:function(){return n}});var n,i=r(86554);!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(n||(n={}));var o=new Map;function a(e){var t;switch(e){case n.Query:t="Query";break;case n.Mutation:t="Mutation";break;case n.Subscription:t="Subscription"}return t}function s(e){var t,r,a=o.get(e);if(a)return a;(0,i.kG)(!!e&&!!e.kind,34);var s=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),u=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),c=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),f=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));(0,i.kG)(!s.length||u.length||c.length||f.length,35),(0,i.kG)(u.length+c.length+f.length<=1,36),r=u.length?n.Query:n.Mutation,u.length||c.length||(r=n.Subscription);var l=u.length?u:c.length?c:f;(0,i.kG)(1===l.length,37);var h=l[0];t=h.variableDefinitions||[];var d={name:h.name&&"Name"===h.name.kind?h.name.value:"data",type:r,variables:t};return o.set(e,d),d}},95923:function(){},49247:function(e,t,r){"use strict";r.d(t,{X_:function(){return ae},w0:function(){return $},y$:function(){return Z()},Gw:function(){return j},NC:function(){return w},sz:function(){return ie},aL:function(){return z},mr:function(){return ce},Xh:function(){return ee},oA:function(){return fe},xn:function(){return Y},F:function(){return f},O4:function(){return T},kU:function(){return C},hi:function(){return l},Yk:function(){return c},p$:function(){return O},$H:function(){return M},rY:function(){return x},iW:function(){return I},PT:function(){return m},qw:function(){return S},d2:function(){return ue},mj:function(){return s},FS:function(){return a},My:function(){return E},Ao:function(){return A},Of:function(){return se},hh:function(){return v},pM:function(){return ne},kQ:function(){return p},Jv:function(){return re},Ee:function(){return H},bw:function(){return W},ob:function(){return K},Fo:function(){return F},u2:function(){return _},LZ:function(){return o},vf:function(){return g}});var n=r(77304),i=r(86554);function o(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments;e.name.value;(0,i.kG)(r&&1===r.length,39);var n=r[0];(0,i.kG)(n.name&&"if"===n.name.value,40);var o=n.value;(0,i.kG)(o&&("Variable"===o.kind||"BooleanValue"===o.kind),41),t.push({directive:e,ifArgument:n})}}));return t}(r).every((function(e){var r=e.directive,n=e.ifArgument,o=!1;return"Variable"===n.value.kind?(o=t&&t[n.value.name.value],(0,i.kG)(void 0!==o,38)):o=n.value.value,"skip"===r.name.value?!o:o}))}function a(e,t){return function(e){var t=[];return(0,n.Vn)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function s(e){return e&&a(["client"],e)&&a(["export"],e)}var u=r(70655);function c(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(42);"FragmentDefinition"===e.kind&&n.push(e)})),"undefined"===typeof r&&((0,i.kG)(1===n.length,43),r=n[0].name.value),(0,u.__assign)((0,u.__assign)({},e),{definitions:(0,u.__spreadArrays)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function f(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function l(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=t&&t[e.name.value];return(0,i.kG)(r,44),r;default:return null}}var h=r(35035),d=r.n(h);function p(e){return{__ref:String(e)}}function v(e){return Boolean(e&&"object"===typeof e&&"string"===typeof e.__ref)}function y(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var o={};r.fields.map((function(e){return y(o,e.name,e.value,n)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(r)){var a=(n||{})[r.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return y(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new i.ej(53);e[t.value]=null}}function g(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return y(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return y(n,r,i,t)}))),m(e.name.value,n,r)}var b=["connection","include","skip","client","rest","export"];function m(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),r.connection.key+"("+JSON.stringify(i)+")"}return r.connection.key}var o=e;if(t){var a=d()(t);o+="("+a+")"}return r&&Object.keys(r).forEach((function(e){-1===b.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@"+e+"("+JSON.stringify(r[e])+")":o+="@"+e)})),o}function w(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return y(r,n,i,t)})),r}return null}function _(e){return e.alias?e.alias.value:e.name.value}function S(e,t,r){if("string"===typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n1)for(var n=new $,i=1;i0}function ue(e){return e.errors&&e.errors.length>0||!1}"function"===typeof Symbol&&Symbol.species&&Object.defineProperty(ae,Symbol.species,{value:Z()});var ce="function"===typeof WeakMap&&!("object"===typeof navigator&&"ReactNative"===navigator.product);function fe(){for(var e=[],t=0;t0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,c=f,console&&console.warn&&console.warn(c)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"===typeof u)n(u,this,t);else{var c=u.length,f=p(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},55823:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(1)),n(r(2)),n(r(3)),n(r(4)),n(r(5)),n(r(6)),n(r(7)),n(r(8)),n(r(9)),n(r(10)),n(r(11)),n(r(12)),n(r(13))},function(e,t,r){e.exports={a:"Anchor__a___1_Iz8"}},function(e,t,r){e.exports={button:"Button__button___vS7Mv",signInButton:"Button__signInButton___3bUH-",googleSignInButton:"Button__googleSignInButton___1YiCu",signInButtonIcon:"Button__signInButtonIcon___ihN75",auth0SignInButton:"Button__auth0SignInButton___znnCj",facebookSignInButton:"Button__facebookSignInButton___34Txh",amazonSignInButton:"Button__amazonSignInButton___2EMtl",oAuthSignInButton:"Button__oAuthSignInButton___3UGOl",signInButtonContent:"Button__signInButtonContent___xqTXJ"}},function(e,t,r){e.exports={formContainer:"Form__formContainer___1GA3x",formSection:"Form__formSection___1PPvW",formField:"Form__formField___38Ikl",formRow:"Form__formRow___2mwRs"}},function(e,t,r){e.exports={hint:"Hint__hint___2XngB"}},function(e,t,r){e.exports={input:"Input__input___3e_bf",inputLabel:"Input__inputLabel___3VF0S",label:"Input__label___23sO8",radio:"Input__radio___2hllK"}},function(e,t,r){e.exports={navBar:"Nav__navBar___xtCFA",navRight:"Nav__navRight___1QG2J",nav:"Nav__nav___2Dx2Y",navItem:"Nav__navItem___1LtFQ"}},function(e,t,r){e.exports={photoPickerButton:"PhotoPicker__photoPickerButton___2XdVn",photoPlaceholder:"PhotoPicker__photoPlaceholder___2JXO4",photoPlaceholderIcon:"PhotoPicker__photoPlaceholderIcon___3Et71"}},function(e,t,r){e.exports={container:"Section__container___3YYTG",actionRow:"Section__actionRow___2LWSU",sectionHeader:"Section__sectionHeader___2djyg",sectionHeaderHint:"Section__sectionHeaderHint___3Wxdc",sectionBody:"Section__sectionBody___ihqqd",sectionHeaderContent:"Section__sectionHeaderContent___1UCqa",sectionFooter:"Section__sectionFooter___1T54C",sectionFooterPrimaryContent:"Section__sectionFooterPrimaryContent___2r9ZX",sectionFooterSecondaryContent:"Section__sectionFooterSecondaryContent___Nj41Q"}},function(e,t,r){e.exports={selectInput:"SelectInput__selectInput___3efO4"}},function(e,t,r){e.exports={strike:"Strike__strike___1XV1b",strikeContent:"Strike__strikeContent___10gLb"}},function(e,t,r){e.exports={toast:"Toast__toast___XXr3v",toastClose:"Toast__toastClose___18lU4"}},function(e,t,r){e.exports={totpQrcode:"Totp__totpQrcode___1crLx"}},function(e,t,r){e.exports={sumerianSceneContainer:"XR__sumerianSceneContainer___3nVMt",sumerianScene:"XR__sumerianScene___2Tt7-",loadingOverlay:"XR__loadingOverlay___IbqcI",loadingContainer:"XR__loadingContainer___2Itxb",loadingLogo:"XR__loadingLogo___Ub7xQ",loadingSceneName:"XR__loadingSceneName___3__ne",loadingBar:"XR__loadingBar___2vcke",loadingBarFill:"XR__loadingBarFill___3M-D9",sceneErrorText:"XR__sceneErrorText___2y0tp",sceneBar:"XR__sceneBar___2ShrP",sceneName:"XR__sceneName___1ApHr",sceneActions:"XR__sceneActions___7plGs",actionButton:"XR__actionButton___2poIM",tooltip:"XR__tooltip___UYyhn",actionIcon:"XR__actionIcon___2qnd2",autoShowTooltip:"XR__autoShowTooltip___V1QH7"}}])},94079:function(e,t,r){"use strict";t.Bi=void 0;var n=r(70655);var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[255&(this.checksum^s)]}}catch(u){t={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Bi=i;var o=Uint32Array.from([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},48260:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16665:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35470:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},30969:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55287:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,i=t.subtle;return r.map((function(e){return i[e]})).concat(n).every((function(e){return"function"===typeof e}))}return!1}},40087:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70655);n.__exportStar(r(48260),t),n.__exportStar(r(16665),t),n.__exportStar(r(35470),t),n.__exportStar(r(30969),t),n.__exportStar(r(55287),t)},57333:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},52769:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(63479),i=r(38889),o=r(41938),a=r(21),s=r(40087),u=r(81135),c=function(){function e(e){a.supportsWebCrypto(u.locateWindow())?this.hash=new i.Sha256(e):s.isMsWindow(u.locateWindow())?this.hash=new n.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},63479:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(38036),i=r(57333),o=r(98143),a=r(81135),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,r){var n=a.locateWindow().msCrypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r("ImportKey completed without importing key.")},n.onerror=function(){r("ImportKey failed to import key.")}}))}(e).then((function(e){return a.locateWindow().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve(a.locateWindow().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;n.isEmptyData(e)||(this.operation=this.operation.then((function(r){return r.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},r.process(u(e)),r})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,r){e.onerror=function(){r("Error encountered finalizing hash")},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),r("Error encountered finalizing hash")},e.finish()}))}))},e}();function u(e){return"string"===typeof e?o.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},77643:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(70655).__exportStar(r(52769),t);var n=r(63479);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return n.Sha256}});var i=r(38889);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},38036:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},38889:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(98143),i=r(38036),o=r(57333),a=r(81135),s=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,r){a.locateWindow().crypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!i.isEmptyData(e)){var t=u(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return a.locateWindow().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):i.isEmptyData(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return a.locateWindow().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();function u(e){return"string"===typeof e?n.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},10914:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(89945),i=function(){function e(){this.state=Int32Array.from(n.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,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.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),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;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,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[l-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[l]=(d+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(n.KEY[l]+this.temp[l]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;f=c,c=u,u=s,s=a+v|0,a=o,o=i,i=r,r=v+y|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=i},89945:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 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},41938:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(70655).__exportStar(r(65430),t)},65430:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(70655),i=r(89945),o=r(10914),a=r(63725),s=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 r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n>6|192,63&i|128);else if(r+1>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="",r=0,n=e.length;r>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},81558:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0>6|192,63&i|128);else if(r+1>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="",r=0,n=e.length;r>>((3&t)<<3)&255;return n}}},62694:function(e,t,r){var n,i,o=r(14488),a=r(48724),s=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,f=t||[],l=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==l||null==h){var d=o();null==l&&(l=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=p-s+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=h;var g=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=p/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=h>>>8|128,f[c++]=255&h;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},69946:function(e,t,r){var n=r(14488),i=r(48724);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},81135:function(e,t,r){"use strict";r.r(t),r.d(t,{locateWindow:function(){return i}});var n={};function i(){return"undefined"!==typeof window?window:"undefined"!==typeof self?self:n}},98143:function(e,t,r){"use strict";r.r(t),r.d(t,{fromUtf8:function(){return n},toUtf8:function(){return i}});var n=function(e){return"function"===typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r>6|192,63&i|128);else if(r+1>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="",r=0,n=e.length;r=0&&e.indexOf(t,r)===r}(_,h)}return!1}function f(e){return Object.keys(e).filter(l,e)}function l(e){return void 0!==this[e]}var h="{ [native code] }";function d(e,t){var r=s.get(e);if(r){if(r.has(t))return!0}else s.set(e,r=new Set);return r.add(t),!1}},940:function(e,t,r){"use strict";r.d(t,{sD:function(){return i},ZA:function(){return O},xk:function(){return T},bR:function(){return P},ws:function(){return V},KC:function(){return B},AM:function(){return ee},MZ:function(){return L},eR:function(){return re}});var n,i=function(){function e(e){var t=e||{},r=t.ValidationData,n=t.Username,i=t.Password,o=t.AuthParameters,a=t.ClientMetadata;this.validationData=r||{},this.authParameters=o||{},this.clientMetadata=a||{},this.username=n,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),o=r(15905),a=r(78249),s=r.n(a),u=(r(4433),r(52153)),c=r.n(u),f=r(88010),l=r.n(f);if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(42474)}catch(ne){}function h(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(ne){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(ne){}}throw new Error("Native crypto module could not be used to get secure random number.")}var d,p=function(){function e(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var r=[],n=0;n>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")}(this)},e}(),v=y;function y(e,t){null!=e&&this.fromString(e,t)}function g(){return new y(null)}var b="undefined"!==typeof navigator;b&&"Microsoft Internet Explorer"==navigator.appName?(y.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,f=s*u+c*a;i=((u=a*u+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+s*c+(i>>>30),r[n++]=1073741823&u}return i},d=30):b&&"Netscape"!=navigator.appName?(y.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},d=26):(y.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,f=s*u+c*a;i=((u=a*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+s*c,r[n++]=268435455&u}return i},d=28),y.prototype.DB=d,y.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function M(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t},M.prototype.revert=function(e){var t=g();return e.copyTo(t),this.reduce(t),t},M.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},y.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},y.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var a=E(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-o):this[this.t-1]|=a<=this.DB&&(o-=this.DB))}this.clamp(),i&&y.ZERO.subTo(this,this)},y.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},y.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},y.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)<=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},y.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var a=r+1;a>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},y.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},y.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,f=o[c-1];if(0!=f){var l=f*(1<1?o[c-2]>>this.F2:0),h=this.FV/l,d=(1<=0&&(r[r.t++]=1,r.subTo(m,r)),y.ONE.dlShiftTo(c,m),m.subTo(o,o);o.t=0;){var w=r[--v]==f?this.DM:Math.floor(r[v]*h+(r[v-1]+p)*d);if((r[v]+=o.am(0,w,r,b,0,c))0&&r.rShiftTo(u,r),a<0&&y.ZERO.subTo(r,r)}}},y.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},y.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},y.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var r,n=(1<0)for(s>s)>0&&(i=!0,o=S(r));a>=0;)s>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=S(r));return i?o:"0"},y.prototype.negate=function(){var e=g();return y.ZERO.subTo(this,e),e},y.prototype.abs=function(){return this.s<0?this.negate():this},y.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},y.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+k(this[this.t-1]^this.s&this.DM)},y.prototype.mod=function(e){var t=g();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(y.ZERO)>0&&e.subTo(t,t),t},y.prototype.equals=function(e){return 0==this.compareTo(e)},y.prototype.add=function(e){var t=g();return this.addTo(e,t),t},y.prototype.subtract=function(e){var t=g();return this.subTo(e,t),t},y.prototype.multiply=function(e){var t=g();return this.multiplyTo(e,t),t},y.prototype.divide=function(e){var t=g();return this.divRemTo(e,t,null),t},y.prototype.modPow=function(e,t,r){var n,i=e.bitLength(),o=A(1),a=new M(t);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,c=n-1,f=(1<1){var l=g();for(a.sqrTo(s[1],l);u<=f;)s[u]=g(),a.mulTo(l,s[u-2],s[u]),u+=2}var h,d,p=e.t-1,v=!0,y=g();for(i=k(e[p])-1;p>=0;){for(i>=c?h=e[p]>>i-c&f:(h=(e[p]&(1<0&&(h|=e[p-1]>>this.DB+i-c)),u=n;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),v)s[h].copyTo(o),v=!1;else{for(;u>1;)a.sqrTo(o,y),a.sqrTo(y,o),u-=2;u>0?a.sqrTo(o,y):(d=o,o=y,y=d),a.mulTo(y,s[h],o)}for(;p>=0&&0==(e[p]&1<=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return q(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128===(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function K(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},91647:function(e,t,r){"use strict";r.d(t,{default:function(){return _d}});var n,i,o=function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},a=function(){for(var e=[],t=0;t=o){var u=console.log.bind(console);"ERROR"===t&&console.error&&(u=console.error.bind(console)),"WARN"===t&&console.warn&&(u=console.warn.bind(console));var c="["+t+"] "+this._ts()+" "+this.name;if(1===r.length&&"string"===typeof r[0])u(c+" - "+r[0]);else if(1===r.length)u(c,r[0]);else if("string"===typeof r[0]){var f=r.slice(1);1===f.length&&(f=f[0]),u(c+" - "+r[0],f)}else u(c,r)}},e.prototype.log=function(){for(var e=[],t=0;t0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},f=new u("Amplify"),l=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.Logger=u,this.ServiceWorker=null}return e.prototype.register=function(e){f.debug("component registered in amplify",e),this._components.push(e),"function"===typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):f.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),f.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var r=c(e,2),n=(r[0],r[1]);Object.keys(n).forEach((function(e){t._modules[e]&&(n[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}()),h=r(83454),d=[{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"}],p=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},v=function(e,t,r){if(!e||!e.sort)return!1;var n=r&&"desc"===r?-1:1;return e.sort((function(e,r){var i=e[t],o=r[t];return"undefined"===typeof o?"undefined"===typeof i?0:1*n:"undefined"===typeof i||io?1*n:0})),!0},y=function(e,t){var r=Object.assign({},e);return t&&("string"===typeof t?delete r[t]:t.forEach((function(e){delete r[e]}))),r},g=function(e,t){void 0===t&&(t="application/octet-stream");var r=e.toLowerCase(),n=d.filter((function(e){return r.endsWith("."+e.ext)}));return n.length>0?n[0].type:t},b=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},m=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=32;r>0;r-=1)e+=t[Math.floor(Math.random()*t.length)];return e},w=function(e){if(e.isResolved)return e;var t=!0,r=!1,n=!1,i=e.then((function(e){return n=!0,t=!1,e}),(function(e){throw r=!0,t=!1,e}));return i.isFullfilled=function(){return n},i.isPending=function(){return t},i.isRejected=function(){return r},i},_=function(){if("undefined"===typeof self)return!1;var e=self;return"undefined"!==typeof e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},S=function(){return{isBrowser:"undefined"!==typeof window&&"undefined"!==typeof window.document,isNode:"undefined"!==typeof h&&null!=h.versions&&null!=h.versions.node}},E=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),!k(e))return e;var n={};for(var i in e){if(e.hasOwnProperty(i))n[t.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=r.includes(i)?e[i]:E(e[i],t,r)}return n},A=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),!k(e))return e;var n={};for(var i in e){if(e.hasOwnProperty(i))n[t.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=r.includes(i)?e[i]:A(e[i],t,r)}return n},k=function(e){return e instanceof Object&&!(e instanceof Array)&&!(e instanceof Function)&&!(e instanceof Number)&&!(e instanceof String)&&!(e instanceof Boolean)},M=function(){function e(){}return e.isEmpty=p,e.sortByField=v,e.objectLessAttributes=y,e.filenameToContentType=g,e.isTextFile=b,e.generateRandomString=m,e.makeQuerablePromise=w,e.isWebWorker=_,e.browserOrNode=S,e.transferKeyToLowerCase=E,e.transferKeyToUpperCase=A,e.isStrictObject=k,e}(),x=function(){function e(){this._logger=new u("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var r=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(n,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?r._serviceWorker=e.installing:e.waiting?r._serviceWorker=e.waiting:e.active&&(r._serviceWorker=e.active),r._registration=e,r._setupListeners(),r._logger.debug("Service Worker Registration Success: "+e),n(e)})).catch((function(e){return r._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(r,n){if(!S().isBrowser)return n(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then((function(n){if(!n)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)),r(e)})).catch((function(e){t._logger.error(e)}));t._subscription=n,t._logger.debug("User is subscribed to push: "+JSON.stringify(n)),r(n)}))}))},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(t),n=new Uint8Array(r.length),i=0;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},P=function(){for(var e=[],t=0;t-1)&&(n===N||R.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var i={channel:e,payload:O({},t),source:r,patternInfo:[]};try{this._toListeners(i)}catch(o){R.error(o)}},e.prototype.listen=function(e,t,r){var n,i=this;if(void 0===r&&(r="noname"),function(e){return void 0!==e.onHubCapsule}(t))R.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),n=t.onHubCapsule.bind(t);else{if("function"!==typeof t)throw new Error("No callback supplied to Hub");n=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:n});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:r,callback:n})}return function(){i.remove(e,n)}},e.prototype._toListeners=function(e){var t=e.channel,r=e.payload,n=this.listeners[t];if(n&&n.forEach((function(n){R.debug("Dispatching to "+t+" with ",r);try{n.callback(e)}catch(i){R.error(i)}})),this.patterns.length>0){if(!r.message)return void R.warn("Cannot perform pattern matching without a message key");var i=r.message;this.patterns.forEach((function(t){var r=i.match(t.pattern);if(r){var n=T(r).slice(1),o=O(O({},e),{patternInfo:n});try{t.callback(o)}catch(a){R.error(a)}}}))}},e}())("__default__"),U={},D=function(){function e(){}return e.setItem=function(e,t){return U[e]=t,U[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(U,e)?U[e]:void 0},e.removeItem=function(e){return delete U[e]},e.clear=function(){return U={}},e}(),j=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=D}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),B=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),F=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},q=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=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]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},K=function(){for(var e=[],t=0;te)&&r}}(r))},Q=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},$=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=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]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]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]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var ye,ge,be,me,we,_e,Se,Ee,Ae,ke,Me,xe,Ce,Ie,Oe,Te,Pe,Re,Ne,Le,Ue,De,je,Be,Fe,qe,ze,Ke,Ve,He,We,Ge,Qe,$e,Ye,Je,Ze,Xe,et,tt,rt,nt,it,ot,at,st,ut,ct,ft,lt,ht,dt,pt,vt,yt,gt,bt;Object.create;!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(me||(me={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(_e||(_e={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ee||(Ee={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ae||(Ae={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ke||(ke={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Me||(Me={})),function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(xe||(xe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ce||(Ce={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Oe||(Oe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Re||(Re={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ne||(Ne={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Le||(Le={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ue||(Ue={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(De||(De={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(je||(je={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Be||(Be={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Fe||(Fe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(qe||(qe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ze||(ze={})),function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(Ke||(Ke={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ve||(Ve={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(He||(He={})),function(e){e.RULES="Rules",e.TOKEN="Token"}(We||(We={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ge||(Ge={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Qe||(Qe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}($e||($e={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ye||(Ye={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Je||(Je={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Ze||(Ze={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(Xe||(Xe={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(et||(et={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(tt||(tt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(rt||(rt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(nt||(nt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(it||(it={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ot||(ot={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(at||(at={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(st||(st={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ut||(ut={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ct||(ct={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ft||(ft={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(lt||(lt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(ht||(ht={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(dt||(dt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(pt||(pt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(vt||(vt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(yt||(yt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(gt||(gt={})),function(e){e.filterSensitiveLog=function(e){return he({},e)}}(bt||(bt={}));var mt=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"===typeof t.statusCode&&"object"===typeof t.headers},e}(),wt=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"===typeof t.query&&"object"===typeof t.headers},e.prototype.clone=function(){var t,r=new e((0,ce.__assign)((0,ce.__assign)({},this),{headers:(0,ce.__assign)({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce((function(e,r){var n,i=t[r];return(0,ce.__assign)((0,ce.__assign)({},e),((n={})[r]=Array.isArray(i)?(0,ce.__spread)(i):i,n))}),{}))),r},e}();var _t=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h,d,p,v,y,g;return pe(this,(function(b){switch(b.label){case 0:return n=[he({},e)],g={},[4,Yt(e.body,t)];case 1:switch(r=he.apply(void 0,n.concat([(g.body=b.sent(),g)])),o="UnknownError",a=r.body.__type.split("#"),o=void 0===a[1]?a[0]:a[1],o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return s=[{}],[4,Et(r,t)];case 3:return i=he.apply(void 0,[he.apply(void 0,s.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 4:return u=[{}],[4,At(r,t)];case 5:return i=he.apply(void 0,[he.apply(void 0,u.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 6:return c=[{}],[4,kt(r,t)];case 7:return i=he.apply(void 0,[he.apply(void 0,c.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 8:return f=[{}],[4,Mt(r,t)];case 9:return i=he.apply(void 0,[he.apply(void 0,f.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 10:return l=[{}],[4,Ct(r,t)];case 11:return i=he.apply(void 0,[he.apply(void 0,l.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 12:return h=[{}],[4,It(r,t)];case 13:return i=he.apply(void 0,[he.apply(void 0,h.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 14:return d=[{}],[4,Ot(r,t)];case 15:return i=he.apply(void 0,[he.apply(void 0,d.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 16:return p=[{}],[4,Tt(r,t)];case 17:return i=he.apply(void 0,[he.apply(void 0,p.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 18:v=r.body,o=v.code||v.Code||o,i=he(he({},v),{name:""+o,message:v.message||v.Message||o,$fault:"client",$metadata:Gt(e)}),b.label=19;case 19:return y=i.message||i.Message||o,i.message=y,delete i.Message,[2,Promise.reject(Object.assign(new Error(y),i))]}}))}))},St=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h,d,p,v,y,g;return pe(this,(function(b){switch(b.label){case 0:return n=[he({},e)],g={},[4,Yt(e.body,t)];case 1:switch(r=he.apply(void 0,n.concat([(g.body=b.sent(),g)])),o="UnknownError",a=r.body.__type.split("#"),o=void 0===a[1]?a[0]:a[1],o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return s=[{}],[4,Et(r,t)];case 3:return i=he.apply(void 0,[he.apply(void 0,s.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 4:return u=[{}],[4,At(r,t)];case 5:return i=he.apply(void 0,[he.apply(void 0,u.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 6:return c=[{}],[4,Mt(r,t)];case 7:return i=he.apply(void 0,[he.apply(void 0,c.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 8:return f=[{}],[4,xt(r,t)];case 9:return i=he.apply(void 0,[he.apply(void 0,f.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 10:return l=[{}],[4,Ct(r,t)];case 11:return i=he.apply(void 0,[he.apply(void 0,l.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 12:return h=[{}],[4,It(r,t)];case 13:return i=he.apply(void 0,[he.apply(void 0,h.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 14:return d=[{}],[4,Ot(r,t)];case 15:return i=he.apply(void 0,[he.apply(void 0,d.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 16:return p=[{}],[4,Tt(r,t)];case 17:return i=he.apply(void 0,[he.apply(void 0,p.concat([b.sent()])),{name:o,$metadata:Gt(e)}]),[3,19];case 18:v=r.body,o=v.code||v.Code||o,i=he(he({},v),{name:""+o,message:v.message||v.Message||o,$fault:"client",$metadata:Gt(e)}),b.label=19;case 19:return y=i.message||i.Message||o,i.message=y,delete i.Message,[2,Promise.reject(Object.assign(new Error(y),i))]}}))}))},Et=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Ut(r,t),[2,he({name:"ExternalServiceException",$fault:"client",$metadata:Gt(e)},n)]}))}))},At=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Bt(r,t),[2,he({name:"InternalErrorException",$fault:"server",$metadata:Gt(e)},n)]}))}))},kt=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Ft(r,t),[2,he({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Gt(e)},n)]}))}))},Mt=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=qt(r,t),[2,he({name:"InvalidParameterException",$fault:"client",$metadata:Gt(e)},n)]}))}))},xt=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=zt(r,t),[2,he({name:"LimitExceededException",$fault:"client",$metadata:Gt(e)},n)]}))}))},Ct=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Kt(r,t),[2,he({name:"NotAuthorizedException",$fault:"client",$metadata:Gt(e)},n)]}))}))},It=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Vt(r,t),[2,he({name:"ResourceConflictException",$fault:"client",$metadata:Gt(e)},n)]}))}))},Ot=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Ht(r,t),[2,he({name:"ResourceNotFoundException",$fault:"client",$metadata:Gt(e)},n)]}))}))},Tt=function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r=e.body,n=Wt(r,t),[2,he({name:"TooManyRequestsException",$fault:"client",$metadata:Gt(e)},n)]}))}))},Pt=function(e,t){return he(he(he({},void 0!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&{Logins:Nt(e.Logins,t)})},Rt=function(e,t){return he(he(he({},void 0!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&{Logins:Nt(e.Logins,t)})},Nt=function(e,t){return Object.entries(e).reduce((function(e,t){var r,n=ve(t,2),i=n[0],o=n[1];return he(he({},e),((r={})[i]=o,r))}),{})},Lt=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},Ut=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Dt=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?Lt(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},jt=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Bt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ft=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},qt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},zt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Kt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Vt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ht=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Wt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Gt=function(e){return{httpStatusCode:e.statusCode,httpHeaders:e.headers,requestId:e.headers["x-amzn-requestid"]}},Qt=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},$t=function(e,t,r,n,i){return de(void 0,void 0,void 0,(function(){var o,a,s,u,c,f;return pe(this,(function(l){switch(l.label){case 0:return[4,e.endpoint()];case 1:return o=l.sent(),a=o.hostname,s=o.protocol,u=void 0===s?"https":s,c=o.port,f={protocol:u,hostname:a,port:c,method:"POST",path:r,headers:t},void 0!==n&&(f.hostname=n),void 0!==i&&(f.body=i),[2,new wt(f)]}}))}))},Yt=function(e,t){return function(e,t){return Qt(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Jt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"]},Zt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"]};function Xt(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(i){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,c;return(0,ce.__generator)(this,(function(f){switch(f.label){case 0:return o=n.logger,a=n.outputFilterSensitiveLog,[4,r(i)];case 1:return s=f.sent().response,"function"===typeof(null===o||void 0===o?void 0:o.debug)&&o.debug({httpResponse:s}),[4,t(s,e)];case 2:return(u=f.sent()).$metadata,c=(0,ce.__rest)(u,["$metadata"]),"function"===typeof(null===o||void 0===o?void 0:o.info)&&o.info({output:a(c)}),[2,{response:s,output:u}]}}))}))}}}(e,r),Jt),n.add(function(e,t){return function(r,n){return function(i){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s;return(0,ce.__generator)(this,(function(u){switch(u.label){case 0:return o=n.logger,a=n.inputFilterSensitiveLog,"function"===typeof(null===o||void 0===o?void 0:o.info)&&o.info({input:a(i.input)}),[4,t(i.input,e)];case 1:return s=u.sent(),"function"===typeof(null===o||void 0===o?void 0:o.debug)&&o.debug({httpRequest:s}),[2,r((0,ce.__assign)((0,ce.__assign)({},i),{request:s}))]}}))}))}}}(e,t),Zt)}}}var er=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach((function(e){r.add(e.middleware,(0,ce.__assign)({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,(0,ce.__assign)({},e))})),r},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,ce.__spread)(i(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,ce.__spread)(i(e)))})),t},o=function(){var r,n=[],o=[],a={};return e.forEach((function(e){var t=(0,ce.__assign)((0,ce.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),n.push(t)})),t.forEach((function(e){var t=(0,ce.__assign)((0,ce.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=n,r.sort((function(e,t){return tr[t.step]-tr[e.step]||rr[t.priority||"normal"]-rr[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,(0,ce.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,n){void 0===n&&(n={});var i=n.name,o=(0,ce.__assign)({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i))throw new Error("Duplicate middleware name '"+i+"'");r.add(i)}e.push(o)},addRelativeTo:function(e,n){var i=n.name,o=(0,ce.__assign)({middleware:e},n);if(i){if(r.has(i))throw new Error("Duplicated middleware name '"+i+"'");r.add(i)}t.push(o)},clone:function(){return n(er())},use:function(e){e.applyToStack(a)},remove:function(n){return"string"===typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(er());return t.use(e),t},applyToStack:n,resolve:function(e,t){var r,n;try{for(var i=(0,ce.__values)(o().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e}};return a},tr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},rr={high:3,normal:2,low:1},nr=function(){function e(e){this.middlewareStack=er(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!==typeof t?t:void 0,i="function"===typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),ir=function(){this.middlewareStack=er()};function or(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var ar=function(e){return Array.isArray(e)?e:[e]},sr=function(e){for(var t in e)e.hasOwnProperty(t)&&void 0!==e[t]["#text"]?e[t]=e[t]["#text"]:"object"===typeof e[t]&&null!==e[t]&&(e[t]=sr(e[t]));return e},ur=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,(0,ce.__spread)([null],arguments)),r=new t;return Object.setPrototypeOf(r,e.prototype),r};ur.prototype=Object.create(String.prototype,{constructor:{value:ur,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(ur,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,ce.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"===typeof e?e:JSON.stringify(e))}}(ur);var cr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function lr(e){var t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds();return cr[n]+", "+(i<10?"0"+i:""+i)+" "+fr[r]+" "+t+" "+(o<10?"0"+o:""+o)+":"+(a<10?"0"+a:""+a)+":"+(s<10?"0"+s:""+s)+" GMT"}var hr="***SensitiveInformation***",dr=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return le(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i=t.logger,o="CognitoIdentityClient",a="GetCredentialsForIdentityCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:Ue.filterSensitiveLog,outputFilterSensitiveLog:je.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},n=JSON.stringify(Pt(e,t)),[2,$t(t,r,"/",void 0,n)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return de(void 0,void 0,void 0,(function(){var r,n,i;return pe(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,_t(e,t)]:[4,Yt(e.body,t)];case 1:return r=o.sent(),n=Dt(r,t),i=he({$metadata:Gt(e)},n),[2,Promise.resolve(i)]}}))}))}(e,t)},t}(ir),pr=function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n}return(0,ce.__extends)(t,e),t}(Error);function vr(e){return Promise.all(Object.keys(e).reduce((function(t,r){var n=e[r];return"string"===typeof n?t.push([r,n]):t.push(n().then((function(e){return[r,e]}))),t}),[])).then((function(e){return e.reduce((function(e,t){var r=(0,ce.__read)(t,2),n=r[0],i=r[1];return e[n]=i,e}),{})}))}function yr(e){var t=this;return function(){return(0,ce.__awaiter)(t,void 0,void 0,(function(){var t,r,n,i,o,a,s,u,c,f,l,h,d;return(0,ce.__generator)(this,(function(p){switch(p.label){case 0:return f=(c=e.client).send,l=dr.bind,d={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,vr(e.logins)]:[3,2];case 1:return h=p.sent(),[3,3];case 2:h=void 0,p.label=3;case 3:return[4,f.apply(c,[new(l.apply(dr,[void 0,(d.Logins=h,d)]))])];case 4:return t=p.sent().Credentials,r=void 0===t?function(){throw new pr("Response from Amazon Cognito contained no credentials")}():t,n=r.AccessKeyId,i=void 0===n?function(){throw new pr("Response from Amazon Cognito contained no access key ID")}():n,o=r.Expiration,a=r.SecretKey,s=void 0===a?function(){throw new pr("Response from Amazon Cognito contained no secret key")}():a,u=r.SessionToken,[2,{identityId:e.identityId,accessKeyId:i,secretAccessKey:s,sessionToken:u,expiration:o}]}}))}))}}var gr=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return le(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i=t.logger,o="CognitoIdentityClient",a="GetIdCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:Fe.filterSensitiveLog,outputFilterSensitiveLog:qe.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return de(void 0,void 0,void 0,(function(){var r,n;return pe(this,(function(i){return r={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},n=JSON.stringify(Rt(e,t)),[2,$t(t,r,"/",void 0,n)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return de(void 0,void 0,void 0,(function(){var r,n,i;return pe(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,St(e,t)]:[4,Yt(e.body,t)];case 1:return r=o.sent(),n=jt(r,t),i=he({$metadata:Gt(e)},n),[2,Promise.resolve(i)]}}))}))}(e,t)},t}(ir),br="IdentityIds",mr=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",(function(t){var r=t.get(e);return new Promise((function(e){r.onerror=function(){return e(null)},r.onsuccess=function(){return e(r.result?r.result.value:null)}}))})).catch((function(){return null}))},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",(function(t){var r=t.delete(e);return new Promise((function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}}))}))},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",(function(r){var n=r.put({id:e,value:t});return new Promise((function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}}))}))},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise((function(t,r){e.onsuccess=function(){t(e.result)},e.onerror=function(){r(e.error)},e.onblocked=function(){r(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){r(new Error("Failed to create object store"))},t.createObjectStore(br,{keyPath:"id"})}}))},e.prototype.withObjectStore=function(e,t){return this.getDb().then((function(r){var n=r.transaction(br,e);return n.oncomplete=function(){return r.close()},new Promise((function(e,r){n.onerror=function(){return r(n.error)},e(t(n.objectStore(br)))})).catch((function(e){throw r.close(),e}))}))},e}(),wr=function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}(),_r=new wr;function Sr(e){var t=this,r=e.accountId,n=e.cache,i=void 0===n?"object"===typeof self&&self.indexedDB?new mr:"object"===typeof window&&window.localStorage?window.localStorage:_r:n,o=e.client,a=e.customRoleArn,s=e.identityPoolId,u=e.logins,c=e.userIdentifier,f=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,l=f?"aws:cognito-identity-credentials:"+s+":"+f:void 0,h=function(){return(0,ce.__awaiter)(t,void 0,void 0,(function(){var e,t,n,c,f,d,p,v,y;return(0,ce.__generator)(this,(function(g){switch(g.label){case 0:return(t=l)?[4,i.getItem(l)]:[3,2];case 1:t=g.sent(),g.label=2;case 2:return(e=t)?[3,7]:(d=(f=o).send,p=gr.bind,y={AccountId:r,IdentityPoolId:s},u?[4,vr(u)]:[3,4]);case 3:return v=g.sent(),[3,5];case 4:v=void 0,g.label=5;case 5:return[4,d.apply(f,[new(p.apply(gr,[void 0,(y.Logins=v,y)]))])];case 6:n=g.sent().IdentityId,c=void 0===n?function(){throw new pr("Response from Amazon Cognito contained no identity ID")}():n,e=c,l&&Promise.resolve(i.setItem(l,e)).catch((function(){})),g.label=7;case 7:return[2,(h=yr({client:o,customRoleArn:a,logins:u,identityId:e}))()]}}))}))};return function(){return h().catch((function(e){return(0,ce.__awaiter)(t,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(t){throw l&&Promise.resolve(i.removeItem(l)).catch((function(){})),e}))}))}))}}var Er=JSON.parse('{"u2":"@aws-sdk/client-cognito-identity","i8":"1.0.0-rc.4"}'),Ar=r(77643),kr=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Mr)},Mr=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function xr(e){var t,r,n=[];try{for(var i=(0,ce.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=kr(a),Array.isArray(s))for(var u=0,c=s.length;u>=6;var c=i/4*3;o>>=a%8;for(var f=Math.floor(a/8),l=0;l>h)}}return new Uint8Array(r)}function Dr(e){for(var t="",r=0;r>c]}t+="==".slice(0,4-s)}return t}var jr=function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var t,r;return(0,ce.__generator)(this,(function(n){switch(n.label){case 0:return[4,Br(e)];case 1:return t=n.sent(),r=Ur(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var t,r,n,i,o,a,s;return(0,ce.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(a=i.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)};function Br(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}var Fr=function(e){return function(){throw new Error(e)}},qr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high"},zr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(n){return[2,e.retryStrategy.retry(t,r)]}))}))}}}(e),qr)}}},Kr=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Vr=["Throttling","ThrottlingException","ThrottledException","RequestThrottledException","TooManyRequestsException","ProvisionedThroughputExceededException","TransactionInProgressException","RequestLimitExceeded","BandwidthLimitExceeded","LimitExceededException","RequestThrottled","SlowDown","PriorRequestNotComplete","EC2ThrottledException"],Hr=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Wr=[500,502,503,504],Gr=function(e){var t;return Vr.includes(e.name)||1==(null===(t=e.$retryable)||void 0===t?void 0:t.throttling)},Qr=r(84776),$r=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Yr=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Kr.includes(e.name)}(e)||Gr(e)||function(e){var t;return Hr.includes(e.name)||Wr.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Jr=function(){function e(e,t){var r,n,i;this.maxAttemptsProvider=e,this.retryDecider=null!==(r=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==r?r:Yr,this.delayDecider=null!==(n=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==n?n:$r,this.retryQuota=null!==(i=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==i?i:function(e){var t=e,r=e,n=function(e){return"TimeoutError"===e.name?10:5},i=function(e){return n(e)<=r};return Object.freeze({hasRetryTokens:i,retrieveRetryTokens:function(e){if(!i(e))throw new Error("No retry token available");var t=n(e);return r-=t,t},releaseRetryTokens:function(e){r+=null!==e&&void 0!==e?e:1,r=Math.min(r,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,r){return t=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"===typeof e.byteLength?e.byteLength:"number"===typeof e.size?e.size:void 0}function nn(e,t){return"aws-sdk-js-v3-"+e+"/"+t+" "+("undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:"")}var on=r(98143),an="cognito-identity.{region}.amazonaws.com",sn=new Set(["ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),un=new Set(["cn-north-1","cn-northwest-1"]),cn=new Set(["us-iso-east-1"]),fn=new Set(["us-isob-east-1"]),ln=new Set(["us-gov-east-1","us-gov-west-1"]),hn=he(he({},{apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"ap-northeast-1":r={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":r={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":r={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":r={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":r={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":r={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":r={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":r={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":r={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":r={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"us-east-1":r={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":r={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-west-2":r={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:sn.has(e)&&(r={hostname:an.replace("{region}",e),partition:"aws"}),un.has(e)&&(r={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),cn.has(e)&&(r={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),fn.has(e)&&(r={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),ln.has(e)&&(r={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:an.replace("{region}",e),partition:"aws"})}return Promise.resolve(r)},signingName:"cognito-identity"}),{runtime:"browser",base64Decoder:Ur,base64Encoder:Dr,bodyLengthChecker:rn,credentialDefaultProvider:function(){},defaultUserAgent:nn(Er.u2,Er.i8),maxAttempts:3,region:Fr("Region is missing"),requestHandler:new Cr,sha256:Ar.Sha256,streamCollector:jr,urlParser:tn,utf8Decoder:on.fromUtf8,utf8Encoder:on.toUtf8}),dn=function(e){var t;return(0,ce.__assign)((0,ce.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?pn(e):function(){return vn(e)},isCustomEndpoint:!!e.endpoint})},pn=function(e){var t=e.endpoint,r=e.urlParser;if("string"===typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"===typeof t){var i=Promise.resolve(t);return function(){return i}}return t},vn=function(e){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){var t,r,n,i,o;return(0,ce.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=a.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},yn=function(e){if(!e.region)throw new Error("Region is missing");return(0,ce.__assign)((0,ce.__assign)({},e),{region:gn(e.region)})},gn=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},bn="content-length";var mn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware"},wn=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return(0,ce.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s;return(0,ce.__generator)(this,(function(u){return t=n.request,wt.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf(bn)&&void 0!==(a=e(i))&&(t.headers=(0,ce.__assign)((0,ce.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,r((0,ce.__assign)((0,ce.__assign)({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),mn)}}};var _n={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"]},Sn=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return(0,ce.__generator)(this,(function(o){return wt.isInstance(r.request)?(n=r.request,(void 0===(i=(e.requestHandler.metadata||{}).handlerProtocol)?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),_n)}}},En={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize"},An=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return(0,ce.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a;return(0,ce.__generator)(this,(function(s){switch(s.label){case 0:return n=t.logger,[4,e(r)];case 1:return i=s.sent(),n?(o=i.response,"function"===typeof n.info&&n.info({metadata:{statusCode:o.statusCode,requestId:null!==(a=o.headers["x-amzn-requestid"])&&void 0!==a?a:o.headers["x-amzn-request-id"],extendedRequestId:o.headers["x-amz-id-2"],cfId:o.headers["x-amz-cf-id"]}}),[2,i]):[2,i]}}))}))}}),En)}}},kn="X-Amz-Date",Mn="X-Amz-Signature",xn="X-Amz-Security-Token",Cn="authorization",In=kn.toLowerCase(),On=[Cn,In,"date"],Tn=Mn.toLowerCase(),Pn="x-amz-content-sha256",Rn=xn.toLowerCase(),Nn={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Ln=/^proxy-/,Un=/^sec-/,Dn="AWS4-HMAC-SHA256",jn="AWS4-HMAC-SHA256-PAYLOAD",Bn="aws4_request",Fn={},qn=[];function zn(e,t,r){return e+"/"+t+"/"+r+"/"+Bn}for(var Kn={},Vn={},Hn=0;Hn<256;Hn++){var Wn=Hn.toString(16).toLowerCase();1===Wn.length&&(Wn="0"+Wn),Kn[Hn]=Wn,Vn[Wn]=Hn}function Gn(e){for(var t="",r=0;r-1&&delete e.headers[o]}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Xn(e){return function(e){if("number"===typeof e)return new Date(1e3*e);if("string"===typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var ei=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=ni(n),this.credentialProvider=ii(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),(0,ce.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h,d,p,v,y,g,b,m,w,_,S,E,A;return(0,ce.__generator)(this,(function(k){switch(k.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.signableHeaders,u=t.signingRegion,c=t.signingService,[4,this.credentialProvider()];case 1:return f=k.sent(),null===u||void 0===u?[3,2]:(h=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=k.sent(),k.label=4;case 4:return l=h,d=ti(n),p=d.longDate,v=d.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(y=zn(v,l,null!==c&&void 0!==c?c:this.service),g=function(e){var t,r,n="function"===typeof e.clone?e.clone():Yn(e),i=n.headers,o=n.query,a=void 0===o?{}:o;try{for(var s=(0,ce.__values)(Object.keys(i)),u=s.next();!u.done;u=s.next()){var c=u.value;"x-amz-"===c.toLowerCase().substr(0,6)&&(a[c]=i[c],delete i[c])}}catch(f){t={error:f}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return(0,ce.__assign)((0,ce.__assign)({},e),{headers:i,query:a})}(Zn(e)),f.sessionToken&&(g.query[xn]=f.sessionToken),g.query["X-Amz-Algorithm"]=Dn,g.query["X-Amz-Credential"]=f.accessKeyId+"/"+y,g.query["X-Amz-Date"]=p,g.query["X-Amz-Expires"]=o.toString(10),b=Qn(g,a,s),g.query["X-Amz-SignedHeaders"]=ri(b),m=g.query,w=Mn,_=this.getSignature,S=[p,y,this.getSigningKey(f,l,v,c)],E=this.createCanonicalRequest,A=[g,b],[4,$n(e,this.sha256)]);case 5:return[4,_.apply(this,S.concat([E.apply(this,A.concat([k.sent()]))]))];case 6:return m[w]=k.sent(),[2,g]}}))}))},e.prototype.sign=function(e,t){return(0,ce.__awaiter)(this,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(r){return"string"===typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return(0,ce.__awaiter)(this,void 0,void 0,(function(){var e,t,i,c,f,l,h,d,p,v,y;return(0,ce.__generator)(this,(function(g){switch(g.label){case 0:return null===s||void 0===s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,i=ti(o),c=i.shortDate,f=i.longDate,l=zn(c,e,null!==u&&void 0!==u?u:this.service),[4,$n({headers:{},body:n},this.sha256)];case 4:return h=g.sent(),(d=new this.sha256).update(r),v=Gn,[4,d.digest()];case 5:return p=v.apply(void 0,[g.sent()]),y=[jn,f,l,a,p,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return(0,ce.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,c,f,l;return(0,ce.__generator)(this,(function(h){switch(h.label){case 0:return[4,this.credentialProvider()];case 1:return t=h.sent(),null===o||void 0===o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=h.sent(),h.label=4;case 4:return r=n,s=ti(i).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(f.apply(c,[void 0,h.sent()]))).update(e),l=Gn,[4,u.digest()];case 6:return[2,l.apply(void 0,[h.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return(0,ce.__awaiter)(this,void 0,void 0,(function(){var t,r,n,c,f,l,h,d,p,v,y;return(0,ce.__generator)(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===s||void 0===s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=g.sent(),g.label=4;case 4:return r=n,c=Zn(e),f=ti(i),l=f.longDate,h=f.shortDate,d=zn(h,r,null!==u&&void 0!==u?u:this.service),c.headers[In]=l,t.sessionToken&&(c.headers[Rn]=t.sessionToken),[4,$n(c,this.sha256)];case 5:return p=g.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=(0,ce.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next())if(e===o.value.toLowerCase())return!0}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}(Pn,c.headers)&&this.applyChecksum&&(c.headers[Pn]=p),v=Qn(c,a,o),[4,this.getSignature(l,d,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(c,v,p))];case 6:return y=g.sent(),c.headers[Cn]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+d+", SignedHeaders="+ri(v)+", Signature="+y,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===Tn)return"continue";o.push(e);var t=i[e];"string"===typeof t?a[e]=kr(e)+"="+kr(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([kr(e)+"="+kr(r)])}),[]).join("&"))};try{for(var u=(0,ce.__values)(Object.keys(i).sort()),c=u.next();!c.done;c=u.next())s(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var n,i;return(0,ce.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Gn(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return(0,ce.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=Gn,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){var o=r+":"+n+":"+i+":"+t.accessKeyId+":"+t.sessionToken;if(o in Fn)return Fn[o];for(qn.push(o);qn.length>50;)delete Fn[qn.shift()];return Fn[o]=new Promise((function(a,s){var u,c,f=Promise.resolve("AWS4"+t.secretAccessKey),l=function(t){(f=f.then((function(r){return function(e,t,r){var n=new e(t);return n.update(r),n.digest()}(e,r,t)}))).catch((function(){}))};try{for(var h=(0,ce.__values)([r,n,i,Bn]),d=h.next();!d.done;d=h.next())l(d.value)}catch(p){u={error:p}}finally{try{d&&!d.done&&(c=h.return)&&c.call(h)}finally{if(u)throw u.error}}f.then(a,(function(e){delete Fn[o],s(e)}))}))}(this.sha256,e,r,t,n||this.service)},e}(),ti=function(e){var t=Xn(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},ri=function(e){return Object.keys(e).sort().join(";")},ni=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},ii=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function oi(e){var t,r=this,n=ai(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?ai(e.signer):function(){return ai(e.region)().then((function(t){return(0,ce.__awaiter)(r,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var r=(0,ce.__read)(t,2),i=r[0],a=r[1],s=i.signingRegion,c=void 0===s?e.signingRegion:s,f=i.signingService,l=void 0===f?e.signingName:f;return e.signingRegion=e.signingRegion||c||a,e.signingName=e.signingName||l,new ei({credentials:n,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})}))},(0,ce.__assign)((0,ce.__assign)({},e),{systemClockOffset:s,signingEscapePath:o,credentials:n,signer:t})}function ai(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var si=function(e){return new Date(Date.now()+e)};function ui(e){return function(t,r){return function(n){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u,c,f,l,h;return(0,ce.__generator)(this,(function(d){switch(d.label){case 0:return wt.isInstance(n.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=d.sent(),[3,3];case 2:o=e.signer,d.label=3;case 3:return i=o,s=t,u=[(0,ce.__assign)({},n)],h={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,s.apply(void 0,[ce.__assign.apply(void 0,u.concat([(h.request=d.sent(),h)]))])];case 5:return a=d.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),p=l,v=e.systemClockOffset,Math.abs(si(v).getTime()-p)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var p,v}))}))}}}var ci={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware"};var fi={name:"getUserAgentMiddleware",step:"build",tags:["SET_USER_AGENT","USER_AGENT"]},li=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e){return function(t){var n=t.request;if(!wt.isInstance(n))return e(t);var i=n.headers,o="node"===r.runtime?"user-agent":"x-amz-user-agent";return i[o]?i[o]+=" "+r.defaultUserAgent:i[o]=""+r.defaultUserAgent,r.customUserAgent&&(i[o]+=" "+r.customUserAgent),e((0,ce.__assign)((0,ce.__assign)({},t),{request:n}))}}),fi)}}},hi=function(e){function t(t){var r=this,n=he(he({},hn),t),i=yn(n),o=oi(dn(i)),a=Zr(o);return(r=e.call(this,a)||this).config=a,r.middlewareStack.use(zr(r.config)),r.middlewareStack.use(li(r.config)),r.middlewareStack.use(wn(r.config)),r.middlewareStack.use(Sn(r.config)),r.middlewareStack.use(An(r.config)),r}return le(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(nr),di=function(){return di=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1](new Date).getTime()?(yi.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:n,user:r,identity_id:i,expires_at:o})):a._refreshHandlers[t]&&"function"===typeof a._refreshHandlers[t]?(yi.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:a._refreshHandlers[t],provider:t,user:r})):(yi.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,r=e.refreshHandler,n=e.provider,i=e.user;return G(r,[],1e4).then((function(e){return yi.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:n,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(),yi.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return yi.debug("no credentials for expiration check"),!0;yi.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 pi(this,void 0,void 0,(function(){var e,t,r,n,i,o,a,s,u=this;return vi(this,(function(c){switch(c.label){case 0:if(yi.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,r=e.region,e.mandatorySignIn)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!t)return yi.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")];if(!r)return yi.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")];n=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this._storageSync];case 2:return c.sent(),n=this._storage.getItem("CognitoIdentityId-"+t),this._identityId=n,[3,4];case 3:return i=c.sent(),yi.debug("Failed to get the cached identityId",i),[3,4];case 4:return o=new hi({region:r,customUserAgent:ue()}),a=void 0,n?a=yr({identityId:n,client:o})():(s=function(){return pi(u,void 0,void 0,(function(){var e;return vi(this,(function(r){switch(r.label){case 0:return[4,o.send(new gr({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,[2,yr({client:o,identityId:e})()]}}))}))},a=s().catch((function(e){return pi(u,void 0,void 0,(function(){return vi(this,(function(t){throw e}))}))}))),[2,this._loadCredentials(a,"guest",!1,null).then((function(e){return e})).catch((function(e){return pi(u,void 0,void 0,(function(){var r,i=this;return vi(this,(function(s){return"ResourceNotFoundException"===e.name&&e.message==="Identity '"+n+"' not found."?(yi.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+t),r=function(){return pi(i,void 0,void 0,(function(){var e;return vi(this,(function(r){switch(r.label){case 0:return[4,o.send(new gr({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,[2,yr({client:o,identityId:e})()]}}))}))},a=r().catch((function(e){return pi(i,void 0,void 0,(function(){return vi(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null)]):[2,e]}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,r=e.token,n=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]=r;var a=this._config,s=a.identityPoolId,u=a.region;if(!s)return yi.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!u)return yi.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=new hi({region:u,customUserAgent:ue()}),f=void 0;n?f=yr({identityId:n,logins:o,client:c})():f=Sr({logins:o,identityPoolId:s,client:c})();return this._loadCredentials(f,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;yi.debug("set credentials from session");var r=e.getIdToken().getJwtToken(),n=this._config,i=n.region,o=n.userPoolId,a=n.identityPoolId;if(!a)return yi.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!i)return yi.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var s={};s["cognito-idp."+i+".amazonaws.com/"+o]=r;var u=new hi({region:i,customUserAgent:ue()}),c=pi(t,void 0,void 0,(function(){var e;return vi(this,(function(t){switch(t.label){case 0:return[4,u.send(new gr({IdentityPoolId:a,Logins:s}))];case 1:return e=t.sent().IdentityId,this._identityId=e,[2,yr({client:u,logins:s,identityId:e})()]}}))})).catch((function(e){return pi(t,void 0,void 0,(function(){return vi(this,(function(t){throw e}))}))}));return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,r,n){var i=this,o=this,a=this._config.identityPoolId;return new Promise((function(s,u){e.then((function(e){return pi(i,void 0,void 0,(function(){var i,u,c,f,l,h;return vi(this,(function(d){switch(d.label){case 0:if(yi.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=r,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},n.user),u=n.provider,c=n.token,f=n.expires_at,l=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:u,token:c,user:i,expires_at:f,identity_id:l}))}catch(p){yi.debug("Failed to put federated info into auth storage",p)}}if("guest"!==t)return[3,4];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._storageSync];case 2:return d.sent(),this._storage.setItem("CognitoIdentityId-"+a,e.identityId),[3,4];case 3:return h=d.sent(),yi.debug("Failed to cache identityId",h),[3,4];case 4:return s(o._credentials),[2]}}))}))})).catch((function(t){if(t)return yi.debug("Failed to load credentials",e),yi.debug("Error loading credentials",t),void u(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(yi.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return pi(this,void 0,void 0,(function(){return vi(this,(function(e){return this._credentials=null,this._credentials_source=null,yi.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),bi=new gi(null);l.register(bi);var mi=new u("Parser"),wi=function(e){var t,r={};if(e.aws_mobile_analytics_app_id){var n={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};r.Analytics=n}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(r.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in}),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:{},r.Analytics=Object.assign({},r.Analytics,e.Analytics),r.Auth=Object.assign({},r.Auth,e.Auth),r.Storage=Object.assign({},t),mi.debug("parse config",e,"to amplifyconfig",r),r},_i=function(){function e(){}return e.parseMobilehubConfig=wi,e}(),Si=r(38087);function Ei(e,t){void 0===t&&(t={});var r=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return"undefined"===typeof t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(r,t.doNotParse))try{return JSON.parse(r)}catch(n){}return e}var Ai=function(){return Ai=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0&&this.changeListeners.splice(t,1)},e}(),Mi=ki,xi=S().isBrowser,Ci=function(){function e(e){void 0===e&&(e={}),this.cookies=new Mi,this.store=xi?window.localStorage:Object.create(null),this.cookies=e.req?new Mi(e.req.headers.cookie):new Mi,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,r){return e.key(r)})).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"idToken":this.setUniversalItem(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}();var Ii,Oi=r(940),Ti=r(11987),Pi=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},Ri=r(52153),Ni=r.n(Ri),Li=r(98269),Ui=r.n(Li),Di=function(){return Di=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},qi="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",zi=function(e,t,r){L.dispatch("auth",{event:e,data:t,message:r},"Auth",qi)},Ki=new u("OAuth"),Vi=function(){function e(e){var t=e.config,r=e.cognitoClientId,n=e.scopes,i=void 0===n?[]:n;if(this._urlOpener=t.urlOpener||Pi,this._config=t,this._cognitoClientId=r,!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,r,i,o,a){void 0===e&&(e="code"),void 0===o&&(o=n.Cognito);var s=this._generateState(32),u=a?s+"-"+a.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join(""):s;!function(e){window.sessionStorage.setItem("oauth_state",e)}(u);var c,f=this._generateRandom(128);c=f,window.sessionStorage.setItem("ouath_pkce_key",c);var l=this._generateChallenge(f),h=this._scopes.join(" "),d="https://"+t+"/oauth2/authorize?"+Object.entries(Di(Di({redirect_uri:r,response_type:e,client_id:i,identity_provider:o,scope:h,state:u},"code"===e?{code_challenge:l}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map((function(e){var t=Fi(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)})).join("&");Ki.debug("Redirecting to "+d),this._urlOpener(d,r)},e.prototype._handleCodeFlow=function(e){return ji(this,void 0,void 0,(function(){var t,r,n,i,o,a,s,u,c,f,l,h;return Bi(this,(function(d){switch(d.label){case 0:return t=((0,Ti.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r,n=Fi(t,2),i=n[0],o=n[1];return Di(Di({},e),((r={})[i]=o,r))}),{code:void 0}).code,t&&(0,Ti.parse)(e).pathname===(0,Ti.parse)(this._config.redirectSignIn).pathname?(r="https://"+this._config.domain+"/oauth2/token",zi("codeFlow",{},"Retrieving tokens from "+r),n=I(this._config)?this._cognitoClientId:this._config.clientID,i=I(this._config)?this._config.redirectSignIn:this._config.redirectUri,o=function(){var e=window.sessionStorage.getItem("ouath_pkce_key");return window.sessionStorage.removeItem("ouath_pkce_key"),e}(),a=Di({grant_type:"authorization_code",code:t,client_id:n,redirect_uri:i},o?{code_verifier:o}:{}),Ki.debug("Calling token endpoint: "+r+" with",a),s=Object.entries(a).map((function(e){var t=Fi(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)})).join("&"),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:s})]):[2];case 1:return[4,d.sent().json()];case 2:if(u=d.sent(),c=u.access_token,f=u.refresh_token,l=u.id_token,h=u.error)throw new Error(h);return[2,{accessToken:c,refreshToken:f,idToken:l}]}}))}))},e.prototype._handleImplicitFlow=function(e){return ji(this,void 0,void 0,(function(){var t,r,n;return Bi(this,(function(i){return t=((0,Ti.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r,n=Fi(t,2),i=n[0],o=n[1];return Di(Di({},e),((r={})[i]=o,r))}),{id_token:void 0,access_token:void 0}),r=t.id_token,n=t.access_token,zi("implicitFlow",{},"Got tokens from "+e),Ki.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:n,idToken:r,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return ji(this,void 0,void 0,(function(){var t,r,n,i,o,a,s;return Bi(this,(function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?Di(Di({},((0,Ti.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r=Fi(t,2),n=r[0],i=r[1];return e[n]=i,e}),{})),((0,Ti.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r=Fi(t,2),n=r[0],i=r[1];return e[n]=i,e}),{})):{},r=t.error,n=t.error_description,r)throw new Error(n);return i=this._validateState(t),Ki.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,Di.apply(void 0,[Di.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return a=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,Di.apply(void 0,[Di.apply(void 0,a.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw s=u.sent(),Ki.error("Error handling auth response.",s),s;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}(),r=e.state;if(t&&t!==r)throw new Error("Invalid state in OAuth flow");return r}},e.prototype.signOut=function(){return ji(this,void 0,void 0,(function(){var e,t,r;return Bi(this,(function(n){return e="https://"+this._config.domain+"/logout?",t=I(this._config)?this._cognitoClientId:this._config.oauth.clientID,r=I(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(r)}).map((function(e){var t=Fi(e,2);return t[0]+"="+t[1]})).join("&"),zi("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),Ki.debug("Signing out from "+e),[2,this._urlOpener(e)]}))}))},e.prototype._generateState=function(e){for(var t="",r=e,n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";r>0;--r)t+=n[Math.round(Math.random()*(n.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(Ni()(e))},e.prototype._base64URL=function(e){return e.toString(Ui()).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 r=0;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},to=new u("AuthClass"),ro="aws.cognito.signin.user.admin",no="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",io=function(e,t,r){L.dispatch("auth",{event:e,data:t,message:r},"Auth",no)},oo=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.Credentials=bi,this.wrapRefreshSessionCallback=function(e){return function(t,r){return r?io("tokenRefresh",void 0,"New token retrieved"):io("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,r)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),L.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||{};to.debug("configure Auth");var r=Object.assign({},this._config,_i.parseMobilehubConfig(e).Auth,e);this._config=r;var n=this._config,i=n.userPoolId,o=n.userPoolWebClientId,a=n.cookieStorage,s=n.oauth,u=n.region,c=n.identityPoolId,f=n.mandatorySignIn,l=n.refreshHandlers,h=n.identityPoolRegion,d=n.clientMetadata,p=n.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw to.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=a?new Oi.eR(a):e.ssr?new Ci:(new j).getStorage();if(this._storageSync=Promise.resolve(),"function"===typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var v={UserPoolId:i,ClientId:o,endpoint:p};v.Storage=this._storage,this.userPool=new Oi.AM(v,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:f,region:h||u,userPoolId:i,identityPoolId:c,refreshHandlers:l,storage:this._storage});var y=s?I(this._config.oauth)?s:s.awsCognito:void 0;if(y){var g=Object.assign({cognitoClientId:o,UserPoolId:i,domain:y.domain,scopes:y.scope,redirectSignIn:y.redirectSignIn,redirectSignOut:y.redirectSignOut,responseType:y.responseType,Storage:this._storage,urlOpener:y.urlOpener,clientMetadata:d},y.options);this._oAuthHandler=new Hi({scopes:g.scopes,config:g,cognitoClientId:g.cognitoClientId});var b={};!function(e){if(M.browserOrNode().isBrowser&&window.location)e({url:window.location.href});else if(!M.browserOrNode().isNode)throw new Error("Not supported")}((function(e){var r=e.url;b[r]||(b[r]=!0,t._handleAuthResponse(r))}))}return io("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,r=[],n=1;n=0;r-=1){var n=e.charCodeAt(r);n>127&&n<=2047?t+=1:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&(r-=1)}return t}function co(){return(new Date).getTime()}function fo(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var lo={},ho=(function(){function e(){}e.clear=function(){lo={}},e.getItem=function(e){return lo[e]||null},e.setItem=function(e,t){lo[e]=t},e.removeItem=function(e){delete lo[e]}}(),new u("StorageCache")),po=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(){fo(this.config.capacityInBytes)||(ho.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=so.capacityInBytes),fo(this.config.itemMaxSize)||(ho.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=so.itemMaxSize),fo(this.config.defaultTTL)||(ho.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=so.defaultTTL),fo(this.config.defaultPriority)||(ho.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=so.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(ho.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=so.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(ho.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=so.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(ho.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=so.warningThreshold);this.config.capacityInBytes>5242880&&(ho.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=so.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,r){var n={key:e,data:t,timestamp:co(),visitedTime:co(),priority:r.priority,expires:r.expires,type:typeof t,byteSize:0};return n.byteSize=uo(JSON.stringify(n)),n.byteSize=uo(JSON.stringify(n)),n},e.prototype.configure=function(e){return e?(e.keyPrefix&&ho.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),vo=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yo=new u("Cache"),go=function(e){function t(t){var r=this,n=t?Object.assign({},so,t):so;return(r=e.call(this,n)||this).config.storage=n.storage,r.getItem=r.getItem.bind(r),r.setItem=r.setItem.bind(r),r.removeItem=r.removeItem.bind(r),r}return vo(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=co(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),r=JSON.parse(t);return co()>=r.expires},t.prototype._removeItem=function(e,t){var r=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(r),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(r){this._decreaseCurSizeInBytes(t.byteSize),yo.error("Failed to set item "+r)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,r=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>r?t:r},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],r=0;rt.priority?-1:e.priority5)yo.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(n,t,i);if(o.byteSize>this.config.itemMaxSize)yo.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var a=this.config.storage.getItem(n);if(a&&this._removeItem(n,JSON.parse(a).byteSize),this._isCacheFull(o.byteSize)){var s=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var u=this._sizeToPop(o.byteSize);this._popOutItems(s,u)}}this._setItem(n,o)}catch(c){yo.warn("setItem failed! "+c)}}}else yo.warn("The value of item should not be undefined!");else yo.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){yo.log("Get item: key is "+e+" with options "+t);var r=null,n=this.config.keyPrefix+e;if(n===this.config.keyPrefix||n===this.cacheCurSizeKey)return yo.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(r=this.config.storage.getItem(n))){if(!this._isExpired(n)){var i=JSON.parse(r);return(i=this._refreshItem(i,n)).data}this._removeItem(n,JSON.parse(r).byteSize),r=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(a){return yo.warn("getItem failed! "+a),null}},t.prototype.removeItem=function(e){yo.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var r=this.config.storage.getItem(t);r&&this._removeItem(t,JSON.parse(r).byteSize)}catch(n){yo.warn("removeItem failed! "+n)}},t.prototype.clear=function(){yo.log("Clear Cache");for(var e=[],t=0;t0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var ff=function(){function e(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}return e.prototype.withName=function(e){return this.name=e,this},e.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},e.prototype.addChildNode=function(e){return this.children.push(e),this},e.prototype.removeAttribute=function(e){return delete this.attributes[e],this},e.prototype.toString=function(){var e,t,r=Boolean(this.children.length),n="<"+this.name,i=this.attributes;try{for(var o=cf(Object.keys(i)),a=o.next();!a.done;a=o.next()){var s=a.value,u=i[s];"undefined"!==typeof u&&null!==u&&(n+=" "+s+'="'+((""+u).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")+'"'))}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n+(r?">"+this.children.map((function(e){return e.toString()})).join("")+"":"/>")},e}();var lf=function(){function e(e){this.value=e}return e.prototype.toString=function(){return(""+this.value).replace(/&/g,"&").replace(//g,">")},e}(),hf=r(36965),df=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c;return Ao(this,(function(f){switch(f.label){case 0:return n=[So({},e)],c={},[4,Lf(e.body,t)];case 1:switch(r=So.apply(void 0,n.concat([(c.body=f.sent(),c)])),o="UnknownError",o=Uf(e,r.body),o){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":return[3,2]}return[3,4];case 2:return a=[{}],[4,Af(r,t)];case 3:return i=So.apply(void 0,[So.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Pf(e)}]),[3,5];case 4:s=r.body,o=s.code||s.Code||o,i=So(So({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Pf(e)}),f.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},pf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},vf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},yf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},gf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c;return Ao(this,(function(f){switch(f.label){case 0:return n=[So({},e)],c={},[4,Lf(e.body,t)];case 1:switch(r=So.apply(void 0,n.concat([(c.body=f.sent(),c)])),o="UnknownError",o=Uf(e,r.body),o){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":return[3,2]}return[3,4];case 2:return a=[{}],[4,Ef(r,t)];case 3:return i=So.apply(void 0,[So.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Pf(e)}]),[3,5];case 4:s=r.body,o=s.code||s.Code||o,i=So(So({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Pf(e)}),f.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},bf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c;return Ao(this,(function(f){switch(f.label){case 0:return n=[So({},e)],c={},[4,Lf(e.body,t)];case 1:switch(r=So.apply(void 0,n.concat([(c.body=f.sent(),c)])),o="UnknownError",o=Uf(e,r.body),o){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":return[3,2]}return[3,4];case 2:return a=[{}],[4,Sf(r,t)];case 3:return i=So.apply(void 0,[So.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Pf(e)}]),[3,5];case 4:s=r.body,o=s.code||s.Code||o,i=So(So({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Pf(e)}),f.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},mf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},wf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},_f=function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Ao(this,(function(c){switch(c.label){case 0:return n=[So({},e)],u={},[4,Lf(e.body,t)];case 1:return r=So.apply(void 0,n.concat([(u.body=c.sent(),u)])),o="UnknownError",o=Uf(e,r.body),a=r.body,o=a.code||a.Code||o,i=So(So({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Pf(e)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},Sf=function(e,t){return Eo(void 0,void 0,void 0,(function(){var t;return Ao(this,(function(r){return t={name:"NoSuchBucket",$fault:"client",$metadata:Pf(e)},e.body,[2,t]}))}))},Ef=function(e,t){return Eo(void 0,void 0,void 0,(function(){var t;return Ao(this,(function(r){return t={name:"NoSuchKey",$fault:"client",$metadata:Pf(e)},e.body,[2,t]}))}))},Af=function(e,t){return Eo(void 0,void 0,void 0,(function(){var t;return Ao(this,(function(r){return t={name:"NoSuchUpload",$fault:"client",$metadata:Pf(e)},e.body,[2,t]}))}))},kf=function(e,t){var r=new ff("CompletedMultipartUpload");void 0!==e.Parts&&Mf(e.Parts,t).map((function(e){e=e.withName("Part"),r.addChildNode(e)}));return r},Mf=function(e,t){return e.map((function(e){var t=function(e,t){var r=new ff("CompletedPart");if(void 0!==e.ETag){var n=new ff("ETag").addChildNode(new lf(e.ETag)).withName("ETag");r.addChildNode(n)}void 0!==e.PartNumber&&(n=new ff("PartNumber").addChildNode(new lf(String(e.PartNumber))).withName("PartNumber"),r.addChildNode(n));return r}(e);return t.withName("member")}))},xf=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={Prefix:void 0};return void 0!==e.Prefix&&(r.Prefix=e.Prefix),r}(e)}))},Cf=function(e,t){var r={ID:void 0,DisplayName:void 0};return void 0!==e.ID&&(r.ID=e.ID),void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),r},If=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={Size:void 0,ETag:void 0,Owner:void 0,StorageClass:void 0,Key:void 0,LastModified:void 0};return void 0!==e.Size&&(r.Size=parseInt(e.Size)),void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Owner&&(r.Owner=Of(e.Owner,t)),void 0!==e.StorageClass&&(r.StorageClass=e.StorageClass),void 0!==e.Key&&(r.Key=e.Key),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),r}(e,t)}))},Of=function(e,t){var r={DisplayName:void 0,ID:void 0};return void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),void 0!==e.ID&&(r.ID=e.ID),r},Tf=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={Size:void 0,LastModified:void 0,PartNumber:void 0,ETag:void 0};return void 0!==e.Size&&(r.Size=parseInt(e.Size)),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.PartNumber&&(r.PartNumber=parseInt(e.PartNumber)),void 0!==e.ETag&&(r.ETag=e.ETag),r}(e)}))},Pf=function(e){return{httpStatusCode:e.statusCode,httpHeaders:e.headers,requestId:e.headers["x-amzn-requestid"]}},Rf=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Nf=function(e){return void 0!==e&&""!==e&&(!Object.getOwnPropertyNames(e).includes("length")||0!=e.length)&&(!Object.getOwnPropertyNames(e).includes("size")||0!=e.size)},Lf=function(e,t){return function(e,t){return Rf(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){if(e.length){var t=(0,hf.parse)(e,{attributeNamePrefix:"",ignoreAttributes:!1,parseNodeValue:!1,tagValueProcessor:function(e,t){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<")}}),r=Object.keys(t)[0],n=t[r];return n["#text"]&&(n[r]=n["#text"],delete n["#text"]),sr(n)}return{}}))},Uf=function(e,t){return void 0!==t.Code?t.Code:404==e.statusCode?"NotFound":""};var Df=function(){return Df=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var qf=function(e){return"string"===typeof e&&0===e.indexOf("arn:")&&e.split(":").length>=6},zf=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Kf=/(\d+\.){3}\d+/,Vf=/\.\./,Hf=/\./,Wf=/^(.+\.)?s3[.-]([a-z0-9-]+)\./,Gf=/^s3(-external-1)?\.amazonaws\.com$/,Qf="amazonaws.com",$f=function(e){return Jf(e)?e.replace(/fips-|-fips/,""):e},Yf=function(e){var t=e.match(Wf);return[t[2],e.replace(new RegExp("^"+t[0]),"")]},Jf=function(e){return e.startsWith("fips-")||e.endsWith("-fips")},Zf=function(e,t){return e===t||$f(e)===t||e===$f(t)},Xf=function(e,t){if(void 0===t&&(t={tlsCompatible:!0}),e.length>=64||!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||(null===t||void 0===t?void 0:t.tlsCompatible)&&Hf.test(e))throw new Error("Invalid DNS label "+e)},el=function(e){var t=e.baseHostname;return Wf.test(t)?function(e){return"string"===typeof e.bucketName}(e)?rl(e):tl(e):{bucketEndpoint:!1,hostname:t}},tl=function(e){var t,r=Ff((t=e.baseHostname,Gf.test(t)?[t.replace(".amazonaws.com",""),Qf]:Yf(t)),2),n=r[0],i=r[1],o=e.pathStyleEndpoint,a=e.dualstackEndpoint,s=void 0!==a&&a,u=e.accelerateEndpoint,c=void 0!==u&&u,f=e.tlsCompatible,l=void 0===f||f,h=e.useArnRegion,d=e.bucketName,p=e.clientPartition,v=void 0===p?"aws":p,y=e.clientSigningRegion,g=void 0===y?n:y;!function(e){if(e.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!e.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")}({pathStyleEndpoint:o,accelerateEndpoint:c,tlsCompatible:l});var b=d.service,m=d.partition,w=d.accountId,_=d.region,S=d.resource;!function(e){if("s3"!==e&&"s3-outposts"!==e)throw new Error("Expect 's3' or 's3-outposts' in ARN service component")}(b),function(e,t){if(e!==t.clientPartition)throw new Error('Partition in ARN is incompatible, got "'+e+'" but expected "'+t.clientPartition+'"')}(m,{clientPartition:v}),function(e){if(!/[0-9]{12}/.exec(e))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")}(w),function(e,t){if(""===e)throw new Error("ARN region is empty");if(!t.useArnRegion&&!Zf(e,t.clientRegion)&&!Zf(e,t.clientSigningRegion))throw new Error("Region in ARN is incompatible, got "+e+" but expected "+t.clientRegion);if(t.useArnRegion&&Jf(e))throw new Error("Endpoint does not support FIPS region")}(_,{useArnRegion:h,clientRegion:n,clientSigningRegion:g});var E=function(e){var t=e.includes(":")?":":"/",r=Ff(e.split(t)),n=r[0],i=r.slice(1);if("accesspoint"===n){if(1!==i.length||""===i[0])throw new Error("Access Point ARN should have one resource accesspoint"+t+"{accesspointname}");return{accesspointName:i[0]}}if("outpost"===n){if(!i[0]||"accesspoint"!==i[1]||!i[2]||3!==i.length)throw new Error("Outpost ARN should have resource outpost"+t+"{outpostId}"+t+"accesspoint"+t+"{accesspointName}");var o=Ff(i,3),a=o[0];return o[1],{outpostId:a,accesspointName:o[2]}}throw new Error("ARN resource should begin with 'accesspoint"+t+"' or 'outpost"+t+"'")}(S),A=E.accesspointName,k=E.outpostId;Xf(A+"-"+w,{tlsCompatible:l});var M=h?_:n,x=h?_:g;return k?(function(e){if("s3-outposts"!==e)throw new Error("Expect 's3-posts' in Outpost ARN service component")}(b),Xf(k,{tlsCompatible:l}),function(e){if(e)throw new Error("Dualstack endpoint is not supported with Outpost")}(s),function(e){if(Jf(null!==e&&void 0!==e?e:""))throw new Error("FIPS region is not supported with Outpost, got "+e)}(M),{bucketEndpoint:!0,hostname:A+"-"+w+"."+k+".s3-outposts."+M+"."+i,signingRegion:x,signingService:"s3-outposts"}):(function(e){if("s3"!==e)throw new Error("Expect 's3' in Accesspoint ARN service component")}(b),{bucketEndpoint:!0,hostname:A+"-"+w+".s3-accesspoint"+(s?".dualstack":"")+"."+M+"."+i,signingRegion:x})},rl=function(e){var t,r=e.accelerateEndpoint,n=void 0!==r&&r,i=e.baseHostname,o=e.bucketName,a=e.dualstackEndpoint,s=void 0!==a&&a,u=e.pathStyleEndpoint,c=void 0!==u&&u,f=e.tlsCompatible,l=void 0===f||f,h=Ff((t=i,Gf.test(t)?["us-east-1",Qf]:Yf(t)),2),d=h[0],p=h[1];return c||!function(e){return zf.test(e)&&!Kf.test(e)&&!Vf.test(e)}(o)||l&&Hf.test(o)?{bucketEndpoint:!1,hostname:s?"s3.dualstack."+d+"."+p:i}:(n?i="s3-accelerate"+(s?".dualstack":"")+"."+p:s&&(i="s3.dualstack."+d+"."+p),{bucketEndpoint:!0,hostname:o+"."+i})},nl=function(e){return function(t,r){return function(n){return jf(void 0,void 0,void 0,(function(){var i,o,a,s,u,c,f,l,h,d,p,v,y,g,b,m,w;return Bf(this,(function(_){switch(_.label){case 0:return i=n.input.Bucket,o=e.bucketEndpoint,a=n.request,wt.isInstance(a)?e.bucketEndpoint?(a.hostname=i,[3,6]):[3,1]:[3,7];case 1:return qf(i)?(s=function(e){var t=e.split(":");if(t.length<6||"arn"!==t[0])throw new Error("Malformed ARN");var r=(0,ce.__read)(t);return{partition:r[1],service:r[2],region:r[3],accountId:r[4],resource:r.slice(5).join(":")}}(i),c=$f,[4,e.region()]):[3,5];case 2:return u=c.apply(void 0,[_.sent()]),[4,e.regionInfoProvider(u)];case 3:return f=_.sent()||{},l=f.partition,h=f.signingRegion,d=void 0===h?u:h,[4,e.useArnRegion()];case 4:return p=_.sent(),v=el({bucketName:s,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol,useArnRegion:p,clientPartition:l,clientSigningRegion:d}),m=v.hostname,w=v.bucketEndpoint,y=v.signingRegion,g=v.signingService,y&&y!==d&&(r.signing_region=y),g&&"s3"!==g&&(r.signing_service=g),a.hostname=m,o=w,[3,6];case 5:b=el({bucketName:i,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol}),m=b.hostname,w=b.bucketEndpoint,a.hostname=m,o=w,_.label=6;case 6:o&&(a.path=a.path.replace(/^(\/)?[^\/]+/,""),""===a.path&&(a.path="/")),_.label=7;case 7:return[2,t(Df(Df({},n),{request:a}))]}}))}))}}},il={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware"},ol=function(e){return{applyToStack:function(t){t.addRelativeTo(nl(e),il)}}};var al=function(){return al=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var fl={name:"ssecMiddleware",step:"initialize",tags:["SSE"]},ll=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return sl(t,void 0,void 0,(function(){var t,i,o,a,s,u,c,f,l,h,d,p,v,y,g,b,m;return ul(this,(function(w){switch(w.label){case 0:t=al({},n.input),i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}],w.label=1;case 1:w.trys.push([1,6,7,8]),o=cl(i),a=o.next(),w.label=2;case 2:return a.done?[3,5]:(s=a.value,(u=t[s.target])?(c=ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):"string"===typeof u?e.utf8Decoder(u):new Uint8Array(u),f=e.base64Encoder(c),(l=new e.md5).update(c),h=[al({},t)],(m={})[s.target]=f,d=s.hash,v=(p=e).base64Encoder,[4,l.digest()]):[3,4]);case 3:t=al.apply(void 0,h.concat([(m[d]=v.apply(p,[w.sent()]),m)])),w.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return y=w.sent(),g={error:y},[3,8];case 7:try{a&&!a.done&&(b=o.return)&&b.call(o)}finally{if(g)throw g.error}return[7];case 8:return[2,r(al(al({},n),{input:t}))]}}))}))}}}(e),fl)}}},hl=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ll(t)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="GetObjectCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:fu.filterSensitiveLog,outputFilterSensitiveLog:cu.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So(So(So(So(So(So(So(So(So({"Content-Type":""},Nf(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Nf(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Nf(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.IfUnmodifiedSince)&&{"If-Unmodified-Since":lr(e.IfUnmodifiedSince).toString()}),Nf(e.IfModifiedSince)&&{"If-Modified-Since":lr(e.IfModifiedSince).toString()}),Nf(e.IfNoneMatch)&&{"If-None-Match":e.IfNoneMatch}),Nf(e.IfMatch)&&{"If-Match":e.IfMatch}),Nf(e.Range)&&{Range:e.Range}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o=So(So(So(So(So(So(So(So({"x-id":"GetObject"},void 0!==e.ResponseContentEncoding&&{"response-content-encoding":e.ResponseContentEncoding}),void 0!==e.ResponseCacheControl&&{"response-cache-control":e.ResponseCacheControl}),void 0!==e.ResponseContentLanguage&&{"response-content-language":e.ResponseContentLanguage}),void 0!==e.ResponseContentDisposition&&{"response-content-disposition":e.ResponseContentDisposition}),void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.VersionId&&{versionId:e.VersionId}),void 0!==e.ResponseExpires&&{"response-expires":(e.ResponseExpires.toISOString().split(".")[0]+"Z").toString()}),void 0!==e.ResponseContentType&&{"response-content-type":e.ResponseContentType}),[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n;return Ao(this,(function(i){return 200!==e.statusCode&&e.statusCode>=300?[2,gf(e,t)]:(r={$metadata:Pf(e),AcceptRanges:void 0,Body:void 0,CacheControl:void 0,ContentDisposition:void 0,ContentEncoding:void 0,ContentLanguage:void 0,ContentLength:void 0,ContentRange:void 0,ContentType:void 0,DeleteMarker:void 0,ETag:void 0,Expiration:void 0,Expires:void 0,LastModified:void 0,Metadata:void 0,MissingMeta:void 0,ObjectLockLegalHoldStatus:void 0,ObjectLockMode:void 0,ObjectLockRetainUntilDate:void 0,PartsCount:void 0,ReplicationStatus:void 0,RequestCharged:void 0,Restore:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,StorageClass:void 0,TagCount:void 0,VersionId:void 0,WebsiteRedirectLocation:void 0},void 0!==e.headers["x-amz-object-lock-mode"]&&(r.ObjectLockMode=e.headers["x-amz-object-lock-mode"]),void 0!==e.headers["content-language"]&&(r.ContentLanguage=e.headers["content-language"]),void 0!==e.headers["content-disposition"]&&(r.ContentDisposition=e.headers["content-disposition"]),void 0!==e.headers["cache-control"]&&(r.CacheControl=e.headers["cache-control"]),void 0!==e.headers["content-type"]&&(r.ContentType=e.headers["content-type"]),void 0!==e.headers["content-range"]&&(r.ContentRange=e.headers["content-range"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["content-length"]&&(r.ContentLength=parseInt(e.headers["content-length"],10)),void 0!==e.headers["x-amz-object-lock-retain-until-date"]&&(r.ObjectLockRetainUntilDate=new Date(e.headers["x-amz-object-lock-retain-until-date"])),void 0!==e.headers["x-amz-object-lock-legal-hold"]&&(r.ObjectLockLegalHoldStatus=e.headers["x-amz-object-lock-legal-hold"]),void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["x-amz-storage-class"]&&(r.StorageClass=e.headers["x-amz-storage-class"]),void 0!==e.headers["content-encoding"]&&(r.ContentEncoding=e.headers["content-encoding"]),void 0!==e.headers["x-amz-restore"]&&(r.Restore=e.headers["x-amz-restore"]),void 0!==e.headers["x-amz-website-redirect-location"]&&(r.WebsiteRedirectLocation=e.headers["x-amz-website-redirect-location"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-mp-parts-count"]&&(r.PartsCount=parseInt(e.headers["x-amz-mp-parts-count"],10)),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["accept-ranges"]&&(r.AcceptRanges=e.headers["accept-ranges"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers.expires&&(r.Expires=new Date(e.headers.expires)),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-missing-meta"]&&(r.MissingMeta=parseInt(e.headers["x-amz-missing-meta"],10)),void 0!==e.headers["x-amz-replication-status"]&&(r.ReplicationStatus=e.headers["x-amz-replication-status"]),void 0!==e.headers["x-amz-tagging-count"]&&(r.TagCount=parseInt(e.headers["x-amz-tagging-count"],10)),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["last-modified"]&&(r.LastModified=new Date(e.headers["last-modified"])),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),Object.keys(e.headers).forEach((function(t){void 0===r.Metadata&&(r.Metadata={}),t.startsWith("x-amz-meta-")&&(r.Metadata[t.substring(11)]=e.headers[t])})),n=e.body,r.Body=n,[2,Promise.resolve(r)])}))}))}(e,t)},t}(ir),dl=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="DeleteObjectCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:ca.filterSensitiveLog,outputFilterSensitiveLog:ua.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So(So(So({"Content-Type":""},Nf(e.MFA)&&{"x-amz-mfa":e.MFA}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.BypassGovernanceRetention)&&{"x-amz-bypass-governance-retention":e.BypassGovernanceRetention.toString()}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o=So({"x-id":"DeleteObject"},void 0!==e.VersionId&&{versionId:e.VersionId}),[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r;return Ao(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,yf(e,t)]:(r={$metadata:Pf(e),DeleteMarker:void 0,RequestCharged:void 0,VersionId:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),[4,Rf(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),pl=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="ListObjectsCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:Ju.filterSensitiveLog,outputFilterSensitiveLog:Yu.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So({"Content-Type":""},Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",or(i)),o=So(So(So(So(So({},void 0!==e.MaxKeys&&{"max-keys":e.MaxKeys.toString()}),void 0!==e.Marker&&{marker:e.Marker}),void 0!==e.Prefix&&{prefix:e.Prefix}),void 0!==e.Delimiter&&{delimiter:e.Delimiter}),void 0!==e.EncodingType&&{"encoding-type":e.EncodingType}),[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n;return Ao(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,bf(e,t)]:(r={$metadata:Pf(e),CommonPrefixes:void 0,Contents:void 0,Delimiter:void 0,EncodingType:void 0,IsTruncated:void 0,Marker:void 0,MaxKeys:void 0,Name:void 0,NextMarker:void 0,Prefix:void 0},[4,Lf(e.body,t)]);case 1:return""===(n=i.sent()).CommonPrefixes&&(r.CommonPrefixes=[]),void 0!==n.CommonPrefixes&&(r.CommonPrefixes=xf(ar(n.CommonPrefixes),t)),""===n.Contents&&(r.Contents=[]),void 0!==n.Contents&&(r.Contents=If(ar(n.Contents),t)),void 0!==n.Delimiter&&(r.Delimiter=n.Delimiter),void 0!==n.EncodingType&&(r.EncodingType=n.EncodingType),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Marker&&(r.Marker=n.Marker),void 0!==n.MaxKeys&&(r.MaxKeys=parseInt(n.MaxKeys)),void 0!==n.Name&&(r.Name=n.Name),void 0!==n.NextMarker&&(r.NextMarker=n.NextMarker),void 0!==n.Prefix&&(r.Prefix=n.Prefix),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),vl=JSON.parse('{"u2":"@aws-sdk/client-s3","i8":"1.0.0-rc.4"}'),yl=r(94079),gl=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var r=new Uint8Array(8),n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&bl(r),new e(r)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&bl(e),parseInt(Gn(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function bl(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var ml,wl=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,r,n,i,o=[];try{for(var a=(0,ce.__values)(Object.keys(e)),s=a.next();!s.done;s=a.next()){var u=s.value,c=this.fromUtf8(u);o.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(e[u]))}}catch(v){t={error:v}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var f=new Uint8Array(o.reduce((function(e,t){return e+t.byteLength}),0)),l=0;try{for(var h=(0,ce.__values)(o),d=h.next();!d.done;d=h.next()){var p=d.value;f.set(p,l),l+=p.byteLength}}catch(y){n={error:y}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return f},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":var n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":var i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);var o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":var a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(gl.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Ol.test(e.value))throw new Error("Invalid UUID received: "+e.value);var f=new Uint8Array(17);return f[0]=9,f.set(function(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),r=0;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=a?n():o.readAsArrayBuffer(e.slice(s,Math.min(a,s+r)))}o.addEventListener("load",(function(e){var r=e.target.result;t(new Uint8Array(r)),s+=r.byteLength,u()})),u()}))}function jl(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function Bl(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=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]0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,this.bufferLength===Fl&&(this.hashBuffer(),this.bufferLength=0)}},e.prototype.digest=function(){return jl(this,void 0,void 0,(function(){var e,t,r,n,i,o,a;return Bl(this,(function(s){if(!this.finished){if(t=(e=this).buffer,r=e.bufferLength,n=e.bytesHashed,i=8*n,t.setUint8(this.bufferLength++,128),r%Fl>=56){for(a=this.bufferLength;a>>0,!0),t.setUint32(60,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}for(o=new DataView(new ArrayBuffer(16)),a=0;a<4;a++)o.setUint32(4*a,this.state[a],!0);return[2,new Uint8Array(o.buffer,o.byteOffset,o.byteLength)]}))}))},e.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=Vl(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=Vl(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=Vl(i,o,r,n,e.getUint32(8,!0),17,606105819),n=Vl(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=Vl(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=Vl(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=Vl(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=Vl(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=Vl(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=Vl(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=Vl(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=Vl(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=Vl(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=Vl(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=Vl(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=Hl(r,n=Vl(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=Hl(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=Hl(i,o,r,n,e.getUint32(44,!0),14,643717713),n=Hl(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=Hl(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=Hl(o,r,n,i,e.getUint32(40,!0),9,38016083),i=Hl(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=Hl(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=Hl(r,n,i,o,e.getUint32(36,!0),5,568446438),o=Hl(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=Hl(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=Hl(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=Hl(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=Hl(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=Hl(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=Wl(r,n=Hl(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=Wl(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=Wl(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=Wl(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=Wl(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=Wl(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=Wl(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=Wl(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=Wl(r,n,i,o,e.getUint32(52,!0),4,681279174),o=Wl(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=Wl(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=Wl(n,i,o,r,e.getUint32(24,!0),23,76029189),r=Wl(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=Wl(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=Wl(i,o,r,n,e.getUint32(60,!0),16,530742520),r=Gl(r,n=Wl(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=Gl(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=Gl(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=Gl(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=Gl(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=Gl(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=Gl(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=Gl(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=Gl(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=Gl(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=Gl(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=Gl(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=Gl(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=Gl(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=Gl(i,o,r,n,e.getUint32(8,!0),15,718787259),n=Gl(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295},e}();function Kl(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<>>32-i)+r&4294967295}function Vl(e,t,r,n,i,o,a){return Kl(t&r|~t&n,e,t,i,o,a)}function Hl(e,t,r,n,i,o,a){return Kl(t&n|r&~n,e,t,i,o,a)}function Wl(e,t,r,n,i,o,a){return Kl(t^r^n,e,t,i,o,a)}function Gl(e,t,r,n,i,o,a){return Kl(r^(t|~n),e,t,i,o,a)}var Ql="s3.{region}.amazonaws.com",$l=new Set(["ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Yl=new Set(["cn-north-1","cn-northwest-1"]),Jl=new Set(["us-iso-east-1"]),Zl=new Set(["us-isob-east-1"]),Xl=new Set(["us-gov-east-1","us-gov-west-1"]),eh=So(So({},{apiVersion:"2006-03-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"ap-east-1":r={hostname:"s3.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":r={hostname:"s3.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":r={hostname:"s3.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":r={hostname:"s3.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":r={hostname:"s3.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":r={hostname:"s3.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":r={hostname:"s3.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":r={hostname:"s3.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":r={hostname:"s3.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":r={hostname:"s3.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":r={hostname:"s3.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":r={hostname:"s3.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":r={hostname:"s3.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":r={hostname:"s3.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-gov-west-1":r={hostname:"s3-fips-us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"me-south-1":r={hostname:"s3.me-south-1.amazonaws.com",partition:"aws"};break;case"s3-external-1":r={hostname:"s3-external-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"sa-east-1":r={hostname:"s3.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":r={hostname:"s3.amazonaws.com",partition:"aws"};break;case"us-east-2":r={hostname:"s3.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":r={hostname:"s3.us-gov-east-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-gov-west-1":r={hostname:"s3.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-iso-east-1":r={hostname:"s3.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":r={hostname:"s3.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":r={hostname:"s3.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":r={hostname:"s3.us-west-2.amazonaws.com",partition:"aws"};break;default:$l.has(e)&&(r={hostname:Ql.replace("{region}",e),partition:"aws"}),Yl.has(e)&&(r={hostname:"s3.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Jl.has(e)&&(r={hostname:"s3.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Zl.has(e)&&(r={hostname:"s3.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Xl.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:Ql.replace("{region}",e),partition:"aws"})}return Promise.resolve(r)},signingEscapePath:!1,signingName:"s3",useArnRegion:!1}),{runtime:"browser",base64Decoder:Ur,base64Encoder:Dr,bodyLengthChecker:rn,credentialDefaultProvider:Fr("Credential is missing"),defaultUserAgent:nn(vl.u2,vl.i8),eventStreamSerdeProvider:function(e){return new Rl(e)},maxAttempts:3,md5:zl,region:Fr("Region is missing"),requestHandler:new Cr,sha256:Ar.Sha256,streamCollector:jr,streamHasher:function(e,t){return Ll(this,void 0,void 0,(function(){var r;return Ul(this,(function(n){switch(n.label){case 0:return r=new e,[4,Dl(t,(function(e){r.update(e)}))];case 1:return n.sent(),[2,r.digest()]}}))}))},urlParser:tn,utf8Decoder:on.fromUtf8,utf8Encoder:on.toUtf8});var th=function(){return th=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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]=0)throw(n=new Error("Bucket name shouldn't contain '/', received '"+e+"'")).name="InvalidBucketName",n;return[2,t(ah({},r))]}))}))}}}(),ch)}}},lh={step:"build",tags:["USE_REGIONAL_ENDPOINT","S3"],name:"useRegionalEndpointMiddleware"},hh=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return sh(void 0,void 0,void 0,(function(){var n,i;return uh(this,(function(o){switch(o.label){case 0:return n=r.request,!wt.isInstance(n)||e.isCustomEndpoint?[2,t(ah({},r))]:"s3.amazonaws.com"!==n.hostname?[3,1]:(n.hostname="s3.us-east-1.amazonaws.com",[3,3]);case 1:return i="aws-global",[4,e.region()];case 2:i===o.sent()&&(n.hostname="s3.amazonaws.com"),o.label=3;case 3:return[2,t(ah({},r))]}}))}))}}}(e),lh)}}},dh=function(e){function t(t){var r,n,i=this,o=So(So({},eh),t),a=yn(o),s=oi(dn(a)),u=function(e){var t=e.bucketEndpoint,r=void 0!==t&&t,n=e.forcePathStyle,i=void 0!==n&&n,o=e.useAccelerateEndpoint,a=void 0!==o&&o,s=e.useDualstackEndpoint,u=void 0!==s&&s,c=e.useArnRegion,f=void 0!==c&&c;return Df(Df({},e),{bucketEndpoint:r,forcePathStyle:i,useAccelerateEndpoint:a,useDualstackEndpoint:u,useArnRegion:"function"===typeof f?f:function(){return Promise.resolve(f)}})}(Zr(s)),c=(r=u,(0,ce.__assign)((0,ce.__assign)({},r),{eventStreamMarshaller:r.eventStreamSerdeProvider(r)}));return(i=e.call(this,c)||this).config=c,i.middlewareStack.use((n=i.config,{applyToStack:function(e){e.addRelativeTo(ui(n),ci)}})),i.middlewareStack.use(zr(i.config)),i.middlewareStack.use(li(i.config)),i.middlewareStack.use(wn(i.config)),i.middlewareStack.use(fh(i.config)),i.middlewareStack.use(hh(i.config)),i.middlewareStack.use(oh(i.config)),i.middlewareStack.use(Sn(i.config)),i.middlewareStack.use(An(i.config)),i}return _o(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(nr);function ph(e){var t=e.port,r=e.query,n=e.protocol,i=e.path,o=e.hostname;n&&":"!==n.substr(-1)&&(n+=":"),t&&(o+=":"+t),i&&"/"!==i.charAt(0)&&(i="/"+i);var a=r?xr(r):"";return a&&"?"!==a[0]&&(a="?"+a),n+"//"+o+i+a}function vh(e,t){return(0,ce.__awaiter)(this,void 0,void 0,(function(){var r,n,i=this;return(0,ce.__generator)(this,(function(o){switch(o.label){case 0:return r=function(e){return function(e){return(0,ce.__awaiter)(i,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(t){return[2,{output:{request:e.request},response:void 0}]}))}))}},(n=e.middlewareStack.clone()).add(r,{step:"build",priority:"low"}),[4,t.resolveMiddleware(n,e.config,void 0)(t).then((function(e){return e.output.request}))];case 1:return[2,o.sent()]}}))}))}var yh=function(){function e(e){var t=(0,ce.__assign)({service:e.signingName||e.service||"s3",uriEscapePath:e.uriEscapePath||!1},e);this.signer=new ei(t)}return e.prototype.presign=function(e,t){void 0===t&&(t={});var r=t.unsignableHeaders,n=void 0===r?new Set:r,i=(0,ce.__rest)(t,["unsignableHeaders"]);return(0,ce.__awaiter)(this,void 0,void 0,(function(){return(0,ce.__generator)(this,(function(t){return n.add("content-type"),e.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",[2,this.signer.presign(e,(0,ce.__assign)({expiresIn:900,unsignableHeaders:n},i))]}))}))},e}(),gh=r(9669),bh=r.n(gh),mh=new u("axios-http-handler"),wh="sendProgress",_h=function(){function e(e,t){void 0===e&&(e={}),this.httpOptions=e,this.emitter=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=this.httpOptions.requestTimeout,n=this.emitter,i=e.path;if(e.query){var o=xr(e.query);o&&(i+="?"+o)}var a=e.port,s=e.protocol+"//"+e.hostname+(a?":"+a:"")+i,u={};u.url=s,u.method=e.method,u.headers=e.headers,delete u.headers.host,e.body?u.data=e.body:u.headers["Content-Type"]&&(u.data=null),n&&(u.onUploadProgress=function(e){n.emit(wh,e),mh.debug(e)}),u.responseType="blob";var c=[bh().request(u).then((function(e){return{response:new mt({headers:e.headers,statusCode:e.status,body:e.data})}})).catch((function(e){throw mh.error(e),e})),Sh(r)];return Promise.race(c)},e}();function Sh(e){return void 0===e&&(e=0),new Promise((function(t,r){e&&setTimeout((function(){var t=new Error("Request did not complete within "+e+" ms");t.name="TimeoutError",r(t)}),e)}))}var Eh,Ah,kh,Mh,xh,Ch,Ih,Oh,Th,Ph,Rh,Nh,Lh,Uh,Dh,jh,Bh,Fh,qh,zh,Kh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ll(t)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="PutObjectCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:Pc.filterSensitiveLog,outputFilterSensitiveLog:Tc.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h;return Ao(this,(function(d){switch(d.label){case 0:if(r=So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So({"Content-Type":"application/octet-stream"},Nf(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Nf(e.ContentEncoding)&&{"Content-Encoding":e.ContentEncoding}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Nf(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),Nf(e.CacheControl)&&{"Cache-Control":e.CacheControl}),Nf(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Nf(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Nf(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Nf(e.ContentLength)&&{"Content-Length":e.ContentLength.toString()}),Nf(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Nf(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Nf(e.ContentDisposition)&&{"Content-Disposition":e.ContentDisposition}),Nf(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Nf(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Nf(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Nf(e.Expires)&&{Expires:lr(e.Expires).toString()}),Nf(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.ContentMD5)&&{"Content-MD5":e.ContentMD5}),Nf(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Nf(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Nf(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Nf(e.ContentLanguage)&&{"Content-Language":e.ContentLanguage}),Nf(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Nf(e.ACL)&&{"x-amz-acl":e.ACL}),Nf(e.ContentType)&&{"Content-Type":e.ContentType}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){return t["x-amz-meta-"+r]=e.Metadata[r],t}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o={"x-id":"PutObject"},void 0!==e.Body&&(s=e.Body,a=s),[4,t.endpoint()];case 1:return u=d.sent(),c=u.hostname,f=u.protocol,l=void 0===f?"https":f,h=u.port,[2,new wt({protocol:l,hostname:c,port:h,method:"PUT",headers:r,path:n,query:o,body:a})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r;return Ao(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,wf(e,t)]:(r={$metadata:Pf(e),ETag:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),[4,Rf(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),Vh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ll(t)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="CreateMultipartUploadCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:$o.filterSensitiveLog,outputFilterSensitiveLog:Qo.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So(So({"Content-Type":""},Nf(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Nf(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),Nf(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Nf(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Nf(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Nf(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Nf(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Nf(e.ContentType)&&{"Content-Type":e.ContentType}),Nf(e.ContentLanguage)&&{"Content-Language":e.ContentLanguage}),Nf(e.CacheControl)&&{"Cache-Control":e.CacheControl}),Nf(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Nf(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Nf(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Nf(e.ACL)&&{"x-amz-acl":e.ACL}),Nf(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.Expires)&&{Expires:lr(e.Expires).toString()}),Nf(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Nf(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Nf(e.ContentDisposition)&&{"Content-Disposition":e.ContentDisposition}),Nf(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Nf(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Nf(e.ContentEncoding)&&{"Content-Encoding":e.ContentEncoding}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){return t["x-amz-meta-"+r]=e.Metadata[r],t}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o={uploads:""},[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"POST",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n;return Ao(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,vf(e,t)]:(r={$metadata:Pf(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Key:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,UploadId:void 0},void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),[4,Lf(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir);!function(e){e.SELECT="SELECT"}(Eh||(Eh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.OutputLocation&&{OutputLocation:Yc.filterSensitiveLog(e.OutputLocation)})}}(Ah||(Ah={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.RestoreRequest&&{RestoreRequest:Ah.filterSensitiveLog(e.RestoreRequest)})}}(kh||(kh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Mh||(Mh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(xh||(xh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Ch||(Ch={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Ih||(Ih={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Oh||(Oh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Th||(Th={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Ph||(Ph={})),function(e){e.visit=function(e,t){return void 0!==e.Cont?t.Cont(e.Cont):void 0!==e.Progress?t.Progress(e.Progress):void 0!==e.Stats?t.Stats(e.Stats):void 0!==e.End?t.End(e.End):void 0!==e.Records?t.Records(e.Records):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Cont?{Cont:Mh.filterSensitiveLog(e.Cont)}:void 0!==e.Progress?{Progress:Ih.filterSensitiveLog(e.Progress)}:void 0!==e.Stats?{Stats:Ph.filterSensitiveLog(e.Stats)}:void 0!==e.End?{End:xh.filterSensitiveLog(e.End)}:void 0!==e.Records?{Records:Oh.filterSensitiveLog(e.Records)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Rh||(Rh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.Payload&&{Payload:"STREAMING_CONTENT"})}}(Nh||(Nh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Lh||(Lh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Uh||(Uh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.SSECustomerKey&&{SSECustomerKey:hr})}}(Dh||(Dh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:hr})}}(jh||(jh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.SSECustomerKey&&{SSECustomerKey:hr})}}(Bh||(Bh={})),function(e){e.filterSensitiveLog=function(e){return So({},e)}}(Fh||(Fh={})),function(e){e.filterSensitiveLog=function(e){return So(So({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:hr})}}(qh||(qh={})),function(e){e.filterSensitiveLog=function(e){return So(So(So({},e),e.SSECustomerKey&&{SSECustomerKey:hr}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:hr})}}(zh||(zh={}));var Hh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ll(t)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="UploadPartCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:Bh.filterSensitiveLog,outputFilterSensitiveLog:jh.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h;return Ao(this,(function(d){switch(d.label){case 0:if(r=So(So(So(So(So(So(So({"Content-Type":"application/octet-stream"},Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.ContentLength)&&{"Content-Length":e.ContentLength.toString()}),Nf(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Nf(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Nf(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),Nf(e.ContentMD5)&&{"Content-MD5":e.ContentMD5}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o=So(So({"x-id":"UploadPart"},void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.Body&&(s=e.Body,a=s),[4,t.endpoint()];case 1:return u=d.sent(),c=u.hostname,f=u.protocol,l=void 0===f?"https":f,h=u.port,[2,new wt({protocol:l,hostname:c,port:h,method:"PUT",headers:r,path:n,query:o,body:a})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r;return Ao(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,_f(e,t)]:(r={$metadata:Pf(e),ETag:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0},void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),[4,Rf(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),Wh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="CompleteMultipartUploadCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:jo.filterSensitiveLog,outputFilterSensitiveLog:Lo.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f,l,h;return Ao(this,(function(d){switch(d.label){case 0:if(r=So(So({"Content-Type":"application/xml"},Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");if(n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",or(i)),o=So({},void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.MultipartUpload&&(s=kf(e.MultipartUpload,t),a='',s.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),a+=s.toString()),[4,t.endpoint()];case 1:return u=d.sent(),c=u.hostname,f=u.protocol,l=void 0===f?"https":f,h=u.port,[2,new wt({protocol:l,hostname:c,port:h,method:"POST",headers:r,path:n,query:o,body:a})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n;return Ao(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,pf(e,t)]:(r={$metadata:Pf(e),Bucket:void 0,ETag:void 0,Expiration:void 0,Key:void 0,Location:void 0,RequestCharged:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Lf(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.ETag&&(r.ETag=n.ETag),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.Location&&(r.Location=n.Location),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),Gh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="AbortMultipartUploadCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:xo.filterSensitiveLog,outputFilterSensitiveLog:Mo.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So({"Content-Type":""},Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");if(n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",or(i)),o=So({"x-id":"AbortMultipartUpload"},void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r;return Ao(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,df(e,t)]:(r={$metadata:Pf(e),RequestCharged:void 0},void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Rf(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),Qh=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return _o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Xt(t,this.serialize,this.deserialize)),this.middlewareStack.use(ol(t));var n=e.concat(this.middlewareStack),i=t.logger,o="S3Client",a="ListPartsCommand",s={logger:i,clientName:o,commandName:a,inputFilterSensitiveLog:ac.filterSensitiveLog,outputFilterSensitiveLog:oc.filterSensitiveLog};"function"===typeof i.info&&i.info({clientName:o,commandName:a});var u=t.requestHandler;return n.resolve((function(e){return u.handle(e.request,r||{})}),s)},t.prototype.serialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return Ao(this,(function(l){switch(l.label){case 0:if(r=So(So({"Content-Type":""},Nf(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Nf(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",or(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return or(e)})).join("/")),o=So(So(So({"x-id":"ListParts"},void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.MaxParts&&{"max-parts":e.MaxParts.toString()}),void 0!==e.PartNumberMarker&&{"part-number-marker":e.PartNumberMarker.toString()}),[4,t.endpoint()];case 1:return a=l.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,f=a.port,[2,new wt({protocol:c,hostname:s,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Eo(void 0,void 0,void 0,(function(){var r,n;return Ao(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,mf(e,t)]:(r={$metadata:Pf(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Initiator:void 0,IsTruncated:void 0,Key:void 0,MaxParts:void 0,NextPartNumberMarker:void 0,Owner:void 0,PartNumberMarker:void 0,Parts:void 0,RequestCharged:void 0,StorageClass:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),[4,Lf(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Initiator&&(r.Initiator=Cf(n.Initiator,t)),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.MaxParts&&(r.MaxParts=parseInt(n.MaxParts)),void 0!==n.NextPartNumberMarker&&(r.NextPartNumberMarker=parseInt(n.NextPartNumberMarker)),void 0!==n.Owner&&(r.Owner=Of(n.Owner,t)),void 0!==n.PartNumberMarker&&(r.PartNumberMarker=parseInt(n.PartNumberMarker)),""===n.Part&&(r.Parts=[]),void 0!==n.Part&&(r.Parts=Tf(ar(n.Part),t)),void 0!==n.StorageClass&&(r.StorageClass=n.StorageClass),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(ir),$h=r(35424),Yh=function(e){var t,r=(0,Ti.parse)(e),n=r.hostname,i=void 0===n?"localhost":n,o=r.pathname,a=void 0===o?"/":o,s=r.port,u=r.protocol,c=void 0===u?"https:":u,f=r.search;return f&&(t=en(f)),{hostname:i,port:s?parseInt(s):void 0,protocol:c,path:a,query:t}},Jh=function(){return Jh=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},td=new u("AWSS3ProviderManagedUpload"),rd=function(){function e(e,t,r){this.minPartSize=5242880,this.queueSize=4,this.body=null,this.params=null,this.opts=null,this.multiPartMap=[],this.cancel=!1,this.bytesUploaded=0,this.totalBytesToUpload=0,this.emitter=null,this.params=e,this.opts=t,this.emitter=r}return e.prototype.upload=function(){return Zh(this,void 0,void 0,(function(){var e,t,r,n,i,o;return Xh(this,(function(a){switch(a.label){case 0:return e=this,[4,this.validateAndSanitizeBody(this.params.Body)];case 1:return e.body=a.sent(),this.totalBytesToUpload=this.byteLength(this.body),this.totalBytesToUpload<=this.minPartSize?(this.params.Body=this.body,t=new Kh(this.params),[4,this._createNewS3Client(this.opts,this.emitter)]):[3,3];case 2:return[2,a.sent().send(t)];case 3:return[4,this.createMultiPartUpload()];case 4:r=a.sent(),n=Math.ceil(this.totalBytesToUpload/this.minPartSize),i=0,a.label=5;case 5:return i0)throw new Error("Multi Part upload clean up failed");return[2]}}))}))},e.prototype.setupEventListener=function(e){var t=this;e.emitter.on(wh,(function(r){t.progressChanged(e.partNumber,r.loaded-e._lastUploadedBytes),e._lastUploadedBytes=r.loaded}))},e.prototype.progressChanged=function(e,t){this.bytesUploaded+=t,this.emitter.emit(wh,{loaded:this.bytesUploaded,total:this.totalBytesToUpload,part:e,key:this.params.Key})},e.prototype.byteLength=function(e){if(null===e||void 0===e)return 0;if("number"===typeof e.byteLength)return e.byteLength;if("number"===typeof e.length)return e.length;if("number"===typeof e.size)return e.size;if("string"!==typeof e.path)throw new Error("Cannot determine length of "+e)},e.prototype.validateAndSanitizeBody=function(e){return Zh(this,void 0,void 0,(function(){return Xh(this,(function(t){switch(t.label){case 0:return this.isGenericObject(e)?[2,JSON.stringify(e)]:[3,1];case 1:return this.isBlob(e)?se.isReactNative?[4,jr(e)]:[3,3]:[3,4];case 2:return[2,t.sent()];case 3:case 4:return[2,e]}}))}))},e.prototype.isBlob=function(e){return"undefined"!==typeof Blob&&e instanceof Blob},e.prototype.isGenericObject=function(e){if(null!==e&&"object"===typeof e)try{return!(this.byteLength(e)>=0)}catch(t){return!0}return!1},e.prototype._createNewS3Client=function(e,t){return Zh(this,void 0,void 0,(function(){var r,n,i,o,a;return Xh(this,(function(s){switch(s.label){case 0:return[4,this._getCredentials()];case 1:return r=s.sent(),n=e.region,i=e.dangerouslyConnectToHttpEndpointForTesting,o={},i&&(o={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0}),(a=new dh(Jh(Jh({region:n,credentials:r},o),{requestHandler:new _h({},t),customUserAgent:ue(),urlParser:Yh}))).middlewareStack.remove("contentLengthMiddleware"),[2,a]}}))}))},e.prototype._getCredentials=function(){return bi.get().then((function(e){if(!e)return!1;var t=bi.shear(e);return td.debug("set credentials for storage",t),t})).catch((function(e){return td.warn("ensure credentials error",e),!1}))},e}(),nd=function(){return nd=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},pd=new u("StorageClass"),vd="AWSS3",yd=function(){function e(){this._config={},this._pluggables=[],pd.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return e.prototype.getModuleName=function(){return"Storage"},e.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory()){this._pluggables.push(e);return e.configure(this._config[e.getProviderName()])}},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));return void 0===t?(pd.debug("No plugin found with providerName",e),null):t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(pd.debug("configure Storage"),!e)return this._config;var r=_i.parseMobilehubConfig(e),n=Object.keys(r.Storage),i=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],o=function(e){return i.some((function(t){return t===e}))};return n&&n.find((function(e){return o(e)}))&&!r.Storage.AWSS3&&(r.Storage.AWSS3={}),Object.entries(r.Storage).map((function(e){var t=dd(e,2),n=t[0],i=t[1];n&&o(n)&&void 0!==i&&(r.Storage.AWSS3[n]=i,delete r.Storage[n])})),Object.keys(r.Storage).forEach((function(e){"string"!==typeof r.Storage[e]&&(t._config[e]=fd(fd({},t._config[e]),r.Storage[e]))})),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new cd),this._config},e.prototype.get=function(e,t){return ld(this,void 0,void 0,(function(){var r,n,i;return hd(this,(function(o){return r=(t||{}).provider,n=void 0===r?vd:r,void 0===(i=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(pd.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,i.get(e,t)]}))}))},e.prototype.put=function(e,t,r){return ld(this,void 0,void 0,(function(){var n,i,o;return hd(this,(function(a){return n=(r||{}).provider,i=void 0===n?vd:n,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===i})))&&(pd.debug("No plugin found with providerName",i),Promise.reject("No plugin found in Storage for the provider")),[2,o.put(e,t,r)]}))}))},e.prototype.remove=function(e,t){return ld(this,void 0,void 0,(function(){var r,n,i;return hd(this,(function(o){return r=(t||{}).provider,n=void 0===r?vd:r,void 0===(i=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(pd.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,i.remove(e,t)]}))}))},e.prototype.list=function(e,t){return ld(this,void 0,void 0,(function(){var r,n,i;return hd(this,(function(o){return r=(t||{}).provider,n=void 0===r?vd:r,void 0===(i=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(pd.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,i.list(e,t)]}))}))},e}(),gd=function(){return gd=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.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),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;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,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[l-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[l]=(d+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(n.KEY[l]+this.temp[l]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;f=c,c=u,u=s,s=a+v|0,a=o,o=i,i=r,r=v+y|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=i},11278:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 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},20830:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(70655).__exportStar)(r(86879),t)},86879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(70655),i=r(11278),o=r(86693),a=r(17658),s=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){u.headers[e]=i.merge(a)})),e.exports=u},91849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},8713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},64867:function(e,t,r){"use strict";var n=r(91849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r0?a-4:a;for(r=0;r>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(e,t,r){"use strict";var n=r(79742),i=r(80645),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;var a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=function(e){if(u.isBuffer(e)){var t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||z(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),s(e<0?0:0|p(e))}function h(e){for(var t=e.length<0?0:0|p(e.length),r=s(t),n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function v(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:j(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128===(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nn.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=v,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function B(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!==e}var K=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},78249:function(e,t){e.exports=function(){var e=e||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},o=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},f=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var f=0;f>>6-a%4*2;i[o>>>2]|=(s|u)<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;oi&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,u=a.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),i.lib.WordArray)}()},52153:function(e,t,r){!function(t,n){var i;e.exports=(i=r(78249),function(e){var t=i,r=t.lib,n=r.WordArray,o=r.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],f=a.SHA256=o.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,y=c[d-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[d]=v+c[d-7]+g+c[d-16]}var b=n&i^n&o^i&o,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+u[d]+c[d];h=l,l=f,f=s,s=a+w|0,a=o,o=i,i=n,n=w+(m+b)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+f|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(f),t.HmacSHA256=o._createHmacHelper(f)}(Math),i.SHA256)}()},9996:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function a(e,t){try{return t in e}catch(r){return!1}}function s(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return u;var r=t.customMerge(e);return"function"===typeof r?r:u}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}function u(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(r);return a===Array.isArray(e)?a?o.arrayMerge(e,r,o):s(e,r,o):n(r,o)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return u(e,r,t)}),{})};var c=u;e.exports=c},17187:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"===typeof e}function n(e){return"object"===typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,o,a,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(i(o=this._events[e]))return!1;if(r(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(n(o))for(s=Array.prototype.slice.call(arguments,1),a=(c=o.slice()).length,u=0;u0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"===typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,o,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,o=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},35035:function(e){"use strict";e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var r,n="boolean"===typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"===typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!==typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=h,this.buildObjNode=f):(this.buildTextNode=l,this.buildObjNode=c),this.buildTextValNode=l,this.buildObjectNode=c}function s(e,t){return e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e?e+"");return e+this.newLine}function c(e,t,r,n){return r&&!e.includes("<")?this.indentate(n)+"<"+t+r+">"+e+""+this.options.tagValueProcessor(e)+"1){o[u]=[];for(let r in e.child[u])e.child[u].hasOwnProperty(r)&&o[u].push(i(e.child[u][r],t,u))}else{const a=i(e.child[u][0],t,u),s=!0===t.arrayMode&&"object"===typeof a||n.isTagNameInArrayMode(u,t.arrayMode,r);o[u]=s?[a]:a}}return o};t.convertToJson=i},67702:function(e,t,r){"use strict";const n=r(17849),i=r(17849).buildOptions,o=r(23543),a=function(e,t,r){let i="{";const o=Object.keys(e.child);for(let n=0;n1){for(var u in i+='"'+s+'" : [ ',e.child[s])i+=a(e.child[s][u],t)+" , ";i=i.substr(0,i.length-1)+" ] "}else i+='"'+s+'" : '+a(e.child[s][0],t)+" ,"}return n.merge(i,e.attrsMap),n.isEmptyObject(i)?n.isExist(e.val)?e.val:"":(n.isExist(e.val)&&("string"!==typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(i+='"'+t.textNodeName+'" : '+(!0!==(c=e.val)&&!1!==c&&isNaN(c)?'"'+c+'"':c)),","===i[i.length-1]&&(i=i.substr(0,i.length-2)),i+"}");var c};t.convertToJsonString=function(e,t){return(t=i(t,o.defaultOptions,o.props)).indentBy=t.indentBy||"",a(e,t,0)}},36965:function(e,t,r){"use strict";const n=r(60284),i=r(23543),o=r(23543),a=r(17849).buildOptions,s=r(78501);t.parse=function(e,t,r){if(r){!0===r&&(r={});const t=s.validate(e,r);if(!0!==t)throw Error(t.err.msg)}t=a(t,o.defaultOptions,o.props);const u=i.getTraversalObj(e,t);return n.convertToJson(u,t)},t.convertTonimn=r(68398).convert2nimn,t.getTraversalObj=i.getTraversalObj,t.convertToJson=n.convertToJson,t.convertToJsonString=r(67702).convertToJsonString,t.validate=s.validate,t.j2xParser=r(70259),t.parseToNimn=function(e,r,n){return t.convertTonimn(t.getTraversalObj(e,n),r,n)}},17849:function(e,t){"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(e){return"undefined"!==typeof e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const n=Object.keys(t),i=n.length;for(let o=0;o5&&"xml"===n)return h("InvalidXml","XML declaration allowed only at the start of the document.",p(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=n.buildOptions(t,i,o);const r=[];let c=!1,d=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)y+=e[i];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),i--),v=y,!n.isName(v)){let t;return t=0===y.trim().length?"There is an unnecessary space between tag name and backward slash '0)return h("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",p(e,i));{const t=r.pop();if(y!==t)return h("InvalidTag","Closing tag '"+t+"' is expected inplace of '"+y+"'.",p(e,i));0==r.length&&(d=!0)}}else{const n=f(b,t);if(!0!==n)return h(n.err.code,n.err.msg,p(e,i-b.length+n.err.line));if(!0===d)return h("InvalidXml","Multiple possible root nodes found.",p(e,i));r.push(y),c=!0}for(i++;i0)||h("InvalidXml","Invalid '"+JSON.stringify(r,null,4).replace(/\r?\n/g,"")+"' found.",1):h("InvalidXml","Start tag expected.",1)};function u(e,t){let r="",n="",i=!1;for(;t"===e[t]&&""===n){i=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:i}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(e,t){const r=n.getAllMatches(e,c),i={};for(let n=0;n))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,n.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const a={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(e,t){return e},attrValueProcessor:function(e,t){return e},stopNodes:[]};t.defaultOptions=a;const s=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function u(e,t,r){return t&&(r.trimValues&&(t=t.trim()),t=f(t=r.tagValueProcessor(t,e),r.parseNodeValue,r.parseTrueNumberOnly)),t}function c(e,t){if(t.ignoreNameSpace){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}function f(e,t,r){if(t&&"string"===typeof e){let t;return""===e.trim()||isNaN(e)?t="true"===e||"false"!==e&&e:(-1!==e.indexOf("0x")?t=Number.parseInt(e,16):-1!==e.indexOf(".")?(t=Number.parseFloat(e),e=e.replace(/\.?0+$/,"")):t=Number.parseInt(e,10),r&&(t=String(t)===e?t:e)),t}return n.isExist(e)?e:""}t.props=s;const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function h(e,t){if(!t.ignoreAttributes&&"string"===typeof e){e=e.replace(/\r?\n/g," ");const r=n.getAllMatches(e,l),i=r.length,o={};for(let e=0;e"===t)return{data:n,index:i};"\t"===t&&(t=" ")}n+=t}}function p(e,t,r,n){const i=e.indexOf(t,r);if(-1===i)throw new Error(n);return i+t.length-1}t.getTraversalObj=function(e,t){e=e.replace(/\r\n?/g,"\n"),t=i(t,a,s);const r=new o("!xml");let c=r,f="";for(let i=0;i",i,"Closing Tag is not closed.");let o=e.substring(i+2,r).trim();if(t.ignoreNameSpace){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}c&&(c.val?c.val=n.getValue(c.val)+""+u(o,f,t):c.val=u(o,f,t)),t.stopNodes.length&&t.stopNodes.includes(c.tagname)&&(c.child=[],void 0==c.attrsMap&&(c.attrsMap={}),c.val=e.substr(c.startIndex+1,i-c.startIndex-1)),c=c.parent,f="",i=r}else if("?"===e[i+1])i=p(e,"?>",i,"Pi Tag is not closed.");else if("!--"===e.substr(i+1,3))i=p(e,"--\x3e",i,"Comment is not closed.");else if("!D"===e.substr(i+1,2)){const t=p(e,">",i,"DOCTYPE is not closed.");i=e.substring(i,t).indexOf("[")>=0?e.indexOf("]>",i)+1:t}else if("!["===e.substr(i+1,2)){const r=p(e,"]]>",i,"CDATA is not closed.")-2,a=e.substring(i+9,r);if(f&&(c.val=n.getValue(c.val)+""+u(c.tagname,f,t),f=""),t.cdataTagName){const e=new o(t.cdataTagName,c,a);c.addChild(e),c.val=n.getValue(c.val)+t.cdataPositionChar,a&&(e.val=a)}else c.val=(c.val||"")+(a||"");i=r+2}else{const r=d(e,i+1);let a=r.data;const s=r.index,l=a.indexOf(" ");let p=a,v=!0;if(-1!==l&&(p=a.substr(0,l).replace(/\s\s*$/,""),a=a.substr(l+1)),t.ignoreNameSpace){const e=p.indexOf(":");-1!==e&&(p=p.substr(e+1),v=p!==r.data.substr(e+1))}if(c&&f&&"!xml"!==c.tagname&&(c.val=n.getValue(c.val)+""+u(c.tagname,f,t)),a.length>0&&a.lastIndexOf("/")===a.length-1){"/"===p[p.length-1]?(p=p.substr(0,p.length-1),a=p):a=a.substr(0,a.length-1);const e=new o(p,c,"");p!==a&&(e.attrsMap=h(a,t)),c.addChild(e)}else{const e=new o(p,c);t.stopNodes.length&&t.stopNodes.includes(e.tagname)&&(e.startIndex=s),p!==a&&v&&(e.attrsMap=h(a,t)),c.addChild(e),c=e}f="",i=s}else f+=e[i]}return r}},44119:function(e,t,r){var n=r(26965).parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={};var s=!0;function u(e,t){var r=Object.prototype.toString.call(e);if("[object Array]"===r)return e.map((function(e){return u(e,t)}));if("[object Object]"!==r)throw new Error("Unexpected input.");t&&e.loc&&delete e.loc,e.loc&&(delete e.loc.startToken,delete e.loc.endToken);var n,i,o,a=Object.keys(e);for(n in a)a.hasOwnProperty(n)&&(i=e[a[n]],"[object Object]"!==(o=Object.prototype.toString.call(i))&&"[object Array]"!==o||(e[a[n]]=u(i,!0)));return e}var c=!1;function f(e){var t=i(e);if(o[t])return o[t];var r=n(e,{experimentalFragmentVariables:c});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");return r=u(r=function(e){for(var t,r={},n=[],o=0;o>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},5826:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},36808:function(e,t,r){var n,i;!function(o){if(void 0===(i="function"===typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=i),!0,e.exports=o(),!!0){var a=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};ef))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,y=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p-1&&e%1==0&&e-1}},54705:function(e,t,r){var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:function(e,t,r){var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:function(e,t,r){var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:function(e,t,r){var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:function(e,t,r){var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},94536:function(e,t,r){var n=r(10852)(Object,"create");e.exports=n},86916:function(e,t,r){var n=r(5569)(Object.keys,Object);e.exports=n},31167:function(e,t,r){e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(r){return e(t(r))}}},55639:function(e,t,r){var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:function(e){e.exports=function(e){return this.__data__.has(e)}},21814:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},37465:function(e,t,r){var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:function(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:function(e){e.exports=function(e){return this.__data__.get(e)}},44758:function(e){e.exports=function(e){return this.__data__.has(e)}},34309:function(e,t,r){var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},80346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},77813:function(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},35694:function(e,t,r){var n=r(9454),i=r(37005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},98612:function(e,t,r){var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:function(e,t,r){e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},18446:function(e,t,r){var n=r(90939);e.exports=function(e,t){return n(e,t)}},23560:function(e,t,r){var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},36719:function(e,t,r){var n=r(38749),i=r(7518),o=r(31167),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},3674:function(e,t,r){var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},70479:function(e){e.exports=function(){return[]}},95062:function(e){e.exports=function(){return!1}},63144:function(e){"use strict";var t=self.fetch.bind(self);e.exports=t,e.exports.default=e.exports},83454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"===typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(77663)},91118:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(95426)}])},75563:function(e,t,r){"use strict";var n=(0,r(67294).createContext)(null);t.Z=n},95426:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return I}});var n=r(47568),i=r(26042),o=r(20414),a=r(85893),s=(r(40906),r(67294)),u=r(75563),c=r(9008),f=r.n(c);var l,h=function(e){var t=e.children,r=(0,s.useState)([]),n=r[0],i=r[1],o=(0,s.useState)({}),c=o[0],f=o[1],l=(0,s.useState)({}),h=l[0],d=l[1],p=(0,s.useState)({}),v=p[0],y=p[1],g=(0,s.useState)(!0),b=g[0],m=g[1],w=(0,s.useState)(null),_=w[0],S=w[1],E=(0,s.useState)([]),A=E[0],k=E[1],M=(0,s.useState)(""),x=M[0],C=M[1],I=(0,s.useState)(""),O=I[0],T=I[1],P=(0,s.useState)({}),R=P[0],N=P[1],L=(0,s.useState)({}),U=L[0],D=L[1],j=(0,s.useState)({}),B=j[0],F=j[1],q=(0,s.useState)(""),z=q[0],K=q[1],V=(0,s.useState)(""),H=V[0],W=V[1],G=(0,s.useState)(null),Q=G[0],$=G[1],Y=(0,s.useState)(!1),J=Y[0],Z=Y[1],X=(0,s.useState)(""),ee=X[0],te=X[1],re=(0,s.useState)(!1),ne=re[0],ie=re[1],oe=(0,s.useState)({}),ae=oe[0],se=oe[1],ue=(0,s.useState)(!1),ce=ue[0],fe=ue[1],le=(0,s.useState)("myStudies"),he=le[0],de=le[1],pe=(0,s.useState)("In_Progress"),ve=pe[0],ye=pe[1],ge=(0,s.useState)(""),be=ge[0],me=ge[1],we=(0,s.useState)("all"),_e=we[0],Se=we[1],Ee=(0,s.useState)(null),Ae=Ee[0],ke=Ee[1],Me=(0,s.useState)({}),xe=Me[0],Ce=Me[1],Ie=(0,s.useState)(!1),Oe=Ie[0],Te=Ie[1],Pe=(0,s.useState)(null),Re=Pe[0],Ne=Pe[1],Le=(0,s.useState)(null),Ue=Le[0],De=Le[1],je=(0,s.useState)(null),Be=je[0],Fe=je[1],qe=(0,s.useState)(!1),ze=qe[0],Ke=qe[1],Ve=(0,s.useState)("all"),He=Ve[0],We=Ve[1],Ge=(0,s.useState)(!1),Qe=Ge[0],$e=Ge[1],Ye=(0,s.useState)(""),Je=Ye[0],Ze=Ye[1],Xe=(0,s.useState)(!1),et=Xe[0],tt=Xe[1],rt=(0,s.useState)(null),nt=rt[0],it=rt[1],ot=(0,s.useState)(!1),at=ot[0],st=ot[1],ut=(0,s.useState)({open:!1,item:null}),ct=ut[0],ft=ut[1],lt=(0,s.useState)(null),ht=lt[0],dt=lt[1],pt=(0,s.useState)({}),vt=pt[0],yt=pt[1],gt=(0,s.useState)({}),bt=gt[0],mt=gt[1],wt=(0,s.useState)(!1),_t=wt[0],St=wt[1],Et=(0,s.useState)(!1),At=Et[0],kt=Et[1],Mt=(0,s.useState)(!0),xt=Mt[0],Ct=Mt[1],It=(0,s.useState)({syncing:!1,time:""}),Ot=It[0],Tt=It[1],Pt=(0,s.useState)({}),Rt=Pt[0],Nt=Pt[1],Lt=(0,s.useState)({}),Ut=Lt[0],Dt=Lt[1],jt=(0,s.useState)({}),Bt=jt[0],Ft=jt[1],qt=(0,s.useState)(null),zt=qt[0],Kt=qt[1],Vt=(0,s.useState)(null),Ht=Vt[0],Wt=Vt[1],Gt=(0,s.useState)(null),Qt=Gt[0],$t=Gt[1],Yt=(0,s.useState)(!1),Jt=Yt[0],Zt=Yt[1],Xt=(0,s.useState)(!0),er=Xt[0],tr=Xt[1],rr=(0,s.useState)(!1),nr=rr[0],ir=rr[1];return(0,a.jsx)(u.Z.Provider,{value:{autoAddSamplesData:ht,setAutoAddSamplesData:dt,resetFilesData:at,setResetFilesData:st,ignoreNavData:ze,setIgnoreNavData:Ke,paths:xe,setPaths:Ce,tileSelection:he,setTileSelection:de,statusSelection:ve,setStatusSelection:ye,currentUser:be,setCurrentUser:me,timeFilter:_e,setTimeFilter:Se,items:n,setItems:i,centerData:c,setCenterData:f,rightData:h,setRightData:d,workspaceData:v,setWorkspaceData:y,removedUuids:Bt,setRemovedUuids:Ft,loading:b,setLoading:m,refetch:_,setRefetch:S,navBreadcrumbs:A,setNavBreadcrumbs:k,navInitialLoad:x,setNavInitialLoad:C,highlighted:O,setHighlighted:T,inventoryData:B,setInventoryData:F,equipmentData:R,setEquipmentData:N,equipmentCatalog:U,setEquipmentCatalog:D,jwtToken:z,setJwtToken:K,customerId:H,setCustomerId:W,loggedUserInfo:Q,setLoggedUserInfo:$,logOut:J,setLogOut:Z,sessionUser:ee,setSessionUser:te,showNotesTab:ne,setShowNotesTab:ie,labdrivedata:ae,setLabDriveData:se,showMobileRightSection:ce,setShowMobileRightSection:fe,cognitouser:Ae,setCogntitoUser:ke,openRightSection:Oe,setOpenRightSection:Te,selectedTemplate:Re,setSelectedTemplate:Ne,selectedTemplateSubtasks:Ue,setSelectedTemplateSubtasks:De,selectedTemplateTasks:Be,setSelectedTemplateTasks:Fe,scheduleItemType:He,setScheduleItemType:We,getMore:Qe,setGetMore:$e,scheduleParentWorkspace:Je,setScheduleParentWorkspace:Ze,openLeft:et,setOpenLeft:tt,debouncedLaneTitle:nt,setDebouncedLaneTitle:it,openTimerWarning:ct,setOpenTimerWarning:ft,cultureSyncStatus:Ot,setCultureSyncStatus:Tt,centerViewBag:vt,setCenterViewBag:yt,rightViewBag:bt,setRightViewBag:mt,rightAndCenterDataShare:Ut,setRightAndCenterDataShare:Dt,modeFullResources:_t,setModeFullResources:St,orgNames:Rt,setOrgNames:Nt,allTemplateSubTasks:zt,setAllTemplateSubTasks:Kt,allTemplateData:Ht,setAllTemplateData:Wt,showSaveWarning:At,setShowSaveWarning:kt,saveTable:xt,setSaveTable:Ct,reportData:Qt,setReportData:$t,materialAdded:Jt,setMaterialAdded:Zt,changesSavedTemplate:er,setChangesSavedTemplate:tr,showUnsavedChanges:nr,setShowUnsavedChanges:ir},children:t})},d={aws_appsync_graphqlEndpoint:"https://ytxpe6oqrjcvhjhq3vkonmtteu.appsync-api.us-east-1.amazonaws.com/graphql",aws_appsync_region:"us-east-1",aws_appsync_authenticationType:"AWS_LAMBDA"},p=(r(18698),r(56693),r(68465),r(54437),r(40080),r(57803),r(29815)),v=r(46829),y=r(71439),g=r(49247),b=r(9996),m=r.n(b),w=r(18446),_=r.n(w),S=r(10638);function E(e){var t=v.ApolloLink.from([(0,S.W9)({url:d.aws_appsync_graphqlEndpoint,region:d.aws_appsync_region,auth:{type:d.aws_appsync_authenticationType,token:e}}),(0,y.createHttpLink)({uri:d.aws_appsync_graphqlEndpoint})]);return new y.ApolloClient({ssrMode:!1,link:t,cache:new y.InMemoryCache({typePolicies:{Query:{fields:{listLeftNav:(0,g.xn)(),listActivities:{merge:!0}}}}})})}function A(e,t){var r=e.__APOLLO_STATE__,n=(0,s.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=E(arguments.length>1?arguments[1]:void 0);if(e){var r=t.extract(),n=m()(e,r,{arrayMerge:function(e,t){return(0,p.Z)(t).concat((0,p.Z)(e.filter((function(e){return t.every((function(t){return!_()(e,t)}))}))))}});t.cache.restore(n)}return l||(l=t),t}(r,t)}),[r,t]);return n}var k=r(85351),M=r(91647);r(26532),r(33600),r(77664),r(4715),r(71541),r(32049),r(33741),r(87042);function x(e,t,r,n,i,o,a){var s,u=document.createElement("div");u.style.display="flex",u.style.flexFlow="row wrap";try{s=JSON.parse(o)}catch(c){s=[]}return s&&Array.isArray(s)&&s.forEach((function(e,t){var r=document.createElement("div");r.innerHTML=e.label,r.style.backgroundColor="#8359FC",r.style.color="white",r.style.padding="0px 4px",r.style.margin="4px",r.style.borderRadius="4px",r.style.width="max-width",u.appendChild(r)})),t.innerHTML="",t.appendChild(u),t}M.default.configure(d);function C(e){var t=e.Component,u=e.pageProps,c=e.navigation,l=(0,s.useRef)(0);(0,s.useEffect)((function(){var e=function(){return l.current=0};document.addEventListener("mousemove",e),document.addEventListener("keydown",e),document.addEventListener("touchstart",e);var t=setInterval((function(){l.current+=1,l.current>1800&&window.location.reload()}),1e3);return function(){clearInterval(t),document.addEventListener("mousemove",e),document.addEventListener("keydown",e),document.addEventListener("touchstart",e)}}),[]),(0,s.useEffect)((function(){(0,n.Z)((function(){return(0,o.__generator)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([r.e(2095),r.e(8483)]).then(r.bind(r,48483))];case 1:return(0,e.sent().registerCellType)("connection",{renderer:x}),[2]}}))}))()}),[]);var d=A(u,localStorage.getItem("token")),p=(0,s.useState)(!1),y=p[0],g=p[1],b=(0,s.useState)(""),m=(b[0],b[1]),w=(0,s.useState)(""),_=(w[0],w[1]),S=(0,s.useState)(null),E=S[0],M=S[1],C=(0,s.useState)(null),I=(C[0],C[1]);return s.useEffect((function(){var e,t=document.querySelector("#jss-server-side");t&&t.parentElement.removeChild(t),m(localStorage.getItem("myPoolId")),_(localStorage.getItem("myClientId")),M(localStorage.getItem("customerId")),g(!0),(null===(e=localStorage.getItem("email"))||void 0===e?void 0:e.indexOf("scispot.io"))<0==1?I(!0):I(null)})),(0,s.useEffect)((function(){var e;if("object"==typeof localStorage&&((null===(e=localStorage.getItem("email"))||void 0===e?void 0:e.includes("@scispot.io"))||"app.scispot.io"!=window.location.hostname&&"labsheets.scispot.io"!=window.location.hostname||k.hotjar.initialize(2462150,6),localStorage.getItem("email")&&localStorage.getItem("location"))){r(11987);var t=localStorage.getItem("location");localStorage.removeItem("location"),window.location.href=t}}),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(f(),{children:["0fcrirb5t"!==E&&(0,a.jsx)("script",{src:"https://fast.appcues.com/93630.js"}),(0,a.jsx)("title",{children:"Scispot"}),(0,a.jsx)("link",{rel:"icon",href:"/Updated_Atom_Favicon.png"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),(0,a.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Inter&display=swap",rel:"stylesheet"}),(0,a.jsx)("link",{rel:"stylesheet",href:"https://jsuites.net/v4/jsuites.css",type:"text/css"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:!0}),(0,a.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=DM+Sans:wght@700&display=swap",rel:"stylesheet"})]}),y&&(0,a.jsx)(v.ApolloProvider,{client:d,children:(0,a.jsx)(h,{navigation:c,children:(0,a.jsx)(t,(0,i.Z)({},u))})})]})}C.getInitialProps=function(){var e=(0,n.Z)((function(e){var t,r,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return t=e.Component,r=e.ctx,n={},t.getInitialProps?[4,t.getInitialProps(r)]:[3,2];case 1:n=i.sent(),i.label=2;case 2:return n.query=r.query,[2,{pageProps:n}]}}))}));return function(t){return e.apply(this,arguments)}}();var I=C},42474:function(e,t,r){var n=r(48764).Buffer,i=r(83454);!function(){var t={7160:function(e,t,r){var n=t;n.bignum=r(711),n.define=r(495).define,n.base=r(853),n.constants=r(7335),n.decoders=r(6701),n.encoders=r(3418)},495:function(e,t,r){var n=r(7160),i=r(3782);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r(6144).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},6483:function(e,t,r){var n=r(3782),i=r(853).Reporter,o=r(4300).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},853:function(e,t,r){var n=t;n.Reporter=r(1293).b,n.DecoderBuffer=r(6483).C,n.EncoderBuffer=r(6483).R,n.Node=r(9374)},9374:function(e,t,r){var n=r(853).Reporter,i=r(853).EncoderBuffer,o=r(853).DecoderBuffer,a=r(3523),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(e,u,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(c):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1293:function(e,t,r){var n=r(3782);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},9791:function(e,t,r){var n=r(7335);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},7335:function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(9791)},2259:function(e,t,r){var n=r(3782),i=r(7160),o=i.base,a=i.bignum,s=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6)}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,a.Node),c.prototype._encodeComposite=function(e,t,r,n){var o,a=l(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var s=1,u=n.length;u>=256;u>>=8)s++;(o=new i(2+s))[0]=a,o[1]=128|s;u=1+s;for(var c=n.length;c>0;u--,c>>=8)o[u]=255&c;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=f[e],d=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?v+r:c[h-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],g=8191&y,b=y>>>13,m=0|a[3],w=8191&m,_=m>>>13,S=0|a[4],E=8191&S,A=S>>>13,k=0|a[5],M=8191&k,x=k>>>13,C=0|a[6],I=8191&C,O=C>>>13,T=0|a[7],P=8191&T,R=T>>>13,N=0|a[8],L=8191&N,U=N>>>13,D=0|a[9],j=8191&D,B=D>>>13,F=0|s[0],q=8191&F,z=F>>>13,K=0|s[1],V=8191&K,H=K>>>13,W=0|s[2],G=8191&W,Q=W>>>13,$=0|s[3],Y=8191&$,J=$>>>13,Z=0|s[4],X=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,q)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(v,q)|0,o=Math.imul(v,z);var ge=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(b,q)|0,o=Math.imul(b,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,H)|0;var be=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0;var me=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,J)|0;var we=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,z))+Math.imul(x,q)|0,o=Math.imul(x,z),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0;var _e=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ae=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,H)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var ke=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,H))+Math.imul(B,V)|0,o=Math.imul(B,H),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,Q))+Math.imul(B,G)|0,o=Math.imul(B,Q),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,J))+Math.imul(B,Y)|0,o=Math.imul(B,J),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(U,X)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0;var Ce=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(B,X)|0,o=Math.imul(B,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,he)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(B,re)|0,o=Math.imul(B,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ve)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(B,oe)|0,o=Math.imul(B,ae),n=n+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(B,ue)|0,o=Math.imul(B,ce),n=n+Math.imul(L,le)|0,i=(i=i+Math.imul(L,he)|0)+Math.imul(U,le)|0,o=o+Math.imul(U,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(B,le)|0,o=Math.imul(B,he);var Re=(c+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ve)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(B,pe)|0))<<13)|0;return c=((o=Math.imul(B,ve))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=me,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=Ae,u[9]=ke,u[10]=Me,u[11]=xe,u[12]=Ce,u[13]=Ie,u[14]=Oe,u[15]=Te,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,r.length++),r};function p(e,t,r){return(new v).mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(d=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(b,g),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new m;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},1670:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=r(4300).Buffer}catch(e){}function s(e,t,r){for(var i=0,o=Math.min(e.length,r),a=0,s=t;s=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,a|=u}return n(!(240&a),"Invalid character in "+e),i}function u(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a"}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f:o.prototype.inspect=f;var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modrn(f).toString(e);r=(p=p.idivn(f)).isZero()?v+r:l[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],g=8191&y,b=y>>>13,m=0|a[3],w=8191&m,_=m>>>13,S=0|a[4],E=8191&S,A=S>>>13,k=0|a[5],M=8191&k,x=k>>>13,C=0|a[6],I=8191&C,O=C>>>13,T=0|a[7],P=8191&T,R=T>>>13,N=0|a[8],L=8191&N,U=N>>>13,D=0|a[9],j=8191&D,B=D>>>13,F=0|s[0],q=8191&F,z=F>>>13,K=0|s[1],V=8191&K,H=K>>>13,W=0|s[2],G=8191&W,Q=W>>>13,$=0|s[3],Y=8191&$,J=$>>>13,Z=0|s[4],X=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,q)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(v,q)|0,o=Math.imul(v,z);var ge=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,H)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(b,q)|0,o=Math.imul(b,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,H)|0;var be=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0;var me=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,J)|0;var we=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,z))+Math.imul(x,q)|0,o=Math.imul(x,z),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0;var _e=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Ae=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,H)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var ke=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,H))+Math.imul(B,V)|0,o=Math.imul(B,H),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,Q))+Math.imul(B,G)|0,o=Math.imul(B,Q),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,Y),i=(i=Math.imul(j,J))+Math.imul(B,Y)|0,o=Math.imul(B,J),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(U,X)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0;var Ce=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(B,X)|0,o=Math.imul(B,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,he)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(B,re)|0,o=Math.imul(B,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ve)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(B,oe)|0,o=Math.imul(B,ae),n=n+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Te=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(B,ue)|0,o=Math.imul(B,ce),n=n+Math.imul(L,le)|0,i=(i=i+Math.imul(L,he)|0)+Math.imul(U,le)|0,o=o+Math.imul(U,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(B,le)|0,o=Math.imul(B,he);var Re=(c+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ve)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(B,pe)|0))<<13)|0;return c=((o=Math.imul(B,ve))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=me,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=Ae,u[9]=ke,u[10]=Me,u[11]=xe,u[12]=Ce,u[13]=Ie,u[14]=Oe,u[15]=Te,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(v=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return m[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,k),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3500:function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^f[p>>>16&255]^l[v>>>8&255]^h[255&y]^t[g++],a=c[p>>>24]^f[v>>>16&255]^l[y>>>8&255]^h[255&d]^t[g++],s=c[v>>>24]^f[y>>>16&255]^l[d>>>8&255]^h[255&p]^t[g++],u=c[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&v]^t[g++],d=o,p=a,v=s,y=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[v>>>8&255]<<8|n[255&y])^t[g++],a=(n[p>>>24]<<24|n[v>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[g++],s=(n[v>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[g++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&v])^t[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=e[a],l=e[f],h=e[l],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^e[e[e[h^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},6624:function(e,t,r){var n=r(1387),i=r(5055).Buffer,o=r(1043),a=r(3782),s=r(7225),u=r(4734),c=r(598);function f(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var l=i.from(e._finID);return c(l),l}function l(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new s(c),r=f(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},2:function(e,t,r){var n=r(6370),i=r(6624),o=r(5055).Buffer,a=r(126),s=r(1043),u=r(1387),c=r(8368);function f(e,t,r){s.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(3782)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=r[0]^225<<24)}this.state=o(n)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},598:function(e){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},9825:function(e,t,r){var n=r(4734);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},321:function(e,t,r){var n=r(5055).Buffer,i=r(4734);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},3147:function(e,t,r){var n=r(5055).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new i(o(t));return r}e.exports=a,a.getr=s},9276:function(e,t,r){e.exports=r(2908)},4078:function(e,t,r){var n=r(5055).Buffer,i=r(9739),o=r(3726),a=r(3782),s=r(9807),u=r(4013),c=r(2908);function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new f(e)}function d(e){return new l(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},l.prototype.verify=function(e,t,r){"string"===typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},9807:function(e,t,r){var n=r(5055).Buffer,i=r(4873),o=r(7166),a=r(949).ec,s=r(1670),u=r(9902),c=r(9267);function f(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new a(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}function l(e,t,r){for(var n,i=t.params.priv_key,o=t.params.p,a=t.params.q,u=t.params.g,c=new s(0),f=p(e,a).mod(a),l=!1,g=d(i,a,e,r);!1===l;)c=y(u,n=v(a,g,r),o,a),0===(l=n.invm(a).imul(f.add(i.mul(c))).mod(a)).cmpn(0)&&(l=!1,c=new s(0));return h(c,l)}function h(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}function d(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function v(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length=t)throw new Error("invalid sig")}e.exports=function(e,t,r,o,s){var f=a(r);if("ec"===f.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return u(e,t,f)}if("dsa"===f.type){if("dsa"!==o)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,u=r.data.pub_key,f=a.signature.decode(e,"der"),l=f.s,h=f.r;c(l,o),c(h,o);var d=i.mont(n),p=l.invm(o);return 0===s.toRed(d).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(e,t,f)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");t=n.concat([s,t]);for(var l=f.modulus.byteLength(),h=[1],d=0;t.length+h.length+2r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengths?t=e(t):t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,n,i)}},6159:function(e,t,r){"use strict";var n=r(3523),i=r(3782),o=r(9876),a=r(1016);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},5334:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(v(p=r.shrn(1))&&v(r)&&y(p)&&y(r)&&a.test(p)&&a.test(r))return r}}},949:function(e,t,r){"use strict";var n=t;n.version=r(2531).i8,n.utils=r(4401),n.rand=r(3500),n.curve=r(9359),n.curves=r(6226),n.ec=r(4088),n.eddsa=r(8511)},2727:function(e,t,r){"use strict";var n=r(711),i=r(4401),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=u;t--)c=(c<<1)+n[t];a.push(c)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(u=0;u=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var v=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(v[1]=t[d].add(t[p]),v[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(v[1]=t[d].toJ().mixedAdd(t[p]),v[2]=t[d].add(t[p].neg())):(v[1]=t[d].toJ().mixedAdd(t[p]),v[2]=t[d].toJ().mixedAdd(t[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[d],r[p]);f=Math.max(g[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var b=0;b=0;l--){for(var E=0;l>=0;){var A=!0;for(b=0;b=0&&E++,_=_.dblp(E),l<0)break;for(b=0;b0?k=u[b][M-1>>1]:M<0&&(k=u[b][-M-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);e=n.redSub(i).redISub(o).redMul(u),t=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(u),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},9359:function(e,t,r){"use strict";var n=t;n.base=r(2727),n.short=r(4720),n.mont=r(6653),n.edwards=r(2705)},6653:function(e,t,r){"use strict";var n=r(711),i=r(3782),o=r(2727),a=r(4401);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},4720:function(e,t,r){"use strict";var n=r(4401),i=r(711),o=r(3782),a=r(2727),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i(1),v=new i(0),y=new i(0),g=new i(1),b=0;0!==h.cmpn(0);){var m=d.div(h);c=d.sub(m.mul(h)),f=y.sub(m.mul(p));var w=g.sub(m.mul(v));if(!n&&c.cmp(l)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2===++b)break;u=c,d=h,h=c,y=p,p=f,g=v,v=w}a=c.neg(),s=f;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6226:function(e,t,r){"use strict";var n,i=t,o=r(7028),a=r(9359),s=r(4401).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(9702)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},4088:function(e,t,r){"use strict";var n=r(711),i=r(4910),o=r(4401),a=r(6226),s=r(3500),u=o.assert,c=r(4724),f=r(7526);function l(e){if(!(this instanceof l))return new l(e);"string"===typeof e&&(u(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new c(this,e)},l.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var v=p.getX(),y=v.umod(this.n);if(0!==y.cmpn(0)){var g=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==v.cmp(y)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),b^=1),new f({r:y,s:g,recoveryParam:b})}}}}}},l.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),v=c.mul(d).umod(o);return this.g.mulAdd(p,s,v)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},4724:function(e,t,r){"use strict";var n=r(711),i=r(4401).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},7526:function(e,t,r){"use strict";var n=r(711),i=r(4401),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var l=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},8511:function(e,t,r){"use strict";var n=r(7028),i=r(6226),o=r(4401),a=o.assert,s=o.parseBytes,u=r(9917),c=r(9314);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s,u=e.andln(3)+n&3,c=t.andln(3)+i&3;if(3===u&&(u=-1),3===c&&(c=-1),0===(1&u))o=0;else o=3!==(s=e.andln(7)+n&7)&&5!==s||2!==c?u:-u;if(r[0].push(o),0===(1&c))a=0;else a=3!==(s=t.andln(7)+i&7)&&5!==s||2!==u?c:-c;r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},8368:function(e,t,r){var n=r(5055).Buffer,i=r(3533);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l0){var d=u.length-o,p=Math.min(o,c.length-l);c.copy(u,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},9029:function(e,t,r){"use strict";var n=r(5055).Buffer,i=r(3726).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(3782)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},7028:function(e,t,r){var n=t;n.utils=r(263),n.common=r(1330),n.sha=r(301),n.ripemd=r(3079),n.hmac=r(3092),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},1330:function(e,t,r){"use strict";var n=r(263),i=r(3523);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},263:function(e,t,r){"use strict";var n=r(3523),i=r(3782);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},4910:function(e,t,r){"use strict";var n=r(7028),i=r(6545),o=r(3523);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=f(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},1354:function(e,t,r){var n=r(711),i=r(3500);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var l=this._randrange(new n(2),s);r&&r(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d0;t--){var f=this._randrange(new n(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},8687:function(e,t,r){"use strict";var n=r(7160);t.certificate=r(8782);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=l;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8782:function(e,t,r){"use strict";var n=r(7160),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},6501:function(e,t,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=r(8368),s=r(6594),u=r(5055).Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(n);if(f){var l="aes"+f[1],h=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,h.slice(0,8),parseInt(f[1],10)).key,v=[],y=s.createDecipheriv(l,p,h);v.push(y.update(d)),v.push(y.final()),r=u.concat(v)}else{var g=c.match(o);r=new u(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},9902:function(e,t,r){var n=r(8687),i=r(2510),o=r(6501),a=r(6594),s=r(4978),u=r(5055).Buffer;function c(e){var t;"object"!==typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=u.from(e));var r,i,a=o(e,t),s=a.tag,c=a.data;switch(s){case"CERTIFICATE":i=n.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(i||(i=n.PublicKey.decode(c,"der")),r=i.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=n.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"ENCRYPTED PRIVATE KEY":c=f(c=n.EncryptedPrivateKey.decode(c,"der"),t);case"PRIVATE KEY":switch(r=(i=n.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:n.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=n.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=n.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+s)}}function f(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=s.pbkdf2Sync(t,r,n,l,"sha1"),d=a.createDecipheriv(o,h,c),p=[];return p.push(d.update(f)),p.push(d.final()),u.concat(p)}e.exports=c,c.signature=n.signature},4978:function(e,t,r){var n=r(6113),i=r(5349),o=r(7007),a=r(5407);n.pbkdf2Sync&&-1!==n.pbkdf2Sync.toString().indexOf("keylen, digest")?(t.pbkdf2Sync=function(e,t,r,s,u){return i(r,s),e=a(e,o,"Password"),t=a(t,o,"Salt"),u=u||"sha1",n.pbkdf2Sync(e,t,r,s,u)},t.pbkdf2=function(e,t,r,s,u,c){if(i(r,s),e=a(e,o,"Password"),t=a(t,o,"Salt"),"function"===typeof u&&(c=u,u="sha1"),"function"!==typeof c)throw new Error("No callback provided to pbkdf2");return n.pbkdf2(e,t,r,s,u,c)}):(t.pbkdf2Sync=r(2127),t.pbkdf2=r(9601))},9601:function(e,t,n){var o,a=n(5055).Buffer,s=n(5349),u=n(7007),c=n(2127),f=n(5407),l=r.g.crypto&&r.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function p(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=v(o=o||a.alloc(8),o,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}function v(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return a.from(e)}))}e.exports=function(e,t,n,o,a,l){"function"===typeof a&&(l=a,a=void 0);var d=h[(a=a||"sha1").toLowerCase()];if(!d||"function"!==typeof r.g.Promise)return i.nextTick((function(){var r;try{r=c(e,t,n,o,a)}catch(e){return l(e)}l(null,r)}));if(s(n,o),e=f(e,u,"Password"),t=f(t,u,"Salt"),"function"!==typeof l)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(p(d).then((function(r){return r?v(e,t,n,o,d):c(e,t,n,o,a)})),l)}},7007:function(e){var t;t="utf-8",e.exports=t},5349:function(e){var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!==r)throw new TypeError("Bad key length")}},2127:function(e,t,r){var n={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},i=r(4873),o=r(5055).Buffer,a=r(5349),s=r(7007),u=r(5407);e.exports=function(e,t,r,c,f){a(r,c),e=u(e,s,"Password"),t=u(t,s,"Salt"),f=f||"sha1";var l=o.allocUnsafe(c),h=o.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var d=0,p=n[f],v=Math.ceil(c/p),y=1;y<=v;y++){h.writeUInt32BE(y,t.length);for(var g=i(f,e).update(h).digest(),b=g,m=1;mh||new a(t).cmp(u.modulus)>=0)throw new Error("decryption error");o=r?c(new a(t),u):s(t,u);var d=f.alloc(h-o.length);if(o=f.concat([d,o],h),4===i)return l(u,o);if(1===i)return function(e,t,r){var n=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,o,r);if(3===i)return o;throw new Error("unknown padding")}},3995:function(e,t,r){var n=r(9902),i=r(7223),o=r(9739),a=r(5520),s=r(6386),u=r(711),c=r(1607),f=r(7166),l=r(5055).Buffer;function h(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,h=2*f;if(n>r-h-2)throw new Error("message too long");var d=l.alloc(r-n-h-2),p=r-f-1,v=i(f),y=s(l.concat([c,d,l.alloc(1,1),t],p),a(v,p)),g=s(v,a(y,f));return new u(l.concat([l.alloc(1),g,y],r))}function d(e){for(var t,r=l.allocUnsafe(e),n=0,o=i(2*e),a=0;no-11)throw new Error("message too long");n=r?l.alloc(o-i-3,255):d(o-i-3);return new u(l.concat([l.from([0,r?1:2]),n,l.alloc(1),t],o))}(a,t,r);else{if(3!==i)throw new Error("unknown padding");if((o=new u(t)).cmp(a.modulus)>=0)throw new Error("data too long for modulus")}return r?f(o,a):c(o,a)}},1607:function(e,t,r){var n=r(711),i=r(5055).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},6386:function(e){e.exports=function(e,t){for(var r=e.length,n=-1;++na)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(e);if(e>0)if(e>o)for(var n=0;nf||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,t,r,n){var o=e.buffer,a=new Uint8Array(o,t,r);return c.getRandomValues(a),n?void i.nextTick((function(){n(null,e)})):e}c&&c.getRandomValues?(t.randomFill=function(e,t,n,i){if(!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof t)i=t,t=0,n=e.length;else if("function"===typeof n)i=n,n=e.length-t;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return l(t,e.length),h(n,t,e.length),d(e,t,n,i)},t.randomFillSync=function(e,t,n){"undefined"===typeof t&&(t=0);if(!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(t,e.length),void 0===n&&(n=e.length-t);return h(n,t,e.length),d(e,t,n)}):(t.randomFill=o,t.randomFillSync=o)},4646:function(e){"use strict";const t={};function r(e,r,n){function i(e,t,n){return"string"===typeof r?r:r(e,t,n)}n||(n=Error);class o extends n{constructor(e,t,r){super(i(e,t,r))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i,o;if("string"===typeof t&&function(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o=`The ${e} ${i} ${n(t,"type")}`;else{const r=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";o=`The "${e}" ${r} ${i} ${n(t,"type")}`}return o+=". Received type "+typeof r,o}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},2403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(1709),a=r(7337);r(3782)(f,o);for(var s=n(a.prototype),u=0;u0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?E(e,new S):C(e,a,t,!0);else if(a.ended)E(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?C(e,a,t,!1):R(e,a)):C(e,a,t,!1)}else n||(a.reading=!1,R(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(P,e))}function P(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(q,t,e))}function q(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):T(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){E(this,new _("_read()"))},M.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:g;function s(e,t){f("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,h())}function u(){f("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var l=!1;function h(){f("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function d(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==z(n.pipes,e))&&!l&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){f("onerror",t),g(),e.removeListener("error",p),0===a(e,"error")&&E(e,t)}function v(){e.removeListener("finish",y),g()}function y(){f("onfinish"),e.removeListener("close",v),g()}function g(){f("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",v),e.once("finish",y),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(U,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),r},M.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(L,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(e,t){t(e)}},6871:function(e,t,r){"use strict";var n;function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(9698),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function v(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function y(e){i.nextTick(v,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(p(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},o(n,Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(b,(o(t={},d,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),e.on("readable",y.bind(null,r)),r}},4379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)c(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},6776:function(e,t,r){"use strict";var n=r(4646).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},4678:function(e,t,r){e.exports=r(2781)},3726:function(e,t,r){var n=r(2781);"disable"===i.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(1709)).Stream=n||t,t.Readable=t,t.Writable=r(7337),t.Duplex=r(2403),t.Transform=r(1170),t.PassThrough=r(7889),t.finished=r(9698),t.pipeline=r(8442))},3225:function(e,t,r){"use strict";var n=r(4300).Buffer,i=r(3782),o=r(9029),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function v(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,E=0|this._d,A=0|this._e,k=0;k<80;k+=1){var M,x;k<16?(M=v(r,n,i,o,d,e[s[k]],l[0],c[k]),x=m(w,_,S,E,A,e[u[k]],h[0],f[k])):k<32?(M=y(r,n,i,o,d,e[s[k]],l[1],c[k]),x=b(w,_,S,E,A,e[u[k]],h[1],f[k])):k<48?(M=g(r,n,i,o,d,e[s[k]],l[2],c[k]),x=g(w,_,S,E,A,e[u[k]],h[2],f[k])):k<64?(M=b(r,n,i,o,d,e[s[k]],l[3],c[k]),x=y(w,_,S,E,A,e[u[k]],h[3],f[k])):(M=m(r,n,i,o,d,e[s[k]],l[4],c[k]),x=v(w,_,S,E,A,e[u[k]],h[4],f[k])),r=d,d=o,o=p(i,10),i=n,n=M,w=A,A=E,E=p(S,10),S=_,_=x}var C=this._b+i+E|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=C},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},5055:function(e,t,r){var n=r(4300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2858:function(e,t,r){var n=r(5055).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4371:function(e,t,r){var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4018),n.sha1=r(4179),n.sha224=r(532),n.sha256=r(1843),n.sha384=r(7455),n.sha512=r(9934)},4018:function(e,t,r){var n=r(3782),i=r(2858),o=r(5055).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var h=0;h<80;++h){var d=~~(h/20),p=c(r)+l(d,n,i,o)+s+t[h]+a[d]|0;s=o,o=i,i=f(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},4179:function(e,t,r){var n=r(3782),i=r(2858),o=r(5055).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<1|e>>>31}function f(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=c(t[u-3]^t[u-8]^t[u-14]^t[u-16]);for(var d=0;d<80;++d){var p=~~(d/20),v=f(r)+h(p,n,i,o)+s+t[d]+a[p]|0;s=o,o=i,i=l(n),n=r,r=v}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},532:function(e,t,r){var n=r(3782),i=r(1843),o=r(2858),a=r(5055).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},1843:function(e,t,r){var n=r(3782),i=r(2858),o=r(5055).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0|this._f,v=0|this._g,y=0|this._h,g=0;g<16;++g)t[g]=e.readInt32BE(4*g);for(;g<64;++g)t[g]=p(t[g-2])+t[g-7]+d(t[g-15])+t[g-16]|0;for(var b=0;b<64;++b){var m=y+h(s)+c(s,u,v)+a[b]+t[b]|0,w=l(r)+f(r,n,i)|0;y=v,v=u,u=s,s=o+m|0,o=i,i=n,n=r,r=m+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},7455:function(e,t,r){var n=r(3782),i=r(9934),o=r(2858),a=r(5055).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},9934:function(e,t,r){var n=r(3782),i=r(2858),o=r(5055).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,m=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,E=0|this._dl,A=0|this._el,k=0|this._fl,M=0|this._gl,x=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var I=t[C-30],O=t[C-30+1],T=d(I,O),P=p(O,I),R=v(I=t[C-4],O=t[C-4+1]),N=y(O,I),L=t[C-14],U=t[C-14+1],D=t[C-32],j=t[C-32+1],B=P+U|0,F=T+L+g(B,P)|0;F=(F=F+R+g(B=B+N|0,N)|0)+D+g(B=B+j|0,j)|0,t[C]=F,t[C+1]=B}for(var q=0;q<160;q+=2){F=t[q],B=t[q+1];var z=f(r,n,i),K=f(w,_,S),V=l(r,w),H=l(w,r),W=h(s,A),G=h(A,s),Q=a[q],$=a[q+1],Y=c(s,u,b),J=c(A,k,M),Z=x+G|0,X=m+W+g(Z,x)|0;X=(X=(X=X+Y+g(Z=Z+J|0,J)|0)+Q+g(Z=Z+$|0,$)|0)+F+g(Z=Z+B|0,B)|0;var ee=H+K|0,te=V+z+g(ee,H)|0;m=b,x=M,b=u,M=k,u=s,k=A,s=o+X+g(A=E+Z|0,E)|0,o=i,E=S,i=n,S=_,n=r,_=w,r=X+te+g(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+k|0,this._gl=this._gl+M|0,this._hl=this._hl+x|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,_)|0,this._ch=this._ch+i+g(this._cl,S)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,k)|0,this._gh=this._gh+b+g(this._gl,M)|0,this._hh=this._hh+m+g(this._hl,x)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},3704:function(e,t,r){"use strict";var n=r(5055).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},6769:function(e){function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}}},4300:function(e){"use strict";e.exports=r(48764)},6113:function(e){"use strict";e.exports=r(42474)},2361:function(e){"use strict";e.exports=r(17187)},2781:function(e){"use strict";e.exports=r(79681)},1576:function(e){"use strict";e.exports=r(32553)},3837:function(e){"use strict";e.exports=r(79720)},6144:function(e){"use strict";e.exports=r(51951)},5866:function(e){"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},2908:function(e){"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},9267:function(e){"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},7992:function(e){"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},2531:function(e){"use strict";e.exports={i8:"6.5.3"}},2510:function(e){"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={id:e,loaded:!1,exports:{}},i=!0;try{t[e].call(n.exports,n,n.exports,a),i=!1}finally{i&&delete o[e]}return n.loaded=!0,n.exports}a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},a.ab="//";var s={};!function(){"use strict";var e=s;e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=a(7223),e.createHash=e.Hash=a(9739),e.createHmac=e.Hmac=a(4873);var t=a(9276),r=Object.keys(t),n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);e.getHashes=function(){return n};var i=a(4978);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync;var o=a(8996);e.Cipher=o.Cipher,e.createCipher=o.createCipher,e.Cipheriv=o.Cipheriv,e.createCipheriv=o.createCipheriv,e.Decipher=o.Decipher,e.createDecipher=o.createDecipher,e.Decipheriv=o.Decipheriv,e.createDecipheriv=o.createDecipheriv,e.getCiphers=o.getCiphers,e.listCiphers=o.listCiphers;var u=a(6587);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=a(4078);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=a(9942);var f=a(9783);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var l=a(6445);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}(),e.exports=s}()},57803:function(){},40080:function(){},4715:function(){},26532:function(){},33600:function(){},87042:function(){},56693:function(){},68465:function(){},71541:function(){},32049:function(){},18698:function(){},77664:function(){},33741:function(){},54437:function(){},40906:function(){},11987:function(e,t,r){!function(){var t={477:function(e){"use strict";e.exports=r(17673)}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab="//";var o={};!function(){var e,t=o,r=(e=i(477))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function a(e){"string"==typeof e&&(e=m(e));var t=function(e,t,r){var n=e.auth,i=e.hostname,o=e.protocol||"",a=e.pathname||"",s=e.hash||"",u=e.query||"",c=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",e.host?c=n+e.host:i&&(c=n+(~i.indexOf(":")?"["+i+"]":i),e.port&&(c+=":"+e.port)),u&&"object"==typeof u&&(u=t.encode(u));var f=e.search||u&&"?"+u||"";return o&&":"!==o.substr(-1)&&(o+=":"),e.slashes||(!o||r.test(o))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),f&&"?"!==f[0]&&(f="?"+f),{protocol:o,host:c,pathname:a=a.replace(/[?#]/g,encodeURIComponent),search:f=f.replace("#","%23"),hash:s}}(e,r,n);return""+t.protocol+t.host+t.pathname+t.search+t.hash}var s="http://",u="w.w",c=s+u,f=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,l=/https?|ftp|gopher|file/;function h(e,t){var r="string"==typeof e?m(e):e;e="object"==typeof e?a(e):e;var n=m(t),i="";r.protocol&&!r.slashes&&(i=r.protocol,e=e.replace(r.protocol,""),i+="/"===t[0]||"/"===e[0]?"/":""),i&&n.protocol&&(i="",n.slashes||(i=n.protocol,t=t.replace(n.protocol,"")));var o=e.match(f);o&&!n.protocol&&(e=e.substr((i=o[1]+(o[2]||"")).length),/^\/\/[^/]/.test(t)&&(i=i.slice(0,-1)));var u=new URL(e,c+"/"),h=new URL(t,u).toString().replace(c,""),d=n.protocol||r.protocol;return d+=r.slashes||n.slashes?"//":"",!i&&d?h=h.replace(s,d):i&&(h=h.replace(s,"")),l.test(h)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==h.slice(-1)||(h=h.slice(0,-1)),i&&(h=i+("/"===h[0]?h.substr(1):h)),h}function d(){}d.prototype.parse=m,d.prototype.format=a,d.prototype.resolve=h,d.prototype.resolveObject=h;var p=/^https?|ftp|gopher|file/,v=/^(.*?)([#?].*)/,y=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,g=/^([a-z0-9.+-]*:)?\/\/\/*/i,b=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function m(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),e&&"object"==typeof e&&e instanceof d)return e;var i=(e=e.trim()).match(v);e=i?i[1].replace(/\\/g,"/")+i[2]:e.replace(/\\/g,"/"),b.test(e)&&"/"!==e.slice(-1)&&(e+="/");var o=!/(^javascript)/.test(e)&&e.match(y),s=g.test(e),f="";o&&(p.test(o[1])||(f=o[1].toLowerCase(),e=""+o[2]+o[3]),o[2]||(s=!1,p.test(o[1])?(f=o[1],e=""+o[3]):e="//"+o[3]),3!==o[2].length&&1!==o[2].length||(f=o[1],e="/"+o[3]));var l,h=(i?i[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),m=h&&h[1],w=new d,_="",S="";try{l=new URL(e)}catch(t){_=t,f||n||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(S="/",e=e.substr(1));try{l=new URL(e,c)}catch(e){return w.protocol=f,w.href=f,w}}w.slashes=s&&!S,w.host=l.host===u?"":l.host,w.hostname=l.hostname===u?"":l.hostname.replace(/(\[|\])/g,""),w.protocol=_?f||null:l.protocol,w.search=l.search.replace(/\\/g,"%5C"),w.hash=l.hash.replace(/\\/g,"%5C");var E=e.split("#");!w.search&&~E[0].indexOf("?")&&(w.search="?"),w.hash||""!==E[1]||(w.hash="#"),w.query=t?r.decode(l.search.substr(1)):w.search.substr(1),w.pathname=S+(o?function(e){return e.replace(/['^|`]/g,(function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()})).replace(/((?:%[0-9A-F]{2})+)/g,(function(e,t){try{return decodeURIComponent(t).split("").map((function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()})).join("")}catch(e){return t}}))}(l.pathname):l.pathname),"about:"===w.protocol&&"blank"===w.pathname&&(w.protocol="",w.pathname=""),_&&"/"!==e[0]&&(w.pathname=w.pathname.substr(1)),f&&!p.test(f)&&"/"!==e.slice(-1)&&"/"===w.pathname&&(w.pathname=""),w.path=w.pathname+w.search,w.auth=[l.username,l.password].map(decodeURIComponent).filter(Boolean).join(":"),w.port=l.port,m&&!w.host.endsWith(m)&&(w.host+=m,w.port=m.slice(1)),w.href=S?""+w.pathname+w.search+w.hash:a(w);var A=/^(file)/.test(w.href)?["host","hostname"]:[];return Object.keys(w).forEach((function(e){~A.indexOf(e)||(w[e]=w[e]||null)})),w}t.parse=m,t.format=a,t.resolve=h,t.resolveObject=function(e,t){return m(h(e,t))},t.Url=d}(),e.exports=o}()},77663:function(e){!function(){var t={229:function(e){var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,f=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=a(l);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var r=1;rString(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i,o;if("string"===typeof t&&function(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o=`The ${e} ${i} ${n(t,"type")}`;else{const r=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";o=`The "${e}" ${r} ${i} ${n(t,"type")}`}return o+=". Received type "+typeof r,o}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(709),a=r(337);r(782)(f,o);for(var s=i(a.prototype),u=0;u0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?E(e,new S):C(e,a,t,!0);else if(a.ended)E(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?C(e,a,t,!1):R(e,a)):C(e,a,t,!1)}else n||(a.reading=!1,R(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(P,e))}function P(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(q,t,e))}function q(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):T(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){E(this,new _("_read()"))},M.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:g;function s(e,t){f("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,h())}function u(){f("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var l=!1;function h(){f("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",d),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function d(t){f("ondata");var n=e.write(t);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==z(i.pipes,e))&&!l&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(t){f("onerror",t),g(),e.removeListener("error",p),0===a(e,"error")&&E(e,t)}function v(){e.removeListener("finish",y),g()}function y(){f("onfinish"),e.removeListener("close",v),g()}function g(){f("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",v),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(U,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(L,this),r},M.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(L,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(D,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,r){var i=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";var i;function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(698),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function v(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function y(e){n.nextTick(v,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(p(void 0,!0)):t[h](r,n)}),n)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},o(i,Symbol.asyncIterator,(function(){return this})),o(i,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),i),g);e.exports=function(e){var t,r=Object.create(b,(o(t={},d,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),e.on("readable",y.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)c(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"===typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}}},300:function(e){"use strict";e.exports=r(48764)},361:function(e){"use strict";e.exports=r(17187)},781:function(e){"use strict";e.exports=r(17187).EventEmitter},837:function(e){"use strict";e.exports=r(79720)}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},a=!0;try{t[e](n,n.exports,o),a=!1}finally{a&&delete i[e]}return n.exports}o.ab="//";var a=o(173);e.exports=a}()},79720:function(e,t,r){var n=r(48764).Buffer,i=r(83454);!function(){var t={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(void 0===e||null===e)throw new TypeError;if("function"!=typeof r)throw new TypeError;for(var i=[],o=0;o-1?i(r):r}},139:function(e,t,r){"use strict";var n=r(174),i=r(838),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);if(u&&c){var r=u(t,"length");r.configurable&&c(t,"length",{value:1+f(0,e.length-(arguments.length-1))})}return t};var l=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');var r=M(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),s=o.name,c=o.value,f=!1,l=o.alias;l&&(n=l[0],_(r,w([0,1],l)));for(var h=1,d=!0;h=r.length){var b=u(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=m(c,p),c=c[p];d&&!f&&(v[s]=c)}}return c}},942:function(e,t,r){"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},773:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},832:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},101:function(e,t,r){"use strict";var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return!(t&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"===typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),u=n(942)()&&"symbol"===typeof Symbol.toStringTag,c=o(),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!d&&function(e){var t=!1;return i(h,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},369:function(e){e.exports=function(e){return e instanceof n}},584:function(e,t,r){"use strict";var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var u="undefined"!==typeof BigInt,c="undefined"!==typeof Symbol,f=s(Object.prototype.toString),l=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(c)var v=s(Symbol.prototype.valueOf);function y(e,t){if("object"!==typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===f(e)}function b(e){return"[object Set]"===f(e)}function m(e){return"[object WeakMap]"===f(e)}function w(e){return"[object WeakSet]"===f(e)}function _(e){return"[object ArrayBuffer]"===f(e)}function S(e){return"undefined"!==typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===f(e)}function A(e){return"undefined"!==typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!==typeof Promise&&e instanceof Promise||null!==e&&"object"===typeof e&&"function"===typeof e.then&&"function"===typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},g.working="undefined"!==typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!==typeof Map&&(g.working?g(e):e instanceof Map)},b.working="undefined"!==typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!==typeof Set&&(b.working?b(e):e instanceof Set)},m.working="undefined"!==typeof WeakMap&&m(new WeakMap),t.isWeakMap=function(e){return"undefined"!==typeof WeakMap&&(m.working?m(e):e instanceof WeakMap)},w.working="undefined"!==typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!==typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=S,E.working="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var k="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===f(e)}function x(e){return"undefined"!==typeof k&&("undefined"===typeof M.working&&(M.working=M(new k)),M.working?M(e):e instanceof k)}function C(e){return y(e,l)}function I(e){return y(e,h)}function O(e){return y(e,d)}function T(e){return u&&y(e,p)}function P(e){return c&&y(e,v)}t.isSharedArrayBuffer=x,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=C,t.isStringObject=I,t.isBooleanObject=O,t.isBigIntObject=T,t.isSymbolObject=P,t.isBoxedPrimitive=function(e){return C(e)||I(e)||O(e)||T(e)||P(e)},t.isAnyArrayBuffer=function(e){return"undefined"!==typeof Uint8Array&&(S(e)||x(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=c.styles[t];return r?"\x1b["+c.colors[r][0]+"m"+e+"\x1b["+c.colors[r][1]+"m":e}function l(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=h(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return d(r)}var c,f="",l=!1,S=["{","}"];(v(r)&&(l=!0,S=["[","]"]),k(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),A(r)&&(f=" "+d(r)),0!==a.length||l&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=l?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,S)):S[0]+f+S[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),O(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function v(e){return Array.isArray(e)}function y(e){return"boolean"===typeof e}function g(e){return null===e}function b(e){return"number"===typeof e}function m(e){return"string"===typeof e}function w(e){return void 0===e}function _(e){return S(e)&&"[object RegExp]"===M(e)}function S(e){return"object"===typeof e&&null!==e}function E(e){return S(e)&&"[object Date]"===M(e)}function A(e){return S(e)&&("[object Error]"===M(e)||e instanceof Error)}function k(e){return"function"===typeof e}function M(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(s.test(e)){var r=i.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=v,t.isBoolean=y,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=m,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=S,t.isDate=E,t.types.isDate=E,t.isError=A,t.types.isNativeError=A,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=r(369);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",I(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!==typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o0&&u>s&&(u=s);for(var c=0;c=0?(f=p.substr(0,v),l=p.substr(v+1)):(f=p,l=""),h=decodeURIComponent(f),d=decodeURIComponent(l),t(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},12361:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"===typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},17673:function(e,t,r){"use strict";t.decode=t.parse=r(62587),t.encode=t.stringify=r(12361)},85351:function(e,t,r){var n=r(62765);e.exports={hotjar:{initialize:function(e,t){n(e,t)},identify:function(e,t){n("identify",e,t)}}}},62765:function(e){e.exports=function(e,t){var r,n,i,o;r=window,n=document,r.hj=r.hj||function(){(r.hj.q=r.hj.q||[]).push(arguments)},r._hjSettings={hjid:e,hjsv:t},r._scriptPath="//static.hotjar.com/c/hotjar-"+r._hjSettings.hjid+".js?sv="+r._hjSettings.hjsv,document.querySelector('script[src*="'+r._scriptPath+'"]')||(i=n.getElementsByTagName("head")[0],(o=n.createElement("script")).async=1,o.src=r._scriptPath,i.appendChild(o))}},89509:function(e,t,r){var n=r(48764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},32553:function(e,t,r){"use strict";var n=r(89509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},98123:function(e,t,r){"use strict";e=r.hmd(e);!function(e){var t,r=e.Symbol;if("function"===typeof r)if(r.observable)t=r.observable;else{t=r.for("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch(n){}}else t="@@observable"}("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:e)},86554:function(e,t,r){"use strict";r.d(t,{ej:function(){return u},kG:function(){return c},U6:function(){return d}});var n=r(70655);!function(e){function t(){var t=this||self;t.globalThis=t,delete e.prototype._T_}"object"!==typeof globalThis&&(this?t():(e.defineProperty(e.prototype,"_T_",{configurable:!0,get:t}),_T_))}(Object);var i=globalThis,o="Invariant Violation",a=Object.setPrototypeOf,s=void 0===a?function(e,t){return e.__proto__=t,e}:a,u=function(e){function t(r){void 0===r&&(r=o);var n=e.call(this,"number"===typeof r?o+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=o,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var f=["log","warn","error","silent"],l=f.indexOf("log");function h(e){return function(){if(f.indexOf(e)>=l)return console[e].apply(console,arguments)}}function d(e){var t=f[l];return l=Math.max(0,f.indexOf(e)),t}!function(e){e.log=h("log"),e.warn=h("warn"),e.error=h("error")}(c||(c={}));var p=i.process||{env:{}};if(!i.process)try{Object.defineProperty(i,"process",{value:p})}catch(v){}},70655:function(e,t,r){"use strict";r.r(t),r.d(t,{__assign:function(){return o},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return k},__classPrivateFieldSet:function(){return M},__createBinding:function(){return h},__decorate:function(){return s},__exportStar:function(){return d},__extends:function(){return i},__generator:function(){return l},__importDefault:function(){return A},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return u},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return p}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=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]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(u,c):f(o[0][2],r)}catch(n){f(o[0][3],n)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function M(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},38087:function(e,t){"use strict";t.Q=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},s=e.split(i),u=o.decode||r,c=0;c1,i=!1,o=arguments[1],a=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(s){return r.error(s)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"===typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=l(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return d(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(a("iterator")&&(n=l(t,u)))return new r((function(e){v((function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){v((function(){if(!e.closed){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0||o(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive")};function c(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index0&&y(t[0]);)t.shift();for(;t.length>0&&y(t[t.length-1]);)t.pop();return t.join("\n")}function v(e){for(var t=0;t",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 _(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}var S=String.prototype.charCodeAt,E=String.prototype.slice;function A(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}function k(e){return isNaN(e)?w.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function M(e,t){var r=e.source,n=r.body,i=n.length,o=function(e,t,r){var n=e.length,i=t;for(;i=i)return new A(w.EOF,i,i,a,s,t);var u=S.call(n,o);switch(u){case 33:return new A(w.BANG,o,o+1,a,s,t);case 35:return function(e,t,r,n,i){var o,a=e.body,s=t;do{o=S.call(a,++s)}while(null!==o&&(o>31||9===o));return new A(w.COMMENT,t,s,r,n,i,E.call(a,t+1,s))}(r,o,a,s,t);case 36:return new A(w.DOLLAR,o,o+1,a,s,t);case 38:return new A(w.AMP,o,o+1,a,s,t);case 40:return new A(w.PAREN_L,o,o+1,a,s,t);case 41:return new A(w.PAREN_R,o,o+1,a,s,t);case 46:if(46===S.call(n,o+1)&&46===S.call(n,o+2))return new A(w.SPREAD,o,o+3,a,s,t);break;case 58:return new A(w.COLON,o,o+1,a,s,t);case 61:return new A(w.EQUALS,o,o+1,a,s,t);case 64:return new A(w.AT,o,o+1,a,s,t);case 91:return new A(w.BRACKET_L,o,o+1,a,s,t);case 93:return new A(w.BRACKET_R,o,o+1,a,s,t);case 123:return new A(w.BRACE_L,o,o+1,a,s,t);case 124:return new A(w.PIPE,o,o+1,a,s,t);case 125:return new A(w.BRACE_R,o,o+1,a,s,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(e,t,r,n,i){var o=e.body,a=o.length,s=t+1,u=0;for(;s!==a&&null!==(u=S.call(o,s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new A(w.NAME,t,s,r,n,i,E.call(o,t,s))}(r,o,a,s,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(e,t,r,n,i,o){var a=e.body,s=r,u=t,c=!1;45===s&&(s=S.call(a,++u));if(48===s){if((s=S.call(a,++u))>=48&&s<=57)throw d(e,u,"Invalid number, unexpected digit after 0: ".concat(k(s),"."))}else u=x(e,u,s),s=S.call(a,u);46===s&&(c=!0,s=S.call(a,++u),u=x(e,u,s),s=S.call(a,u));69!==s&&101!==s||(c=!0,43!==(s=S.call(a,++u))&&45!==s||(s=S.call(a,++u)),u=x(e,u,s));return new A(c?w.FLOAT:w.INT,t,u,n,i,o,E.call(a,t,u))}(r,o,u,a,s,t);case 34:return 34===S.call(n,o+1)&&34===S.call(n,o+2)?function(e,t,r,n,i){var o=e.body,a=t+3,s=a,u=0,c="";for(;a=48&&o<=57){do{o=S.call(n,++i)}while(o>=48&&o<=57);return i}throw d(e,i,"Invalid number, expected digit but got: ".concat(k(o),"."))}function C(e,t,r,n){return I(e)<<12|I(t)<<8|I(r)<<4|I(n)}function I(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}A.prototype.toJSON=A.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}};var O=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"}),T=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 P(e,t){var r="string"===typeof e?new u(e):e;if(!(r instanceof u))throw new TypeError("Must provide Source. Received: ".concat(i(r)));return function(e){var t=e.token;return{kind:O.DOCUMENT,definitions:Me(e,w.SOF,U,w.EOF),loc:be(e,t)}}(g(r,t||{}))}function R(e,t){var r=g("string"===typeof e?new u(e):e,t||{});Se(r,w.SOF);var n=$(r,!1);return Se(r,w.EOF),n}function N(e,t){var r=g("string"===typeof e?new u(e):e,t||{});Se(r,w.SOF);var n=re(r);return Se(r,w.EOF),n}function L(e){var t=Se(e,w.NAME);return{kind:O.NAME,value:t.value,loc:be(e,t)}}function U(e){if(we(e,w.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return D(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return ie(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===w.NAME)switch(t.value){case"schema":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"schema");var r=ee(e,!0),n=we(e,w.BRACE_L)?Me(e,w.BRACE_L,se,w.BRACE_R):[];if(0===r.length&&0===n.length)throw Ae(e);return{kind:O.SCHEMA_EXTENSION,directives:r,operationTypes:n,loc:be(e,t)}}(e);case"scalar":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"scalar");var r=L(e),n=ee(e,!0);if(0===n.length)throw Ae(e);return{kind:O.SCALAR_TYPE_EXTENSION,name:r,directives:n,loc:be(e,t)}}(e);case"type":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"type");var r=L(e),n=ue(e),i=ee(e,!0),o=ce(e);if(0===n.length&&0===i.length&&0===o.length)throw Ae(e);return{kind:O.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o,loc:be(e,t)}}(e);case"interface":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"interface");var r=L(e),n=ee(e,!0),i=ce(e);if(0===n.length&&0===i.length)throw Ae(e);return{kind:O.INTERFACE_TYPE_EXTENSION,name:r,directives:n,fields:i,loc:be(e,t)}}(e);case"union":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"union");var r=L(e),n=ee(e,!0),i=de(e);if(0===n.length&&0===i.length)throw Ae(e);return{kind:O.UNION_TYPE_EXTENSION,name:r,directives:n,types:i,loc:be(e,t)}}(e);case"enum":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"enum");var r=L(e),n=ee(e,!0),i=pe(e);if(0===n.length&&0===i.length)throw Ae(e);return{kind:O.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i,loc:be(e,t)}}(e);case"input":return function(e){var t=e.token;Ee(e,"extend"),Ee(e,"input");var r=L(e),n=ee(e,!0),i=ye(e);if(0===n.length&&0===i.length)throw Ae(e);return{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i,loc:be(e,t)}}(e)}throw Ae(e,t)}(e)}else{if(we(e,w.BRACE_L))return D(e);if(oe(e))return ie(e)}throw Ae(e)}function D(e){if(we(e,w.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return j(e);case"fragment":return function(e){var t=e.token;if(Ee(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:O.FRAGMENT_DEFINITION,name:Q(e),variableDefinitions:F(e),typeCondition:(Ee(e,"on"),ne(e)),directives:ee(e,!1),selectionSet:K(e),loc:be(e,t)};return{kind:O.FRAGMENT_DEFINITION,name:Q(e),typeCondition:(Ee(e,"on"),ne(e)),directives:ee(e,!1),selectionSet:K(e),loc:be(e,t)}}(e)}else if(we(e,w.BRACE_L))return j(e);throw Ae(e)}function j(e){var t=e.token;if(we(e,w.BRACE_L))return{kind:O.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:K(e),loc:be(e,t)};var r,n=B(e);return we(e,w.NAME)&&(r=L(e)),{kind:O.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:F(e),directives:ee(e,!1),selectionSet:K(e),loc:be(e,t)}}function B(e){var t=Se(e,w.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw Ae(e,t)}function F(e){return we(e,w.PAREN_L)?Me(e,w.PAREN_L,q,w.PAREN_R):[]}function q(e){var t=e.token;return e.options.experimentalVariableDefinitionDirectives?{kind:O.VARIABLE_DEFINITION,variable:z(e),type:(Se(e,w.COLON),re(e)),defaultValue:_e(e,w.EQUALS)?$(e,!0):void 0,directives:ee(e,!0),loc:be(e,t)}:{kind:O.VARIABLE_DEFINITION,variable:z(e),type:(Se(e,w.COLON),re(e)),defaultValue:_e(e,w.EQUALS)?$(e,!0):void 0,loc:be(e,t)}}function z(e){var t=e.token;return Se(e,w.DOLLAR),{kind:O.VARIABLE,name:L(e),loc:be(e,t)}}function K(e){var t=e.token;return{kind:O.SELECTION_SET,selections:Me(e,w.BRACE_L,V,w.BRACE_R),loc:be(e,t)}}function V(e){return we(e,w.SPREAD)?function(e){var t,r=e.token;if(Se(e,w.SPREAD),we(e,w.NAME)&&"on"!==e.token.value)return{kind:O.FRAGMENT_SPREAD,name:Q(e),directives:ee(e,!1),loc:be(e,r)};"on"===e.token.value&&(e.advance(),t=ne(e));return{kind:O.INLINE_FRAGMENT,typeCondition:t,directives:ee(e,!1),selectionSet:K(e),loc:be(e,r)}}(e):function(e){var t,r,n=e.token,i=L(e);_e(e,w.COLON)?(t=i,r=L(e)):r=i;return{kind:O.FIELD,alias:t,name:r,arguments:H(e,!1),directives:ee(e,!1),selectionSet:we(e,w.BRACE_L)?K(e):void 0,loc:be(e,n)}}(e)}function H(e,t){var r=t?G:W;return we(e,w.PAREN_L)?Me(e,w.PAREN_L,r,w.PAREN_R):[]}function W(e){var t=e.token;return{kind:O.ARGUMENT,name:L(e),value:(Se(e,w.COLON),$(e,!1)),loc:be(e,t)}}function G(e){var t=e.token;return{kind:O.ARGUMENT,name:L(e),value:(Se(e,w.COLON),J(e)),loc:be(e,t)}}function Q(e){if("on"===e.token.value)throw Ae(e);return L(e)}function $(e,t){var r=e.token;switch(r.kind){case w.BRACKET_L:return function(e,t){var r=e.token,n=t?J:Z;return{kind:O.LIST,values:ke(e,w.BRACKET_L,n,w.BRACKET_R),loc:be(e,r)}}(e,t);case w.BRACE_L:return function(e,t){var r=e.token;Se(e,w.BRACE_L);var n=[];for(;!_e(e,w.BRACE_R);)n.push(X(e,t));return{kind:O.OBJECT,fields:n,loc:be(e,r)}}(e,t);case w.INT:return e.advance(),{kind:O.INT,value:r.value,loc:be(e,r)};case w.FLOAT:return e.advance(),{kind:O.FLOAT,value:r.value,loc:be(e,r)};case w.STRING:case w.BLOCK_STRING:return Y(e);case w.NAME:return"true"===r.value||"false"===r.value?(e.advance(),{kind:O.BOOLEAN,value:"true"===r.value,loc:be(e,r)}):"null"===r.value?(e.advance(),{kind:O.NULL,loc:be(e,r)}):(e.advance(),{kind:O.ENUM,value:r.value,loc:be(e,r)});case w.DOLLAR:if(!t)return z(e)}throw Ae(e)}function Y(e){var t=e.token;return e.advance(),{kind:O.STRING,value:t.value,block:t.kind===w.BLOCK_STRING,loc:be(e,t)}}function J(e){return $(e,!0)}function Z(e){return $(e,!1)}function X(e,t){var r=e.token;return{kind:O.OBJECT_FIELD,name:L(e),value:(Se(e,w.COLON),$(e,t)),loc:be(e,r)}}function ee(e,t){for(var r=[];we(e,w.AT);)r.push(te(e,t));return r}function te(e,t){var r=e.token;return Se(e,w.AT),{kind:O.DIRECTIVE,name:L(e),arguments:H(e,t),loc:be(e,r)}}function re(e){var t,r=e.token;return _e(e,w.BRACKET_L)?(t=re(e),Se(e,w.BRACKET_R),t={kind:O.LIST_TYPE,type:t,loc:be(e,r)}):t=ne(e),_e(e,w.BANG)?{kind:O.NON_NULL_TYPE,type:t,loc:be(e,r)}:t}function ne(e){var t=e.token;return{kind:O.NAMED_TYPE,name:L(e),loc:be(e,t)}}function ie(e){var t=oe(e)?e.lookahead():e.token;if(t.kind===w.NAME)switch(t.value){case"schema":return function(e){var t=e.token;Ee(e,"schema");var r=ee(e,!0),n=Me(e,w.BRACE_L,se,w.BRACE_R);return{kind:O.SCHEMA_DEFINITION,directives:r,operationTypes:n,loc:be(e,t)}}(e);case"scalar":return function(e){var t=e.token,r=ae(e);Ee(e,"scalar");var n=L(e),i=ee(e,!0);return{kind:O.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i,loc:be(e,t)}}(e);case"type":return function(e){var t=e.token,r=ae(e);Ee(e,"type");var n=L(e),i=ue(e),o=ee(e,!0),a=ce(e);return{kind:O.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a,loc:be(e,t)}}(e);case"interface":return function(e){var t=e.token,r=ae(e);Ee(e,"interface");var n=L(e),i=ee(e,!0),o=ce(e);return{kind:O.INTERFACE_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o,loc:be(e,t)}}(e);case"union":return function(e){var t=e.token,r=ae(e);Ee(e,"union");var n=L(e),i=ee(e,!0),o=de(e);return{kind:O.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o,loc:be(e,t)}}(e);case"enum":return function(e){var t=e.token,r=ae(e);Ee(e,"enum");var n=L(e),i=ee(e,!0),o=pe(e);return{kind:O.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o,loc:be(e,t)}}(e);case"input":return function(e){var t=e.token,r=ae(e);Ee(e,"input");var n=L(e),i=ee(e,!0),o=ye(e);return{kind:O.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o,loc:be(e,t)}}(e);case"directive":return function(e){var t=e.token,r=ae(e);Ee(e,"directive"),Se(e,w.AT);var n=L(e),i=le(e);Ee(e,"on");var o=function(e){_e(e,w.PIPE);var t=[];do{t.push(ge(e))}while(_e(e,w.PIPE));return t}(e);return{kind:O.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,locations:o,loc:be(e,t)}}(e)}throw Ae(e,t)}function oe(e){return we(e,w.STRING)||we(e,w.BLOCK_STRING)}function ae(e){if(oe(e))return Y(e)}function se(e){var t=e.token,r=B(e);Se(e,w.COLON);var n=ne(e);return{kind:O.OPERATION_TYPE_DEFINITION,operation:r,type:n,loc:be(e,t)}}function ue(e){var t=[];if("implements"===e.token.value){e.advance(),_e(e,w.AMP);do{t.push(ne(e))}while(_e(e,w.AMP)||e.options.allowLegacySDLImplementsInterfaces&&we(e,w.NAME))}return t}function ce(e){return e.options.allowLegacySDLEmptyFields&&we(e,w.BRACE_L)&&e.lookahead().kind===w.BRACE_R?(e.advance(),e.advance(),[]):we(e,w.BRACE_L)?Me(e,w.BRACE_L,fe,w.BRACE_R):[]}function fe(e){var t=e.token,r=ae(e),n=L(e),i=le(e);Se(e,w.COLON);var o=re(e),a=ee(e,!0);return{kind:O.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a,loc:be(e,t)}}function le(e){return we(e,w.PAREN_L)?Me(e,w.PAREN_L,he,w.PAREN_R):[]}function he(e){var t=e.token,r=ae(e),n=L(e);Se(e,w.COLON);var i,o=re(e);_e(e,w.EQUALS)&&(i=J(e));var a=ee(e,!0);return{kind:O.INPUT_VALUE_DEFINITION,description:r,name:n,type:o,defaultValue:i,directives:a,loc:be(e,t)}}function de(e){var t=[];if(_e(e,w.EQUALS)){_e(e,w.PIPE);do{t.push(ne(e))}while(_e(e,w.PIPE))}return t}function pe(e){return we(e,w.BRACE_L)?Me(e,w.BRACE_L,ve,w.BRACE_R):[]}function ve(e){var t=e.token,r=ae(e),n=L(e),i=ee(e,!0);return{kind:O.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i,loc:be(e,t)}}function ye(e){return we(e,w.BRACE_L)?Me(e,w.BRACE_L,he,w.BRACE_R):[]}function ge(e){var t=e.token,r=L(e);if(T.hasOwnProperty(r.value))return r;throw Ae(e,t)}function be(e,t){if(!e.options.noLocation)return new me(t,e.lastToken,e.source)}function me(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}function we(e,t){return e.token.kind===t}function _e(e,t){var r=e.token.kind===t;return r&&e.advance(),r}function Se(e,t){var r=e.token;if(r.kind===t)return e.advance(),r;throw d(e.source,r.start,"Expected ".concat(t,", found ").concat(_(r)))}function Ee(e,t){var r=e.token;if(r.kind===w.NAME&&r.value===t)return e.advance(),r;throw d(e.source,r.start,'Expected "'.concat(t,'", found ').concat(_(r)))}function Ae(e,t){var r=t||e.token;return d(e.source,r.start,"Unexpected ".concat(_(r)))}function ke(e,t,r,n){Se(e,t);for(var i=[];!_e(e,n);)i.push(r(e));return i}function Me(e,t,r,n){Se(e,t);for(var i=[r(e)];!_e(e,n);)i.push(r(e));return i}me.prototype.toJSON=me.prototype.inspect=function(){return{start:this.start,end:this.end}}},39011:function(e,t,r){"use strict";r.r(t),r.d(t,{print:function(){return i}});var n=r(77304);function i(e){return(0,n.Vn)(e,{leave:o})}var o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet;return s([c("",t,": ")+r+c("(",s(n,", "),")"),s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?function(e,t){var r=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'.concat(t?r:f(r),'\n"""'):'"""'.concat(r.replace(/"$/,'"\n'),'"""')}(r,"description"===t):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),FieldDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(r.every((function(e){return-1===e.indexOf("\n")}))?c("(",s(r,", "),")"):c("(\n",f(s(r,"\n")),"\n)"))+": "+n+c(" ",s(i," "))})),InputValueDefinition:a((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["interface",t,s(r," "),u(n)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")})),EnumValueDefinition:a((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.locations;return"directive @"+t+(r.every((function(e){return-1===e.indexOf("\n")}))?c("(",s(r,", "),")"):c("(\n",f(s(r,"\n")),"\n)"))+" on "+s(n," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend interface",t,s(r," "),u(n)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e,t){return e?e.filter((function(e){return e})).join(t||""):""}function u(e){return e&&0!==e.length?"{\n"+f(s(e,"\n"))+"\n}":""}function c(e,t,r){return t?e+t+(r||""):""}function f(e){return e&&" "+e.replace(/\n/g,"\n ")}},77304:function(e,t,r){"use strict";r.d(t,{$_:function(){return i},Vn:function(){return o}});var n={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 o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n,o=void 0,u=Array.isArray(e),c=[e],f=-1,l=[],h=void 0,d=void 0,p=void 0,v=[],y=[],g=e;do{var b=++f===c.length,m=b&&0!==l.length;if(b){if(d=0===y.length?void 0:v[v.length-1],h=p,p=y.pop(),m){if(u)h=h.slice();else{var w={};for(var _ in h)h.hasOwnProperty(_)&&(w[_]=h[_]);h=w}for(var S=0,E=0;E