@agentlang/lstudio 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{index-DGxKop46.js → index-BVDalg8J.js} +1 -1
- package/assets/index-Bto-kj6R-C0A_3Pwb.js +1 -0
- package/assets/index-CRBN_oZa.js +1 -0
- package/assets/{index-CZyH7rAI-yNipxqK_.js → index-Cgd01XOu-DZ3EXoBB.js} +2 -2
- package/assets/{index-DVE_yv84.js → index-CzztApPS.js} +1593 -15956
- package/assets/index-KGBiLwKE-Doz2tX9S.js +58 -0
- package/assets/index-cBigiEzZ.js +1 -0
- package/assets/index.browser-BHPvGrwi-6Mh8eUw-.js +1 -0
- package/assets/index.browser-DJzU6L_M.js +6 -0
- package/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +1 -0
- package/assets/loadCognitoIdentity-CJ88jpa8.js +1 -0
- package/assets/{loadSts-BapsviSG.js → loadSts-C3D0kgNq.js} +1 -1
- package/assets/replService-zmzywhSy.js +1 -0
- package/assets/util-CNqBjtt6-GUXK7Yxz.js +10 -0
- package/assets/util-DZRIOW0Z-CproX86h.js +1 -0
- package/assets/winston-D0VJZ3P8-x1CFZMA0.js +1 -0
- package/assets/{winston-CtcDki1r-tmxR7nDg.js → winston-D1zwHYTY-CkaOApIk.js} +27 -27
- package/index.html +4 -9
- package/package.json +1 -1
- package/assets/__vite-browser-external-CoxO8HJt-D7Ct-6yo.js +0 -1
- package/assets/__vite-browser-external-CoxO8HJt-YbutIfMq-D7Ct-6yo.js +0 -1
- package/assets/_commonjsHelpers-38a7CZ6X-BfEUBFWa-BEFu9Otg.js +0 -1
- package/assets/_commonjsHelpers-38a7CZ6X-W3E8ocG7.js +0 -1
- package/assets/index-CNLtnwcG-CT9Tl0QI.js +0 -20
- package/assets/index-CNLtnwcG-HJoxiQBn-DSWPwCKS.js +0 -20
- package/assets/index-CUtIwvTY-Dla_hTy0.js +0 -58
- package/assets/index-CZxYSK50.js +0 -1
- package/assets/index-D5v913EJ-CsbEilVn.js +0 -1
- package/assets/index-DGQM-tVy-4NRC-u1U.js +0 -1
- package/assets/index-Df47_4iR.js +0 -1
- package/assets/index-VamKv2HZ--hbiLl7B.js +0 -5
- package/assets/index-VamKv2HZ-CaraMydH-D75zmpPt.js +0 -5
- package/assets/index-xuotMAFm-B-PTrwYx.js +0 -1
- package/assets/index.browser-CpFXY3d8.js +0 -6
- package/assets/inherits_browser-BPb0V7-q-C7Z2MfVc.js +0 -1
- package/assets/loadCognitoIdentity-C6v0Wrbw.js +0 -1
- package/assets/replService-CQlo69lH.js +0 -1
- package/assets/util-ByC4ZISM-BeKX2g97.js +0 -1
- package/assets/util-Di1GNq-L-D-kgTTr0.js +0 -10
- package/assets/winston-Bb5ONwX_-B86ttl8E.js +0 -1
- package/assets/winston-Bb5ONwX_-ziOUC-cl-v-kyB29h.js +0 -1
- package/assets/winston-BvKfy0iJ-CwnGwJ9X.js +0 -51
- package/assets/winston-BvKfy0iJ-DkFo4NVo-UY_jirKN.js +0 -51
- package/assets/winston-CLh__iui-Dz2dJhwh.js +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{l as Pe,u as Le}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{I as xt,k as Nt}from"./index-DSosZ5sh-Ceejs_jv.js";import{g as me}from"./index.browser-BHPvGrwi-6Mh8eUw-.js";import{r as Kt}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{Y as we}from"./index-6mKfgpcs-DsgiI2lM.js";/*!
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/var jn=(function(){function o(e){var n=e||{},s=n.ValidationData,a=n.Username,c=n.Password,f=n.AuthParameters,g=n.ClientMetadata;this.validationData=s||{},this.authParameters=f||{},this.clientMetadata=g||{},this.username=a,this.password=c}var r=o.prototype;return r.getUsername=function(){return this.username},r.getPassword=function(){return this.password},r.getValidationData=function(){return this.validationData},r.getAuthParameters=function(){return this.authParameters},r.getClientMetadata=function(){return this.clientMetadata},o})(),qe={},Ae,je;function Vt(){if(je)return Ae;je=1;var o={}.toString;return Ae=Array.isArray||function(r){return o.call(r)=="[object Array]"},Ae}/*!
|
|
5
|
+
* The buffer module from node.js, for the browser.
|
|
6
|
+
*
|
|
7
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/var He;function Lt(){return He||(He=1,(function(o){var r=xt(),e=Nt(),n=Vt();o.Buffer=f,o.SlowBuffer=T,o.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=Le.TYPED_ARRAY_SUPPORT!==void 0?Le.TYPED_ARRAY_SUPPORT:s(),o.kMaxLength=a();function s(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42&&typeof t.subarray=="function"&&t.subarray(1,1).byteLength===0}catch{return!1}}function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,i){if(a()<i)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(i),t.__proto__=f.prototype):(t===null&&(t=new f(i)),t.length=i),t}function f(t,i,u){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,i,u);if(typeof t=="number"){if(typeof i=="string")throw new Error("If encoding is specified then the first argument must be a string");return y(this,t)}return g(this,t,i,u)}f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t};function g(t,i,u,h){if(typeof i=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer?U(t,i,u,h):typeof i=="string"?S(t,i,u):A(t,i)}f.from=function(t,i,u){return g(null,t,i,u)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0}));function l(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,i,u,h){return l(i),i<=0?c(t,i):u!==void 0?typeof h=="string"?c(t,i).fill(u,h):c(t,i).fill(u):c(t,i)}f.alloc=function(t,i,u){return d(null,t,i,u)};function y(t,i){if(l(i),t=c(t,i<0?0:E(i)|0),!f.TYPED_ARRAY_SUPPORT)for(var u=0;u<i;++u)t[u]=0;return t}f.allocUnsafe=function(t){return y(null,t)},f.allocUnsafeSlow=function(t){return y(null,t)};function S(t,i,u){if((typeof u!="string"||u==="")&&(u="utf8"),!f.isEncoding(u))throw new TypeError('"encoding" must be a valid string encoding');var h=B(i,u)|0;t=c(t,h);var p=t.write(i,u);return p!==h&&(t=t.slice(0,p)),t}function w(t,i){var u=i.length<0?0:E(i.length)|0;t=c(t,u);for(var h=0;h<u;h+=1)t[h]=i[h]&255;return t}function U(t,i,u,h){if(i.byteLength,u<0||i.byteLength<u)throw new RangeError("'offset' is out of bounds");if(i.byteLength<u+(h||0))throw new RangeError("'length' is out of bounds");return u===void 0&&h===void 0?i=new Uint8Array(i):h===void 0?i=new Uint8Array(i,u):i=new Uint8Array(i,u,h),f.TYPED_ARRAY_SUPPORT?(t=i,t.__proto__=f.prototype):t=w(t,i),t}function A(t,i){if(f.isBuffer(i)){var u=E(i.length)|0;return t=c(t,u),t.length===0||i.copy(t,0,0,u),t}if(i){if(typeof ArrayBuffer<"u"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||Mt(i.length)?c(t,0):w(t,i);if(i.type==="Buffer"&&n(i.data))return w(t,i.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function E(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return t|0}function T(t){return+t!=t&&(t=0),f.alloc(+t)}f.isBuffer=function(t){return!!(t!=null&&t._isBuffer)},f.compare=function(t,i){if(!f.isBuffer(t)||!f.isBuffer(i))throw new TypeError("Arguments must be Buffers");if(t===i)return 0;for(var u=t.length,h=i.length,p=0,v=Math.min(u,h);p<v;++p)if(t[p]!==i[p]){u=t[p],h=i[p];break}return u<h?-1:h<u?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,i){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var u;if(i===void 0)for(i=0,u=0;u<t.length;++u)i+=t[u].length;var h=f.allocUnsafe(i),p=0;for(u=0;u<t.length;++u){var v=t[u];if(!f.isBuffer(v))throw new TypeError('"list" argument must be an Array of Buffers');v.copy(h,p),p+=v.length}return h};function B(t,i){if(f.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var u=t.length;if(u===0)return 0;for(var h=!1;;)switch(i){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":case void 0:return pe(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return Ne(t).length;default:if(h)return pe(t).length;i=(""+i).toLowerCase(),h=!0}}f.byteLength=B;function q(t,i,u){var h=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,i>>>=0,u<=i))return"";for(t||(t="utf8");;)switch(t){case"hex":return bt(this,i,u);case"utf8":case"utf-8":return he(this,i,u);case"ascii":return Dt(this,i,u);case"latin1":case"binary":return It(this,i,u);case"base64":return X(this,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,i,u);default:if(h)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),h=!0}}f.prototype._isBuffer=!0;function M(t,i,u){var h=t[i];t[i]=t[u],t[u]=h}f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<t;i+=2)M(this,i,i+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<t;i+=4)M(this,i,i+3),M(this,i+1,i+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<t;i+=8)M(this,i,i+7),M(this,i+1,i+6),M(this,i+2,i+5),M(this,i+3,i+4);return this},f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?he(this,0,t):q.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0},f.prototype.inspect=function(){var t="",i=o.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,i,u,h,p){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(i===void 0&&(i=0),u===void 0&&(u=t?t.length:0),h===void 0&&(h=0),p===void 0&&(p=this.length),i<0||u>t.length||h<0||p>this.length)throw new RangeError("out of range index");if(h>=p&&i>=u)return 0;if(h>=p)return-1;if(i>=u)return 1;if(i>>>=0,u>>>=0,h>>>=0,p>>>=0,this===t)return 0;for(var v=p-h,C=u-i,D=Math.min(v,C),R=this.slice(h,p),b=t.slice(i,u),_=0;_<D;++_)if(R[_]!==b[_]){v=R[_],C=b[_];break}return v<C?-1:C<v?1:0};function Y(t,i,u,h,p){if(t.length===0)return-1;if(typeof u=="string"?(h=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=p?0:t.length-1),u<0&&(u=t.length+u),u>=t.length){if(p)return-1;u=t.length-1}else if(u<0)if(p)u=0;else return-1;if(typeof i=="string"&&(i=f.from(i,h)),f.isBuffer(i))return i.length===0?-1:W(t,i,u,h,p);if(typeof i=="number")return i=i&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?p?Uint8Array.prototype.indexOf.call(t,i,u):Uint8Array.prototype.lastIndexOf.call(t,i,u):W(t,[i],u,h,p);throw new TypeError("val must be string, number or Buffer")}function W(t,i,u,h,p){var v=1,C=t.length,D=i.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(t.length<2||i.length<2)return-1;v=2,C/=2,D/=2,u/=2}function R(Ke,Ve){return v===1?Ke[Ve]:Ke.readUInt16BE(Ve*v)}var b;if(p){var _=-1;for(b=u;b<C;b++)if(R(t,b)===R(i,_===-1?0:b-_)){if(_===-1&&(_=b),b-_+1===D)return _*v}else _!==-1&&(b-=b-_),_=-1}else for(u+D>C&&(u=C-D),b=u;b>=0;b--){for(var k=!0,ve=0;ve<D;ve++)if(R(t,b+ve)!==R(i,ve)){k=!1;break}if(k)return b}return-1}f.prototype.includes=function(t,i,u){return this.indexOf(t,i,u)!==-1},f.prototype.indexOf=function(t,i,u){return Y(this,t,i,u,!0)},f.prototype.lastIndexOf=function(t,i,u){return Y(this,t,i,u,!1)};function L(t,i,u,h){u=Number(u)||0;var p=t.length-u;h?(h=Number(h),h>p&&(h=p)):h=p;var v=i.length;if(v%2!==0)throw new TypeError("Invalid hex string");h>v/2&&(h=v/2);for(var C=0;C<h;++C){var D=parseInt(i.substr(C*2,2),16);if(isNaN(D))return C;t[u+C]=D}return C}function x(t,i,u,h){return de(pe(i,t.length-u),t,u,h)}function j(t,i,u,h){return de(Bt(i),t,u,h)}function Z(t,i,u,h){return j(t,i,u,h)}function G(t,i,u,h){return de(Ne(i),t,u,h)}function z(t,i,u,h){return de(Ft(i,t.length-u),t,u,h)}f.prototype.write=function(t,i,u,h){if(i===void 0)h="utf8",u=this.length,i=0;else if(u===void 0&&typeof i=="string")h=i,u=this.length,i=0;else if(isFinite(i))i=i|0,isFinite(u)?(u=u|0,h===void 0&&(h="utf8")):(h=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var p=this.length-i;if((u===void 0||u>p)&&(u=p),t.length>0&&(u<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");for(var v=!1;;)switch(h){case"hex":return L(this,t,i,u);case"utf8":case"utf-8":return x(this,t,i,u);case"ascii":return j(this,t,i,u);case"latin1":case"binary":return Z(this,t,i,u);case"base64":return G(this,t,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,i,u);default:if(v)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),v=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(t,i,u){return i===0&&u===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(i,u))}function he(t,i,u){u=Math.min(t.length,u);for(var h=[],p=i;p<u;){var v=t[p],C=null,D=v>239?4:v>223?3:v>191?2:1;if(p+D<=u){var R,b,_,k;switch(D){case 1:v<128&&(C=v);break;case 2:R=t[p+1],(R&192)===128&&(k=(v&31)<<6|R&63,k>127&&(C=k));break;case 3:R=t[p+1],b=t[p+2],(R&192)===128&&(b&192)===128&&(k=(v&15)<<12|(R&63)<<6|b&63,k>2047&&(k<55296||k>57343)&&(C=k));break;case 4:R=t[p+1],b=t[p+2],_=t[p+3],(R&192)===128&&(b&192)===128&&(_&192)===128&&(k=(v&15)<<18|(R&63)<<12|(b&63)<<6|_&63,k>65535&&k<1114112&&(C=k))}}C===null?(C=65533,D=1):C>65535&&(C-=65536,h.push(C>>>10&1023|55296),C=56320|C&1023),h.push(C),p+=D}return Tt(h)}var Be=4096;function Tt(t){var i=t.length;if(i<=Be)return String.fromCharCode.apply(String,t);for(var u="",h=0;h<i;)u+=String.fromCharCode.apply(String,t.slice(h,h+=Be));return u}function Dt(t,i,u){var h="";u=Math.min(t.length,u);for(var p=i;p<u;++p)h+=String.fromCharCode(t[p]&127);return h}function It(t,i,u){var h="";u=Math.min(t.length,u);for(var p=i;p<u;++p)h+=String.fromCharCode(t[p]);return h}function bt(t,i,u){var h=t.length;(!i||i<0)&&(i=0),(!u||u<0||u>h)&&(u=h);for(var p="",v=i;v<u;++v)p+=Ot(t[v]);return p}function _t(t,i,u){for(var h=t.slice(i,u),p="",v=0;v<h.length;v+=2)p+=String.fromCharCode(h[v]+h[v+1]*256);return p}f.prototype.slice=function(t,i){var u=this.length;t=~~t,i=i===void 0?u:~~i,t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),i<0?(i+=u,i<0&&(i=0)):i>u&&(i=u),i<t&&(i=t);var h;if(f.TYPED_ARRAY_SUPPORT)h=this.subarray(t,i),h.__proto__=f.prototype;else{var p=i-t;h=new f(p,void 0);for(var v=0;v<p;++v)h[v]=this[v+t]}return h};function P(t,i,u){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+i>u)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t],p=1,v=0;++v<i&&(p*=256);)h+=this[t+v]*p;return h},f.prototype.readUIntBE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t+--i],p=1;i>0&&(p*=256);)h+=this[t+--i]*p;return h},f.prototype.readUInt8=function(t,i){return i||P(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,i){return i||P(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,i){return i||P(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,i){return i||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUInt32BE=function(t,i){return i||P(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t],p=1,v=0;++v<i&&(p*=256);)h+=this[t+v]*p;return p*=128,h>=p&&(h-=Math.pow(2,8*i)),h},f.prototype.readIntBE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=i,p=1,v=this[t+--h];h>0&&(p*=256);)v+=this[t+--h]*p;return p*=128,v>=p&&(v-=Math.pow(2,8*i)),v},f.prototype.readInt8=function(t,i){return i||P(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,i){i||P(t,2,this.length);var u=this[t]|this[t+1]<<8;return u&32768?u|4294901760:u},f.prototype.readInt16BE=function(t,i){i||P(t,2,this.length);var u=this[t+1]|this[t]<<8;return u&32768?u|4294901760:u},f.prototype.readInt32LE=function(t,i){return i||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,i){return i||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,i){return i||P(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,i){return i||P(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,i){return i||P(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,i){return i||P(t,8,this.length),e.read(this,t,!1,52,8)};function F(t,i,u,h,p,v){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>p||i<v)throw new RangeError('"value" argument is out of bounds');if(u+h>t.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(t,i,u,h){if(t=+t,i=i|0,u=u|0,!h){var p=Math.pow(2,8*u)-1;F(this,t,i,u,p,0)}var v=1,C=0;for(this[i]=t&255;++C<u&&(v*=256);)this[i+C]=t/v&255;return i+u},f.prototype.writeUIntBE=function(t,i,u,h){if(t=+t,i=i|0,u=u|0,!h){var p=Math.pow(2,8*u)-1;F(this,t,i,u,p,0)}var v=u-1,C=1;for(this[i+v]=t&255;--v>=0&&(C*=256);)this[i+v]=t/C&255;return i+u},f.prototype.writeUInt8=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[i]=t&255,i+1};function le(t,i,u,h){i<0&&(i=65535+i+1);for(var p=0,v=Math.min(t.length-u,2);p<v;++p)t[u+p]=(i&255<<8*(h?p:1-p))>>>(h?p:1-p)*8}f.prototype.writeUInt16LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8):le(this,t,i,!0),i+2},f.prototype.writeUInt16BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=t&255):le(this,t,i,!1),i+2};function ge(t,i,u,h){i<0&&(i=4294967295+i+1);for(var p=0,v=Math.min(t.length-u,4);p<v;++p)t[u+p]=i>>>(h?p:3-p)*8&255}f.prototype.writeUInt32LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255):ge(this,t,i,!0),i+4},f.prototype.writeUInt32BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255):ge(this,t,i,!1),i+4},f.prototype.writeIntLE=function(t,i,u,h){if(t=+t,i=i|0,!h){var p=Math.pow(2,8*u-1);F(this,t,i,u,p-1,-p)}var v=0,C=1,D=0;for(this[i]=t&255;++v<u&&(C*=256);)t<0&&D===0&&this[i+v-1]!==0&&(D=1),this[i+v]=(t/C>>0)-D&255;return i+u},f.prototype.writeIntBE=function(t,i,u,h){if(t=+t,i=i|0,!h){var p=Math.pow(2,8*u-1);F(this,t,i,u,p-1,-p)}var v=u-1,C=1,D=0;for(this[i+v]=t&255;--v>=0&&(C*=256);)t<0&&D===0&&this[i+v+1]!==0&&(D=1),this[i+v]=(t/C>>0)-D&255;return i+u},f.prototype.writeInt8=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[i]=t&255,i+1},f.prototype.writeInt16LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8):le(this,t,i,!0),i+2},f.prototype.writeInt16BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=t&255):le(this,t,i,!1),i+2},f.prototype.writeInt32LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24):ge(this,t,i,!0),i+4},f.prototype.writeInt32BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255):ge(this,t,i,!1),i+4};function Fe(t,i,u,h,p,v){if(u+h>t.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function Me(t,i,u,h,p){return p||Fe(t,i,u,4),e.write(t,i,u,h,23,4),u+4}f.prototype.writeFloatLE=function(t,i,u){return Me(this,t,i,!0,u)},f.prototype.writeFloatBE=function(t,i,u){return Me(this,t,i,!1,u)};function xe(t,i,u,h,p){return p||Fe(t,i,u,8),e.write(t,i,u,h,52,8),u+8}f.prototype.writeDoubleLE=function(t,i,u){return xe(this,t,i,!0,u)},f.prototype.writeDoubleBE=function(t,i,u){return xe(this,t,i,!1,u)},f.prototype.copy=function(t,i,u,h){if(u||(u=0),!h&&h!==0&&(h=this.length),i>=t.length&&(i=t.length),i||(i=0),h>0&&h<u&&(h=u),h===u||t.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw new RangeError("sourceStart out of bounds");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),t.length-i<h-u&&(h=t.length-i+u);var p=h-u,v;if(this===t&&u<i&&i<h)for(v=p-1;v>=0;--v)t[v+i]=this[v+u];else if(p<1e3||!f.TYPED_ARRAY_SUPPORT)for(v=0;v<p;++v)t[v+i]=this[v+u];else Uint8Array.prototype.set.call(t,this.subarray(u,u+p),i);return p},f.prototype.fill=function(t,i,u,h){if(typeof t=="string"){if(typeof i=="string"?(h=i,i=0,u=this.length):typeof u=="string"&&(h=u,u=this.length),t.length===1){var p=t.charCodeAt(0);p<256&&(t=p)}if(h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!f.isEncoding(h))throw new TypeError("Unknown encoding: "+h)}else typeof t=="number"&&(t=t&255);if(i<0||this.length<i||this.length<u)throw new RangeError("Out of range index");if(u<=i)return this;i=i>>>0,u=u===void 0?this.length:u>>>0,t||(t=0);var v;if(typeof t=="number")for(v=i;v<u;++v)this[v]=t;else{var C=f.isBuffer(t)?t:pe(new f(t,h).toString()),D=C.length;for(v=0;v<u-i;++v)this[v+i]=C[v%D]}return this};var Pt=/[^+\/0-9A-Za-z-_]/g;function Rt(t){if(t=kt(t).replace(Pt,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function kt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ot(t){return t<16?"0"+t.toString(16):t.toString(16)}function pe(t,i){i=i||1/0;for(var u,h=t.length,p=null,v=[],C=0;C<h;++C){if(u=t.charCodeAt(C),u>55295&&u<57344){if(!p){if(u>56319){(i-=3)>-1&&v.push(239,191,189);continue}else if(C+1===h){(i-=3)>-1&&v.push(239,191,189);continue}p=u;continue}if(u<56320){(i-=3)>-1&&v.push(239,191,189),p=u;continue}u=(p-55296<<10|u-56320)+65536}else p&&(i-=3)>-1&&v.push(239,191,189);if(p=null,u<128){if((i-=1)<0)break;v.push(u)}else if(u<2048){if((i-=2)<0)break;v.push(u>>6|192,u&63|128)}else if(u<65536){if((i-=3)<0)break;v.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((i-=4)<0)break;v.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return v}function Bt(t){for(var i=[],u=0;u<t.length;++u)i.push(t.charCodeAt(u)&255);return i}function Ft(t,i){for(var u,h,p,v=[],C=0;C<t.length&&!((i-=2)<0);++C)u=t.charCodeAt(C),h=u>>8,p=u%256,v.push(p),v.push(h);return v}function Ne(t){return r.toByteArray(Rt(t))}function de(t,i,u,h){for(var p=0;p<h&&!(p+u>=i.length||p>=t.length);++p)i[p+u]=t[p];return p}function Mt(t){return t!==t}})(qe)),qe}var I=Lt(),K;typeof window<"u"&&window.crypto&&(K=window.crypto);!K&&typeof window<"u"&&window.msCrypto&&(K=window.msCrypto);!K&&typeof me<"u"&&me.crypto&&(K=me.crypto);if(!K&&typeof Kt=="function")try{K=require("crypto")}catch{}function qt(){if(K){if(typeof K.getRandomValues=="function")try{return K.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof K.randomBytes=="function")try{return K.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")}function jt(o){for(var r=o.words,e=o.sigBytes,n=[],s=0;s<e;s++){var a=r[s>>>2]>>>24-s%4*8&255;n.push((a>>>4).toString(16)),n.push((a&15).toString(16))}return n.join("")}var Ht=(function(){function o(e,n){e=this.words=e||[],n!=null?this.sigBytes=n:this.sigBytes=e.length*4}var r=o.prototype;return r.random=function(e){for(var n=[],s=0;s<e;s+=4)n.push(qt());return new o(n,e)},r.toString=function(){return jt(this)},o})(),Ye={};/*! *****************************************************************************
|
|
10
|
+
Copyright (c) Microsoft Corporation.
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
+
***************************************************************************** */var Ue=function(o,r){return Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])},Ue(o,r)};function Yt(o,r){Ue(o,r);function e(){this.constructor=o}o.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var Ee=function(){return Ee=Object.assign||function(o){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(o[s]=r[s])}return o},Ee.apply(this,arguments)};function Gt(o,r){var e={};for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&r.indexOf(n)<0&&(e[n]=o[n]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(o);s<n.length;s++)r.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(o,n[s])&&(e[n[s]]=o[n[s]]);return e}function Jt(o,r,e,n){var s=arguments.length,a=s<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,r,e,n);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(a=(s<3?c(a):s>3?c(r,e,a):c(r,e))||a);return s>3&&a&&Object.defineProperty(r,e,a),a}function Wt(o,r){return function(e,n){r(e,n,o)}}function Zt(o,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,r)}function zt(o,r,e,n){function s(a){return a instanceof e?a:new e(function(c){c(a)})}return new(e||(e=Promise))(function(a,c){function f(d){try{l(n.next(d))}catch(y){c(y)}}function g(d){try{l(n.throw(d))}catch(y){c(y)}}function l(d){d.done?a(d.value):s(d.value).then(f,g)}l((n=n.apply(o,r||[])).next())})}function Xt(o,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(l){return function(d){return g([l,d])}}function g(l){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,s&&(a=l[0]&2?s.return:l[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,l[1])).done)return a;switch(s=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,s=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){e.label=l[1];break}if(l[0]===6&&e.label<a[1]){e.label=a[1],a=l;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(l);break}a[2]&&e.ops.pop(),e.trys.pop();continue}l=r.call(o,e)}catch(d){l=[6,d],s=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function $t(o,r,e,n){n===void 0&&(n=e),o[n]=r[e]}function Qt(o,r){for(var e in o)e!=="default"&&!r.hasOwnProperty(e)&&(r[e]=o[e])}function Te(o){var r=typeof Symbol=="function"&&Symbol.iterator,e=r&&o[r],n=0;if(e)return e.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&n>=o.length&&(o=void 0),{value:o&&o[n++],done:!o}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function yt(o,r){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var n=e.call(o),s,a=[],c;try{for(;(r===void 0||r-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(f){c={error:f}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return a}function er(){for(var o=[],r=0;r<arguments.length;r++)o=o.concat(yt(arguments[r]));return o}function tr(){for(var o=0,r=0,e=arguments.length;r<e;r++)o+=arguments[r].length;for(var n=Array(o),s=0,r=0;r<e;r++)for(var a=arguments[r],c=0,f=a.length;c<f;c++,s++)n[s]=a[c];return n}function fe(o){return this instanceof fe?(this.v=o,this):new fe(o)}function rr(o,r,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(o,r||[]),s,a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(S){n[S]&&(s[S]=function(w){return new Promise(function(U,A){a.push([S,w,U,A])>1||f(S,w)})})}function f(S,w){try{g(n[S](w))}catch(U){y(a[0][3],U)}}function g(S){S.value instanceof fe?Promise.resolve(S.value.v).then(l,d):y(a[0][2],S)}function l(S){f("next",S)}function d(S){f("throw",S)}function y(S,w){S(w),a.shift(),a.length&&f(a[0][0],a[0][1])}}function nr(o){var r,e;return r={},n("next"),n("throw",function(s){throw s}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(s,a){r[s]=o[s]?function(c){return(e=!e)?{value:fe(o[s](c)),done:s==="return"}:a?a(c):c}:a}}function ir(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=o[Symbol.asyncIterator],e;return r?r.call(o):(o=typeof Te=="function"?Te(o):o[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(a){e[a]=o[a]&&function(c){return new Promise(function(f,g){c=o[a](c),s(f,g,c.done,c.value)})}}function s(a,c,f,g){Promise.resolve(g).then(function(l){a({value:l,done:f})},c)}}function sr(o,r){return Object.defineProperty?Object.defineProperty(o,"raw",{value:r}):o.raw=r,o}function or(o){if(o&&o.__esModule)return o;var r={};if(o!=null)for(var e in o)Object.hasOwnProperty.call(o,e)&&(r[e]=o[e]);return r.default=o,r}function ar(o){return o&&o.__esModule?o:{default:o}}function ur(o,r){if(!r.has(o))throw new TypeError("attempted to get private field on non-instance");return r.get(o)}function fr(o,r,e){if(!r.has(o))throw new TypeError("attempted to set private field on non-instance");return r.set(o,e),e}const cr=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Ee},__asyncDelegator:nr,__asyncGenerator:rr,__asyncValues:ir,__await:fe,__awaiter:zt,__classPrivateFieldGet:ur,__classPrivateFieldSet:fr,__createBinding:$t,__decorate:Jt,__exportStar:Qt,__extends:Yt,__generator:Xt,__importDefault:ar,__importStar:or,__makeTemplateObject:sr,__metadata:Zt,__param:Wt,__read:yt,__rest:Gt,__spread:er,__spreadArrays:tr,__values:Te},Symbol.toStringTag,{value:"Module"})),St=Pe(cr);var re={},N={},Ge;function mt(){return Ge||(Ge=1,Object.defineProperty(N,"__esModule",{value:!0}),N.MAX_HASHABLE_LENGTH=N.INIT=N.KEY=N.DIGEST_LENGTH=N.BLOCK_SIZE=void 0,N.BLOCK_SIZE=64,N.DIGEST_LENGTH=32,N.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]),N.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],N.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),N}var ne={},Je;function hr(){if(Je)return ne;Je=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.RawSha256=void 0;var o=mt(),r=(function(){function e(){this.state=Int32Array.from(o.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(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,a=n.byteLength;if(this.bytesHashed+=a,this.bytesHashed*8>o.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;a>0;)this.buffer[this.bufferLength++]=n[s++],a--,this.bufferLength===o.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),a=this.bufferLength;if(s.setUint8(this.bufferLength++,128),a%o.BLOCK_SIZE>=o.BLOCK_SIZE-8){for(var c=this.bufferLength;c<o.BLOCK_SIZE;c++)s.setUint8(c,0);this.hashBuffer(),this.bufferLength=0}for(var c=this.bufferLength;c<o.BLOCK_SIZE-8;c++)s.setUint8(c,0);s.setUint32(o.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(o.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var f=new Uint8Array(o.DIGEST_LENGTH),c=0;c<8;c++)f[c*4]=this.state[c]>>>24&255,f[c*4+1]=this.state[c]>>>16&255,f[c*4+2]=this.state[c]>>>8&255,f[c*4+3]=this.state[c]>>>0&255;return f},e.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,a=n.state,c=a[0],f=a[1],g=a[2],l=a[3],d=a[4],y=a[5],S=a[6],w=a[7],U=0;U<o.BLOCK_SIZE;U++){if(U<16)this.temp[U]=(s[U*4]&255)<<24|(s[U*4+1]&255)<<16|(s[U*4+2]&255)<<8|s[U*4+3]&255;else{var A=this.temp[U-2],E=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10;A=this.temp[U-15];var T=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3;this.temp[U]=(E+this.temp[U-7]|0)+(T+this.temp[U-16]|0)}var B=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&y^~d&S)|0)+(w+(o.KEY[U]+this.temp[U]|0)|0)|0,q=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&f^c&g^f&g)|0;w=S,S=y,y=d,d=l+B|0,l=g,g=f,f=c,c=B+q|0}a[0]+=c,a[1]+=f,a[2]+=g,a[3]+=l,a[4]+=d,a[5]+=y,a[6]+=S,a[7]+=w},e})();return ne.RawSha256=r,ne}var We={},ie={};const lr=o=>{const r=[];for(let e=0,n=o.length;e<n;e++){const s=o.charCodeAt(e);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192,s&63|128);else if(e+1<o.length&&(s&64512)===55296&&(o.charCodeAt(e+1)&64512)===56320){const a=65536+((s&1023)<<10)+(o.charCodeAt(++e)&1023);r.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else r.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(r)},gr=o=>{let r="";for(let e=0,n=o.length;e<n;e++){const s=o[e];if(s<128)r+=String.fromCharCode(s);else if(192<=s&&s<224){const a=o[++e];r+=String.fromCharCode((s&31)<<6|a&63)}else if(240<=s&&s<365){const a="%"+[s,o[++e],o[++e],o[++e]].map(c=>c.toString(16)).join("%");r+=decodeURIComponent(a)}else r+=String.fromCharCode((s&15)<<12|(o[++e]&63)<<6|o[++e]&63)}return r};function pr(o){return new TextEncoder().encode(o)}function dr(o){return new TextDecoder("utf-8").decode(o)}const vr=o=>typeof TextEncoder=="function"?pr(o):lr(o),yr=o=>typeof TextDecoder=="function"?dr(o):gr(o),Sr=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:vr,toUtf8:yr},Symbol.toStringTag,{value:"Module"})),mr=Pe(Sr);var Ze;function wr(){if(Ze)return ie;Ze=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.convertToBuffer=void 0;var o=mr,r=typeof we<"u"&&we.from?function(n){return we.from(n,"utf8")}:o.fromUtf8;function e(n){return n instanceof Uint8Array?n:typeof n=="string"?r(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return ie.convertToBuffer=e,ie}var se={},ze;function Ar(){if(ze)return se;ze=1,Object.defineProperty(se,"__esModule",{value:!0}),se.isEmptyData=void 0;function o(r){return typeof r=="string"?r.length===0:r.byteLength===0}return se.isEmptyData=o,se}var oe={},Xe;function Cr(){if(Xe)return oe;Xe=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.numToUint8=void 0;function o(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}return oe.numToUint8=o,oe}var ae={},$e;function Ur(){if($e)return ae;$e=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.uint32ArrayFrom=void 0;function o(r){if(!Array.from){for(var e=new Uint32Array(r.length),n=0;n<r.length;)e[n]=r[n];return e}return Uint32Array.from(r)}return ae.uint32ArrayFrom=o,ae}var Qe;function Er(){return Qe||(Qe=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.uint32ArrayFrom=o.numToUint8=o.isEmptyData=o.convertToBuffer=void 0;var r=wr();Object.defineProperty(o,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var e=Ar();Object.defineProperty(o,"isEmptyData",{enumerable:!0,get:function(){return e.isEmptyData}});var n=Cr();Object.defineProperty(o,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=Ur();Object.defineProperty(o,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(We)),We}var et;function Tr(){if(et)return re;et=1,Object.defineProperty(re,"__esModule",{value:!0}),re.Sha256=void 0;var o=St,r=mt(),e=hr(),n=Er(),s=(function(){function c(f){if(this.hash=new e.RawSha256,f){this.outer=new e.RawSha256;var g=a(f),l=new Uint8Array(r.BLOCK_SIZE);l.set(g);for(var d=0;d<r.BLOCK_SIZE;d++)g[d]^=54,l[d]^=92;this.hash.update(g),this.outer.update(l);for(var d=0;d<g.byteLength;d++)g[d]=0}}return c.prototype.update=function(f){if(!((0,n.isEmptyData)(f)||this.error))try{this.hash.update((0,n.convertToBuffer)(f))}catch(g){this.error=g}},c.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},c.prototype.digest=function(){return(0,o.__awaiter)(this,void 0,void 0,function(){return(0,o.__generator)(this,function(f){return[2,this.digestSync()]})})},c})();re.Sha256=s;function a(c){var f=(0,n.convertToBuffer)(c);if(f.byteLength>r.BLOCK_SIZE){var g=new e.RawSha256;g.update(f),f=g.digest()}var l=new Uint8Array(r.BLOCK_SIZE);return l.set(f),l}return re}var tt;function Dr(){return tt||(tt=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0});var r=St;(0,r.__exportStar)(Tr(),o)})(Ye)),Ye}var ue=Dr();function m(o,r){o!=null&&this.fromString(o,r)}function O(){return new m(null)}var H,Ir=0xdeadbeefcafe,rt=(Ir&16777215)==15715070;function br(o,r,e,n,s,a){for(;--a>=0;){var c=r*this[o++]+e[n]+s;s=Math.floor(c/67108864),e[n++]=c&67108863}return s}function _r(o,r,e,n,s,a){for(var c=r&32767,f=r>>15;--a>=0;){var g=this[o]&32767,l=this[o++]>>15,d=f*g+l*c;g=c*g+((d&32767)<<15)+e[n]+(s&1073741823),s=(g>>>30)+(d>>>15)+f*l+(s>>>30),e[n++]=g&1073741823}return s}function Pr(o,r,e,n,s,a){for(var c=r&16383,f=r>>14;--a>=0;){var g=this[o]&16383,l=this[o++]>>14,d=f*g+l*c;g=c*g+((d&16383)<<14)+e[n]+s,s=(g>>28)+(d>>14)+f*l,e[n++]=g&268435455}return s}var nt=typeof navigator<"u";nt&&rt&&navigator.appName=="Microsoft Internet Explorer"?(m.prototype.am=_r,H=30):nt&&rt&&navigator.appName!="Netscape"?(m.prototype.am=br,H=26):(m.prototype.am=Pr,H=28);m.prototype.DB=H;m.prototype.DM=(1<<H)-1;m.prototype.DV=1<<H;var Re=52;m.prototype.FV=Math.pow(2,Re);m.prototype.F1=Re-H;m.prototype.F2=2*H-Re;var Rr="0123456789abcdefghijklmnopqrstuvwxyz",Se=new Array,ee,V;ee=48;for(V=0;V<=9;++V)Se[ee++]=V;ee=97;for(V=10;V<36;++V)Se[ee++]=V;ee=65;for(V=10;V<36;++V)Se[ee++]=V;function it(o){return Rr.charAt(o)}function kr(o,r){var e=Se[o.charCodeAt(r)];return e??-1}function Or(o){for(var r=this.t-1;r>=0;--r)o[r]=this[r];o.t=this.t,o.s=this.s}function Br(o){this.t=1,this.s=o<0?-1:0,o>0?this[0]=o:o<-1?this[0]=o+this.DV:this.t=0}function ke(o){var r=O();return r.fromInt(o),r}function Fr(o,r){var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=o.length,s=!1,a=0;--n>=0;){var c=kr(o,n);if(c<0){o.charAt(n)=="-"&&(s=!0);continue}s=!1,a==0?this[this.t++]=c:a+e>this.DB?(this[this.t-1]|=(c&(1<<this.DB-a)-1)<<a,this[this.t++]=c>>this.DB-a):this[this.t-1]|=c<<a,a+=e,a>=this.DB&&(a-=this.DB)}this.clamp(),s&&m.ZERO.subTo(this,this)}function Mr(){for(var o=this.s&this.DM;this.t>0&&this[this.t-1]==o;)--this.t}function xr(o){if(this.s<0)return"-"+this.negate().toString(o);var r;if(o==16)r=4;else if(o==8)r=3;else if(o==2)r=1;else if(o==32)r=5;else if(o==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var e=(1<<r)-1,n,s=!1,a="",c=this.t,f=this.DB-c*this.DB%r;if(c-- >0)for(f<this.DB&&(n=this[c]>>f)>0&&(s=!0,a=it(n));c>=0;)f<r?(n=(this[c]&(1<<f)-1)<<r-f,n|=this[--c]>>(f+=this.DB-r)):(n=this[c]>>(f-=r)&e,f<=0&&(f+=this.DB,--c)),n>0&&(s=!0),s&&(a+=it(n));return s?a:"0"}function Nr(){var o=O();return m.ZERO.subTo(this,o),o}function Kr(){return this.s<0?this.negate():this}function Vr(o){var r=this.s-o.s;if(r!=0)return r;var e=this.t;if(r=e-o.t,r!=0)return this.s<0?-r:r;for(;--e>=0;)if((r=this[e]-o[e])!=0)return r;return 0}function Oe(o){var r=1,e;return(e=o>>>16)!=0&&(o=e,r+=16),(e=o>>8)!=0&&(o=e,r+=8),(e=o>>4)!=0&&(o=e,r+=4),(e=o>>2)!=0&&(o=e,r+=2),(e=o>>1)!=0&&(o=e,r+=1),r}function Lr(){return this.t<=0?0:this.DB*(this.t-1)+Oe(this[this.t-1]^this.s&this.DM)}function qr(o,r){var e;for(e=this.t-1;e>=0;--e)r[e+o]=this[e];for(e=o-1;e>=0;--e)r[e]=0;r.t=this.t+o,r.s=this.s}function jr(o,r){for(var e=o;e<this.t;++e)r[e-o]=this[e];r.t=Math.max(this.t-o,0),r.s=this.s}function Hr(o,r){var e=o%this.DB,n=this.DB-e,s=(1<<n)-1,a=Math.floor(o/this.DB),c=this.s<<e&this.DM,f;for(f=this.t-1;f>=0;--f)r[f+a+1]=this[f]>>n|c,c=(this[f]&s)<<e;for(f=a-1;f>=0;--f)r[f]=0;r[a]=c,r.t=this.t+a+1,r.s=this.s,r.clamp()}function Yr(o,r){r.s=this.s;var e=Math.floor(o/this.DB);if(e>=this.t){r.t=0;return}var n=o%this.DB,s=this.DB-n,a=(1<<n)-1;r[0]=this[e]>>n;for(var c=e+1;c<this.t;++c)r[c-e-1]|=(this[c]&a)<<s,r[c-e]=this[c]>>n;n>0&&(r[this.t-e-1]|=(this.s&a)<<s),r.t=this.t-e,r.clamp()}function Gr(o,r){for(var e=0,n=0,s=Math.min(o.t,this.t);e<s;)n+=this[e]-o[e],r[e++]=n&this.DM,n>>=this.DB;if(o.t<this.t){for(n-=o.s;e<this.t;)n+=this[e],r[e++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;e<o.t;)n-=o[e],r[e++]=n&this.DM,n>>=this.DB;n-=o.s}r.s=n<0?-1:0,n<-1?r[e++]=this.DV+n:n>0&&(r[e++]=n),r.t=e,r.clamp()}function Jr(o,r){var e=this.abs(),n=o.abs(),s=e.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+e.t]=e.am(0,n[s],r,s,0,e.t);r.s=0,r.clamp(),this.s!=o.s&&m.ZERO.subTo(r,r)}function Wr(o){for(var r=this.abs(),e=o.t=2*r.t;--e>=0;)o[e]=0;for(e=0;e<r.t-1;++e){var n=r.am(e,r[e],o,2*e,0,1);(o[e+r.t]+=r.am(e+1,2*r[e],o,2*e+1,n,r.t-e-1))>=r.DV&&(o[e+r.t]-=r.DV,o[e+r.t+1]=1)}o.t>0&&(o[o.t-1]+=r.am(e,r[e],o,2*e,0,1)),o.s=0,o.clamp()}function Zr(o,r,e){var n=o.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){r?.fromInt(0),e!=null&&this.copyTo(e);return}e==null&&(e=O());var a=O(),c=this.s,f=o.s,g=this.DB-Oe(n[n.t-1]);g>0?(n.lShiftTo(g,a),s.lShiftTo(g,e)):(n.copyTo(a),s.copyTo(e));var l=a.t,d=a[l-1];if(d!=0){var y=d*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),S=this.FV/y,w=(1<<this.F1)/y,U=1<<this.F2,A=e.t,E=A-l,T=r??O();for(a.dlShiftTo(E,T),e.compareTo(T)>=0&&(e[e.t++]=1,e.subTo(T,e)),m.ONE.dlShiftTo(l,T),T.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--E>=0;){var B=e[--A]==d?this.DM:Math.floor(e[A]*S+(e[A-1]+U)*w);if((e[A]+=a.am(0,B,e,E,0,l))<B)for(a.dlShiftTo(E,T),e.subTo(T,e);e[A]<--B;)e.subTo(T,e)}r!=null&&(e.drShiftTo(l,r),c!=f&&m.ZERO.subTo(r,r)),e.t=l,e.clamp(),g>0&&e.rShiftTo(g,e),c<0&&m.ZERO.subTo(e,e)}}}function zr(o){var r=O();return this.abs().divRemTo(o,null,r),this.s<0&&r.compareTo(m.ZERO)>0&&o.subTo(r,r),r}function Xr(){if(this.t<1)return 0;var o=this[0];if((o&1)==0)return 0;var r=o&3;return r=r*(2-(o&15)*r)&15,r=r*(2-(o&255)*r)&255,r=r*(2-((o&65535)*r&65535))&65535,r=r*(2-o*r%this.DV)%this.DV,r>0?this.DV-r:-r}function $r(o){return this.compareTo(o)==0}function Qr(o,r){for(var e=0,n=0,s=Math.min(o.t,this.t);e<s;)n+=this[e]+o[e],r[e++]=n&this.DM,n>>=this.DB;if(o.t<this.t){for(n+=o.s;e<this.t;)n+=this[e],r[e++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;e<o.t;)n+=o[e],r[e++]=n&this.DM,n>>=this.DB;n+=o.s}r.s=n<0?-1:0,n>0?r[e++]=n:n<-1&&(r[e++]=this.DV+n),r.t=e,r.clamp()}function en(o){var r=O();return this.addTo(o,r),r}function tn(o){var r=O();return this.subTo(o,r),r}function rn(o){var r=O();return this.multiplyTo(o,r),r}function nn(o){var r=O();return this.divRemTo(o,r,null),r}function te(o){this.m=o,this.mp=o.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<o.DB-15)-1,this.mt2=2*o.t}function sn(o){var r=O();return o.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),o.s<0&&r.compareTo(m.ZERO)>0&&this.m.subTo(r,r),r}function on(o){var r=O();return o.copyTo(r),this.reduce(r),r}function an(o){for(;o.t<=this.mt2;)o[o.t++]=0;for(var r=0;r<this.m.t;++r){var e=o[r]&32767,n=e*this.mpl+((e*this.mph+(o[r]>>15)*this.mpl&this.um)<<15)&o.DM;for(e=r+this.m.t,o[e]+=this.m.am(0,n,o,r,0,this.m.t);o[e]>=o.DV;)o[e]-=o.DV,o[++e]++}o.clamp(),o.drShiftTo(this.m.t,o),o.compareTo(this.m)>=0&&o.subTo(this.m,o)}function un(o,r){o.squareTo(r),this.reduce(r)}function fn(o,r,e){o.multiplyTo(r,e),this.reduce(e)}te.prototype.convert=sn;te.prototype.revert=on;te.prototype.reduce=an;te.prototype.mulTo=fn;te.prototype.sqrTo=un;function cn(o,r,e){var n=o.bitLength(),s,a=ke(1),c=new te(r);if(n<=0)return a;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var f=new Array,g=3,l=s-1,d=(1<<s)-1;if(f[1]=c.convert(this),s>1){var y=O();for(c.sqrTo(f[1],y);g<=d;)f[g]=O(),c.mulTo(y,f[g-2],f[g]),g+=2}var S=o.t-1,w,U=!0,A=O(),E;for(n=Oe(o[S])-1;S>=0;){for(n>=l?w=o[S]>>n-l&d:(w=(o[S]&(1<<n+1)-1)<<l-n,S>0&&(w|=o[S-1]>>this.DB+n-l)),g=s;(w&1)==0;)w>>=1,--g;if((n-=g)<0&&(n+=this.DB,--S),U)f[w].copyTo(a),U=!1;else{for(;g>1;)c.sqrTo(a,A),c.sqrTo(A,a),g-=2;g>0?c.sqrTo(a,A):(E=a,a=A,A=E),c.mulTo(A,f[w],a)}for(;S>=0&&(o[S]&1<<n)==0;)c.sqrTo(a,A),E=a,a=A,A=E,--n<0&&(n=this.DB-1,--S)}var T=c.revert(a);return e(null,T),T}m.prototype.copyTo=Or;m.prototype.fromInt=Br;m.prototype.fromString=Fr;m.prototype.clamp=Mr;m.prototype.dlShiftTo=qr;m.prototype.drShiftTo=jr;m.prototype.lShiftTo=Hr;m.prototype.rShiftTo=Yr;m.prototype.subTo=Gr;m.prototype.multiplyTo=Jr;m.prototype.squareTo=Wr;m.prototype.divRemTo=Zr;m.prototype.invDigit=Xr;m.prototype.addTo=Qr;m.prototype.toString=xr;m.prototype.negate=Nr;m.prototype.abs=Kr;m.prototype.compareTo=Vr;m.prototype.bitLength=Lr;m.prototype.mod=zr;m.prototype.equals=$r;m.prototype.add=en;m.prototype.subtract=tn;m.prototype.multiply=rn;m.prototype.divide=nn;m.prototype.modPow=cn;m.ZERO=ke(0);m.ONE=ke(1);/*!
|
|
23
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
24
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
25
|
+
*/function Ce(o){return I.Buffer.from(new Ht().random(o).toString(),"hex")}var hn=/^[89a-f]/i,ln="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",gn="userAttributes.",$=(function(){function o(e){this.N=new m(ln,16),this.g=new m("2",16),this.k=new m(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=I.Buffer.from("Caldera Derived Key","utf8"),this.poolName=e}var r=o.prototype;return r.getSmallAValue=function(){return this.smallAValue},r.getLargeAValue=function(e){var n=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(s,a){s&&e(s,null),n.largeAValue=a,e(null,n.largeAValue)})},r.generateRandomSmallA=function(){var e=Ce(128).toString("hex"),n=new m(e,16);return n},r.generateRandomString=function(){return Ce(40).toString("base64")},r.getRandomPassword=function(){return this.randomPassword},r.getSaltDevices=function(){return this.SaltToHashDevices},r.getVerifierDevices=function(){return this.verifierDevices},r.generateHashDevice=function(e,n,s){var a=this;this.randomPassword=this.generateRandomString();var c=""+e+n+":"+this.randomPassword,f=this.hash(c),g=Ce(16).toString("hex");this.SaltToHashDevices=this.padHex(new m(g,16)),this.g.modPow(new m(this.hexHash(this.SaltToHashDevices+f),16),this.N,function(l,d){l&&s(l,null),a.verifierDevices=a.padHex(d),s(null,null)})},r.calculateA=function(e,n){var s=this;this.g.modPow(e,this.N,function(a,c){a&&n(a,null),c.mod(s.N).equals(m.ZERO)&&n(new Error("Illegal paramater. A mod N cannot be 0."),null),n(null,c)})},r.calculateU=function(e,n){this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(n));var s=new m(this.UHexHash,16);return s},r.hash=function(e){var n=new ue.Sha256;n.update(e);var s=n.digestSync(),a=I.Buffer.from(s).toString("hex");return new Array(64-a.length).join("0")+a},r.hexHash=function(e){return this.hash(I.Buffer.from(e,"hex"))},r.computehkdf=function(e,n){var s=I.Buffer.concat([this.infoBits,I.Buffer.from("","utf8")]),a=new ue.Sha256(n);a.update(e);var c=a.digestSync(),f=new ue.Sha256(c);f.update(s);var g=f.digestSync(),l=g,d=l.slice(0,16);return d},r.getPasswordAuthenticationKey=function(e,n,s,a,c){var f=this;if(s.mod(this.N).equals(m.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,s),this.UValue.equals(m.ZERO))throw new Error("U cannot be zero.");var g=""+this.poolName+e+":"+n,l=this.hash(g),d=new m(this.hexHash(this.padHex(a)+l),16);this.calculateS(d,s,function(y,S){y&&c(y,null);var w=f.computehkdf(I.Buffer.from(f.padHex(S),"hex"),I.Buffer.from(f.padHex(f.UValue),"hex"));c(null,w)})},r.calculateS=function(e,n,s){var a=this;this.g.modPow(e,this.N,function(c,f){c&&s(c,null);var g=n.subtract(a.k.multiply(f));g.modPow(a.smallAValue.add(a.UValue.multiply(e)),a.N,function(l,d){l&&s(l,null),s(null,d.mod(a.N))})})},r.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return gn},r.padHex=function(e){if(!(e instanceof m))throw new Error("Not a BigInteger");var n=e.compareTo(m.ZERO)<0,s=e.abs().toString(16);if(s=s.length%2!==0?"0"+s:s,s=hn.test(s)?"00"+s:s,n){var a=s.split("").map(function(f){var g=~parseInt(f,16)&15;return"0123456789ABCDEF".charAt(g)}).join(""),c=new m(a,16).add(m.ONE);s=c.toString(16),s.toUpperCase().startsWith("FF8")&&(s=s.substring(2))}return s},o})();/*!
|
|
26
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/var wt=(function(){function o(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var r=o.prototype;return r.getJwtToken=function(){return this.jwtToken},r.getExpiration=function(){return this.payload.exp},r.getIssuedAt=function(){return this.payload.iat},r.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(I.Buffer.from(e,"base64").toString("utf8"))}catch{return{}}},o})();function pn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,De(o,r)}function De(o,r){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},De(o,r)}var st=(function(o){function r(e){var n=e===void 0?{}:e,s=n.AccessToken;return o.call(this,s||"")||this}return pn(r,o),r})(wt);function dn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,Ie(o,r)}function Ie(o,r){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Ie(o,r)}var ot=(function(o){function r(e){var n=e===void 0?{}:e,s=n.IdToken;return o.call(this,s||"")||this}return dn(r,o),r})(wt);/*!
|
|
29
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
30
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
31
|
+
*/var at=(function(){function o(e){var n=e===void 0?{}:e,s=n.RefreshToken;this.token=s||""}var r=o.prototype;return r.getToken=function(){return this.token},o})(),vn="5.0.4";/*!
|
|
32
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
33
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
34
|
+
*/var yn="aws-amplify/"+vn,At={userAgent:yn,isReactNative:typeof navigator<"u"&&navigator.product==="ReactNative"},Sn=function(){return At.userAgent};/*!
|
|
35
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
36
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
37
|
+
*/var ut=(function(){function o(e){var n=e===void 0?{}:e,s=n.IdToken,a=n.RefreshToken,c=n.AccessToken,f=n.ClockDrift;if(c==null||s==null)throw new Error("Id token and Access Token must be present.");this.idToken=s,this.refreshToken=a,this.accessToken=c,this.clockDrift=f===void 0?this.calculateClockDrift():f}var r=o.prototype;return r.getIdToken=function(){return this.idToken},r.getRefreshToken=function(){return this.refreshToken},r.getAccessToken=function(){return this.accessToken},r.getClockDrift=function(){return this.clockDrift},r.calculateClockDrift=function(){var e=Math.floor(new Date/1e3),n=Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt());return e-n},r.isValid=function(){var e=Math.floor(new Date/1e3),n=e-this.clockDrift;return n<this.accessToken.getExpiration()&&n<this.idToken.getExpiration()},o})();/*!
|
|
38
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/var mn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ft=(function(){function o(){}var r=o.prototype;return r.getNowString=function(){var e=new Date,n=wn[e.getUTCDay()],s=mn[e.getUTCMonth()],a=e.getUTCDate(),c=e.getUTCHours();c<10&&(c="0"+c);var f=e.getUTCMinutes();f<10&&(f="0"+f);var g=e.getUTCSeconds();g<10&&(g="0"+g);var l=e.getUTCFullYear(),d=n+" "+s+" "+a+" "+c+":"+f+":"+g+" UTC "+l;return d},o})();/*!
|
|
41
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
42
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
+
*/var An=(function(){function o(e){var n=e===void 0?{}:e,s=n.Name,a=n.Value;this.Name=s||"",this.Value=a||""}var r=o.prototype;return r.getValue=function(){return this.Value},r.setValue=function(e){return this.Value=e,this},r.getName=function(){return this.Name},r.setName=function(e){return this.Name=e,this},r.toString=function(){return JSON.stringify(this)},r.toJSON=function(){return{Name:this.Name,Value:this.Value}},o})();/*!
|
|
44
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
45
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
46
|
+
*/var J={},Cn=(function(){function o(){}return o.setItem=function(r,e){return J[r]=e,J[r]},o.getItem=function(r){return Object.prototype.hasOwnProperty.call(J,r)?J[r]:void 0},o.removeItem=function(r){return delete J[r]},o.clear=function(){return J={},J},o})(),Ct=(function(){function o(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch{this.storageWindow=Cn}}var r=o.prototype;return r.getStorage=function(){return this.storageWindow},o})();/*!
|
|
47
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
48
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
49
|
+
*/var Un=typeof navigator<"u",ct=Un?At.isReactNative?"react-native":navigator.userAgent:"nodejs",ht=(function(){function o(e){if(e==null||e.Username==null||e.Pool==null)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||new Ct().getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var r=o.prototype;return r.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},r.getSignInUserSession=function(){return this.signInUserSession},r.getUsername=function(){return this.username},r.getAuthenticationFlowType=function(){return this.authenticationFlowType},r.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},r.initiateAuth=function(e,n){var s=this,a=e.getAuthParameters();a.USERNAME=this.username;var c=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),f={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:a,ClientMetadata:c};this.getUserContextData()&&(f.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",f,function(g,l){if(g)return n.onFailure(g);var d=l.ChallengeName,y=l.ChallengeParameters;return d==="CUSTOM_CHALLENGE"?(s.Session=l.Session,n.customChallenge(y)):(s.signInUserSession=s.getCognitoUserSession(l.AuthenticationResult),s.cacheTokens(),n.onSuccess(s.signInUserSession))})},r.authenticateUser=function(e,n){return this.authenticationFlowType==="USER_PASSWORD_AUTH"?this.authenticateUserPlainUsernamePassword(e,n):this.authenticationFlowType==="USER_SRP_AUTH"||this.authenticationFlowType==="CUSTOM_AUTH"?this.authenticateUserDefaultAuth(e,n):n.onFailure(new Error("Authentication flow type is invalid."))},r.authenticateUserDefaultAuth=function(e,n){var s=this,a=new $(this.pool.getUserPoolName()),c=new ft,f,g,l={};this.deviceKey!=null&&(l.DEVICE_KEY=this.deviceKey),l.USERNAME=this.username,a.getLargeAValue(function(d,y){d&&n.onFailure(d),l.SRP_A=y.toString(16),s.authenticationFlowType==="CUSTOM_AUTH"&&(l.CHALLENGE_NAME="SRP_A");var S=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),w={AuthFlow:s.authenticationFlowType,ClientId:s.pool.getClientId(),AuthParameters:l,ClientMetadata:S};s.getUserContextData(s.username)&&(w.UserContextData=s.getUserContextData(s.username)),s.client.request("InitiateAuth",w,function(U,A){if(U)return n.onFailure(U);var E=A.ChallengeParameters;s.username=E.USER_ID_FOR_SRP,s.userDataKey=s.keyPrefix+"."+s.username+".userData",f=new m(E.SRP_B,16),g=new m(E.SALT,16),s.getCachedDeviceKeyAndPassword(),a.getPasswordAuthenticationKey(s.username,e.getPassword(),f,g,function(T,B){T&&n.onFailure(T);var q=c.getNowString(),M=I.Buffer.concat([I.Buffer.from(s.pool.getUserPoolName(),"utf8"),I.Buffer.from(s.username,"utf8"),I.Buffer.from(E.SECRET_BLOCK,"base64"),I.Buffer.from(q,"utf8")]),Y=new ue.Sha256(B);Y.update(M);var W=Y.digestSync(),L=I.Buffer.from(W).toString("base64"),x={};x.USERNAME=s.username,x.PASSWORD_CLAIM_SECRET_BLOCK=E.SECRET_BLOCK,x.TIMESTAMP=q,x.PASSWORD_CLAIM_SIGNATURE=L,s.deviceKey!=null&&(x.DEVICE_KEY=s.deviceKey);var j=function(G,z){return s.client.request("RespondToAuthChallenge",G,function(X,he){return X&&X.code==="ResourceNotFoundException"&&X.message.toLowerCase().indexOf("device")!==-1?(x.DEVICE_KEY=null,s.deviceKey=null,s.randomPassword=null,s.deviceGroupKey=null,s.clearCachedDeviceKeyAndPassword(),j(G,z)):z(X,he)})},Z={ChallengeName:"PASSWORD_VERIFIER",ClientId:s.pool.getClientId(),ChallengeResponses:x,Session:A.Session,ClientMetadata:S};s.getUserContextData()&&(Z.UserContextData=s.getUserContextData()),j(Z,function(G,z){return G?n.onFailure(G):s.authenticateUserInternal(z,a,n)})})})})},r.authenticateUserPlainUsernamePassword=function(e,n){var s=this,a={};if(a.USERNAME=this.username,a.PASSWORD=e.getPassword(),!a.PASSWORD){n.onFailure(new Error("PASSWORD parameter is required"));return}var c=new $(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),this.deviceKey!=null&&(a.DEVICE_KEY=this.deviceKey);var f=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),g={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:a,ClientMetadata:f};this.getUserContextData(this.username)&&(g.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",g,function(l,d){return l?n.onFailure(l):s.authenticateUserInternal(d,c,n)})},r.authenticateUserInternal=function(e,n,s){var a=this,c=e.ChallengeName,f=e.ChallengeParameters;if(c==="SMS_MFA")return this.Session=e.Session,s.mfaRequired(c,f);if(c==="SELECT_MFA_TYPE")return this.Session=e.Session,s.selectMFAType(c,f);if(c==="MFA_SETUP")return this.Session=e.Session,s.mfaSetup(c,f);if(c==="SOFTWARE_TOKEN_MFA")return this.Session=e.Session,s.totpRequired(c,f);if(c==="CUSTOM_CHALLENGE")return this.Session=e.Session,s.customChallenge(f);if(c==="NEW_PASSWORD_REQUIRED"){this.Session=e.Session;var g=null,l=null,d=[],y=n.getNewPasswordRequiredChallengeUserAttributePrefix();if(f&&(g=JSON.parse(e.ChallengeParameters.userAttributes),l=JSON.parse(e.ChallengeParameters.requiredAttributes)),l)for(var S=0;S<l.length;S++)d[S]=l[S].substr(y.length);return s.newPasswordRequired(g,d)}if(c==="DEVICE_SRP_AUTH"){this.Session=e.Session,this.getDeviceResponse(s);return}this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=c,this.cacheTokens();var w=e.AuthenticationResult.NewDeviceMetadata;if(w==null)return s.onSuccess(this.signInUserSession);n.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(U){if(U)return s.onFailure(U);var A={Salt:I.Buffer.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:I.Buffer.from(n.getVerifierDevices(),"hex").toString("base64")};a.verifierDevices=A.PasswordVerifier,a.deviceGroupKey=w.DeviceGroupKey,a.randomPassword=n.getRandomPassword(),a.client.request("ConfirmDevice",{DeviceKey:w.DeviceKey,AccessToken:a.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:A,DeviceName:ct},function(E,T){return E?s.onFailure(E):(a.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,a.cacheDeviceKeyAndPassword(),T.UserConfirmationNecessary===!0?s.onSuccess(a.signInUserSession,T.UserConfirmationNecessary):s.onSuccess(a.signInUserSession))})})},r.completeNewPasswordChallenge=function(e,n,s,a){var c=this;if(!e)return s.onFailure(new Error("New password is required."));var f=new $(this.pool.getUserPoolName()),g=f.getNewPasswordRequiredChallengeUserAttributePrefix(),l={};n&&Object.keys(n).forEach(function(y){l[g+y]=n[y]}),l.NEW_PASSWORD=e,l.USERNAME=this.username;var d={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:l,Session:this.Session,ClientMetadata:a};this.getUserContextData()&&(d.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",d,function(y,S){return y?s.onFailure(y):c.authenticateUserInternal(S,f,s)})},r.getDeviceResponse=function(e,n){var s=this,a=new $(this.deviceGroupKey),c=new ft,f={};f.USERNAME=this.username,f.DEVICE_KEY=this.deviceKey,a.getLargeAValue(function(g,l){g&&e.onFailure(g),f.SRP_A=l.toString(16);var d={ChallengeName:"DEVICE_SRP_AUTH",ClientId:s.pool.getClientId(),ChallengeResponses:f,ClientMetadata:n,Session:s.Session};s.getUserContextData()&&(d.UserContextData=s.getUserContextData()),s.client.request("RespondToAuthChallenge",d,function(y,S){if(y)return e.onFailure(y);var w=S.ChallengeParameters,U=new m(w.SRP_B,16),A=new m(w.SALT,16);a.getPasswordAuthenticationKey(s.deviceKey,s.randomPassword,U,A,function(E,T){if(E)return e.onFailure(E);var B=c.getNowString(),q=I.Buffer.concat([I.Buffer.from(s.deviceGroupKey,"utf8"),I.Buffer.from(s.deviceKey,"utf8"),I.Buffer.from(w.SECRET_BLOCK,"base64"),I.Buffer.from(B,"utf8")]),M=new ue.Sha256(T);M.update(q);var Y=M.digestSync(),W=I.Buffer.from(Y).toString("base64"),L={};L.USERNAME=s.username,L.PASSWORD_CLAIM_SECRET_BLOCK=w.SECRET_BLOCK,L.TIMESTAMP=B,L.PASSWORD_CLAIM_SIGNATURE=W,L.DEVICE_KEY=s.deviceKey;var x={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:s.pool.getClientId(),ChallengeResponses:L,Session:S.Session};s.getUserContextData()&&(x.UserContextData=s.getUserContextData()),s.client.request("RespondToAuthChallenge",x,function(j,Z){return j?e.onFailure(j):(s.signInUserSession=s.getCognitoUserSession(Z.AuthenticationResult),s.cacheTokens(),e.onSuccess(s.signInUserSession))})})})})},r.confirmRegistration=function(e,n,s,a){var c={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:n,ClientMetadata:a};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",c,function(f){return f?s(f,null):s(null,"SUCCESS")})},r.sendCustomChallengeAnswer=function(e,n,s){var a=this,c={};c.USERNAME=this.username,c.ANSWER=e;var f=new $(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),this.deviceKey!=null&&(c.DEVICE_KEY=this.deviceKey);var g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:c,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:s};this.getUserContextData()&&(g.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",g,function(l,d){return l?n.onFailure(l):a.authenticateUserInternal(d,f,n)})},r.sendMFACode=function(e,n,s,a){var c=this,f={};f.USERNAME=this.username,f.SMS_MFA_CODE=e;var g=s||"SMS_MFA";g==="SOFTWARE_TOKEN_MFA"&&(f.SOFTWARE_TOKEN_MFA_CODE=e),this.deviceKey!=null&&(f.DEVICE_KEY=this.deviceKey);var l={ChallengeName:g,ChallengeResponses:f,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:a};this.getUserContextData()&&(l.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",l,function(d,y){if(d)return n.onFailure(d);var S=y.ChallengeName;if(S==="DEVICE_SRP_AUTH"){c.getDeviceResponse(n);return}if(c.signInUserSession=c.getCognitoUserSession(y.AuthenticationResult),c.cacheTokens(),y.AuthenticationResult.NewDeviceMetadata==null)return n.onSuccess(c.signInUserSession);var w=new $(c.pool.getUserPoolName());w.generateHashDevice(y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,y.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(U){if(U)return n.onFailure(U);var A={Salt:I.Buffer.from(w.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:I.Buffer.from(w.getVerifierDevices(),"hex").toString("base64")};c.verifierDevices=A.PasswordVerifier,c.deviceGroupKey=y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,c.randomPassword=w.getRandomPassword(),c.client.request("ConfirmDevice",{DeviceKey:y.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:c.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:A,DeviceName:ct},function(E,T){return E?n.onFailure(E):(c.deviceKey=y.AuthenticationResult.NewDeviceMetadata.DeviceKey,c.cacheDeviceKeyAndPassword(),T.UserConfirmationNecessary===!0?n.onSuccess(c.signInUserSession,T.UserConfirmationNecessary):n.onSuccess(c.signInUserSession))})})})},r.changePassword=function(e,n,s,a){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return s(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:a},function(c){return c?s(c,null):s(null,"SUCCESS")})},r.enableMFA=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var n=[],s={DeliveryMedium:"SMS",AttributeName:"phone_number"};n.push(s),this.client.request("SetUserSettings",{MFAOptions:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?e(a,null):e(null,"SUCCESS")})},r.setUserMfaPreference=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?s(a,null):s(null,"SUCCESS")})},r.disableMFA=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var n=[];this.client.request("SetUserSettings",{MFAOptions:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s){return s?e(s,null):e(null,"SUCCESS")})},r.deleteUser=function(e,n){var s=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},function(a){return a?e(a,null):(s.clearCachedUser(),e(null,"SUCCESS"))})},r.updateAttributes=function(e,n,s){var a=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:s},function(c,f){return c?n(c,null):a.getUserData(function(){return n(null,"SUCCESS",f)},{bypassCache:!0})})},r.getUserAttributes=function(e){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(n,s){if(n)return e(n,null);for(var a=[],c=0;c<s.UserAttributes.length;c++){var f={Name:s.UserAttributes[c].Name,Value:s.UserAttributes[c].Value},g=new An(f);a.push(g)}return e(null,a)})},r.getMFAOptions=function(e){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(n,s){return n?e(n,null):e(null,s.MFAOptions)})},r.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},r.refreshSessionIfPossible=function(e){var n=this;return e===void 0&&(e={}),new Promise(function(s){var a=n.signInUserSession.getRefreshToken();a&&a.getToken()?n.refreshSession(a,s,e.clientMetadata):s()})},r.getUserData=function(e,n){var s=this;if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var a=this.getUserDataFromCache();if(!a){this.fetchUserData().then(function(c){e(null,c)}).catch(e);return}if(this.isFetchUserDataAndTokenRequired(n)){this.fetchUserData().then(function(c){return s.refreshSessionIfPossible(n).then(function(){return c})}).then(function(c){return e(null,c)}).catch(e);return}try{e(null,JSON.parse(a));return}catch(c){this.clearCachedUserData(),e(c,null);return}},r.getUserDataFromCache=function(){var e=this.storage.getItem(this.userDataKey);return e},r.isFetchUserDataAndTokenRequired=function(e){var n=e||{},s=n.bypassCache,a=s===void 0?!1:s;return a},r.fetchUserData=function(){var e=this;return this.createGetUserRequest().then(function(n){return e.cacheUserData(n),n})},r.deleteAttributes=function(e,n){var s=this;if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return n(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?n(a,null):s.getUserData(function(){return n(null,"SUCCESS")},{bypassCache:!0})})},r.resendConfirmationCode=function(e,n){var s={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:n};this.client.request("ResendConfirmationCode",s,function(a,c){return a?e(a,null):e(null,c)})},r.getSession=function(e,n){if(n===void 0&&(n={}),this.username==null)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(this.signInUserSession!=null&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var s="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,a=s+".idToken",c=s+".accessToken",f=s+".refreshToken",g=s+".clockDrift";if(this.storage.getItem(a)){var l=new ot({IdToken:this.storage.getItem(a)}),d=new st({AccessToken:this.storage.getItem(c)}),y=new at({RefreshToken:this.storage.getItem(f)}),S=parseInt(this.storage.getItem(g),0)||0,w={IdToken:l,AccessToken:d,RefreshToken:y,ClockDrift:S},U=new ut(w);if(U.isValid())return this.signInUserSession=U,e(null,this.signInUserSession);if(!y.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(y,e,n.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},r.refreshSession=function(e,n,s){var a=this,c=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(n):n,f={};f.REFRESH_TOKEN=e.getToken();var g="CognitoIdentityServiceProvider."+this.pool.getClientId(),l=g+".LastAuthUser";if(this.storage.getItem(l)){this.username=this.storage.getItem(l);var d=g+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(d),f.DEVICE_KEY=this.deviceKey}var y={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:f,ClientMetadata:s};this.getUserContextData()&&(y.UserContextData=this.getUserContextData()),this.client.requestWithRetry("InitiateAuth",y,function(S,w){if(S)return S.code==="NotAuthorizedException"&&a.clearCachedUser(),c(S,null);if(w){var U=w.AuthenticationResult;return Object.prototype.hasOwnProperty.call(U,"RefreshToken")||(U.RefreshToken=e.getToken()),a.signInUserSession=a.getCognitoUserSession(U),a.cacheTokens(),c(null,a.signInUserSession)}})},r.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),n=e+"."+this.username+".idToken",s=e+"."+this.username+".accessToken",a=e+"."+this.username+".refreshToken",c=e+"."+this.username+".clockDrift",f=e+".LastAuthUser";this.storage.setItem(n,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(s,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(a,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(c,""+this.signInUserSession.getClockDrift()),this.storage.setItem(f,this.username)},r.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},r.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},r.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},r.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.setItem(n,this.deviceKey),this.storage.setItem(s,this.randomPassword),this.storage.setItem(a,this.deviceGroupKey)},r.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.getItem(n)&&(this.deviceKey=this.storage.getItem(n),this.randomPassword=this.storage.getItem(s),this.deviceGroupKey=this.storage.getItem(a))},r.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.removeItem(n),this.storage.removeItem(s),this.storage.removeItem(a)},r.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),n=e+"."+this.username+".idToken",s=e+"."+this.username+".accessToken",a=e+"."+this.username+".refreshToken",c=e+".LastAuthUser",f=e+"."+this.username+".clockDrift";this.storage.removeItem(n),this.storage.removeItem(s),this.storage.removeItem(a),this.storage.removeItem(c),this.storage.removeItem(f)},r.getCognitoUserSession=function(e){var n=new ot(e),s=new st(e),a=new at(e),c={IdToken:n,AccessToken:s,RefreshToken:a};return new ut(c)},r.forgotPassword=function(e,n){var s={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",s,function(a,c){return a?e.onFailure(a):typeof e.inputVerificationCode=="function"?e.inputVerificationCode(c):e.onSuccess(c)})},r.confirmPassword=function(e,n,s,a){var c={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:n,ClientMetadata:a};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",c,function(f){return f?s.onFailure(f):s.onSuccess("SUCCESS")})},r.getAttributeVerificationCode=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:s},function(a,c){return a?n.onFailure(a):typeof n.inputVerificationCode=="function"?n.inputVerificationCode(c):n.onSuccess("SUCCESS")})},r.verifyAttribute=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?s.onFailure(a):s.onSuccess("SUCCESS")})},r.getDevice=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(n,s){return n?e.onFailure(n):e.onSuccess(s)})},r.forgetSpecificDevice=function(e,n){if(this.signInUserSession==null||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(s){return s?n.onFailure(s):n.onSuccess("SUCCESS")})},r.forgetDevice=function(e){var n=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(s){return n.deviceKey=null,n.deviceGroupKey=null,n.randomPassword=null,n.clearCachedDeviceKeyAndPassword(),e.onSuccess(s)}})},r.setDeviceStatusRemembered=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(n){return n?e.onFailure(n):e.onSuccess("SUCCESS")})},r.setDeviceStatusNotRemembered=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(n){return n?e.onFailure(n):e.onSuccess("SUCCESS")})},r.listDevices=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s.onFailure(new Error("User is not authenticated"));var a={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};n&&(a.PaginationToken=n),this.client.request("ListDevices",a,function(c,f){return c?s.onFailure(c):s.onSuccess(f)})},r.globalSignOut=function(e){var n=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s){return s?e.onFailure(s):(n.clearCachedUser(),e.onSuccess("SUCCESS"))})},r.signOut=function(e){var n=this;if(!e||typeof e!="function"){this.cleanClientData();return}this.getSession(function(s,a){if(s)return e(s);n.revokeTokens(function(c){n.cleanClientData(),e(c)})})},r.revokeTokens=function(e){if(e===void 0&&(e=function(){}),typeof e!="function")throw new Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession){var n=new Error("User is not authenticated");return e(n)}if(!this.signInUserSession.getAccessToken()){var s=new Error("No Access token available");return e(s)}var a=this.signInUserSession.getRefreshToken().getToken(),c=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(c)&&a)return this.revokeToken({token:a,callback:e});e()},r.isSessionRevocable=function(e){if(e&&typeof e.decodePayload=="function")try{var n=e.decodePayload(),s=n.origin_jti;return!!s}catch{}return!1},r.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},r.revokeToken=function(e){var n=e.token,s=e.callback;this.client.requestWithRetry("RevokeToken",{Token:n,ClientId:this.pool.getClientId()},function(a){if(a)return s(a);s()})},r.sendMFASelectionAnswer=function(e,n){var s=this,a={};a.USERNAME=this.username,a.ANSWER=e;var c={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:a,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",c,function(f,g){if(f)return n.onFailure(f);if(s.Session=g.Session,e==="SMS_MFA")return n.mfaRequired(g.ChallengeName,g.ChallengeParameters);if(e==="SOFTWARE_TOKEN_MFA")return n.totpRequired(g.ChallengeName,g.ChallengeParameters)})},r.getUserContextData=function(){var e=this.pool;return e.getUserContextData(this.username)},r.associateSoftwareToken=function(e){var n=this;this.signInUserSession!=null&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s,a){return s?e.onFailure(s):e.associateSecretCode(a.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(s,a){return s?e.onFailure(s):(n.Session=a.Session,e.associateSecretCode(a.SecretCode))})},r.verifySoftwareToken=function(e,n,s){var a=this;this.signInUserSession!=null&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:n},function(c,f){return c?s.onFailure(c):s.onSuccess(f)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:n},function(c,f){if(c)return s.onFailure(c);a.Session=f.Session;var g={};g.USERNAME=a.username;var l={ChallengeName:"MFA_SETUP",ClientId:a.pool.getClientId(),ChallengeResponses:g,Session:a.Session};a.getUserContextData()&&(l.UserContextData=a.getUserContextData()),a.client.request("RespondToAuthChallenge",l,function(d,y){return d?s.onFailure(d):(a.signInUserSession=a.getCognitoUserSession(y.AuthenticationResult),a.cacheTokens(),s.onSuccess(a.signInUserSession))})})},o})();function En(o,r){return r=r||{},new Promise(function(e,n){var s=new XMLHttpRequest,a=[],c=[],f={},g=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:g,headers:{keys:function(){return a},entries:function(){return c},get:function(d){return f[d.toLowerCase()]},has:function(d){return d.toLowerCase()in f}}}};for(var l in s.open(r.method||"get",o,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(d,y,S){a.push(y=y.toLowerCase()),c.push([y,S]),f[y]=f[y]?f[y]+","+S:S}),e(g())},s.onerror=n,s.withCredentials=r.credentials=="include",r.headers)s.setRequestHeader(l,r.headers[l]);s.send(r.body||null)})}const Tn=Object.freeze(Object.defineProperty({__proto__:null,default:En},Symbol.toStringTag,{value:"Module"})),lt=Pe(Tn);var gt,pt;function Dn(){return pt||(pt=1,gt=self.fetch||(self.fetch=lt.default||lt)),gt}Dn();function Q(){}Q.prototype.userAgent=Sn();var In=function(o){var r=Q.category?" "+Q.category:"",e=Q.framework?" framework/"+Q.framework:"",n=""+Q.prototype.userAgent+r+e;return n};function bn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,ce(o,r)}function be(o){var r=typeof Map=="function"?new Map:void 0;return be=function(e){if(e===null||!Pn(e))return e;if(typeof e!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return _n(e,arguments,_e(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ce(n,e)},be(o)}function _n(o,r,e){if(Ut())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,r);var s=new(o.bind.apply(o,n));return e&&ce(s,e.prototype),s}function Ut(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ut=function(){return!!o})()}function Pn(o){try{return Function.toString.call(o).indexOf("[native code]")!==-1}catch{return typeof o=="function"}}function ce(o,r){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},ce(o,r)}function _e(o){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_e(o)}var Rn=(function(o){function r(e,n,s,a){var c;return c=o.call(this,e)||this,c.code=n,c.name=s,c.statusCode=a,c}return bn(r,o),r})(be(Error)),kn=(function(){function o(e,n,s){this.endpoint=n||"https://cognito-idp."+e+".amazonaws.com/";var a=s||{},c=a.credentials;this.fetchOptions=c?{credentials:c}:{}}var r=o.prototype;return r.promisifyRequest=function(e,n){var s=this;return new Promise(function(a,c){s.request(e,n,function(f,g){f?c(new Rn(f.message,f.code,f.name,f.statusCode)):a(g)})})},r.requestWithRetry=function(e,n,s){var a=this,c=5*1e3;Fn(function(f){return new Promise(function(g,l){a.request(e,f,function(d,y){d?l(d):g(y)})})},[n],c).then(function(f){return s(null,f)}).catch(function(f){return s(f)})},r.request=function(e,n,s){var a={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":In(),"Cache-Control":"no-store"},c=Object.assign({},this.fetchOptions,{headers:a,method:"POST",mode:"cors",body:JSON.stringify(n)}),f;fetch(this.endpoint,c).then(function(g){return f=g,g},function(g){throw g instanceof TypeError?new Error("Network error"):g}).then(function(g){return g.json().catch(function(){return{}})}).then(function(g){if(f.ok)return s(null,g);var l=(g.__type||g.code).split("#").pop(),d=new Error(g.message||g.Message||null);return d.name=l,d.code=l,s(d)}).catch(function(g){if(f&&f.headers&&f.headers.get("x-amzn-errortype"))try{var l=f.headers.get("x-amzn-errortype").split(":")[0],d=new Error(f.status?f.status.toString():null);return d.code=l,d.name=l,d.statusCode=f.status,s(d)}catch{return s(g)}else g instanceof Error&&g.message==="Network error"&&(g.code="NetworkError");return s(g)})},o})(),ye={debug:function(){}},On=function(o){var r="nonRetryable";return o&&o[r]};function Et(o,r,e,n){if(n===void 0&&(n=1),typeof o!="function")throw Error("functionToRetry must be a function");return ye.debug(o.name+" attempt #"+n+" with args: "+JSON.stringify(r)),o.apply(void 0,r).catch(function(s){if(ye.debug("error on "+o.name,s),On(s))throw ye.debug(o.name+" non retryable error",s),s;var a=e(n,r,s);if(ye.debug(o.name+" retrying in "+a+" ms"),a!==!1)return new Promise(function(c){return setTimeout(c,a)}).then(function(){return Et(o,r,e,n+1)});throw s})}function Bn(o){var r=100,e=100;return function(n){var s=Math.pow(2,n)*r+e*Math.random();return s>o?!1:s}}function Fn(o,r,e){return Et(o,r,Bn(e))}/*!
|
|
50
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/var Mn=55,Hn=(function(){function o(e,n){var s=e||{},a=s.UserPoolId,c=s.ClientId,f=s.endpoint,g=s.fetchOptions,l=s.AdvancedSecurityDataCollectionFlag;if(!a||!c)throw new Error("Both UserPoolId and ClientId are required.");if(a.length>Mn||!/^[\w-]+_[0-9a-zA-Z]+$/.test(a))throw new Error("Invalid UserPoolId format.");var d=a.split("_")[0];this.userPoolId=a,this.clientId=c,this.client=new kn(d,f,g),this.advancedSecurityDataCollectionFlag=l!==!1,this.storage=e.Storage||new Ct().getStorage(),n&&(this.wrapRefreshSessionCallback=n)}var r=o.prototype;return r.getUserPoolId=function(){return this.userPoolId},r.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},r.getClientId=function(){return this.clientId},r.signUp=function(e,n,s,a,c,f){var g=this,l={ClientId:this.clientId,Username:e,Password:n,UserAttributes:s,ValidationData:a,ClientMetadata:f};this.getUserContextData(e)&&(l.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",l,function(d,y){if(d)return c(d,null);var S={Username:e,Pool:g,Storage:g.storage},w={user:new ht(S),userConfirmed:y.UserConfirmed,userSub:y.UserSub,codeDeliveryDetails:y.CodeDeliveryDetails};return c(null,w)})},r.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",n=this.storage.getItem(e);if(n){var s={Username:n,Pool:this,Storage:this.storage};return new ht(s)}return null},r.getUserContextData=function(e){if(!(typeof AmazonCognitoAdvancedSecurityData>"u")){var n=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var s=n.getData(e,this.userPoolId,this.clientId);if(s){var a={EncodedData:s};return a}}return{}}},o})(),dt={exports:{}};/*!
|
|
53
|
+
* JavaScript Cookie v2.2.1
|
|
54
|
+
* https://github.com/js-cookie/js-cookie
|
|
55
|
+
*
|
|
56
|
+
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
57
|
+
* Released under the MIT license
|
|
58
|
+
*/var vt;function xn(){return vt||(vt=1,(function(o,r){(function(e){var n;if(o.exports=e(),n=!0,!n){var s=window.Cookies,a=window.Cookies=e();a.noConflict=function(){return window.Cookies=s,a}}})(function(){function e(){for(var a=0,c={};a<arguments.length;a++){var f=arguments[a];for(var g in f)c[g]=f[g]}return c}function n(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(a){function c(){}function f(l,d,y){if(!(typeof document>"u")){y=e({path:"/"},c.defaults,y),typeof y.expires=="number"&&(y.expires=new Date(new Date*1+y.expires*864e5)),y.expires=y.expires?y.expires.toUTCString():"";try{var S=JSON.stringify(d);/^[\{\[]/.test(S)&&(d=S)}catch{}d=a.write?a.write(d,l):encodeURIComponent(String(d)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),l=encodeURIComponent(String(l)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var w="";for(var U in y)y[U]&&(w+="; "+U,y[U]!==!0&&(w+="="+y[U].split(";")[0]));return document.cookie=l+"="+d+w}}function g(l,d){if(!(typeof document>"u")){for(var y={},S=document.cookie?document.cookie.split("; "):[],w=0;w<S.length;w++){var U=S[w].split("="),A=U.slice(1).join("=");!d&&A.charAt(0)==='"'&&(A=A.slice(1,-1));try{var E=n(U[0]);if(A=(a.read||a)(A,E)||n(A),d)try{A=JSON.parse(A)}catch{}if(y[E]=A,l===E)break}catch{}}return l?y[l]:y}}return c.set=f,c.get=function(l){return g(l,!1)},c.getJSON=function(l){return g(l,!0)},c.remove=function(l,d){f(l,"",e(d,{expires:-1}))},c.defaults={},c.withConverter=s,c}return s(function(){})})})(dt)),dt.exports}xn();export{jn as AuthenticationDetails,$ as AuthenticationHelper,st as CognitoAccessToken,ot as CognitoIdToken,at as CognitoRefreshToken,ht as CognitoUser,An as CognitoUserAttribute,Hn as CognitoUserPool,ut as CognitoUserSession,ft as DateHelper,Ht as WordArray};
|