@alipay/ams-checkout 0.0.1691743027-dev.0 → 0.0.1691743027-dev.3

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.
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={861:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},207:function(e,t,n){"use strict";var r=n(861),o=n(90),i=n(736);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n);e=s(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,p=0;p<c;p++)if(u(e,i+p)!==u(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return Y(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return Y(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return w(e,t,n,r)}function R(e,t,n,r){return Y(z(t),e,n,r)}function A(e,t,n,r){return Y(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.lW=c,t.h2=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).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}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=K(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}},736:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},90:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=u}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m}},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},374:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},404:function(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},400:function(e,t,n){var r=n(242),o=n(424),i=n(983);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,n){var r=n(281);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},242:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},821:function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},424:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,n){var r=n(143);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},983:function(e,t,n){var r=n(944).default,o=n(374);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},662:function(e,t,n){var r=n(944).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new x(r||[]);return a(i,"_invoke",{value:A(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h={};function m(){}function v(){}function y(){}var g={};f(g,c,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==n&&i.call(b,c)&&(g=b);var w=y.prototype=m.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(o,a,s,c){var u=d(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return v.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},_(R.prototype),f(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new R(p(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),o=n(249),i=n(508),a=n(20);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,o=n(224);e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AMSAutoDebit:function(){return xr},AMSCheckout:function(){return Tr},checkoutDisplayEnum:function(){return G},componentSignEnum:function(){return H},default:function(){return Pr},environmentEnum:function(){return Q},errorEnum:function(){return re},localeEnum:function(){return V},messageName:function(){return te},modeEnum:function(){return J},networkModeEnum:function(){return Z},osTypeEnum:function(){return $},paymentMethodCategoryTypeEnum:function(){return W},platformEnum:function(){return ee},productSceneEnum:function(){return q},renderDisplayTypeEnum:function(){return Y},targetEnum:function(){return ne},terminalTypeEnum:function(){return X}});var e=n(702),t=n.n(e),o=n(486),i=n.n(o),a=n(821),s=n.n(a),c=n(400),u=n.n(c),l=n(374),f=n.n(l),p=n(143),d=n.n(p),h=n(925),m=n.n(h),v={DOMAIN_NOT_IN_WHITE_LIST:{code:"SDK_INTERNAL_ERROR",message:"Origin of the message is not in the white list"},NOT_JSON_FORMAT:{code:"SDK_INTERNAL_ERROR",message:"The message string should conform to the json format"},SDK_COMPATIBILITY_ISSUES:{code:"SDK_INTERNAL_ERROR",BROWSER_NOT_SUPPORT_POSTMESSAGE:{code:"SDK_INTERNAL_ERROR",message:"The browser does not support the postmessage communication mode"},FAILED_TO_CREATE_IFRAME:{code:"SDK_INTERNAL_ERROR",message:"Failed to create iframe"}},INIT_PARAMETER_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",UI_MODE_NOT_SUPPORTED:{code:"SDK_INIT_PARAMETER_ERROR",message:"This UI mode is not supported"},ENVIRONMENT_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"The current input environment does not support or is not in the standard enumeration"},MODE_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"mode value not in enum"},LOCALE_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"The current input language does not support or is not in the standard enumeration"},NET_MODE_NOT_SUPPORT:{code:"SDK_INIT_PARAMETER_ERROR",message:"The network mode is not supported"},EVENT_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"Parameter type should be function"}},CREATEPAYMENT_PARAMETER_ERROR:{code:"SDK_CREATEPAYMENT_PARAMETER_ERROR"},CONFIRMPAYMENT_PARAMETER_ERROR:{code:"SDK_CONFIRMPAYMENT_PARAMETER_ERROR"},CREATECOMPONENT_ERROR:{code:"SDK_CREATECOMPONENT_ERROR",message:"Failed to create component",SINGLETON_COMPONENT_ERROR:{code:"SDK_CREATECOMPONENT_ERROR",message:"Only one component can be rendered simultaneously"},LOAD_APP_TIMEOUT:{code:"SDK_CREATECOMPONENT_ERROR",message:"Load resource timeout"}},SDK_CALL_URL_ERROR:{code:"SDK_CALL_URL_ERROR",REDIRECT_ERROR:{code:"SDK_CALL_URL_ERROR",message:"Redirect data exception"}},SDK_SUBMIT_ERROR:{code:"SDK_SUBMIT_ERROR",message:"Component not created or current browser compatibility issue, not supported"}},y="COMPONENT",g={name:"onError",uniqueKey:"userOnError"},E={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},b={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},w={name:"onLog",uniqueKey:"userOnLog"},_={name:"onLaunch"},R={name:"onRedirect"},A={name:"onClose",uniqueKey:"userOnClose"},O={name:"onEventCallback",uniqueKey:"userEventCallback"},S={name:"submitForm"},T={name:"hideCloseButton"},x={name:"showCloseButton"},P={name:"setAllowRetention"},k={name:"declareCheckoutInfo"},C={name:"showPopup"},I={name:"dismissLoading"},D=n(662),N=n.n(D),L=n(404),M=n.n(L),U=n(118),B=n.n(U),j={dev:"http://page.alipay.net/page/antom-web-checkout/src/component-app",sit:"http://page.test.alipay.net/page/antom-web-checkout/src/component-app",pre:"https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app",sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",light_sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",prod:"https://ac.alipay.com/page/antom-web-checkout/src/component-app"},K="1.5.0",F=n(944),z=n.n(F),Y=function(e){return e.popup="popup",e.inline="inline",e}({}),H=function(e){return e.EASY_PAY_WALLET="EASY_PAY_WALLET",e.CASHIER_PAYMENT_CARD="CASHIER_PAYMENT_CARD",e.CASHIER_PAYMENT_BANK="CASHIER_PAYMENT_BANK",e.AUTO_DEBIT_WALLET="AUTO_DEBIT_WALLET",e.NONE="NONE",e}({}),q=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),W=function(e){return e.CARD="CARD",e.WALLET="WALLET",e.BANK="BANK",e}({}),V=function(e){return e["en-US"]="en-US",e}({}),G=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),J=function(e){return e.dropin="dropin",e.component="component",e}({}),Z=function(e){return e.proxy="proxy",e.session="session",e}({}),Q=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),$=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),X=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),ee=function(e){return e.desktop="desktop",e.mobile="mobile",e}({}),te=function(e){return e.SDK_TO_APP="SDK_TO_APP",e.APP_TO_SDK="APP_TO_SDK",e.APP_TO_APP="APP_TO_APP",e}({}),ne=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),re=function(e){return e.PARAMS="PARAMS",e.TIMEOUT="TIMEOUT",e.NETWORK="NETWORK",e.SYSTEM="SYSTEM",e.LOGIN="LOGIN",e.GATEWAY="GATEWAY",e.VALIDATION="VALIDATION",e.TAOBAOBINDALIPAY="TAOBAOBINDALIPAY",e.REGISTERWALLET="REGISTERWALLET",e.NOALIPAYID="NOALIPAYID",e.TRUSTLOGINERROR="TRUSTLOGINERROR",e.SIGNIN="SIGNIN",e.GETSIGNPARAMSERROR="GETSIGNPARAMSERROR",e}({}),oe=".".charCodeAt(0),ie=/\\(\\)?/g,ae=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ce=/^\w*$/;function ue(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function le(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=z()(e);return"number"===n||"boolean"===n||null===e||ce.test(e)||!se.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===oe&&r.push(""),n.replace(ae,(function(e,t,n,o){var i=e;return n?i=o.replace(ie,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function fe(e,t,n){var r=null===e?void 0:function(e,t){for(var n=le(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[ue(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var pe=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},de=function(){function e(){i()(this,e),d()(this,"events",void 0),d()(this,"eventsKey",void 0),this.events=new Map,this.eventsKey=new Map}return t()(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n){if(this.eventsKey.has("".concat(e,"-").concat(n)))return void console.warn("".concat(n,":Has been registered. Please use another key or do not pass the key"));this.eventsKey.set("".concat(e,"-").concat(n),!0)}var r=this.events.get(e)||[];r.push({func:t,key:n||""}),this.events.set(e,r)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n&&this.eventsKey.has("".concat(e,"-").concat(n))&&this.eventsKey.delete("".concat(e,"-").concat(n)),this.events.has(e)){var r=this.events.get(e);r=r.filter((function(e){return(t!==e.func||e.key!==n)&&(!e.key||e.key!==n)})),this.events.set(e,r)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.events.has(e)){var o=this.events.get(e);o.forEach((function(e){e.func.apply(e,n)}))}}},{key:"once",value:function(e,t,n){var r=this;this.on(e,(function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];t.call.apply(t,[r].concat(a)),r.off(e,o,n)}),n)}}]),e}(),he=window.navigator,me=he.userAgent,ve=/iPhone|iPad|iPod/i.test(me)||"MacIntel"===he.platform&&he.maxTouchPoints>1,ye=/Android/i.test(me),ge=(/\bMacintosh\b/.test(me),/Windows NT/.test(me),ve),Ee=ye,be=!!/Android|iPhone|iPad|iPod|Mobile/.test(me),we=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},_e=function(e,t){var n=fe(e,"Result-Status")||fe(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:re.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:re.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=fe(e,"Tips")||fe(e,"tips",""),o=fe(e,"Memo")||fe(e,"memo","");return{success:!1,traceId:t,errorCode:re.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Re=function(){var e=he.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Ae=function(e){var t={};return e||(e=window.location.href),e.replace(/([^?=&#]+)(=([^&#]*))?/g,(function(e,n,r,o){return void 0===o?"":(t[n]=decodeURIComponent(o),t[n])})),t},Oe=function(){var e=document.documentElement.clientWidth,t=Re()?100:100*e/390;return Math.min(t,100)},Se=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Oe(),"px"),innerHeight=window.innerHeight}catch(e){}},Te=Ae(),xe=Te._light_sandbox,Pe=Te.groupId,ke=Te.requestHost,Ce={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:ke||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",pre:"https://imgs-sea-pre.alipay.com/mgw.htm",prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"},Ie="ANTOM_PAYMENT_WEB",De=Pe||"GROUP_20230523202227";function Ne(e,t){return function(){return e.apply(t,arguments)}}var Le,Me=Object.prototype.toString,Ue=Object.getPrototypeOf,Be=(Le=Object.create(null),function(e){var t=Me.call(e);return Le[t]||(Le[t]=t.slice(8,-1).toLowerCase())}),je=function(e){return e=e.toLowerCase(),function(t){return Be(t)===e}},Ke=function(e){return function(t){return F(t)===e}},Fe=Array.isArray,ze=Ke("undefined");var Ye=je("ArrayBuffer");var He=Ke("string"),qe=Ke("function"),We=Ke("number"),Ve=function(e){return null!==e&&"object"===F(e)},Ge=function(e){if("object"!==Be(e))return!1;var t=Ue(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Je=je("Date"),Ze=je("File"),Qe=je("Blob"),$e=je("FileList"),Xe=je("URLSearchParams");function et(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==F(e)&&(e=[e]),Fe(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var s,c=a?Object.getOwnPropertyNames(e):Object.keys(e),u=c.length;for(n=0;n<u;n++)s=c[n],t.call(null,e[s],s,e)}}function tt(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,rt=function(e){return!ze(e)&&e!==nt};var ot,it,at=(ot="undefined"!=typeof Uint8Array&&Ue(Uint8Array),function(e){return ot&&e instanceof ot}),st=je("HTMLFormElement"),ct=(it=Object.prototype.hasOwnProperty,function(e,t){return it.call(e,t)}),ut=je("RegExp"),lt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};et(n,(function(n,o){!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},ft="abcdefghijklmnopqrstuvwxyz",pt="0123456789",dt={DIGIT:pt,ALPHA:ft,ALPHA_DIGIT:ft+ft.toUpperCase()+pt};var ht=je("AsyncFunction"),mt={isArray:Fe,isArrayBuffer:Ye,isBuffer:function(e){return null!==e&&!ze(e)&&null!==e.constructor&&!ze(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||qe(e.append)&&("formdata"===(t=Be(e))||"object"===t&&qe(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ye(e.buffer)},isString:He,isNumber:We,isBoolean:function(e){return!0===e||!1===e},isObject:Ve,isPlainObject:Ge,isUndefined:ze,isDate:Je,isFile:Ze,isBlob:Qe,isRegExp:ut,isFunction:qe,isStream:function(e){return Ve(e)&&qe(e.pipe)},isURLSearchParams:Xe,isTypedArray:at,isFileList:$e,forEach:et,merge:function e(){for(var t=rt(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&tt(r,o)||o;Ge(r[i])&&Ge(t)?r[i]=e(r[i],t):Ge(t)?r[i]=e({},t):Fe(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&et(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return et(t,(function(t,r){n&&qe(t)?e[r]=Ne(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:je,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(Fe(e))return e;var t=e.length;if(!We(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:st,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:lt,freezeMethods:function(e){lt(e,(function(t,n){if(qe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];qe(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return Fe(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:tt,global:nt,isContextDefined:rt,ALPHABET:dt,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dt.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&qe(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Ve(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=Fe(n)?[]:{};return et(n,(function(t,n){var i=e(t,r+1);!ze(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:ht,isThenable:function(e){return e&&(Ve(e)||qe(e))&&qe(e.then)&&qe(e.catch)}};function vt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}mt.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:mt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var yt=vt.prototype,gt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){gt[e]={value:e}})),Object.defineProperties(vt,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=function(e,t,n,r,o,i){var a=Object.create(yt);return mt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),vt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Et=vt,bt=n(207).lW;function wt(e){return mt.isPlainObject(e)||mt.isArray(e)}function _t(e){return mt.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var At=mt.toFlatObject(mt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Ot=function(e,t,n){if(!mt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=mt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!mt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&mt.isSpecCompliantForm(t);if(!mt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(mt.isDate(e))return e.toISOString();if(!s&&mt.isBlob(e))throw new Et("Blob is not supported. Use a Buffer instead.");return mt.isArrayBuffer(e)||mt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):bt.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===F(e))if(mt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(mt.isArray(e)&&function(e){return mt.isArray(e)&&!e.some(wt)}(e)||(mt.isFileList(e)||mt.endsWith(n,"[]"))&&(s=mt.toArray(e)))return n=_t(n),s.forEach((function(e,r){!mt.isUndefined(e)&&null!==e&&t.append(!0===a?Rt([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!wt(e)||(t.append(Rt(o,n,i),c(e)),!1)}var l=[],f=Object.assign(At,{defaultVisitor:u,convertValue:c,isVisitable:wt});if(!mt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!mt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),mt.forEach(n,(function(n,i){!0===(!(mt.isUndefined(n)||null===n)&&o.call(t,n,mt.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function St(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Tt(e,t){this._pairs=[],e&&Ot(e,this,t)}var xt=Tt.prototype;xt.append=function(e,t){this._pairs.push([e,t])},xt.toString=function(e){var t=e?function(t){return e.call(this,t,St)}:St;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Pt=Tt;function kt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(e,t,n){if(!t)return e;var r,o=n&&n.encode||kt,i=n&&n.serialize;if(r=i?i(t,n):mt.isURLSearchParams(t)?t.toString():new Pt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var It,Dt=function(){function t(){o(this,t),this.handlers=[]}return e(t,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){mt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(It=navigator.product)&&"NativeScript"!==It&&"NS"!==It)&&"undefined"!=typeof window&&"undefined"!=typeof document,isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var Mt=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&mt.isArray(r)?r.length:i,s?(mt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&mt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&mt.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(mt.isFormData(e)&&mt.isFunction(e.entries)){var n={};return mt.forEachEntry(e,(function(e,r){t(function(e){return mt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},Ut={"Content-Type":void 0};var Bt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=mt.isObject(e);if(i&&mt.isHTMLForm(e)&&(e=new FormData(e)),mt.isFormData(e))return o&&o?JSON.stringify(Mt(e)):e;if(mt.isArrayBuffer(e)||mt.isBuffer(e)||mt.isStream(e)||mt.isFile(e)||mt.isBlob(e))return e;if(mt.isArrayBufferView(e))return e.buffer;if(mt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ot(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Lt.isNode&&mt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=mt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ot(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(mt.isString(e))try{return(t||JSON.parse)(e),mt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&mt.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Et.from(e,Et.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};mt.forEach(["delete","get","head"],(function(e){Bt.headers[e]={}})),mt.forEach(["post","put","patch"],(function(e){Bt.headers[e]=mt.merge(Ut)}));var jt=Bt,Kt=mt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ft=Symbol("internals");function zt(e){return e&&String(e).trim().toLowerCase()}function Yt(e){return!1===e||null==e?e:mt.isArray(e)?e.map(Yt):String(e)}function Ht(e,t,n,r,o){return mt.isFunction(r)?r.call(this,t,n):(o&&(t=n),mt.isString(t)?mt.isString(r)?-1!==t.indexOf(r):mt.isRegExp(r)?r.test(t):void 0:void 0)}var qt=function(t,n){function r(e){o(this,r),e&&this.set(e)}return e(r,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=zt(t);if(!o)throw new Error("header name must be a non-empty string");var i=mt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Yt(e))}var i=function(e,t){return mt.forEach(e,(function(e,n){return o(e,n,t)}))};return mt.isPlainObject(e)||e instanceof this.constructor?i(e,t):mt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&Kt[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)})),o}(e),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=zt(e)){var n=mt.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(mt.isFunction(t))return t.call(this,r,n);if(mt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=zt(e)){var n=mt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ht(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=zt(e)){var o=mt.findKey(n,e);!o||t&&!Ht(0,n[o],o,t)||(delete n[o],r=!0)}}return mt.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Ht(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return mt.forEach(this,(function(r,o){var i=mt.findKey(n,o);if(i)return t[i]=Yt(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Yt(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return mt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&mt.isArray(n)?n.join(", "):n)})),t}},{key:t,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=h(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:n,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[Ft]=this[Ft]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=zt(e);t[r]||(!function(e,t){var n=mt.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return mt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),mt.freezeMethods(qt.prototype),mt.freezeMethods(qt);var Wt=qt;function Vt(e,t){var n=this||jt,r=t||n,o=Wt.from(r.headers),i=r.data;return mt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Gt(e){return!(!e||!e.__CANCEL__)}function Jt(e,t,n){Et.call(this,null==e?"canceled":e,Et.ERR_CANCELED,t,n),this.name="CanceledError"}mt.inherits(Jt,Et,{__CANCEL__:!0});var Zt=Jt;var Qt=Lt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),mt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),mt.isString(r)&&a.push("path="+r),mt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function $t(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Xt=Lt.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=mt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var en=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var c=Date.now(),u=o[a];n||(n=c),r[i]=s,o[i]=c;for(var l=a,f=0;l!==i;)f+=r[l++],l%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(c-n<t)){var p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}};function tn(e,t){var n=0,r=en(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s);n=i;var u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var nn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=Wt.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}mt.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+l))}var f=$t(e.baseURL,e.url);function p(){if(c){var r=Wt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Et("Request failed with status code "+n.status,[Et.ERR_BAD_REQUEST,Et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),Ct(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new Et("Request aborted",Et.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Et("Network Error",Et.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Et(t,r.clarifyTimeoutError?Et.ETIMEDOUT:Et.ECONNABORTED,e,c)),c=null},Lt.isStandardBrowserEnv){var d=(e.withCredentials||Xt(f))&&e.xsrfCookieName&&Qt.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&mt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),mt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",tn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",tn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new Zt(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var h,m=(h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&h[1]||"";m&&-1===Lt.protocols.indexOf(m)?n(new Et("Unsupported protocol "+m+":",Et.ERR_BAD_REQUEST,e)):c.send(o||null)}))},rn={http:null,xhr:nn};mt.forEach(rn,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var on=function(e){for(var t,n,r=(e=mt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=mt.isString(t)?rn[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new Et("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(mt.hasOwnProp(rn,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!mt.isFunction(n))throw new TypeError("adapter is not a function");return n};function an(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zt(null,e)}function sn(e){return an(e),e.headers=Wt.from(e.headers),e.data=Vt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),on(e.adapter||jt.adapter)(e).then((function(t){return an(e),t.data=Vt.call(e,e.transformResponse,t),t.headers=Wt.from(t.headers),t}),(function(t){return Gt(t)||(an(e),t&&t.response&&(t.response.data=Vt.call(e,e.transformResponse,t.response),t.response.headers=Wt.from(t.response.headers))),Promise.reject(t)}))}var cn=function(e){return e instanceof Wt?e.toJSON():e};function un(e,t){t=t||{};var n={};function r(e,t,n){return mt.isPlainObject(e)&&mt.isPlainObject(t)?mt.merge.call({caseless:n},e,t):mt.isPlainObject(t)?mt.merge({},t):mt.isArray(t)?t.slice():t}function o(e,t,n){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!mt.isUndefined(t))return r(void 0,t)}function a(e,t){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(cn(e),cn(t),!0)}};return mt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);mt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ln="1.4.0",fn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){fn[e]=function(n){return F(n)===e||"a"+(t<1?"n ":" ")+e}}));var pn={};fn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Et(r(o," has been removed"+(t?" in "+t:"")),Et.ERR_DEPRECATED);return t&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var dn={assertOptions:function(e,t,n){if("object"!==F(e))throw new Et("options must be an object",Et.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new Et("option "+i+" must be "+c,Et.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Et("Unknown option "+i,Et.ERR_BAD_OPTION)}},validators:fn},hn=dn.validators,mn=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=un(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&dn.assertOptions(o,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),null!=i&&(mt.isFunction(i)?t.paramsSerializer={serialize:i}:dn.assertOptions(i,{encode:hn.function,serialize:hn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=a&&mt.merge(a.common,a[t.method]))&&mt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Wt.concat(n,a);var s=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,l=[];this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));var f,p=0;if(!c){var d=[sn.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,u=Promise.resolve(t);p<f;)u=u.then(d[p++],d[p++]);return u}f=s.length;var h=t;for(p=0;p<f;){var m=s[p++],v=s[p++];try{h=m(h)}catch(e){v.call(this,e);break}}try{u=sn.call(this,h)}catch(e){return Promise.reject(e)}for(p=0,f=l.length;p<f;)u=u.then(l[p++],l[p++]);return u}},{key:"getUri",value:function(e){return Ct($t((e=un(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();mt.forEach(["delete","get","head","options"],(function(e){mn.prototype[e]=function(t,n){return this.request(un(n||{},{method:e,url:t,data:(n||{}).data}))}})),mt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(un(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}mn.prototype[e]=t(),mn.prototype[e+"Form"]=t(!0)}));var vn=mn,yn=function(){function t(e){if(o(this,t),"function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,t,o){r.reason||(r.reason=new Zt(e,t,o),n(r.reason))}))}return e(t,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var e;return{token:new t((function(t){e=t})),cancel:e}}}]),t}(),gn=yn;var En={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(En).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];En[r]=n}));var bn=En;var wn=function e(t){var n=new vn(t),r=Ne(vn.prototype.request,n);return mt.extend(r,vn.prototype,n,{allOwnKeys:!0}),mt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(un(t,n))},r}(jt);wn.Axios=vn,wn.CanceledError=Zt,wn.CancelToken=gn,wn.isCancel=Gt,wn.VERSION=ln,wn.toFormData=Ot,wn.AxiosError=Et,wn.Cancel=wn.CanceledError,wn.all=function(e){return Promise.all(e)},wn.spread=function(e){return function(t){return e.apply(null,t)}},wn.isAxiosError=function(e){return mt.isObject(e)&&!0===e.isAxiosError},wn.mergeConfig=un,wn.AxiosHeaders=Wt,wn.formToJSON=function(e){return Mt(mt.isHTMLForm(e)?new FormData(e):e)},wn.HttpStatusCode=bn,wn.default=wn;var _n=wn,Rn=Ae()._sandbox;function An(e){var t,n,r,o=new Date,i=o.getTime()+60*o.getTimezoneOffset()*1e3,a=e.env||"prod",s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n={pre:"https://imgs-sea-pre.alipay.com/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:ke||"http://imgs-13.sggz00b.stable.alipay.net/mgw.htm"},r={"com.ipay.iexpcashier.sdkAction.query":"com.ipay.iopensandbox.sdk.paymentSession.query"},o="SDK_MOCK_SANDBOX",i=Pe||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===xe?{appId:o,sofaId:i,baseURL:n[t],"Operation-Type":r[e]}:{appId:"",sofaId:"",baseURL:"","Operation-Type":""}}(e["Operation-Type"],a),c=e.baseURL||s.baseURL||function(e,t){return"prod"===t||"sandbox"===t||"light_sandbox"===t?{SG:"https://imgs-sea-global.alipay.com/mgw.htm",US:"https://imgs-na-global.alipay.com/mgw.htm",DE:"https://imgs-de-global.alipay.com/mgw.htm"}[e||"SG"]:"pre"===t?{SG:"https://imgs-sea-pre.alipay.com/mgw.htm",US:"https://imgs-pre.alipay.com/mgw.htm",DE:"https://imgs-de-pre.alipay.com/mgw.htm"}[e||"SG"]:""}(null==e?void 0:e.hostSign,a)||Ce[a],u=B()((t={appId:s.appId||Ie,workspaceId:"pre"===e.env?"pre":"default"},d()(t,"x-cors-".concat(Ie.toLowerCase(),"-default"),"1"),d()(t,"version","2.0"),d()(t,"sofa-group-name",s.sofaId||De),d()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),d()(t,"Client-Time",i),d()(t,"tntInstId","ALIPW3SG"),d()(t,"sdk-version",K||""),t),e.headers);return"true"!==Rn&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],_n.create({baseURL:c,timeout:null!==(n=e.timeout)&&void 0!==n?n:15e3,headers:u,withCredentials:null===(r=e.withCredentials)||void 0===r||r,method:"POST"}).request}function On(e,t){return Sn.apply(this,arguments)}function Sn(){return(Sn=M()(N()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,p,d,h,m,v;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=An(n),Date.now(),o={terminalType:Re()?"WEB":"WAP",browserInfo:{browserJavaScriptEnabled:!0,browserLanguage:navigator.language,browserUserAgent:navigator.userAgent,browserColorDepth:screen.colorDepth},locale:n.locale||"en_US",deviceLanguage:navigator.language,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset()};try{o.browserInfo.browserJavaEnabled=(null===(i=navigator)||void 0===i?void 0:i.javaEnabled())||!1}catch(e){}return"WAP"===o.terminalType&&(o.osType=ge?"IOS":"ANDROID"),a=n.needEnvInfo?[B()(B()({},t),{},{envInfo:o,extParams:{refUrl:window.location.href}})]:[t],e.prev=6,e.next=9,r({data:a});case 9:if(s=e.sent,c=s.data,u=s.headers,l=c||{},f=fe(u,"Mgw-TraceId")||fe(u,"mgw-traceid",""),l.traceId=f||"",null==(p=_e(u,f))||!p.errorCode){e.next=18;break}throw new Error(JSON.stringify({errorMessage:(null==l?void 0:l.errorMessage)||(null==p?void 0:p.errorMessage),errorCode:null==p?void 0:p.errorCode,success:!1}));case 18:return e.abrupt("return",l);case 21:return e.prev=21,e.t0=e.catch(6),console.log("request error",null===e.t0||void 0===e.t0?void 0:e.t0.message),h=we(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:re.SYSTEM,errorMessage:""}),m=null!==e.t0&&void 0!==e.t0&&null!==(d=e.t0.message)&&void 0!==d&&d.includes("timeout")?re.TIMEOUT:"",v=(null==h?void 0:h.errorCode)||m,e.abrupt("return",Promise.reject({success:!1,errorCode:v,errorMessage:""}));case 28:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Tn(){return(Tn=M()(N()().mark((function e(t,n){var r;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",On(t,B()(B()({},n),{},{hostSign:r,needEnvInfo:!0,"Operation-Type":"com.ipay.iexpcashier.sdkAction.query"})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xn,Pn=function(e){try{return JSON.parse(e).versionMap.web[K].targetWebVerison}catch(e){return""}},kn=function(e,t){var n,r=(n={},d()(n,H.NONE,[""]),d()(n,H.AUTO_DEBIT_WALLET,["1.0"]),d()(n,H.CASHIER_PAYMENT_BANK,["1.0"]),d()(n,H.CASHIER_PAYMENT_CARD,["1.0"]),d()(n,H.EASY_PAY_WALLET,["1.0","2.0"]),n)[e],o=r.find((function(e){return e===t})),i=r[r.length-1];return o?t:i},Cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=Ae()||{},a=i.host,s=Pn(o)||t,c=kn(n,r);return a&&!["sandbox","light_sandbox","prod"].includes(e)?a:"".concat(j[e],"/").concat(n,"/").concat(c,"/index.").concat(s,".html")},In=function(e){var t=e.componentSign,n=e.analytics,r=void 0===n?{enabled:!0}:n,o=e.productSceneVersion,i=e.environment,a=e.appVersion,s=e.extendInfo,c=e.locale,u=e.instanceId,l=Cn(i,a,t,o,s||""),f=function(e){var t=document.getElementsByTagName("meta").viewPort,n={};if(t)for(var r=t.content.split(","),o=0;o<r.length;o++){var i=r[o].split("=");n[i[0]]=i[1]}return n[e]}("initial-scale")||1,p=Ae(),d=p._sandbox,h=p._light_sandbox,m=p.requestHost,v=void 0===m?"":m,y=p.groupId,g=void 0===y?"":y,E=p.LOCAL_MOCK,b=Object.assign({},{locale:c,scale:f,instanceId:u,analyticsEnabled:!1===(null==r?void 0:r.enabled)?"false":"true",sdkVersion:K,refUrl:window.location.href});E&&(b.LOCAL_MOCK=E),v&&(b.requestHost=v),g&&(b.groupId=g),"light_sandbox"!==i&&"true"!==h||(b.sandbox="true"),"sandbox"!==i&&"true"!==d||(b.shadow="true");var w=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=encodeURIComponent(n),o=encodeURIComponent(null===e[n]?"":e[n]);t.push("".concat(r,"=").concat(o))}return t.join("&")}(b);return"".concat(l,"?").concat(w)},Dn="ams-component-loading",Nn="#ams-checkout-component-desktop{\n border-radius: 8px;\n}\n#".concat(Dn,"{\n width: 100%;\n flex: 1;\n}\n.inline-loading{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.inline-loading-mobile{\n padding: 0 0.16em;\n}\n.inline-loading-desktop{}\n"),Ln=window.innerHeight,Mn="ams-component-container",Un="ams-component-section",Bn="asm-component-close-block",jn="ams-component-retention",Kn="ams-component-mockup",Fn="ams-component-loading",zn="_ams_sdk_component_listener",Yn=function(){function e(){i()(this,e),d()(this,"app",void 0),d()(this,"appDomain",void 0),d()(this,"AMSSDK",void 0),d()(this,"platform",void 0),d()(this,"createIframeNode",void 0),d()(this,"_selector",void 0),d()(this,"_appVersion",void 0),d()(this,"_isRetention",void 0),d()(this,"_actionQueryPromise",null),d()(this,"_loadAppPromiseResolve",null),d()(this,"_renderParams",null),d()(this,"_componentSign",H.NONE),d()(this,"_performanceData",[]),d()(this,"_isInitComponent",void 0),d()(this,"_clickEventName",void 0),d()(this,"_renderDisplayType",Y.popup),this._appVersion="1.5.0",this._isInitComponent=!1,this._selector="#".concat(Un),this.createIframeNode=function(){return Promise.resolve()},this.platform=Re()?ee.desktop:ee.mobile,this._clickEventName=this.platform===ee.mobile?"touchend":"click",this._isRetention=!0,this._performanceData.push({key:"sdk_init",value:Date.now()})}var n;return t()(e,[{key:"logoutPlugin",value:function(){this.cleanContainer(!0)}},{key:"applyPlugin",value:function(e){this.AMSSDK=e,this.subscribeFromSDK()}},{key:"setRender",value:function(e){this.createIframeNode=e}},{key:"appendIframeNodes",value:function(e,t){var n,r=this;if(this._isInitComponent)return this.dispatchToSDK(g.name,v.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR),Promise.reject(v.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);(this._isInitComponent=!0,this._renderParams=t,this._componentSign=e,null!=t&&t.selector&&(this._selector=t.selector),this._renderDisplayType=t.renderDisplayType,this._performanceData.push({key:"sdk_create_component",value:Date.now()}),this._renderDisplayType===Y.inline)&&(document.getElementById("ams-inline-component-style")||((n=document.createElement("style")).id="ams-inline-component-style",n.type="text/css",n.innerHTML=Nn,document.head.appendChild(n)));return this._renderDisplayType===Y.popup&&(this.createBaseElement(),this.setContainerClass(),this.createRetentionPopup(),this.createMockup()),this.renderLoading(t),this.createApp(t),Promise.all([this.createActionQueryPromise(),this.createIframeNode(this,this._selector,this._renderDisplayType),this.createLoadAppPromise()]).catch((function(e){return r._isInitComponent=!1,r.cleanContainer(),Promise.reject(e)}))}},{key:"renderLoading",value:function(e){var t,n=null==e||null===(t=e.appearance)||void 0===t?void 0:t.showLoading;if(n="boolean"!=typeof n||n){if(this._renderDisplayType===Y.inline)return function(e,t){var n=document.createElement("div");n.id=Dn;var r="inline-loading";t===ee.desktop&&(n.innerHTML='<svg class="'.concat(r," ").concat(r,"-").concat(t,'" width="740" height="360" viewBox="0 0 740 360" fill="none" xmlns="">\n <rect width="740" height="360" rx="12" fill="#F6F6F6"/>\n <rect opacity="0.7" x="44" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="94" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="144" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z" fill="#E1E6ED"/>\n </g>\n </svg>')),t===ee.mobile&&(n.innerHTML='<svg class="'.concat(r," ").concat(r,"-").concat(t,'" width="358" height="186" viewBox="0 0 358 186" fill="none" xmlns="">\n <g clip-path="url(#clip0_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <g clip-path="url(#clip1_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <rect width="358" height="40" fill="white"/>\n <rect opacity="0.7" x="4" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="54" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="104" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g clip-path="url(#clip2_2543_91192)">\n <rect width="358" height="120" transform="translate(0 66)" fill="white"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z" fill="#E1E6ED"/>\n </g>\n <g clip-path="url(#clip3_2543_91192)">\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z" fill="#E1E6ED"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id="clip0_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip1_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip2_2543_91192">\n <rect width="358" height="120" fill="white" transform="translate(0 66)"/>\n </clipPath>\n <clipPath id="clip3_2543_91192">\n <rect width="358" height="92" fill="white" transform="translate(0 94)"/>\n </clipPath>\n </defs>\n </svg>\n '));var o=document.querySelector(e);o&&o.appendChild(n);var i=document.getElementById(Dn);Se(0,i)}(this._selector,this.platform);if(this._renderDisplayType===Y.popup){var r=document.getElementById(Kn);return r&&(r.style.display="block"),this.showPopupLoading()}}}},{key:"createLoadAppPromise",value:function(){var e=this;return new Promise((function(t,n){e._loadAppPromiseResolve=t,setTimeout((function(){n(v.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT)}),15e3)})).catch((function(t){return e.dispatchToSDK(g.name,{code:v.CREATECOMPONENT_ERROR.code,message:v.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT.message}),Promise.reject(t)}))}},{key:"createActionQueryPromise",value:function(){var e=this;return this._performanceData.push({key:"sdk_action_query_start",value:Date.now()}),this._actionQueryPromise=new Promise((function(t,n){var r,o,i,a={paymentSessionData:e._renderParams&&(null===(r=e._renderParams)||void 0===r?void 0:r.paymentSessionData)||"",paymentSessionConfig:null===(o=e._renderParams)||void 0===o||null===(i=o.paymentSessionMetaData)||void 0===i?void 0:i.paymentSessionConfig};if(H.CASHIER_PAYMENT_CARD===e._componentSign&&(a.paymentMethodType="CARD"),H.EASY_PAY_WALLET===e._componentSign){var s,c=a.paymentSessionConfig||{},u=c.productSceneVersion,l=void 0===u?"":u,f=c.productScene,p=void 0===f?"":f,d=((null===(s=e._renderParams)||void 0===s?void 0:s.paymentSessionMetaData)||{}).action,h=(void 0===d?{}:d).autoDebitWithToken,m=void 0!==h&&h;if(p===q.EASY_PAY&&"2.0"===l&&!m)return t({message:"sdk no need to make query request",success:!0})}if(H.AUTO_DEBIT_WALLET===e._componentSign){var y,E,b,w,_=(null===(y=e._renderParams)||void 0===y||null===(E=y.paymentSessionMetaData)||void 0===E?void 0:E.action)||{},R=Re()?null==_||null===(b=_.web)||void 0===b?void 0:b.signType:null==_||null===(w=_.wap)||void 0===w?void 0:w.signType;if("SMS"===R)return t({message:"sdk no need to make query request",success:!0});if(!R||"REDIRECT"!==R)return t({success:!1})}if(window.location.href.indexOf("LOCAL_MOCK=1")>-1)return t({message:"sdk no need to make query request",success:!0});(function(e,t){return Tn.apply(this,arguments)})(a,{env:e.AMSSDK.options.env.environment,locale:e.AMSSDK.options.locale}).then((function(n){e._performanceData.push({key:"sdk_action_query_end",value:Date.now()}),null!=n&&n.success,t(n)})).catch((function(t){e.dispatchToSDK(g.name,{code:v.CREATECOMPONENT_ERROR.code}),n(t)}))})),this._actionQueryPromise}},{key:"cleanApp",value:function(){try{if(this.app=null,this._removeEventListener(),"string"===pe(this._selector)){var e=document.querySelector(this._selector);e&&(e.innerHTML="")}}catch(e){console.error(e)}}},{key:"createApp",value:function(e){if(!0==!!window.postMessage){this._performanceData.push({key:"sdk_popup_start",value:Date.now()});try{var t,n,r,o=(null==e||null===(t=e.paymentSessionMetaData)||void 0===t||null===(n=t.paymentSessionConfig)||void 0===n?void 0:n.productSceneVersion)||"",i=(null==e||null===(r=e.paymentSessionMetaData)||void 0===r?void 0:r.extendInfo)||"",a=this.AMSSDK.options.env.environment;this.appDomain=function(e){var t=e.environment,n=e.appVersion,r=e.componentSign,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Cn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentSign:this._componentSign,productSceneVersion:o,extendInfo:i}),this.app=function(e,t){var n=document.createElement("iframe"),r={dropin:"ams-checkout-dropin-".concat(t),component:"ams-checkout-component-".concat(t)}[e]||"ams-checkout-component";return n.id=r,n.style.height="0",n.style.width="100%",n.style.border="0",n.style.overflow="hidden",n}(this.AMSSDK.options.mode,this.platform),this.app.src=In({componentSign:this._componentSign,analytics:this.AMSSDK.options.analytics,productSceneVersion:o,environment:a,appVersion:this._appVersion,extendInfo:i,locale:this.AMSSDK.options.locale,instanceId:this.AMSSDK._instanceId}),this._addEventListener()}catch(e){this.dispatchToSDK(g.name,Object.assign({},v.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(g.name,v.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(function(e){try{JSON.parse(e)}catch(e){return!1}return!0}(e.data)){var t=JSON.parse(e.data);if(t.name!==te.APP_TO_SDK&&t.name!==te.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(v.NOT_JSON_FORMAT),this.dispatchToSDK(g.name,v.NOT_JSON_FORMAT)}},{key:"resizeListener",value:function(){document.getElementById(Mn).style.transition="none",this.dispatchToApp({context:{event:"renderResize",data:{heightOfVisible:window.innerHeight,widthOfVisible:window.innerWidth}}})}},{key:"_addEventListener",value:function(){this._removeEventListener(),window["".concat(zn,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(zn,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),window.addEventListener("message",window["".concat(zn,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(zn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",window["".concat(zn,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(zn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){var t,n=[_.name,R.name,b.name,w.name,A.name,g.name,O.name,S.name,x.name,T.name,P.name,k.name,C.name,I.name];if(e.context.event!==I.name){if(n.includes(e.context.event)){if(e.context.event===_.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),void this.sendRenderEvent();if(e.context.event===b.name&&this.handleSizeChanged(e),e.context.event===A.name)return this.closeBtnFunc();if(e.context.event===R.name)return this.handleRedirect(e.context.data);if(e.context.event!==S.name)if(e.context.event!==T.name){if(e.context.event!==x.name)return e.context.event===P.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==k.name?this.dispatchToSDK(e.context.event,e.context.data):this.handleDeclareInfo(e.context.data));this.handleCloseBtnShow(!0)}else this.handleCloseBtnShow(!1);else this.submitForm(e.context.data)}}else this.dispatchToSDK(O.name,{code:"SDK_END_OF_LOADING",message:(null===(t=e.context.data)||void 0===t?void 0:t.message)||""})}},{key:"handleSizeChanged",value:function(e){var t;if(!((null===(t=e.context.data)||void 0===t?void 0:t.height)<=1)){if(this._renderDisplayType===Y.popup){var n,r=document.getElementById(Kn);r&&(r.style.background="#000000",r.style.opacity="0.6",r.style.display="block"),null===(n=document.getElementById(Fn))||void 0===n||n.remove();var o=document.getElementById(Mn);if(o.style.height="".concat(e.context.data.height,"px"),"desktop"===this.platform&&(o.classList.add("".concat(Mn,"-").concat(this.platform,"-animation")),e.context.data.width&&(o.style.width="".concat(e.context.data.width,"px"))),"mobile"===this.platform){o.classList.add("".concat(Mn,"-").concat(this.platform,"-animation"));var i="".concat(Mn,"-").concat(this.platform,"-animation-style"),a=document.getElementById(i);a&&(null==a||a.remove());var s="@keyframes ".concat(Mn,"-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(e.context.data.height,"px;\n }\n }\n @keyframes ").concat(Mn,"-slide-out {\n 0% {\n height: ").concat(e.context.data.height,"px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }"),c=document.createElement("style");c.id=i,c.type="text/css",c.innerHTML=s,document.getElementsByTagName("head")[0].appendChild(c),setTimeout((function(){o.style.transition="height 0.28s ease-in-out"}),500)}}var u;if(this._renderDisplayType===Y.inline)null===(u=document.getElementById(Fn))||void 0===u||u.remove();this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.width="100%",this.app.style.border="0",this.app.style.overflow="hidden"}}},{key:"handleRedirect",value:function(e){var t=this,n="string"==typeof e?{normalUrl:e}:{applinkUrl:(null==e?void 0:e.applinkUrl)||"",schemeUrl:(null==e?void 0:e.schemeUrl)||"",normalUrl:(null==e?void 0:e.normalUrl)||"",target:null==e?void 0:e.target},r=function(e,n){t.dispatchToSDK(O.name,{code:"SDK_CALL_URL_SUCCESS",message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(O.name,{code:"SDK_CALL_URL_ERROR",message:"Failed to open app,applinkUrl: ".concat(null==n?void 0:n.applinkUrl," schemeUrl: ").concat(null==n?void 0:n.schemeUrl," normalUrl: ").concat(null==n?void 0:n.normalUrl)})};if(n.target===ne.BLANK)return n.normalUrl?(r("normalUrl",n.normalUrl),void window.open(n.normalUrl)):o();this.cleanContainer(),this.AMSSDK._redirect({applinkUrl:null==n?void 0:n.applinkUrl}).then((function(){r("applinkUrl",null==n?void 0:n.applinkUrl)})).catch((function(){return t.AMSSDK._redirect({schemeUrl:null==n?void 0:n.schemeUrl})})).then((function(){r("schemeUrl",null==n?void 0:n.schemeUrl)})).catch((function(){return t.AMSSDK._redirect({normalUrl:null==n?void 0:n.normalUrl})})).then((function(){r("normalUrl",null==n?void 0:n.normalUrl)})).catch((function(){o()}))}},{key:"handleDeclareInfo",value:function(e){var t=e.closeDialogData,n=void 0===t?{}:t;try{if(n){var r,o,i,a=document.getElementById("".concat(jn,"-title"));if(a)a.style.fontSize="".concat(null==n||null===(r=n.title)||void 0===r?void 0:r.fontSize,"px"),a.style.color=null==n||null===(o=n.title)||void 0===o?void 0:o.fontColor,a.innerHTML=null==n||null===(i=n.title)||void 0===i?void 0:i.text;var s,c,u,l=document.getElementById("".concat(jn,"-sub-title"));if(l)l.style.fontSize="".concat(null==n||null===(s=n.message)||void 0===s?void 0:s.fontSize,"px"),l.style.color=null==n||null===(c=n.message)||void 0===c?void 0:c.fontColor,l.innerHTML=null==n||null===(u=n.message)||void 0===u?void 0:u.text;var f,p,d,h,m,v,y,g=document.getElementById("".concat(jn,"-remain"));if(g)if(g.innerHTML=null==n||null===(f=n.btnOK)||void 0===f?void 0:f.text,g.style.fontSize="".concat(null==n||null===(p=n.btnOK)||void 0===p?void 0:p.fontSize,"px"),g.style.color=null==n||null===(d=n.btnOK)||void 0===d?void 0:d.fontColor,g.style.borderRadius="".concat(null==n||null===(h=n.btnOK)||void 0===h?void 0:h.corner,"px"),"stroke"===(null==n||null===(m=n.btnOK)||void 0===m?void 0:m.type))g.style.border="1px solid ".concat(null==n||null===(y=n.btnOK)||void 0===y?void 0:y.bg);else g.style.backgroundColor=null==n||null===(v=n.btnOK)||void 0===v?void 0:v.bg;var E,b,w,_,R,A,O,S=document.getElementById("".concat(jn,"-leave"));if(S)if(S.innerHTML=null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.text,S.style.fontSize="".concat(null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.fontSize,"px"),S.style.color=null==n||null===(w=n.btnCancel)||void 0===w?void 0:w.fontColor,S.style.borderRadius="".concat(null==n||null===(_=n.btnCancel)||void 0===_?void 0:_.corner,"px"),"stroke"===(null==n||null===(R=n.btnCancel)||void 0===R?void 0:R.type))S.style.border="1px solid ".concat(null==n||null===(O=n.btnCancel)||void 0===O?void 0:O.bg);else S.style.backgroundColor=null==n||null===(A=n.btnCancel)||void 0===A?void 0:A.bg}}catch(e){console.error(e)}}},{key:"handleCloseBtnShow",value:function(e){var t=document.getElementById(Bn);e?null==t||t.classList.remove("".concat(Bn,"-hidden")):!1===e&&(null==t||t.classList.add("".concat(Bn,"-hidden")))}},{key:"dispatchToSDK",value:function(e,t){this.AMSSDK._eventCenter.emit(e,t)}},{key:"dispatchToApp",value:function(e){var t=Object.assign({},e,{name:te.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:y,instanceId:this.AMSSDK._instanceId});if(this.app&&this.app.contentWindow)return this.app.contentWindow.postMessage(JSON.stringify(t),this.appDomain);throw new Error(v.SDK_SUBMIT_ERROR.message)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK._eventCenter.on("".concat(y,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=M()(N()().mark((function e(){var t,n,r,o,i;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this._actionQueryPromise){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._actionQueryPromise;case 5:i=e.sent,this._performanceData.push({key:"sdk_render_component",value:Date.now()}),this.dispatchToApp({context:{event:"renderComponent",data:{queryResult:i,sessionResult:null===(t=this._renderParams)||void 0===t?void 0:t.paymentSessionMetaData,paymentSessionData:null===(n=this._renderParams)||void 0===n?void 0:n.paymentSessionData,heightOfVisible:Math.max(Ln,window.innerHeight),renderDisplayType:null===(r=this._renderParams)||void 0===r?void 0:r.renderDisplayType,appearance:null===(o=this._renderParams)||void 0===o?void 0:o.appearance,envInfo:{screenHeight:screen.height,screenWidth:screen.width}}}}),this.dispatchToApp({context:{event:"web-sdk-performance",data:{performanceData:this._performanceData}}}),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return n.apply(this,arguments)})},{key:"showPopupLoading",value:function(){var e=document.createElement("div");null==e||e.classList.add(Fn),e.id=Fn,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Oe(),"px");var t=document.getElementsByTagName("body")[0];null==t||t.appendChild(e)}},{key:"setContainerClass",value:function(){var e=document.getElementById(Mn);null==e||e.classList.remove("".concat(Mn,"-hidden-").concat(this.platform)),null==e||e.classList.add("".concat(Mn,"-").concat(this.platform))}},{key:"cleanContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),this._performanceData=[],this._isInitComponent=!1,null===(e=document.getElementById(Fn))||void 0===e||e.remove(),this.hideComponentAndCleanDom(t)}},{key:"hideComponentAndCleanDom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=document.getElementById(Mn);n&&(n.style.transition="",null==n||n.classList.remove("".concat(Mn,"-").concat(this.platform)),null==n||n.classList.remove("".concat(Mn,"-").concat(this.platform,"-animation")),null==n||n.classList.add("".concat(Mn,"-hidden-").concat(this.platform)));var r=function(){var t;document.getElementsByTagName("body")[0].style.overflow="auto";var r=document.getElementById(Kn);null==r||r.remove(),n&&(n.style.height=""),null===(t=document.getElementById("".concat(Mn,"-").concat(e.platform,"-animation-style")))||void 0===t||t.remove(),e.removeRetentionPopup(),e.cleanApp()};t?r():setTimeout((function(){r()}),300)}},{key:"closeBtnFunc",value:function(){this._isRetention?this.showRetentionPopup():(this.cleanContainer(),this.dispatchToSDK(A.name,{}))}},{key:"createBaseElement",value:function(){if(!document.getElementById(Mn)){var e;(e=document.createElement("style")).type="text/css",e.innerHTML=".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 0px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n\n 100% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** 加载动画 **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-block-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-block-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n}\n\n",document.head.appendChild(e),window.removeEventListener("resize",Se),window.removeEventListener("pageShow",Se),window.removeEventListener("DOMContentLoaded",Se),window.addEventListener("resize",Se),window.addEventListener("pageShow",Se),window.addEventListener("DOMContentLoaded",Se);var t=document.createElement("div");t.className="".concat(Mn,"-hidden-").concat(this.platform),t.id=Mn,Se(0,t),document.body.appendChild(t);var n=document.createElement("div");n.className="ams-component-section-".concat(this.platform),n.id=Un,t.appendChild(n),this.createCloseBtn()}}},{key:"createCloseBtn",value:function(){var e=this,t=document.getElementById(Mn),n="<img class='".concat(Bn,"-btn-").concat(this.platform,"' src=\"").concat("https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg",'"/>'),r=document.createElement("div");r.classList.add("".concat(Bn,"-").concat(this.platform),"".concat(Bn,"-hidden")),r.id=Bn,r.innerHTML=n,r.addEventListener(this._clickEventName,(function(){e.closeBtnFunc()})),t&&t.appendChild(r)}},{key:"createRetentionPopup",value:function(){var e=document.createElement("div");e.id=jn,e.classList.add("".concat(jn,"-").concat(this.platform)),e.innerHTML='\n <span id="'.concat(jn,'-title" class="').concat(jn,"-title-").concat(this.platform,'">\n Are you sure you want to leave?\n </span>\n <span\n id="').concat(jn,'-sub-title"\n class="').concat(jn,"-sub-title-").concat(this.platform,'"\n >\n If you leave this page, you\'ll have to start over again.\n </span>\n <div class="').concat(jn,"-btn-block-").concat(this.platform,'">\n <div id="').concat(jn,'-remain" class="').concat(jn,"-remain-").concat(this.platform,'">\n Continue Payment\n </div>\n <div id="').concat(jn,'-leave" class="').concat(jn,"-leave-").concat(this.platform,'">\n Leave\n </div>\n </div>'),document.body.appendChild(e);var t=document.getElementById("".concat(jn,"-remain"));t&&t.addEventListener(this._clickEventName,this.hideRetentionPopup.bind(this));var n=document.getElementById("".concat(jn,"-leave"));n&&n.addEventListener(this._clickEventName,this.retentionPopupLeaveFunc.bind(this))}},{key:"retentionPopupLeaveFunc",value:function(){this.dispatchToSDK(A.name,{}),this.hideRetentionPopup(),this.cleanContainer()}},{key:"removeRetentionPopup",value:function(){var e,t=document.getElementById("".concat(jn,"-remain"));t&&t.removeEventListener(this._clickEventName,this.hideRetentionPopup);var n=document.getElementById("".concat(jn,"-leave"));n&&n.removeEventListener(this._clickEventName,this.retentionPopupLeaveFunc),null===(e=document.getElementById(jn))||void 0===e||e.remove()}},{key:"showRetentionPopup",value:function(){var e=document.getElementById(jn),t=document.getElementById(Mn);e&&(null==t||t.classList.add("".concat(Mn,"-opacity")),e.classList.remove("".concat(jn,"-hidden")),e.classList.add("".concat(jn,"-show")))}},{key:"hideRetentionPopup",value:function(){var e=document.getElementById(jn),t=document.getElementById(Mn);e&&(e.classList.remove("".concat(jn,"-show")),e.classList.add("".concat(jn,"-hidden")),setTimeout((function(){e.classList.remove("".concat(jn,"-hidden")),null==t||t.classList.remove("".concat(Mn,"-opacity"))}),300))}},{key:"createMockup",value:function(){var e=document.getElementsByTagName("body")[0];e.style.overflow="hidden";var t=document.createElement("div");t.style.width="100vw",t.style.height="100vh",t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.zIndex="1000",t.style.background="#ffffff",t.style.opacity="0.5",t.style.display="none",t.id=Kn,e.appendChild(t)}},{key:"submitForm",value:function(e){var t=e.attributes,n=document.body,r=document.createElement("form");r.setAttribute("height","1"),r.setAttribute("width","1"),Object.keys(t.data).forEach((function(e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t.data[e]),r.appendChild(n)})),r.setAttribute("action",t.action),r.setAttribute("method","post"),n.appendChild(r),setTimeout((function(){r.submit()}),0)}}]),e}(),Hn=function(e,t,n){return new Promise((function(r,o){var i=null;if("string"===pe(t)&&(i=document.querySelector(t)),null===i){var a={code:v.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Failed to execute 'querySelector' on 'Document': ".concat(t," is not a valid selector")};return o(a),void e._dispatchToSDK({name:te.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:g.name,data:a}})}n===Y.popup&&(i.innerHTML=""),e.app&&i.appendChild(e.app),r()}))},qn=n(746),Wn=n.n(qn),Vn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Gn=new Uint8Array(16);function Jn(){if(!xn&&!(xn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xn(Gn)}for(var Zn=[],Qn=0;Qn<256;++Qn)Zn.push((Qn+256).toString(16).slice(1));function $n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]).toLowerCase()}var Xn,er,tr,nr=function(e,t,n){if(Vn.randomUUID&&!t&&!e)return Vn.randomUUID();var r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return $n(r)},rr=window.navigator.userAgent||"",or=function(){var e=rr.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},ir=/android/i.test(rr),ar=/iphone|ipad|ipod/i.test(rr),sr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(rr)&&ir&&rr.indexOf("Version")<0,cr=/qqbrowser/i.test(rr),ur=/firefox/i.test(rr);/baidubrowser/i.test(rr);function lr(e,t){return function(e,t){var n=new URL(e);for(var r in t)r&&n.searchParams.set(r,t[r]);return n.toString()}(e,t)}var fr,pr,dr,hr=5e3;function mr(e,t){fr=+new Date,pr=setTimeout((function(){!(!!er&&document[er])&&e&&e()}),t||5e3)}function vr(e){var t=e.evokeAppBy;(null==t?void 0:t.url)&&(!function(e){var t=e.evokeAppBy,n=e.successCb,r=e.timeout;if(n){var o=+new Date,i=r||hr;o-(fr||+new Date)<i&&n(t)}}(e),pr&&clearTimeout(pr))}function yr(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function gr(e){return gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(e)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){wr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wr(e,t,n){return(t=Rr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rr(r.key),r)}}function Rr(e){var t=function(e,t){if("object"!==gr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===gr(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(er="hidden",tr="visibilitychange"):void 0!==e.mozHidden?(er="mozHidden",tr="mozvisibilitychange"):void 0!==e.msHidden?(er="msHidden",tr="msvisibilitychange"):void 0!==e.webkitHidden&&(er="webkitHidden",tr="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(dr||(dr={}));var Ar=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=void 0,this.timer=void 0,this.options=void 0,this.evokeAppBy=void 0,this.handleDegradationStrategy=function(){var e=n.options,t=e.scheme,r=e.link,o=e.intent,i=e.params;r&&t?(n.options.link=lr(r,i),n.options.scheme=lr(t,i),ar&&or()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=lr(r,i),n.evokeLink()):t?(n.options.scheme=lr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=br(br({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:dr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;Xn||((Xn=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),Xn.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(Xn)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==tr?document.addEventListener(tr,(function(){return vr(e)})):window.addEventListener("pagehide",(function(){return vr(e)}))}},{key:"open",value:function(e){this.options=e;var t=this.options,n=t.scheme,r=t.intent,o=t.link;if(!n&&!o&&!(null==r?void 0:r.scheme))throw new Error("请至少填一个链接");if(n&&yr(n))throw new Error("请填写正确格式的scheme");if(o&&!yr(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&yr(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=dr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=dr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;ar?or()>9||cr?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):sr||ur?this.handleOriginalChrome():this.evokeByIFrameDelay(n,r,o,e)}},{key:"handleIntent",value:function(){var e,t=this,n=this.options,r=n.scheme,o=n.intent,i=n.delay,a=n.link,s=n.fallback,c=(null==o?void 0:o.scheme)||r;c&&!yr(c)&&(this.evokeAppBy.type=dr.INTENT,a&&(e=function(){return t.evokeLink()}),this.evokeByLocationDelay(function(e,t,n){var r="";n&&(r="S.browser_fallback_url=".concat(encodeURIComponent(n),";"));var o=e.substring(0,e.indexOf("://")),i=t?"#Intent;scheme=".concat(o,";package=").concat(t,";"):"#Intent;scheme=".concat(o,";"),a=e.replace(/.*?:\/\//,"intent://");return"".concat(a+i+r,"end")}(c,null==o?void 0:o.package,(null==o?void 0:o.fallbackUrl)||""),i,s,e))}},{key:"handleOriginalChrome",value:function(){this.handleIntent()}},{key:"evokeAppDelay",value:function(e,t,n,r,o){var i=this,a=n||this.config.delay,s=r||this.config.fallback;this.timer=setTimeout((function(){i.clearTimer(),e(),i.checkIsOpen(t,s,o)}),a)}},{key:"evokeByLocationDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){window.location.href=e}(e)}),e,t,n,r)}},{key:"evokeByTagADelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){var t=document.createElement("a");t.setAttribute("href",e),t.style.display="none",document.body.appendChild(t);var n=document.createEvent("HTMLEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}(e)}),e,t,n,r)}},{key:"evokeByIFrameDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){Xn.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,mr(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&_r(t.prototype,n),r&&_r(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Or=function(e){var t=function(e){try{return[JSON.parse(atob(e.split("&&")[3])),e.split("&&").slice(0,3).join("&&")]}catch(t){return console.error("Parsing paymentSessionData is abnormal and may affect the payment link. Please ensure to use the new version of SDK."),[{},e]}}(e),n=m()(t,2),r=n[0],o=n[1];return function(e){Re()&&null!=e&&e.paymentSessionConfig&&e.paymentSessionConfig.productScene===q.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0")}(r),[r,o]},Sr=function(e){var t=Object.assign({paymentSessionMetaData:{},renderDisplayType:Y.popup},e),n=Or(t.paymentSessionData),r=m()(n,2),o=r[0],i=r[1],a=function(e){var t=e.paymentSessionConfig,n=void 0===t?{}:t,r=n.productScene,o=void 0===r?"":r,i=n.paymentMethodCategoryType,a=void 0===i?"":i;return o&&a?"".concat(o,"_").concat(a):H.NONE}(o);return a===H.NONE?Promise.reject("".concat(v.CREATEPAYMENT_PARAMETER_ERROR.code,":Abnormal response data, interface failure, or unsupported payment method")):(t.paymentSessionData=i,t.paymentSessionMetaData=o,Promise.resolve({iframeNodesParams:t,componentSign:a}))},Tr=function(e){s()(r,e);var n=u()(r);function r(){return i()(this,r),n.apply(this,arguments)}return t()(r)}(function(e){s()(r,e);var n=u()(r);function r(e){var t;i()(this,r),t=n.call(this,e),d()(f()(t),"componentApp",void 0);var o=new Yn;return o.setRender(Hn),t._registerPlugin(y,o),t.componentApp=t._getPlugin(y),t}return t()(r,[{key:"parameterInitAndCheck",value:function(e){var t=e.params,n=e.selector,r=e.renderDisplayType;this.options.mode=J.component,this.options.networkMode=this.options.networkMode||Z.session;var o=Object.assign({selector:n,renderDisplayType:r},t);return o&&!o.paymentSessionData?Promise.reject(v.CREATECOMPONENT_ERROR):this.options.networkMode===Z.proxy?(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),Promise.reject(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)):Promise.resolve(o)}},{key:"pluginAppendIframe",value:function(e){try{this.componentApp.appendIframeNodes(e.componentSign,e.iframeNodesParams).then((function(){return Promise.resolve()}))}catch(e){return Promise.reject(e)}}},{key:"createComponent",value:function(e){var t=this;return this.parameterInitAndCheck({params:e,renderDisplayType:Y.popup}).then((function(e){return Sr(e)})).catch((function(e){return t._eventCenter.emit(g.name,{code:v.CREATECOMPONENT_ERROR}),Promise.reject(e)})).then((function(e){return t.pluginAppendIframe(e)}))}},{key:"mountComponent",value:function(e,t){var n=this;return this.parameterInitAndCheck({params:e,renderDisplayType:Y.inline,selector:t}).then((function(e){return Sr(e)})).catch((function(e){return n._eventCenter.emit(g.name,{code:v.CREATECOMPONENT_ERROR}),Promise.reject(e)})).then((function(e){return n.pluginAppendIframe(e)}))}},{key:"submit",value:function(){try{this.componentApp.dispatchToApp({context:{event:"submitPay",data:{}}})}catch(e){console.error(e)}}}]),r}(function(){function e(t){i()(this,e),d()(this,"options",void 0),d()(this,"checkoutState",void 0),d()(this,"_eventCenter",void 0),d()(this,"plugins",void 0),d()(this,"_instanceId",void 0),this._instanceId=nr(),this.options={},this._eventCenter=new de,this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"unmount",value:function(){var e,t=Wn()(this.plugins.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;try{n.logoutPlugin()}catch(e){console.error(e)}}}catch(e){t.e(e)}finally{t.f()}}},{key:"_setOptions",value:function(e){this._setMode(e),this._setEnv(e),this.options.locale=(null==e?void 0:e.locale)||""}},{key:"_setEnv",value:function(e){var t=Ae()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in Q)&&"true"!==t&&(console.warn(v.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.message),e.environment="prod"),this.options.env={terminalType:be?X.WAP:X.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===X.WAP&&(this.options.env.osType=ge?$.IOS:Ee?$.ANDROID:$.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||J.component,null!=e&&e.mode&&!((null==e?void 0:e.mode)in J)&&(console.warn(v.INIT_PARAMETER_ERROR.MODE_ERROR.message),this.options.mode=J.component),this.options.networkMode=(null==e?void 0:e.networkMode)||Z.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in Z)&&(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),this.options.networkMode=Z.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==pe(e.onError))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(g.name,e.onError,g.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==pe(e.onPaymentMethodSelected))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(E.name,e.onPaymentMethodSelected,E.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==pe(e.onSizeChanged))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(b.name,e.onSizeChanged,b.uniqueKey)}if(null!=e&&e.onLog){if("function"!==pe(e.onLog))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(w.name,e.onLog,w.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==pe(e.onEventCallback))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(O.name,e.onEventCallback,O.uniqueKey)}if(null!=e&&e.onClose){if("function"!==pe(e.onClose))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(A.name,e.onClose,A.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===pe(t))throw t;throw new Error("Failed to register plug-in:".concat(e," Exception in the apply function of the plug-in"))}}},{key:"_getPlugin",value:function(e){return this.plugins.has(e)?this.plugins.get(e):(console.warn("".concat(e,"Plugin unregistered")),null)}},{key:"_redirect",value:function(e){var t=this;return new Promise((function(n,r){var o=t.options.env.terminalType===X.WEB,i=(null==e?void 0:e.normalUrl)||"",a=(null==e?void 0:e.schemeUrl)||"",s=(null==e?void 0:e.applinkUrl)||"",c=function(){if(i)return n(),void(window.location.href=i);r(v.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Ar(e).open({scheme:a,link:s})}catch(e){c()}}else c()}()}))}},{key:"_overrideSubscription",value:function(e,t,n){this._eventCenter.off(e,t,n),this._eventCenter.on(e,t,n)}}]),e}())),xr=function(e){s()(r,e);var n=u()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(Tr),Pr=Tr}(),r}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={861:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},207:function(e,t,n){"use strict";var r=n(861),o=n(90),i=n(736);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n);e=s(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,p=0;p<c;p++)if(u(e,i+p)!==u(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return Y(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return Y(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return w(e,t,n,r)}function R(e,t,n,r){return Y(z(t),e,n,r)}function A(e,t,n,r){return Y(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.lW=c,t.h2=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).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}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=K(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}},736:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},90:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=u}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m}},317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},374:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},404:function(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},400:function(e,t,n){var r=n(242),o=n(424),i=n(983);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},143:function(e,t,n){var r=n(281);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},242:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},821:function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},424:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},118:function(e,t,n){var r=n(143);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},983:function(e,t,n){var r=n(944).default,o=n(374);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},662:function(e,t,n){var r=n(944).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new x(r||[]);return a(i,"_invoke",{value:A(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h={};function m(){}function v(){}function y(){}var g={};f(g,c,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==n&&i.call(b,c)&&(g=b);var w=y.prototype=m.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(o,a,s,c){var u=d(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return v.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},_(R.prototype),f(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new R(p(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),o=n(249),i=n(508),a=n(20);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,o=n(224);e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AMSAutoDebit:function(){return Pr},AMSCheckout:function(){return xr},checkoutDisplayEnum:function(){return G},componentSignEnum:function(){return H},default:function(){return kr},environmentEnum:function(){return Q},errorEnum:function(){return re},localeEnum:function(){return V},messageName:function(){return te},modeEnum:function(){return J},networkModeEnum:function(){return Z},osTypeEnum:function(){return $},paymentMethodCategoryTypeEnum:function(){return W},platformEnum:function(){return ee},productSceneEnum:function(){return q},renderDisplayTypeEnum:function(){return Y},targetEnum:function(){return ne},terminalTypeEnum:function(){return X}});var e=n(702),t=n.n(e),o=n(486),i=n.n(o),a=n(821),s=n.n(a),c=n(400),u=n.n(c),l=n(374),f=n.n(l),p=n(143),d=n.n(p),h=n(925),m=n.n(h),v={DOMAIN_NOT_IN_WHITE_LIST:{code:"SDK_INTERNAL_ERROR",message:"Origin of the message is not in the white list"},NOT_JSON_FORMAT:{code:"SDK_INTERNAL_ERROR",message:"The message string should conform to the json format"},SDK_COMPATIBILITY_ISSUES:{code:"SDK_INTERNAL_ERROR",BROWSER_NOT_SUPPORT_POSTMESSAGE:{code:"SDK_INTERNAL_ERROR",message:"The browser does not support the postmessage communication mode"},FAILED_TO_CREATE_IFRAME:{code:"SDK_INTERNAL_ERROR",message:"Failed to create iframe"}},INIT_PARAMETER_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",UI_MODE_NOT_SUPPORTED:{code:"SDK_INIT_PARAMETER_ERROR",message:"This UI mode is not supported"},ENVIRONMENT_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"The current input environment does not support or is not in the standard enumeration"},MODE_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"mode value not in enum"},LOCALE_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"The current input language does not support or is not in the standard enumeration"},NET_MODE_NOT_SUPPORT:{code:"SDK_INIT_PARAMETER_ERROR",message:"The network mode is not supported"},EVENT_ERROR:{code:"SDK_INIT_PARAMETER_ERROR",message:"Parameter type should be function"}},CREATEPAYMENT_PARAMETER_ERROR:{code:"SDK_CREATEPAYMENT_PARAMETER_ERROR"},CONFIRMPAYMENT_PARAMETER_ERROR:{code:"SDK_CONFIRMPAYMENT_PARAMETER_ERROR"},CREATECOMPONENT_ERROR:{code:"SDK_CREATECOMPONENT_ERROR",message:"Failed to create component",SINGLETON_COMPONENT_ERROR:{code:"SDK_CREATECOMPONENT_ERROR",message:"Only one component can be rendered simultaneously"},LOAD_APP_TIMEOUT:{code:"SDK_CREATECOMPONENT_ERROR",message:"Load resource timeout"}},SDK_CALL_URL_ERROR:{code:"SDK_CALL_URL_ERROR",REDIRECT_ERROR:{code:"SDK_CALL_URL_ERROR",message:"Redirect data exception"}},SDK_SUBMIT_ERROR:{code:"SDK_SUBMIT_ERROR",message:"Component not created or current browser compatibility issue, not supported"}},y="COMPONENT",g={name:"onError",uniqueKey:"userOnError"},E={name:"onPaymentMethodSelected",uniqueKey:"userOnPaymentMethodSelected"},b={name:"onSizeChanged",uniqueKey:"userOnSizeChanged"},w={name:"onLog",uniqueKey:"userOnLog"},_={name:"onLaunch"},R={name:"onRedirect"},A={name:"onClose",uniqueKey:"userOnClose"},O={name:"onEventCallback",uniqueKey:"userEventCallback"},S={name:"submitForm"},T={name:"hideCloseButton"},x={name:"showCloseButton"},P={name:"setAllowRetention"},k={name:"declareCheckoutInfo"},C={name:"showPopup"},I={name:"dismissLoading"},D=n(662),N=n.n(D),L=n(404),M=n.n(L),U=n(118),B=n.n(U),j={dev:"http://page.alipay.net/page/antom-web-checkout/src/component-app",sit:"http://page.test.alipay.net/page/antom-web-checkout/src/component-app",pre:"https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app",sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",light_sandbox:"https://ac.alipay.com/page/antom-web-checkout/src/component-app",prod:"https://ac.alipay.com/page/antom-web-checkout/src/component-app"},K="1.5.0",F=n(944),z=n.n(F),Y=function(e){return e.popup="popup",e.inline="inline",e}({}),H=function(e){return e.EASY_PAY_WALLET="EASY_PAY_WALLET",e.CASHIER_PAYMENT_CARD="CASHIER_PAYMENT_CARD",e.CASHIER_PAYMENT_BANK="CASHIER_PAYMENT_BANK",e.AUTO_DEBIT_WALLET="AUTO_DEBIT_WALLET",e.NONE="NONE",e}({}),q=function(e){return e.EASY_PAY="EASY_PAY",e.CASHIER_PAYMENT="CASHIER_PAYMENT",e.AUTO_DEBIT="AUTO_DEBIT",e}({}),W=function(e){return e.CARD="CARD",e.WALLET="WALLET",e.BANK="BANK",e}({}),V=function(e){return e["en-US"]="en-US",e}({}),G=function(e){return e.horizon="horizon",e.vertical="vertical",e}({}),J=function(e){return e.dropin="dropin",e.component="component",e}({}),Z=function(e){return e.proxy="proxy",e.session="session",e}({}),Q=function(e){return e.sandbox="sandbox",e.prod="prod",e.light_sandbox="light_sandbox",e}({}),$=function(e){return e.IOS="IOS",e.ANDROID="ANDROID",e.ELSE="ELSE",e}({}),X=function(e){return e.WEB="WEB",e.WAP="WAP",e.APP="APP",e.MINI_APP="MINI_APP",e}({}),ee=function(e){return e.desktop="desktop",e.mobile="mobile",e}({}),te=function(e){return e.SDK_TO_APP="SDK_TO_APP",e.APP_TO_SDK="APP_TO_SDK",e.APP_TO_APP="APP_TO_APP",e}({}),ne=function(e){return e.BLANK="_blank",e.SELF="_self",e}({}),re=function(e){return e.PARAMS="PARAMS",e.TIMEOUT="TIMEOUT",e.NETWORK="NETWORK",e.SYSTEM="SYSTEM",e.LOGIN="LOGIN",e.GATEWAY="GATEWAY",e.VALIDATION="VALIDATION",e.TAOBAOBINDALIPAY="TAOBAOBINDALIPAY",e.REGISTERWALLET="REGISTERWALLET",e.NOALIPAYID="NOALIPAYID",e.TRUSTLOGINERROR="TRUSTLOGINERROR",e.SIGNIN="SIGNIN",e.GETSIGNPARAMSERROR="GETSIGNPARAMSERROR",e}({}),oe=".".charCodeAt(0),ie=/\\(\\)?/g,ae=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ce=/^\w*$/;function ue(e){if("string"==typeof e)return e;var t="".concat(e);return"0"===t&&1/e==-Infinity?"-0":t}function le(e,t){return Array.isArray(e)?e:function(e,t){if(Array.isArray(e))return!1;var n=z()(e);return"number"===n||"boolean"===n||null===e||ce.test(e)||!se.test(e)||null!==t&&e in Object(t)}(e,t)?[e]:(r=[],(n=e).charCodeAt(0)===oe&&r.push(""),n.replace(ae,(function(e,t,n,o){var i=e;return n?i=o.replace(ie,"$1"):t&&(i=t.trim()),r.push(i),""})),r);var n,r}function fe(e,t,n){var r=null===e?void 0:function(e,t){for(var n=le(t,e),r=0,o=n.length,i=e;null!==i&&r<o;)i=i[ue(n[r++])];return r&&r===o?i:void 0}(e,t);return void 0===r?n:r}var pe=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},de=function(){function e(){i()(this,e),d()(this,"events",void 0),d()(this,"eventsKey",void 0),this.events=new Map,this.eventsKey=new Map}return t()(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n){if(this.eventsKey.has("".concat(e,"-").concat(n)))return void console.warn("".concat(n,":Has been registered. Please use another key or do not pass the key"));this.eventsKey.set("".concat(e,"-").concat(n),!0)}var r=this.events.get(e)||[];r.push({func:t,key:n||""}),this.events.set(e,r)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n&&this.eventsKey.has("".concat(e,"-").concat(n))&&this.eventsKey.delete("".concat(e,"-").concat(n)),this.events.has(e)){var r=this.events.get(e);r=r.filter((function(e){return(t!==e.func||e.key!==n)&&(!e.key||e.key!==n)})),this.events.set(e,r)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.events.has(e)){var o=this.events.get(e);o.forEach((function(e){e.func.apply(e,n)}))}}},{key:"once",value:function(e,t,n){var r=this;this.on(e,(function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];t.call.apply(t,[r].concat(a)),r.off(e,o,n)}),n)}}]),e}(),he=window.navigator,me=he.userAgent,ve=/iPhone|iPad|iPod/i.test(me)||"MacIntel"===he.platform&&he.maxTouchPoints>1,ye=/Android/i.test(me),ge=(/\bMacintosh\b/.test(me),/Windows NT/.test(me),ve),Ee=ye,be=!!/Android|iPhone|iPad|iPod|Mobile/.test(me),we=function(e,t){try{return JSON.parse(e)||t}catch(e){return t}},_e=function(e,t){var n=fe(e,"Result-Status")||fe(e,"result-status","");if(!n)return null;if(2e3==+n)return{success:!1,traceId:t,errorCode:re.LOGIN,resultStatus:n};if(4001==+n)return{success:!1,traceId:t,errorCode:re.TIMEOUT,resultStatus:n};if(1e3!=+n){var r=fe(e,"Tips")||fe(e,"tips",""),o=fe(e,"Memo")||fe(e,"memo","");return{success:!1,traceId:t,errorCode:re.GATEWAY,errorMessage:decodeURIComponent(r||""),result:{resultStatus:n||"",tips:decodeURIComponent(r||""),memo:decodeURIComponent(o||"")},resultStatus:n}}return null},Re=function(){var e=he.userAgent;return!["Android","iPhone","SymbianOS","Windows Phone","iPod"].some((function(t){return e.includes(t)}))},Ae=function(e){var t={};return e||(e=window.location.href),e.replace(/([^?=&#]+)(=([^&#]*))?/g,(function(e,n,r,o){return void 0===o?"":(t[n]=decodeURIComponent(o),t[n])})),t},Oe=function(){var e=document.documentElement.clientWidth,t=Re()?130:100*e/390;return Math.min(t,130)},Se=function(e,t){try{(t||document.getElementById("ams-component-container")).style.fontSize="".concat(Oe(),"px"),innerHeight=window.innerHeight}catch(e){}},Te=Ae(),xe=Te._light_sandbox,Pe=Te.groupId,ke=Te.requestHost,Ce={local:"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",dev:ke||"http://imgs-1164.gz00b.dev.alipay.net/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",pre:"https://imgs-sea-pre.alipay.com/mgw.htm",prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"},Ie="ANTOM_PAYMENT_WEB",De=Pe||"GROUP_20230523202227";function Ne(e,t){return function(){return e.apply(t,arguments)}}var Le,Me=Object.prototype.toString,Ue=Object.getPrototypeOf,Be=(Le=Object.create(null),function(e){var t=Me.call(e);return Le[t]||(Le[t]=t.slice(8,-1).toLowerCase())}),je=function(e){return e=e.toLowerCase(),function(t){return Be(t)===e}},Ke=function(e){return function(t){return F(t)===e}},Fe=Array.isArray,ze=Ke("undefined");var Ye=je("ArrayBuffer");var He=Ke("string"),qe=Ke("function"),We=Ke("number"),Ve=function(e){return null!==e&&"object"===F(e)},Ge=function(e){if("object"!==Be(e))return!1;var t=Ue(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Je=je("Date"),Ze=je("File"),Qe=je("Blob"),$e=je("FileList"),Xe=je("URLSearchParams");function et(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==F(e)&&(e=[e]),Fe(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var s,c=a?Object.getOwnPropertyNames(e):Object.keys(e),u=c.length;for(n=0;n<u;n++)s=c[n],t.call(null,e[s],s,e)}}function tt(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,rt=function(e){return!ze(e)&&e!==nt};var ot,it,at=(ot="undefined"!=typeof Uint8Array&&Ue(Uint8Array),function(e){return ot&&e instanceof ot}),st=je("HTMLFormElement"),ct=(it=Object.prototype.hasOwnProperty,function(e,t){return it.call(e,t)}),ut=je("RegExp"),lt=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};et(n,(function(n,o){!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},ft="abcdefghijklmnopqrstuvwxyz",pt="0123456789",dt={DIGIT:pt,ALPHA:ft,ALPHA_DIGIT:ft+ft.toUpperCase()+pt};var ht=je("AsyncFunction"),mt={isArray:Fe,isArrayBuffer:Ye,isBuffer:function(e){return null!==e&&!ze(e)&&null!==e.constructor&&!ze(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||qe(e.append)&&("formdata"===(t=Be(e))||"object"===t&&qe(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ye(e.buffer)},isString:He,isNumber:We,isBoolean:function(e){return!0===e||!1===e},isObject:Ve,isPlainObject:Ge,isUndefined:ze,isDate:Je,isFile:Ze,isBlob:Qe,isRegExp:ut,isFunction:qe,isStream:function(e){return Ve(e)&&qe(e.pipe)},isURLSearchParams:Xe,isTypedArray:at,isFileList:$e,forEach:et,merge:function e(){for(var t=rt(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&tt(r,o)||o;Ge(r[i])&&Ge(t)?r[i]=e(r[i],t):Ge(t)?r[i]=e({},t):Fe(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&et(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return et(t,(function(t,r){n&&qe(t)?e[r]=Ne(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:je,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(Fe(e))return e;var t=e.length;if(!We(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:st,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:lt,freezeMethods:function(e){lt(e,(function(t,n){if(qe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];qe(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return Fe(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:tt,global:nt,isContextDefined:rt,ALPHABET:dt,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dt.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&qe(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Ve(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=Fe(n)?[]:{};return et(n,(function(t,n){var i=e(t,r+1);!ze(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:ht,isThenable:function(e){return e&&(Ve(e)||qe(e))&&qe(e.then)&&qe(e.catch)}};function vt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}mt.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:mt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var yt=vt.prototype,gt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){gt[e]={value:e}})),Object.defineProperties(vt,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=function(e,t,n,r,o,i){var a=Object.create(yt);return mt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),vt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Et=vt,bt=n(207).lW;function wt(e){return mt.isPlainObject(e)||mt.isArray(e)}function _t(e){return mt.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var At=mt.toFlatObject(mt,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Ot=function(e,t,n){if(!mt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=mt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!mt.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&mt.isSpecCompliantForm(t);if(!mt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(mt.isDate(e))return e.toISOString();if(!s&&mt.isBlob(e))throw new Et("Blob is not supported. Use a Buffer instead.");return mt.isArrayBuffer(e)||mt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):bt.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===F(e))if(mt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(mt.isArray(e)&&function(e){return mt.isArray(e)&&!e.some(wt)}(e)||(mt.isFileList(e)||mt.endsWith(n,"[]"))&&(s=mt.toArray(e)))return n=_t(n),s.forEach((function(e,r){!mt.isUndefined(e)&&null!==e&&t.append(!0===a?Rt([n],r,i):null===a?n:n+"[]",c(e))})),!1;return!!wt(e)||(t.append(Rt(o,n,i),c(e)),!1)}var l=[],f=Object.assign(At,{defaultVisitor:u,convertValue:c,isVisitable:wt});if(!mt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!mt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),mt.forEach(n,(function(n,i){!0===(!(mt.isUndefined(n)||null===n)&&o.call(t,n,mt.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function St(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Tt(e,t){this._pairs=[],e&&Ot(e,this,t)}var xt=Tt.prototype;xt.append=function(e,t){this._pairs.push([e,t])},xt.toString=function(e){var t=e?function(t){return e.call(this,t,St)}:St;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Pt=Tt;function kt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(e,t,n){if(!t)return e;var r,o=n&&n.encode||kt,i=n&&n.serialize;if(r=i?i(t,n):mt.isURLSearchParams(t)?t.toString():new Pt(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var It,Dt=function(){function t(){o(this,t),this.handlers=[]}return e(t,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){mt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),t}(),Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:("undefined"==typeof navigator||"ReactNative"!==(It=navigator.product)&&"NativeScript"!==It&&"NS"!==It)&&"undefined"!=typeof window&&"undefined"!=typeof document,isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var Mt=function(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&mt.isArray(r)?r.length:i,s?(mt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&mt.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&mt.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(mt.isFormData(e)&&mt.isFunction(e.entries)){var n={};return mt.forEachEntry(e,(function(e,r){t(function(e){return mt.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null},Ut={"Content-Type":void 0};var Bt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=mt.isObject(e);if(i&&mt.isHTMLForm(e)&&(e=new FormData(e)),mt.isFormData(e))return o&&o?JSON.stringify(Mt(e)):e;if(mt.isArrayBuffer(e)||mt.isBuffer(e)||mt.isStream(e)||mt.isFile(e)||mt.isBlob(e))return e;if(mt.isArrayBufferView(e))return e.buffer;if(mt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ot(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Lt.isNode&&mt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=mt.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ot(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(mt.isString(e))try{return(t||JSON.parse)(e),mt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&mt.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Et.from(e,Et.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};mt.forEach(["delete","get","head"],(function(e){Bt.headers[e]={}})),mt.forEach(["post","put","patch"],(function(e){Bt.headers[e]=mt.merge(Ut)}));var jt=Bt,Kt=mt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ft=Symbol("internals");function zt(e){return e&&String(e).trim().toLowerCase()}function Yt(e){return!1===e||null==e?e:mt.isArray(e)?e.map(Yt):String(e)}function Ht(e,t,n,r,o){return mt.isFunction(r)?r.call(this,t,n):(o&&(t=n),mt.isString(t)?mt.isString(r)?-1!==t.indexOf(r):mt.isRegExp(r)?r.test(t):void 0:void 0)}var qt=function(t,n){function r(e){o(this,r),e&&this.set(e)}return e(r,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=zt(t);if(!o)throw new Error("header name must be a non-empty string");var i=mt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Yt(e))}var i=function(e,t){return mt.forEach(e,(function(e,n){return o(e,n,t)}))};return mt.isPlainObject(e)||e instanceof this.constructor?i(e,t):mt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&Kt[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)})),o}(e),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=zt(e)){var n=mt.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(mt.isFunction(t))return t.call(this,r,n);if(mt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=zt(e)){var n=mt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ht(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=zt(e)){var o=mt.findKey(n,e);!o||t&&!Ht(0,n[o],o,t)||(delete n[o],r=!0)}}return mt.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Ht(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return mt.forEach(this,(function(r,o){var i=mt.findKey(n,o);if(i)return t[i]=Yt(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Yt(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return mt.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&mt.isArray(n)?n.join(", "):n)})),t}},{key:t,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=h(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:n,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[Ft]=this[Ft]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=zt(e);t[r]||(!function(e,t){var n=mt.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return mt.isArray(e)?e.forEach(r):r(e),this}}]),r}(Symbol.iterator,Symbol.toStringTag);qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),mt.freezeMethods(qt.prototype),mt.freezeMethods(qt);var Wt=qt;function Vt(e,t){var n=this||jt,r=t||n,o=Wt.from(r.headers),i=r.data;return mt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Gt(e){return!(!e||!e.__CANCEL__)}function Jt(e,t,n){Et.call(this,null==e?"canceled":e,Et.ERR_CANCELED,t,n),this.name="CanceledError"}mt.inherits(Jt,Et,{__CANCEL__:!0});var Zt=Jt;var Qt=Lt.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),mt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),mt.isString(r)&&a.push("path="+r),mt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function $t(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Xt=Lt.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=mt.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var en=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var c=Date.now(),u=o[a];n||(n=c),r[i]=s,o[i]=c;for(var l=a,f=0;l!==i;)f+=r[l++],l%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(c-n<t)){var p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}};function tn(e,t){var n=0,r=en(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s);n=i;var u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var nn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o=e.data,i=Wt.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}mt.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+l))}var f=$t(e.baseURL,e.url);function p(){if(c){var r=Wt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Et("Request failed with status code "+n.status,[Et.ERR_BAD_REQUEST,Et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),Ct(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new Et("Request aborted",Et.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Et("Network Error",Et.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Et(t,r.clarifyTimeoutError?Et.ETIMEDOUT:Et.ECONNABORTED,e,c)),c=null},Lt.isStandardBrowserEnv){var d=(e.withCredentials||Xt(f))&&e.xsrfCookieName&&Qt.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}void 0===o&&i.setContentType(null),"setRequestHeader"in c&&mt.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),mt.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",tn(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",tn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){c&&(n(!t||t.type?new Zt(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var h,m=(h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&h[1]||"";m&&-1===Lt.protocols.indexOf(m)?n(new Et("Unsupported protocol "+m+":",Et.ERR_BAD_REQUEST,e)):c.send(o||null)}))},rn={http:null,xhr:nn};mt.forEach(rn,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var on=function(e){for(var t,n,r=(e=mt.isArray(e)?e:[e]).length,o=0;o<r&&(t=e[o],!(n=mt.isString(t)?rn[t.toLowerCase()]:t));o++);if(!n){if(!1===n)throw new Et("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(mt.hasOwnProp(rn,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!mt.isFunction(n))throw new TypeError("adapter is not a function");return n};function an(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zt(null,e)}function sn(e){return an(e),e.headers=Wt.from(e.headers),e.data=Vt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),on(e.adapter||jt.adapter)(e).then((function(t){return an(e),t.data=Vt.call(e,e.transformResponse,t),t.headers=Wt.from(t.headers),t}),(function(t){return Gt(t)||(an(e),t&&t.response&&(t.response.data=Vt.call(e,e.transformResponse,t.response),t.response.headers=Wt.from(t.response.headers))),Promise.reject(t)}))}var cn=function(e){return e instanceof Wt?e.toJSON():e};function un(e,t){t=t||{};var n={};function r(e,t,n){return mt.isPlainObject(e)&&mt.isPlainObject(t)?mt.merge.call({caseless:n},e,t):mt.isPlainObject(t)?mt.merge({},t):mt.isArray(t)?t.slice():t}function o(e,t,n){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!mt.isUndefined(t))return r(void 0,t)}function a(e,t){return mt.isUndefined(t)?mt.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(cn(e),cn(t),!0)}};return mt.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=c[r]||o,a=i(e[r],t[r],r);mt.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ln="1.4.0",fn={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){fn[e]=function(n){return F(n)===e||"a"+(t<1?"n ":" ")+e}}));var pn={};fn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Et(r(o," has been removed"+(t?" in "+t:"")),Et.ERR_DEPRECATED);return t&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var dn={assertOptions:function(e,t,n){if("object"!==F(e))throw new Et("options must be an object",Et.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new Et("option "+i+" must be "+c,Et.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Et("Unknown option "+i,Et.ERR_BAD_OPTION)}},validators:fn},hn=dn.validators,mn=function(){function t(e){o(this,t),this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}return e(t,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n,r=t=un(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&dn.assertOptions(o,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),null!=i&&(mt.isFunction(i)?t.paramsSerializer={serialize:i}:dn.assertOptions(i,{encode:hn.function,serialize:hn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=a&&mt.merge(a.common,a[t.method]))&&mt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Wt.concat(n,a);var s=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,l=[];this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));var f,p=0;if(!c){var d=[sn.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,u=Promise.resolve(t);p<f;)u=u.then(d[p++],d[p++]);return u}f=s.length;var h=t;for(p=0;p<f;){var m=s[p++],v=s[p++];try{h=m(h)}catch(e){v.call(this,e);break}}try{u=sn.call(this,h)}catch(e){return Promise.reject(e)}for(p=0,f=l.length;p<f;)u=u.then(l[p++],l[p++]);return u}},{key:"getUri",value:function(e){return Ct($t((e=un(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),t}();mt.forEach(["delete","get","head","options"],(function(e){mn.prototype[e]=function(t,n){return this.request(un(n||{},{method:e,url:t,data:(n||{}).data}))}})),mt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(un(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}mn.prototype[e]=t(),mn.prototype[e+"Form"]=t(!0)}));var vn=mn,yn=function(){function t(e){if(o(this,t),"function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,t,o){r.reason||(r.reason=new Zt(e,t,o),n(r.reason))}))}return e(t,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var e;return{token:new t((function(t){e=t})),cancel:e}}}]),t}(),gn=yn;var En={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(En).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];En[r]=n}));var bn=En;var wn=function e(t){var n=new vn(t),r=Ne(vn.prototype.request,n);return mt.extend(r,vn.prototype,n,{allOwnKeys:!0}),mt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(un(t,n))},r}(jt);wn.Axios=vn,wn.CanceledError=Zt,wn.CancelToken=gn,wn.isCancel=Gt,wn.VERSION=ln,wn.toFormData=Ot,wn.AxiosError=Et,wn.Cancel=wn.CanceledError,wn.all=function(e){return Promise.all(e)},wn.spread=function(e){return function(t){return e.apply(null,t)}},wn.isAxiosError=function(e){return mt.isObject(e)&&!0===e.isAxiosError},wn.mergeConfig=un,wn.AxiosHeaders=Wt,wn.formToJSON=function(e){return Mt(mt.isHTMLForm(e)?new FormData(e):e)},wn.HttpStatusCode=bn,wn.default=wn;var _n=wn,Rn=Ae()._sandbox;function An(e){var t,n,r,o=new Date,i=o.getTime()+60*o.getTimezoneOffset()*1e3,a=e.env||"prod",s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n={pre:"https://imgs-sea-pre.alipay.com/mgw.htm",sit:ke||"http://imgs-9.sggz00a.test.alipay.net/mgw.htm",dev:ke||"http://imgs-13.sggz00b.stable.alipay.net/mgw.htm"},r={"com.ipay.iexpcashier.sdkAction.query":"com.ipay.iopensandbox.sdk.paymentSession.query"},o="SDK_MOCK_SANDBOX",i=Pe||"GROUP_20230315210531";return r[e]&&"light_sandbox"===t||"true"===xe?{appId:o,sofaId:i,baseURL:n[t],"Operation-Type":r[e]}:{appId:"",sofaId:"",baseURL:"","Operation-Type":""}}(e["Operation-Type"],a),c=e.baseURL||s.baseURL||function(e,t){return"prod"===t||"sandbox"===t||"light_sandbox"===t?{SG:"https://imgs-sea-global.alipay.com/mgw.htm",US:"https://imgs-na-global.alipay.com/mgw.htm",DE:"https://imgs-de-global.alipay.com/mgw.htm"}[e||"SG"]:"pre"===t?{SG:"https://imgs-sea-pre.alipay.com/mgw.htm",US:"https://imgs-pre.alipay.com/mgw.htm",DE:"https://imgs-de-pre.alipay.com/mgw.htm"}[e||"SG"]:""}(null==e?void 0:e.hostSign,a)||Ce[a],u=B()((t={appId:s.appId||Ie,workspaceId:"pre"===e.env?"pre":"default"},d()(t,"x-cors-".concat(Ie.toLowerCase(),"-default"),"1"),d()(t,"version","2.0"),d()(t,"sofa-group-name",s.sofaId||De),d()(t,"Operation-Type",s["Operation-Type"]||e["Operation-Type"]||""),d()(t,"Client-Time",i),d()(t,"tntInstId","ALIPW3SG"),d()(t,"sdk-version",K||""),t),e.headers);return"true"!==Rn&&"sandbox"!==a||(u["load-test"]=!0,u.sofaPenAttrs="instMock=O&loadMode=2"),"dev"!==a&&delete u["sofa-group-name"],_n.create({baseURL:c,timeout:null!==(n=e.timeout)&&void 0!==n?n:15e3,headers:u,withCredentials:null===(r=e.withCredentials)||void 0===r||r,method:"POST"}).request}function On(e,t){return Sn.apply(this,arguments)}function Sn(){return(Sn=M()(N()().mark((function e(t,n){var r,o,i,a,s,c,u,l,f,p,d,h,m,v;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=An(n),Date.now(),o={terminalType:Re()?"WEB":"WAP",browserInfo:{browserJavaScriptEnabled:!0,browserLanguage:navigator.language,browserUserAgent:navigator.userAgent,browserColorDepth:screen.colorDepth},locale:n.locale||"en_US",deviceLanguage:navigator.language,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset()};try{o.browserInfo.browserJavaEnabled=(null===(i=navigator)||void 0===i?void 0:i.javaEnabled())||!1}catch(e){}return"WAP"===o.terminalType&&(o.osType=ge?"IOS":"ANDROID"),a=n.needEnvInfo?[B()(B()({},t),{},{envInfo:o,extParams:{refUrl:window.location.href}})]:[t],e.prev=6,e.next=9,r({data:a});case 9:if(s=e.sent,c=s.data,u=s.headers,l=c||{},f=fe(u,"Mgw-TraceId")||fe(u,"mgw-traceid",""),l.traceId=f||"",null==(p=_e(u,f))||!p.errorCode){e.next=18;break}throw new Error(JSON.stringify({errorMessage:(null==l?void 0:l.errorMessage)||(null==p?void 0:p.errorMessage),errorCode:null==p?void 0:p.errorCode,success:!1}));case 18:return e.abrupt("return",l);case 21:return e.prev=21,e.t0=e.catch(6),console.log("request error",null===e.t0||void 0===e.t0?void 0:e.t0.message),h=we(null===e.t0||void 0===e.t0?void 0:e.t0.message,{success:!1,errorCode:re.SYSTEM,errorMessage:""}),m=null!==e.t0&&void 0!==e.t0&&null!==(d=e.t0.message)&&void 0!==d&&d.includes("timeout")?re.TIMEOUT:"",v=(null==h?void 0:h.errorCode)||m,e.abrupt("return",Promise.reject({success:!1,errorCode:v,errorMessage:""}));case 28:case"end":return e.stop()}}),e,null,[[6,21]])})))).apply(this,arguments)}function Tn(){return(Tn=M()(N()().mark((function e(t,n){var r;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=((null==t?void 0:t.paymentSessionData)||"").split("&&")[1]||"",e.abrupt("return",On(t,B()(B()({},n),{},{hostSign:r,needEnvInfo:!0,"Operation-Type":"com.ipay.iexpcashier.sdkAction.query"})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xn,Pn=function(e){try{return JSON.parse(e).versionMap.web[K].targetWebVerison}catch(e){return""}},kn=function(e,t){var n,r=(n={},d()(n,H.NONE,[""]),d()(n,H.AUTO_DEBIT_WALLET,["1.0"]),d()(n,H.CASHIER_PAYMENT_BANK,["1.0"]),d()(n,H.CASHIER_PAYMENT_CARD,["1.0"]),d()(n,H.EASY_PAY_WALLET,["1.0","2.0"]),n)[e],o=r.find((function(e){return e===t})),i=r[r.length-1];return o?t:i},Cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prod",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=Ae()||{},a=i.host,s=Pn(o)||t,c=kn(n,r);return a&&!["sandbox","light_sandbox","prod"].includes(e)?a:"".concat(j[e],"/").concat(n,"/").concat(c,"/index.").concat(s,".html")},In=function(e){var t=e.componentSign,n=e.analytics,r=void 0===n?{enabled:!0}:n,o=e.productSceneVersion,i=e.environment,a=e.appVersion,s=e.extendInfo,c=e.locale,u=e.instanceId,l=Cn(i,a,t,o,s||""),f=function(e){var t=document.getElementsByTagName("meta").viewPort,n={};if(t)for(var r=t.content.split(","),o=0;o<r.length;o++){var i=r[o].split("=");n[i[0]]=i[1]}return n[e]}("initial-scale")||1,p=Ae(),d=p._sandbox,h=p._light_sandbox,m=p.requestHost,v=void 0===m?"":m,y=p.groupId,g=void 0===y?"":y,E=p.LOCAL_MOCK,b=Object.assign({},{locale:c,scale:f,instanceId:u,analyticsEnabled:!1===(null==r?void 0:r.enabled)?"false":"true",sdkVersion:K,refUrl:window.location.href});E&&(b.LOCAL_MOCK=E),v&&(b.requestHost=v),g&&(b.groupId=g),"light_sandbox"!==i&&"true"!==h||(b.sandbox="true"),"sandbox"!==i&&"true"!==d||(b.shadow="true");var w=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=encodeURIComponent(n),o=encodeURIComponent(null===e[n]?"":e[n]);t.push("".concat(r,"=").concat(o))}return t.join("&")}(b);return"".concat(l,"?").concat(w)},Dn="ams-component-loading",Nn="inline-loading",Ln="#ams-checkout-component-desktop{\n border-radius: 8px;\n position: absolute;\n top: 0;\n left: 0;\n}\n#ams-checkout-component-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.".concat("ams-component-container","-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(Dn,"{\n width: 100%;\n flex: 1;\n}\n.").concat(Nn,"{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(Nn,"-mobile{\n padding: 0 0.16em;\n}\n.").concat(Nn,"-desktop{}\n"),Mn=window.innerHeight,Un="ams-component-container",Bn="ams-component-section",jn="asm-component-close-block",Kn="ams-component-retention",Fn="ams-component-mockup",zn="ams-component-loading",Yn="_ams_sdk_component_listener",Hn=function(){function e(){i()(this,e),d()(this,"app",void 0),d()(this,"appDomain",void 0),d()(this,"AMSSDK",void 0),d()(this,"platform",void 0),d()(this,"createIframeNode",void 0),d()(this,"_selector",void 0),d()(this,"_appVersion",void 0),d()(this,"_isRetention",void 0),d()(this,"_actionQueryPromise",null),d()(this,"_loadAppPromiseResolve",null),d()(this,"_renderParams",null),d()(this,"_componentSign",H.NONE),d()(this,"_performanceData",[]),d()(this,"_isInitComponent",void 0),d()(this,"_clickEventName",void 0),d()(this,"_renderDisplayType",Y.popup),this._appVersion="1.5.0",this._isInitComponent=!1,this._selector="#".concat(Bn),this.createIframeNode=function(){return Promise.resolve()},this.platform=Re()?ee.desktop:ee.mobile,this._clickEventName=this.platform===ee.mobile?"touchend":"click",this._isRetention=!0,this._performanceData.push({key:"sdk_init",value:Date.now()})}var n;return t()(e,[{key:"logoutPlugin",value:function(){this.cleanContainer(!0)}},{key:"applyPlugin",value:function(e){this.AMSSDK=e,this.subscribeFromSDK()}},{key:"setRender",value:function(e){this.createIframeNode=e}},{key:"appendIframeNodes",value:function(e,t){var n=this;if(this._isInitComponent)return this.dispatchToSDK(g.name,v.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR),Promise.reject(v.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);this._isInitComponent=!0,this._renderParams=t,this._componentSign=e,null!=t&&t.selector&&(this._selector=t.selector),this._renderDisplayType=t.renderDisplayType;var r=this._renderDisplayType===Y.inline?"#".concat(Un):this._selector;return this._performanceData.push({key:"sdk_create_component",value:Date.now()}),this._renderDisplayType===Y.inline&&this.createInlineBaseElement(t),this._renderDisplayType===Y.popup&&(this.createBaseElement(),this.setContainerClass(),this.createRetentionPopup(),this.createMockup(),this.renderPopupLoading(t)),this.createApp(t),Promise.all([this.createActionQueryPromise(),this.createIframeNode(this,r,this._renderDisplayType),this.createLoadAppPromise()]).catch((function(e){return n._isInitComponent=!1,n.cleanContainer(),Promise.reject(e)}))}},{key:"renderPopupLoading",value:function(e){var t,n=null==e||null===(t=e.appearance)||void 0===t?void 0:t.showLoading;if((n="boolean"!=typeof n||n)&&this._renderDisplayType===Y.popup){var r=document.getElementById(Fn);return r&&(r.style.display="block"),this.showPopupLoading()}}},{key:"createLoadAppPromise",value:function(){var e=this;return new Promise((function(t,n){e._loadAppPromiseResolve=t,setTimeout((function(){n(v.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT)}),15e3)})).catch((function(t){return e.dispatchToSDK(g.name,{code:v.CREATECOMPONENT_ERROR.code,message:v.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT.message}),Promise.reject(t)}))}},{key:"createActionQueryPromise",value:function(){var e=this;return this._performanceData.push({key:"sdk_action_query_start",value:Date.now()}),this._actionQueryPromise=new Promise((function(t,n){var r,o,i,a={paymentSessionData:e._renderParams&&(null===(r=e._renderParams)||void 0===r?void 0:r.paymentSessionData)||"",paymentSessionConfig:null===(o=e._renderParams)||void 0===o||null===(i=o.paymentSessionMetaData)||void 0===i?void 0:i.paymentSessionConfig};if(H.CASHIER_PAYMENT_CARD===e._componentSign&&(a.paymentMethodType="CARD"),H.EASY_PAY_WALLET===e._componentSign){var s,c=a.paymentSessionConfig||{},u=c.productSceneVersion,l=void 0===u?"":u,f=c.productScene,p=void 0===f?"":f,d=((null===(s=e._renderParams)||void 0===s?void 0:s.paymentSessionMetaData)||{}).action,h=(void 0===d?{}:d).autoDebitWithToken,m=void 0!==h&&h;if(p===q.EASY_PAY&&"2.0"===l&&!m)return t({message:"sdk no need to make query request",success:!0})}if(H.AUTO_DEBIT_WALLET===e._componentSign){var y,E,b,w,_=(null===(y=e._renderParams)||void 0===y||null===(E=y.paymentSessionMetaData)||void 0===E?void 0:E.action)||{},R=Re()?null==_||null===(b=_.web)||void 0===b?void 0:b.signType:null==_||null===(w=_.wap)||void 0===w?void 0:w.signType;if("SMS"===R)return t({message:"sdk no need to make query request",success:!0});if(!R||"REDIRECT"!==R)return t({success:!1})}if(window.location.href.indexOf("LOCAL_MOCK=1")>-1)return t({message:"sdk no need to make query request",success:!0});(function(e,t){return Tn.apply(this,arguments)})(a,{env:e.AMSSDK.options.env.environment,locale:e.AMSSDK.options.locale}).then((function(n){e._performanceData.push({key:"sdk_action_query_end",value:Date.now()}),null!=n&&n.success,t(n)})).catch((function(t){e.dispatchToSDK(g.name,{code:v.CREATECOMPONENT_ERROR.code}),n(t)}))})),this._actionQueryPromise}},{key:"cleanApp",value:function(){try{if(this.app=null,this._removeEventListener(),"string"===pe(this._selector)){var e=document.querySelector(this._selector);e&&(e.innerHTML="")}}catch(e){console.error(e)}}},{key:"createApp",value:function(e){if(!0==!!window.postMessage){this._performanceData.push({key:"sdk_popup_start",value:Date.now()});try{var t,n,r,o=(null==e||null===(t=e.paymentSessionMetaData)||void 0===t||null===(n=t.paymentSessionConfig)||void 0===n?void 0:n.productSceneVersion)||"",i=(null==e||null===(r=e.paymentSessionMetaData)||void 0===r?void 0:r.extendInfo)||"",a=this.AMSSDK.options.env.environment;this.appDomain=function(e){var t=e.environment,n=e.appVersion,r=e.componentSign,o=e.productSceneVersion,i=e.extendInfo,a=/^https?:\/\/([^/<>\s]+\.?)*/.exec(Cn(t,n,r,o,i));return a&&a[0]||""}({environment:a,appVersion:this._appVersion,componentSign:this._componentSign,productSceneVersion:o,extendInfo:i}),this.app=function(e,t){var n=document.createElement("iframe"),r={dropin:"ams-checkout-dropin-".concat(t),component:"ams-checkout-component-".concat(t)}[e]||"ams-checkout-component";return n.id=r,n.style.height="0",n.style.width="100%",n.style.border="0",n.style.opacity="0",n.style.overflow="hidden",n}(this.AMSSDK.options.mode,this.platform),this.app.src=In({componentSign:this._componentSign,analytics:this.AMSSDK.options.analytics,productSceneVersion:o,environment:a,appVersion:this._appVersion,extendInfo:i,locale:this.AMSSDK.options.locale,instanceId:this.AMSSDK._instanceId}),this._addEventListener()}catch(e){this.dispatchToSDK(g.name,Object.assign({},v.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME,{stack:e}))}}else this.dispatchToSDK(g.name,v.SDK_COMPATIBILITY_ISSUES.BROWSER_NOT_SUPPORT_POSTMESSAGE)}},{key:"listener",value:function(e){if(e.origin===this.appDomain)if(function(e){try{JSON.parse(e)}catch(e){return!1}return!0}(e.data)){var t=JSON.parse(e.data);if(t.name!==te.APP_TO_SDK&&t.name!==te.APP_TO_APP||t.instanceId!==this.AMSSDK._instanceId)return;this._handleAppMessage(t)}else console.warn(v.NOT_JSON_FORMAT),this.dispatchToSDK(g.name,v.NOT_JSON_FORMAT)}},{key:"resizeListener",value:function(){document.getElementById(Un).style.transition="none",this.dispatchToApp({context:{event:"renderResize",data:{heightOfVisible:window.innerHeight,widthOfVisible:window.innerWidth}}})}},{key:"_addEventListener",value:function(){this._removeEventListener(),window["".concat(Yn,"_").concat(this.AMSSDK._instanceId)]=this.listener.bind(this),window["".concat(Yn,"_").concat(this.AMSSDK._instanceId,"_resize")]=this.resizeListener.bind(this),window.addEventListener("message",window["".concat(Yn,"_").concat(this.AMSSDK._instanceId)]),window.addEventListener("resize",window["".concat(Yn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_removeEventListener",value:function(){window.removeEventListener("message",window["".concat(Yn,"_").concat(this.AMSSDK._instanceId)]),window.removeEventListener("resize",window["".concat(Yn,"_").concat(this.AMSSDK._instanceId,"_resize")])}},{key:"_handleAppMessage",value:function(e){var t,n=[_.name,R.name,b.name,w.name,A.name,g.name,O.name,S.name,x.name,T.name,P.name,k.name,C.name,I.name];if(e.context.event!==I.name){if(n.includes(e.context.event)){if(e.context.event===_.name)return this._performanceData.push({key:"sdk_onLaunch",value:Date.now()}),this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),void this.sendRenderEvent();if(e.context.event===b.name&&this.handleSizeChanged(e),e.context.event===A.name)return this.closeBtnFunc();if(e.context.event===R.name)return this.handleRedirect(e.context.data);if(e.context.event!==S.name)if(e.context.event!==T.name){if(e.context.event!==x.name)return e.context.event===P.name?(!0===e.context.data&&(this._isRetention=!0),void(!1===e.context.data&&(this._isRetention=!1))):void(e.context.event!==k.name?this.dispatchToSDK(e.context.event,e.context.data):this.handleDeclareInfo(e.context.data));this.handleCloseBtnShow(!0)}else this.handleCloseBtnShow(!1);else this.submitForm(e.context.data)}}else this.dispatchToSDK(O.name,{code:"SDK_END_OF_LOADING",message:(null===(t=e.context.data)||void 0===t?void 0:t.message)||""})}},{key:"handleSizeChanged",value:function(e){var t;if(!((null===(t=e.context.data)||void 0===t?void 0:t.height)<=1)){var n,r=document.getElementById(Un);if(r.style.height="".concat(e.context.data.height,"px"),this._renderDisplayType===Y.popup){var o,i=document.getElementById(Fn);if(i&&(i.style.background="#000000",i.style.opacity="0.6",i.style.display="block"),null===(o=document.getElementById(zn))||void 0===o||o.remove(),"desktop"===this.platform&&(r.classList.add("".concat(Un,"-").concat(this.platform,"-animation")),e.context.data.width&&(r.style.width="".concat(e.context.data.width,"px"))),"mobile"===this.platform){r.classList.add("".concat(Un,"-").concat(this.platform,"-animation"));var a="".concat(Un,"-").concat(this.platform,"-animation-style"),s=document.getElementById(a);s&&(null==s||s.remove());var c="@keyframes ".concat(Un,"-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(e.context.data.height,"px;\n }\n }\n @keyframes ").concat(Un,"-slide-out {\n 0% {\n height: ").concat(e.context.data.height,"px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }"),u=document.createElement("style");u.id=a,u.type="text/css",u.innerHTML=c,document.getElementsByTagName("head")[0].appendChild(u),setTimeout((function(){r.style.transition="height 0.28s ease-in-out"}),500)}}if(this._renderDisplayType===Y.inline)null===(n=document.getElementById(zn))||void 0===n||n.remove();this.app.style.height="".concat(e.context.data.height,"px"),this.app.style.opacity="1"}}},{key:"handleRedirect",value:function(e){var t=this,n="string"==typeof e?{normalUrl:e}:{applinkUrl:(null==e?void 0:e.applinkUrl)||"",schemeUrl:(null==e?void 0:e.schemeUrl)||"",normalUrl:(null==e?void 0:e.normalUrl)||"",target:null==e?void 0:e.target},r=function(e,n){t.dispatchToSDK(O.name,{code:"SDK_CALL_URL_SUCCESS",message:"Successfully opened the app,".concat(e,": ").concat(n)})},o=function(){t.dispatchToSDK(O.name,{code:"SDK_CALL_URL_ERROR",message:"Failed to open app,applinkUrl: ".concat(null==n?void 0:n.applinkUrl," schemeUrl: ").concat(null==n?void 0:n.schemeUrl," normalUrl: ").concat(null==n?void 0:n.normalUrl)})};if(n.target===ne.BLANK)return n.normalUrl?(r("normalUrl",n.normalUrl),void window.open(n.normalUrl)):o();this.cleanContainer(),this.AMSSDK._redirect({applinkUrl:null==n?void 0:n.applinkUrl}).then((function(){r("applinkUrl",null==n?void 0:n.applinkUrl)})).catch((function(){return t.AMSSDK._redirect({schemeUrl:null==n?void 0:n.schemeUrl})})).then((function(){r("schemeUrl",null==n?void 0:n.schemeUrl)})).catch((function(){return t.AMSSDK._redirect({normalUrl:null==n?void 0:n.normalUrl})})).then((function(){r("normalUrl",null==n?void 0:n.normalUrl)})).catch((function(){o()}))}},{key:"handleDeclareInfo",value:function(e){var t=e.closeDialogData,n=void 0===t?{}:t;try{if(n){var r,o,i,a=document.getElementById("".concat(Kn,"-title"));if(a)a.style.fontSize="".concat(null==n||null===(r=n.title)||void 0===r?void 0:r.fontSize,"px"),a.style.color=null==n||null===(o=n.title)||void 0===o?void 0:o.fontColor,a.innerHTML=null==n||null===(i=n.title)||void 0===i?void 0:i.text;var s,c,u,l=document.getElementById("".concat(Kn,"-sub-title"));if(l)l.style.fontSize="".concat(null==n||null===(s=n.message)||void 0===s?void 0:s.fontSize,"px"),l.style.color=null==n||null===(c=n.message)||void 0===c?void 0:c.fontColor,l.innerHTML=null==n||null===(u=n.message)||void 0===u?void 0:u.text;var f,p,d,h,m,v,y,g=document.getElementById("".concat(Kn,"-remain"));if(g)if(g.innerHTML=null==n||null===(f=n.btnOK)||void 0===f?void 0:f.text,g.style.fontSize="".concat(null==n||null===(p=n.btnOK)||void 0===p?void 0:p.fontSize,"px"),g.style.color=null==n||null===(d=n.btnOK)||void 0===d?void 0:d.fontColor,g.style.borderRadius="".concat(null==n||null===(h=n.btnOK)||void 0===h?void 0:h.corner,"px"),"stroke"===(null==n||null===(m=n.btnOK)||void 0===m?void 0:m.type))g.style.border="1px solid ".concat(null==n||null===(y=n.btnOK)||void 0===y?void 0:y.bg);else g.style.backgroundColor=null==n||null===(v=n.btnOK)||void 0===v?void 0:v.bg;var E,b,w,_,R,A,O,S=document.getElementById("".concat(Kn,"-leave"));if(S)if(S.innerHTML=null==n||null===(E=n.btnCancel)||void 0===E?void 0:E.text,S.style.fontSize="".concat(null==n||null===(b=n.btnCancel)||void 0===b?void 0:b.fontSize,"px"),S.style.color=null==n||null===(w=n.btnCancel)||void 0===w?void 0:w.fontColor,S.style.borderRadius="".concat(null==n||null===(_=n.btnCancel)||void 0===_?void 0:_.corner,"px"),"stroke"===(null==n||null===(R=n.btnCancel)||void 0===R?void 0:R.type))S.style.border="1px solid ".concat(null==n||null===(O=n.btnCancel)||void 0===O?void 0:O.bg);else S.style.backgroundColor=null==n||null===(A=n.btnCancel)||void 0===A?void 0:A.bg}}catch(e){console.error(e)}}},{key:"handleCloseBtnShow",value:function(e){var t=document.getElementById(jn);e?null==t||t.classList.remove("".concat(jn,"-hidden")):!1===e&&(null==t||t.classList.add("".concat(jn,"-hidden")))}},{key:"dispatchToSDK",value:function(e,t){this.AMSSDK._eventCenter.emit(e,t)}},{key:"dispatchToApp",value:function(e){var t=Object.assign({},e,{name:te.SDK_TO_APP,mode:this.AMSSDK.options.mode,appId:y,instanceId:this.AMSSDK._instanceId});if(this.app&&this.app.contentWindow)return this.app.contentWindow.postMessage(JSON.stringify(t),this.appDomain);throw new Error(v.SDK_SUBMIT_ERROR.message)}},{key:"subscribeFromSDK",value:function(){var e={};for(var t in e)e.hasOwnProperty(t)&&this.AMSSDK._eventCenter.on("".concat(y,"-").concat(t),e[t].bind(this))}},{key:"sendRenderEvent",value:(n=M()(N()().mark((function e(){var t,n,r,o,i;return N()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this._actionQueryPromise){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._actionQueryPromise;case 5:i=e.sent,this._performanceData.push({key:"sdk_render_component",value:Date.now()}),this.dispatchToApp({context:{event:"renderComponent",data:{queryResult:i,sessionResult:null===(t=this._renderParams)||void 0===t?void 0:t.paymentSessionMetaData,paymentSessionData:null===(n=this._renderParams)||void 0===n?void 0:n.paymentSessionData,heightOfVisible:Math.max(Mn,window.innerHeight),renderDisplayType:null===(r=this._renderParams)||void 0===r?void 0:r.renderDisplayType,appearance:null===(o=this._renderParams)||void 0===o?void 0:o.appearance,envInfo:{screenHeight:screen.height,screenWidth:screen.width}}}}),this.dispatchToApp({context:{event:"web-sdk-performance",data:{performanceData:this._performanceData}}}),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return n.apply(this,arguments)})},{key:"showPopupLoading",value:function(){var e=document.createElement("div");null==e||e.classList.add(zn),e.id=zn,e.innerHTML='<div class="line"><div></div><div></div><div></div><div></div></div>',e.style.fontSize="".concat(Oe(),"px");var t=document.getElementsByTagName("body")[0];null==t||t.appendChild(e)}},{key:"setContainerClass",value:function(){var e=document.getElementById(Un);null==e||e.classList.remove("".concat(Un,"-hidden-").concat(this.platform)),null==e||e.classList.add("".concat(Un,"-").concat(this.platform))}},{key:"cleanContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._loadAppPromiseResolve&&this._loadAppPromiseResolve(!0),this._performanceData=[],this._isInitComponent=!1,null===(e=document.getElementById(zn))||void 0===e||e.remove(),this.hideComponentAndCleanDom(t)}},{key:"hideComponentAndCleanDom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=document.getElementById(Un);n&&(n.style.transition="",null==n||n.classList.remove("".concat(Un,"-").concat(this.platform)),null==n||n.classList.remove("".concat(Un,"-").concat(this.platform,"-animation")),null==n||n.classList.add("".concat(Un,"-hidden-").concat(this.platform)));var r=function(){var t;document.getElementsByTagName("body")[0].style.overflow="auto";var r=document.getElementById(Fn);null==r||r.remove(),n&&(n.style.height=""),null===(t=document.getElementById("".concat(Un,"-").concat(e.platform,"-animation-style")))||void 0===t||t.remove(),e.removeRetentionPopup(),e.cleanApp()};t?r():setTimeout((function(){r()}),300)}},{key:"closeBtnFunc",value:function(){this._isRetention?this.showRetentionPopup():(this.cleanContainer(),this.dispatchToSDK(A.name,{}))}},{key:"createBaseElement",value:function(){if(!document.getElementById(Un)){var e;(e=document.createElement("style")).type="text/css",e.innerHTML=".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 0px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n\n 100% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** 加载动画 **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-block-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-block-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n}\n\n",document.head.appendChild(e),window.removeEventListener("resize",Se),window.removeEventListener("pageShow",Se),window.removeEventListener("DOMContentLoaded",Se),window.addEventListener("resize",Se),window.addEventListener("pageShow",Se),window.addEventListener("DOMContentLoaded",Se);var t=document.createElement("div");t.className="".concat(Un,"-hidden-").concat(this.platform),t.id=Un,Se(0,t),document.body.appendChild(t);var n=document.createElement("div");n.className="ams-component-section-".concat(this.platform),n.id=Bn,t.appendChild(n),this.createCloseBtn()}}},{key:"createInlineBaseElement",value:function(e){var t,n;if(document.getElementById("ams-inline-component-style")||((n=document.createElement("style")).id="ams-inline-component-style",n.type="text/css",n.innerHTML=Ln,document.head.appendChild(n)),!document.getElementById(Un)){var r=document.createElement("div");r.className="".concat(Un,"-inline"),r.id=Un;var o=document.querySelector(this._selector);o&&o.appendChild(r);var i=null==e||null===(t=e.appearance)||void 0===t?void 0:t.showLoading;(i="boolean"!=typeof i||i)&&function(e,t){var n=document.createElement("div");n.id=Dn,t===ee.desktop&&(n.innerHTML='<svg class="'.concat(Nn," ").concat(Nn,"-").concat(t,'" width="740" height="360" viewBox="0 0 740 360" fill="none" xmlns="">\n <rect width="740" height="360" rx="12" fill="#F6F6F6"/>\n <rect opacity="0.7" x="44" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="94" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="144" y="44" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z" fill="#E1E6ED"/>\n </g>\n </svg>')),t===ee.mobile&&(n.innerHTML='<svg class="'.concat(Nn," ").concat(Nn,"-").concat(t,'" width="358" height="186" viewBox="0 0 358 186" fill="none" xmlns="">\n <g clip-path="url(#clip0_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <g clip-path="url(#clip1_2543_91192)">\n <rect width="358" height="186" fill="white"/>\n <rect width="358" height="40" fill="white"/>\n <rect opacity="0.7" x="4" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="54" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <rect opacity="0.7" x="104" y="4" width="32" height="32" rx="4" fill="#E1E6ED"/>\n <g clip-path="url(#clip2_2543_91192)">\n <rect width="358" height="120" transform="translate(0 66)" fill="white"/>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z" fill="#E1E6ED"/>\n </g>\n <g clip-path="url(#clip3_2543_91192)">\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z" fill="#E1E6ED"/>\n </g>\n <g style="mix-blend-mode:multiply" opacity="0.336007">\n <path d="M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z" fill="#E1E6ED"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id="clip0_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip1_2543_91192">\n <rect width="358" height="186" fill="white"/>\n </clipPath>\n <clipPath id="clip2_2543_91192">\n <rect width="358" height="120" fill="white" transform="translate(0 66)"/>\n </clipPath>\n <clipPath id="clip3_2543_91192">\n <rect width="358" height="92" fill="white" transform="translate(0 94)"/>\n </clipPath>\n </defs>\n </svg>\n ')),e&&e.appendChild(n);var r=document.getElementById(Dn);Se(0,r)}(r,this.platform)}}},{key:"createCloseBtn",value:function(){var e=this,t=document.getElementById(Un),n="<img class='".concat(jn,"-btn-").concat(this.platform,"' src=\"").concat("https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg",'"/>'),r=document.createElement("div");r.classList.add("".concat(jn,"-").concat(this.platform),"".concat(jn,"-hidden")),r.id=jn,r.innerHTML=n,r.addEventListener(this._clickEventName,(function(){e.closeBtnFunc()})),t&&t.appendChild(r)}},{key:"createRetentionPopup",value:function(){var e=document.createElement("div");e.id=Kn,e.classList.add("".concat(Kn,"-").concat(this.platform)),e.innerHTML='\n <span id="'.concat(Kn,'-title" class="').concat(Kn,"-title-").concat(this.platform,'">\n Are you sure you want to leave?\n </span>\n <span\n id="').concat(Kn,'-sub-title"\n class="').concat(Kn,"-sub-title-").concat(this.platform,'"\n >\n If you leave this page, you\'ll have to start over again.\n </span>\n <div class="').concat(Kn,"-btn-block-").concat(this.platform,'">\n <div id="').concat(Kn,'-remain" class="').concat(Kn,"-remain-").concat(this.platform,'">\n Continue Payment\n </div>\n <div id="').concat(Kn,'-leave" class="').concat(Kn,"-leave-").concat(this.platform,'">\n Leave\n </div>\n </div>'),document.body.appendChild(e);var t=document.getElementById("".concat(Kn,"-remain"));t&&t.addEventListener(this._clickEventName,this.hideRetentionPopup.bind(this));var n=document.getElementById("".concat(Kn,"-leave"));n&&n.addEventListener(this._clickEventName,this.retentionPopupLeaveFunc.bind(this))}},{key:"retentionPopupLeaveFunc",value:function(){this.dispatchToSDK(A.name,{}),this.hideRetentionPopup(),this.cleanContainer()}},{key:"removeRetentionPopup",value:function(){var e,t=document.getElementById("".concat(Kn,"-remain"));t&&t.removeEventListener(this._clickEventName,this.hideRetentionPopup);var n=document.getElementById("".concat(Kn,"-leave"));n&&n.removeEventListener(this._clickEventName,this.retentionPopupLeaveFunc),null===(e=document.getElementById(Kn))||void 0===e||e.remove()}},{key:"showRetentionPopup",value:function(){var e=document.getElementById(Kn),t=document.getElementById(Un);e&&(null==t||t.classList.add("".concat(Un,"-opacity")),e.classList.remove("".concat(Kn,"-hidden")),e.classList.add("".concat(Kn,"-show")))}},{key:"hideRetentionPopup",value:function(){var e=document.getElementById(Kn),t=document.getElementById(Un);e&&(e.classList.remove("".concat(Kn,"-show")),e.classList.add("".concat(Kn,"-hidden")),setTimeout((function(){e.classList.remove("".concat(Kn,"-hidden")),null==t||t.classList.remove("".concat(Un,"-opacity"))}),300))}},{key:"createMockup",value:function(){var e=document.getElementsByTagName("body")[0];e.style.overflow="hidden";var t=document.createElement("div");t.style.width="100vw",t.style.height="100vh",t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.zIndex="1000",t.style.background="#ffffff",t.style.opacity="0.5",t.style.display="none",t.id=Fn,e.appendChild(t)}},{key:"submitForm",value:function(e){var t=e.attributes,n=document.body,r=document.createElement("form");r.setAttribute("height","1"),r.setAttribute("width","1"),Object.keys(t.data).forEach((function(e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t.data[e]),r.appendChild(n)})),r.setAttribute("action",t.action),r.setAttribute("method","post"),n.appendChild(r),setTimeout((function(){r.submit()}),0)}}]),e}(),qn=function(e,t,n){return new Promise((function(r,o){var i=null;if("string"===pe(t)&&(i=document.querySelector(t)),null===i){var a={code:v.CREATEPAYMENT_PARAMETER_ERROR.code,message:"Failed to execute 'querySelector' on 'Document': ".concat(t," is not a valid selector")};return o(a),void e._dispatchToSDK({name:te.APP_TO_SDK,instanceId:e.AMSSDK._instanceId,context:{event:g.name,data:a}})}n===Y.popup&&(i.innerHTML=""),e.app&&i.appendChild(e.app),r()}))},Wn=n(746),Vn=n.n(Wn),Gn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Jn=new Uint8Array(16);function Zn(){if(!xn&&!(xn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xn(Jn)}for(var Qn=[],$n=0;$n<256;++$n)Qn.push(($n+256).toString(16).slice(1));function Xn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(Qn[e[t+0]]+Qn[e[t+1]]+Qn[e[t+2]]+Qn[e[t+3]]+"-"+Qn[e[t+4]]+Qn[e[t+5]]+"-"+Qn[e[t+6]]+Qn[e[t+7]]+"-"+Qn[e[t+8]]+Qn[e[t+9]]+"-"+Qn[e[t+10]]+Qn[e[t+11]]+Qn[e[t+12]]+Qn[e[t+13]]+Qn[e[t+14]]+Qn[e[t+15]]).toLowerCase()}var er,tr,nr,rr=function(e,t,n){if(Gn.randomUUID&&!t&&!e)return Gn.randomUUID();var r=(e=e||{}).random||(e.rng||Zn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Xn(r)},or=window.navigator.userAgent||"",ir=function(){var e=or.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},ar=/android/i.test(or),sr=/iphone|ipad|ipod/i.test(or),cr=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(or)&&ar&&or.indexOf("Version")<0,ur=/qqbrowser/i.test(or),lr=/firefox/i.test(or);/baidubrowser/i.test(or);function fr(e,t){return function(e,t){var n=new URL(e);for(var r in t)r&&n.searchParams.set(r,t[r]);return n.toString()}(e,t)}var pr,dr,hr,mr=5e3;function vr(e,t){pr=+new Date,dr=setTimeout((function(){!(!!tr&&document[tr])&&e&&e()}),t||5e3)}function yr(e){var t=e.evokeAppBy;(null==t?void 0:t.url)&&(!function(e){var t=e.evokeAppBy,n=e.successCb,r=e.timeout;if(n){var o=+new Date,i=r||mr;o-(pr||+new Date)<i&&n(t)}}(e),dr&&clearTimeout(dr))}function gr(e){return/^(http|https|itms-apps|itms-appss|market):\/\//.test(e)}function Er(e){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Er(e)}function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?br(Object(n),!0).forEach((function(t){_r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _r(e,t,n){return(t=Ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ar(r.key),r)}}function Ar(e){var t=function(e,t){if("object"!==Er(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Er(t)?t:String(t)}!function(e){void 0!==e&&(void 0!==e.hidden?(tr="hidden",nr="visibilitychange"):void 0!==e.mozHidden?(tr="mozHidden",nr="mozvisibilitychange"):void 0!==e.msHidden?(tr="msHidden",nr="msvisibilitychange"):void 0!==e.webkitHidden&&(tr="webkitHidden",nr="webkitvisibilitychange"))}(document),function(e){e.SCHEME="Scheme",e.LINK="Link",e.INTENT="Intent"}(hr||(hr={}));var Or=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=void 0,this.timer=void 0,this.options=void 0,this.evokeAppBy=void 0,this.handleDegradationStrategy=function(){var e=n.options,t=e.scheme,r=e.link,o=e.intent,i=e.params;r&&t?(n.options.link=fr(r,i),n.options.scheme=fr(t,i),sr&&ir()>9?n.evokeLink():n.evokeScheme(n.evokeLink.bind(n))):r?(n.options.link=fr(r,i),n.evokeLink()):t?(n.options.scheme=fr(t,i),n.evokeScheme()):o&&o.scheme&&o.package&&n.handleIntent()};this.config=wr(wr({},{delay:0}),t),this.options={},this.timer=null,this.evokeAppBy={url:"",type:hr.LINK},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e;er||((er=document.createElement("iframe")).id="callapp_iframe_".concat(Date.now()),er.style.cssText="display:none;border:0;width:0;height:0;",document.body.appendChild(er)),e={evokeAppBy:this.evokeAppBy,successCb:this.config.successCb,timeout:this.config.resultJudgmentTime},void 0!==nr?document.addEventListener(nr,(function(){return yr(e)})):window.addEventListener("pagehide",(function(){return yr(e)}))}},{key:"open",value:function(e){this.options=e;var t=this.options,n=t.scheme,r=t.intent,o=t.link;if(!n&&!o&&!(null==r?void 0:r.scheme))throw new Error("请至少填一个链接");if(n&&gr(n))throw new Error("请填写正确格式的scheme");if(o&&!gr(o))throw new Error("请填写正确格式的link");if(r&&r.scheme&&gr(r.scheme))throw new Error("请填写正确格式的intent");this.handleDegradationStrategy()}},{key:"evokeLink",value:function(){this.evokeAppBy.type=hr.LINK;var e=this.options,t=e.link,n=e.delay;this.evokeByLocationDelay(t,n)}},{key:"evokeScheme",value:function(e){this.evokeAppBy.type=hr.SCHEME;var t=this.options,n=t.scheme,r=t.delay,o=t.fallback;sr?ir()>9||ur?this.evokeByTagADelay(n,r,o,e):this.evokeByIFrameDelay(n,r,o,e):cr||lr?this.handleOriginalChrome():this.evokeByIFrameDelay(n,r,o,e)}},{key:"handleIntent",value:function(){var e,t=this,n=this.options,r=n.scheme,o=n.intent,i=n.delay,a=n.link,s=n.fallback,c=(null==o?void 0:o.scheme)||r;c&&!gr(c)&&(this.evokeAppBy.type=hr.INTENT,a&&(e=function(){return t.evokeLink()}),this.evokeByLocationDelay(function(e,t,n){var r="";n&&(r="S.browser_fallback_url=".concat(encodeURIComponent(n),";"));var o=e.substring(0,e.indexOf("://")),i=t?"#Intent;scheme=".concat(o,";package=").concat(t,";"):"#Intent;scheme=".concat(o,";"),a=e.replace(/.*?:\/\//,"intent://");return"".concat(a+i+r,"end")}(c,null==o?void 0:o.package,(null==o?void 0:o.fallbackUrl)||""),i,s,e))}},{key:"handleOriginalChrome",value:function(){this.handleIntent()}},{key:"evokeAppDelay",value:function(e,t,n,r,o){var i=this,a=n||this.config.delay,s=r||this.config.fallback;this.timer=setTimeout((function(){i.clearTimer(),e(),i.checkIsOpen(t,s,o)}),a)}},{key:"evokeByLocationDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){window.location.href=e}(e)}),e,t,n,r)}},{key:"evokeByTagADelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){var t=document.createElement("a");t.setAttribute("href",e),t.style.display="none",document.body.appendChild(t);var n=document.createEvent("HTMLEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}(e)}),e,t,n,r)}},{key:"evokeByIFrameDelay",value:function(e,t,n,r){this.evokeAppDelay((function(){return function(e){er.src=e}(e)}),e,t,n,r)}},{key:"checkIsOpen",value:function(e,t,n){return this.evokeAppBy.url=e,vr(n||t,this.config.resultJudgmentTime)}},{key:"clearTimer",value:function(){this.timer&&clearTimeout(this.timer)}}])&&Rr(t.prototype,n),r&&Rr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Sr=function(e){var t=function(e){try{return[JSON.parse(atob(e.split("&&")[3])),e.split("&&").slice(0,3).join("&&")]}catch(t){return console.error("Parsing paymentSessionData is abnormal and may affect the payment link. Please ensure to use the new version of SDK."),[{},e]}}(e),n=m()(t,2),r=n[0],o=n[1];return function(e){Re()&&null!=e&&e.paymentSessionConfig&&e.paymentSessionConfig.productScene===q.EASY_PAY&&(e.paymentSessionConfig.productSceneVersion="1.0")}(r),[r,o]},Tr=function(e){var t=Object.assign({paymentSessionMetaData:{},renderDisplayType:Y.popup},e),n=Sr(t.paymentSessionData),r=m()(n,2),o=r[0],i=r[1],a=function(e){var t=e.paymentSessionConfig,n=void 0===t?{}:t,r=n.productScene,o=void 0===r?"":r,i=n.paymentMethodCategoryType,a=void 0===i?"":i;return o&&a?"".concat(o,"_").concat(a):H.NONE}(o);return a===H.NONE?Promise.reject("".concat(v.CREATEPAYMENT_PARAMETER_ERROR.code,":Abnormal response data, interface failure, or unsupported payment method")):(t.paymentSessionData=i,t.paymentSessionMetaData=o,Promise.resolve({iframeNodesParams:t,componentSign:a}))},xr=function(e){s()(r,e);var n=u()(r);function r(){return i()(this,r),n.apply(this,arguments)}return t()(r)}(function(e){s()(r,e);var n=u()(r);function r(e){var t;i()(this,r),t=n.call(this,e),d()(f()(t),"componentApp",void 0);var o=new Hn;return o.setRender(qn),t._registerPlugin(y,o),t.componentApp=t._getPlugin(y),t}return t()(r,[{key:"parameterInitAndCheck",value:function(e){var t=e.params,n=e.selector,r=e.renderDisplayType;this.options.mode=J.component,this.options.networkMode=this.options.networkMode||Z.session;var o=Object.assign({selector:n,renderDisplayType:r},t);return o&&!o.paymentSessionData?Promise.reject(v.CREATECOMPONENT_ERROR):this.options.networkMode===Z.proxy?(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),Promise.reject(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)):Promise.resolve(o)}},{key:"pluginAppendIframe",value:function(e){try{this.componentApp.appendIframeNodes(e.componentSign,e.iframeNodesParams).then((function(){return Promise.resolve()}))}catch(e){return Promise.reject(e)}}},{key:"createComponent",value:function(e){var t=this;return this.parameterInitAndCheck({params:e,renderDisplayType:Y.popup}).then((function(e){return Tr(e)})).catch((function(e){return t._eventCenter.emit(g.name,{code:v.CREATECOMPONENT_ERROR}),Promise.reject(e)})).then((function(e){return t.pluginAppendIframe(e)}))}},{key:"mountComponent",value:function(e,t){var n=this;return this.parameterInitAndCheck({params:e,renderDisplayType:Y.inline,selector:t}).then((function(e){return Tr(e)})).catch((function(e){return n._eventCenter.emit(g.name,{code:v.CREATECOMPONENT_ERROR}),Promise.reject(e)})).then((function(e){return n.pluginAppendIframe(e)}))}},{key:"submit",value:function(){try{this.componentApp.dispatchToApp({context:{event:"submitPay",data:{}}})}catch(e){console.error(e)}}}]),r}(function(){function e(t){i()(this,e),d()(this,"options",void 0),d()(this,"checkoutState",void 0),d()(this,"_eventCenter",void 0),d()(this,"plugins",void 0),d()(this,"_instanceId",void 0),this._instanceId=rr(),this.options={},this._eventCenter=new de,this._initEvent(t),this._setOptions(t),this.plugins=new Map}return t()(e,[{key:"unmount",value:function(){var e,t=Vn()(this.plugins.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;try{n.logoutPlugin()}catch(e){console.error(e)}}}catch(e){t.e(e)}finally{t.f()}}},{key:"_setOptions",value:function(e){this._setMode(e),this._setEnv(e),this.options.locale=(null==e?void 0:e.locale)||""}},{key:"_setEnv",value:function(e){var t=Ae()._moreEnv;null!=e&&e.environment&&!((null==e?void 0:e.environment)in Q)&&"true"!==t&&(console.warn(v.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.message),e.environment="prod"),this.options.env={terminalType:be?X.WAP:X.WEB,environment:(null==e?void 0:e.environment)||"prod"},this.options.env.terminalType===X.WAP&&(this.options.env.osType=ge?$.IOS:Ee?$.ANDROID:$.ELSE)}},{key:"_setMode",value:function(e){this.options.mode=(null==e?void 0:e.mode)||J.component,null!=e&&e.mode&&!((null==e?void 0:e.mode)in J)&&(console.warn(v.INIT_PARAMETER_ERROR.MODE_ERROR.message),this.options.mode=J.component),this.options.networkMode=(null==e?void 0:e.networkMode)||Z.session,null!=e&&e.networkMode&&!((null==e?void 0:e.networkMode)in Z)&&(console.warn(v.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.message),this.options.networkMode=Z.proxy)}},{key:"_initEvent",value:function(e){if(null!=e&&e.onError){if("function"!==pe(e.onError))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(g.name,e.onError,g.uniqueKey)}if(null!=e&&e.onPaymentMethodSelected){if("function"!==pe(e.onPaymentMethodSelected))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(E.name,e.onPaymentMethodSelected,E.uniqueKey)}if(null!=e&&e.onSizeChanged){if("function"!==pe(e.onSizeChanged))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(b.name,e.onSizeChanged,b.uniqueKey)}if(null!=e&&e.onLog){if("function"!==pe(e.onLog))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(w.name,e.onLog,w.uniqueKey)}if(null!=e&&e.onEventCallback){if("function"!==pe(e.onEventCallback))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(O.name,e.onEventCallback,O.uniqueKey)}if(null!=e&&e.onClose){if("function"!==pe(e.onClose))throw new Error(v.INIT_PARAMETER_ERROR.EVENT_ERROR.message);this._overrideSubscription(A.name,e.onClose,A.uniqueKey)}}},{key:"_registerPlugin",value:function(e,t){this.plugins.set(e,t);try{t.applyPlugin(this)}catch(t){if(this.plugins.delete(e),"error"===pe(t))throw t;throw new Error("Failed to register plug-in:".concat(e," Exception in the apply function of the plug-in"))}}},{key:"_getPlugin",value:function(e){return this.plugins.has(e)?this.plugins.get(e):(console.warn("".concat(e,"Plugin unregistered")),null)}},{key:"_redirect",value:function(e){var t=this;return new Promise((function(n,r){var o=t.options.env.terminalType===X.WEB,i=(null==e?void 0:e.normalUrl)||"",a=(null==e?void 0:e.schemeUrl)||"",s=(null==e?void 0:e.applinkUrl)||"",c=function(){if(i)return n(),void(window.location.href=i);r(v.SDK_CALL_URL_ERROR.REDIRECT_ERROR)};o?c():function(){if(a||s){var e={fallback:function(){c()},successCb:function(){n()},delay:0};try{new Or(e).open({scheme:a,link:s})}catch(e){c()}}else c()}()}))}},{key:"_overrideSubscription",value:function(e,t,n){this._eventCenter.off(e,t,n),this._eventCenter.on(e,t,n)}}]),e}())),Pr=function(e){s()(r,e);var n=u()(r);function r(e){return i()(this,r),n.call(this,e)}return t()(r)}(xr),kr=xr}(),r}()}));
@@ -117,6 +117,7 @@ export var createIframe = function createIframe(mode, platform) {
117
117
  iframe.style.height = none;
118
118
  iframe.style.width = width;
119
119
  iframe.style.border = none;
120
+ iframe.style.opacity = none;
120
121
  iframe.style.overflow = 'hidden';
121
122
  return iframe;
122
123
  };
@@ -8,4 +8,4 @@
8
8
  import { platformEnum } from '../../types';
9
9
  export declare const componentAddCSS: () => void;
10
10
  export declare const inlineComponentAddCss: () => void;
11
- export declare const showInlineLoading: (_selector: string, platform: platformEnum) => void;
11
+ export declare const showInlineLoading: (_selector: HTMLDivElement, platform: platformEnum) => void;
@@ -15,6 +15,7 @@ var mockupId = 'ams-component-mockup';
15
15
  var loadingId = 'ams-component-loading';
16
16
  var listenerPrefix = '_ams_sdk_component_listener';
17
17
  var inlineBaseStyleId = 'ams-inline-component-style';
18
+ var inlineImgClassName = 'inline-loading';
18
19
  var loadTimeLimit = 15000;
19
20
  var componentCss = ".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 0px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n\n 100% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translate(-50%, -50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** \u52A0\u8F7D\u52A8\u753B **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-block-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-block-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 500;\n text-align: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n}\n\n";
20
21
  export var componentAddCSS = function componentAddCSS() {
@@ -23,7 +24,7 @@ export var componentAddCSS = function componentAddCSS() {
23
24
  style.innerHTML = componentCss;
24
25
  document.head.appendChild(style);
25
26
  };
26
- var inlineComponentCss = "#ams-checkout-component-desktop{\n border-radius: 8px;\n}\n#".concat(loadingId, "{\n width: 100%;\n flex: 1;\n}\n.inline-loading{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.inline-loading-mobile{\n padding: 0 0.16em;\n}\n.inline-loading-desktop{}\n");
27
+ var inlineComponentCss = "#ams-checkout-component-desktop{\n border-radius: 8px;\n position: absolute;\n top: 0;\n left: 0;\n}\n#ams-checkout-component-mobile{\n position: absolute;\n top: 0;\n left: 0;\n}\n.".concat(componentContainerId, "-inline{\n width: 100%;\n height: auto;\n position: relative;\n line-height: 0;\n display: flex;\n}\n#").concat(loadingId, "{\n width: 100%;\n flex: 1;\n}\n.").concat(inlineImgClassName, "{\n width: 100%;\n height: auto;\n object-fit: contain;\n box-sizing: border-box;\n}\n.").concat(inlineImgClassName, "-mobile{\n padding: 0 0.16em;\n}\n.").concat(inlineImgClassName, "-desktop{}\n");
27
28
  export var inlineComponentAddCss = function inlineComponentAddCss() {
28
29
  var style = document.createElement('style');
29
30
  style.id = 'ams-inline-component-style';
@@ -34,11 +35,9 @@ export var inlineComponentAddCss = function inlineComponentAddCss() {
34
35
  export var showInlineLoading = function showInlineLoading(_selector, platform) {
35
36
  var loading = document.createElement('div');
36
37
  loading.id = loadingId;
37
- var inlineClassName = 'inline-loading';
38
- if (platform === platformEnum.desktop) loading.innerHTML = "<svg class=\"".concat(inlineClassName, " ").concat(inlineClassName, "-").concat(platform, "\" width=\"740\" height=\"360\" viewBox=\"0 0 740 360\" fill=\"none\" xmlns=\"\">\n <rect width=\"740\" height=\"360\" rx=\"12\" fill=\"#F6F6F6\"/>\n <rect opacity=\"0.7\" x=\"44\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"94\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"144\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z\" fill=\"#E1E6ED\"/>\n </g>\n </svg>");
39
- if (platform === platformEnum.mobile) loading.innerHTML = "<svg class=\"".concat(inlineClassName, " ").concat(inlineClassName, "-").concat(platform, "\" width=\"358\" height=\"186\" viewBox=\"0 0 358 186\" fill=\"none\" xmlns=\"\">\n <g clip-path=\"url(#clip0_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <g clip-path=\"url(#clip1_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <rect width=\"358\" height=\"40\" fill=\"white\"/>\n <rect opacity=\"0.7\" x=\"4\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"54\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"104\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g clip-path=\"url(#clip2_2543_91192)\">\n <rect width=\"358\" height=\"120\" transform=\"translate(0 66)\" fill=\"white\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z\" fill=\"#E1E6ED\"/>\n </g>\n <g clip-path=\"url(#clip3_2543_91192)\">\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z\" fill=\"#E1E6ED\"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip1_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip2_2543_91192\">\n <rect width=\"358\" height=\"120\" fill=\"white\" transform=\"translate(0 66)\"/>\n </clipPath>\n <clipPath id=\"clip3_2543_91192\">\n <rect width=\"358\" height=\"92\" fill=\"white\" transform=\"translate(0 94)\"/>\n </clipPath>\n </defs>\n </svg>\n ");
40
- var selectorDom = document.querySelector(_selector);
41
- if (selectorDom) selectorDom.appendChild(loading);
38
+ if (platform === platformEnum.desktop) loading.innerHTML = "<svg class=\"".concat(inlineImgClassName, " ").concat(inlineImgClassName, "-").concat(platform, "\" width=\"740\" height=\"360\" viewBox=\"0 0 740 360\" fill=\"none\" xmlns=\"\">\n <rect width=\"740\" height=\"360\" rx=\"12\" fill=\"#F6F6F6\"/>\n <rect opacity=\"0.7\" x=\"44\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"94\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"144\" y=\"44\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M136 100H48C43.5817 100 40 103.582 40 108C40 112.418 43.5817 116 48 116H136C140.418 116 144 112.418 144 108C144 103.582 140.418 100 136 100Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 126H58C48.0589 126 40 134.059 40 144C40 153.941 48.0589 162 58 162H682C691.941 162 700 153.941 700 144C700 134.059 691.941 126 682 126Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M682 182H58C48.0589 182 40 190.059 40 200C40 209.941 48.0589 218 58 218H682C691.941 218 700 209.941 700 200C700 190.059 691.941 182 682 182Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M504 274H64C52.9543 274 44 282.954 44 294C44 305.046 52.9543 314 64 314H504C515.046 314 524 305.046 524 294C524 282.954 515.046 274 504 274Z\" fill=\"#E1E6ED\"/>\n </g>\n </svg>");
39
+ if (platform === platformEnum.mobile) loading.innerHTML = "<svg class=\"".concat(inlineImgClassName, " ").concat(inlineImgClassName, "-").concat(platform, "\" width=\"358\" height=\"186\" viewBox=\"0 0 358 186\" fill=\"none\" xmlns=\"\">\n <g clip-path=\"url(#clip0_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <g clip-path=\"url(#clip1_2543_91192)\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n <rect width=\"358\" height=\"40\" fill=\"white\"/>\n <rect opacity=\"0.7\" x=\"4\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"54\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <rect opacity=\"0.7\" x=\"104\" y=\"4\" width=\"32\" height=\"32\" rx=\"4\" fill=\"#E1E6ED\"/>\n <g clip-path=\"url(#clip2_2543_91192)\">\n <rect width=\"358\" height=\"120\" transform=\"translate(0 66)\" fill=\"white\"/>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M95 66H9C4.02944 66 0 70.0294 0 75C0 79.9706 4.02943 84 9 84H95C99.9706 84 104 79.9706 104 75C104 70.0294 99.9706 66 95 66Z\" fill=\"#E1E6ED\"/>\n </g>\n <g clip-path=\"url(#clip3_2543_91192)\">\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 94H18C8.05888 94 0 102.059 0 112C0 121.941 8.05887 130 18 130H340C349.941 130 358 121.941 358 112C358 102.059 349.941 94 340 94Z\" fill=\"#E1E6ED\"/>\n </g>\n <g style=\"mix-blend-mode:multiply\" opacity=\"0.336007\">\n <path d=\"M340 150H18C8.05888 150 0 158.059 0 168C0 177.941 8.05887 186 18 186H340C349.941 186 358 177.941 358 168C358 158.059 349.941 150 340 150Z\" fill=\"#E1E6ED\"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip1_2543_91192\">\n <rect width=\"358\" height=\"186\" fill=\"white\"/>\n </clipPath>\n <clipPath id=\"clip2_2543_91192\">\n <rect width=\"358\" height=\"120\" fill=\"white\" transform=\"translate(0 66)\"/>\n </clipPath>\n <clipPath id=\"clip3_2543_91192\">\n <rect width=\"358\" height=\"92\" fill=\"white\" transform=\"translate(0 94)\"/>\n </clipPath>\n </defs>\n </svg>\n ");
40
+ if (_selector) _selector.appendChild(loading);
42
41
  var loadingDom = document.getElementById(loadingId);
43
42
  amsSetSize(null, loadingDom);
44
43
  };
@@ -36,7 +36,7 @@ export default class ComponentApp {
36
36
  * @description render iframe content
37
37
  */
38
38
  appendIframeNodes(componentSign: componentSignEnum, renderParams: IappendIframeNodesParams): Promise<[CashierSdkActionQueryResult, void, unknown]>;
39
- private renderLoading;
39
+ private renderPopupLoading;
40
40
  private createLoadAppPromise;
41
41
  /**
42
42
  * @description Interface request
@@ -93,6 +93,7 @@ export default class ComponentApp {
93
93
  * @description create mount node
94
94
  */
95
95
  private createBaseElement;
96
+ private createInlineBaseElement;
96
97
  private createCloseBtn;
97
98
  private createRetentionPopup;
98
99
  private retentionPopupLeaveFunc;
@@ -111,38 +111,35 @@ var ComponentApp = /*#__PURE__*/function () {
111
111
  this._componentSign = componentSign;
112
112
  if (renderParams !== null && renderParams !== void 0 && renderParams.selector) this._selector = renderParams.selector;
113
113
  this._renderDisplayType = renderParams.renderDisplayType;
114
+ var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(componentContainerId) : this._selector;
114
115
  this._performanceData.push({
115
116
  key: 'sdk_create_component',
116
117
  value: Date.now()
117
118
  });
118
119
  if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
119
- var inlineBaseStyle = document.getElementById(inlineBaseStyleId);
120
- if (!inlineBaseStyle) inlineComponentAddCss();
120
+ this.createInlineBaseElement(renderParams);
121
121
  }
122
122
  if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
123
123
  this.createBaseElement();
124
124
  this.setContainerClass();
125
125
  this.createRetentionPopup();
126
126
  this.createMockup();
127
+ this.renderPopupLoading(renderParams);
127
128
  }
128
- this.renderLoading(renderParams);
129
129
  this.createApp(renderParams);
130
- return Promise.all([this.createActionQueryPromise(), this.createIframeNode(this, this._selector, this._renderDisplayType), this.createLoadAppPromise()]).catch(function (error) {
130
+ return Promise.all([this.createActionQueryPromise(), this.createIframeNode(this, insertedNode, this._renderDisplayType), this.createLoadAppPromise()]).catch(function (error) {
131
131
  _this._isInitComponent = false;
132
132
  _this.cleanContainer();
133
133
  return Promise.reject(error);
134
134
  });
135
135
  }
136
136
  }, {
137
- key: "renderLoading",
138
- value: function renderLoading(renderParams) {
137
+ key: "renderPopupLoading",
138
+ value: function renderPopupLoading(renderParams) {
139
139
  var _renderParams$appeara;
140
140
  var showLoading = renderParams === null || renderParams === void 0 ? void 0 : (_renderParams$appeara = renderParams.appearance) === null || _renderParams$appeara === void 0 ? void 0 : _renderParams$appeara.showLoading;
141
141
  showLoading = typeof showLoading === 'boolean' ? showLoading : true;
142
142
  if (!showLoading) return;
143
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
144
- return showInlineLoading(this._selector, this.platform);
145
- }
146
143
  if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
147
144
  var mockup = document.getElementById(mockupId);
148
145
  if (mockup) mockup.style.display = 'block';
@@ -444,6 +441,8 @@ var ComponentApp = /*#__PURE__*/function () {
444
441
  value: function handleSizeChanged(data) {
445
442
  var _data$context$data2;
446
443
  if (((_data$context$data2 = data.context.data) === null || _data$context$data2 === void 0 ? void 0 : _data$context$data2.height) <= 1) return;
444
+ var cashier = document.getElementById(componentContainerId);
445
+ cashier.style.height = "".concat(data.context.data.height, "px");
447
446
  if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
448
447
  var _document$getElementB;
449
448
  var mockup = document.getElementById(mockupId);
@@ -453,8 +452,6 @@ var ComponentApp = /*#__PURE__*/function () {
453
452
  mockup.style.display = 'block';
454
453
  }
455
454
  (_document$getElementB = document.getElementById(loadingId)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.remove();
456
- var cashier = document.getElementById(componentContainerId);
457
- cashier.style.height = "".concat(data.context.data.height, "px");
458
455
  if (this.platform === 'desktop') {
459
456
  cashier.classList.add("".concat(componentContainerId, "-").concat(this.platform, "-animation"));
460
457
  if (data.context.data.width) cashier.style.width = "".concat(data.context.data.width, "px");
@@ -488,9 +485,7 @@ var ComponentApp = /*#__PURE__*/function () {
488
485
  (_document$getElementB2 = document.getElementById(loadingId)) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.remove();
489
486
  }
490
487
  this.app.style.height = "".concat(data.context.data.height, "px");
491
- this.app.style.width = '100%';
492
- this.app.style.border = '0';
493
- this.app.style.overflow = 'hidden';
488
+ this.app.style.opacity = '1';
494
489
  }
495
490
  }, {
496
491
  key: "handleRedirect",
@@ -813,6 +808,22 @@ var ComponentApp = /*#__PURE__*/function () {
813
808
  amsComponentContainer.appendChild(amsComponentSection);
814
809
  this.createCloseBtn();
815
810
  }
811
+ }, {
812
+ key: "createInlineBaseElement",
813
+ value: function createInlineBaseElement(renderParams) {
814
+ var _renderParams$appeara2;
815
+ var inlineBaseStyle = document.getElementById(inlineBaseStyleId);
816
+ if (!inlineBaseStyle) inlineComponentAddCss();
817
+ if (document.getElementById(componentContainerId)) return;
818
+ var amsComponentContainer = document.createElement('div');
819
+ amsComponentContainer.className = "".concat(componentContainerId, "-inline");
820
+ amsComponentContainer.id = componentContainerId;
821
+ var selectorDom = document.querySelector(this._selector);
822
+ if (selectorDom) selectorDom.appendChild(amsComponentContainer);
823
+ var showLoading = renderParams === null || renderParams === void 0 ? void 0 : (_renderParams$appeara2 = renderParams.appearance) === null || _renderParams$appeara2 === void 0 ? void 0 : _renderParams$appeara2.showLoading;
824
+ showLoading = typeof showLoading === 'boolean' ? showLoading : true;
825
+ if (showLoading) showInlineLoading(amsComponentContainer, this.platform);
826
+ }
816
827
  }, {
817
828
  key: "createCloseBtn",
818
829
  value: function createCloseBtn() {
package/esm/util/index.js CHANGED
@@ -227,10 +227,12 @@ var queryParse = function queryParse(url) {
227
227
  });
228
228
  return qs;
229
229
  };
230
+ var designSize = 390;
231
+ var maxFontSize = 130;
230
232
  var getDesignFontSize = function getDesignFontSize() {
231
233
  var screenWidth = document.documentElement.clientWidth;
232
- var currentFontSize = isPC() ? 100 : screenWidth * 100 / 390;
233
- return Math.min(currentFontSize, 100);
234
+ var currentFontSize = isPC() ? maxFontSize : screenWidth * 100 / designSize;
235
+ return Math.min(currentFontSize, maxFontSize);
234
236
  };
235
237
  var amsSetSize = function amsSetSize(event, dom) {
236
238
  try {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@alipay/ams-checkout","version":"0.0.1691743027-dev.0","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}
1
+ {"name":"@alipay/ams-checkout","version":"0.0.1691743027-dev.3","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}