@worldcoin/idkit 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/idkit-js.js +155 -0
- package/build/index.cjs +3 -0
- package/build/index.cjs.map +7 -0
- package/build/index.css +2 -2000
- package/build/index.js +3 -0
- package/build/index.js.map +7 -0
- package/build/jest.config.d.ts +21 -0
- package/build/jest.setup.d.ts +1 -0
- package/build/src/components/AboutWorldID.d.ts +6 -0
- package/build/src/components/Button.d.ts +3 -0
- package/build/src/components/Frame.d.ts +4 -0
- package/build/src/components/IDKitWidget/BaseWidget.d.ts +4 -0
- package/build/src/components/IDKitWidget/States/ErrorState.d.ts +3 -0
- package/build/src/components/IDKitWidget/States/HostAppVerificationState.d.ts +7 -0
- package/build/src/components/IDKitWidget/States/PrivacyState.d.ts +3 -0
- package/build/src/components/IDKitWidget/States/SuccessState.d.ts +3 -0
- package/build/src/components/IDKitWidget/States/WorldID/QRState.d.ts +11 -0
- package/build/src/components/IDKitWidget/States/WorldIDState.d.ts +3 -0
- package/build/src/components/IDKitWidget/experimental/components/CountryCodeSelect.d.ts +7 -0
- package/build/src/components/IDKitWidget/experimental/states/EnterPhoneState.d.ts +3 -0
- package/build/src/components/IDKitWidget/experimental/states/SelectMethodState.d.ts +3 -0
- package/build/src/components/IDKitWidget/experimental/states/VerifyCodeState.d.ts +3 -0
- package/build/src/components/IDKitWidget/index.d.ts +3 -0
- package/build/src/components/Icons/ArrowLongLeftIcon.d.ts +3 -0
- package/build/src/components/Icons/CheckIcon.d.ts +3 -0
- package/build/src/components/Icons/ChevronDownIcon.d.ts +3 -0
- package/build/src/components/Icons/DevicePhoneMobileIcon.d.ts +3 -0
- package/build/src/components/Icons/HumanIcon.d.ts +3 -0
- package/build/src/components/Icons/InfoIcon.d.ts +3 -0
- package/build/src/components/Icons/LoadingIcon.d.ts +5 -0
- package/build/src/components/Icons/LockIcon.d.ts +3 -0
- package/build/src/components/Icons/QuestionMarkIcon.d.ts +5 -0
- package/build/src/components/Icons/WorldIDWordmark.d.ts +3 -0
- package/build/src/components/Icons/WorldcoinIcon.d.ts +3 -0
- package/build/src/components/Icons/XMarkIcon.d.ts +3 -0
- package/build/src/components/PhoneInput.d.ts +6 -0
- package/build/src/components/QRCode.d.ts +7 -0
- package/build/src/components/ResendButton.d.ts +3 -0
- package/build/src/components/SMSCodeInput.d.ts +6 -0
- package/build/src/components/SignInButton.d.ts +7 -0
- package/build/src/components/SignInWithWorldID.d.ts +11 -0
- package/build/src/components/WorldIDIcon.d.ts +7 -0
- package/build/src/hooks/useIDKit.d.ts +7 -0
- package/build/src/hooks/useMedia.d.ts +2 -0
- package/build/src/index.d.ts +34 -0
- package/build/src/lang/index.d.ts +9 -0
- package/build/src/lib/consts.d.ts +1 -0
- package/build/src/lib/hashing.d.ts +20 -0
- package/build/src/lib/qr.d.ts +4 -0
- package/build/src/lib/telemetry.d.ts +6 -0
- package/build/src/lib/utils.d.ts +2 -0
- package/build/src/services/phone.d.ts +21 -0
- package/build/src/services/walletconnect.d.ts +15 -0
- package/build/src/store/idkit.d.ts +41 -0
- package/build/src/types/app.d.ts +22 -0
- package/build/src/types/config.d.ts +48 -0
- package/build/src/types/index.d.ts +63 -0
- package/build/src/vanilla.d.ts +12 -0
- package/build/stitches.config.d.ts +45 -0
- package/build/tests/lib/hashing.test.d.ts +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
var IDKit=(()=>{var Q$=Object.create;var Ll=Object.defineProperty,Z$=Object.defineProperties,eB=Object.getOwnPropertyDescriptor,tB=Object.getOwnPropertyDescriptors,rB=Object.getOwnPropertyNames,Fp=Object.getOwnPropertySymbols,nB=Object.getPrototypeOf,jv=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable;var $6=(e,t,r)=>t in e?Ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))jv.call(t,r)&&$6(e,r,t[r]);if(Fp)for(var r of Fp(t))B6.call(t,r)&&$6(e,r,t[r]);return e},B=(e,t)=>Z$(e,tB(t));var U6=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var K=(e,t)=>{var r={};for(var n in e)jv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fp)for(var n of Fp(e))t.indexOf(n)<0&&B6.call(e,n)&&(r[n]=e[n]);return r};var X=(e,t)=>()=>(e&&(t=e(e=0)),t);var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xt=(e,t)=>{for(var r in t)Ll(e,r,{get:t[r],enumerable:!0})},$p=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rB(t))!jv.call(e,o)&&o!==r&&Ll(e,o,{get:()=>t[o],enumerable:!(n=eB(t,o))||n.enumerable});return e},Tt=(e,t,r)=>($p(e,t,"default"),r&&$p(r,t,"default")),N=(e,t,r)=>(r=e!=null?Q$(nB(e)):{},$p(t||!e||!e.__esModule?Ll(r,"default",{value:e,enumerable:!0}):r,e)),j6=e=>$p(Ll({},"__esModule",{value:!0}),e);var oB,y,u=X(()=>{oB="production",y={MODE:oB}});function K6(){zv=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)Yn[t]=e[t],on[e.charCodeAt(t)]=t;on["-".charCodeAt(0)]=62,on["_".charCodeAt(0)]=63}function sB(e){zv||K6();var t,r,n,o,i,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=e[a-2]==="="?2:e[a-1]==="="?1:0,s=new iB(a*3/4-i),n=i>0?a-4:a;var f=0;for(t=0,r=0;t<n;t+=4,r+=3)o=on[e.charCodeAt(t)]<<18|on[e.charCodeAt(t+1)]<<12|on[e.charCodeAt(t+2)]<<6|on[e.charCodeAt(t+3)],s[f++]=o>>16&255,s[f++]=o>>8&255,s[f++]=o&255;return i===2?(o=on[e.charCodeAt(t)]<<2|on[e.charCodeAt(t+1)]>>4,s[f++]=o&255):i===1&&(o=on[e.charCodeAt(t)]<<10|on[e.charCodeAt(t+1)]<<4|on[e.charCodeAt(t+2)]>>2,s[f++]=o>>8&255,s[f++]=o&255),s}function aB(e){return Yn[e>>18&63]+Yn[e>>12&63]+Yn[e>>6&63]+Yn[e&63]}function uB(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16)+(e[i+1]<<8)+e[i+2],o.push(aB(n));return o.join("")}function z6(e){zv||K6();for(var t,r=e.length,n=r%3,o="",i=[],s=16383,a=0,f=r-n;a<f;a+=s)i.push(uB(e,a,a+s>f?f:a+s));return n===1?(t=e[r-1],o+=Yn[t>>2],o+=Yn[t<<4&63],o+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],o+=Yn[t>>10],o+=Yn[t>>4&63],o+=Yn[t<<2&63],o+="="),i.push(o),i.join("")}function Bp(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ao(e,t){if(Bp()<t)throw new RangeError("Invalid typed array length");return m.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=m.prototype):(e===null&&(e=new m(t)),e.length=t),e}function m(e,t,r){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m))return new m(e,t,r);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Hv(this,e)}return G6(this,e,t,r)}function G6(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?fB(e,t,r,n):typeof t=="string"?lB(e,t,r):dB(e,t)}function W6(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function cB(e,t,r,n){return W6(t),t<=0?Ao(e,t):r!==void 0?typeof n=="string"?Ao(e,t).fill(r,n):Ao(e,t).fill(r):Ao(e,t)}function Hv(e,t){if(W6(t),e=Ao(e,t<0?0:qv(t)|0),!m.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function lB(e,t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!m.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Y6(t,r)|0;e=Ao(e,n);var o=e.write(t,r);return o!==n&&(e=e.slice(0,o)),e}function Vv(e,t){var r=t.length<0?0:qv(t.length)|0;e=Ao(e,r);for(var n=0;n<r;n+=1)e[n]=t[n]&255;return e}function fB(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,r):t=new Uint8Array(t,r,n),m.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=m.prototype):e=Vv(e,t),e}function dB(e,t){if(Jn(t)){var r=qv(t.length)|0;return e=Ao(e,r),e.length===0||t.copy(e,0,0,r),e}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||OB(t.length)?Ao(e,0):Vv(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Vv(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function qv(e){if(e>=Bp())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bp().toString(16)+" bytes");return e|0}function Jn(e){return!!(e!=null&&e._isBuffer)}function Y6(e,t){if(Jn(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var r=e.length;if(r===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Up(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return rS(e).length;default:if(n)return Up(e).length;t=(""+t).toLowerCase(),n=!0}}function pB(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return EB(this,t,r);case"utf8":case"utf-8":return Q6(this,t,r);case"ascii":return xB(this,t,r);case"latin1":case"binary":return _B(this,t,r);case"base64":return bB(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return SB(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Ps(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function J6(e,t,r,n,o){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=m.from(t,n)),Jn(t))return t.length===0?-1:H6(e,t,r,n,o);if(typeof t=="number")return t=t&255,m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):H6(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function H6(e,t,r,n,o){var i=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,s/=2,a/=2,r/=2}function f(b,w){return i===1?b[w]:b.readUInt16BE(w*i)}var d;if(o){var h=-1;for(d=r;d<s;d++)if(f(e,d)===f(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===a)return h*i}else h!==-1&&(d-=d-h),h=-1}else for(r+a>s&&(r=s-a),d=r;d>=0;d--){for(var g=!0,v=0;v<a;v++)if(f(e,d+v)!==f(t,v)){g=!1;break}if(g)return d}return-1}function hB(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(s*2,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function mB(e,t,r,n){return zp(Up(t,e.length-r),e,r,n)}function X6(e,t,r,n){return zp(AB(t),e,r,n)}function gB(e,t,r,n){return X6(e,t,r,n)}function yB(e,t,r,n){return zp(rS(t),e,r,n)}function vB(e,t,r,n){return zp(DB(t,e.length-r),e,r,n)}function bB(e,t,r){return t===0&&r===e.length?z6(e):z6(e.slice(t,r))}function Q6(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i=e[o],s=null,a=i>239?4:i>223?3:i>191?2:1;if(o+a<=r){var f,d,h,g;switch(a){case 1:i<128&&(s=i);break;case 2:f=e[o+1],(f&192)===128&&(g=(i&31)<<6|f&63,g>127&&(s=g));break;case 3:f=e[o+1],d=e[o+2],(f&192)===128&&(d&192)===128&&(g=(i&15)<<12|(f&63)<<6|d&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:f=e[o+1],d=e[o+2],h=e[o+3],(f&192)===128&&(d&192)===128&&(h&192)===128&&(g=(i&15)<<18|(f&63)<<12|(d&63)<<6|h&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return wB(n)}function wB(e){var t=e.length;if(t<=q6)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=q6));return r}function xB(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]&127);return n}function _B(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function EB(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=IB(e[i]);return o}function SB(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function kt(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function Tr(e,t,r,n,o,i){if(!Jn(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(r+n>e.length)throw new RangeError("Index out of range")}function jp(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function Vp(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>(n?o:3-o)*8&255}function Z6(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function eS(e,t,r,n,o){return o||Z6(e,t,r,4,34028234663852886e22,-34028234663852886e22),oS(e,t,r,n,23,4),r+4}function tS(e,t,r,n,o){return o||Z6(e,t,r,8,17976931348623157e292,-17976931348623157e292),oS(e,t,r,n,52,8),r+8}function TB(e){if(e=PB(e).replace(CB,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function PB(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function IB(e){return e<16?"0"+e.toString(16):e.toString(16)}function Up(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function AB(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function DB(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function rS(e){return sB(TB(e))}function zp(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function OB(e){return e!==e}function RB(e){return e!=null&&(!!e._isBuffer||nS(e)||NB(e))}function nS(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function NB(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&nS(e.slice(0,0))}function Hp(e,t,r,n,o){var i,s,a=o*8-n-1,f=(1<<a)-1,d=f>>1,h=-7,g=r?o-1:0,v=r?-1:1,b=e[t+g];for(g+=v,i=b&(1<<-h)-1,b>>=-h,h+=a;h>0;i=i*256+e[t+g],g+=v,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;h>0;s=s*256+e[t+g],g+=v,h-=8);if(i===0)i=1-d;else{if(i===f)return s?NaN:(b?-1:1)*(1/0);s=s+Math.pow(2,n),i=i-d}return(b?-1:1)*s*Math.pow(2,i-n)}function oS(e,t,r,n,o,i){var s,a,f,d=i*8-o-1,h=(1<<d)-1,g=h>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,w=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+g>=1?t+=v/f:t+=v*Math.pow(2,1-g),t*f>=2&&(s++,f/=2),s+g>=h?(a=0,s=h):s+g>=1?(a=(t*f-1)*Math.pow(2,o),s=s+g):(a=t*Math.pow(2,g-1)*Math.pow(2,o),s=0));o>=8;e[r+b]=a&255,b+=w,a/=256,o-=8);for(s=s<<o|a,d+=o;d>0;e[r+b]=s&255,b+=w,s/=256,d-=8);e[r+b-w]|=_*128}var Yn,on,iB,zv,q6,CB,iS=X(()=>{u();l();c();Yn=[],on=[],iB=typeof Uint8Array<"u"?Uint8Array:Array,zv=!1;m.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;m.poolSize=8192;m._augment=function(e){return e.__proto__=m.prototype,e};m.from=function(e,t,r){return G6(null,e,t,r)};m.kMaxLength=Bp();m.TYPED_ARRAY_SUPPORT&&(m.prototype.__proto__=Uint8Array.prototype,m.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&m[Symbol.species]);m.alloc=function(e,t,r){return cB(null,e,t,r)};m.allocUnsafe=function(e){return Hv(null,e)};m.allocUnsafeSlow=function(e){return Hv(null,e)};m.isBuffer=RB;m.compare=function(t,r){if(!Jn(t)||!Jn(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,o=r.length,i=0,s=Math.min(n,o);i<s;++i)if(t[i]!==r[i]){n=t[i],o=r[i];break}return n<o?-1:o<n?1:0};m.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};m.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return m.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var o=m.allocUnsafe(r),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!Jn(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,i),i+=s.length}return o};m.byteLength=Y6;m.prototype._isBuffer=!0;m.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)Ps(this,r,r+1);return this};m.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)Ps(this,r,r+3),Ps(this,r+1,r+2);return this};m.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)Ps(this,r,r+7),Ps(this,r+1,r+6),Ps(this,r+2,r+5),Ps(this,r+3,r+4);return this};m.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Q6(this,0,t):pB.apply(this,arguments)};m.prototype.equals=function(t){if(!Jn(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:m.compare(this,t)===0};m.prototype.compare=function(t,r,n,o,i){if(!Jn(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===t)return 0;for(var s=i-o,a=n-r,f=Math.min(s,a),d=this.slice(o,i),h=t.slice(r,n),g=0;g<f;++g)if(d[g]!==h[g]){s=d[g],a=h[g];break}return s<a?-1:a<s?1:0};m.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};m.prototype.indexOf=function(t,r,n){return J6(this,t,r,n,!0)};m.prototype.lastIndexOf=function(t,r,n){return J6(this,t,r,n,!1)};m.prototype.write=function(t,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var s=!1;;)switch(o){case"hex":return hB(this,t,r,n);case"utf8":case"utf-8":return mB(this,t,r,n);case"ascii":return X6(this,t,r,n);case"latin1":case"binary":return gB(this,t,r,n);case"base64":return yB(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vB(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),s=!0}};m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};q6=4096;m.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);var o;if(m.TYPED_ARRAY_SUPPORT)o=this.subarray(t,r),o.__proto__=m.prototype;else{var i=r-t;o=new m(i,void 0);for(var s=0;s<i;++s)o[s]=this[s+t]}return o};m.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||kt(t,r,this.length);for(var o=this[t],i=1,s=0;++s<r&&(i*=256);)o+=this[t+s]*i;return o};m.prototype.readUIntBE=function(t,r,n){t=t|0,r=r|0,n||kt(t,r,this.length);for(var o=this[t+--r],i=1;r>0&&(i*=256);)o+=this[t+--r]*i;return o};m.prototype.readUInt8=function(t,r){return r||kt(t,1,this.length),this[t]};m.prototype.readUInt16LE=function(t,r){return r||kt(t,2,this.length),this[t]|this[t+1]<<8};m.prototype.readUInt16BE=function(t,r){return r||kt(t,2,this.length),this[t]<<8|this[t+1]};m.prototype.readUInt32LE=function(t,r){return r||kt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};m.prototype.readUInt32BE=function(t,r){return r||kt(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};m.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||kt(t,r,this.length);for(var o=this[t],i=1,s=0;++s<r&&(i*=256);)o+=this[t+s]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};m.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||kt(t,r,this.length);for(var o=r,i=1,s=this[t+--o];o>0&&(i*=256);)s+=this[t+--o]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};m.prototype.readInt8=function(t,r){return r||kt(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};m.prototype.readInt16LE=function(t,r){r||kt(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};m.prototype.readInt16BE=function(t,r){r||kt(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};m.prototype.readInt32LE=function(t,r){return r||kt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};m.prototype.readInt32BE=function(t,r){return r||kt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};m.prototype.readFloatLE=function(t,r){return r||kt(t,4,this.length),Hp(this,t,!0,23,4)};m.prototype.readFloatBE=function(t,r){return r||kt(t,4,this.length),Hp(this,t,!1,23,4)};m.prototype.readDoubleLE=function(t,r){return r||kt(t,8,this.length),Hp(this,t,!0,52,8)};m.prototype.readDoubleBE=function(t,r){return r||kt(t,8,this.length),Hp(this,t,!1,52,8)};m.prototype.writeUIntLE=function(t,r,n,o){if(t=+t,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;Tr(this,t,r,n,i,0)}var s=1,a=0;for(this[r]=t&255;++a<n&&(s*=256);)this[r+a]=t/s&255;return r+n};m.prototype.writeUIntBE=function(t,r,n,o){if(t=+t,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;Tr(this,t,r,n,i,0)}var s=n-1,a=1;for(this[r+s]=t&255;--s>=0&&(a*=256);)this[r+s]=t/a&255;return r+n};m.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,1,255,0),m.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};m.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):jp(this,t,r,!0),r+2};m.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):jp(this,t,r,!1),r+2};m.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):Vp(this,t,r,!0),r+4};m.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):Vp(this,t,r,!1),r+4};m.prototype.writeIntLE=function(t,r,n,o){if(t=+t,r=r|0,!o){var i=Math.pow(2,8*n-1);Tr(this,t,r,n,i-1,-i)}var s=0,a=1,f=0;for(this[r]=t&255;++s<n&&(a*=256);)t<0&&f===0&&this[r+s-1]!==0&&(f=1),this[r+s]=(t/a>>0)-f&255;return r+n};m.prototype.writeIntBE=function(t,r,n,o){if(t=+t,r=r|0,!o){var i=Math.pow(2,8*n-1);Tr(this,t,r,n,i-1,-i)}var s=n-1,a=1,f=0;for(this[r+s]=t&255;--s>=0&&(a*=256);)t<0&&f===0&&this[r+s+1]!==0&&(f=1),this[r+s]=(t/a>>0)-f&255;return r+n};m.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,1,127,-128),m.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};m.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):jp(this,t,r,!0),r+2};m.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):jp(this,t,r,!1),r+2};m.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,4,2147483647,-2147483648),m.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):Vp(this,t,r,!0),r+4};m.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||Tr(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),m.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):Vp(this,t,r,!1),r+4};m.prototype.writeFloatLE=function(t,r,n){return eS(this,t,r,!0,n)};m.prototype.writeFloatBE=function(t,r,n){return eS(this,t,r,!1,n)};m.prototype.writeDoubleLE=function(t,r,n){return tS(this,t,r,!0,n)};m.prototype.writeDoubleBE=function(t,r,n){return tS(this,t,r,!1,n)};m.prototype.copy=function(t,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o<n&&(o=n),o===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r<o-n&&(o=t.length-r+n);var i=o-n,s;if(this===t&&n<r&&r<o)for(s=i-1;s>=0;--s)t[s+r]=this[s+n];else if(i<1e3||!m.TYPED_ARRAY_SUPPORT)for(s=0;s<i;++s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),r);return i};m.prototype.fill=function(t,r,n,o){if(typeof t=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),t.length===1){var i=t.charCodeAt(0);i<256&&(t=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!m.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof t=="number"&&(t=t&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s<n;++s)this[s]=t;else{var a=Jn(t)?t:Up(new m(t,o).toString()),f=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%f]}return this};CB=/[^+\/0-9A-Za-z-_]/g});var c=X(()=>{iS()});var gS=$(be=>{"use strict";u();l();c();var Fl=Symbol.for("react.element"),kB=Symbol.for("react.portal"),MB=Symbol.for("react.fragment"),LB=Symbol.for("react.strict_mode"),FB=Symbol.for("react.profiler"),$B=Symbol.for("react.provider"),BB=Symbol.for("react.context"),UB=Symbol.for("react.forward_ref"),jB=Symbol.for("react.suspense"),VB=Symbol.for("react.memo"),zB=Symbol.for("react.lazy"),sS=Symbol.iterator;function HB(e){return e===null||typeof e!="object"?null:(e=sS&&e[sS]||e["@@iterator"],typeof e=="function"?e:null)}var cS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lS=Object.assign,fS={};function Za(e,t,r){this.props=e,this.context=t,this.refs=fS,this.updater=r||cS}Za.prototype.isReactComponent={};Za.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Za.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dS(){}dS.prototype=Za.prototype;function Gv(e,t,r){this.props=e,this.context=t,this.refs=fS,this.updater=r||cS}var Wv=Gv.prototype=new dS;Wv.constructor=Gv;lS(Wv,Za.prototype);Wv.isPureReactComponent=!0;var aS=Array.isArray,pS=Object.prototype.hasOwnProperty,Yv={current:null},hS={key:!0,ref:!0,__self:!0,__source:!0};function mS(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)pS.call(t,n)&&!hS.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var f=Array(a),d=0;d<a;d++)f[d]=arguments[d+2];o.children=f}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:Fl,type:e,key:i,ref:s,props:o,_owner:Yv.current}}function qB(e,t){return{$$typeof:Fl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Jv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fl}function KB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var uS=/\/+/g;function Kv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KB(""+e.key):t.toString(36)}function Kp(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Fl:case kB:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+Kv(s,0):n,aS(o)?(r="",e!=null&&(r=e.replace(uS,"$&/")+"/"),Kp(o,t,r,"",function(d){return d})):o!=null&&(Jv(o)&&(o=qB(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(uS,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",aS(e))for(var a=0;a<e.length;a++){i=e[a];var f=n+Kv(i,a);s+=Kp(i,t,r,f,o)}else if(f=HB(e),typeof f=="function")for(e=f.call(e),a=0;!(i=e.next()).done;)i=i.value,f=n+Kv(i,a++),s+=Kp(i,t,r,f,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function qp(e,t,r){if(e==null)return e;var n=[],o=0;return Kp(e,n,"","",function(i){return t.call(r,i,o++)}),n}function GB(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dr={current:null},Gp={transition:null},WB={ReactCurrentDispatcher:dr,ReactCurrentBatchConfig:Gp,ReactCurrentOwner:Yv};be.Children={map:qp,forEach:function(e,t,r){qp(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return qp(e,function(){t++}),t},toArray:function(e){return qp(e,function(t){return t})||[]},only:function(e){if(!Jv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};be.Component=Za;be.Fragment=MB;be.Profiler=FB;be.PureComponent=Gv;be.StrictMode=LB;be.Suspense=jB;be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WB;be.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=lS({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Yv.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(f in t)pS.call(t,f)&&!hS.hasOwnProperty(f)&&(n[f]=t[f]===void 0&&a!==void 0?a[f]:t[f])}var f=arguments.length-2;if(f===1)n.children=r;else if(1<f){a=Array(f);for(var d=0;d<f;d++)a[d]=arguments[d+2];n.children=a}return{$$typeof:Fl,type:e.type,key:o,ref:i,props:n,_owner:s}};be.createContext=function(e){return e={$$typeof:BB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$B,_context:e},e.Consumer=e};be.createElement=mS;be.createFactory=function(e){var t=mS.bind(null,e);return t.type=e,t};be.createRef=function(){return{current:null}};be.forwardRef=function(e){return{$$typeof:UB,render:e}};be.isValidElement=Jv;be.lazy=function(e){return{$$typeof:zB,_payload:{_status:-1,_result:e},_init:GB}};be.memo=function(e,t){return{$$typeof:VB,type:e,compare:t===void 0?null:t}};be.startTransition=function(e){var t=Gp.transition;Gp.transition={};try{e()}finally{Gp.transition=t}};be.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};be.useCallback=function(e,t){return dr.current.useCallback(e,t)};be.useContext=function(e){return dr.current.useContext(e)};be.useDebugValue=function(){};be.useDeferredValue=function(e){return dr.current.useDeferredValue(e)};be.useEffect=function(e,t){return dr.current.useEffect(e,t)};be.useId=function(){return dr.current.useId()};be.useImperativeHandle=function(e,t,r){return dr.current.useImperativeHandle(e,t,r)};be.useInsertionEffect=function(e,t){return dr.current.useInsertionEffect(e,t)};be.useLayoutEffect=function(e,t){return dr.current.useLayoutEffect(e,t)};be.useMemo=function(e,t){return dr.current.useMemo(e,t)};be.useReducer=function(e,t,r){return dr.current.useReducer(e,t,r)};be.useRef=function(e){return dr.current.useRef(e)};be.useState=function(e){return dr.current.useState(e)};be.useSyncExternalStore=function(e,t,r){return dr.current.useSyncExternalStore(e,t,r)};be.useTransition=function(){return dr.current.useTransition()};be.version="18.2.0"});var z=$((Kae,yS)=>{"use strict";u();l();c();yS.exports=gS()});var p,l=X(()=>{p=N(z(),1)});var _S=$(xS=>{"use strict";u();l();c();var eu=z();function XB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QB=typeof Object.is=="function"?Object.is:XB,ZB=eu.useState,eU=eu.useEffect,tU=eu.useLayoutEffect,rU=eu.useDebugValue;function nU(e,t){var r=t(),n=ZB({inst:{value:r,getSnapshot:t}}),o=n[0].inst,i=n[1];return tU(function(){o.value=r,o.getSnapshot=t,Xv(o)&&i({inst:o})},[e,r,t]),eU(function(){return Xv(o)&&i({inst:o}),e(function(){Xv(o)&&i({inst:o})})},[e]),rU(r),r}function Xv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!QB(e,r)}catch{return!0}}function oU(e,t){return t()}var iU=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oU:nU;xS.useSyncExternalStore=eu.useSyncExternalStore!==void 0?eu.useSyncExternalStore:iU});var SS=$((Xae,ES)=>{"use strict";u();l();c();ES.exports=_S()});var TS=$(CS=>{"use strict";u();l();c();var Wp=z(),sU=SS();function aU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uU=typeof Object.is=="function"?Object.is:aU,cU=sU.useSyncExternalStore,lU=Wp.useRef,fU=Wp.useEffect,dU=Wp.useMemo,pU=Wp.useDebugValue;CS.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=lU(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=dU(function(){function f(b){if(!d){if(d=!0,h=b,b=n(b),o!==void 0&&s.hasValue){var w=s.value;if(o(w,b))return g=w}return g=b}if(w=g,uU(h,b))return w;var _=n(b);return o!==void 0&&o(w,_)?w:(h=b,g=_)}var d=!1,h,g,v=r===void 0?null:r;return[function(){return f(t())},v===null?void 0:function(){return f(v())}]},[t,r,n,o]);var a=cU(e,i[0],i[1]);return fU(function(){s.hasValue=!0,s.value=a},[a]),pU(a),a}});var IS=$((Zae,PS)=>{"use strict";u();l();c();PS.exports=TS()});var r5=$(je=>{"use strict";u();l();c();function ob(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Zp(o,t))e[n]=t,e[r]=o,r=n;else break e}}function In(e){return e.length===0?null:e[0]}function th(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var s=2*(n+1)-1,a=e[s],f=s+1,d=e[f];if(0>Zp(a,r))f<o&&0>Zp(d,a)?(e[n]=d,e[f]=r,n=f):(e[n]=a,e[s]=r,n=s);else if(f<o&&0>Zp(d,r))e[n]=d,e[f]=r,n=f;else break e}}return t}function Zp(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(GS=performance,je.unstable_now=function(){return GS.now()}):(tb=Date,WS=tb.now(),je.unstable_now=function(){return tb.now()-WS});var GS,tb,WS,Xn=[],Ci=[],NU=1,sn=null,Qt=3,rh=!1,Ds=!1,zl=!1,XS=typeof setTimeout=="function"?setTimeout:null,QS=typeof clearTimeout=="function"?clearTimeout:null,YS=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ib(e){for(var t=In(Ci);t!==null;){if(t.callback===null)th(Ci);else if(t.startTime<=e)th(Ci),t.sortIndex=t.expirationTime,ob(Xn,t);else break;t=In(Ci)}}function sb(e){if(zl=!1,ib(e),!Ds)if(In(Xn)!==null)Ds=!0,ub(ab);else{var t=In(Ci);t!==null&&cb(sb,t.startTime-e)}}function ab(e,t){Ds=!1,zl&&(zl=!1,QS(Hl),Hl=-1),rh=!0;var r=Qt;try{for(ib(t),sn=In(Xn);sn!==null&&(!(sn.expirationTime>t)||e&&!t5());){var n=sn.callback;if(typeof n=="function"){sn.callback=null,Qt=sn.priorityLevel;var o=n(sn.expirationTime<=t);t=je.unstable_now(),typeof o=="function"?sn.callback=o:sn===In(Xn)&&th(Xn),ib(t)}else th(Xn);sn=In(Xn)}if(sn!==null)var i=!0;else{var s=In(Ci);s!==null&&cb(sb,s.startTime-t),i=!1}return i}finally{sn=null,Qt=r,rh=!1}}var nh=!1,eh=null,Hl=-1,ZS=5,e5=-1;function t5(){return!(je.unstable_now()-e5<ZS)}function rb(){if(eh!==null){var e=je.unstable_now();e5=e;var t=!0;try{t=eh(!0,e)}finally{t?Vl():(nh=!1,eh=null)}}else nh=!1}var Vl;typeof YS=="function"?Vl=function(){YS(rb)}:typeof MessageChannel<"u"?(nb=new MessageChannel,JS=nb.port2,nb.port1.onmessage=rb,Vl=function(){JS.postMessage(null)}):Vl=function(){XS(rb,0)};var nb,JS;function ub(e){eh=e,nh||(nh=!0,Vl())}function cb(e,t){Hl=XS(function(){e(je.unstable_now())},t)}je.unstable_IdlePriority=5;je.unstable_ImmediatePriority=1;je.unstable_LowPriority=4;je.unstable_NormalPriority=3;je.unstable_Profiling=null;je.unstable_UserBlockingPriority=2;je.unstable_cancelCallback=function(e){e.callback=null};je.unstable_continueExecution=function(){Ds||rh||(Ds=!0,ub(ab))};je.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ZS=0<e?Math.floor(1e3/e):5};je.unstable_getCurrentPriorityLevel=function(){return Qt};je.unstable_getFirstCallbackNode=function(){return In(Xn)};je.unstable_next=function(e){switch(Qt){case 1:case 2:case 3:var t=3;break;default:t=Qt}var r=Qt;Qt=t;try{return e()}finally{Qt=r}};je.unstable_pauseExecution=function(){};je.unstable_requestPaint=function(){};je.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Qt;Qt=e;try{return t()}finally{Qt=r}};je.unstable_scheduleCallback=function(e,t,r){var n=je.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:NU++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,ob(Ci,e),In(Xn)===null&&e===In(Ci)&&(zl?(QS(Hl),Hl=-1):zl=!0,cb(sb,r-n))):(e.sortIndex=o,ob(Xn,e),Ds||rh||(Ds=!0,ub(ab))),e};je.unstable_shouldYield=t5;je.unstable_wrapCallback=function(e){var t=Qt;return function(){var r=Qt;Qt=t;try{return e.apply(this,arguments)}finally{Qt=r}}}});var o5=$((gue,n5)=>{"use strict";u();l();c();n5.exports=r5()});var lP=$(zr=>{"use strict";u();l();c();var fC=z(),jr=o5();function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var dC=new Set,pf={};function zs(e,t){Eu(e,t),Eu(e+"Capture",t)}function Eu(e,t){for(pf[e]=t,e=0;e<t.length;e++)dC.add(t[e])}var Lo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rb=Object.prototype.hasOwnProperty,kU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,i5={},s5={};function MU(e){return Rb.call(s5,e)?!0:Rb.call(i5,e)?!1:kU.test(e)?s5[e]=!0:(i5[e]=!0,!1)}function LU(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FU(e,t,r,n){if(t===null||typeof t>"u"||LU(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function mr(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Kt[e]=new mr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Kt[t]=new mr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Kt[e]=new mr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Kt[e]=new mr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Kt[e]=new mr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Kt[e]=new mr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Kt[e]=new mr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Kt[e]=new mr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Kt[e]=new mr(e,5,!1,e.toLowerCase(),null,!1,!1)});var S1=/[\-:]([a-z])/g;function C1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(S1,C1);Kt[t]=new mr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(S1,C1);Kt[t]=new mr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(S1,C1);Kt[t]=new mr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Kt[e]=new mr(e,1,!1,e.toLowerCase(),null,!1,!1)});Kt.xlinkHref=new mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Kt[e]=new mr(e,1,!1,e.toLowerCase(),null,!0,!0)});function T1(e,t,r,n){var o=Kt.hasOwnProperty(t)?Kt[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(FU(t,r,o,n)&&(r=null),n||o===null?MU(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Uo=fC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oh=Symbol.for("react.element"),iu=Symbol.for("react.portal"),su=Symbol.for("react.fragment"),P1=Symbol.for("react.strict_mode"),Nb=Symbol.for("react.profiler"),pC=Symbol.for("react.provider"),hC=Symbol.for("react.context"),I1=Symbol.for("react.forward_ref"),kb=Symbol.for("react.suspense"),Mb=Symbol.for("react.suspense_list"),A1=Symbol.for("react.memo"),Pi=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var mC=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var a5=Symbol.iterator;function ql(e){return e===null||typeof e!="object"?null:(e=a5&&e[a5]||e["@@iterator"],typeof e=="function"?e:null)}var ot=Object.assign,lb;function Zl(e){if(lb===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);lb=t&&t[1]||""}return`
|
|
2
|
+
`+lb+e}var fb=!1;function db(e,t){if(!e||fb)return"";fb=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var o=d.stack.split(`
|
|
3
|
+
`),i=n.stack.split(`
|
|
4
|
+
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var f=`
|
|
5
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=s&&0<=a);break}}}finally{fb=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Zl(e):""}function $U(e){switch(e.tag){case 5:return Zl(e.type);case 16:return Zl("Lazy");case 13:return Zl("Suspense");case 19:return Zl("SuspenseList");case 0:case 2:case 15:return e=db(e.type,!1),e;case 11:return e=db(e.type.render,!1),e;case 1:return e=db(e.type,!0),e;default:return""}}function Lb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case su:return"Fragment";case iu:return"Portal";case Nb:return"Profiler";case P1:return"StrictMode";case kb:return"Suspense";case Mb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hC:return(e.displayName||"Context")+".Consumer";case pC:return(e._context.displayName||"Context")+".Provider";case I1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A1:return t=e.displayName||null,t!==null?t:Lb(e.type)||"Memo";case Pi:t=e._payload,e=e._init;try{return Lb(e(t))}catch{}}return null}function BU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lb(t);case 8:return t===P1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ji(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UU(e){var t=gC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ih(e){e._valueTracker||(e._valueTracker=UU(e))}function yC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=gC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Nh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fb(e,t){var r=t.checked;return ot({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:e._wrapperState.initialChecked})}function u5(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ji(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vC(e,t){t=t.checked,t!=null&&T1(e,"checked",t,!1)}function $b(e,t){vC(e,t);var r=ji(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bb(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bb(e,t.type,ji(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function c5(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bb(e,t,r){(t!=="number"||Nh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ef=Array.isArray;function yu(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ji(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ub(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return ot({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function l5(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(q(92));if(ef(r)){if(1<r.length)throw Error(q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ji(r)}}function bC(e,t){var r=ji(t.value),n=ji(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function f5(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jb(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sh,xC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(sh=sh||document.createElement("div"),sh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var nf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jU=["Webkit","ms","Moz","O"];Object.keys(nf).forEach(function(e){jU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nf[t]=nf[e]})});function _C(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||nf.hasOwnProperty(e)&&nf[e]?(""+t).trim():t+"px"}function EC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=_C(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var VU=ot({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vb(e,t){if(t){if(VU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function zb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hb=null;function D1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qb=null,vu=null,bu=null;function d5(e){if(e=Rf(e)){if(typeof qb!="function")throw Error(q(280));var t=e.stateNode;t&&(t=am(t),qb(e.stateNode,e.type,t))}}function SC(e){vu?bu?bu.push(e):bu=[e]:vu=e}function CC(){if(vu){var e=vu,t=bu;if(bu=vu=null,d5(e),t)for(e=0;e<t.length;e++)d5(t[e])}}function TC(e,t){return e(t)}function PC(){}var pb=!1;function IC(e,t,r){if(pb)return e(t,r);pb=!0;try{return TC(e,t,r)}finally{pb=!1,(vu!==null||bu!==null)&&(PC(),CC())}}function mf(e,t){var r=e.stateNode;if(r===null)return null;var n=am(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(q(231,t,typeof r));return r}var Kb=!1;if(Lo)try{nu={},Object.defineProperty(nu,"passive",{get:function(){Kb=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch{Kb=!1}var nu;function zU(e,t,r,n,o,i,s,a,f){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(h){this.onError(h)}}var of=!1,kh=null,Mh=!1,Gb=null,HU={onError:function(e){of=!0,kh=e}};function qU(e,t,r,n,o,i,s,a,f){of=!1,kh=null,zU.apply(HU,arguments)}function KU(e,t,r,n,o,i,s,a,f){if(qU.apply(this,arguments),of){if(of){var d=kh;of=!1,kh=null}else throw Error(q(198));Mh||(Mh=!0,Gb=d)}}function Hs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function AC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p5(e){if(Hs(e)!==e)throw Error(q(188))}function GU(e){var t=e.alternate;if(!t){if(t=Hs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return p5(o),e;if(i===n)return p5(o),t;i=i.sibling}throw Error(q(188))}if(r.return!==n.return)r=o,n=i;else{for(var s=!1,a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s)throw Error(q(189))}}if(r.alternate!==n)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:t}function DC(e){return e=GU(e),e!==null?OC(e):null}function OC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=OC(e);if(t!==null)return t;e=e.sibling}return null}var RC=jr.unstable_scheduleCallback,h5=jr.unstable_cancelCallback,WU=jr.unstable_shouldYield,YU=jr.unstable_requestPaint,ht=jr.unstable_now,JU=jr.unstable_getCurrentPriorityLevel,O1=jr.unstable_ImmediatePriority,NC=jr.unstable_UserBlockingPriority,Lh=jr.unstable_NormalPriority,XU=jr.unstable_LowPriority,kC=jr.unstable_IdlePriority,nm=null,to=null;function QU(e){if(to&&typeof to.onCommitFiberRoot=="function")try{to.onCommitFiberRoot(nm,e,void 0,(e.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:tj,ZU=Math.log,ej=Math.LN2;function tj(e){return e>>>=0,e===0?32:31-(ZU(e)/ej|0)|0}var ah=64,uh=4194304;function tf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=tf(a):(i&=s,i!==0&&(n=tf(i)))}else s=r&~o,s!==0?n=tf(s):i!==0&&(n=tf(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Nn(t),o=1<<r,n|=e[r],t&=~o;return n}function rj(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nj(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Nn(i),a=1<<s,f=o[s];f===-1?((a&r)===0||(a&n)!==0)&&(o[s]=rj(a,t)):f<=t&&(e.expiredLanes|=a),i&=~a}}function Wb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function MC(){var e=ah;return ah<<=1,(ah&4194240)===0&&(ah=64),e}function hb(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Df(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nn(t),e[t]=r}function oj(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Nn(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function R1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Nn(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Me=0;function LC(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var FC,N1,$C,BC,UC,Yb=!1,ch=[],Ni=null,ki=null,Mi=null,gf=new Map,yf=new Map,Ai=[],ij="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function m5(e,t){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":gf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yf.delete(t.pointerId)}}function Kl(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Rf(t),t!==null&&N1(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function sj(e,t,r,n,o){switch(t){case"focusin":return Ni=Kl(Ni,e,t,r,n,o),!0;case"dragenter":return ki=Kl(ki,e,t,r,n,o),!0;case"mouseover":return Mi=Kl(Mi,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return gf.set(i,Kl(gf.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,yf.set(i,Kl(yf.get(i)||null,e,t,r,n,o)),!0}return!1}function jC(e){var t=Ns(e.target);if(t!==null){var r=Hs(t);if(r!==null){if(t=r.tag,t===13){if(t=AC(r),t!==null){e.blockedOn=t,UC(e.priority,function(){$C(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Eh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Jb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Hb=n,r.target.dispatchEvent(n),Hb=null}else return t=Rf(r),t!==null&&N1(t),e.blockedOn=r,!1;t.shift()}return!0}function g5(e,t,r){Eh(e)&&r.delete(t)}function aj(){Yb=!1,Ni!==null&&Eh(Ni)&&(Ni=null),ki!==null&&Eh(ki)&&(ki=null),Mi!==null&&Eh(Mi)&&(Mi=null),gf.forEach(g5),yf.forEach(g5)}function Gl(e,t){e.blockedOn===t&&(e.blockedOn=null,Yb||(Yb=!0,jr.unstable_scheduleCallback(jr.unstable_NormalPriority,aj)))}function vf(e){function t(o){return Gl(o,e)}if(0<ch.length){Gl(ch[0],e);for(var r=1;r<ch.length;r++){var n=ch[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ni!==null&&Gl(Ni,e),ki!==null&&Gl(ki,e),Mi!==null&&Gl(Mi,e),gf.forEach(t),yf.forEach(t),r=0;r<Ai.length;r++)n=Ai[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ai.length&&(r=Ai[0],r.blockedOn===null);)jC(r),r.blockedOn===null&&Ai.shift()}var wu=Uo.ReactCurrentBatchConfig,$h=!0;function uj(e,t,r,n){var o=Me,i=wu.transition;wu.transition=null;try{Me=1,k1(e,t,r,n)}finally{Me=o,wu.transition=i}}function cj(e,t,r,n){var o=Me,i=wu.transition;wu.transition=null;try{Me=4,k1(e,t,r,n)}finally{Me=o,wu.transition=i}}function k1(e,t,r,n){if($h){var o=Jb(e,t,r,n);if(o===null)xb(e,t,n,Bh,r),m5(e,n);else if(sj(o,e,t,r,n))n.stopPropagation();else if(m5(e,n),t&4&&-1<ij.indexOf(e)){for(;o!==null;){var i=Rf(o);if(i!==null&&FC(i),i=Jb(e,t,r,n),i===null&&xb(e,t,n,Bh,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else xb(e,t,n,null,r)}}var Bh=null;function Jb(e,t,r,n){if(Bh=null,e=D1(n),e=Ns(e),e!==null)if(t=Hs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=AC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bh=e,null}function VC(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(JU()){case O1:return 1;case NC:return 4;case Lh:case XU:return 16;case kC:return 536870912;default:return 16}default:return 16}}var Oi=null,M1=null,Sh=null;function zC(){if(Sh)return Sh;var e,t=M1,r=t.length,n,o="value"in Oi?Oi.value:Oi.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===o[i-n];n++);return Sh=o.slice(e,1<n?1-n:void 0)}function Ch(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lh(){return!0}function y5(){return!1}function Vr(e){function t(r,n,o,i,s){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?lh:y5,this.isPropagationStopped=y5,this}return ot(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=lh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=lh)},persist:function(){},isPersistent:lh}),t}var Du={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},L1=Vr(Du),Of=ot({},Du,{view:0,detail:0}),lj=Vr(Of),mb,gb,Wl,om=ot({},Of,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:F1,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wl&&(Wl&&e.type==="mousemove"?(mb=e.screenX-Wl.screenX,gb=e.screenY-Wl.screenY):gb=mb=0,Wl=e),mb)},movementY:function(e){return"movementY"in e?e.movementY:gb}}),v5=Vr(om),fj=ot({},om,{dataTransfer:0}),dj=Vr(fj),pj=ot({},Of,{relatedTarget:0}),yb=Vr(pj),hj=ot({},Du,{animationName:0,elapsedTime:0,pseudoElement:0}),mj=Vr(hj),gj=ot({},Du,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yj=Vr(gj),vj=ot({},Du,{data:0}),b5=Vr(vj),bj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _j(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xj[e])?!!t[e]:!1}function F1(){return _j}var Ej=ot({},Of,{key:function(e){if(e.key){var t=bj[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ch(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:F1,charCode:function(e){return e.type==="keypress"?Ch(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ch(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sj=Vr(Ej),Cj=ot({},om,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),w5=Vr(Cj),Tj=ot({},Of,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:F1}),Pj=Vr(Tj),Ij=ot({},Du,{propertyName:0,elapsedTime:0,pseudoElement:0}),Aj=Vr(Ij),Dj=ot({},om,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Oj=Vr(Dj),Rj=[9,13,27,32],$1=Lo&&"CompositionEvent"in window,sf=null;Lo&&"documentMode"in document&&(sf=document.documentMode);var Nj=Lo&&"TextEvent"in window&&!sf,HC=Lo&&(!$1||sf&&8<sf&&11>=sf),x5=String.fromCharCode(32),_5=!1;function qC(e,t){switch(e){case"keyup":return Rj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var au=!1;function kj(e,t){switch(e){case"compositionend":return KC(t);case"keypress":return t.which!==32?null:(_5=!0,x5);case"textInput":return e=t.data,e===x5&&_5?null:e;default:return null}}function Mj(e,t){if(au)return e==="compositionend"||!$1&&qC(e,t)?(e=zC(),Sh=M1=Oi=null,au=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return HC&&t.locale!=="ko"?null:t.data;default:return null}}var Lj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function E5(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Lj[e.type]:t==="textarea"}function GC(e,t,r,n){SC(n),t=Uh(t,"onChange"),0<t.length&&(r=new L1("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var af=null,bf=null;function Fj(e){oT(e,0)}function im(e){var t=lu(e);if(yC(t))return e}function $j(e,t){if(e==="change")return t}var WC=!1;Lo&&(Lo?(dh="oninput"in document,dh||(vb=document.createElement("div"),vb.setAttribute("oninput","return;"),dh=typeof vb.oninput=="function"),fh=dh):fh=!1,WC=fh&&(!document.documentMode||9<document.documentMode));var fh,dh,vb;function S5(){af&&(af.detachEvent("onpropertychange",YC),bf=af=null)}function YC(e){if(e.propertyName==="value"&&im(bf)){var t=[];GC(t,bf,e,D1(e)),IC(Fj,t)}}function Bj(e,t,r){e==="focusin"?(S5(),af=t,bf=r,af.attachEvent("onpropertychange",YC)):e==="focusout"&&S5()}function Uj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return im(bf)}function jj(e,t){if(e==="click")return im(t)}function Vj(e,t){if(e==="input"||e==="change")return im(t)}function zj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mn=typeof Object.is=="function"?Object.is:zj;function wf(e,t){if(Mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Rb.call(t,o)||!Mn(e[o],t[o]))return!1}return!0}function C5(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function T5(e,t){var r=C5(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=C5(r)}}function JC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function XC(){for(var e=window,t=Nh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Nh(e.document)}return t}function B1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Hj(e){var t=XC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&JC(r.ownerDocument.documentElement,r)){if(n!==null&&B1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=T5(r,i);var s=T5(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qj=Lo&&"documentMode"in document&&11>=document.documentMode,uu=null,Xb=null,uf=null,Qb=!1;function P5(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qb||uu==null||uu!==Nh(n)||(n=uu,"selectionStart"in n&&B1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),uf&&wf(uf,n)||(uf=n,n=Uh(Xb,"onSelect"),0<n.length&&(t=new L1("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=uu)))}function ph(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var cu={animationend:ph("Animation","AnimationEnd"),animationiteration:ph("Animation","AnimationIteration"),animationstart:ph("Animation","AnimationStart"),transitionend:ph("Transition","TransitionEnd")},bb={},QC={};Lo&&(QC=document.createElement("div").style,"AnimationEvent"in window||(delete cu.animationend.animation,delete cu.animationiteration.animation,delete cu.animationstart.animation),"TransitionEvent"in window||delete cu.transitionend.transition);function sm(e){if(bb[e])return bb[e];if(!cu[e])return e;var t=cu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in QC)return bb[e]=t[r];return e}var ZC=sm("animationend"),eT=sm("animationiteration"),tT=sm("animationstart"),rT=sm("transitionend"),nT=new Map,I5="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zi(e,t){nT.set(e,t),zs(t,[e])}for(hh=0;hh<I5.length;hh++)mh=I5[hh],A5=mh.toLowerCase(),D5=mh[0].toUpperCase()+mh.slice(1),zi(A5,"on"+D5);var mh,A5,D5,hh;zi(ZC,"onAnimationEnd");zi(eT,"onAnimationIteration");zi(tT,"onAnimationStart");zi("dblclick","onDoubleClick");zi("focusin","onFocus");zi("focusout","onBlur");zi(rT,"onTransitionEnd");Eu("onMouseEnter",["mouseout","mouseover"]);Eu("onMouseLeave",["mouseout","mouseover"]);Eu("onPointerEnter",["pointerout","pointerover"]);Eu("onPointerLeave",["pointerout","pointerover"]);zs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zs("onBeforeInput",["compositionend","keypress","textInput","paste"]);zs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Kj=new Set("cancel close invalid load scroll toggle".split(" ").concat(rf));function O5(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,KU(n,t,void 0,e),e.currentTarget=null}function oT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],f=a.instance,d=a.currentTarget;if(a=a.listener,f!==i&&o.isPropagationStopped())break e;O5(o,a,d),i=f}else for(s=0;s<n.length;s++){if(a=n[s],f=a.instance,d=a.currentTarget,a=a.listener,f!==i&&o.isPropagationStopped())break e;O5(o,a,d),i=f}}}if(Mh)throw e=Gb,Mh=!1,Gb=null,e}function Ge(e,t){var r=t[n1];r===void 0&&(r=t[n1]=new Set);var n=e+"__bubble";r.has(n)||(iT(t,e,2,!1),r.add(n))}function wb(e,t,r){var n=0;t&&(n|=4),iT(r,e,n,t)}var gh="_reactListening"+Math.random().toString(36).slice(2);function xf(e){if(!e[gh]){e[gh]=!0,dC.forEach(function(r){r!=="selectionchange"&&(Kj.has(r)||wb(r,!1,e),wb(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gh]||(t[gh]=!0,wb("selectionchange",!1,t))}}function iT(e,t,r,n){switch(VC(t)){case 1:var o=uj;break;case 4:o=cj;break;default:o=k1}r=o.bind(null,t,r,e),o=void 0,!Kb||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function xb(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=n.return;s!==null;){var f=s.tag;if((f===3||f===4)&&(f=s.stateNode.containerInfo,f===o||f.nodeType===8&&f.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Ns(a),s===null)return;if(f=s.tag,f===5||f===6){n=i=s;continue e}a=a.parentNode}}n=n.return}IC(function(){var d=i,h=D1(r),g=[];e:{var v=nT.get(e);if(v!==void 0){var b=L1,w=e;switch(e){case"keypress":if(Ch(r)===0)break e;case"keydown":case"keyup":b=Sj;break;case"focusin":w="focus",b=yb;break;case"focusout":w="blur",b=yb;break;case"beforeblur":case"afterblur":b=yb;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=v5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=dj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=Pj;break;case ZC:case eT:case tT:b=mj;break;case rT:b=Aj;break;case"scroll":b=lj;break;case"wheel":b=Oj;break;case"copy":case"cut":case"paste":b=yj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=w5}var _=(t&4)!==0,C=!_&&e==="scroll",x=_?v!==null?v+"Capture":null:v;_=[];for(var S=d,E;S!==null;){E=S;var T=E.stateNode;if(E.tag===5&&T!==null&&(E=T,x!==null&&(T=mf(S,x),T!=null&&_.push(_f(S,T,E)))),C)break;S=S.return}0<_.length&&(v=new b(v,w,null,r,h),g.push({event:v,listeners:_}))}}if((t&7)===0){e:{if(v=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",v&&r!==Hb&&(w=r.relatedTarget||r.fromElement)&&(Ns(w)||w[Fo]))break e;if((b||v)&&(v=h.window===h?h:(v=h.ownerDocument)?v.defaultView||v.parentWindow:window,b?(w=r.relatedTarget||r.toElement,b=d,w=w?Ns(w):null,w!==null&&(C=Hs(w),w!==C||w.tag!==5&&w.tag!==6)&&(w=null)):(b=null,w=d),b!==w)){if(_=v5,T="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(_=w5,T="onPointerLeave",x="onPointerEnter",S="pointer"),C=b==null?v:lu(b),E=w==null?v:lu(w),v=new _(T,S+"leave",b,r,h),v.target=C,v.relatedTarget=E,T=null,Ns(h)===d&&(_=new _(x,S+"enter",w,r,h),_.target=E,_.relatedTarget=C,T=_),C=T,b&&w)t:{for(_=b,x=w,S=0,E=_;E;E=ou(E))S++;for(E=0,T=x;T;T=ou(T))E++;for(;0<S-E;)_=ou(_),S--;for(;0<E-S;)x=ou(x),E--;for(;S--;){if(_===x||x!==null&&_===x.alternate)break t;_=ou(_),x=ou(x)}_=null}else _=null;b!==null&&R5(g,v,b,_,!1),w!==null&&C!==null&&R5(g,C,w,_,!0)}}e:{if(v=d?lu(d):window,b=v.nodeName&&v.nodeName.toLowerCase(),b==="select"||b==="input"&&v.type==="file")var A=$j;else if(E5(v))if(WC)A=Vj;else{A=Uj;var O=Bj}else(b=v.nodeName)&&b.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(A=jj);if(A&&(A=A(e,d))){GC(g,A,r,h);break e}O&&O(e,v,d),e==="focusout"&&(O=v._wrapperState)&&O.controlled&&v.type==="number"&&Bb(v,"number",v.value)}switch(O=d?lu(d):window,e){case"focusin":(E5(O)||O.contentEditable==="true")&&(uu=O,Xb=d,uf=null);break;case"focusout":uf=Xb=uu=null;break;case"mousedown":Qb=!0;break;case"contextmenu":case"mouseup":case"dragend":Qb=!1,P5(g,r,h);break;case"selectionchange":if(qj)break;case"keydown":case"keyup":P5(g,r,h)}var P;if($1)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else au?qC(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(HC&&r.locale!=="ko"&&(au||I!=="onCompositionStart"?I==="onCompositionEnd"&&au&&(P=zC()):(Oi=h,M1="value"in Oi?Oi.value:Oi.textContent,au=!0)),O=Uh(d,I),0<O.length&&(I=new b5(I,e,null,r,h),g.push({event:I,listeners:O}),P?I.data=P:(P=KC(r),P!==null&&(I.data=P)))),(P=Nj?kj(e,r):Mj(e,r))&&(d=Uh(d,"onBeforeInput"),0<d.length&&(h=new b5("onBeforeInput","beforeinput",null,r,h),g.push({event:h,listeners:d}),h.data=P))}oT(g,t)})}function _f(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Uh(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=mf(e,r),i!=null&&n.unshift(_f(e,i,o)),i=mf(e,t),i!=null&&n.push(_f(e,i,o))),e=e.return}return n}function ou(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function R5(e,t,r,n,o){for(var i=t._reactName,s=[];r!==null&&r!==n;){var a=r,f=a.alternate,d=a.stateNode;if(f!==null&&f===n)break;a.tag===5&&d!==null&&(a=d,o?(f=mf(r,i),f!=null&&s.unshift(_f(r,f,a))):o||(f=mf(r,i),f!=null&&s.push(_f(r,f,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var Gj=/\r\n?/g,Wj=/\u0000|\uFFFD/g;function N5(e){return(typeof e=="string"?e:""+e).replace(Gj,`
|
|
6
|
+
`).replace(Wj,"")}function yh(e,t,r){if(t=N5(t),N5(e)!==t&&r)throw Error(q(425))}function jh(){}var Zb=null,e1=null;function t1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var r1=typeof setTimeout=="function"?setTimeout:void 0,Yj=typeof clearTimeout=="function"?clearTimeout:void 0,k5=typeof Promise=="function"?Promise:void 0,Jj=typeof queueMicrotask=="function"?queueMicrotask:typeof k5<"u"?function(e){return k5.resolve(null).then(e).catch(Xj)}:r1;function Xj(e){setTimeout(function(){throw e})}function _b(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),vf(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);vf(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function M5(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ou=Math.random().toString(36).slice(2),eo="__reactFiber$"+Ou,Ef="__reactProps$"+Ou,Fo="__reactContainer$"+Ou,n1="__reactEvents$"+Ou,Qj="__reactListeners$"+Ou,Zj="__reactHandles$"+Ou;function Ns(e){var t=e[eo];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Fo]||r[eo]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=M5(e);e!==null;){if(r=e[eo])return r;e=M5(e)}return t}e=r,r=e.parentNode}return null}function Rf(e){return e=e[eo]||e[Fo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function lu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function am(e){return e[Ef]||null}var o1=[],fu=-1;function Hi(e){return{current:e}}function We(e){0>fu||(e.current=o1[fu],o1[fu]=null,fu--)}function Ve(e,t){fu++,o1[fu]=e.current,e.current=t}var Vi={},rr=Hi(Vi),Ar=Hi(!1),$s=Vi;function Su(e,t){var r=e.type.contextTypes;if(!r)return Vi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Dr(e){return e=e.childContextTypes,e!=null}function Vh(){We(Ar),We(rr)}function L5(e,t,r){if(rr.current!==Vi)throw Error(q(168));Ve(rr,t),Ve(Ar,r)}function sT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(q(108,BU(e)||"Unknown",o));return ot({},r,n)}function zh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vi,$s=rr.current,Ve(rr,e),Ve(Ar,Ar.current),!0}function F5(e,t,r){var n=e.stateNode;if(!n)throw Error(q(169));r?(e=sT(e,t,$s),n.__reactInternalMemoizedMergedChildContext=e,We(Ar),We(rr),Ve(rr,e)):We(Ar),Ve(Ar,r)}var Ro=null,um=!1,Eb=!1;function aT(e){Ro===null?Ro=[e]:Ro.push(e)}function eV(e){um=!0,aT(e)}function qi(){if(!Eb&&Ro!==null){Eb=!0;var e=0,t=Me;try{var r=Ro;for(Me=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ro=null,um=!1}catch(o){throw Ro!==null&&(Ro=Ro.slice(e+1)),RC(O1,qi),o}finally{Me=t,Eb=!1}}return null}var du=[],pu=0,Hh=null,qh=0,an=[],un=0,Bs=null,No=1,ko="";function Os(e,t){du[pu++]=qh,du[pu++]=Hh,Hh=e,qh=t}function uT(e,t,r){an[un++]=No,an[un++]=ko,an[un++]=Bs,Bs=e;var n=No;e=ko;var o=32-Nn(n)-1;n&=~(1<<o),r+=1;var i=32-Nn(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,No=1<<32-Nn(t)+o|r<<o|n,ko=i+e}else No=1<<i|r<<o|n,ko=e}function U1(e){e.return!==null&&(Os(e,1),uT(e,1,0))}function j1(e){for(;e===Hh;)Hh=du[--pu],du[pu]=null,qh=du[--pu],du[pu]=null;for(;e===Bs;)Bs=an[--un],an[un]=null,ko=an[--un],an[un]=null,No=an[--un],an[un]=null}var Ur=null,Br=null,Ze=!1,Rn=null;function cT(e,t){var r=cn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function $5(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ur=e,Br=Li(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ur=e,Br=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Bs!==null?{id:No,overflow:ko}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=cn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ur=e,Br=null,!0):!1;default:return!1}}function i1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function s1(e){if(Ze){var t=Br;if(t){var r=t;if(!$5(e,t)){if(i1(e))throw Error(q(418));t=Li(r.nextSibling);var n=Ur;t&&$5(e,t)?cT(n,r):(e.flags=e.flags&-4097|2,Ze=!1,Ur=e)}}else{if(i1(e))throw Error(q(418));e.flags=e.flags&-4097|2,Ze=!1,Ur=e}}}function B5(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ur=e}function vh(e){if(e!==Ur)return!1;if(!Ze)return B5(e),Ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!t1(e.type,e.memoizedProps)),t&&(t=Br)){if(i1(e))throw lT(),Error(q(418));for(;t;)cT(e,t),t=Li(t.nextSibling)}if(B5(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Br=Li(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Br=null}}else Br=Ur?Li(e.stateNode.nextSibling):null;return!0}function lT(){for(var e=Br;e;)e=Li(e.nextSibling)}function Cu(){Br=Ur=null,Ze=!1}function V1(e){Rn===null?Rn=[e]:Rn.push(e)}var tV=Uo.ReactCurrentBatchConfig;function Dn(e,t){if(e&&e.defaultProps){t=ot({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var Kh=Hi(null),Gh=null,hu=null,z1=null;function H1(){z1=hu=Gh=null}function q1(e){var t=Kh.current;We(Kh),e._currentValue=t}function a1(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function xu(e,t){Gh=e,z1=hu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ir=!0),e.firstContext=null)}function fn(e){var t=e._currentValue;if(z1!==e)if(e={context:e,memoizedValue:t,next:null},hu===null){if(Gh===null)throw Error(q(308));hu=e,Gh.dependencies={lanes:0,firstContext:e}}else hu=hu.next=e;return t}var ks=null;function K1(e){ks===null?ks=[e]:ks.push(e)}function fT(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,K1(t)):(r.next=o.next,o.next=r),t.interleaved=r,$o(e,n)}function $o(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ii=!1;function G1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dT(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(De&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,$o(e,r)}return o=n.interleaved,o===null?(t.next=t,K1(n)):(t.next=o.next,o.next=t),n.interleaved=t,$o(e,r)}function Th(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,R1(e,r)}}function U5(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Wh(e,t,r,n){var o=e.updateQueue;Ii=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var f=a,d=f.next;f.next=null,s===null?i=d:s.next=d,s=f;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=d:a.next=d,h.lastBaseUpdate=f))}if(i!==null){var g=o.baseState;s=0,h=d=f=null,a=i;do{var v=a.lane,b=a.eventTime;if((n&v)===v){h!==null&&(h=h.next={eventTime:b,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,_=a;switch(v=t,b=r,_.tag){case 1:if(w=_.payload,typeof w=="function"){g=w.call(b,g,v);break e}g=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=_.payload,v=typeof w=="function"?w.call(b,g,v):w,v==null)break e;g=ot({},g,v);break e;case 2:Ii=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,v=o.effects,v===null?o.effects=[a]:v.push(a))}else b={eventTime:b,lane:v,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(d=h=b,f=g):h=h.next=b,s|=v;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;v=a,a=v.next,v.next=null,o.lastBaseUpdate=v,o.shared.pending=null}}while(1);if(h===null&&(f=g),o.baseState=f,o.firstBaseUpdate=d,o.lastBaseUpdate=h,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);js|=s,e.lanes=s,e.memoizedState=g}}function j5(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(q(191,o));o.call(n)}}}var pT=new fC.Component().refs;function u1(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ot({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var cm={isMounted:function(e){return(e=e._reactInternals)?Hs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=hr(),o=Bi(e),i=Mo(n,o);i.payload=t,r!=null&&(i.callback=r),t=Fi(e,i,o),t!==null&&(kn(t,e,o,n),Th(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=hr(),o=Bi(e),i=Mo(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Fi(e,i,o),t!==null&&(kn(t,e,o,n),Th(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=hr(),n=Bi(e),o=Mo(r,n);o.tag=2,t!=null&&(o.callback=t),t=Fi(e,o,n),t!==null&&(kn(t,e,n,r),Th(t,e,n))}};function V5(e,t,r,n,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!wf(r,n)||!wf(o,i):!0}function hT(e,t,r){var n=!1,o=Vi,i=t.contextType;return typeof i=="object"&&i!==null?i=fn(i):(o=Dr(t)?$s:rr.current,n=t.contextTypes,i=(n=n!=null)?Su(e,o):Vi),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function z5(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&cm.enqueueReplaceState(t,t.state,null)}function c1(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=pT,G1(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=fn(i):(i=Dr(t)?$s:rr.current,o.context=Su(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(u1(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&cm.enqueueReplaceState(o,o.state,null),Wh(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yl(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(q(309));var n=r.stateNode}if(!n)throw Error(q(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;a===pT&&(a=o.refs={}),s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(q(284));if(!r._owner)throw Error(q(290,e))}return e}function bh(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function H5(e){var t=e._init;return t(e._payload)}function mT(e){function t(x,S){if(e){var E=x.deletions;E===null?(x.deletions=[S],x.flags|=16):E.push(S)}}function r(x,S){if(!e)return null;for(;S!==null;)t(x,S),S=S.sibling;return null}function n(x,S){for(x=new Map;S!==null;)S.key!==null?x.set(S.key,S):x.set(S.index,S),S=S.sibling;return x}function o(x,S){return x=Ui(x,S),x.index=0,x.sibling=null,x}function i(x,S,E){return x.index=E,e?(E=x.alternate,E!==null?(E=E.index,E<S?(x.flags|=2,S):E):(x.flags|=2,S)):(x.flags|=1048576,S)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,S,E,T){return S===null||S.tag!==6?(S=Db(E,x.mode,T),S.return=x,S):(S=o(S,E),S.return=x,S)}function f(x,S,E,T){var A=E.type;return A===su?h(x,S,E.props.children,T,E.key):S!==null&&(S.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Pi&&H5(A)===S.type)?(T=o(S,E.props),T.ref=Yl(x,S,E),T.return=x,T):(T=Rh(E.type,E.key,E.props,null,x.mode,T),T.ref=Yl(x,S,E),T.return=x,T)}function d(x,S,E,T){return S===null||S.tag!==4||S.stateNode.containerInfo!==E.containerInfo||S.stateNode.implementation!==E.implementation?(S=Ob(E,x.mode,T),S.return=x,S):(S=o(S,E.children||[]),S.return=x,S)}function h(x,S,E,T,A){return S===null||S.tag!==7?(S=Fs(E,x.mode,T,A),S.return=x,S):(S=o(S,E),S.return=x,S)}function g(x,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Db(""+S,x.mode,E),S.return=x,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case oh:return E=Rh(S.type,S.key,S.props,null,x.mode,E),E.ref=Yl(x,null,S),E.return=x,E;case iu:return S=Ob(S,x.mode,E),S.return=x,S;case Pi:var T=S._init;return g(x,T(S._payload),E)}if(ef(S)||ql(S))return S=Fs(S,x.mode,E,null),S.return=x,S;bh(x,S)}return null}function v(x,S,E,T){var A=S!==null?S.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return A!==null?null:a(x,S,""+E,T);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case oh:return E.key===A?f(x,S,E,T):null;case iu:return E.key===A?d(x,S,E,T):null;case Pi:return A=E._init,v(x,S,A(E._payload),T)}if(ef(E)||ql(E))return A!==null?null:h(x,S,E,T,null);bh(x,E)}return null}function b(x,S,E,T,A){if(typeof T=="string"&&T!==""||typeof T=="number")return x=x.get(E)||null,a(S,x,""+T,A);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case oh:return x=x.get(T.key===null?E:T.key)||null,f(S,x,T,A);case iu:return x=x.get(T.key===null?E:T.key)||null,d(S,x,T,A);case Pi:var O=T._init;return b(x,S,E,O(T._payload),A)}if(ef(T)||ql(T))return x=x.get(E)||null,h(S,x,T,A,null);bh(S,T)}return null}function w(x,S,E,T){for(var A=null,O=null,P=S,I=S=0,R=null;P!==null&&I<E.length;I++){P.index>I?(R=P,P=null):R=P.sibling;var k=v(x,P,E[I],T);if(k===null){P===null&&(P=R);break}e&&P&&k.alternate===null&&t(x,P),S=i(k,S,I),O===null?A=k:O.sibling=k,O=k,P=R}if(I===E.length)return r(x,P),Ze&&Os(x,I),A;if(P===null){for(;I<E.length;I++)P=g(x,E[I],T),P!==null&&(S=i(P,S,I),O===null?A=P:O.sibling=P,O=P);return Ze&&Os(x,I),A}for(P=n(x,P);I<E.length;I++)R=b(P,x,I,E[I],T),R!==null&&(e&&R.alternate!==null&&P.delete(R.key===null?I:R.key),S=i(R,S,I),O===null?A=R:O.sibling=R,O=R);return e&&P.forEach(function(L){return t(x,L)}),Ze&&Os(x,I),A}function _(x,S,E,T){var A=ql(E);if(typeof A!="function")throw Error(q(150));if(E=A.call(E),E==null)throw Error(q(151));for(var O=A=null,P=S,I=S=0,R=null,k=E.next();P!==null&&!k.done;I++,k=E.next()){P.index>I?(R=P,P=null):R=P.sibling;var L=v(x,P,k.value,T);if(L===null){P===null&&(P=R);break}e&&P&&L.alternate===null&&t(x,P),S=i(L,S,I),O===null?A=L:O.sibling=L,O=L,P=R}if(k.done)return r(x,P),Ze&&Os(x,I),A;if(P===null){for(;!k.done;I++,k=E.next())k=g(x,k.value,T),k!==null&&(S=i(k,S,I),O===null?A=k:O.sibling=k,O=k);return Ze&&Os(x,I),A}for(P=n(x,P);!k.done;I++,k=E.next())k=b(P,x,I,k.value,T),k!==null&&(e&&k.alternate!==null&&P.delete(k.key===null?I:k.key),S=i(k,S,I),O===null?A=k:O.sibling=k,O=k);return e&&P.forEach(function(M){return t(x,M)}),Ze&&Os(x,I),A}function C(x,S,E,T){if(typeof E=="object"&&E!==null&&E.type===su&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case oh:e:{for(var A=E.key,O=S;O!==null;){if(O.key===A){if(A=E.type,A===su){if(O.tag===7){r(x,O.sibling),S=o(O,E.props.children),S.return=x,x=S;break e}}else if(O.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Pi&&H5(A)===O.type){r(x,O.sibling),S=o(O,E.props),S.ref=Yl(x,O,E),S.return=x,x=S;break e}r(x,O);break}else t(x,O);O=O.sibling}E.type===su?(S=Fs(E.props.children,x.mode,T,E.key),S.return=x,x=S):(T=Rh(E.type,E.key,E.props,null,x.mode,T),T.ref=Yl(x,S,E),T.return=x,x=T)}return s(x);case iu:e:{for(O=E.key;S!==null;){if(S.key===O)if(S.tag===4&&S.stateNode.containerInfo===E.containerInfo&&S.stateNode.implementation===E.implementation){r(x,S.sibling),S=o(S,E.children||[]),S.return=x,x=S;break e}else{r(x,S);break}else t(x,S);S=S.sibling}S=Ob(E,x.mode,T),S.return=x,x=S}return s(x);case Pi:return O=E._init,C(x,S,O(E._payload),T)}if(ef(E))return w(x,S,E,T);if(ql(E))return _(x,S,E,T);bh(x,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,S!==null&&S.tag===6?(r(x,S.sibling),S=o(S,E),S.return=x,x=S):(r(x,S),S=Db(E,x.mode,T),S.return=x,x=S),s(x)):r(x,S)}return C}var Tu=mT(!0),gT=mT(!1),Nf={},ro=Hi(Nf),Sf=Hi(Nf),Cf=Hi(Nf);function Ms(e){if(e===Nf)throw Error(q(174));return e}function W1(e,t){switch(Ve(Cf,t),Ve(Sf,e),Ve(ro,Nf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jb(t,e)}We(ro),Ve(ro,t)}function Pu(){We(ro),We(Sf),We(Cf)}function yT(e){Ms(Cf.current);var t=Ms(ro.current),r=jb(t,e.type);t!==r&&(Ve(Sf,e),Ve(ro,r))}function Y1(e){Sf.current===e&&(We(ro),We(Sf))}var rt=Hi(0);function Yh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sb=[];function J1(){for(var e=0;e<Sb.length;e++)Sb[e]._workInProgressVersionPrimary=null;Sb.length=0}var Ph=Uo.ReactCurrentDispatcher,Cb=Uo.ReactCurrentBatchConfig,Us=0,nt=null,Pt=null,Mt=null,Jh=!1,cf=!1,Tf=0,rV=0;function Zt(){throw Error(q(321))}function X1(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Mn(e[r],t[r]))return!1;return!0}function Q1(e,t,r,n,o,i){if(Us=i,nt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ph.current=e===null||e.memoizedState===null?sV:aV,e=r(n,o),cf){i=0;do{if(cf=!1,Tf=0,25<=i)throw Error(q(301));i+=1,Mt=Pt=null,t.updateQueue=null,Ph.current=uV,e=r(n,o)}while(cf)}if(Ph.current=Xh,t=Pt!==null&&Pt.next!==null,Us=0,Mt=Pt=nt=null,Jh=!1,t)throw Error(q(300));return e}function Z1(){var e=Tf!==0;return Tf=0,e}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?nt.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function dn(){if(Pt===null){var e=nt.alternate;e=e!==null?e.memoizedState:null}else e=Pt.next;var t=Mt===null?nt.memoizedState:Mt.next;if(t!==null)Mt=t,Pt=e;else{if(e===null)throw Error(q(310));Pt=e,e={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Mt===null?nt.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function Pf(e,t){return typeof t=="function"?t(e):t}function Tb(e){var t=dn(),r=t.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var n=Pt,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var a=s=null,f=null,d=i;do{var h=d.lane;if((Us&h)===h)f!==null&&(f=f.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var g={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};f===null?(a=f=g,s=n):f=f.next=g,nt.lanes|=h,js|=h}d=d.next}while(d!==null&&d!==i);f===null?s=n:f.next=a,Mn(n,t.memoizedState)||(Ir=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=f,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,nt.lanes|=i,js|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Pb(e){var t=dn(),r=t.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Mn(i,t.memoizedState)||(Ir=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function vT(){}function bT(e,t){var r=nt,n=dn(),o=t(),i=!Mn(n.memoizedState,o);if(i&&(n.memoizedState=o,Ir=!0),n=n.queue,ew(_T.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Mt!==null&&Mt.memoizedState.tag&1){if(r.flags|=2048,If(9,xT.bind(null,r,n,o,t),void 0,null),Lt===null)throw Error(q(349));(Us&30)!==0||wT(r,t,o)}return o}function wT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function xT(e,t,r,n){t.value=r,t.getSnapshot=n,ET(t)&&ST(e)}function _T(e,t,r){return r(function(){ET(t)&&ST(e)})}function ET(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Mn(e,r)}catch{return!0}}function ST(e){var t=$o(e,1);t!==null&&kn(t,e,1,-1)}function q5(e){var t=Zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pf,lastRenderedState:e},t.queue=e,e=e.dispatch=iV.bind(null,nt,e),[t.memoizedState,e]}function If(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function CT(){return dn().memoizedState}function Ih(e,t,r,n){var o=Zn();nt.flags|=e,o.memoizedState=If(1|t,r,void 0,n===void 0?null:n)}function lm(e,t,r,n){var o=dn();n=n===void 0?null:n;var i=void 0;if(Pt!==null){var s=Pt.memoizedState;if(i=s.destroy,n!==null&&X1(n,s.deps)){o.memoizedState=If(t,r,i,n);return}}nt.flags|=e,o.memoizedState=If(1|t,r,i,n)}function K5(e,t){return Ih(8390656,8,e,t)}function ew(e,t){return lm(2048,8,e,t)}function TT(e,t){return lm(4,2,e,t)}function PT(e,t){return lm(4,4,e,t)}function IT(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function AT(e,t,r){return r=r!=null?r.concat([e]):null,lm(4,4,IT.bind(null,t,e),r)}function tw(){}function DT(e,t){var r=dn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&X1(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function OT(e,t){var r=dn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&X1(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function RT(e,t,r){return(Us&21)===0?(e.baseState&&(e.baseState=!1,Ir=!0),e.memoizedState=r):(Mn(r,t)||(r=MC(),nt.lanes|=r,js|=r,e.baseState=!0),t)}function nV(e,t){var r=Me;Me=r!==0&&4>r?r:4,e(!0);var n=Cb.transition;Cb.transition={};try{e(!1),t()}finally{Me=r,Cb.transition=n}}function NT(){return dn().memoizedState}function oV(e,t,r){var n=Bi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},kT(e))MT(t,r);else if(r=fT(e,t,r,n),r!==null){var o=hr();kn(r,e,n,o),LT(r,t,n)}}function iV(e,t,r){var n=Bi(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(kT(e))MT(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,Mn(a,s)){var f=t.interleaved;f===null?(o.next=o,K1(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}r=fT(e,t,o,n),r!==null&&(o=hr(),kn(r,e,n,o),LT(r,t,n))}}function kT(e){var t=e.alternate;return e===nt||t!==null&&t===nt}function MT(e,t){cf=Jh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function LT(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,R1(e,r)}}var Xh={readContext:fn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},sV={readContext:fn,useCallback:function(e,t){return Zn().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:K5,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ih(4194308,4,IT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ih(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ih(4,2,e,t)},useMemo:function(e,t){var r=Zn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Zn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=oV.bind(null,nt,e),[n.memoizedState,e]},useRef:function(e){var t=Zn();return e={current:e},t.memoizedState=e},useState:q5,useDebugValue:tw,useDeferredValue:function(e){return Zn().memoizedState=e},useTransition:function(){var e=q5(!1),t=e[0];return e=nV.bind(null,e[1]),Zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=nt,o=Zn();if(Ze){if(r===void 0)throw Error(q(407));r=r()}else{if(r=t(),Lt===null)throw Error(q(349));(Us&30)!==0||wT(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,K5(_T.bind(null,n,i,e),[e]),n.flags|=2048,If(9,xT.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Zn(),t=Lt.identifierPrefix;if(Ze){var r=ko,n=No;r=(n&~(1<<32-Nn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Tf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=rV++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},aV={readContext:fn,useCallback:DT,useContext:fn,useEffect:ew,useImperativeHandle:AT,useInsertionEffect:TT,useLayoutEffect:PT,useMemo:OT,useReducer:Tb,useRef:CT,useState:function(){return Tb(Pf)},useDebugValue:tw,useDeferredValue:function(e){var t=dn();return RT(t,Pt.memoizedState,e)},useTransition:function(){var e=Tb(Pf)[0],t=dn().memoizedState;return[e,t]},useMutableSource:vT,useSyncExternalStore:bT,useId:NT,unstable_isNewReconciler:!1},uV={readContext:fn,useCallback:DT,useContext:fn,useEffect:ew,useImperativeHandle:AT,useInsertionEffect:TT,useLayoutEffect:PT,useMemo:OT,useReducer:Pb,useRef:CT,useState:function(){return Pb(Pf)},useDebugValue:tw,useDeferredValue:function(e){var t=dn();return Pt===null?t.memoizedState=e:RT(t,Pt.memoizedState,e)},useTransition:function(){var e=Pb(Pf)[0],t=dn().memoizedState;return[e,t]},useMutableSource:vT,useSyncExternalStore:bT,useId:NT,unstable_isNewReconciler:!1};function Iu(e,t){try{var r="",n=t;do r+=$U(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ib(e,t,r){return{value:e,source:null,stack:r!=null?r:null,digest:t!=null?t:null}}function l1(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var cV=typeof WeakMap=="function"?WeakMap:Map;function FT(e,t,r){r=Mo(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Zh||(Zh=!0,w1=n),l1(e,t)},r}function $T(e,t,r){r=Mo(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){l1(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){l1(e,t),typeof n!="function"&&($i===null?$i=new Set([this]):$i.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function G5(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new cV;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=EV.bind(null,e,t,r),t.then(e,e))}function W5(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Y5(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Mo(-1,1),t.tag=2,Fi(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var lV=Uo.ReactCurrentOwner,Ir=!1;function pr(e,t,r,n){t.child=e===null?gT(t,null,r,n):Tu(t,e.child,r,n)}function J5(e,t,r,n,o){r=r.render;var i=t.ref;return xu(t,o),n=Q1(e,t,r,n,i,o),r=Z1(),e!==null&&!Ir?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Bo(e,t,o)):(Ze&&r&&U1(t),t.flags|=1,pr(e,t,n,o),t.child)}function X5(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!cw(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,BT(e,t,i,n,o)):(e=Rh(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:wf,r(s,n)&&e.ref===t.ref)return Bo(e,t,o)}return t.flags|=1,e=Ui(i,n),e.ref=t.ref,e.return=t,t.child=e}function BT(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(wf(i,n)&&e.ref===t.ref)if(Ir=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Ir=!0);else return t.lanes=e.lanes,Bo(e,t,o)}return f1(e,t,r,n,o)}function UT(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ve(gu,$r),$r|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ve(gu,$r),$r|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Ve(gu,$r),$r|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Ve(gu,$r),$r|=n;return pr(e,t,o,r),t.child}function jT(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function f1(e,t,r,n,o){var i=Dr(r)?$s:rr.current;return i=Su(t,i),xu(t,o),r=Q1(e,t,r,n,i,o),n=Z1(),e!==null&&!Ir?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Bo(e,t,o)):(Ze&&n&&U1(t),t.flags|=1,pr(e,t,r,o),t.child)}function Q5(e,t,r,n,o){if(Dr(r)){var i=!0;zh(t)}else i=!1;if(xu(t,o),t.stateNode===null)Ah(e,t),hT(t,r,n),c1(t,r,n,o),n=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var f=s.context,d=r.contextType;typeof d=="object"&&d!==null?d=fn(d):(d=Dr(r)?$s:rr.current,d=Su(t,d));var h=r.getDerivedStateFromProps,g=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";g||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||f!==d)&&z5(t,s,n,d),Ii=!1;var v=t.memoizedState;s.state=v,Wh(t,n,s,o),f=t.memoizedState,a!==n||v!==f||Ar.current||Ii?(typeof h=="function"&&(u1(t,r,h,n),f=t.memoizedState),(a=Ii||V5(t,r,a,n,v,f,d))?(g||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=f),s.props=n,s.state=f,s.context=d,n=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,dT(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Dn(t.type,a),s.props=d,g=t.pendingProps,v=s.context,f=r.contextType,typeof f=="object"&&f!==null?f=fn(f):(f=Dr(r)?$s:rr.current,f=Su(t,f));var b=r.getDerivedStateFromProps;(h=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==g||v!==f)&&z5(t,s,n,f),Ii=!1,v=t.memoizedState,s.state=v,Wh(t,n,s,o);var w=t.memoizedState;a!==g||v!==w||Ar.current||Ii?(typeof b=="function"&&(u1(t,r,b,n),w=t.memoizedState),(d=Ii||V5(t,r,d,n,v,w,f)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,w,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,w,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),s.props=n,s.state=w,s.context=f,n=d):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),n=!1)}return d1(e,t,r,n,i,o)}function d1(e,t,r,n,o,i){jT(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&F5(t,r,!1),Bo(e,t,i);n=t.stateNode,lV.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Tu(t,e.child,null,i),t.child=Tu(t,null,a,i)):pr(e,t,a,i),t.memoizedState=n.state,o&&F5(t,r,!0),t.child}function VT(e){var t=e.stateNode;t.pendingContext?L5(e,t.pendingContext,t.pendingContext!==t.context):t.context&&L5(e,t.context,!1),W1(e,t.containerInfo)}function Z5(e,t,r,n,o){return Cu(),V1(o),t.flags|=256,pr(e,t,r,n),t.child}var p1={dehydrated:null,treeContext:null,retryLane:0};function h1(e){return{baseLanes:e,cachePool:null,transitions:null}}function zT(e,t,r){var n=t.pendingProps,o=rt.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ve(rt,o&1),e===null)return s1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=pm(s,n,0,null),e=Fs(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=h1(r),t.memoizedState=p1,e):rw(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return fV(e,t,s,n,a,o,r);if(i){i=n.fallback,s=t.mode,o=e.child,a=o.sibling;var f={mode:"hidden",children:n.children};return(s&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=f,t.deletions=null):(n=Ui(o,f),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Ui(a,i):(i=Fs(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?h1(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=p1,n}return i=e.child,e=i.sibling,n=Ui(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function rw(e,t){return t=pm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wh(e,t,r,n){return n!==null&&V1(n),Tu(t,e.child,null,r),e=rw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fV(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Ib(Error(q(422))),wh(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=pm({mode:"visible",children:n.children},o,0,null),i=Fs(i,o,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&Tu(t,e.child,null,s),t.child.memoizedState=h1(s),t.memoizedState=p1,i);if((t.mode&1)===0)return wh(e,t,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(q(419)),n=Ib(i,n,void 0),wh(e,t,s,n)}if(a=(s&e.childLanes)!==0,Ir||a){if(n=Lt,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,$o(e,o),kn(n,e,o,-1))}return uw(),n=Ib(Error(q(421))),wh(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=SV.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Br=Li(o.nextSibling),Ur=t,Ze=!0,Rn=null,e!==null&&(an[un++]=No,an[un++]=ko,an[un++]=Bs,No=e.id,ko=e.overflow,Bs=t),t=rw(t,n.children),t.flags|=4096,t)}function eC(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),a1(e.return,t,r)}function Ab(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function HT(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(pr(e,t,n.children,r),n=rt.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&eC(e,r,t);else if(e.tag===19)eC(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ve(rt,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Yh(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ab(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Yh(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ab(t,!0,r,null,i);break;case"together":Ab(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ah(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Bo(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),js|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,r=Ui(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ui(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dV(e,t,r){switch(t.tag){case 3:VT(t),Cu();break;case 5:yT(t);break;case 1:Dr(t.type)&&zh(t);break;case 4:W1(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Ve(Kh,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ve(rt,rt.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?zT(e,t,r):(Ve(rt,rt.current&1),e=Bo(e,t,r),e!==null?e.sibling:null);Ve(rt,rt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return HT(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ve(rt,rt.current),n)break;return null;case 22:case 23:return t.lanes=0,UT(e,t,r)}return Bo(e,t,r)}var qT,m1,KT,GT;qT=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};m1=function(){};KT=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Ms(ro.current);var i=null;switch(r){case"input":o=Fb(e,o),n=Fb(e,n),i=[];break;case"select":o=ot({},o,{value:void 0}),n=ot({},n,{value:void 0}),i=[];break;case"textarea":o=Ub(e,o),n=Ub(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=jh)}Vb(r,n);var s;r=null;for(d in o)if(!n.hasOwnProperty(d)&&o.hasOwnProperty(d)&&o[d]!=null)if(d==="style"){var a=o[d];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(pf.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in n){var f=n[d];if(a=o!=null?o[d]:void 0,n.hasOwnProperty(d)&&f!==a&&(f!=null||a!=null))if(d==="style")if(a){for(s in a)!a.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in f)f.hasOwnProperty(s)&&a[s]!==f[s]&&(r||(r={}),r[s]=f[s])}else r||(i||(i=[]),i.push(d,r)),r=f;else d==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,a=a?a.__html:void 0,f!=null&&a!==f&&(i=i||[]).push(d,f)):d==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(d,""+f):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(pf.hasOwnProperty(d)?(f!=null&&d==="onScroll"&&Ge("scroll",e),i||a===f||(i=[])):(i=i||[]).push(d,f))}r&&(i=i||[]).push("style",r);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};GT=function(e,t,r,n){r!==n&&(t.flags|=4)};function Jl(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function er(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function pV(e,t,r){var n=t.pendingProps;switch(j1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(t),null;case 1:return Dr(t.type)&&Vh(),er(t),null;case 3:return n=t.stateNode,Pu(),We(Ar),We(rr),J1(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(vh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Rn!==null&&(E1(Rn),Rn=null))),m1(e,t),er(t),null;case 5:Y1(t);var o=Ms(Cf.current);if(r=t.type,e!==null&&t.stateNode!=null)KT(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(q(166));return er(t),null}if(e=Ms(ro.current),vh(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[eo]=t,n[Ef]=i,e=(t.mode&1)!==0,r){case"dialog":Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":case"embed":Ge("load",n);break;case"video":case"audio":for(o=0;o<rf.length;o++)Ge(rf[o],n);break;case"source":Ge("error",n);break;case"img":case"image":case"link":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"input":u5(n,i),Ge("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ge("invalid",n);break;case"textarea":l5(n,i),Ge("invalid",n)}Vb(r,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&yh(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&yh(n.textContent,a,e),o=["children",""+a]):pf.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ge("scroll",n)}switch(r){case"input":ih(n),c5(n,i,!0);break;case"textarea":ih(n),f5(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=jh)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[eo]=t,e[Ef]=n,qT(e,t,!1,!1),t.stateNode=e;e:{switch(s=zb(r,n),r){case"dialog":Ge("cancel",e),Ge("close",e),o=n;break;case"iframe":case"object":case"embed":Ge("load",e),o=n;break;case"video":case"audio":for(o=0;o<rf.length;o++)Ge(rf[o],e);o=n;break;case"source":Ge("error",e),o=n;break;case"img":case"image":case"link":Ge("error",e),Ge("load",e),o=n;break;case"details":Ge("toggle",e),o=n;break;case"input":u5(e,n),o=Fb(e,n),Ge("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=ot({},n,{value:void 0}),Ge("invalid",e);break;case"textarea":l5(e,n),o=Ub(e,n),Ge("invalid",e);break;default:o=n}Vb(r,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];i==="style"?EC(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&xC(e,f)):i==="children"?typeof f=="string"?(r!=="textarea"||f!=="")&&hf(e,f):typeof f=="number"&&hf(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(pf.hasOwnProperty(i)?f!=null&&i==="onScroll"&&Ge("scroll",e):f!=null&&T1(e,i,f,s))}switch(r){case"input":ih(e),c5(e,n,!1);break;case"textarea":ih(e),f5(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ji(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?yu(e,!!n.multiple,i,!1):n.defaultValue!=null&&yu(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=jh)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return er(t),null;case 6:if(e&&t.stateNode!=null)GT(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(q(166));if(r=Ms(Cf.current),Ms(ro.current),vh(t)){if(n=t.stateNode,r=t.memoizedProps,n[eo]=t,(i=n.nodeValue!==r)&&(e=Ur,e!==null))switch(e.tag){case 3:yh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yh(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[eo]=t,t.stateNode=n}return er(t),null;case 13:if(We(rt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ze&&Br!==null&&(t.mode&1)!==0&&(t.flags&128)===0)lT(),Cu(),t.flags|=98560,i=!1;else if(i=vh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(q(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(q(317));i[eo]=t}else Cu(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;er(t),i=!1}else Rn!==null&&(E1(Rn),Rn=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(rt.current&1)!==0?It===0&&(It=3):uw())),t.updateQueue!==null&&(t.flags|=4),er(t),null);case 4:return Pu(),m1(e,t),e===null&&xf(t.stateNode.containerInfo),er(t),null;case 10:return q1(t.type._context),er(t),null;case 17:return Dr(t.type)&&Vh(),er(t),null;case 19:if(We(rt),i=t.memoizedState,i===null)return er(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Jl(i,!1);else{if(It!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Yh(e),s!==null){for(t.flags|=128,Jl(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ve(rt,rt.current&1|2),t.child}e=e.sibling}i.tail!==null&&ht()>Au&&(t.flags|=128,n=!0,Jl(i,!1),t.lanes=4194304)}else{if(!n)if(e=Yh(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Jl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ze)return er(t),null}else 2*ht()-i.renderingStartTime>Au&&r!==1073741824&&(t.flags|=128,n=!0,Jl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ht(),t.sibling=null,r=rt.current,Ve(rt,n?r&1|2:r&1),t):(er(t),null);case 22:case 23:return aw(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?($r&1073741824)!==0&&(er(t),t.subtreeFlags&6&&(t.flags|=8192)):er(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function hV(e,t){switch(j1(t),t.tag){case 1:return Dr(t.type)&&Vh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pu(),We(Ar),We(rr),J1(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Y1(t),null;case 13:if(We(rt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Cu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return We(rt),null;case 4:return Pu(),null;case 10:return q1(t.type._context),null;case 22:case 23:return aw(),null;case 24:return null;default:return null}}var xh=!1,tr=!1,mV=typeof WeakSet=="function"?WeakSet:Set,Q=null;function mu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ct(e,t,n)}else r.current=null}function g1(e,t,r){try{r()}catch(n){ct(e,t,n)}}var tC=!1;function gV(e,t){if(Zb=$h,e=XC(),B1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,f=-1,d=0,h=0,g=e,v=null;t:for(;;){for(var b;g!==r||o!==0&&g.nodeType!==3||(a=s+o),g!==i||n!==0&&g.nodeType!==3||(f=s+n),g.nodeType===3&&(s+=g.nodeValue.length),(b=g.firstChild)!==null;)v=g,g=b;for(;;){if(g===e)break t;if(v===r&&++d===o&&(a=s),v===i&&++h===n&&(f=s),(b=g.nextSibling)!==null)break;g=v,v=g.parentNode}g=b}r=a===-1||f===-1?null:{start:a,end:f}}else r=null}r=r||{start:0,end:0}}else r=null;for(e1={focusedElem:e,selectionRange:r},$h=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var w=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var _=w.memoizedProps,C=w.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?_:Dn(t.type,_),C);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(T){ct(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return w=tC,tC=!1,w}function lf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&g1(t,r,i)}o=o.next}while(o!==n)}}function fm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function y1(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function WT(e){var t=e.alternate;t!==null&&(e.alternate=null,WT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Ef],delete t[n1],delete t[Qj],delete t[Zj])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YT(e){return e.tag===5||e.tag===3||e.tag===4}function rC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YT(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function v1(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=jh));else if(n!==4&&(e=e.child,e!==null))for(v1(e,t,r),e=e.sibling;e!==null;)v1(e,t,r),e=e.sibling}function b1(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(b1(e,t,r),e=e.sibling;e!==null;)b1(e,t,r),e=e.sibling}var Ht=null,On=!1;function Ti(e,t,r){for(r=r.child;r!==null;)JT(e,t,r),r=r.sibling}function JT(e,t,r){if(to&&typeof to.onCommitFiberUnmount=="function")try{to.onCommitFiberUnmount(nm,r)}catch{}switch(r.tag){case 5:tr||mu(r,t);case 6:var n=Ht,o=On;Ht=null,Ti(e,t,r),Ht=n,On=o,Ht!==null&&(On?(e=Ht,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ht.removeChild(r.stateNode));break;case 18:Ht!==null&&(On?(e=Ht,r=r.stateNode,e.nodeType===8?_b(e.parentNode,r):e.nodeType===1&&_b(e,r),vf(e)):_b(Ht,r.stateNode));break;case 4:n=Ht,o=On,Ht=r.stateNode.containerInfo,On=!0,Ti(e,t,r),Ht=n,On=o;break;case 0:case 11:case 14:case 15:if(!tr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&g1(r,t,s),o=o.next}while(o!==n)}Ti(e,t,r);break;case 1:if(!tr&&(mu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ct(r,t,a)}Ti(e,t,r);break;case 21:Ti(e,t,r);break;case 22:r.mode&1?(tr=(n=tr)||r.memoizedState!==null,Ti(e,t,r),tr=n):Ti(e,t,r);break;default:Ti(e,t,r)}}function nC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new mV),t.forEach(function(n){var o=CV.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function An(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Ht=a.stateNode,On=!1;break e;case 3:Ht=a.stateNode.containerInfo,On=!0;break e;case 4:Ht=a.stateNode.containerInfo,On=!0;break e}a=a.return}if(Ht===null)throw Error(q(160));JT(i,s,o),Ht=null,On=!1;var f=o.alternate;f!==null&&(f.return=null),o.return=null}catch(d){ct(o,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)XT(t,e),t=t.sibling}function XT(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(An(t,e),Qn(e),n&4){try{lf(3,e,e.return),fm(3,e)}catch(_){ct(e,e.return,_)}try{lf(5,e,e.return)}catch(_){ct(e,e.return,_)}}break;case 1:An(t,e),Qn(e),n&512&&r!==null&&mu(r,r.return);break;case 5:if(An(t,e),Qn(e),n&512&&r!==null&&mu(r,r.return),e.flags&32){var o=e.stateNode;try{hf(o,"")}catch(_){ct(e,e.return,_)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,a=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&vC(o,i),zb(a,s);var d=zb(a,i);for(s=0;s<f.length;s+=2){var h=f[s],g=f[s+1];h==="style"?EC(o,g):h==="dangerouslySetInnerHTML"?xC(o,g):h==="children"?hf(o,g):T1(o,h,g,d)}switch(a){case"input":$b(o,i);break;case"textarea":bC(o,i);break;case"select":var v=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var b=i.value;b!=null?yu(o,!!i.multiple,b,!1):v!==!!i.multiple&&(i.defaultValue!=null?yu(o,!!i.multiple,i.defaultValue,!0):yu(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ef]=i}catch(_){ct(e,e.return,_)}}break;case 6:if(An(t,e),Qn(e),n&4){if(e.stateNode===null)throw Error(q(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(_){ct(e,e.return,_)}}break;case 3:if(An(t,e),Qn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{vf(t.containerInfo)}catch(_){ct(e,e.return,_)}break;case 4:An(t,e),Qn(e);break;case 13:An(t,e),Qn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(iw=ht())),n&4&&nC(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(tr=(d=tr)||h,An(t,e),tr=d):An(t,e),Qn(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&(e.mode&1)!==0)for(Q=e,h=e.child;h!==null;){for(g=Q=h;Q!==null;){switch(v=Q,b=v.child,v.tag){case 0:case 11:case 14:case 15:lf(4,v,v.return);break;case 1:mu(v,v.return);var w=v.stateNode;if(typeof w.componentWillUnmount=="function"){n=v,r=v.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(_){ct(n,r,_)}}break;case 5:mu(v,v.return);break;case 22:if(v.memoizedState!==null){iC(g);continue}}b!==null?(b.return=v,Q=b):iC(g)}h=h.sibling}e:for(h=null,g=e;;){if(g.tag===5){if(h===null){h=g;try{o=g.stateNode,d?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=g.stateNode,f=g.memoizedProps.style,s=f!=null&&f.hasOwnProperty("display")?f.display:null,a.style.display=_C("display",s))}catch(_){ct(e,e.return,_)}}}else if(g.tag===6){if(h===null)try{g.stateNode.nodeValue=d?"":g.memoizedProps}catch(_){ct(e,e.return,_)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;h===g&&(h=null),g=g.return}h===g&&(h=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:An(t,e),Qn(e),n&4&&nC(e);break;case 21:break;default:An(t,e),Qn(e)}}function Qn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(YT(r)){var n=r;break e}r=r.return}throw Error(q(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(hf(o,""),n.flags&=-33);var i=rC(e);b1(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=rC(e);v1(e,a,s);break;default:throw Error(q(161))}}catch(f){ct(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yV(e,t,r){Q=e,QT(e,t,r)}function QT(e,t,r){for(var n=(e.mode&1)!==0;Q!==null;){var o=Q,i=o.child;if(o.tag===22&&n){var s=o.memoizedState!==null||xh;if(!s){var a=o.alternate,f=a!==null&&a.memoizedState!==null||tr;a=xh;var d=tr;if(xh=s,(tr=f)&&!d)for(Q=o;Q!==null;)s=Q,f=s.child,s.tag===22&&s.memoizedState!==null?sC(o):f!==null?(f.return=s,Q=f):sC(o);for(;i!==null;)Q=i,QT(i,t,r),i=i.sibling;Q=o,xh=a,tr=d}oC(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,Q=i):oC(e,t,r)}}function oC(e){for(;Q!==null;){var t=Q;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:tr||fm(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!tr)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Dn(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&j5(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}j5(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&r.focus();break;case"img":f.src&&(r.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var g=h.dehydrated;g!==null&&vf(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}tr||t.flags&512&&y1(t)}catch(v){ct(t,t.return,v)}}if(t===e){Q=null;break}if(r=t.sibling,r!==null){r.return=t.return,Q=r;break}Q=t.return}}function iC(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Q=r;break}Q=t.return}}function sC(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{fm(4,t)}catch(f){ct(t,r,f)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(f){ct(t,o,f)}}var i=t.return;try{y1(t)}catch(f){ct(t,i,f)}break;case 5:var s=t.return;try{y1(t)}catch(f){ct(t,s,f)}}}catch(f){ct(t,t.return,f)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var vV=Math.ceil,Qh=Uo.ReactCurrentDispatcher,nw=Uo.ReactCurrentOwner,ln=Uo.ReactCurrentBatchConfig,De=0,Lt=null,bt=null,qt=0,$r=0,gu=Hi(0),It=0,Af=null,js=0,dm=0,ow=0,ff=null,Pr=null,iw=0,Au=1/0,Oo=null,Zh=!1,w1=null,$i=null,_h=!1,Ri=null,em=0,df=0,x1=null,Dh=-1,Oh=0;function hr(){return(De&6)!==0?ht():Dh!==-1?Dh:Dh=ht()}function Bi(e){return(e.mode&1)===0?1:(De&2)!==0&&qt!==0?qt&-qt:tV.transition!==null?(Oh===0&&(Oh=MC()),Oh):(e=Me,e!==0||(e=window.event,e=e===void 0?16:VC(e.type)),e)}function kn(e,t,r,n){if(50<df)throw df=0,x1=null,Error(q(185));Df(e,r,n),((De&2)===0||e!==Lt)&&(e===Lt&&((De&2)===0&&(dm|=r),It===4&&Di(e,qt)),Or(e,n),r===1&&De===0&&(t.mode&1)===0&&(Au=ht()+500,um&&qi()))}function Or(e,t){var r=e.callbackNode;nj(e,t);var n=Fh(e,e===Lt?qt:0);if(n===0)r!==null&&h5(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&h5(r),t===1)e.tag===0?eV(aC.bind(null,e)):aT(aC.bind(null,e)),Jj(function(){(De&6)===0&&qi()}),r=null;else{switch(LC(n)){case 1:r=O1;break;case 4:r=NC;break;case 16:r=Lh;break;case 536870912:r=kC;break;default:r=Lh}r=sP(r,ZT.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function ZT(e,t){if(Dh=-1,Oh=0,(De&6)!==0)throw Error(q(327));var r=e.callbackNode;if(_u()&&e.callbackNode!==r)return null;var n=Fh(e,e===Lt?qt:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=tm(e,n);else{t=n;var o=De;De|=2;var i=tP();(Lt!==e||qt!==t)&&(Oo=null,Au=ht()+500,Ls(e,t));do try{xV();break}catch(a){eP(e,a)}while(1);H1(),Qh.current=i,De=o,bt!==null?t=0:(Lt=null,qt=0,t=It)}if(t!==0){if(t===2&&(o=Wb(e),o!==0&&(n=o,t=_1(e,o))),t===1)throw r=Af,Ls(e,0),Di(e,n),Or(e,ht()),r;if(t===6)Di(e,n);else{if(o=e.current.alternate,(n&30)===0&&!bV(o)&&(t=tm(e,n),t===2&&(i=Wb(e),i!==0&&(n=i,t=_1(e,i))),t===1))throw r=Af,Ls(e,0),Di(e,n),Or(e,ht()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(q(345));case 2:Rs(e,Pr,Oo);break;case 3:if(Di(e,n),(n&130023424)===n&&(t=iw+500-ht(),10<t)){if(Fh(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){hr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=r1(Rs.bind(null,e,Pr,Oo),t);break}Rs(e,Pr,Oo);break;case 4:if(Di(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Nn(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=ht()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vV(n/1960))-n,10<n){e.timeoutHandle=r1(Rs.bind(null,e,Pr,Oo),n);break}Rs(e,Pr,Oo);break;case 5:Rs(e,Pr,Oo);break;default:throw Error(q(329))}}}return Or(e,ht()),e.callbackNode===r?ZT.bind(null,e):null}function _1(e,t){var r=ff;return e.current.memoizedState.isDehydrated&&(Ls(e,t).flags|=256),e=tm(e,t),e!==2&&(t=Pr,Pr=r,t!==null&&E1(t)),e}function E1(e){Pr===null?Pr=e:Pr.push.apply(Pr,e)}function bV(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Mn(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Di(e,t){for(t&=~ow,t&=~dm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Nn(t),n=1<<r;e[r]=-1,t&=~n}}function aC(e){if((De&6)!==0)throw Error(q(327));_u();var t=Fh(e,0);if((t&1)===0)return Or(e,ht()),null;var r=tm(e,t);if(e.tag!==0&&r===2){var n=Wb(e);n!==0&&(t=n,r=_1(e,n))}if(r===1)throw r=Af,Ls(e,0),Di(e,t),Or(e,ht()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rs(e,Pr,Oo),Or(e,ht()),null}function sw(e,t){var r=De;De|=1;try{return e(t)}finally{De=r,De===0&&(Au=ht()+500,um&&qi())}}function Vs(e){Ri!==null&&Ri.tag===0&&(De&6)===0&&_u();var t=De;De|=1;var r=ln.transition,n=Me;try{if(ln.transition=null,Me=1,e)return e()}finally{Me=n,ln.transition=r,De=t,(De&6)===0&&qi()}}function aw(){$r=gu.current,We(gu)}function Ls(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Yj(r)),bt!==null)for(r=bt.return;r!==null;){var n=r;switch(j1(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Vh();break;case 3:Pu(),We(Ar),We(rr),J1();break;case 5:Y1(n);break;case 4:Pu();break;case 13:We(rt);break;case 19:We(rt);break;case 10:q1(n.type._context);break;case 22:case 23:aw()}r=r.return}if(Lt=e,bt=e=Ui(e.current,null),qt=$r=t,It=0,Af=null,ow=dm=js=0,Pr=ff=null,ks!==null){for(t=0;t<ks.length;t++)if(r=ks[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=o,n.next=s}r.pending=n}ks=null}return e}function eP(e,t){do{var r=bt;try{if(H1(),Ph.current=Xh,Jh){for(var n=nt.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Jh=!1}if(Us=0,Mt=Pt=nt=null,cf=!1,Tf=0,nw.current=null,r===null||r.return===null){It=1,Af=t,bt=null;break}e:{var i=e,s=r.return,a=r,f=t;if(t=qt,a.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var d=f,h=a,g=h.tag;if((h.mode&1)===0&&(g===0||g===11||g===15)){var v=h.alternate;v?(h.updateQueue=v.updateQueue,h.memoizedState=v.memoizedState,h.lanes=v.lanes):(h.updateQueue=null,h.memoizedState=null)}var b=W5(s);if(b!==null){b.flags&=-257,Y5(b,s,a,i,t),b.mode&1&&G5(i,d,t),t=b,f=d;var w=t.updateQueue;if(w===null){var _=new Set;_.add(f),t.updateQueue=_}else w.add(f);break e}else{if((t&1)===0){G5(i,d,t),uw();break e}f=Error(q(426))}}else if(Ze&&a.mode&1){var C=W5(s);if(C!==null){(C.flags&65536)===0&&(C.flags|=256),Y5(C,s,a,i,t),V1(Iu(f,a));break e}}i=f=Iu(f,a),It!==4&&(It=2),ff===null?ff=[i]:ff.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=FT(i,f,t);U5(i,x);break e;case 1:a=f;var S=i.type,E=i.stateNode;if((i.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&($i===null||!$i.has(E)))){i.flags|=65536,t&=-t,i.lanes|=t;var T=$T(i,a,t);U5(i,T);break e}}i=i.return}while(i!==null)}nP(r)}catch(A){t=A,bt===r&&r!==null&&(bt=r=r.return);continue}break}while(1)}function tP(){var e=Qh.current;return Qh.current=Xh,e===null?Xh:e}function uw(){(It===0||It===3||It===2)&&(It=4),Lt===null||(js&268435455)===0&&(dm&268435455)===0||Di(Lt,qt)}function tm(e,t){var r=De;De|=2;var n=tP();(Lt!==e||qt!==t)&&(Oo=null,Ls(e,t));do try{wV();break}catch(o){eP(e,o)}while(1);if(H1(),De=r,Qh.current=n,bt!==null)throw Error(q(261));return Lt=null,qt=0,It}function wV(){for(;bt!==null;)rP(bt)}function xV(){for(;bt!==null&&!WU();)rP(bt)}function rP(e){var t=iP(e.alternate,e,$r);e.memoizedProps=e.pendingProps,t===null?nP(e):bt=t,nw.current=null}function nP(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=pV(r,t,$r),r!==null){bt=r;return}}else{if(r=hV(r,t),r!==null){r.flags&=32767,bt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,bt=null;return}}if(t=t.sibling,t!==null){bt=t;return}bt=t=e}while(t!==null);It===0&&(It=5)}function Rs(e,t,r){var n=Me,o=ln.transition;try{ln.transition=null,Me=1,_V(e,t,r,n)}finally{ln.transition=o,Me=n}return null}function _V(e,t,r,n){do _u();while(Ri!==null);if((De&6)!==0)throw Error(q(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(oj(e,i),e===Lt&&(bt=Lt=null,qt=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||_h||(_h=!0,sP(Lh,function(){return _u(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=ln.transition,ln.transition=null;var s=Me;Me=1;var a=De;De|=4,nw.current=null,gV(e,r),XT(r,e),Hj(e1),$h=!!Zb,e1=Zb=null,e.current=r,yV(r,e,o),YU(),De=a,Me=s,ln.transition=i}else e.current=r;if(_h&&(_h=!1,Ri=e,em=o),i=e.pendingLanes,i===0&&($i=null),QU(r.stateNode,n),Or(e,ht()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(Zh)throw Zh=!1,e=w1,w1=null,e;return(em&1)!==0&&e.tag!==0&&_u(),i=e.pendingLanes,(i&1)!==0?e===x1?df++:(df=0,x1=e):df=0,qi(),null}function _u(){if(Ri!==null){var e=LC(em),t=ln.transition,r=Me;try{if(ln.transition=null,Me=16>e?16:e,Ri===null)var n=!1;else{if(e=Ri,Ri=null,em=0,(De&6)!==0)throw Error(q(331));var o=De;for(De|=4,Q=e.current;Q!==null;){var i=Q,s=i.child;if((Q.flags&16)!==0){var a=i.deletions;if(a!==null){for(var f=0;f<a.length;f++){var d=a[f];for(Q=d;Q!==null;){var h=Q;switch(h.tag){case 0:case 11:case 15:lf(8,h,i)}var g=h.child;if(g!==null)g.return=h,Q=g;else for(;Q!==null;){h=Q;var v=h.sibling,b=h.return;if(WT(h),h===d){Q=null;break}if(v!==null){v.return=b,Q=v;break}Q=b}}}var w=i.alternate;if(w!==null){var _=w.child;if(_!==null){w.child=null;do{var C=_.sibling;_.sibling=null,_=C}while(_!==null)}}Q=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,Q=s;else e:for(;Q!==null;){if(i=Q,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:lf(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,Q=x;break e}Q=i.return}}var S=e.current;for(Q=S;Q!==null;){s=Q;var E=s.child;if((s.subtreeFlags&2064)!==0&&E!==null)E.return=s,Q=E;else e:for(s=S;Q!==null;){if(a=Q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:fm(9,a)}}catch(A){ct(a,a.return,A)}if(a===s){Q=null;break e}var T=a.sibling;if(T!==null){T.return=a.return,Q=T;break e}Q=a.return}}if(De=o,qi(),to&&typeof to.onPostCommitFiberRoot=="function")try{to.onPostCommitFiberRoot(nm,e)}catch{}n=!0}return n}finally{Me=r,ln.transition=t}}return!1}function uC(e,t,r){t=Iu(r,t),t=FT(e,t,1),e=Fi(e,t,1),t=hr(),e!==null&&(Df(e,1,t),Or(e,t))}function ct(e,t,r){if(e.tag===3)uC(e,e,r);else for(;t!==null;){if(t.tag===3){uC(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&($i===null||!$i.has(n))){e=Iu(r,e),e=$T(t,e,1),t=Fi(t,e,1),e=hr(),t!==null&&(Df(t,1,e),Or(t,e));break}}t=t.return}}function EV(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=hr(),e.pingedLanes|=e.suspendedLanes&r,Lt===e&&(qt&r)===r&&(It===4||It===3&&(qt&130023424)===qt&&500>ht()-iw?Ls(e,0):ow|=r),Or(e,t)}function oP(e,t){t===0&&((e.mode&1)===0?t=1:(t=uh,uh<<=1,(uh&130023424)===0&&(uh=4194304)));var r=hr();e=$o(e,t),e!==null&&(Df(e,t,r),Or(e,r))}function SV(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),oP(e,r)}function CV(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(q(314))}n!==null&&n.delete(t),oP(e,r)}var iP;iP=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ar.current)Ir=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Ir=!1,dV(e,t,r);Ir=(e.flags&131072)!==0}else Ir=!1,Ze&&(t.flags&1048576)!==0&&uT(t,qh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ah(e,t),e=t.pendingProps;var o=Su(t,rr.current);xu(t,r),o=Q1(null,t,n,e,o,r);var i=Z1();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dr(n)?(i=!0,zh(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,G1(t),o.updater=cm,t.stateNode=o,o._reactInternals=t,c1(t,n,e,r),t=d1(null,t,n,!0,i,r)):(t.tag=0,Ze&&i&&U1(t),pr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ah(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=PV(n),e=Dn(n,e),o){case 0:t=f1(null,t,n,e,r);break e;case 1:t=Q5(null,t,n,e,r);break e;case 11:t=J5(null,t,n,e,r);break e;case 14:t=X5(null,t,n,Dn(n.type,e),r);break e}throw Error(q(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dn(n,o),f1(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dn(n,o),Q5(e,t,n,o,r);case 3:e:{if(VT(t),e===null)throw Error(q(387));n=t.pendingProps,i=t.memoizedState,o=i.element,dT(e,t),Wh(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Iu(Error(q(423)),t),t=Z5(e,t,n,r,o);break e}else if(n!==o){o=Iu(Error(q(424)),t),t=Z5(e,t,n,r,o);break e}else for(Br=Li(t.stateNode.containerInfo.firstChild),Ur=t,Ze=!0,Rn=null,r=gT(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Cu(),n===o){t=Bo(e,t,r);break e}pr(e,t,n,r)}t=t.child}return t;case 5:return yT(t),e===null&&s1(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,t1(n,o)?s=null:i!==null&&t1(n,i)&&(t.flags|=32),jT(e,t),pr(e,t,s,r),t.child;case 6:return e===null&&s1(t),null;case 13:return zT(e,t,r);case 4:return W1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Tu(t,null,n,r):pr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dn(n,o),J5(e,t,n,o,r);case 7:return pr(e,t,t.pendingProps,r),t.child;case 8:return pr(e,t,t.pendingProps.children,r),t.child;case 12:return pr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ve(Kh,n._currentValue),n._currentValue=s,i!==null)if(Mn(i.value,s)){if(i.children===o.children&&!Ar.current){t=Bo(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var f=a.firstContext;f!==null;){if(f.context===n){if(i.tag===1){f=Mo(-1,r&-r),f.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?f.next=f:(f.next=h.next,h.next=f),d.pending=f}}i.lanes|=r,f=i.alternate,f!==null&&(f.lanes|=r),a1(i.return,r,t),a.lanes|=r;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(q(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),a1(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}pr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,xu(t,r),o=fn(o),n=n(o),t.flags|=1,pr(e,t,n,r),t.child;case 14:return n=t.type,o=Dn(n,t.pendingProps),o=Dn(n.type,o),X5(e,t,n,o,r);case 15:return BT(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dn(n,o),Ah(e,t),t.tag=1,Dr(n)?(e=!0,zh(t)):e=!1,xu(t,r),hT(t,n,o),c1(t,n,o,r),d1(null,t,n,!0,e,r);case 19:return HT(e,t,r);case 22:return UT(e,t,r)}throw Error(q(156,t.tag))};function sP(e,t){return RC(e,t)}function TV(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,t,r,n){return new TV(e,t,r,n)}function cw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PV(e){if(typeof e=="function")return cw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===I1)return 11;if(e===A1)return 14}return 2}function Ui(e,t){var r=e.alternate;return r===null?(r=cn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Rh(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")cw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case su:return Fs(r.children,o,i,t);case P1:s=8,o|=8;break;case Nb:return e=cn(12,r,t,o|2),e.elementType=Nb,e.lanes=i,e;case kb:return e=cn(13,r,t,o),e.elementType=kb,e.lanes=i,e;case Mb:return e=cn(19,r,t,o),e.elementType=Mb,e.lanes=i,e;case mC:return pm(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pC:s=10;break e;case hC:s=9;break e;case I1:s=11;break e;case A1:s=14;break e;case Pi:s=16,n=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=cn(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Fs(e,t,r,n){return e=cn(7,e,n,t),e.lanes=r,e}function pm(e,t,r,n){return e=cn(22,e,n,t),e.elementType=mC,e.lanes=r,e.stateNode={isHidden:!1},e}function Db(e,t,r){return e=cn(6,e,null,t),e.lanes=r,e}function Ob(e,t,r){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function IV(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hb(0),this.expirationTimes=hb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hb(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lw(e,t,r,n,o,i,s,a,f){return e=new IV(e,t,r,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=cn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},G1(i),e}function AV(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:iu,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function aP(e){if(!e)return Vi;e=e._reactInternals;e:{if(Hs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(Dr(r))return sT(e,r,t)}return t}function uP(e,t,r,n,o,i,s,a,f){return e=lw(r,n,!0,e,o,i,s,a,f),e.context=aP(null),r=e.current,n=hr(),o=Bi(r),i=Mo(n,o),i.callback=t!=null?t:null,Fi(r,i,o),e.current.lanes=o,Df(e,o,n),Or(e,n),e}function hm(e,t,r,n){var o=t.current,i=hr(),s=Bi(o);return r=aP(r),t.context===null?t.context=r:t.pendingContext=r,t=Mo(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Fi(o,t,s),e!==null&&(kn(e,o,s,i),Th(e,o,s)),s}function rm(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cC(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function fw(e,t){cC(e,t),(e=e.alternate)&&cC(e,t)}function DV(){return null}var cP=typeof reportError=="function"?reportError:function(e){console.error(e)};function dw(e){this._internalRoot=e}mm.prototype.render=dw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));hm(e,t,null,null)};mm.prototype.unmount=dw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vs(function(){hm(null,e,null,null)}),t[Fo]=null}};function mm(e){this._internalRoot=e}mm.prototype.unstable_scheduleHydration=function(e){if(e){var t=BC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ai.length&&t!==0&&t<Ai[r].priority;r++);Ai.splice(r,0,e),r===0&&jC(e)}};function pw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lC(){}function OV(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var d=rm(s);i.call(d)}}var s=uP(t,n,e,0,null,!1,!1,"",lC);return e._reactRootContainer=s,e[Fo]=s.current,xf(e.nodeType===8?e.parentNode:e),Vs(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var d=rm(f);a.call(d)}}var f=lw(e,0,!1,null,null,!1,!1,"",lC);return e._reactRootContainer=f,e[Fo]=f.current,xf(e.nodeType===8?e.parentNode:e),Vs(function(){hm(t,f,r,n)}),f}function ym(e,t,r,n,o){var i=r._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var f=rm(s);a.call(f)}}hm(t,s,e,o)}else s=OV(r,t,e,o,n);return rm(s)}FC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=tf(t.pendingLanes);r!==0&&(R1(t,r|1),Or(t,ht()),(De&6)===0&&(Au=ht()+500,qi()))}break;case 13:Vs(function(){var n=$o(e,1);if(n!==null){var o=hr();kn(n,e,1,o)}}),fw(e,1)}};N1=function(e){if(e.tag===13){var t=$o(e,134217728);if(t!==null){var r=hr();kn(t,e,134217728,r)}fw(e,134217728)}};$C=function(e){if(e.tag===13){var t=Bi(e),r=$o(e,t);if(r!==null){var n=hr();kn(r,e,t,n)}fw(e,t)}};BC=function(){return Me};UC=function(e,t){var r=Me;try{return Me=e,t()}finally{Me=r}};qb=function(e,t,r){switch(t){case"input":if($b(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=am(n);if(!o)throw Error(q(90));yC(n),$b(n,o)}}}break;case"textarea":bC(e,r);break;case"select":t=r.value,t!=null&&yu(e,!!r.multiple,t,!1)}};TC=sw;PC=Vs;var RV={usingClientEntryPoint:!1,Events:[Rf,lu,am,SC,CC,sw]},Xl={findFiberByHostInstance:Ns,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},NV={bundleType:Xl.bundleType,version:Xl.version,rendererPackageName:Xl.rendererPackageName,rendererConfig:Xl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Uo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=DC(e),e===null?null:e.stateNode},findFiberByHostInstance:Xl.findFiberByHostInstance||DV,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ql=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ql.isDisabled&&Ql.supportsFiber))try{nm=Ql.inject(NV),to=Ql}catch{}var Ql;zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RV;zr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pw(t))throw Error(q(200));return AV(e,t,null,r)};zr.createRoot=function(e,t){if(!pw(e))throw Error(q(299));var r=!1,n="",o=cP;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=lw(e,1,!1,null,null,r,!1,n,o),e[Fo]=t.current,xf(e.nodeType===8?e.parentNode:e),new dw(t)};zr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=DC(t),e=e===null?null:e.stateNode,e};zr.flushSync=function(e){return Vs(e)};zr.hydrate=function(e,t,r){if(!gm(t))throw Error(q(200));return ym(null,e,t,!0,r)};zr.hydrateRoot=function(e,t,r){if(!pw(e))throw Error(q(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",s=cP;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=uP(t,null,e,1,r!=null?r:null,o,!1,i,s),e[Fo]=t.current,xf(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new mm(t)};zr.render=function(e,t,r){if(!gm(t))throw Error(q(200));return ym(null,e,t,!1,r)};zr.unmountComponentAtNode=function(e){if(!gm(e))throw Error(q(40));return e._reactRootContainer?(Vs(function(){ym(null,null,e,!1,function(){e._reactRootContainer=null,e[Fo]=null})}),!0):!1};zr.unstable_batchedUpdates=sw;zr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!gm(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return ym(e,t,r,!1,n)};zr.version="18.2.0-next-9e3b772b8-20220608"});var qs=$((vue,dP)=>{"use strict";u();l();c();function fP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fP)}catch(e){console.error(e)}}fP(),dP.exports=lP()});var hP=$(hw=>{"use strict";u();l();c();var pP=qs();hw.createRoot=pP.createRoot,hw.hydrateRoot=pP.hydrateRoot;var bue});var gP=$((xue,mP)=>{"use strict";u();l();c();var kV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";mP.exports=kV});var wP=$((_ue,bP)=>{"use strict";u();l();c();var MV=gP();function yP(){}function vP(){}vP.resetWarningCache=yP;bP.exports=function(){function e(n,o,i,s,a,f){if(f!==MV){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vP,resetWarningCache:yP};return r.PropTypes=r,r}});var mw=$((Cue,xP)=>{u();l();c();xP.exports=wP()();var Eue,Sue});var d8=$((Yce,f8)=>{u();l();c();f8.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(o){e.addRange(o)}),t&&t.focus()}}});var m8=$((Jce,h8)=>{"use strict";u();l();c();var qz=d8(),p8={"text/plain":"Text","text/html":"Url",default:"Text"},Kz="Copy to clipboard: #{key}, Enter";function Gz(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Wz(e,t){var r,n,o,i,s,a,f=!1;t||(t={}),r=t.debug||!1;try{o=qz(),i=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=p8[t.format]||p8.default;window.clipboardData.setData(g,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");f=!0}catch(h){r&&console.error("unable to copy using execCommand: ",h),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(g){r&&console.error("unable to copy using clipboardData: ",g),r&&console.error("falling back to prompt"),n=Gz("message"in t?t.message:Kz),window.prompt(n,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return f}h8.exports=Wz});var y8=$((Xce,g8)=>{u();l();c();g8.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Ji=$(Ws=>{u();l();c();var Pw,Yz=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ws.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Ws.getSymbolTotalCodewords=function(t){return Yz[t]};Ws.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Ws.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Pw=t};Ws.isKanjiModeEnabled=function(){return typeof Pw<"u"};Ws.toSJIS=function(t){return Pw(t)}});var Am=$(pn=>{u();l();c();pn.L={bit:1};pn.M={bit:0};pn.Q={bit:3};pn.H={bit:2};function Jz(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return pn.L;case"m":case"medium":return pn.M;case"q":case"quartile":return pn.Q;case"h":case"high":return pn.H;default:throw new Error("Unknown EC Level: "+e)}}pn.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};pn.from=function(t,r){if(pn.isValid(t))return t;try{return Jz(t)}catch{return r}}});var w8=$((ele,b8)=>{u();l();c();function v8(){this.buffer=[],this.length=0}v8.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};b8.exports=v8});var _8=$((tle,x8)=>{u();l();c();function kf(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}kf.prototype.set=function(e,t,r,n){let o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)};kf.prototype.get=function(e,t){return this.data[e*this.size+t]};kf.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};kf.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};x8.exports=kf});var E8=$(Dm=>{u();l();c();var Xz=Ji().getSymbolSize;Dm.getRowColCoords=function(t){if(t===1)return[];let r=Math.floor(t/7)+2,n=Xz(t),o=n===145?26:Math.ceil((n-13)/(2*r-2))*2,i=[n-7];for(let s=1;s<r-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};Dm.getPositions=function(t){let r=[],n=Dm.getRowColCoords(t),o=n.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||r.push([n[i],n[s]]);return r}});var T8=$(C8=>{u();l();c();var Qz=Ji().getSymbolSize,S8=7;C8.getPositions=function(t){let r=Qz(t);return[[0,0],[r-S8,0],[0,r-S8]]}});var P8=$(He=>{u();l();c();He.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Ys={N1:3,N2:3,N3:40,N4:10};He.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};He.from=function(t){return He.isValid(t)?parseInt(t,10):void 0};He.getPenaltyN1=function(t){let r=t.size,n=0,o=0,i=0,s=null,a=null;for(let f=0;f<r;f++){o=i=0,s=a=null;for(let d=0;d<r;d++){let h=t.get(f,d);h===s?o++:(o>=5&&(n+=Ys.N1+(o-5)),s=h,o=1),h=t.get(d,f),h===a?i++:(i>=5&&(n+=Ys.N1+(i-5)),a=h,i=1)}o>=5&&(n+=Ys.N1+(o-5)),i>=5&&(n+=Ys.N1+(i-5))}return n};He.getPenaltyN2=function(t){let r=t.size,n=0;for(let o=0;o<r-1;o++)for(let i=0;i<r-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&n++}return n*Ys.N2};He.getPenaltyN3=function(t){let r=t.size,n=0,o=0,i=0;for(let s=0;s<r;s++){o=i=0;for(let a=0;a<r;a++)o=o<<1&2047|t.get(s,a),a>=10&&(o===1488||o===93)&&n++,i=i<<1&2047|t.get(a,s),a>=10&&(i===1488||i===93)&&n++}return n*Ys.N3};He.getPenaltyN4=function(t){let r=0,n=t.data.length;for(let i=0;i<n;i++)r+=t.data[i];return Math.abs(Math.ceil(r*100/n/5)-10)*Ys.N4};function Zz(e,t,r){switch(e){case He.Patterns.PATTERN000:return(t+r)%2===0;case He.Patterns.PATTERN001:return t%2===0;case He.Patterns.PATTERN010:return r%3===0;case He.Patterns.PATTERN011:return(t+r)%3===0;case He.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2===0;case He.Patterns.PATTERN101:return t*r%2+t*r%3===0;case He.Patterns.PATTERN110:return(t*r%2+t*r%3)%2===0;case He.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}He.applyMask=function(t,r){let n=r.size;for(let o=0;o<n;o++)for(let i=0;i<n;i++)r.isReserved(i,o)||r.xor(i,o,Zz(t,i,o))};He.getBestMask=function(t,r){let n=Object.keys(He.Patterns).length,o=0,i=1/0;for(let s=0;s<n;s++){r(s),He.applyMask(s,t);let a=He.getPenaltyN1(t)+He.getPenaltyN2(t)+He.getPenaltyN3(t)+He.getPenaltyN4(t);He.applyMask(s,t),a<i&&(i=a,o=s)}return o}});var Aw=$(Iw=>{u();l();c();var Xi=Am(),Om=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Rm=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Iw.getBlocksCount=function(t,r){switch(r){case Xi.L:return Om[(t-1)*4+0];case Xi.M:return Om[(t-1)*4+1];case Xi.Q:return Om[(t-1)*4+2];case Xi.H:return Om[(t-1)*4+3];default:return}};Iw.getTotalCodewordsCount=function(t,r){switch(r){case Xi.L:return Rm[(t-1)*4+0];case Xi.M:return Rm[(t-1)*4+1];case Xi.Q:return Rm[(t-1)*4+2];case Xi.H:return Rm[(t-1)*4+3];default:return}}});var I8=$(km=>{u();l();c();var Mf=new Uint8Array(512),Nm=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)Mf[r]=t,Nm[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)Mf[r]=Mf[r-255]})();km.log=function(t){if(t<1)throw new Error("log("+t+")");return Nm[t]};km.exp=function(t){return Mf[t]};km.mul=function(t,r){return t===0||r===0?0:Mf[Nm[t]+Nm[r]]}});var A8=$(Lf=>{u();l();c();var Dw=I8();Lf.mul=function(t,r){let n=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<r.length;i++)n[o+i]^=Dw.mul(t[o],r[i]);return n};Lf.mod=function(t,r){let n=new Uint8Array(t);for(;n.length-r.length>=0;){let o=n[0];for(let s=0;s<r.length;s++)n[s]^=Dw.mul(r[s],o);let i=0;for(;i<n.length&&n[i]===0;)i++;n=n.slice(i)}return n};Lf.generateECPolynomial=function(t){let r=new Uint8Array([1]);for(let n=0;n<t;n++)r=Lf.mul(r,new Uint8Array([1,Dw.exp(n)]));return r}});var R8=$((ule,O8)=>{u();l();c();var D8=A8();function Ow(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Ow.prototype.initialize=function(t){this.degree=t,this.genPoly=D8.generateECPolynomial(this.degree)};Ow.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let r=new Uint8Array(t.length+this.degree);r.set(t);let n=D8.mod(r,this.genPoly),o=this.degree-n.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(n,o),i}return n};O8.exports=Ow});var Rw=$(N8=>{u();l();c();N8.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var Nw=$(Vo=>{u();l();c();var k8="[0-9]+",eH="[A-Z $%*+\\-./:]+",Ff="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ff=Ff.replace(/u/g,"\\u");var tH="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ff+`)(?:.|[\r
|
|
9
|
+
]))+`;Vo.KANJI=new RegExp(Ff,"g");Vo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vo.BYTE=new RegExp(tH,"g");Vo.NUMERIC=new RegExp(k8,"g");Vo.ALPHANUMERIC=new RegExp(eH,"g");var rH=new RegExp("^"+Ff+"$"),nH=new RegExp("^"+k8+"$"),oH=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vo.testKanji=function(t){return rH.test(t)};Vo.testNumeric=function(t){return nH.test(t)};Vo.testAlphanumeric=function(t){return oH.test(t)}});var Qi=$(_t=>{u();l();c();var iH=Rw(),kw=Nw();_t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};_t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};_t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};_t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};_t.MIXED={bit:-1};_t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!iH.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]};_t.getBestModeForData=function(t){return kw.testNumeric(t)?_t.NUMERIC:kw.testAlphanumeric(t)?_t.ALPHANUMERIC:kw.testKanji(t)?_t.KANJI:_t.BYTE};_t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};_t.isValid=function(t){return t&&t.bit&&t.ccBits};function sH(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return _t.NUMERIC;case"alphanumeric":return _t.ALPHANUMERIC;case"kanji":return _t.KANJI;case"byte":return _t.BYTE;default:throw new Error("Unknown mode: "+e)}}_t.from=function(t,r){if(_t.isValid(t))return t;try{return sH(t)}catch{return r}}});var B8=$(Js=>{u();l();c();var Mm=Ji(),aH=Aw(),M8=Am(),Zi=Qi(),Mw=Rw(),F8=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,L8=Mm.getBCHDigit(F8);function uH(e,t,r){for(let n=1;n<=40;n++)if(t<=Js.getCapacity(n,r,e))return n}function $8(e,t){return Zi.getCharCountIndicator(e,t)+4}function cH(e,t){let r=0;return e.forEach(function(n){r+=$8(n.mode,t)+n.getBitsLength()}),r}function lH(e,t){for(let r=1;r<=40;r++)if(cH(e,r)<=Js.getCapacity(r,t,Zi.MIXED))return r}Js.from=function(t,r){return Mw.isValid(t)?parseInt(t,10):r};Js.getCapacity=function(t,r,n){if(!Mw.isValid(t))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=Zi.BYTE);let o=Mm.getSymbolTotalCodewords(t),i=aH.getTotalCodewordsCount(t,r),s=(o-i)*8;if(n===Zi.MIXED)return s;let a=s-$8(n,t);switch(n){case Zi.NUMERIC:return Math.floor(a/10*3);case Zi.ALPHANUMERIC:return Math.floor(a/11*2);case Zi.KANJI:return Math.floor(a/13);case Zi.BYTE:default:return Math.floor(a/8)}};Js.getBestVersionForData=function(t,r){let n,o=M8.from(r,M8.M);if(Array.isArray(t)){if(t.length>1)return lH(t,o);if(t.length===0)return 1;n=t[0]}else n=t;return uH(n.mode,n.getLength(),o)};Js.getEncodedBits=function(t){if(!Mw.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;Mm.getBCHDigit(r)-L8>=0;)r^=F8<<Mm.getBCHDigit(r)-L8;return t<<12|r}});var z8=$(V8=>{u();l();c();var Lw=Ji(),j8=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,fH=1<<14|1<<12|1<<10|1<<4|1<<1,U8=Lw.getBCHDigit(j8);V8.getEncodedBits=function(t,r){let n=t.bit<<3|r,o=n<<10;for(;Lw.getBCHDigit(o)-U8>=0;)o^=j8<<Lw.getBCHDigit(o)-U8;return(n<<10|o)^fH}});var q8=$((hle,H8)=>{u();l();c();var dH=Qi();function $u(e){this.mode=dH.NUMERIC,this.data=e.toString()}$u.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};$u.prototype.getLength=function(){return this.data.length};$u.prototype.getBitsLength=function(){return $u.getBitsLength(this.data.length)};$u.prototype.write=function(t){let r,n,o;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),o=parseInt(n,10),t.put(o,10);let i=this.data.length-r;i>0&&(n=this.data.substr(r),o=parseInt(n,10),t.put(o,i*3+1))};H8.exports=$u});var G8=$((mle,K8)=>{u();l();c();var pH=Qi(),Fw=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Bu(e){this.mode=pH.ALPHANUMERIC,this.data=e}Bu.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Bu.prototype.getLength=function(){return this.data.length};Bu.prototype.getBitsLength=function(){return Bu.getBitsLength(this.data.length)};Bu.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let n=Fw.indexOf(this.data[r])*45;n+=Fw.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put(Fw.indexOf(this.data[r]),6)};K8.exports=Bu});var Y8=$((gle,W8)=>{"use strict";u();l();c();W8.exports=function(t){for(var r=[],n=t.length,o=0;o<n;o++){var i=t.charCodeAt(o);if(i>=55296&&i<=56319&&n>o+1){var s=t.charCodeAt(o+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,o+=1)}if(i<128){r.push(i);continue}if(i<2048){r.push(i>>6|192),r.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128);continue}if(i>=65536&&i<=1114111){r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(i&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}});var X8=$((yle,J8)=>{u();l();c();var hH=Y8(),mH=Qi();function Uu(e){this.mode=mH.BYTE,typeof e=="string"&&(e=hH(e)),this.data=new Uint8Array(e)}Uu.getBitsLength=function(t){return t*8};Uu.prototype.getLength=function(){return this.data.length};Uu.prototype.getBitsLength=function(){return Uu.getBitsLength(this.data.length)};Uu.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)};J8.exports=Uu});var Z8=$((vle,Q8)=>{u();l();c();var gH=Qi(),yH=Ji();function ju(e){this.mode=gH.KANJI,this.data=e}ju.getBitsLength=function(t){return t*13};ju.prototype.getLength=function(){return this.data.length};ju.prototype.getBitsLength=function(){return ju.getBitsLength(this.data.length)};ju.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=yH.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
10
|
+
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};Q8.exports=ju});var eI=$((ble,$w)=>{"use strict";u();l();c();var $f={single_source_shortest_paths:function(e,t,r){var n={},o={};o[t]=0;var i=$f.PriorityQueue.make();i.push(t,0);for(var s,a,f,d,h,g,v,b,w;!i.empty();){s=i.pop(),a=s.value,d=s.cost,h=e[a]||{};for(f in h)h.hasOwnProperty(f)&&(g=h[f],v=d+g,b=o[f],w=typeof o[f]>"u",(w||b>v)&&(o[f]=v,i.push(f,v),n[f]=a))}if(typeof r<"u"&&typeof o[r]>"u"){var _=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(_)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t,o;n;)r.push(n),o=e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var n=$f.single_source_shortest_paths(e,t,r);return $f.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t=$f.PriorityQueue,r={},n;e=e||{};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof $w<"u"&&($w.exports=$f)});var uI=$(Vu=>{u();l();c();var Ne=Qi(),nI=q8(),oI=G8(),iI=X8(),sI=Z8(),Bf=Nw(),Lm=Ji(),vH=eI();function tI(e){return unescape(encodeURIComponent(e)).length}function Uf(e,t,r){let n=[],o;for(;(o=e.exec(r))!==null;)n.push({data:o[0],index:o.index,mode:t,length:o[0].length});return n}function aI(e){let t=Uf(Bf.NUMERIC,Ne.NUMERIC,e),r=Uf(Bf.ALPHANUMERIC,Ne.ALPHANUMERIC,e),n,o;return Lm.isKanjiModeEnabled()?(n=Uf(Bf.BYTE,Ne.BYTE,e),o=Uf(Bf.KANJI,Ne.KANJI,e)):(n=Uf(Bf.BYTE_KANJI,Ne.BYTE,e),o=[]),t.concat(r,n,o).sort(function(s,a){return s.index-a.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function Bw(e,t){switch(t){case Ne.NUMERIC:return nI.getBitsLength(e);case Ne.ALPHANUMERIC:return oI.getBitsLength(e);case Ne.KANJI:return sI.getBitsLength(e);case Ne.BYTE:return iI.getBitsLength(e)}}function bH(e){return e.reduce(function(t,r){let n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===r.mode?(t[t.length-1].data+=r.data,t):(t.push(r),t)},[])}function wH(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r];switch(n.mode){case Ne.NUMERIC:t.push([n,{data:n.data,mode:Ne.ALPHANUMERIC,length:n.length},{data:n.data,mode:Ne.BYTE,length:n.length}]);break;case Ne.ALPHANUMERIC:t.push([n,{data:n.data,mode:Ne.BYTE,length:n.length}]);break;case Ne.KANJI:t.push([n,{data:n.data,mode:Ne.BYTE,length:tI(n.data)}]);break;case Ne.BYTE:t.push([{data:n.data,mode:Ne.BYTE,length:tI(n.data)}])}}return t}function xH(e,t){let r={},n={start:{}},o=["start"];for(let i=0;i<e.length;i++){let s=e[i],a=[];for(let f=0;f<s.length;f++){let d=s[f],h=""+i+f;a.push(h),r[h]={node:d,lastCount:0},n[h]={};for(let g=0;g<o.length;g++){let v=o[g];r[v]&&r[v].node.mode===d.mode?(n[v][h]=Bw(r[v].lastCount+d.length,d.mode)-Bw(r[v].lastCount,d.mode),r[v].lastCount+=d.length):(r[v]&&(r[v].lastCount=d.length),n[v][h]=Bw(d.length,d.mode)+4+Ne.getCharCountIndicator(d.mode,t))}}o=a}for(let i=0;i<o.length;i++)n[o[i]].end=0;return{map:n,table:r}}function rI(e,t){let r,n=Ne.getBestModeForData(e);if(r=Ne.from(t,n),r!==Ne.BYTE&&r.bit<n.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ne.toString(r)+`.
|
|
11
|
+
Suggested mode is: `+Ne.toString(n));switch(r===Ne.KANJI&&!Lm.isKanjiModeEnabled()&&(r=Ne.BYTE),r){case Ne.NUMERIC:return new nI(e);case Ne.ALPHANUMERIC:return new oI(e);case Ne.KANJI:return new sI(e);case Ne.BYTE:return new iI(e)}}Vu.fromArray=function(t){return t.reduce(function(r,n){return typeof n=="string"?r.push(rI(n,null)):n.data&&r.push(rI(n.data,n.mode)),r},[])};Vu.fromString=function(t,r){let n=aI(t,Lm.isKanjiModeEnabled()),o=wH(n),i=xH(o,r),s=vH.find_path(i.map,"start","end"),a=[];for(let f=1;f<s.length-1;f++)a.push(i.table[s[f]].node);return Vu.fromArray(bH(a))};Vu.rawSplit=function(t){return Vu.fromArray(aI(t,Lm.isKanjiModeEnabled()))}});var lI=$(cI=>{u();l();c();var $m=Ji(),Uw=Am(),_H=w8(),EH=_8(),SH=E8(),CH=T8(),zw=P8(),Hw=Aw(),TH=R8(),Fm=B8(),PH=z8(),IH=Qi(),jw=uI();function AH(e,t){let r=e.size,n=CH.getPositions(t);for(let o=0;o<n.length;o++){let i=n[o][0],s=n[o][1];for(let a=-1;a<=7;a++)if(!(i+a<=-1||r<=i+a))for(let f=-1;f<=7;f++)s+f<=-1||r<=s+f||(a>=0&&a<=6&&(f===0||f===6)||f>=0&&f<=6&&(a===0||a===6)||a>=2&&a<=4&&f>=2&&f<=4?e.set(i+a,s+f,!0,!0):e.set(i+a,s+f,!1,!0))}}function DH(e){let t=e.size;for(let r=8;r<t-8;r++){let n=r%2===0;e.set(r,6,n,!0),e.set(6,r,n,!0)}}function OH(e,t){let r=SH.getPositions(t);for(let n=0;n<r.length;n++){let o=r[n][0],i=r[n][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?e.set(o+s,i+a,!0,!0):e.set(o+s,i+a,!1,!0)}}function RH(e,t){let r=e.size,n=Fm.getEncodedBits(t),o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+r-8-3,s=(n>>a&1)===1,e.set(o,i,s,!0),e.set(i,o,s,!0)}function Vw(e,t,r){let n=e.size,o=PH.getEncodedBits(t,r),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?e.set(i,8,s,!0):i<8?e.set(i+1,8,s,!0):e.set(n-15+i,8,s,!0),i<8?e.set(8,n-i-1,s,!0):i<9?e.set(8,15-i-1+1,s,!0):e.set(8,15-i-1,s,!0);e.set(n-8,8,1,!0)}function NH(e,t){let r=e.size,n=-1,o=r-1,i=7,s=0;for(let a=r-1;a>0;a-=2)for(a===6&&a--;;){for(let f=0;f<2;f++)if(!e.isReserved(o,a-f)){let d=!1;s<t.length&&(d=(t[s]>>>i&1)===1),e.set(o,a-f,d),i--,i===-1&&(s++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function kH(e,t,r){let n=new _H;r.forEach(function(f){n.put(f.mode.bit,4),n.put(f.getLength(),IH.getCharCountIndicator(f.mode,e)),f.write(n)});let o=$m.getSymbolTotalCodewords(e),i=Hw.getTotalCodewordsCount(e,t),s=(o-i)*8;for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let a=(s-n.getLengthInBits())/8;for(let f=0;f<a;f++)n.put(f%2?17:236,8);return MH(n,e,t)}function MH(e,t,r){let n=$m.getSymbolTotalCodewords(t),o=Hw.getTotalCodewordsCount(t,r),i=n-o,s=Hw.getBlocksCount(t,r),a=n%s,f=s-a,d=Math.floor(n/s),h=Math.floor(i/s),g=h+1,v=d-h,b=new TH(v),w=0,_=new Array(s),C=new Array(s),x=0,S=new Uint8Array(e.buffer);for(let P=0;P<s;P++){let I=P<f?h:g;_[P]=S.slice(w,w+I),C[P]=b.encode(_[P]),w+=I,x=Math.max(x,I)}let E=new Uint8Array(n),T=0,A,O;for(A=0;A<x;A++)for(O=0;O<s;O++)A<_[O].length&&(E[T++]=_[O][A]);for(A=0;A<v;A++)for(O=0;O<s;O++)E[T++]=C[O][A];return E}function LH(e,t,r,n){let o;if(Array.isArray(e))o=jw.fromArray(e);else if(typeof e=="string"){let d=t;if(!d){let h=jw.rawSplit(e);d=Fm.getBestVersionForData(h,r)}o=jw.fromString(e,d||40)}else throw new Error("Invalid data");let i=Fm.getBestVersionForData(o,r);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
|
|
12
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
13
|
+
Minimum version required to store current data is: `+i+`.
|
|
14
|
+
`);let s=kH(t,r,o),a=$m.getSymbolSize(t),f=new EH(a);return AH(f,t),DH(f),OH(f,t),Vw(f,r,0),t>=7&&RH(f,t),NH(f,s),isNaN(n)&&(n=zw.getBestMask(f,Vw.bind(null,f,r))),zw.applyMask(n,f),Vw(f,r,n),{modules:f,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}cI.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");let n=Uw.M,o,i;return typeof r<"u"&&(n=Uw.from(r.errorCorrectionLevel,Uw.M),o=Fm.from(r.version),i=zw.from(r.maskPattern),r.toSJISFunc&&$m.setToSJISFunction(r.toSJISFunc)),LH(t,o,n,i)}});var qw=$(Xs=>{u();l();c();function fI(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(n){return[n,n]}))),t.length===6&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+t.slice(0,6).join("")}}Xs.getOptions=function(t){t||(t={}),t.color||(t.color={});let r=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:n,scale:n?4:o,margin:r,color:{dark:fI(t.color.dark||"#000000ff"),light:fI(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};Xs.getScale=function(t,r){return r.width&&r.width>=t+r.margin*2?r.width/(t+r.margin*2):r.scale};Xs.getImageWidth=function(t,r){let n=Xs.getScale(t,r);return Math.floor((t+r.margin*2)*n)};Xs.qrToImageData=function(t,r,n){let o=r.modules.size,i=r.modules.data,s=Xs.getScale(o,n),a=Math.floor((o+n.margin*2)*s),f=n.margin*s,d=[n.color.light,n.color.dark];for(let h=0;h<a;h++)for(let g=0;g<a;g++){let v=(h*a+g)*4,b=n.color.light;if(h>=f&&g>=f&&h<a-f&&g<a-f){let w=Math.floor((h-f)/s),_=Math.floor((g-f)/s);b=d[i[w*o+_]?1:0]}t[v++]=b.r,t[v++]=b.g,t[v++]=b.b,t[v]=b.a}}});var dI=$(Bm=>{u();l();c();var Kw=qw();function FH(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}function $H(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}Bm.render=function(t,r,n){let o=n,i=r;typeof o>"u"&&(!r||!r.getContext)&&(o=r,r=void 0),r||(i=$H()),o=Kw.getOptions(o);let s=Kw.getImageWidth(t.modules.size,o),a=i.getContext("2d"),f=a.createImageData(s,s);return Kw.qrToImageData(f.data,t,o),FH(a,i,s),a.putImageData(f,0,0),i};Bm.renderToDataURL=function(t,r,n){let o=n;typeof o>"u"&&(!r||!r.getContext)&&(o=r,r=void 0),o||(o={});let i=Bm.render(t,r,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}});var mI=$(hI=>{u();l();c();var BH=qw();function pI(e,t){let r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function Gw(e,t,r){let n=e+t;return typeof r<"u"&&(n+=" "+r),n}function UH(e,t,r){let n="",o=0,i=!1,s=0;for(let a=0;a<e.length;a++){let f=Math.floor(a%t),d=Math.floor(a/t);!f&&!i&&(i=!0),e[a]?(s++,a>0&&f>0&&e[a-1]||(n+=i?Gw("M",f+r,.5+d+r):Gw("m",o,0),o=0,i=!1),f+1<t&&e[a+1]||(n+=Gw("h",s),s=0)):o++}return n}hI.render=function(t,r,n){let o=BH.getOptions(r),i=t.modules.size,s=t.modules.data,a=i+o.margin*2,f=o.color.light.a?"<path "+pI(o.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",d="<path "+pI(o.color.dark,"stroke")+' d="'+UH(s,i,o.margin)+'"/>',h='viewBox="0 0 '+a+" "+a+'"',g=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",v='<svg xmlns="http://www.w3.org/2000/svg" '+g+h+' shape-rendering="crispEdges">'+f+d+`</svg>
|
|
15
|
+
`;return typeof n=="function"&&n(null,v),v}});var yI=$(jf=>{u();l();c();var jH=y8(),Ww=lI(),gI=dI(),VH=mI();function Yw(e,t,r,n,o){let i=[].slice.call(arguments,1),s=i.length,a=typeof i[s-1]=="function";if(!a&&!jH())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(o=r,r=t,t=n=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=t,t=n=void 0):s===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(f,d){try{let h=Ww.create(r,n);f(e(h,t,n))}catch(h){d(h)}})}try{let f=Ww.create(r,n);o(null,e(f,t,n))}catch(f){o(f)}}jf.create=Ww.create;jf.toCanvas=Yw.bind(null,gI.render);jf.toDataURL=Yw.bind(null,gI.renderToDataURL);jf.toString=Yw.bind(null,function(e,t,r){return VH.render(e,r)})});var XI=$(tx=>{"use strict";u();l();c();Object.defineProperty(tx,"__esModule",{value:!0});function fq(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}tx.default=fq});var QI=$(rx=>{"use strict";u();l();c();Object.defineProperty(rx,"__esModule",{value:!0});function dq(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var pq=dq(XI()),hq=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,mq=pq(function(e){return hq.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});rx.default=mq});var q4=$((The,m0)=>{u();l();c();var S4,C4,T4,P4,I4,A4,D4,O4,R4,p0,ax,N4,k4,M4,ic,L4,F4,$4,B4,U4,j4,V4,z4,H4,h0;(function(e){var t=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof m0=="object"&&typeof m0.exports=="object"?e(r(t,r(m0.exports))):e(r(t));function r(n,o){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])};S4=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(n,o);function i(){this.constructor=n}n.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},C4=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},T4=function(n,o){var i={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.indexOf(s)<0&&(i[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(n);a<s.length;a++)o.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(n,s[a])&&(i[s[a]]=n[s[a]]);return i},P4=function(n,o,i,s){var a=arguments.length,f=a<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,i):s,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(n,o,i,s);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(f=(a<3?d(f):a>3?d(o,i,f):d(o,i))||f);return a>3&&f&&Object.defineProperty(o,i,f),f},I4=function(n,o){return function(i,s){o(i,s,n)}},A4=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)},D4=function(n,o,i,s){function a(f){return f instanceof i?f:new i(function(d){d(f)})}return new(i||(i=Promise))(function(f,d){function h(b){try{v(s.next(b))}catch(w){d(w)}}function g(b){try{v(s.throw(b))}catch(w){d(w)}}function v(b){b.done?f(b.value):a(b.value).then(h,g)}v((s=s.apply(n,o||[])).next())})},O4=function(n,o){var i={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},s,a,f,d;return d={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function h(v){return function(b){return g([v,b])}}function g(v){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,a&&(f=v[0]&2?a.return:v[0]?a.throw||((f=a.return)&&f.call(a),0):a.next)&&!(f=f.call(a,v[1])).done)return f;switch(a=0,f&&(v=[v[0]&2,f.value]),v[0]){case 0:case 1:f=v;break;case 4:return i.label++,{value:v[1],done:!1};case 5:i.label++,a=v[1],v=[0];continue;case 7:v=i.ops.pop(),i.trys.pop();continue;default:if(f=i.trys,!(f=f.length>0&&f[f.length-1])&&(v[0]===6||v[0]===2)){i=0;continue}if(v[0]===3&&(!f||v[1]>f[0]&&v[1]<f[3])){i.label=v[1];break}if(v[0]===6&&i.label<f[1]){i.label=f[1],f=v;break}if(f&&i.label<f[2]){i.label=f[2],i.ops.push(v);break}f[2]&&i.ops.pop(),i.trys.pop();continue}v=o.call(n,i)}catch(b){v=[6,b],a=0}finally{s=f=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},R4=function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&h0(o,n,i)},h0=Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]},p0=function(n){var o=typeof Symbol=="function"&&Symbol.iterator,i=o&&n[o],s=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},ax=function(n,o){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var s=i.call(n),a,f=[],d;try{for(;(o===void 0||o-- >0)&&!(a=s.next()).done;)f.push(a.value)}catch(h){d={error:h}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(d)throw d.error}}return f},N4=function(){for(var n=[],o=0;o<arguments.length;o++)n=n.concat(ax(arguments[o]));return n},k4=function(){for(var n=0,o=0,i=arguments.length;o<i;o++)n+=arguments[o].length;for(var s=Array(n),a=0,o=0;o<i;o++)for(var f=arguments[o],d=0,h=f.length;d<h;d++,a++)s[a]=f[d];return s},M4=function(n,o,i){if(i||arguments.length===2)for(var s=0,a=o.length,f;s<a;s++)(f||!(s in o))&&(f||(f=Array.prototype.slice.call(o,0,s)),f[s]=o[s]);return n.concat(f||Array.prototype.slice.call(o))},ic=function(n){return this instanceof ic?(this.v=n,this):new ic(n)},L4=function(n,o,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(n,o||[]),a,f=[];return a={},d("next"),d("throw"),d("return"),a[Symbol.asyncIterator]=function(){return this},a;function d(_){s[_]&&(a[_]=function(C){return new Promise(function(x,S){f.push([_,C,x,S])>1||h(_,C)})})}function h(_,C){try{g(s[_](C))}catch(x){w(f[0][3],x)}}function g(_){_.value instanceof ic?Promise.resolve(_.value.v).then(v,b):w(f[0][2],_)}function v(_){h("next",_)}function b(_){h("throw",_)}function w(_,C){_(C),f.shift(),f.length&&h(f[0][0],f[0][1])}},F4=function(n){var o,i;return o={},s("next"),s("throw",function(a){throw a}),s("return"),o[Symbol.iterator]=function(){return this},o;function s(a,f){o[a]=n[a]?function(d){return(i=!i)?{value:ic(n[a](d)),done:a==="return"}:f?f(d):d}:f}},$4=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],i;return o?o.call(n):(n=typeof p0=="function"?p0(n):n[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(f){i[f]=n[f]&&function(d){return new Promise(function(h,g){d=n[f](d),a(h,g,d.done,d.value)})}}function a(f,d,h,g){Promise.resolve(g).then(function(v){f({value:v,done:h})},d)}},B4=function(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n};var r=Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o};U4=function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&h0(o,n,i);return r(o,n),o},j4=function(n){return n&&n.__esModule?n:{default:n}},V4=function(n,o,i,s){if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?n!==o||!s:!o.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?s:i==="a"?s.call(n):s?s.value:o.get(n)},z4=function(n,o,i,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?n!==o||!a:!o.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(n,i):a?a.value=i:o.set(n,i),i},H4=function(n,o){if(o===null||typeof o!="object"&&typeof o!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?o===n:n.has(o)},e("__extends",S4),e("__assign",C4),e("__rest",T4),e("__decorate",P4),e("__param",I4),e("__metadata",A4),e("__awaiter",D4),e("__generator",O4),e("__exportStar",R4),e("__createBinding",h0),e("__values",p0),e("__read",ax),e("__spread",N4),e("__spreadArrays",k4),e("__spreadArray",M4),e("__await",ic),e("__asyncGenerator",L4),e("__asyncDelegator",F4),e("__asyncValues",$4),e("__makeTemplateObject",B4),e("__importStar",U4),e("__importDefault",j4),e("__classPrivateFieldGet",V4),e("__classPrivateFieldSet",z4),e("__classPrivateFieldIn",H4)})});var mO=$((zwe,hO)=>{"use strict";u();l();c();function NG(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}hO.exports=kG;function kG(e,t,r){var n=r&&r.stringify||NG,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var s=new Array(i);s[0]=n(e);for(var a=1;a<i;a++)s[a]=n(t[a]);return s.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var d="",h=1-o,g=-1,v=e&&e.length||0,b=0;b<v;){if(e.charCodeAt(b)===37&&b+1<v){switch(g=g>-1?g:0,e.charCodeAt(b+1)){case 100:case 102:if(h>=f||t[h]==null)break;g<b&&(d+=e.slice(g,b)),d+=Number(t[h]),g=b+2,b++;break;case 105:if(h>=f||t[h]==null)break;g<b&&(d+=e.slice(g,b)),d+=Math.floor(Number(t[h])),g=b+2,b++;break;case 79:case 111:case 106:if(h>=f||t[h]===void 0)break;g<b&&(d+=e.slice(g,b));var w=typeof t[h];if(w==="string"){d+="'"+t[h]+"'",g=b+2,b++;break}if(w==="function"){d+=t[h].name||"<anonymous>",g=b+2,b++;break}d+=n(t[h]),g=b+2,b++;break;case 115:if(h>=f)break;g<b&&(d+=e.slice(g,b)),d+=String(t[h]),g=b+2,b++;break;case 37:g<b&&(d+=e.slice(g,b)),d+="%",g=b+2,b++,h--;break}++h}++b}return g===-1?e:(g<v&&(d+=e.slice(g)),d)}});var tg=$((Hwe,bO)=>{"use strict";u();l();c();var gO=mO();bO.exports=co;var fd=HG().console||{},MG={mapHttpRequest:Z0,mapHttpResponse:Z0,wrapRequestSerializer:i_,wrapResponseSerializer:i_,wrapErrorSerializer:i_,req:Z0,res:Z0,err:UG};function LG(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function co(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||fd;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=LG(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let s=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");let a=e.level||"info",f=Object.create(r);f.log||(f.log=dd),Object.defineProperty(f,"levelVal",{get:h}),Object.defineProperty(f,"level",{get:g,set:v});let d={transmit:t,serialize:o,asObject:e.browser.asObject,levels:s,timestamp:jG(e)};f.levels=co.levels,f.level=a,f.setMaxListeners=f.getMaxListeners=f.emit=f.addListener=f.on=f.prependListener=f.once=f.prependOnceListener=f.removeListener=f.removeAllListeners=f.listeners=f.listenerCount=f.eventNames=f.write=f.flush=dd,f.serializers=n,f._serialize=o,f._stdErrSerialize=i,f.child=b,t&&(f._logEvent=s_());function h(){return this.level==="silent"?1/0:this.levels.values[this.level]}function g(){return this._level}function v(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,Ac(d,f,"error","log"),Ac(d,f,"fatal","error"),Ac(d,f,"warn","error"),Ac(d,f,"info","log"),Ac(d,f,"debug","log"),Ac(d,f,"trace","log")}function b(w,_){if(!w)throw new Error("missing bindings for child Pino");_=_||{},o&&w.serializers&&(_.serializers=w.serializers);let C=_.serializers;if(o&&C){var x=Object.assign({},n,C),S=e.browser.serialize===!0?Object.keys(x):o;delete w.serializers,eg([w],S,x,this._stdErrSerialize)}function E(T){this._childLevel=(T._childLevel|0)+1,this.error=Dc(T,w,"error"),this.fatal=Dc(T,w,"fatal"),this.warn=Dc(T,w,"warn"),this.info=Dc(T,w,"info"),this.debug=Dc(T,w,"debug"),this.trace=Dc(T,w,"trace"),x&&(this.serializers=x,this._serialize=S),t&&(this._logEvent=s_([].concat(T._logEvent.bindings,w)))}return E.prototype=this,new E(this)}return f}co.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};co.stdSerializers=MG;co.stdTimeFunctions=Object.assign({},{nullTime:yO,epochTime:vO,unixTime:VG,isoTime:zG});function Ac(e,t,r,n){let o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?dd:o[r]?o[r]:fd[r]||fd[n]||dd,FG(e,t,r)}function FG(e,t,r){!e.transmit&&t[r]===dd||(t[r]=function(n){return function(){let i=e.timestamp(),s=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===fd?fd:this;for(var f=0;f<s.length;f++)s[f]=arguments[f];if(e.serialize&&!e.asObject&&eg(s,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(a,$G(this,r,s,i)):n.apply(a,s),e.transmit){let d=e.transmit.level||t.level,h=co.levels.values[d],g=co.levels.values[r];if(g<h)return;BG(this,{ts:i,methodLevel:r,methodValue:g,transmitLevel:d,transmitValue:co.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},s)}}}(t[r]))}function $G(e,t,r,n){e._serialize&&eg(r,e._serialize,e.serializers,e._stdErrSerialize);let o=r.slice(),i=o[0],s={};n&&(s.time=n),s.level=co.levels.values[t];let a=(e._childLevel|0)+1;if(a<1&&(a=1),i!==null&&typeof i=="object"){for(;a--&&typeof o[0]=="object";)Object.assign(s,o.shift());i=o.length?gO(o.shift(),o):void 0}else typeof i=="string"&&(i=gO(o.shift(),o));return i!==void 0&&(s.msg=i),s}function eg(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=co.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(let i in e[o])t&&t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function Dc(e,t,r){return function(){let n=new Array(1+arguments.length);n[0]=t;for(var o=1;o<n.length;o++)n[o]=arguments[o-1];return e[r].apply(this,n)}}function BG(e,t,r){let n=t.send,o=t.ts,i=t.methodLevel,s=t.methodValue,a=t.val,f=e._logEvent.bindings;eg(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(d){return f.indexOf(d)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,a),e._logEvent=s_(f)}function s_(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function UG(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function jG(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?yO:vO}function Z0(){return{}}function i_(e){return e}function dd(){}function yO(){return!1}function vO(){return Date.now()}function VG(){return Math.round(Date.now()/1e3)}function zG(){return new Date(Date.now()).toISOString()}function HG(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}});var ha=$((qwe,a_)=>{"use strict";u();l();c();var Oc=typeof Reflect=="object"?Reflect:null,wO=Oc&&typeof Oc.apply=="function"?Oc.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},rg;Oc&&typeof Oc.ownKeys=="function"?rg=Oc.ownKeys:Object.getOwnPropertySymbols?rg=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:rg=function(t){return Object.getOwnPropertyNames(t)};function qG(e){console&&console.warn&&console.warn(e)}var _O=Number.isNaN||function(t){return t!==t};function Le(){Le.init.call(this)}a_.exports=Le;a_.exports.once=YG;Le.EventEmitter=Le;Le.prototype._events=void 0;Le.prototype._eventsCount=0;Le.prototype._maxListeners=void 0;var xO=10;function ng(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return xO},set:function(e){if(typeof e!="number"||e<0||_O(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");xO=e}});Le.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Le.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||_O(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function EO(e){return e._maxListeners===void 0?Le.defaultMaxListeners:e._maxListeners}Le.prototype.getMaxListeners=function(){return EO(this)};Le.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var s;if(r.length>0&&(s=r[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var f=i[t];if(f===void 0)return!1;if(typeof f=="function")wO(f,this,r);else for(var d=f.length,h=IO(f,d),n=0;n<d;++n)wO(h[n],this,r);return!0};function SO(e,t,r,n){var o,i,s;if(ng(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),s===void 0)s=i[t]=r,++e._eventsCount;else if(typeof s=="function"?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),o=EO(e),o>0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,qG(a)}return e}Le.prototype.addListener=function(t,r){return SO(this,t,r,!1)};Le.prototype.on=Le.prototype.addListener;Le.prototype.prependListener=function(t,r){return SO(this,t,r,!0)};function KG(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function CO(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=KG.bind(n);return o.listener=r,n.wrapFn=o,o}Le.prototype.once=function(t,r){return ng(r),this.on(t,CO(this,t,r)),this};Le.prototype.prependOnceListener=function(t,r){return ng(r),this.prependListener(t,CO(this,t,r)),this};Le.prototype.removeListener=function(t,r){var n,o,i,s,a;if(ng(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){a=n[s].listener,i=s;break}if(i<0)return this;i===0?n.shift():GG(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,a||r)}return this};Le.prototype.off=Le.prototype.removeListener;Le.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),s;for(o=0;o<i.length;++o)s=i[o],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function TO(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?WG(o):IO(o,o.length)}Le.prototype.listeners=function(t){return TO(this,t,!0)};Le.prototype.rawListeners=function(t){return TO(this,t,!1)};Le.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):PO.call(e,t)};Le.prototype.listenerCount=PO;function PO(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?rg(this._events):[]};function IO(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function GG(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function WG(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function YG(e,t){return new Promise(function(r,n){function o(s){e.removeListener(t,i),n(s)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}AO(e,t,i,{once:!0}),t!=="error"&&JG(e,o,{once:!0})})}function JG(e,t,r){typeof e.on=="function"&&AO(e,"error",t,r)}function AO(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var Kr=$((Kwe,ig)=>{u();l();c();var DO,OO,RO,NO,kO,MO,LO,FO,$O,og,u_,BO,UO,Rc,jO,VO,zO,HO,qO,KO,GO,WO,YO;(function(e){var t=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof ig=="object"&&typeof ig.exports=="object"?e(r(t,r(ig.exports))):e(r(t));function r(n,o){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])};DO=function(r,n){t(r,n);function o(){this.constructor=r}r.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)},OO=Object.assign||function(r){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},RO=function(r,n){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.indexOf(i)<0&&(o[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(r);s<i.length;s++)n.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(r,i[s])&&(o[i[s]]=r[i[s]]);return o},NO=function(r,n,o,i){var s=arguments.length,a=s<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,o):i,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,n,o,i);else for(var d=r.length-1;d>=0;d--)(f=r[d])&&(a=(s<3?f(a):s>3?f(n,o,a):f(n,o))||a);return s>3&&a&&Object.defineProperty(n,o,a),a},kO=function(r,n){return function(o,i){n(o,i,r)}},MO=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},LO=function(r,n,o,i){function s(a){return a instanceof o?a:new o(function(f){f(a)})}return new(o||(o=Promise))(function(a,f){function d(v){try{g(i.next(v))}catch(b){f(b)}}function h(v){try{g(i.throw(v))}catch(b){f(b)}}function g(v){v.done?a(v.value):s(v.value).then(d,h)}g((i=i.apply(r,n||[])).next())})},FO=function(r,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,f;return f={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function d(g){return function(v){return h([g,v])}}function h(g){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,s&&(a=g[0]&2?s.return:g[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,g[1])).done)return a;switch(s=0,a&&(g=[g[0]&2,a.value]),g[0]){case 0:case 1:a=g;break;case 4:return o.label++,{value:g[1],done:!1};case 5:o.label++,s=g[1],g=[0];continue;case 7:g=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(g[0]===6||g[0]===2)){o=0;continue}if(g[0]===3&&(!a||g[1]>a[0]&&g[1]<a[3])){o.label=g[1];break}if(g[0]===6&&o.label<a[1]){o.label=a[1],a=g;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(g);break}a[2]&&o.ops.pop(),o.trys.pop();continue}g=n.call(r,o)}catch(v){g=[6,v],s=0}finally{i=a=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},YO=function(r,n,o,i){i===void 0&&(i=o),r[i]=n[o]},$O=function(r,n){for(var o in r)o!=="default"&&!n.hasOwnProperty(o)&&(n[o]=r[o])},og=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&r[n],i=0;if(o)return o.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},u_=function(r,n){var o=typeof Symbol=="function"&&r[Symbol.iterator];if(!o)return r;var i=o.call(r),s,a=[],f;try{for(;(n===void 0||n-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(d){f={error:d}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(f)throw f.error}}return a},BO=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(u_(arguments[n]));return r},UO=function(){for(var r=0,n=0,o=arguments.length;n<o;n++)r+=arguments[n].length;for(var i=Array(r),s=0,n=0;n<o;n++)for(var a=arguments[n],f=0,d=a.length;f<d;f++,s++)i[s]=a[f];return i},Rc=function(r){return this instanceof Rc?(this.v=r,this):new Rc(r)},jO=function(r,n,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(r,n||[]),s,a=[];return s={},f("next"),f("throw"),f("return"),s[Symbol.asyncIterator]=function(){return this},s;function f(w){i[w]&&(s[w]=function(_){return new Promise(function(C,x){a.push([w,_,C,x])>1||d(w,_)})})}function d(w,_){try{h(i[w](_))}catch(C){b(a[0][3],C)}}function h(w){w.value instanceof Rc?Promise.resolve(w.value.v).then(g,v):b(a[0][2],w)}function g(w){d("next",w)}function v(w){d("throw",w)}function b(w,_){w(_),a.shift(),a.length&&d(a[0][0],a[0][1])}},VO=function(r){var n,o;return n={},i("next"),i("throw",function(s){throw s}),i("return"),n[Symbol.iterator]=function(){return this},n;function i(s,a){n[s]=r[s]?function(f){return(o=!o)?{value:Rc(r[s](f)),done:s==="return"}:a?a(f):f}:a}},zO=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],o;return n?n.call(r):(r=typeof og=="function"?og(r):r[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=r[a]&&function(f){return new Promise(function(d,h){f=r[a](f),s(d,h,f.done,f.value)})}}function s(a,f,d,h){Promise.resolve(h).then(function(g){a({value:g,done:d})},f)}},HO=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r},qO=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var o in r)Object.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n.default=r,n},KO=function(r){return r&&r.__esModule?r:{default:r}},GO=function(r,n){if(!n.has(r))throw new TypeError("attempted to get private field on non-instance");return n.get(r)},WO=function(r,n,o){if(!n.has(r))throw new TypeError("attempted to set private field on non-instance");return n.set(r,o),o},e("__extends",DO),e("__assign",OO),e("__rest",RO),e("__decorate",NO),e("__param",kO),e("__metadata",MO),e("__awaiter",LO),e("__generator",FO),e("__exportStar",$O),e("__createBinding",YO),e("__values",og),e("__read",u_),e("__spread",BO),e("__spreadArrays",UO),e("__await",Rc),e("__asyncGenerator",jO),e("__asyncDelegator",VO),e("__asyncValues",zO),e("__makeTemplateObject",HO),e("__importStar",qO),e("__importDefault",KO),e("__classPrivateFieldGet",GO),e("__classPrivateFieldSet",WO)})});var c_=$(sg=>{"use strict";u();l();c();Object.defineProperty(sg,"__esModule",{value:!0});function XG(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}sg.safeJsonParse=XG;function QG(e){return typeof e=="string"?e:JSON.stringify(e,(t,r)=>typeof r>"u"?null:r)}sg.safeJsonStringify=QG});var JO=$((Wwe,ag)=>{"use strict";u();l();c();(function(){"use strict";let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){let r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof globalThis<"u"&&globalThis.localStorage?ag.exports=globalThis.localStorage:typeof window<"u"&&window.localStorage?ag.exports=window.localStorage:ag.exports=new t})()});var XO=$(ug=>{"use strict";u();l();c();Object.defineProperty(ug,"__esModule",{value:!0});ug.IKeyValueStorage=void 0;var l_=class{};ug.IKeyValueStorage=l_});var QO=$(cg=>{"use strict";u();l();c();Object.defineProperty(cg,"__esModule",{value:!0});cg.parseEntry=void 0;var ZG=c_();function eW(e){var t;return[e[0],ZG.safeJsonParse((t=e[1])!==null&&t!==void 0?t:"")]}cg.parseEntry=eW});var eR=$(lg=>{"use strict";u();l();c();Object.defineProperty(lg,"__esModule",{value:!0});var ZO=Kr();ZO.__exportStar(XO(),lg);ZO.__exportStar(QO(),lg)});var rR=$(pd=>{"use strict";u();l();c();Object.defineProperty(pd,"__esModule",{value:!0});pd.KeyValueStorage=void 0;var Nc=Kr(),tR=c_(),tW=Nc.__importDefault(JO()),rW=eR(),fg=class{constructor(){this.localStorage=tW.default}getKeys(){return Nc.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return Nc.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(rW.parseEntry)})}getItem(t){return Nc.__awaiter(this,void 0,void 0,function*(){let r=this.localStorage.getItem(t);if(r!==null)return tR.safeJsonParse(r)})}setItem(t,r){return Nc.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(t,tR.safeJsonStringify(r))})}removeItem(t){return Nc.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}};pd.KeyValueStorage=fg;pd.default=fg});var nR=$(dg=>{"use strict";u();l();c();Object.defineProperty(dg,"__esModule",{value:!0});dg.delay=void 0;function nW(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}dg.delay=nW});var oR=$(kc=>{"use strict";u();l();c();Object.defineProperty(kc,"__esModule",{value:!0});kc.ONE_THOUSAND=kc.ONE_HUNDRED=void 0;kc.ONE_HUNDRED=100;kc.ONE_THOUSAND=1e3});var iR=$(Y=>{"use strict";u();l();c();Object.defineProperty(Y,"__esModule",{value:!0});Y.ONE_YEAR=Y.FOUR_WEEKS=Y.THREE_WEEKS=Y.TWO_WEEKS=Y.ONE_WEEK=Y.THIRTY_DAYS=Y.SEVEN_DAYS=Y.FIVE_DAYS=Y.THREE_DAYS=Y.ONE_DAY=Y.TWENTY_FOUR_HOURS=Y.TWELVE_HOURS=Y.SIX_HOURS=Y.THREE_HOURS=Y.ONE_HOUR=Y.SIXTY_MINUTES=Y.THIRTY_MINUTES=Y.TEN_MINUTES=Y.FIVE_MINUTES=Y.ONE_MINUTE=Y.SIXTY_SECONDS=Y.THIRTY_SECONDS=Y.TEN_SECONDS=Y.FIVE_SECONDS=Y.ONE_SECOND=void 0;Y.ONE_SECOND=1;Y.FIVE_SECONDS=5;Y.TEN_SECONDS=10;Y.THIRTY_SECONDS=30;Y.SIXTY_SECONDS=60;Y.ONE_MINUTE=Y.SIXTY_SECONDS;Y.FIVE_MINUTES=Y.ONE_MINUTE*5;Y.TEN_MINUTES=Y.ONE_MINUTE*10;Y.THIRTY_MINUTES=Y.ONE_MINUTE*30;Y.SIXTY_MINUTES=Y.ONE_MINUTE*60;Y.ONE_HOUR=Y.SIXTY_MINUTES;Y.THREE_HOURS=Y.ONE_HOUR*3;Y.SIX_HOURS=Y.ONE_HOUR*6;Y.TWELVE_HOURS=Y.ONE_HOUR*12;Y.TWENTY_FOUR_HOURS=Y.ONE_HOUR*24;Y.ONE_DAY=Y.TWENTY_FOUR_HOURS;Y.THREE_DAYS=Y.ONE_DAY*3;Y.FIVE_DAYS=Y.ONE_DAY*5;Y.SEVEN_DAYS=Y.ONE_DAY*7;Y.THIRTY_DAYS=Y.ONE_DAY*30;Y.ONE_WEEK=Y.SEVEN_DAYS;Y.TWO_WEEKS=Y.ONE_WEEK*2;Y.THREE_WEEKS=Y.ONE_WEEK*3;Y.FOUR_WEEKS=Y.ONE_WEEK*4;Y.ONE_YEAR=Y.ONE_DAY*365});var f_=$(pg=>{"use strict";u();l();c();Object.defineProperty(pg,"__esModule",{value:!0});var sR=Kr();sR.__exportStar(oR(),pg);sR.__exportStar(iR(),pg)});var uR=$(Mc=>{"use strict";u();l();c();Object.defineProperty(Mc,"__esModule",{value:!0});Mc.fromMiliseconds=Mc.toMiliseconds=void 0;var aR=f_();function oW(e){return e*aR.ONE_THOUSAND}Mc.toMiliseconds=oW;function iW(e){return Math.floor(e/aR.ONE_THOUSAND)}Mc.fromMiliseconds=iW});var lR=$(hg=>{"use strict";u();l();c();Object.defineProperty(hg,"__esModule",{value:!0});var cR=Kr();cR.__exportStar(nR(),hg);cR.__exportStar(uR(),hg)});var fR=$(hd=>{"use strict";u();l();c();Object.defineProperty(hd,"__esModule",{value:!0});hd.Watch=void 0;var mg=class{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){let r=this.get(t);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);let n=Date.now()-r.started;this.timestamps.set(t,{started:r.started,elapsed:n})}get(t){let r=this.timestamps.get(t);if(typeof r>"u")throw new Error(`No timestamp found for label: ${t}`);return r}elapsed(t){let r=this.get(t);return r.elapsed||Date.now()-r.started}};hd.Watch=mg;hd.default=mg});var dR=$(gg=>{"use strict";u();l();c();Object.defineProperty(gg,"__esModule",{value:!0});gg.IWatch=void 0;var d_=class{};gg.IWatch=d_});var pR=$(p_=>{"use strict";u();l();c();Object.defineProperty(p_,"__esModule",{value:!0});var sW=Kr();sW.__exportStar(dR(),p_)});var us=$(Lc=>{"use strict";u();l();c();Object.defineProperty(Lc,"__esModule",{value:!0});var yg=Kr();yg.__exportStar(lR(),Lc);yg.__exportStar(fR(),Lc);yg.__exportStar(pR(),Lc);yg.__exportStar(f_(),Lc)});var lo,hR=X(()=>{u();l();c();lo=class{}});var mR={};Xt(mR,{IEvents:()=>lo});var h_=X(()=>{u();l();c();hR()});var gR=$(vg=>{"use strict";u();l();c();Object.defineProperty(vg,"__esModule",{value:!0});vg.IHeartBeat=void 0;var aW=(h_(),j6(mR)),m_=class extends aW.IEvents{constructor(t){super()}};vg.IHeartBeat=m_});var y_=$(g_=>{"use strict";u();l();c();Object.defineProperty(g_,"__esModule",{value:!0});var uW=Kr();uW.__exportStar(gR(),g_)});var yR=$(Fc=>{"use strict";u();l();c();Object.defineProperty(Fc,"__esModule",{value:!0});Fc.HEARTBEAT_EVENTS=Fc.HEARTBEAT_INTERVAL=void 0;var cW=us();Fc.HEARTBEAT_INTERVAL=cW.FIVE_SECONDS;Fc.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}});var b_=$(v_=>{"use strict";u();l();c();Object.defineProperty(v_,"__esModule",{value:!0});var lW=Kr();lW.__exportStar(yR(),v_)});var vR=$(bg=>{"use strict";u();l();c();Object.defineProperty(bg,"__esModule",{value:!0});bg.HeartBeat=void 0;var w_=Kr(),fW=ha(),dW=us(),pW=y_(),x_=b_(),md=class extends pW.IHeartBeat{constructor(t){super(t),this.events=new fW.EventEmitter,this.interval=x_.HEARTBEAT_INTERVAL,this.interval=(t==null?void 0:t.interval)||x_.HEARTBEAT_INTERVAL}static init(t){return w_.__awaiter(this,void 0,void 0,function*(){let r=new md(t);return yield r.init(),r})}init(){return w_.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}initialize(){return w_.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),dW.toMiliseconds(this.interval))})}pulse(){this.events.emit(x_.HEARTBEAT_EVENTS.pulse)}};bg.HeartBeat=md});var bR=$(gd=>{"use strict";u();l();c();Object.defineProperty(gd,"__esModule",{value:!0});var __=Kr();__.__exportStar(vR(),gd);__.__exportStar(y_(),gd);__.__exportStar(b_(),gd)});var E_=$($c=>{"use strict";u();l();c();Object.defineProperty($c,"__esModule",{value:!0});$c.PINO_CUSTOM_CONTEXT_KEY=$c.PINO_LOGGER_DEFAULTS=void 0;$c.PINO_LOGGER_DEFAULTS={level:"info"};$c.PINO_CUSTOM_CONTEXT_KEY="custom_context"});var SR=$(Rr=>{"use strict";u();l();c();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.generateChildLogger=Rr.formatChildLoggerContext=Rr.getLoggerContext=Rr.setBrowserLoggerContext=Rr.getBrowserLoggerContext=Rr.getDefaultLoggerOptions=void 0;var Bc=E_();function hW(e){return Object.assign(Object.assign({},e),{level:(e==null?void 0:e.level)||Bc.PINO_LOGGER_DEFAULTS.level})}Rr.getDefaultLoggerOptions=hW;function wR(e,t=Bc.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}Rr.getBrowserLoggerContext=wR;function xR(e,t,r=Bc.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}Rr.setBrowserLoggerContext=xR;function _R(e,t=Bc.PINO_CUSTOM_CONTEXT_KEY){let r="";return typeof e.bindings>"u"?r=wR(e,t):r=e.bindings().context||"",r}Rr.getLoggerContext=_R;function ER(e,t,r=Bc.PINO_CUSTOM_CONTEXT_KEY){let n=_R(e,r);return n.trim()?`${n}/${t}`:t}Rr.formatChildLoggerContext=ER;function mW(e,t,r=Bc.PINO_CUSTOM_CONTEXT_KEY){let n=ER(e,t,r),o=e.child({context:n});return xR(o,n,r)}Rr.generateChildLogger=mW});var C_=$(Uc=>{"use strict";u();l();c();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.pino=void 0;var S_=Kr(),gW=S_.__importDefault(tg());Object.defineProperty(Uc,"pino",{enumerable:!0,get:function(){return gW.default}});S_.__exportStar(E_(),Uc);S_.__exportStar(SR(),Uc)});var PR=$(Dg=>{"use strict";u();l();c();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.BrowserRandomSource=void 0;var TR=65536,T_=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let r=new Uint8Array(t);for(let n=0;n<r.length;n+=TR)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,TR)));return r}};Dg.BrowserRandomSource=T_});var bn=$(P_=>{"use strict";u();l();c();Object.defineProperty(P_,"__esModule",{value:!0});function bW(e){for(var t=0;t<e.length;t++)e[t]=0;return e}P_.wipe=bW});var IR=$(()=>{u();l();c()});var AR=$(Og=>{"use strict";u();l();c();Object.defineProperty(Og,"__esModule",{value:!0});Og.NodeRandomSource=void 0;var wW=bn(),I_=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof U6<"u"){let t=IR();t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(t);if(r.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");let n=new Uint8Array(t);for(let o=0;o<n.length;o++)n[o]=r[o];return(0,wW.wipe)(r),n}};Og.NodeRandomSource=I_});var DR=$(Rg=>{"use strict";u();l();c();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.SystemRandomSource=void 0;var xW=PR(),_W=AR(),A_=class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new xW.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new _W.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}};Rg.SystemRandomSource=A_});var OR=$(Gr=>{"use strict";u();l();c();Object.defineProperty(Gr,"__esModule",{value:!0});function EW(e,t){var r=e>>>16&65535,n=e&65535,o=t>>>16&65535,i=t&65535;return n*i+(r*i+n*o<<16>>>0)|0}Gr.mul=Math.imul||EW;function SW(e,t){return e+t|0}Gr.add=SW;function CW(e,t){return e-t|0}Gr.sub=CW;function TW(e,t){return e<<t|e>>>32-t}Gr.rotl=TW;function PW(e,t){return e<<32-t|e>>>t}Gr.rotr=PW;function IW(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}Gr.isInteger=Number.isInteger||IW;Gr.MAX_SAFE_INTEGER=9007199254740991;Gr.isSafeInteger=function(e){return Gr.isInteger(e)&&e>=-Gr.MAX_SAFE_INTEGER&&e<=Gr.MAX_SAFE_INTEGER}});var Vc=$(ge=>{"use strict";u();l();c();Object.defineProperty(ge,"__esModule",{value:!0});var RR=OR();function AW(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}ge.readInt16BE=AW;function DW(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}ge.readUint16BE=DW;function OW(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}ge.readInt16LE=OW;function RW(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}ge.readUint16LE=RW;function NR(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}ge.writeUint16BE=NR;ge.writeInt16BE=NR;function kR(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}ge.writeUint16LE=kR;ge.writeInt16LE=kR;function D_(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}ge.readInt32BE=D_;function O_(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}ge.readUint32BE=O_;function R_(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}ge.readInt32LE=R_;function N_(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}ge.readUint32LE=N_;function Ng(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}ge.writeUint32BE=Ng;ge.writeInt32BE=Ng;function kg(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}ge.writeUint32LE=kg;ge.writeInt32LE=kg;function NW(e,t){t===void 0&&(t=0);var r=D_(e,t),n=D_(e,t+4);return r*4294967296+n-(n>>31)*4294967296}ge.readInt64BE=NW;function kW(e,t){t===void 0&&(t=0);var r=O_(e,t),n=O_(e,t+4);return r*4294967296+n}ge.readUint64BE=kW;function MW(e,t){t===void 0&&(t=0);var r=R_(e,t),n=R_(e,t+4);return n*4294967296+r-(r>>31)*4294967296}ge.readInt64LE=MW;function LW(e,t){t===void 0&&(t=0);var r=N_(e,t),n=N_(e,t+4);return n*4294967296+r}ge.readUint64LE=LW;function MR(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Ng(e/4294967296>>>0,t,r),Ng(e>>>0,t,r+4),t}ge.writeUint64BE=MR;ge.writeInt64BE=MR;function LR(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),kg(e>>>0,t,r),kg(e/4294967296>>>0,t,r+4),t}ge.writeUint64LE=LR;ge.writeInt64LE=LR;function FW(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n}ge.readUintBE=FW;function $W(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i<r+e/8;i++)n+=t[i]*o,o*=256;return n}ge.readUintLE=$W;function BW(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!RR.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,i=e/8+n-1;i>=n;i--)r[i]=t/o&255,o*=256;return r}ge.writeUintBE=BW;function UW(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!RR.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=n;i<n+e/8;i++)r[i]=t/o&255,o*=256;return r}ge.writeUintLE=UW;function jW(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t)}ge.readFloat32BE=jW;function VW(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t,!0)}ge.readFloat32LE=VW;function zW(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t)}ge.readFloat64BE=zW;function HW(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t,!0)}ge.readFloat64LE=HW;function qW(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.setFloat32(r,e),t}ge.writeFloat32BE=qW;function KW(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.setFloat32(r,e,!0),t}ge.writeFloat32LE=KW;function GW(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.setFloat64(r,e),t}ge.writeFloat64BE=GW;function WW(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.setFloat64(r,e,!0),t}ge.writeFloat64LE=WW});var zc=$(ar=>{"use strict";u();l();c();Object.defineProperty(ar,"__esModule",{value:!0});ar.randomStringForEntropy=ar.randomString=ar.randomUint32=ar.randomBytes=ar.defaultRandomSource=void 0;var YW=DR(),JW=Vc(),FR=bn();ar.defaultRandomSource=new YW.SystemRandomSource;function k_(e,t=ar.defaultRandomSource){return t.randomBytes(e)}ar.randomBytes=k_;function XW(e=ar.defaultRandomSource){let t=k_(4,e),r=(0,JW.readUint32LE)(t);return(0,FR.wipe)(t),r}ar.randomUint32=XW;var $R="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function BR(e,t=$R,r=ar.defaultRandomSource){if(t.length<2)throw new Error("randomString charset is too short");if(t.length>256)throw new Error("randomString charset is too long");let n="",o=t.length,i=256-256%o;for(;e>0;){let s=k_(Math.ceil(e*256/i),r);for(let a=0;a<s.length&&e>0;a++){let f=s[a];f<i&&(n+=t.charAt(f%o),e--)}(0,FR.wipe)(s)}return n}ar.randomString=BR;function QW(e,t=$R,r=ar.defaultRandomSource){let n=Math.ceil(e/(Math.log(t.length)/Math.LN2));return BR(n,t,r)}ar.randomStringForEntropy=QW});var VR=$(ei=>{"use strict";u();l();c();Object.defineProperty(ei,"__esModule",{value:!0});var qc=Vc(),Hc=bn();ei.DIGEST_LENGTH=64;ei.BLOCK_SIZE=128;var jR=function(){function e(){this.digestLength=ei.DIGEST_LENGTH,this.blockSize=ei.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){Hc.wipe(this._buffer),Hc.wipe(this._tempHi),Hc.wipe(this._tempLo),this.reset()},e.prototype.update=function(t,r){if(r===void 0&&(r=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<ei.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=t[n++],r--;this._bufferLength===this.blockSize&&(M_(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=M_(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[n++],r--;return this},e.prototype.finish=function(t){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,o=r/536870912|0,i=r<<3,s=r%128<112?128:256;this._buffer[n]=128;for(var a=n+1;a<s-8;a++)this._buffer[a]=0;qc.writeUint32BE(o,this._buffer,s-8),qc.writeUint32BE(i,this._buffer,s-4),M_(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(var a=0;a<this.digestLength/8;a++)qc.writeUint32BE(this._stateHi[a],t,a*8),qc.writeUint32BE(this._stateLo[a],t,a*8+4);return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(t){return this._stateHi.set(t.stateHi),this._stateLo.set(t.stateLo),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(t){Hc.wipe(t.stateHi),Hc.wipe(t.stateLo),t.buffer&&Hc.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},e}();ei.SHA512=jR;var UR=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function M_(e,t,r,n,o,i,s){for(var a=r[0],f=r[1],d=r[2],h=r[3],g=r[4],v=r[5],b=r[6],w=r[7],_=n[0],C=n[1],x=n[2],S=n[3],E=n[4],T=n[5],A=n[6],O=n[7],P,I,R,k,L,M,F,j;s>=128;){for(var V=0;V<16;V++){var G=8*V+i;e[V]=qc.readUint32BE(o,G),t[V]=qc.readUint32BE(o,G+4)}for(var V=0;V<80;V++){var H=a,ee=f,we=d,te=h,Z=g,ae=v,ie=b,re=w,se=_,ue=C,ce=x,ye=S,xe=E,_e=T,Ee=A,ve=O;if(P=w,I=O,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=(g>>>14|E<<32-14)^(g>>>18|E<<32-18)^(E>>>41-32|g<<32-(41-32)),I=(E>>>14|g<<32-14)^(E>>>18|g<<32-18)^(g>>>41-32|E<<32-(41-32)),L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,P=g&v^~g&b,I=E&T^~E&A,L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,P=UR[V*2],I=UR[V*2+1],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,P=e[V%16],I=t[V%16],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,R=F&65535|j<<16,k=L&65535|M<<16,P=R,I=k,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=(a>>>28|_<<32-28)^(_>>>34-32|a<<32-(34-32))^(_>>>39-32|a<<32-(39-32)),I=(_>>>28|a<<32-28)^(a>>>34-32|_<<32-(34-32))^(a>>>39-32|_<<32-(39-32)),L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,P=a&f^a&d^f&d,I=_&C^_&x^C&x,L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,re=F&65535|j<<16,ve=L&65535|M<<16,P=te,I=ye,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=R,I=k,L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,te=F&65535|j<<16,ye=L&65535|M<<16,f=H,d=ee,h=we,g=te,v=Z,b=ae,w=ie,a=re,C=se,x=ue,S=ce,E=ye,T=xe,A=_e,O=Ee,_=ve,V%16===15)for(var G=0;G<16;G++)P=e[G],I=t[G],L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=e[(G+9)%16],I=t[(G+9)%16],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,R=e[(G+1)%16],k=t[(G+1)%16],P=(R>>>1|k<<32-1)^(R>>>8|k<<32-8)^R>>>7,I=(k>>>1|R<<32-1)^(k>>>8|R<<32-8)^(k>>>7|R<<32-7),L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,R=e[(G+14)%16],k=t[(G+14)%16],P=(R>>>19|k<<32-19)^(k>>>61-32|R<<32-(61-32))^R>>>6,I=(k>>>19|R<<32-19)^(R>>>61-32|k<<32-(61-32))^(k>>>6|R<<32-6),L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,e[G]=F&65535|j<<16,t[G]=L&65535|M<<16}P=a,I=_,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[0],I=n[0],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[0]=a=F&65535|j<<16,n[0]=_=L&65535|M<<16,P=f,I=C,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[1],I=n[1],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[1]=f=F&65535|j<<16,n[1]=C=L&65535|M<<16,P=d,I=x,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[2],I=n[2],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[2]=d=F&65535|j<<16,n[2]=x=L&65535|M<<16,P=h,I=S,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[3],I=n[3],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[3]=h=F&65535|j<<16,n[3]=S=L&65535|M<<16,P=g,I=E,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[4],I=n[4],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[4]=g=F&65535|j<<16,n[4]=E=L&65535|M<<16,P=v,I=T,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[5],I=n[5],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[5]=v=F&65535|j<<16,n[5]=T=L&65535|M<<16,P=b,I=A,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[6],I=n[6],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[6]=b=F&65535|j<<16,n[6]=A=L&65535|M<<16,P=w,I=O,L=I&65535,M=I>>>16,F=P&65535,j=P>>>16,P=r[7],I=n[7],L+=I&65535,M+=I>>>16,F+=P&65535,j+=P>>>16,M+=L>>>16,F+=M>>>16,j+=F>>>16,r[7]=w=F&65535|j<<16,n[7]=O=L&65535|M<<16,i+=128,s-=128}return i}function ZW(e){var t=new jR;t.update(e);var r=t.digest();return t.clean(),r}ei.hash=ZW});var rN=$(ke=>{"use strict";u();l();c();Object.defineProperty(ke,"__esModule",{value:!0});ke.convertSecretKeyToX25519=ke.convertPublicKeyToX25519=ke.verify=ke.sign=ke.extractPublicKeyFromSecretKey=ke.generateKeyPair=ke.generateKeyPairFromSeed=ke.SEED_LENGTH=ke.SECRET_KEY_LENGTH=ke.PUBLIC_KEY_LENGTH=ke.SIGNATURE_LENGTH=void 0;var eY=zc(),vd=VR(),GR=bn();ke.SIGNATURE_LENGTH=64;ke.PUBLIC_KEY_LENGTH=32;ke.SECRET_KEY_LENGTH=64;ke.SEED_LENGTH=32;function oe(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}var tY=new Uint8Array(32);tY[0]=9;var $_=oe(),Kc=oe([1]),rY=oe([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),nY=oe([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),zR=oe([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),HR=oe([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),oY=oe([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function cs(e,t){for(let r=0;r<16;r++)e[r]=t[r]|0}function L_(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-t*65536}e[0]+=t-1+37*(t-1)}function WR(e,t,r){let n=~(r-1);for(let o=0;o<16;o++){let i=n&(e[o]^t[o]);e[o]^=i,t[o]^=i}}function bd(e,t){let r=oe(),n=oe();for(let o=0;o<16;o++)n[o]=t[o];L_(n),L_(n),L_(n);for(let o=0;o<2;o++){r[0]=n[0]-65517;for(let s=1;s<15;s++)r[s]=n[s]-65535-(r[s-1]>>16&1),r[s-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let i=r[15]>>16&1;r[14]&=65535,WR(n,r,1-i)}for(let o=0;o<16;o++)e[2*o]=n[o]&255,e[2*o+1]=n[o]>>8}function YR(e,t){let r=0;for(let n=0;n<32;n++)r|=e[n]^t[n];return(1&r-1>>>8)-1}function qR(e,t){let r=new Uint8Array(32),n=new Uint8Array(32);return bd(r,e),bd(n,t),YR(r,n)}function JR(e){let t=new Uint8Array(32);return bd(t,e),t[0]&1}function iY(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function ma(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function ya(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function Fe(e,t,r){let n,o,i=0,s=0,a=0,f=0,d=0,h=0,g=0,v=0,b=0,w=0,_=0,C=0,x=0,S=0,E=0,T=0,A=0,O=0,P=0,I=0,R=0,k=0,L=0,M=0,F=0,j=0,V=0,G=0,H=0,ee=0,we=0,te=r[0],Z=r[1],ae=r[2],ie=r[3],re=r[4],se=r[5],ue=r[6],ce=r[7],ye=r[8],xe=r[9],_e=r[10],Ee=r[11],ve=r[12],Te=r[13],Pe=r[14],Ie=r[15];n=t[0],i+=n*te,s+=n*Z,a+=n*ae,f+=n*ie,d+=n*re,h+=n*se,g+=n*ue,v+=n*ce,b+=n*ye,w+=n*xe,_+=n*_e,C+=n*Ee,x+=n*ve,S+=n*Te,E+=n*Pe,T+=n*Ie,n=t[1],s+=n*te,a+=n*Z,f+=n*ae,d+=n*ie,h+=n*re,g+=n*se,v+=n*ue,b+=n*ce,w+=n*ye,_+=n*xe,C+=n*_e,x+=n*Ee,S+=n*ve,E+=n*Te,T+=n*Pe,A+=n*Ie,n=t[2],a+=n*te,f+=n*Z,d+=n*ae,h+=n*ie,g+=n*re,v+=n*se,b+=n*ue,w+=n*ce,_+=n*ye,C+=n*xe,x+=n*_e,S+=n*Ee,E+=n*ve,T+=n*Te,A+=n*Pe,O+=n*Ie,n=t[3],f+=n*te,d+=n*Z,h+=n*ae,g+=n*ie,v+=n*re,b+=n*se,w+=n*ue,_+=n*ce,C+=n*ye,x+=n*xe,S+=n*_e,E+=n*Ee,T+=n*ve,A+=n*Te,O+=n*Pe,P+=n*Ie,n=t[4],d+=n*te,h+=n*Z,g+=n*ae,v+=n*ie,b+=n*re,w+=n*se,_+=n*ue,C+=n*ce,x+=n*ye,S+=n*xe,E+=n*_e,T+=n*Ee,A+=n*ve,O+=n*Te,P+=n*Pe,I+=n*Ie,n=t[5],h+=n*te,g+=n*Z,v+=n*ae,b+=n*ie,w+=n*re,_+=n*se,C+=n*ue,x+=n*ce,S+=n*ye,E+=n*xe,T+=n*_e,A+=n*Ee,O+=n*ve,P+=n*Te,I+=n*Pe,R+=n*Ie,n=t[6],g+=n*te,v+=n*Z,b+=n*ae,w+=n*ie,_+=n*re,C+=n*se,x+=n*ue,S+=n*ce,E+=n*ye,T+=n*xe,A+=n*_e,O+=n*Ee,P+=n*ve,I+=n*Te,R+=n*Pe,k+=n*Ie,n=t[7],v+=n*te,b+=n*Z,w+=n*ae,_+=n*ie,C+=n*re,x+=n*se,S+=n*ue,E+=n*ce,T+=n*ye,A+=n*xe,O+=n*_e,P+=n*Ee,I+=n*ve,R+=n*Te,k+=n*Pe,L+=n*Ie,n=t[8],b+=n*te,w+=n*Z,_+=n*ae,C+=n*ie,x+=n*re,S+=n*se,E+=n*ue,T+=n*ce,A+=n*ye,O+=n*xe,P+=n*_e,I+=n*Ee,R+=n*ve,k+=n*Te,L+=n*Pe,M+=n*Ie,n=t[9],w+=n*te,_+=n*Z,C+=n*ae,x+=n*ie,S+=n*re,E+=n*se,T+=n*ue,A+=n*ce,O+=n*ye,P+=n*xe,I+=n*_e,R+=n*Ee,k+=n*ve,L+=n*Te,M+=n*Pe,F+=n*Ie,n=t[10],_+=n*te,C+=n*Z,x+=n*ae,S+=n*ie,E+=n*re,T+=n*se,A+=n*ue,O+=n*ce,P+=n*ye,I+=n*xe,R+=n*_e,k+=n*Ee,L+=n*ve,M+=n*Te,F+=n*Pe,j+=n*Ie,n=t[11],C+=n*te,x+=n*Z,S+=n*ae,E+=n*ie,T+=n*re,A+=n*se,O+=n*ue,P+=n*ce,I+=n*ye,R+=n*xe,k+=n*_e,L+=n*Ee,M+=n*ve,F+=n*Te,j+=n*Pe,V+=n*Ie,n=t[12],x+=n*te,S+=n*Z,E+=n*ae,T+=n*ie,A+=n*re,O+=n*se,P+=n*ue,I+=n*ce,R+=n*ye,k+=n*xe,L+=n*_e,M+=n*Ee,F+=n*ve,j+=n*Te,V+=n*Pe,G+=n*Ie,n=t[13],S+=n*te,E+=n*Z,T+=n*ae,A+=n*ie,O+=n*re,P+=n*se,I+=n*ue,R+=n*ce,k+=n*ye,L+=n*xe,M+=n*_e,F+=n*Ee,j+=n*ve,V+=n*Te,G+=n*Pe,H+=n*Ie,n=t[14],E+=n*te,T+=n*Z,A+=n*ae,O+=n*ie,P+=n*re,I+=n*se,R+=n*ue,k+=n*ce,L+=n*ye,M+=n*xe,F+=n*_e,j+=n*Ee,V+=n*ve,G+=n*Te,H+=n*Pe,ee+=n*Ie,n=t[15],T+=n*te,A+=n*Z,O+=n*ae,P+=n*ie,I+=n*re,R+=n*se,k+=n*ue,L+=n*ce,M+=n*ye,F+=n*xe,j+=n*_e,V+=n*Ee,G+=n*ve,H+=n*Te,ee+=n*Pe,we+=n*Ie,i+=38*A,s+=38*O,a+=38*P,f+=38*I,d+=38*R,h+=38*k,g+=38*L,v+=38*M,b+=38*F,w+=38*j,_+=38*V,C+=38*G,x+=38*H,S+=38*ee,E+=38*we,o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-o*65536,n=s+o+65535,o=Math.floor(n/65536),s=n-o*65536,n=a+o+65535,o=Math.floor(n/65536),a=n-o*65536,n=f+o+65535,o=Math.floor(n/65536),f=n-o*65536,n=d+o+65535,o=Math.floor(n/65536),d=n-o*65536,n=h+o+65535,o=Math.floor(n/65536),h=n-o*65536,n=g+o+65535,o=Math.floor(n/65536),g=n-o*65536,n=v+o+65535,o=Math.floor(n/65536),v=n-o*65536,n=b+o+65535,o=Math.floor(n/65536),b=n-o*65536,n=w+o+65535,o=Math.floor(n/65536),w=n-o*65536,n=_+o+65535,o=Math.floor(n/65536),_=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=x+o+65535,o=Math.floor(n/65536),x=n-o*65536,n=S+o+65535,o=Math.floor(n/65536),S=n-o*65536,n=E+o+65535,o=Math.floor(n/65536),E=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,i+=o-1+37*(o-1),o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-o*65536,n=s+o+65535,o=Math.floor(n/65536),s=n-o*65536,n=a+o+65535,o=Math.floor(n/65536),a=n-o*65536,n=f+o+65535,o=Math.floor(n/65536),f=n-o*65536,n=d+o+65535,o=Math.floor(n/65536),d=n-o*65536,n=h+o+65535,o=Math.floor(n/65536),h=n-o*65536,n=g+o+65535,o=Math.floor(n/65536),g=n-o*65536,n=v+o+65535,o=Math.floor(n/65536),v=n-o*65536,n=b+o+65535,o=Math.floor(n/65536),b=n-o*65536,n=w+o+65535,o=Math.floor(n/65536),w=n-o*65536,n=_+o+65535,o=Math.floor(n/65536),_=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=x+o+65535,o=Math.floor(n/65536),x=n-o*65536,n=S+o+65535,o=Math.floor(n/65536),S=n-o*65536,n=E+o+65535,o=Math.floor(n/65536),E=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=f,e[4]=d,e[5]=h,e[6]=g,e[7]=v,e[8]=b,e[9]=w,e[10]=_,e[11]=C,e[12]=x,e[13]=S,e[14]=E,e[15]=T}function ga(e,t){Fe(e,t,t)}function XR(e,t){let r=oe(),n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)ga(r,r),n!==2&&n!==4&&Fe(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}function sY(e,t){let r=oe(),n;for(n=0;n<16;n++)r[n]=t[n];for(n=250;n>=0;n--)ga(r,r),n!==1&&Fe(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}function B_(e,t){let r=oe(),n=oe(),o=oe(),i=oe(),s=oe(),a=oe(),f=oe(),d=oe(),h=oe();ya(r,e[1],e[0]),ya(h,t[1],t[0]),Fe(r,r,h),ma(n,e[0],e[1]),ma(h,t[0],t[1]),Fe(n,n,h),Fe(o,e[3],t[3]),Fe(o,o,nY),Fe(i,e[2],t[2]),ma(i,i,i),ya(s,n,r),ya(a,i,o),ma(f,i,o),ma(d,n,r),Fe(e[0],s,a),Fe(e[1],d,f),Fe(e[2],f,a),Fe(e[3],s,d)}function KR(e,t,r){for(let n=0;n<4;n++)WR(e[n],t[n],r)}function j_(e,t){let r=oe(),n=oe(),o=oe();XR(o,t[2]),Fe(r,t[0],o),Fe(n,t[1],o),bd(e,n),e[31]^=JR(r)<<7}function QR(e,t,r){cs(e[0],$_),cs(e[1],Kc),cs(e[2],Kc),cs(e[3],$_);for(let n=255;n>=0;--n){let o=r[n/8|0]>>(n&7)&1;KR(e,t,o),B_(t,e),B_(e,e),KR(e,t,o)}}function V_(e,t){let r=[oe(),oe(),oe(),oe()];cs(r[0],zR),cs(r[1],HR),cs(r[2],Kc),Fe(r[3],zR,HR),QR(e,r,t)}function ZR(e){if(e.length!==ke.SEED_LENGTH)throw new Error(`ed25519: seed must be ${ke.SEED_LENGTH} bytes`);let t=(0,vd.hash)(e);t[0]&=248,t[31]&=127,t[31]|=64;let r=new Uint8Array(32),n=[oe(),oe(),oe(),oe()];V_(n,t),j_(r,n);let o=new Uint8Array(64);return o.set(e),o.set(r,32),{publicKey:r,secretKey:o}}ke.generateKeyPairFromSeed=ZR;function aY(e){let t=(0,eY.randomBytes)(32,e),r=ZR(t);return(0,GR.wipe)(t),r}ke.generateKeyPair=aY;function uY(e){if(e.length!==ke.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${ke.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(e.subarray(32))}ke.extractPublicKeyFromSecretKey=uY;var F_=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function eN(e,t){let r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*F_[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=r*256;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*F_[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*F_[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=t[n]&255}function U_(e){let t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let r=0;r<64;r++)e[r]=0;eN(e,t)}function cY(e,t){let r=new Float64Array(64),n=[oe(),oe(),oe(),oe()],o=(0,vd.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;let i=new Uint8Array(64);i.set(o.subarray(32),32);let s=new vd.SHA512;s.update(i.subarray(32)),s.update(t);let a=s.digest();s.clean(),U_(a),V_(n,a),j_(i,n),s.reset(),s.update(i.subarray(0,32)),s.update(e.subarray(32)),s.update(t);let f=s.digest();U_(f);for(let d=0;d<32;d++)r[d]=a[d];for(let d=0;d<32;d++)for(let h=0;h<32;h++)r[d+h]+=f[d]*o[h];return eN(i.subarray(32),r),i}ke.sign=cY;function tN(e,t){let r=oe(),n=oe(),o=oe(),i=oe(),s=oe(),a=oe(),f=oe();return cs(e[2],Kc),iY(e[1],t),ga(o,e[1]),Fe(i,o,rY),ya(o,o,e[2]),ma(i,e[2],i),ga(s,i),ga(a,s),Fe(f,a,s),Fe(r,f,o),Fe(r,r,i),sY(r,r),Fe(r,r,o),Fe(r,r,i),Fe(r,r,i),Fe(e[0],r,i),ga(n,e[0]),Fe(n,n,i),qR(n,o)&&Fe(e[0],e[0],oY),ga(n,e[0]),Fe(n,n,i),qR(n,o)?-1:(JR(e[0])===t[31]>>7&&ya(e[0],$_,e[0]),Fe(e[3],e[0],e[1]),0)}function lY(e,t,r){let n=new Uint8Array(32),o=[oe(),oe(),oe(),oe()],i=[oe(),oe(),oe(),oe()];if(r.length!==ke.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${ke.SIGNATURE_LENGTH} bytes`);if(tN(i,e))return!1;let s=new vd.SHA512;s.update(r.subarray(0,32)),s.update(e),s.update(t);let a=s.digest();return U_(a),QR(o,i,a),V_(i,r.subarray(32)),B_(o,i),j_(n,o),!YR(r,n)}ke.verify=lY;function fY(e){let t=[oe(),oe(),oe(),oe()];if(tN(t,e))throw new Error("Ed25519: invalid public key");let r=oe(),n=oe(),o=t[1];ma(r,Kc,o),ya(n,Kc,o),XR(n,n),Fe(r,r,n);let i=new Uint8Array(32);return bd(i,r),i}ke.convertPublicKeyToX25519=fY;function dY(e){let t=(0,vd.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;let r=new Uint8Array(t.subarray(0,32));return(0,GR.wipe)(t),r}ke.convertSecretKeyToX25519=dY});var $N=$(jg=>{"use strict";u();l();c();Object.defineProperty(jg,"__esModule",{value:!0});var ur=Vc(),h2=bn(),TJ=20;function PJ(e,t,r){for(var n=1634760805,o=857760878,i=2036477234,s=1797285236,a=r[3]<<24|r[2]<<16|r[1]<<8|r[0],f=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],h=r[15]<<24|r[14]<<16|r[13]<<8|r[12],g=r[19]<<24|r[18]<<16|r[17]<<8|r[16],v=r[23]<<24|r[22]<<16|r[21]<<8|r[20],b=r[27]<<24|r[26]<<16|r[25]<<8|r[24],w=r[31]<<24|r[30]<<16|r[29]<<8|r[28],_=t[3]<<24|t[2]<<16|t[1]<<8|t[0],C=t[7]<<24|t[6]<<16|t[5]<<8|t[4],x=t[11]<<24|t[10]<<16|t[9]<<8|t[8],S=t[15]<<24|t[14]<<16|t[13]<<8|t[12],E=n,T=o,A=i,O=s,P=a,I=f,R=d,k=h,L=g,M=v,F=b,j=w,V=_,G=C,H=x,ee=S,we=0;we<TJ;we+=2)E=E+P|0,V^=E,V=V>>>32-16|V<<16,L=L+V|0,P^=L,P=P>>>32-12|P<<12,T=T+I|0,G^=T,G=G>>>32-16|G<<16,M=M+G|0,I^=M,I=I>>>32-12|I<<12,A=A+R|0,H^=A,H=H>>>32-16|H<<16,F=F+H|0,R^=F,R=R>>>32-12|R<<12,O=O+k|0,ee^=O,ee=ee>>>32-16|ee<<16,j=j+ee|0,k^=j,k=k>>>32-12|k<<12,A=A+R|0,H^=A,H=H>>>32-8|H<<8,F=F+H|0,R^=F,R=R>>>32-7|R<<7,O=O+k|0,ee^=O,ee=ee>>>32-8|ee<<8,j=j+ee|0,k^=j,k=k>>>32-7|k<<7,T=T+I|0,G^=T,G=G>>>32-8|G<<8,M=M+G|0,I^=M,I=I>>>32-7|I<<7,E=E+P|0,V^=E,V=V>>>32-8|V<<8,L=L+V|0,P^=L,P=P>>>32-7|P<<7,E=E+I|0,ee^=E,ee=ee>>>32-16|ee<<16,F=F+ee|0,I^=F,I=I>>>32-12|I<<12,T=T+R|0,V^=T,V=V>>>32-16|V<<16,j=j+V|0,R^=j,R=R>>>32-12|R<<12,A=A+k|0,G^=A,G=G>>>32-16|G<<16,L=L+G|0,k^=L,k=k>>>32-12|k<<12,O=O+P|0,H^=O,H=H>>>32-16|H<<16,M=M+H|0,P^=M,P=P>>>32-12|P<<12,A=A+k|0,G^=A,G=G>>>32-8|G<<8,L=L+G|0,k^=L,k=k>>>32-7|k<<7,O=O+P|0,H^=O,H=H>>>32-8|H<<8,M=M+H|0,P^=M,P=P>>>32-7|P<<7,T=T+R|0,V^=T,V=V>>>32-8|V<<8,j=j+V|0,R^=j,R=R>>>32-7|R<<7,E=E+I|0,ee^=E,ee=ee>>>32-8|ee<<8,F=F+ee|0,I^=F,I=I>>>32-7|I<<7;ur.writeUint32LE(E+n|0,e,0),ur.writeUint32LE(T+o|0,e,4),ur.writeUint32LE(A+i|0,e,8),ur.writeUint32LE(O+s|0,e,12),ur.writeUint32LE(P+a|0,e,16),ur.writeUint32LE(I+f|0,e,20),ur.writeUint32LE(R+d|0,e,24),ur.writeUint32LE(k+h|0,e,28),ur.writeUint32LE(L+g|0,e,32),ur.writeUint32LE(M+v|0,e,36),ur.writeUint32LE(F+b|0,e,40),ur.writeUint32LE(j+w|0,e,44),ur.writeUint32LE(V+_|0,e,48),ur.writeUint32LE(G+C|0,e,52),ur.writeUint32LE(H+x|0,e,56),ur.writeUint32LE(ee+S|0,e,60)}function FN(e,t,r,n,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var i,s;if(o===0){if(t.length!==8&&t.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");i=new Uint8Array(16),s=i.length-t.length,i.set(t,s)}else{if(t.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");i=t,s=o}for(var a=new Uint8Array(64),f=0;f<r.length;f+=64){PJ(a,i,e);for(var d=f;d<f+64&&d<r.length;d++)n[d]=r[d]^a[d-f];AJ(i,0,s)}return h2.wipe(a),o===0&&h2.wipe(i),n}jg.streamXOR=FN;function IJ(e,t,r,n){return n===void 0&&(n=0),h2.wipe(r),FN(e,t,r,r,n)}jg.stream=IJ;function AJ(e,t,r){for(var n=1;r--;)n=n+(e[t]&255)|0,e[t]=n&255,n>>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}});var Vg=$(Qc=>{"use strict";u();l();c();Object.defineProperty(Qc,"__esModule",{value:!0});function DJ(e,t,r){return~(e-1)&t|e-1&r}Qc.select=DJ;function OJ(e,t){return(e|0)-(t|0)-1>>>31&1}Qc.lessOrEqual=OJ;function BN(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 1&r-1>>>8}Qc.compare=BN;function RJ(e,t){return e.length===0||t.length===0?!1:BN(e,t)!==0}Qc.equal=RJ});var jN=$(ri=>{"use strict";u();l();c();Object.defineProperty(ri,"__esModule",{value:!0});var NJ=Vg(),zg=bn();ri.DIGEST_LENGTH=16;var UN=function(){function e(t){this.digestLength=ri.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=t[0]|t[1]<<8;this._r[0]=r&8191;var n=t[2]|t[3]<<8;this._r[1]=(r>>>13|n<<3)&8191;var o=t[4]|t[5]<<8;this._r[2]=(n>>>10|o<<6)&7939;var i=t[6]|t[7]<<8;this._r[3]=(o>>>7|i<<9)&8191;var s=t[8]|t[9]<<8;this._r[4]=(i>>>4|s<<12)&255,this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=(s>>>14|a<<2)&8191;var f=t[12]|t[13]<<8;this._r[7]=(a>>>11|f<<5)&8065;var d=t[14]|t[15]<<8;this._r[8]=(f>>>8|d<<8)&8191,this._r[9]=d>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return e.prototype._blocks=function(t,r,n){for(var o=this._fin?0:2048,i=this._h[0],s=this._h[1],a=this._h[2],f=this._h[3],d=this._h[4],h=this._h[5],g=this._h[6],v=this._h[7],b=this._h[8],w=this._h[9],_=this._r[0],C=this._r[1],x=this._r[2],S=this._r[3],E=this._r[4],T=this._r[5],A=this._r[6],O=this._r[7],P=this._r[8],I=this._r[9];n>=16;){var R=t[r+0]|t[r+1]<<8;i+=R&8191;var k=t[r+2]|t[r+3]<<8;s+=(R>>>13|k<<3)&8191;var L=t[r+4]|t[r+5]<<8;a+=(k>>>10|L<<6)&8191;var M=t[r+6]|t[r+7]<<8;f+=(L>>>7|M<<9)&8191;var F=t[r+8]|t[r+9]<<8;d+=(M>>>4|F<<12)&8191,h+=F>>>1&8191;var j=t[r+10]|t[r+11]<<8;g+=(F>>>14|j<<2)&8191;var V=t[r+12]|t[r+13]<<8;v+=(j>>>11|V<<5)&8191;var G=t[r+14]|t[r+15]<<8;b+=(V>>>8|G<<8)&8191,w+=G>>>5|o;var H=0,ee=H;ee+=i*_,ee+=s*(5*I),ee+=a*(5*P),ee+=f*(5*O),ee+=d*(5*A),H=ee>>>13,ee&=8191,ee+=h*(5*T),ee+=g*(5*E),ee+=v*(5*S),ee+=b*(5*x),ee+=w*(5*C),H+=ee>>>13,ee&=8191;var we=H;we+=i*C,we+=s*_,we+=a*(5*I),we+=f*(5*P),we+=d*(5*O),H=we>>>13,we&=8191,we+=h*(5*A),we+=g*(5*T),we+=v*(5*E),we+=b*(5*S),we+=w*(5*x),H+=we>>>13,we&=8191;var te=H;te+=i*x,te+=s*C,te+=a*_,te+=f*(5*I),te+=d*(5*P),H=te>>>13,te&=8191,te+=h*(5*O),te+=g*(5*A),te+=v*(5*T),te+=b*(5*E),te+=w*(5*S),H+=te>>>13,te&=8191;var Z=H;Z+=i*S,Z+=s*x,Z+=a*C,Z+=f*_,Z+=d*(5*I),H=Z>>>13,Z&=8191,Z+=h*(5*P),Z+=g*(5*O),Z+=v*(5*A),Z+=b*(5*T),Z+=w*(5*E),H+=Z>>>13,Z&=8191;var ae=H;ae+=i*E,ae+=s*S,ae+=a*x,ae+=f*C,ae+=d*_,H=ae>>>13,ae&=8191,ae+=h*(5*I),ae+=g*(5*P),ae+=v*(5*O),ae+=b*(5*A),ae+=w*(5*T),H+=ae>>>13,ae&=8191;var ie=H;ie+=i*T,ie+=s*E,ie+=a*S,ie+=f*x,ie+=d*C,H=ie>>>13,ie&=8191,ie+=h*_,ie+=g*(5*I),ie+=v*(5*P),ie+=b*(5*O),ie+=w*(5*A),H+=ie>>>13,ie&=8191;var re=H;re+=i*A,re+=s*T,re+=a*E,re+=f*S,re+=d*x,H=re>>>13,re&=8191,re+=h*C,re+=g*_,re+=v*(5*I),re+=b*(5*P),re+=w*(5*O),H+=re>>>13,re&=8191;var se=H;se+=i*O,se+=s*A,se+=a*T,se+=f*E,se+=d*S,H=se>>>13,se&=8191,se+=h*x,se+=g*C,se+=v*_,se+=b*(5*I),se+=w*(5*P),H+=se>>>13,se&=8191;var ue=H;ue+=i*P,ue+=s*O,ue+=a*A,ue+=f*T,ue+=d*E,H=ue>>>13,ue&=8191,ue+=h*S,ue+=g*x,ue+=v*C,ue+=b*_,ue+=w*(5*I),H+=ue>>>13,ue&=8191;var ce=H;ce+=i*I,ce+=s*P,ce+=a*O,ce+=f*A,ce+=d*T,H=ce>>>13,ce&=8191,ce+=h*E,ce+=g*S,ce+=v*x,ce+=b*C,ce+=w*_,H+=ce>>>13,ce&=8191,H=(H<<2)+H|0,H=H+ee|0,ee=H&8191,H=H>>>13,we+=H,i=ee,s=we,a=te,f=Z,d=ae,h=ie,g=re,v=se,b=ue,w=ce,r+=16,n-=16}this._h[0]=i,this._h[1]=s,this._h[2]=a,this._h[3]=f,this._h[4]=d,this._h[5]=h,this._h[6]=g,this._h[7]=v,this._h[8]=b,this._h[9]=w},e.prototype.finish=function(t,r){r===void 0&&(r=0);var n=new Uint16Array(10),o,i,s,a;if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(o=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=o,o=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=o*5,o=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=o,o=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=o,n[0]=this._h[0]+5,o=n[0]>>>13,n[0]&=8191,a=1;a<10;a++)n[a]=this._h[a]+o,o=n[a]>>>13,n[a]&=8191;for(n[9]-=1<<13,i=(o^1)-1,a=0;a<10;a++)n[a]&=i;for(i=~i,a=0;a<10;a++)this._h[a]=this._h[a]&i|n[a];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,s=this._h[0]+this._pad[0],this._h[0]=s&65535,a=1;a<8;a++)s=(this._h[a]+this._pad[a]|0)+(s>>>16)|0,this._h[a]=s&65535;return t[r+0]=this._h[0]>>>0,t[r+1]=this._h[0]>>>8,t[r+2]=this._h[1]>>>0,t[r+3]=this._h[1]>>>8,t[r+4]=this._h[2]>>>0,t[r+5]=this._h[2]>>>8,t[r+6]=this._h[3]>>>0,t[r+7]=this._h[3]>>>8,t[r+8]=this._h[4]>>>0,t[r+9]=this._h[4]>>>8,t[r+10]=this._h[5]>>>0,t[r+11]=this._h[5]>>>8,t[r+12]=this._h[6]>>>0,t[r+13]=this._h[6]>>>8,t[r+14]=this._h[7]>>>0,t[r+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(t){var r=0,n=t.length,o;if(this._leftover){o=16-this._leftover,o>n&&(o=n);for(var i=0;i<o;i++)this._buffer[this._leftover+i]=t[r+i];if(n-=o,r+=o,this._leftover+=o,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(o=n-n%16,this._blocks(t,r,o),r+=o,n-=o),n){for(var i=0;i<n;i++)this._buffer[this._leftover+i]=t[r+i];this._leftover+=n}return this},e.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var t=new Uint8Array(16);return this.finish(t),t},e.prototype.clean=function(){return zg.wipe(this._buffer),zg.wipe(this._r),zg.wipe(this._h),zg.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();ri.Poly1305=UN;function kJ(e,t){var r=new UN(e);r.update(t);var n=r.digest();return r.clean(),n}ri.oneTimeAuth=kJ;function MJ(e,t){return e.length!==ri.DIGEST_LENGTH||t.length!==ri.DIGEST_LENGTH?!1:NJ.equal(e,t)}ri.equal=MJ});var m2=$(ni=>{"use strict";u();l();c();Object.defineProperty(ni,"__esModule",{value:!0});var Hg=$N(),LJ=jN(),Td=bn(),VN=Vc(),FJ=Vg();ni.KEY_LENGTH=32;ni.NONCE_LENGTH=12;ni.TAG_LENGTH=16;var zN=new Uint8Array(16),$J=function(){function e(t){if(this.nonceLength=ni.NONCE_LENGTH,this.tagLength=ni.TAG_LENGTH,t.length!==ni.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return e.prototype.seal=function(t,r,n,o){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var i=new Uint8Array(16);i.set(t,i.length-t.length);var s=new Uint8Array(32);Hg.stream(this._key,i,s,4);var a=r.length+this.tagLength,f;if(o){if(o.length!==a)throw new Error("ChaCha20Poly1305: incorrect destination length");f=o}else f=new Uint8Array(a);return Hg.streamXOR(this._key,i,r,f,4),this._authenticate(f.subarray(f.length-this.tagLength,f.length),s,f.subarray(0,f.length-this.tagLength),n),Td.wipe(i),f},e.prototype.open=function(t,r,n,o){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(r.length<this.tagLength)return null;var i=new Uint8Array(16);i.set(t,i.length-t.length);var s=new Uint8Array(32);Hg.stream(this._key,i,s,4);var a=new Uint8Array(this.tagLength);if(this._authenticate(a,s,r.subarray(0,r.length-this.tagLength),n),!FJ.equal(a,r.subarray(r.length-this.tagLength,r.length)))return null;var f=r.length-this.tagLength,d;if(o){if(o.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");d=o}else d=new Uint8Array(f);return Hg.streamXOR(this._key,i,r.subarray(0,r.length-this.tagLength),d,4),Td.wipe(i),d},e.prototype.clean=function(){return Td.wipe(this._key),this},e.prototype._authenticate=function(t,r,n,o){var i=new LJ.Poly1305(r);o&&(i.update(o),o.length%16>0&&i.update(zN.subarray(o.length%16))),i.update(n),n.length%16>0&&i.update(zN.subarray(n.length%16));var s=new Uint8Array(8);o&&VN.writeUint64LE(o.length,s),i.update(s),VN.writeUint64LE(n.length,s),i.update(s);for(var a=i.digest(),f=0;f<a.length;f++)t[f]=a[f];i.clean(),Td.wipe(a),Td.wipe(s)},e}();ni.ChaCha20Poly1305=$J});var HN=$(g2=>{"use strict";u();l();c();Object.defineProperty(g2,"__esModule",{value:!0});function BJ(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}g2.isSerializableHash=BJ});var KN=$(Pd=>{"use strict";u();l();c();Object.defineProperty(Pd,"__esModule",{value:!0});var po=HN(),UJ=Vg(),jJ=bn(),qN=function(){function e(t,r){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o<n.length;o++)n[o]^=54;this._inner.update(n);for(var o=0;o<n.length;o++)n[o]^=106;this._outer.update(n),po.isSerializableHash(this._inner)&&po.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),jJ.wipe(n)}return e.prototype.reset=function(){if(!po.isSerializableHash(this._inner)||!po.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){po.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),po.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(t){return this._inner.update(t),this},e.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(!po.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(t){if(!po.isSerializableHash(this._inner)||!po.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(t){if(!po.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},e}();Pd.HMAC=qN;function VJ(e,t,r){var n=new qN(e,t);n.update(r);var o=n.digest();return n.clean(),o}Pd.hmac=VJ;Pd.equal=UJ.equal});var v2=$(y2=>{"use strict";u();l();c();Object.defineProperty(y2,"__esModule",{value:!0});var GN=KN(),WN=bn(),zJ=function(){function e(t,r,n,o){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=o;var i=GN.hmac(this._hash,n,r);this._hmac=new GN.HMAC(t,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(t===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},e.prototype.clean=function(){this._hmac.clean(),WN.wipe(this._buffer),WN.wipe(this._counter),this._bufpos=0},e}();y2.HKDF=zJ});var w2=$(fs=>{"use strict";u();l();c();Object.defineProperty(fs,"__esModule",{value:!0});var Kg=Vc(),qg=bn();fs.DIGEST_LENGTH=32;fs.BLOCK_SIZE=64;var YN=function(){function e(){this.digestLength=fs.DIGEST_LENGTH,this.blockSize=fs.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){qg.wipe(this._buffer),qg.wipe(this._temp),this.reset()},e.prototype.update=function(t,r){if(r===void 0&&(r=t.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&r>0;)this._buffer[this._bufferLength++]=t[n++],r--;this._bufferLength===this.blockSize&&(b2(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=b2(this._temp,this._state,t,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[n++],r--;return this},e.prototype.finish=function(t){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,o=r/536870912|0,i=r<<3,s=r%64<56?64:128;this._buffer[n]=128;for(var a=n+1;a<s-8;a++)this._buffer[a]=0;Kg.writeUint32BE(o,this._buffer,s-8),Kg.writeUint32BE(i,this._buffer,s-4),b2(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(var a=0;a<this.digestLength/4;a++)Kg.writeUint32BE(this._state[a],t,a*4);return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(t){return this._state.set(t.state),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(t){qg.wipe(t.state),t.buffer&&qg.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},e}();fs.SHA256=YN;var HJ=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function b2(e,t,r,n,o){for(;o>=64;){for(var i=t[0],s=t[1],a=t[2],f=t[3],d=t[4],h=t[5],g=t[6],v=t[7],b=0;b<16;b++){var w=n+b*4;e[b]=Kg.readUint32BE(r,w)}for(var b=16;b<64;b++){var _=e[b-2],C=(_>>>17|_<<32-17)^(_>>>19|_<<32-19)^_>>>10;_=e[b-15];var x=(_>>>7|_<<32-7)^(_>>>18|_<<32-18)^_>>>3;e[b]=(C+e[b-7]|0)+(x+e[b-16]|0)}for(var b=0;b<64;b++){var C=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&g)|0)+(v+(HJ[b]+e[b]|0)|0)|0,x=((i>>>2|i<<32-2)^(i>>>13|i<<32-13)^(i>>>22|i<<32-22))+(i&s^i&a^s&a)|0;v=g,g=h,h=d,d=f+C|0,f=a,a=s,s=i,i=C+x|0}t[0]+=i,t[1]+=s,t[2]+=a,t[3]+=f,t[4]+=d,t[5]+=h,t[6]+=g,t[7]+=v,n+=64,o-=64}return n}function qJ(e){var t=new YN;t.update(e);var r=t.digest();return t.clean(),r}fs.hash=qJ});var E2=$(dt=>{"use strict";u();l();c();Object.defineProperty(dt,"__esModule",{value:!0});dt.sharedKey=dt.generateKeyPair=dt.generateKeyPairFromSeed=dt.scalarMultBase=dt.scalarMult=dt.SHARED_KEY_LENGTH=dt.SECRET_KEY_LENGTH=dt.PUBLIC_KEY_LENGTH=void 0;var KJ=zc(),GJ=bn();dt.PUBLIC_KEY_LENGTH=32;dt.SECRET_KEY_LENGTH=32;dt.SHARED_KEY_LENGTH=32;function ho(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}var JN=new Uint8Array(32);JN[0]=9;var WJ=ho([56129,1]);function x2(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-t*65536}e[0]+=t-1+37*(t-1)}function Id(e,t,r){let n=~(r-1);for(let o=0;o<16;o++){let i=n&(e[o]^t[o]);e[o]^=i,t[o]^=i}}function YJ(e,t){let r=ho(),n=ho();for(let o=0;o<16;o++)n[o]=t[o];x2(n),x2(n),x2(n);for(let o=0;o<2;o++){r[0]=n[0]-65517;for(let s=1;s<15;s++)r[s]=n[s]-65535-(r[s-1]>>16&1),r[s-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let i=r[15]>>16&1;r[14]&=65535,Id(n,r,1-i)}for(let o=0;o<16;o++)e[2*o]=n[o]&255,e[2*o+1]=n[o]>>8}function JJ(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function Gg(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function Wg(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function oi(e,t,r){let n,o,i=0,s=0,a=0,f=0,d=0,h=0,g=0,v=0,b=0,w=0,_=0,C=0,x=0,S=0,E=0,T=0,A=0,O=0,P=0,I=0,R=0,k=0,L=0,M=0,F=0,j=0,V=0,G=0,H=0,ee=0,we=0,te=r[0],Z=r[1],ae=r[2],ie=r[3],re=r[4],se=r[5],ue=r[6],ce=r[7],ye=r[8],xe=r[9],_e=r[10],Ee=r[11],ve=r[12],Te=r[13],Pe=r[14],Ie=r[15];n=t[0],i+=n*te,s+=n*Z,a+=n*ae,f+=n*ie,d+=n*re,h+=n*se,g+=n*ue,v+=n*ce,b+=n*ye,w+=n*xe,_+=n*_e,C+=n*Ee,x+=n*ve,S+=n*Te,E+=n*Pe,T+=n*Ie,n=t[1],s+=n*te,a+=n*Z,f+=n*ae,d+=n*ie,h+=n*re,g+=n*se,v+=n*ue,b+=n*ce,w+=n*ye,_+=n*xe,C+=n*_e,x+=n*Ee,S+=n*ve,E+=n*Te,T+=n*Pe,A+=n*Ie,n=t[2],a+=n*te,f+=n*Z,d+=n*ae,h+=n*ie,g+=n*re,v+=n*se,b+=n*ue,w+=n*ce,_+=n*ye,C+=n*xe,x+=n*_e,S+=n*Ee,E+=n*ve,T+=n*Te,A+=n*Pe,O+=n*Ie,n=t[3],f+=n*te,d+=n*Z,h+=n*ae,g+=n*ie,v+=n*re,b+=n*se,w+=n*ue,_+=n*ce,C+=n*ye,x+=n*xe,S+=n*_e,E+=n*Ee,T+=n*ve,A+=n*Te,O+=n*Pe,P+=n*Ie,n=t[4],d+=n*te,h+=n*Z,g+=n*ae,v+=n*ie,b+=n*re,w+=n*se,_+=n*ue,C+=n*ce,x+=n*ye,S+=n*xe,E+=n*_e,T+=n*Ee,A+=n*ve,O+=n*Te,P+=n*Pe,I+=n*Ie,n=t[5],h+=n*te,g+=n*Z,v+=n*ae,b+=n*ie,w+=n*re,_+=n*se,C+=n*ue,x+=n*ce,S+=n*ye,E+=n*xe,T+=n*_e,A+=n*Ee,O+=n*ve,P+=n*Te,I+=n*Pe,R+=n*Ie,n=t[6],g+=n*te,v+=n*Z,b+=n*ae,w+=n*ie,_+=n*re,C+=n*se,x+=n*ue,S+=n*ce,E+=n*ye,T+=n*xe,A+=n*_e,O+=n*Ee,P+=n*ve,I+=n*Te,R+=n*Pe,k+=n*Ie,n=t[7],v+=n*te,b+=n*Z,w+=n*ae,_+=n*ie,C+=n*re,x+=n*se,S+=n*ue,E+=n*ce,T+=n*ye,A+=n*xe,O+=n*_e,P+=n*Ee,I+=n*ve,R+=n*Te,k+=n*Pe,L+=n*Ie,n=t[8],b+=n*te,w+=n*Z,_+=n*ae,C+=n*ie,x+=n*re,S+=n*se,E+=n*ue,T+=n*ce,A+=n*ye,O+=n*xe,P+=n*_e,I+=n*Ee,R+=n*ve,k+=n*Te,L+=n*Pe,M+=n*Ie,n=t[9],w+=n*te,_+=n*Z,C+=n*ae,x+=n*ie,S+=n*re,E+=n*se,T+=n*ue,A+=n*ce,O+=n*ye,P+=n*xe,I+=n*_e,R+=n*Ee,k+=n*ve,L+=n*Te,M+=n*Pe,F+=n*Ie,n=t[10],_+=n*te,C+=n*Z,x+=n*ae,S+=n*ie,E+=n*re,T+=n*se,A+=n*ue,O+=n*ce,P+=n*ye,I+=n*xe,R+=n*_e,k+=n*Ee,L+=n*ve,M+=n*Te,F+=n*Pe,j+=n*Ie,n=t[11],C+=n*te,x+=n*Z,S+=n*ae,E+=n*ie,T+=n*re,A+=n*se,O+=n*ue,P+=n*ce,I+=n*ye,R+=n*xe,k+=n*_e,L+=n*Ee,M+=n*ve,F+=n*Te,j+=n*Pe,V+=n*Ie,n=t[12],x+=n*te,S+=n*Z,E+=n*ae,T+=n*ie,A+=n*re,O+=n*se,P+=n*ue,I+=n*ce,R+=n*ye,k+=n*xe,L+=n*_e,M+=n*Ee,F+=n*ve,j+=n*Te,V+=n*Pe,G+=n*Ie,n=t[13],S+=n*te,E+=n*Z,T+=n*ae,A+=n*ie,O+=n*re,P+=n*se,I+=n*ue,R+=n*ce,k+=n*ye,L+=n*xe,M+=n*_e,F+=n*Ee,j+=n*ve,V+=n*Te,G+=n*Pe,H+=n*Ie,n=t[14],E+=n*te,T+=n*Z,A+=n*ae,O+=n*ie,P+=n*re,I+=n*se,R+=n*ue,k+=n*ce,L+=n*ye,M+=n*xe,F+=n*_e,j+=n*Ee,V+=n*ve,G+=n*Te,H+=n*Pe,ee+=n*Ie,n=t[15],T+=n*te,A+=n*Z,O+=n*ae,P+=n*ie,I+=n*re,R+=n*se,k+=n*ue,L+=n*ce,M+=n*ye,F+=n*xe,j+=n*_e,V+=n*Ee,G+=n*ve,H+=n*Te,ee+=n*Pe,we+=n*Ie,i+=38*A,s+=38*O,a+=38*P,f+=38*I,d+=38*R,h+=38*k,g+=38*L,v+=38*M,b+=38*F,w+=38*j,_+=38*V,C+=38*G,x+=38*H,S+=38*ee,E+=38*we,o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-o*65536,n=s+o+65535,o=Math.floor(n/65536),s=n-o*65536,n=a+o+65535,o=Math.floor(n/65536),a=n-o*65536,n=f+o+65535,o=Math.floor(n/65536),f=n-o*65536,n=d+o+65535,o=Math.floor(n/65536),d=n-o*65536,n=h+o+65535,o=Math.floor(n/65536),h=n-o*65536,n=g+o+65535,o=Math.floor(n/65536),g=n-o*65536,n=v+o+65535,o=Math.floor(n/65536),v=n-o*65536,n=b+o+65535,o=Math.floor(n/65536),b=n-o*65536,n=w+o+65535,o=Math.floor(n/65536),w=n-o*65536,n=_+o+65535,o=Math.floor(n/65536),_=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=x+o+65535,o=Math.floor(n/65536),x=n-o*65536,n=S+o+65535,o=Math.floor(n/65536),S=n-o*65536,n=E+o+65535,o=Math.floor(n/65536),E=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,i+=o-1+37*(o-1),o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-o*65536,n=s+o+65535,o=Math.floor(n/65536),s=n-o*65536,n=a+o+65535,o=Math.floor(n/65536),a=n-o*65536,n=f+o+65535,o=Math.floor(n/65536),f=n-o*65536,n=d+o+65535,o=Math.floor(n/65536),d=n-o*65536,n=h+o+65535,o=Math.floor(n/65536),h=n-o*65536,n=g+o+65535,o=Math.floor(n/65536),g=n-o*65536,n=v+o+65535,o=Math.floor(n/65536),v=n-o*65536,n=b+o+65535,o=Math.floor(n/65536),b=n-o*65536,n=w+o+65535,o=Math.floor(n/65536),w=n-o*65536,n=_+o+65535,o=Math.floor(n/65536),_=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=x+o+65535,o=Math.floor(n/65536),x=n-o*65536,n=S+o+65535,o=Math.floor(n/65536),S=n-o*65536,n=E+o+65535,o=Math.floor(n/65536),E=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=f,e[4]=d,e[5]=h,e[6]=g,e[7]=v,e[8]=b,e[9]=w,e[10]=_,e[11]=C,e[12]=x,e[13]=S,e[14]=E,e[15]=T}function Ad(e,t){oi(e,t,t)}function XJ(e,t){let r=ho();for(let n=0;n<16;n++)r[n]=t[n];for(let n=253;n>=0;n--)Ad(r,r),n!==2&&n!==4&&oi(r,r,t);for(let n=0;n<16;n++)e[n]=r[n]}function _2(e,t){let r=new Uint8Array(32),n=new Float64Array(80),o=ho(),i=ho(),s=ho(),a=ho(),f=ho(),d=ho();for(let b=0;b<31;b++)r[b]=e[b];r[31]=e[31]&127|64,r[0]&=248,JJ(n,t);for(let b=0;b<16;b++)i[b]=n[b];o[0]=a[0]=1;for(let b=254;b>=0;--b){let w=r[b>>>3]>>>(b&7)&1;Id(o,i,w),Id(s,a,w),Gg(f,o,s),Wg(o,o,s),Gg(s,i,a),Wg(i,i,a),Ad(a,f),Ad(d,o),oi(o,s,o),oi(s,i,f),Gg(f,o,s),Wg(o,o,s),Ad(i,o),Wg(s,a,d),oi(o,s,WJ),Gg(o,o,a),oi(s,s,o),oi(o,a,d),oi(a,i,n),Ad(i,f),Id(o,i,w),Id(s,a,w)}for(let b=0;b<16;b++)n[b+16]=o[b],n[b+32]=s[b],n[b+48]=i[b],n[b+64]=a[b];let h=n.subarray(32),g=n.subarray(16);XJ(h,h),oi(g,g,h);let v=new Uint8Array(32);return YJ(v,g),v}dt.scalarMult=_2;function XN(e){return _2(e,JN)}dt.scalarMultBase=XN;function QN(e){if(e.length!==dt.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${dt.SECRET_KEY_LENGTH} bytes`);let t=new Uint8Array(e);return{publicKey:XN(t),secretKey:t}}dt.generateKeyPairFromSeed=QN;function QJ(e){let t=(0,KJ.randomBytes)(32,e),r=QN(t);return(0,GJ.wipe)(t),r}dt.generateKeyPair=QJ;function ZJ(e,t,r=!1){if(e.length!==dt.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(t.length!==dt.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let n=_2(e,t);if(r){let o=0;for(let i=0;i<n.length;i++)o|=n[i];if(o===0)throw new Error("X25519: invalid shared key")}return n}dt.sharedKey=ZJ});var Yg=$(qe=>{"use strict";u();l();c();Object.defineProperty(qe,"__esModule",{value:!0});qe.getLocalStorage=qe.getLocalStorageOrThrow=qe.getCrypto=qe.getCryptoOrThrow=qe.getLocation=qe.getLocationOrThrow=qe.getNavigator=qe.getNavigatorOrThrow=qe.getDocument=qe.getDocumentOrThrow=qe.getFromWindowOrThrow=qe.getFromWindow=void 0;function wa(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}qe.getFromWindow=wa;function Zc(e){let t=wa(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}qe.getFromWindowOrThrow=Zc;function dX(){return Zc("document")}qe.getDocumentOrThrow=dX;function pX(){return wa("document")}qe.getDocument=pX;function hX(){return Zc("navigator")}qe.getNavigatorOrThrow=hX;function mX(){return wa("navigator")}qe.getNavigator=mX;function gX(){return Zc("location")}qe.getLocationOrThrow=gX;function yX(){return wa("location")}qe.getLocation=yX;function vX(){return Zc("crypto")}qe.getCryptoOrThrow=vX;function bX(){return wa("crypto")}qe.getCrypto=bX;function wX(){return Zc("localStorage")}qe.getLocalStorageOrThrow=wX;function xX(){return wa("localStorage")}qe.getLocalStorage=xX});var S2=$(Jg=>{"use strict";u();l();c();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.getWindowMetadata=void 0;var o9=Yg();function _X(){let e,t;try{e=o9.getDocumentOrThrow(),t=o9.getLocationOrThrow()}catch{return null}function r(){let g=e.getElementsByTagName("link"),v=[];for(let b=0;b<g.length;b++){let w=g[b],_=w.getAttribute("rel");if(_&&_.toLowerCase().indexOf("icon")>-1){let C=w.getAttribute("href");if(C)if(C.toLowerCase().indexOf("https:")===-1&&C.toLowerCase().indexOf("http:")===-1&&C.indexOf("//")!==0){let x=t.protocol+"//"+t.host;if(C.indexOf("/")===0)x+=C;else{let S=t.pathname.split("/");S.pop(),x+=S.join("/")+"/"+C}v.push(x)}else if(C.indexOf("//")===0){let x=t.protocol+C;v.push(x)}else v.push(C)}}return v}function n(...g){let v=e.getElementsByTagName("meta");for(let b=0;b<v.length;b++){let w=v[b],_=["itemprop","property","name"].map(C=>w.getAttribute(C)).filter(C=>C?g.includes(C):!1);if(_.length&&_){let C=w.getAttribute("content");if(C)return C}}return""}function o(){let g=n("name","og:site_name","og:title","twitter:title");return g||(g=e.title),g}function i(){return n("description","og:description","twitter:description","keywords")}let s=o(),a=i(),f=t.origin,d=r();return{description:a,url:f,icons:d,name:s}}Jg.getWindowMetadata=_X});var s9=$((d2e,i9)=>{"use strict";u();l();c();i9.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)});var f9=$((p2e,l9)=>{"use strict";u();l();c();var c9="%[a-f0-9]{2}",a9=new RegExp("("+c9+")|([^%]+?)","gi"),u9=new RegExp("("+c9+")+","gi");function C2(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],C2(r),C2(n))}function EX(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(a9)||[],r=1;r<t.length;r++)e=C2(t,r).join(""),t=e.match(a9)||[];return e}}function SX(e){for(var t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=u9.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=EX(r[0]);n!==r[0]&&(t[r[0]]=n)}r=u9.exec(e)}t["%C2"]="\uFFFD";for(var o=Object.keys(t),i=0;i<o.length;i++){var s=o[i];e=e.replace(new RegExp(s,"g"),t[s])}return e}l9.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return SX(e)}}});var p9=$((h2e,d9)=>{"use strict";u();l();c();d9.exports=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];let r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}});var m9=$((m2e,h9)=>{"use strict";u();l();c();h9.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;i<n.length;i++){var s=n[i],a=e[s];(o?t.indexOf(s)!==-1:t(s,a,e))&&(r[s]=a)}return r}});var P2=$(Nr=>{"use strict";u();l();c();var CX=s9(),TX=f9(),y9=p9(),PX=m9(),IX=e=>e==null,T2=Symbol("encodeFragmentIdentifier");function AX(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let o=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[gt(t,e),"[",o,"]"].join("")]:[...r,[gt(t,e),"[",gt(o,e),"]=",gt(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[gt(t,e),"[]"].join("")]:[...r,[gt(t,e),"[]=",gt(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[gt(t,e),":list="].join("")]:[...r,[gt(t,e),":list=",gt(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,o)=>o===void 0||e.skipNull&&o===null||e.skipEmptyString&&o===""?n:(o=o===null?"":o,n.length===0?[[gt(r,e),t,gt(o,e)].join("")]:[[n,gt(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,gt(t,e)]:[...r,[gt(t,e),"=",gt(n,e)].join("")]}}function DX(e){let t;switch(e.arrayFormat){case"index":return(r,n,o)=>{if(t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!t){o[r]=n;return}o[r]===void 0&&(o[r]={}),o[r][t[1]]=n};case"bracket":return(r,n,o)=>{if(t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[].concat(o[r],n)};case"colon-list-separator":return(r,n,o)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[].concat(o[r],n)};case"comma":case"separator":return(r,n,o)=>{let i=typeof n=="string"&&n.includes(e.arrayFormatSeparator),s=typeof n=="string"&&!i&&ii(n,e).includes(e.arrayFormatSeparator);n=s?ii(n,e):n;let a=i||s?n.split(e.arrayFormatSeparator).map(f=>ii(f,e)):n===null?n:ii(n,e);o[r]=a};case"bracket-separator":return(r,n,o)=>{let i=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!i){o[r]=n&&ii(n,e);return}let s=n===null?[]:n.split(e.arrayFormatSeparator).map(a=>ii(a,e));if(o[r]===void 0){o[r]=s;return}o[r]=[].concat(o[r],s)};default:return(r,n,o)=>{if(o[r]===void 0){o[r]=n;return}o[r]=[].concat(o[r],n)}}}function v9(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function gt(e,t){return t.encode?t.strict?CX(e):encodeURIComponent(e):e}function ii(e,t){return t.decode?TX(e):e}function b9(e){return Array.isArray(e)?e.sort():typeof e=="object"?b9(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function w9(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function OX(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function x9(e){e=w9(e);let t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function g9(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function _9(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t),v9(t.arrayFormatSeparator);let r=DX(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let o of e.split("&")){if(o==="")continue;let[i,s]=y9(t.decode?o.replace(/\+/g," "):o,"=");s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:ii(s,t),r(ii(i,t),s,n)}for(let o of Object.keys(n)){let i=n[o];if(typeof i=="object"&&i!==null)for(let s of Object.keys(i))i[s]=g9(i[s],t);else n[o]=g9(i,t)}return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((o,i)=>{let s=n[i];return Boolean(s)&&typeof s=="object"&&!Array.isArray(s)?o[i]=b9(s):o[i]=s,o},Object.create(null))}Nr.extract=x9;Nr.parse=_9;Nr.stringify=(e,t)=>{if(!e)return"";t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),v9(t.arrayFormatSeparator);let r=s=>t.skipNull&&IX(e[s])||t.skipEmptyString&&e[s]==="",n=AX(t),o={};for(let s of Object.keys(e))r(s)||(o[s]=e[s]);let i=Object.keys(o);return t.sort!==!1&&i.sort(t.sort),i.map(s=>{let a=e[s];return a===void 0?"":a===null?gt(s,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?gt(s,t)+"[]":a.reduce(n(s),[]).join("&"):gt(s,t)+"="+gt(a,t)}).filter(s=>s.length>0).join("&")};Nr.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=y9(e,"#");return Object.assign({url:r.split("?")[0]||"",query:_9(x9(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:ii(n,t)}:{})};Nr.stringifyUrl=(e,t)=>{t=Object.assign({encode:!0,strict:!0,[T2]:!0},t);let r=w9(e.url).split("?")[0]||"",n=Nr.extract(e.url),o=Nr.parse(n,{sort:!1}),i=Object.assign(o,e.query),s=Nr.stringify(i,t);s&&(s=`?${s}`);let a=OX(e.url);return e.fragmentIdentifier&&(a=`#${t[T2]?gt(e.fragmentIdentifier,t):e.fragmentIdentifier}`),`${r}${s}${a}`};Nr.pick=(e,t,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[T2]:!1},r);let{url:n,query:o,fragmentIdentifier:i}=Nr.parseUrl(e,r);return Nr.stringifyUrl({url:n,query:PX(o,t),fragmentIdentifier:i},r)};Nr.exclude=(e,t,r)=>{let n=Array.isArray(t)?o=>!t.includes(o):(o,i)=>!t(o,i);return Nr.pick(e,n,r)}});var w7=$(ps=>{"use strict";u();l();c();Object.defineProperty(ps,"__esModule",{value:!0});ps.isBrowserCryptoAvailable=ps.getSubtleCrypto=ps.getBrowerCrypto=void 0;function G2(){return(globalThis==null?void 0:globalThis.crypto)||(globalThis==null?void 0:globalThis.msCrypto)||{}}ps.getBrowerCrypto=G2;function b7(){let e=G2();return e.subtle||e.webkitSubtle}ps.getSubtleCrypto=b7;function lQ(){return!!G2()&&!!b7()}ps.isBrowserCryptoAvailable=lQ});var E7=$(hs=>{"use strict";u();l();c();Object.defineProperty(hs,"__esModule",{value:!0});hs.isBrowser=hs.isNode=hs.isReactNative=void 0;function x7(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}hs.isReactNative=x7;function _7(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}hs.isNode=_7;function fQ(){return!x7()&&!_7()}hs.isBrowser=fQ});var W2=$(cy=>{"use strict";u();l();c();Object.defineProperty(cy,"__esModule",{value:!0});var S7=Kr();S7.__exportStar(w7(),cy);S7.__exportStar(E7(),cy)});var O7=$((PEe,D7)=>{"use strict";u();l();c();D7.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}});var gk=$(($d,sl)=>{u();l();c();var EQ=200,fE="__lodash_hash_undefined__",_y=1,G7=2,W7=9007199254740991,my="[object Arguments]",oE="[object Array]",SQ="[object AsyncFunction]",Y7="[object Boolean]",J7="[object Date]",X7="[object Error]",Q7="[object Function]",CQ="[object GeneratorFunction]",gy="[object Map]",Z7="[object Number]",TQ="[object Null]",il="[object Object]",L7="[object Promise]",PQ="[object Proxy]",ek="[object RegExp]",yy="[object Set]",tk="[object String]",IQ="[object Symbol]",AQ="[object Undefined]",iE="[object WeakMap]",rk="[object ArrayBuffer]",vy="[object DataView]",DQ="[object Float32Array]",OQ="[object Float64Array]",RQ="[object Int8Array]",NQ="[object Int16Array]",kQ="[object Int32Array]",MQ="[object Uint8Array]",LQ="[object Uint8ClampedArray]",FQ="[object Uint16Array]",$Q="[object Uint32Array]",BQ=/[\\^$.*+?()[\]{}|]/g,UQ=/^\[object .+?Constructor\]$/,jQ=/^(?:0|[1-9]\d*)$/,Ye={};Ye[DQ]=Ye[OQ]=Ye[RQ]=Ye[NQ]=Ye[kQ]=Ye[MQ]=Ye[LQ]=Ye[FQ]=Ye[$Q]=!0;Ye[my]=Ye[oE]=Ye[rk]=Ye[Y7]=Ye[vy]=Ye[J7]=Ye[X7]=Ye[Q7]=Ye[gy]=Ye[Z7]=Ye[il]=Ye[ek]=Ye[yy]=Ye[tk]=Ye[iE]=!1;var nk=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,VQ=typeof self=="object"&&self&&self.Object===Object&&self,ci=nk||VQ||Function("return this")(),ok=typeof $d=="object"&&$d&&!$d.nodeType&&$d,F7=ok&&typeof sl=="object"&&sl&&!sl.nodeType&&sl,ik=F7&&F7.exports===ok,tE=ik&&nk.process,$7=function(){try{return tE&&tE.binding&&tE.binding("util")}catch{}}(),B7=$7&&$7.isTypedArray;function zQ(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function HQ(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function qQ(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function KQ(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function GQ(e){return function(t){return e(t)}}function WQ(e,t){return e.has(t)}function YQ(e,t){return e==null?void 0:e[t]}function JQ(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function XQ(e,t){return function(r){return e(t(r))}}function QQ(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZQ=Array.prototype,eZ=Function.prototype,Ey=Object.prototype,rE=ci["__core-js_shared__"],sk=eZ.toString,yo=Ey.hasOwnProperty,U7=function(){var e=/[^.]+$/.exec(rE&&rE.keys&&rE.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ak=Ey.toString,tZ=RegExp("^"+sk.call(yo).replace(BQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j7=ik?ci.Buffer:void 0,by=ci.Symbol,V7=ci.Uint8Array,uk=Ey.propertyIsEnumerable,rZ=ZQ.splice,Sa=by?by.toStringTag:void 0,z7=Object.getOwnPropertySymbols,nZ=j7?j7.isBuffer:void 0,oZ=XQ(Object.keys,Object),sE=al(ci,"DataView"),Bd=al(ci,"Map"),aE=al(ci,"Promise"),uE=al(ci,"Set"),cE=al(ci,"WeakMap"),Ud=al(Object,"create"),iZ=Pa(sE),sZ=Pa(Bd),aZ=Pa(aE),uZ=Pa(uE),cZ=Pa(cE),H7=by?by.prototype:void 0,nE=H7?H7.valueOf:void 0;function Ca(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function lZ(){this.__data__=Ud?Ud(null):{},this.size=0}function fZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function dZ(e){var t=this.__data__;if(Ud){var r=t[e];return r===fE?void 0:r}return yo.call(t,e)?t[e]:void 0}function pZ(e){var t=this.__data__;return Ud?t[e]!==void 0:yo.call(t,e)}function hZ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ud&&t===void 0?fE:t,this}Ca.prototype.clear=lZ;Ca.prototype.delete=fZ;Ca.prototype.get=dZ;Ca.prototype.has=pZ;Ca.prototype.set=hZ;function li(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function mZ(){this.__data__=[],this.size=0}function gZ(e){var t=this.__data__,r=Sy(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rZ.call(t,r,1),--this.size,!0}function yZ(e){var t=this.__data__,r=Sy(t,e);return r<0?void 0:t[r][1]}function vZ(e){return Sy(this.__data__,e)>-1}function bZ(e,t){var r=this.__data__,n=Sy(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}li.prototype.clear=mZ;li.prototype.delete=gZ;li.prototype.get=yZ;li.prototype.has=vZ;li.prototype.set=bZ;function Ta(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function wZ(){this.size=0,this.__data__={hash:new Ca,map:new(Bd||li),string:new Ca}}function xZ(e){var t=Cy(this,e).delete(e);return this.size-=t?1:0,t}function _Z(e){return Cy(this,e).get(e)}function EZ(e){return Cy(this,e).has(e)}function SZ(e,t){var r=Cy(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Ta.prototype.clear=wZ;Ta.prototype.delete=xZ;Ta.prototype.get=_Z;Ta.prototype.has=EZ;Ta.prototype.set=SZ;function wy(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ta;++t<r;)this.add(e[t])}function CZ(e){return this.__data__.set(e,fE),this}function TZ(e){return this.__data__.has(e)}wy.prototype.add=wy.prototype.push=CZ;wy.prototype.has=TZ;function ys(e){var t=this.__data__=new li(e);this.size=t.size}function PZ(){this.__data__=new li,this.size=0}function IZ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function AZ(e){return this.__data__.get(e)}function DZ(e){return this.__data__.has(e)}function OZ(e,t){var r=this.__data__;if(r instanceof li){var n=r.__data__;if(!Bd||n.length<EQ-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ta(n)}return r.set(e,t),this.size=r.size,this}ys.prototype.clear=PZ;ys.prototype.delete=IZ;ys.prototype.get=AZ;ys.prototype.has=DZ;ys.prototype.set=OZ;function RZ(e,t){var r=xy(e),n=!r&&GZ(e),o=!r&&!n&&lE(e),i=!r&&!n&&!o&&mk(e),s=r||n||o||i,a=s?KQ(e.length,String):[],f=a.length;for(var d in e)(t||yo.call(e,d))&&!(s&&(d=="length"||o&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||VZ(d,f)))&&a.push(d);return a}function Sy(e,t){for(var r=e.length;r--;)if(fk(e[r][0],t))return r;return-1}function NZ(e,t,r){var n=t(e);return xy(e)?n:HQ(n,r(e))}function Vd(e){return e==null?e===void 0?AQ:TQ:Sa&&Sa in Object(e)?UZ(e):KZ(e)}function q7(e){return jd(e)&&Vd(e)==my}function ck(e,t,r,n,o){return e===t?!0:e==null||t==null||!jd(e)&&!jd(t)?e!==e&&t!==t:kZ(e,t,r,n,ck,o)}function kZ(e,t,r,n,o,i){var s=xy(e),a=xy(t),f=s?oE:gs(e),d=a?oE:gs(t);f=f==my?il:f,d=d==my?il:d;var h=f==il,g=d==il,v=f==d;if(v&&lE(e)){if(!lE(t))return!1;s=!0,h=!1}if(v&&!h)return i||(i=new ys),s||mk(e)?lk(e,t,r,n,o,i):$Z(e,t,f,r,n,o,i);if(!(r&_y)){var b=h&&yo.call(e,"__wrapped__"),w=g&&yo.call(t,"__wrapped__");if(b||w){var _=b?e.value():e,C=w?t.value():t;return i||(i=new ys),o(_,C,r,n,i)}}return v?(i||(i=new ys),BZ(e,t,r,n,o,i)):!1}function MZ(e){if(!hk(e)||HZ(e))return!1;var t=dk(e)?tZ:UQ;return t.test(Pa(e))}function LZ(e){return jd(e)&&pk(e.length)&&!!Ye[Vd(e)]}function FZ(e){if(!qZ(e))return oZ(e);var t=[];for(var r in Object(e))yo.call(e,r)&&r!="constructor"&&t.push(r);return t}function lk(e,t,r,n,o,i){var s=r&_y,a=e.length,f=t.length;if(a!=f&&!(s&&f>a))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var h=-1,g=!0,v=r&G7?new wy:void 0;for(i.set(e,t),i.set(t,e);++h<a;){var b=e[h],w=t[h];if(n)var _=s?n(w,b,h,t,e,i):n(b,w,h,e,t,i);if(_!==void 0){if(_)continue;g=!1;break}if(v){if(!qQ(t,function(C,x){if(!WQ(v,x)&&(b===C||o(b,C,r,n,i)))return v.push(x)})){g=!1;break}}else if(!(b===w||o(b,w,r,n,i))){g=!1;break}}return i.delete(e),i.delete(t),g}function $Z(e,t,r,n,o,i,s){switch(r){case vy:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rk:return!(e.byteLength!=t.byteLength||!i(new V7(e),new V7(t)));case Y7:case J7:case Z7:return fk(+e,+t);case X7:return e.name==t.name&&e.message==t.message;case ek:case tk:return e==t+"";case gy:var a=JQ;case yy:var f=n&_y;if(a||(a=QQ),e.size!=t.size&&!f)return!1;var d=s.get(e);if(d)return d==t;n|=G7,s.set(e,t);var h=lk(a(e),a(t),n,o,i,s);return s.delete(e),h;case IQ:if(nE)return nE.call(e)==nE.call(t)}return!1}function BZ(e,t,r,n,o,i){var s=r&_y,a=K7(e),f=a.length,d=K7(t),h=d.length;if(f!=h&&!s)return!1;for(var g=f;g--;){var v=a[g];if(!(s?v in t:yo.call(t,v)))return!1}var b=i.get(e);if(b&&i.get(t))return b==t;var w=!0;i.set(e,t),i.set(t,e);for(var _=s;++g<f;){v=a[g];var C=e[v],x=t[v];if(n)var S=s?n(x,C,v,t,e,i):n(C,x,v,e,t,i);if(!(S===void 0?C===x||o(C,x,r,n,i):S)){w=!1;break}_||(_=v=="constructor")}if(w&&!_){var E=e.constructor,T=t.constructor;E!=T&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof T=="function"&&T instanceof T)&&(w=!1)}return i.delete(e),i.delete(t),w}function K7(e){return NZ(e,JZ,jZ)}function Cy(e,t){var r=e.__data__;return zZ(t)?r[typeof t=="string"?"string":"hash"]:r.map}function al(e,t){var r=YQ(e,t);return MZ(r)?r:void 0}function UZ(e){var t=yo.call(e,Sa),r=e[Sa];try{e[Sa]=void 0;var n=!0}catch{}var o=ak.call(e);return n&&(t?e[Sa]=r:delete e[Sa]),o}var jZ=z7?function(e){return e==null?[]:(e=Object(e),zQ(z7(e),function(t){return uk.call(e,t)}))}:XZ,gs=Vd;(sE&&gs(new sE(new ArrayBuffer(1)))!=vy||Bd&&gs(new Bd)!=gy||aE&&gs(aE.resolve())!=L7||uE&&gs(new uE)!=yy||cE&&gs(new cE)!=iE)&&(gs=function(e){var t=Vd(e),r=t==il?e.constructor:void 0,n=r?Pa(r):"";if(n)switch(n){case iZ:return vy;case sZ:return gy;case aZ:return L7;case uZ:return yy;case cZ:return iE}return t});function VZ(e,t){return t=t==null?W7:t,!!t&&(typeof e=="number"||jQ.test(e))&&e>-1&&e%1==0&&e<t}function zZ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function HZ(e){return!!U7&&U7 in e}function qZ(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ey;return e===r}function KZ(e){return ak.call(e)}function Pa(e){if(e!=null){try{return sk.call(e)}catch{}try{return e+""}catch{}}return""}function fk(e,t){return e===t||e!==e&&t!==t}var GZ=q7(function(){return arguments}())?q7:function(e){return jd(e)&&yo.call(e,"callee")&&!uk.call(e,"callee")},xy=Array.isArray;function WZ(e){return e!=null&&pk(e.length)&&!dk(e)}var lE=nZ||QZ;function YZ(e,t){return ck(e,t)}function dk(e){if(!hk(e))return!1;var t=Vd(e);return t==Q7||t==CQ||t==SQ||t==PQ}function pk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=W7}function hk(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function jd(e){return e!=null&&typeof e=="object"}var mk=B7?GQ(B7):LZ;function JZ(e){return WZ(e)?RZ(e):FZ(e)}function XZ(){return[]}function QZ(){return!1}sl.exports=YZ});var wo=X(()=>{u();l();c();Vt()});function zt(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var xn=X(()=>{u();l();c()});function Un(e){return zt(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var xo=X(()=>{u();l();c();xn()});var iM,sM=X(()=>{u();l();c();iM="0.3.37"});var aM,Gd=X(()=>{u();l();c();sM();aM=()=>`viem@${iM}`});var uM,Oy,cM,le,Ke=X(()=>{u();l();c();Gd();uM=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},le=class extends Error{constructor(t,r={}){var i;super(),Oy.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:aM()});let n=r.cause instanceof le?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,o=r.cause instanceof le&&r.cause.docsPath||r.docsPath;this.message=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
|
|
16
|
+
`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}walk(t){return uM(this,Oy,"m",cM).call(this,this,t)}};Oy=new WeakSet,cM=function e(t,r){return r!=null&&r(t)?t:t.cause?uM(this,Oy,"m",e).call(this,t.cause,r):t}});var fl,Wd,Ry,Vt=X(()=>{u();l();c();wo();xo();Ke();fl=class extends le{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
|
|
17
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}},Wd=class extends le{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}},Ry=class extends le{constructor(t){super(`Type "${t}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}});var dl,Ny=X(()=>{u();l();c();Ke();dl=class extends le{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}});function wr(e,{dir:t,size:r=32}={}){return typeof e=="string"?Yd(e,{dir:t,size:r}):HE(e,{dir:t,size:r})}function Yd(e,{dir:t,size:r=32}={}){if(r===null)return e;let n=e.replace("0x","");if(n.length>r*2)throw new dl({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function HE(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new dl({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let o=0;o<r;o++){let i=t==="right";n[i?o:r-o-1]=e[i?o:e.length-o-1]}return n}var pi=X(()=>{u();l();c();Ny()});var ky,My,pl=X(()=>{u();l();c();Ke();ky=class extends le{constructor({max:t,min:r,signed:n,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${o*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}},My=class extends le{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}});var hi=X(()=>{u();l();c()});function mi(e,{size:t}){if(Un(e)>t)throw new My({givenSize:Un(e),maxSize:t})}function Da(e,t={}){let{signed:r}=t;t.size&&mi(e,{size:t.size});let n=BigInt(e);if(!r)return n;let o=(e.length-2)/2,i=(1n<<BigInt(o)*8n-1n)-1n;return n<=i?n:n-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function lr(e,t={}){return Number(Da(e,t))}var Jt=X(()=>{u();l();c();pl();xo();hi();xr()});function _r(e,t={}){return typeof e=="number"||typeof e=="bigint"?pe(e,t):typeof e=="string"?gl(e,t):typeof e=="boolean"?ml(e,t):gi(e,t)}function ml(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(mi(r,{size:t.size}),wr(r,{size:t.size})):r}function gi(e,t={}){let r="";for(let o=0;o<e.length;o++)r+=xre[e[o]];let n=`0x${r}`;return typeof t.size=="number"?(mi(n,{size:t.size}),wr(n,{dir:"right",size:t.size})):n}function pe(e,t={}){let{signed:r,size:n}=t,o=BigInt(e),i;n?r?i=(1n<<BigInt(n)*8n-1n)-1n:i=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&o>i||o<s){let f=typeof e=="bigint"?"n":"";throw new ky({max:i?`${i}${f}`:void 0,min:`${s}${f}`,signed:r,size:n,value:`${e}${f}`})}let a=`0x${(r&&o<0?(1n<<BigInt(n*8))+BigInt(o):o).toString(16)}`;return n?wr(a,{size:n}):a}function gl(e,t={}){let r=_re.encode(e);return gi(r,t)}var xre,_re,fe=X(()=>{u();l();c();pl();pi();Jt();xre=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));_re=new TextEncoder});function yi(e,t={}){return typeof e=="number"||typeof e=="bigint"?KE(e,t):typeof e=="boolean"?qE(e,t):zt(e)?hl(e,t):ws(e,t)}function qE(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(mi(r,{size:t.size}),wr(r,{size:t.size})):r}function hl(e,t={}){let r=e;t.size&&(mi(r,{size:t.size}),r=wr(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let o=new Uint8Array(n.length/2);for(let i=0;i<o.length;i++){let s=i*2,a=n.slice(s,s+2),f=Number.parseInt(a,16);if(Number.isNaN(f)||f<0)throw new le(`Invalid byte sequence ("${a}" in "${n}").`);o[i]=f}return o}function KE(e,t){let r=pe(e,t);return hl(r)}function ws(e,t={}){let r=Ere.encode(e);return typeof t.size=="number"?(mi(r,{size:t.size}),wr(r,{dir:"right",size:t.size})):r}var Ere,xr=X(()=>{u();l();c();Ke();xn();pi();Jt();fe();Ere=new TextEncoder});var GE=X(()=>{u();l();c()});function WE(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Sre(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function lM(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Cre(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");WE(e.outputLen),WE(e.blockLen)}function Tre(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Pre(e,t){lM(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var Ire,Oa,fM=X(()=>{u();l();c();Ire={number:WE,bool:Sre,bytes:lM,hash:Cre,exists:Tre,output:Pre},Oa=Ire});function dM(e,t=!1){return t?{h:Number(e&Ly),l:Number(e>>YE&Ly)}:{h:Number(e>>YE&Ly)|0,l:Number(e&Ly)|0}}function Are(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:i,l:s}=dM(e[o],t);[r[o],n[o]]=[i,s]}return[r,n]}function zre(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var Ly,YE,Dre,Ore,Rre,Nre,kre,Mre,Lre,Fre,$re,Bre,Ure,jre,Vre,Hre,qre,Kre,Gre,Wre,Yre,Jre,yl,pM=X(()=>{u();l();c();Ly=BigInt(4294967295),YE=BigInt(32);Dre=(e,t)=>BigInt(e>>>0)<<YE|BigInt(t>>>0),Ore=(e,t,r)=>e>>>r,Rre=(e,t,r)=>e<<32-r|t>>>r,Nre=(e,t,r)=>e>>>r|t<<32-r,kre=(e,t,r)=>e<<32-r|t>>>r,Mre=(e,t,r)=>e<<64-r|t>>>r-32,Lre=(e,t,r)=>e>>>r-32|t<<64-r,Fre=(e,t)=>t,$re=(e,t)=>e,Bre=(e,t,r)=>e<<r|t>>>32-r,Ure=(e,t,r)=>t<<r|e>>>32-r,jre=(e,t,r)=>t<<r-32|e>>>64-r,Vre=(e,t,r)=>e<<r-32|t>>>64-r;Hre=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),qre=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,Kre=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Gre=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,Wre=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),Yre=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0,Jre={fromBig:dM,split:Are,toBig:Dre,shrSH:Ore,shrSL:Rre,rotrSH:Nre,rotrSL:kre,rotrBH:Mre,rotrBL:Lre,rotr32H:Fre,rotr32L:$re,rotlSH:Bre,rotlSL:Ure,rotlBH:jre,rotlBL:Vre,add:zre,add3L:Hre,add3H:qre,add4L:Kre,add4H:Gre,add5H:Yre,add5L:Wre},yl=Jre});var Xre,hM=X(()=>{u();l();c();Xre=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function Zre(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function $y(e){if(typeof e=="string"&&(e=Zre(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}function gM(e){let t=n=>e().update($y(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function yM(e){let t=(n,o)=>e(o).update($y(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}var mM,Qre,$3e,Fy,vM=X(()=>{u();l();c();hM();mM=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Qre=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Qre)throw new Error("Non little-endian hardware is not supported");$3e=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));Fy=class{clone(){return this._cloneInto()}}});function ane(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,d=r[f],h=r[f+1],g=bM(d,h,1)^r[a],v=wM(d,h,1)^r[a+1];for(let b=0;b<50;b+=10)e[s+b]^=g,e[s+b+1]^=v}let o=e[2],i=e[3];for(let s=0;s<24;s++){let a=_M[s],f=bM(o,i,a),d=wM(o,i,a),h=xM[s];o=e[h],i=e[h+1],e[h]=f,e[h+1]=d}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=ine[n],e[1]^=sne[n]}r.fill(0)}var xM,_M,EM,ene,Jd,tne,rne,nne,one,ine,sne,bM,wM,vl,xs,z3e,H3e,q3e,K3e,G3e,SM,W3e,Y3e,CM,J3e,X3e,TM=X(()=>{u();l();c();fM();pM();vM();[xM,_M,EM]=[[],[],[]],ene=BigInt(0),Jd=BigInt(1),tne=BigInt(2),rne=BigInt(7),nne=BigInt(256),one=BigInt(113);for(let e=0,t=Jd,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],xM.push(2*(5*n+r)),_M.push((e+1)*(e+2)/2%64);let o=ene;for(let i=0;i<7;i++)t=(t<<Jd^(t>>rne)*one)%nne,t&tne&&(o^=Jd<<(Jd<<BigInt(i))-Jd);EM.push(o)}[ine,sne]=yl.split(EM,!0),bM=(e,t,r)=>r>32?yl.rotlBH(e,t,r):yl.rotlSH(e,t,r),wM=(e,t,r)=>r>32?yl.rotlBL(e,t,r):yl.rotlSL(e,t,r);vl=class extends Fy{constructor(t,r,n,o=!1,i=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Oa.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=mM(this.state)}keccak(){ane(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Oa.exists(this);let{blockLen:r,state:n}=this;t=$y(t);let o=t.length;for(let i=0;i<o;){let s=Math.min(r-this.pos,o-i);for(let a=0;a<s;a++)n[this.pos++]^=t[i++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:n,blockLen:o}=this;t[n]^=r,(r&128)!==0&&n===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Oa.exists(this,!1),Oa.bytes(t),this.finish();let r=this.state,{blockLen:n}=this;for(let o=0,i=t.length;o<i;){this.posOut>=n&&this.keccak();let s=Math.min(n-this.posOut,i-o);t.set(r.subarray(this.posOut,this.posOut+s),o),this.posOut+=s,o+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Oa.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Oa.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:o,rounds:i,enableXOF:s}=this;return t||(t=new vl(r,n,o,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=n,t.outputLen=o,t.enableXOF=s,t.destroyed=this.destroyed,t}},xs=(e,t,r)=>gM(()=>new vl(t,e,r)),z3e=xs(6,144,224/8),H3e=xs(6,136,256/8),q3e=xs(6,104,384/8),K3e=xs(6,72,512/8),G3e=xs(1,144,224/8),SM=xs(1,136,256/8),W3e=xs(1,104,384/8),Y3e=xs(1,72,512/8),CM=(e,t,r)=>yM((n={})=>new vl(t,e,n.dkLen===void 0?r:n.dkLen,!0)),J3e=CM(31,168,128/8),X3e=CM(31,136,256/8)});function Yr(e,t){let r=t||"hex",n=SM(zt(e,{strict:!1})?yi(e):e);return r==="bytes"?n:_r(n)}var _n=X(()=>{u();l();c();TM();xn();xr();fe()});var JE=X(()=>{u();l();c();GE();xr();_n()});var Jr,jn=X(()=>{u();l();c();Ke();Jr=class extends le{constructor({address:t}){super(`Address "${t}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}});function Xr(e){return fne.test(e)}var fne,Qr=X(()=>{u();l();c();fne=/^0x[a-fA-F0-9]{40}$/});function En(e){return typeof e[0]=="string"?Ra(e):XE(e)}function XE(e){let t=0;for(let o of e)t+=o.length;let r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}function Ra(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var Er=X(()=>{u();l();c()});var _o=X(()=>{u();l();c();Ny();xn();xo()});var Vn=X(()=>{u();l();c();Vt();jn();Qr();Er();pi();xo();_o();fe()});var Eo=X(()=>{u();l();c();Qr()});var Zr=X(()=>{u();l();c()});var ka=X(()=>{u();l();c();_o();JE()});var zn=X(()=>{u();l();c();Vt();Er();ka();Vn();wo();Eo()});var Uy=X(()=>{u();l();c()});var So=X(()=>{u();l();c();jn();xr();_n();Qr()});var Ma=X(()=>{u();l();c();Vt();So();xo();_o();hi();Jt();Vn()});var Zd=X(()=>{u();l();c();Uy();Vt();_o();ka();Ma();wo()});var Sr=X(()=>{u();l();c()});var t3=X(()=>{u();l();c();Sr()});var Vy,bl=X(()=>{u();l();c();Vy={ether:-9,wei:9}});function ep(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${i?`.${i}`:""}`}var tp=X(()=>{u();l();c()});var wl=X(()=>{u();l();c();bl();tp()});function Co(e,t="wei"){return ep(e,Vy[t])}var La=X(()=>{u();l();c();bl();tp()});var tn=X(()=>{u();l();c();wl();La();Ke()});var Ss=X(()=>{u();l();c();Zr();Uy();Zd();wo();t3();Eo();wl();La();Ke();tn();Gd()});var xl,Fa,rp,np,op,ip,sp,ap,up,cp,$a,lp=X(()=>{u();l();c();La();Ke();xl=class extends le{constructor({cause:t,message:r}={}){var o;let n=(o=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}};Object.defineProperty(xl,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(xl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});Fa=class extends le{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Co(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}};Object.defineProperty(Fa,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});rp=class extends le{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Co(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}};Object.defineProperty(rp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});np=class extends le{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}};Object.defineProperty(np,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});op=class extends le{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
18
|
+
`),{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}};Object.defineProperty(op,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported/});ip=class extends le{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}};Object.defineProperty(ip,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});sp=class extends le{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
19
|
+
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}};Object.defineProperty(sp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});ap=class extends le{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}};Object.defineProperty(ap,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});up=class extends le{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}};Object.defineProperty(up,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});cp=class extends le{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}};Object.defineProperty(cp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});$a=class extends le{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Co(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Co(n)} gwei`:""}).`].join(`
|
|
20
|
+
`),{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}};Object.defineProperty($a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/})});var Ba=X(()=>{u();l();c();Sr();Ke();Gd()});var Hy=X(()=>{u();l();c();Ke();Ba()});var fp=X(()=>{u();l();c();lp();Ba();Hy()});var dp=X(()=>{u();l();c()});function vi({format:e}){return({exclude:t,format:r})=>n=>{let o=e(n);if(t)for(let i of t)delete o[i];return D(D({},o),r==null?void 0:r(n))}}var rn=X(()=>{u();l();c()});function Ua(e){return B(D({},e),{gas:typeof e.gas<"u"?pe(e.gas):void 0,gasPrice:typeof e.gasPrice<"u"?pe(e.gasPrice):void 0,maxFeePerGas:typeof e.maxFeePerGas<"u"?pe(e.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof e.maxPriorityFeePerGas<"u"?pe(e.maxPriorityFeePerGas):void 0,nonce:typeof e.nonce<"u"?pe(e.nonce):void 0,value:typeof e.value<"u"?pe(e.value):void 0})}var kM,ja=X(()=>{u();l();c();fe();rn();kM=vi({format:Ua})});var Va=X(()=>{u();l();c();Zr();jn();lp();tn();Qr()});var wi=X(()=>{u();l();c();Vt();Ma();Eo()});var za=X(()=>{u();l();c()});var BM=X(()=>{u();l();c()});var gp=X(()=>{u();l();c();Ke()});var To=X(()=>{u();l();c();gp()});var l3=X(()=>{u();l();c();Ss();fp()});var f3=X(()=>{u();l();c()});var qa=X(()=>{u();l();c();Zr();za();BM();Ke();gp();Ss();wi();zn();To();fe();l3();dp();rn();ja();f3();Va()});var nL=X(()=>{u();l();c();Sr();Ke();Gd()});var Cl=X(()=>{u();l();c();jn();Qr()});var b3=X(()=>{u();l();c();qa();Ke();nL();Ba();Zd();Vn();Cl();Er();xn();Sr()});var v7e,b7e,w7e,x7e,vL=X(()=>{u();l();c();v7e=BigInt(0),b7e=BigInt(1),w7e=BigInt(2),x7e=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});var iF=$((yje,cv)=>{u();l();c();var kL,ML,LL,FL,$L,BL,UL,jL,VL,zL,HL,qL,KL,av,e6,GL,WL,YL,Tl,JL,XL,QL,ZL,eF,tF,rF,nF,oF,uv;(function(e){var t=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof cv=="object"&&typeof cv.exports=="object"?e(r(t,r(cv.exports))):e(r(t));function r(n,o){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])};kL=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(n,o);function i(){this.constructor=n}n.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},ML=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},LL=function(n,o){var i={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.indexOf(s)<0&&(i[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(n);a<s.length;a++)o.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(n,s[a])&&(i[s[a]]=n[s[a]]);return i},FL=function(n,o,i,s){var a=arguments.length,f=a<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,i):s,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(n,o,i,s);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(f=(a<3?d(f):a>3?d(o,i,f):d(o,i))||f);return a>3&&f&&Object.defineProperty(o,i,f),f},$L=function(n,o){return function(i,s){o(i,s,n)}},BL=function(n,o,i,s,a,f){function d(T){if(T!==void 0&&typeof T!="function")throw new TypeError("Function expected");return T}for(var h=s.kind,g=h==="getter"?"get":h==="setter"?"set":"value",v=!o&&n?s.static?n:n.prototype:null,b=o||(v?Object.getOwnPropertyDescriptor(v,s.name):{}),w,_=!1,C=i.length-1;C>=0;C--){var x={};for(var S in s)x[S]=S==="access"?{}:s[S];for(var S in s.access)x.access[S]=s.access[S];x.addInitializer=function(T){if(_)throw new TypeError("Cannot add initializers after decoration has completed");f.push(d(T||null))};var E=(0,i[C])(h==="accessor"?{get:b.get,set:b.set}:b[g],x);if(h==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(w=d(E.get))&&(b.get=w),(w=d(E.set))&&(b.set=w),(w=d(E.init))&&a.push(w)}else(w=d(E))&&(h==="field"?a.push(w):b[g]=w)}v&&Object.defineProperty(v,s.name,b),_=!0},UL=function(n,o,i){for(var s=arguments.length>2,a=0;a<o.length;a++)i=s?o[a].call(n,i):o[a].call(n);return s?i:void 0},jL=function(n){return typeof n=="symbol"?n:"".concat(n)},VL=function(n,o,i){return typeof o=="symbol"&&(o=o.description?"[".concat(o.description,"]"):""),Object.defineProperty(n,"name",{configurable:!0,value:i?"".concat(i," ",o):o})},zL=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)},HL=function(n,o,i,s){function a(f){return f instanceof i?f:new i(function(d){d(f)})}return new(i||(i=Promise))(function(f,d){function h(b){try{v(s.next(b))}catch(w){d(w)}}function g(b){try{v(s.throw(b))}catch(w){d(w)}}function v(b){b.done?f(b.value):a(b.value).then(h,g)}v((s=s.apply(n,o||[])).next())})},qL=function(n,o){var i={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},s,a,f,d;return d={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function h(v){return function(b){return g([v,b])}}function g(v){if(s)throw new TypeError("Generator is already executing.");for(;d&&(d=0,v[0]&&(i=0)),i;)try{if(s=1,a&&(f=v[0]&2?a.return:v[0]?a.throw||((f=a.return)&&f.call(a),0):a.next)&&!(f=f.call(a,v[1])).done)return f;switch(a=0,f&&(v=[v[0]&2,f.value]),v[0]){case 0:case 1:f=v;break;case 4:return i.label++,{value:v[1],done:!1};case 5:i.label++,a=v[1],v=[0];continue;case 7:v=i.ops.pop(),i.trys.pop();continue;default:if(f=i.trys,!(f=f.length>0&&f[f.length-1])&&(v[0]===6||v[0]===2)){i=0;continue}if(v[0]===3&&(!f||v[1]>f[0]&&v[1]<f[3])){i.label=v[1];break}if(v[0]===6&&i.label<f[1]){i.label=f[1],f=v;break}if(f&&i.label<f[2]){i.label=f[2],i.ops.push(v);break}f[2]&&i.ops.pop(),i.trys.pop();continue}v=o.call(n,i)}catch(b){v=[6,b],a=0}finally{s=f=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},KL=function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&uv(o,n,i)},uv=Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]},av=function(n){var o=typeof Symbol=="function"&&Symbol.iterator,i=o&&n[o],s=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},e6=function(n,o){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var s=i.call(n),a,f=[],d;try{for(;(o===void 0||o-- >0)&&!(a=s.next()).done;)f.push(a.value)}catch(h){d={error:h}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(d)throw d.error}}return f},GL=function(){for(var n=[],o=0;o<arguments.length;o++)n=n.concat(e6(arguments[o]));return n},WL=function(){for(var n=0,o=0,i=arguments.length;o<i;o++)n+=arguments[o].length;for(var s=Array(n),a=0,o=0;o<i;o++)for(var f=arguments[o],d=0,h=f.length;d<h;d++,a++)s[a]=f[d];return s},YL=function(n,o,i){if(i||arguments.length===2)for(var s=0,a=o.length,f;s<a;s++)(f||!(s in o))&&(f||(f=Array.prototype.slice.call(o,0,s)),f[s]=o[s]);return n.concat(f||Array.prototype.slice.call(o))},Tl=function(n){return this instanceof Tl?(this.v=n,this):new Tl(n)},JL=function(n,o,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(n,o||[]),a,f=[];return a={},d("next"),d("throw"),d("return"),a[Symbol.asyncIterator]=function(){return this},a;function d(_){s[_]&&(a[_]=function(C){return new Promise(function(x,S){f.push([_,C,x,S])>1||h(_,C)})})}function h(_,C){try{g(s[_](C))}catch(x){w(f[0][3],x)}}function g(_){_.value instanceof Tl?Promise.resolve(_.value.v).then(v,b):w(f[0][2],_)}function v(_){h("next",_)}function b(_){h("throw",_)}function w(_,C){_(C),f.shift(),f.length&&h(f[0][0],f[0][1])}},XL=function(n){var o,i;return o={},s("next"),s("throw",function(a){throw a}),s("return"),o[Symbol.iterator]=function(){return this},o;function s(a,f){o[a]=n[a]?function(d){return(i=!i)?{value:Tl(n[a](d)),done:!1}:f?f(d):d}:f}},QL=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],i;return o?o.call(n):(n=typeof av=="function"?av(n):n[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(f){i[f]=n[f]&&function(d){return new Promise(function(h,g){d=n[f](d),a(h,g,d.done,d.value)})}}function a(f,d,h,g){Promise.resolve(g).then(function(v){f({value:v,done:h})},d)}},ZL=function(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n};var r=Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o};eF=function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&uv(o,n,i);return r(o,n),o},tF=function(n){return n&&n.__esModule?n:{default:n}},rF=function(n,o,i,s){if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?n!==o||!s:!o.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?s:i==="a"?s.call(n):s?s.value:o.get(n)},nF=function(n,o,i,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?n!==o||!a:!o.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(n,i):a?a.value=i:o.set(n,i),i},oF=function(n,o){if(o===null||typeof o!="object"&&typeof o!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?o===n:n.has(o)},e("__extends",kL),e("__assign",ML),e("__rest",LL),e("__decorate",FL),e("__param",$L),e("__esDecorate",BL),e("__runInitializers",UL),e("__propKey",jL),e("__setFunctionName",VL),e("__metadata",zL),e("__awaiter",HL),e("__generator",qL),e("__exportStar",KL),e("__createBinding",uv),e("__values",av),e("__read",e6),e("__spread",GL),e("__spreadArrays",WL),e("__spreadArray",YL),e("__await",Tl),e("__asyncGenerator",JL),e("__asyncDelegator",XL),e("__asyncValues",QL),e("__makeTemplateObject",ZL),e("__importStar",eF),e("__importDefault",tF),e("__classPrivateFieldGet",rF),e("__classPrivateFieldSet",nF),e("__classPrivateFieldIn",oF)})});var v6=$(y6=>{"use strict";u();l();c();Object.defineProperty(y6,"__esModule",{value:!0});y6.default=[{alpha2:"US",alpha3:"USA",country_code:"1",country_name:"United States",mobile_begin_with:["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","220","223","224","225","227","228","229","231","234","239","240","248","251","252","253","254","256","260","262","267","269","270","272","274","276","278","281","283","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","327","330","331","332","334","336","337","339","341","346","347","351","352","360","361","364","369","380","385","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","424","425","430","432","434","435","440","441","442","443","445","447","458","463","464","469","470","475","478","479","480","484","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","531","534","539","540","541","551","557","559","561","562","563","564","567","570","571","572","573","574","575","580","582","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","627","628","629","630","631","636","640","641","646","650","651","656","657","659","660","661","662","667","669","678","679","680","681","682","689","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","720","724","725","726","727","730","731","732","734","737","740","743","747","752","754","757","760","762","763","764","765","769","770","771","772","773","774","775","779","781","785","786","787","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","820","828","830","831","832","835","838","840","843","845","847","848","850","854","856","857","858","859","860","862","863","864","865","870","872","878","901","903","904","906","907","908","909","910","912","913","914","915","916","917","918","919","920","925","927","928","929","930","931","934","935","936","937","938","939","940","941","945","947","949","951","952","954","956","957","959","970","971","972","973","975","978","979","980","984","985","986","989","888","800","833","844","855","866","877","279","340","983","448","943","363","326","839","826","948"],phone_number_lengths:[10]},{alpha2:"AW",alpha3:"ABW",country_code:"297",country_name:"Aruba",mobile_begin_with:["5","6","7","9"],phone_number_lengths:[7]},{alpha2:"AF",alpha3:"AFG",country_code:"93",country_name:"Afghanistan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"AO",alpha3:"AGO",country_code:"244",country_name:"Angola",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"AI",alpha3:"AIA",country_code:"1",country_name:"Anguilla",mobile_begin_with:["2645","2647"],phone_number_lengths:[10]},{alpha2:"AX",alpha3:"ALA",country_code:"358",country_name:"\xC5land Islands",mobile_begin_with:["18"],phone_number_lengths:[6,7,8]},{alpha2:"AL",alpha3:"ALB",country_code:"355",country_name:"Albania",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"AD",alpha3:"AND",country_code:"376",country_name:"Andorra",mobile_begin_with:["3","4","6"],phone_number_lengths:[6]},{alpha2:"AE",alpha3:"ARE",country_code:"971",country_name:"United Arab Emirates",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"AR",alpha3:"ARG",country_code:"54",country_name:"Argentina",mobile_begin_with:["1","2","3"],phone_number_lengths:[8,9,10,11,12]},{alpha2:"AM",alpha3:"ARM",country_code:"374",country_name:"Armenia",mobile_begin_with:["3","4","5","7","9"],phone_number_lengths:[8]},{alpha2:"AS",alpha3:"ASM",country_code:"1",country_name:"American Samoa",mobile_begin_with:["684733","684258"],phone_number_lengths:[10]},{alpha2:"AG",alpha3:"ATG",country_code:"1",country_name:"Antigua and Barbuda",mobile_begin_with:["2687"],phone_number_lengths:[10]},{alpha2:"AU",alpha3:"AUS",country_code:"61",country_name:"Australia",mobile_begin_with:["4"],phone_number_lengths:[9]},{alpha2:"AT",alpha3:"AUT",country_code:"43",country_name:"Austria",mobile_begin_with:["6"],phone_number_lengths:[10,11,12,13,14]},{alpha2:"AZ",alpha3:"AZE",country_code:"994",country_name:"Azerbaijan",mobile_begin_with:["4","5","6","7"],phone_number_lengths:[9]},{alpha2:"BI",alpha3:"BDI",country_code:"257",country_name:"Burundi",mobile_begin_with:["7","29"],phone_number_lengths:[8]},{alpha2:"BE",alpha3:"BEL",country_code:"32",country_name:"Belgium",mobile_begin_with:["4","3"],phone_number_lengths:[9,8]},{alpha2:"BJ",alpha3:"BEN",country_code:"229",country_name:"Benin",mobile_begin_with:["4","6","9"],phone_number_lengths:[8]},{alpha2:"BF",alpha3:"BFA",country_code:"226",country_name:"Burkina Faso",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BD",alpha3:"BGD",country_code:"880",country_name:"Bangladesh",mobile_begin_with:["1"],phone_number_lengths:[8,9,10]},{alpha2:"BG",alpha3:"BGR",country_code:"359",country_name:"Bulgaria",mobile_begin_with:["87","88","89","98","99","43"],phone_number_lengths:[8,9]},{alpha2:"BH",alpha3:"BHR",country_code:"973",country_name:"Bahrain",mobile_begin_with:["3"],phone_number_lengths:[8]},{alpha2:"BS",alpha3:"BHS",country_code:"1",country_name:"Bahamas",mobile_begin_with:["242"],phone_number_lengths:[10]},{alpha2:"BA",alpha3:"BIH",country_code:"387",country_name:"Bosnia and Herzegovina",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"BY",alpha3:"BLR",country_code:"375",country_name:"Belarus",mobile_begin_with:["25","29","33","44"],phone_number_lengths:[9]},{alpha2:"BZ",alpha3:"BLZ",country_code:"501",country_name:"Belize",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"BM",alpha3:"BMU",country_code:"1",country_name:"Bermuda",mobile_begin_with:["4413","4415","4417"],phone_number_lengths:[10]},{alpha2:"BO",alpha3:"BOL",country_code:"591",country_name:"Bolivia",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"BR",alpha3:"BRA",country_code:"55",country_name:"Brazil",mobile_begin_with:["119","129","139","149","159","169","179","189","199","219","229","249","279","289","319","329","339","349","359","379","389","419","429","439","449","459","469","479","489","499","519","539","549","559","619","629","639","649","659","669","679","689","699","719","739","749","759","779","799","819","829","839","849","859","869","879","889","899","919","929","939","949","959","969","979","989","999"],phone_number_lengths:[10,11]},{alpha2:"BB",alpha3:"BRB",country_code:"1",country_name:"Barbados",mobile_begin_with:["246"],phone_number_lengths:[10]},{alpha2:"BN",alpha3:"BRN",country_code:"673",country_name:"Brunei Darussalam",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"BT",alpha3:"BTN",country_code:"975",country_name:"Bhutan",mobile_begin_with:["17"],phone_number_lengths:[8]},{alpha2:"BW",alpha3:"BWA",country_code:"267",country_name:"Botswana",mobile_begin_with:["71","72","73","74","75","76"],phone_number_lengths:[8]},{alpha2:"CF",alpha3:"CAF",country_code:"236",country_name:"Central African Republic",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"CA",alpha3:"CAN",country_code:"1",country_name:"Canada",mobile_begin_with:["204","226","236","249","250","263","289","306","343","354","365","367","368","403","416","418","431","437","438","450","468","474","506","514","519","548","579","581","584","587","600","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","902","905","428","382"],phone_number_lengths:[10]},{alpha2:"CH",alpha3:"CHE",country_code:"41",country_name:"Switzerland",mobile_begin_with:["74","75","76","77","78","79"],phone_number_lengths:[9]},{alpha2:"CL",alpha3:"CHL",country_code:"56",country_name:"Chile",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"CN",alpha3:"CHN",country_code:"86",country_name:"China",mobile_begin_with:["13","14","15","17","18","19","16"],phone_number_lengths:[11]},{alpha2:"CI",alpha3:"CIV",country_code:"225",country_name:"C\xF4te D'Ivoire",mobile_begin_with:["0","4","5","6","7","8"],phone_number_lengths:[10]},{alpha2:"CM",alpha3:"CMR",country_code:"237",country_name:"Cameroon",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"CD",alpha3:"COD",country_code:"243",country_name:"Congo, The Democratic Republic Of The",mobile_begin_with:["8","9"],phone_number_lengths:[9]},{alpha2:"CG",alpha3:"COG",country_code:"242",country_name:"Congo",mobile_begin_with:["0"],phone_number_lengths:[9]},{alpha2:"CK",alpha3:"COK",country_code:"682",country_name:"Cook Islands",mobile_begin_with:["5","7"],phone_number_lengths:[5]},{alpha2:"CO",alpha3:"COL",country_code:"57",country_name:"Colombia",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"CW",alpha3:"CUW",country_code:"5999",country_name:"Cura\xE7ao",mobile_begin_with:["5","6"],phone_number_lengths:[7]},{alpha2:"KM",alpha3:"COM",country_code:"269",country_name:"Comoros",mobile_begin_with:["3","76"],phone_number_lengths:[7]},{alpha2:"CV",alpha3:"CPV",country_code:"238",country_name:"Cape Verde",mobile_begin_with:["5","9"],phone_number_lengths:[7]},{alpha2:"CR",alpha3:"CRI",country_code:"506",country_name:"Costa Rica",mobile_begin_with:["5","6","7","8"],phone_number_lengths:[8]},{alpha2:"CU",alpha3:"CUB",country_code:"53",country_name:"Cuba",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"KY",alpha3:"CYM",country_code:"1",country_name:"Cayman Islands",mobile_begin_with:["345"],phone_number_lengths:[10]},{alpha2:"CY",alpha3:"CYP",country_code:"357",country_name:"Cyprus",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"CZ",alpha3:"CZE",country_code:"420",country_name:"Czech Republic",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"DE",alpha3:"DEU",country_code:"49",country_name:"Germany",mobile_begin_with:["15","16","17"],phone_number_lengths:[10,11]},{alpha2:"DJ",alpha3:"DJI",country_code:"253",country_name:"Djibouti",mobile_begin_with:["77"],phone_number_lengths:[8]},{alpha2:"DM",alpha3:"DMA",country_code:"1",country_name:"Dominica",mobile_begin_with:["767"],phone_number_lengths:[10]},{alpha2:"DK",alpha3:"DNK",country_code:"45",country_name:"Denmark",mobile_begin_with:["2","30","31","40","41","42","50","51","52","53","60","61","71","81","91","92","93"],phone_number_lengths:[8]},{alpha2:"DO",alpha3:"DOM",country_code:"1",country_name:"Dominican Republic",mobile_begin_with:["809","829","849"],phone_number_lengths:[10]},{alpha2:"DZ",alpha3:"DZA",country_code:"213",country_name:"Algeria",mobile_begin_with:["5","6","7"],phone_number_lengths:[9]},{alpha2:"EC",alpha3:"ECU",country_code:"593",country_name:"Ecuador",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"EG",alpha3:"EGY",country_code:"20",country_name:"Egypt",mobile_begin_with:["1"],phone_number_lengths:[10,8]},{alpha2:"ER",alpha3:"ERI",country_code:"291",country_name:"Eritrea",mobile_begin_with:["1","7","8"],phone_number_lengths:[7]},{alpha2:"ES",alpha3:"ESP",country_code:"34",country_name:"Spain",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"EE",alpha3:"EST",country_code:"372",country_name:"Estonia",mobile_begin_with:["5","81","82","83"],phone_number_lengths:[7,8]},{alpha2:"ET",alpha3:"ETH",country_code:"251",country_name:"Ethiopia",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"FI",alpha3:"FIN",country_code:"358",country_name:"Finland",mobile_begin_with:["4","5"],phone_number_lengths:[9,10]},{alpha2:"FJ",alpha3:"FJI",country_code:"679",country_name:"Fiji",mobile_begin_with:["2","7","8","9"],phone_number_lengths:[7]},{alpha2:"FK",alpha3:"FLK",country_code:"500",country_name:"Falkland Islands (Malvinas)",mobile_begin_with:["5","6"],phone_number_lengths:[5]},{alpha2:"FR",alpha3:"FRA",country_code:"33",country_name:"France",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"FO",alpha3:"FRO",country_code:"298",country_name:"Faroe Islands",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"FM",alpha3:"FSM",country_code:"691",country_name:"Micronesia, Federated States Of",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"GA",alpha3:"GAB",country_code:"241",country_name:"Gabon",mobile_begin_with:["2","3","4","5","6","7"],phone_number_lengths:[7]},{alpha2:"GB",alpha3:"GBR",country_code:"44",country_name:"United Kingdom",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"GE",alpha3:"GEO",country_code:"995",country_name:"Georgia",mobile_begin_with:["5","7"],phone_number_lengths:[9]},{alpha2:"GH",alpha3:"GHA",country_code:"233",country_name:"Ghana",mobile_begin_with:["2","5"],phone_number_lengths:[9]},{alpha2:"GI",alpha3:"GIB",country_code:"350",country_name:"Gibraltar",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"GN",alpha3:"GIN",country_code:"224",country_name:"Guinea",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"GP",alpha3:"GLP",country_code:"590",country_name:"Guadeloupe",mobile_begin_with:["690"],phone_number_lengths:[9]},{alpha2:"GM",alpha3:"GMB",country_code:"220",country_name:"Gambia",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"GW",alpha3:"GNB",country_code:"245",country_name:"Guinea-Bissau",mobile_begin_with:["5","6","7"],phone_number_lengths:[7]},{alpha2:"GQ",alpha3:"GNQ",country_code:"240",country_name:"Equatorial Guinea",mobile_begin_with:["222","551"],phone_number_lengths:[9]},{alpha2:"GR",alpha3:"GRC",country_code:"30",country_name:"Greece",mobile_begin_with:["6"],phone_number_lengths:[10]},{alpha2:"GD",alpha3:"GRD",country_code:"1",country_name:"Grenada",mobile_begin_with:["473"],phone_number_lengths:[10]},{alpha2:"GL",alpha3:"GRL",country_code:"299",country_name:"Greenland",mobile_begin_with:["2","4","5"],phone_number_lengths:[6]},{alpha2:"GT",alpha3:"GTM",country_code:"502",country_name:"Guatemala",mobile_begin_with:["3","4","5"],phone_number_lengths:[8]},{alpha2:"GF",alpha3:"GUF",country_code:"594",country_name:"French Guiana",mobile_begin_with:["694"],phone_number_lengths:[9]},{alpha2:"GU",alpha3:"GUM",country_code:"1",country_name:"Guam",mobile_begin_with:["671"],phone_number_lengths:[10]},{alpha2:"GY",alpha3:"GUY",country_code:"592",country_name:"Guyana",mobile_begin_with:["6"],phone_number_lengths:[7]},{alpha2:"HK",alpha3:"HKG",country_code:"852",country_name:"Hong Kong",mobile_begin_with:["4","5","6","70","71","72","73","81","82","83","84","85","86","87","88","89","9"],phone_number_lengths:[8]},{alpha2:"HN",alpha3:"HND",country_code:"504",country_name:"Honduras",mobile_begin_with:["3","7","8","9"],phone_number_lengths:[8]},{alpha2:"HR",alpha3:"HRV",country_code:"385",country_name:"Croatia",mobile_begin_with:["9"],phone_number_lengths:[8,9]},{alpha2:"HT",alpha3:"HTI",country_code:"509",country_name:"Haiti",mobile_begin_with:["3","4"],phone_number_lengths:[8]},{alpha2:"HU",alpha3:"HUN",country_code:"36",country_name:"Hungary",mobile_begin_with:["20","30","31","50","70"],phone_number_lengths:[9]},{alpha2:"ID",alpha3:"IDN",country_code:"62",country_name:"Indonesia",mobile_begin_with:["8"],phone_number_lengths:[9,10,11,12]},{alpha2:"IN",alpha3:"IND",country_code:"91",country_name:"India",mobile_begin_with:["6","7","8","9"],phone_number_lengths:[10]},{alpha2:"IE",alpha3:"IRL",country_code:"353",country_name:"Ireland",mobile_begin_with:["82","83","84","85","86","87","88","89"],phone_number_lengths:[9]},{alpha2:"IR",alpha3:"IRN",country_code:"98",country_name:"Iran, Islamic Republic Of",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"IQ",alpha3:"IRQ",country_code:"964",country_name:"Iraq",mobile_begin_with:["7"],phone_number_lengths:[10]},{alpha2:"IS",alpha3:"ISL",country_code:"354",country_name:"Iceland",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"IL",alpha3:"ISR",country_code:"972",country_name:"Israel",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"IT",alpha3:"ITA",country_code:"39",country_name:"Italy",mobile_begin_with:["3"],phone_number_lengths:[9,10]},{alpha2:"JM",alpha3:"JAM",country_code:"1",country_name:"Jamaica",mobile_begin_with:["876"],phone_number_lengths:[10]},{alpha2:"JO",alpha3:"JOR",country_code:"962",country_name:"Jordan",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"JP",alpha3:"JPN",country_code:"81",country_name:"Japan",mobile_begin_with:["70","80","90"],phone_number_lengths:[10]},{alpha2:"KZ",alpha3:"KAZ",country_code:"7",country_name:"Kazakhstan",mobile_begin_with:["70","74","77"],phone_number_lengths:[10]},{alpha2:"KE",alpha3:"KEN",country_code:"254",country_name:"Kenya",mobile_begin_with:["7","1"],phone_number_lengths:[9]},{alpha2:"KG",alpha3:"KGZ",country_code:"996",country_name:"Kyrgyzstan",mobile_begin_with:["5","7","8","9"],phone_number_lengths:[9]},{alpha2:"KH",alpha3:"KHM",country_code:"855",country_name:"Cambodia",mobile_begin_with:["1","6","7","8","9"],phone_number_lengths:[8,9]},{alpha2:"KI",alpha3:"KIR",country_code:"686",country_name:"Kiribati",mobile_begin_with:["9","30"],phone_number_lengths:[5]},{alpha2:"KN",alpha3:"KNA",country_code:"1",country_name:"Saint Kitts And Nevis",mobile_begin_with:["869"],phone_number_lengths:[10]},{alpha2:"KR",alpha3:"KOR",country_code:"82",country_name:"Korea, Republic of",mobile_begin_with:["1"],phone_number_lengths:[9,10]},{alpha2:"KW",alpha3:"KWT",country_code:"965",country_name:"Kuwait",mobile_begin_with:["5","6","9"],phone_number_lengths:[8]},{alpha2:"LA",alpha3:"LAO",country_code:"856",country_name:"Lao People's Democratic Republic",mobile_begin_with:["20"],phone_number_lengths:[10]},{alpha2:"LB",alpha3:"LBN",country_code:"961",country_name:"Lebanon",mobile_begin_with:["3","7","8"],phone_number_lengths:[7,8]},{alpha2:"LR",alpha3:"LBR",country_code:"231",country_name:"Liberia",mobile_begin_with:["4","5","6","7"],phone_number_lengths:[7,8]},{alpha2:"LY",alpha3:"LBY",country_code:"218",country_name:"Libyan Arab Jamahiriya",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"LC",alpha3:"LCA",country_code:"1",country_name:"Saint Lucia",mobile_begin_with:["758"],phone_number_lengths:[10]},{alpha2:"LI",alpha3:"LIE",country_code:"423",country_name:"Liechtenstein",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"LK",alpha3:"LKA",country_code:"94",country_name:"Sri Lanka",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"LS",alpha3:"LSO",country_code:"266",country_name:"Lesotho",mobile_begin_with:["5","6"],phone_number_lengths:[8]},{alpha2:"LT",alpha3:"LTU",country_code:"370",country_name:"Lithuania",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"LU",alpha3:"LUX",country_code:"352",country_name:"Luxembourg",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"LV",alpha3:"LVA",country_code:"371",country_name:"Latvia",mobile_begin_with:["2"],phone_number_lengths:[8]},{alpha2:"MO",alpha3:"MAC",country_code:"853",country_name:"Macao",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MA",alpha3:"MAR",country_code:"212",country_name:"Morocco",mobile_begin_with:["6","7"],phone_number_lengths:[9]},{alpha2:"MC",alpha3:"MCO",country_code:"377",country_name:"Monaco",mobile_begin_with:["4","6"],phone_number_lengths:[8,9]},{alpha2:"MD",alpha3:"MDA",country_code:"373",country_name:"Moldova, Republic of",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MG",alpha3:"MDG",country_code:"261",country_name:"Madagascar",mobile_begin_with:["3"],phone_number_lengths:[9]},{alpha2:"MV",alpha3:"MDV",country_code:"960",country_name:"Maldives",mobile_begin_with:["7","9"],phone_number_lengths:[7]},{alpha2:"MX",alpha3:"MEX",country_code:"52",country_name:"Mexico",mobile_begin_with:[""],phone_number_lengths:[10,11]},{alpha2:"MH",alpha3:"MHL",country_code:"692",country_name:"Marshall Islands",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"MK",alpha3:"MKD",country_code:"389",country_name:"Macedonia, the Former Yugoslav Republic Of",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"ML",alpha3:"MLI",country_code:"223",country_name:"Mali",mobile_begin_with:["6","7"],phone_number_lengths:[8]},{alpha2:"MT",alpha3:"MLT",country_code:"356",country_name:"Malta",mobile_begin_with:["7","9"],phone_number_lengths:[8]},{alpha2:"MM",alpha3:"MMR",country_code:"95",country_name:"Myanmar",mobile_begin_with:["9"],phone_number_lengths:[8,9,10]},{alpha2:"ME",alpha3:"MNE",country_code:"382",country_name:"Montenegro",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"MN",alpha3:"MNG",country_code:"976",country_name:"Mongolia",mobile_begin_with:["5","8","9"],phone_number_lengths:[8]},{alpha2:"MP",alpha3:"MNP",country_code:"1",country_name:"Northern Mariana Islands",mobile_begin_with:["670"],phone_number_lengths:[10]},{alpha2:"MZ",alpha3:"MOZ",country_code:"258",country_name:"Mozambique",mobile_begin_with:["8"],phone_number_lengths:[9]},{alpha2:"MR",alpha3:"MRT",country_code:"222",country_name:"Mauritania",mobile_begin_with:[],phone_number_lengths:[8]},{alpha2:"MS",alpha3:"MSR",country_code:"1",country_name:"Montserrat",mobile_begin_with:["664"],phone_number_lengths:[10]},{alpha2:"MQ",alpha3:"MTQ",country_code:"596",country_name:"Martinique",mobile_begin_with:["696"],phone_number_lengths:[9]},{alpha2:"MU",alpha3:"MUS",country_code:"230",country_name:"Mauritius",mobile_begin_with:["5"],phone_number_lengths:[8]},{alpha2:"MW",alpha3:"MWI",country_code:"265",country_name:"Malawi",mobile_begin_with:["77","88","99"],phone_number_lengths:[9]},{alpha2:"MY",alpha3:"MYS",country_code:"60",country_name:"Malaysia",mobile_begin_with:["1","6"],phone_number_lengths:[9,10,8]},{alpha2:"YT",alpha3:"MYT",country_code:"262",country_name:"Mayotte",mobile_begin_with:["639"],phone_number_lengths:[9]},{alpha2:"NA",alpha3:"NAM",country_code:"264",country_name:"Namibia",mobile_begin_with:["60","81","82","85"],phone_number_lengths:[9]},{alpha2:"NC",alpha3:"NCL",country_code:"687",country_name:"New Caledonia",mobile_begin_with:["7","8","9"],phone_number_lengths:[6]},{alpha2:"NE",alpha3:"NER",country_code:"227",country_name:"Niger",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"NF",alpha3:"NFK",country_code:"672",country_name:"Norfolk Island",mobile_begin_with:["5","8"],phone_number_lengths:[5]},{alpha2:"NG",alpha3:"NGA",country_code:"234",country_name:"Nigeria",mobile_begin_with:["70","80","81","90","91"],phone_number_lengths:[10]},{alpha2:"NI",alpha3:"NIC",country_code:"505",country_name:"Nicaragua",mobile_begin_with:["8"],phone_number_lengths:[8]},{alpha2:"NU",alpha3:"NIU",country_code:"683",country_name:"Niue",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"NL",alpha3:"NLD",country_code:"31",country_name:"Netherlands",mobile_begin_with:["6"],phone_number_lengths:[9]},{alpha2:"NO",alpha3:"NOR",country_code:"47",country_name:"Norway",mobile_begin_with:["4","9"],phone_number_lengths:[8]},{alpha2:"NP",alpha3:"NPL",country_code:"977",country_name:"Nepal",mobile_begin_with:["97","98"],phone_number_lengths:[10]},{alpha2:"NR",alpha3:"NRU",country_code:"674",country_name:"Nauru",mobile_begin_with:["555"],phone_number_lengths:[7]},{alpha2:"NZ",alpha3:"NZL",country_code:"64",country_name:"New Zealand",mobile_begin_with:["2"],phone_number_lengths:[8,9,10]},{alpha2:"OM",alpha3:"OMN",country_code:"968",country_name:"Oman",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"PK",alpha3:"PAK",country_code:"92",country_name:"Pakistan",mobile_begin_with:["3"],phone_number_lengths:[10]},{alpha2:"PA",alpha3:"PAN",country_code:"507",country_name:"Panama",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"PE",alpha3:"PER",country_code:"51",country_name:"Peru",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PH",alpha3:"PHL",country_code:"63",country_name:"Philippines",mobile_begin_with:["9"],phone_number_lengths:[10]},{alpha2:"PW",alpha3:"PLW",country_code:"680",country_name:"Palau",mobile_begin_with:[],phone_number_lengths:[7]},{alpha2:"PG",alpha3:"PNG",country_code:"675",country_name:"Papua New Guinea",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"PL",alpha3:"POL",country_code:"48",country_name:"Poland",mobile_begin_with:["4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"PR",alpha3:"PRI",country_code:"1",country_name:"Puerto Rico",mobile_begin_with:["787","939"],phone_number_lengths:[10]},{alpha2:"PT",alpha3:"PRT",country_code:"351",country_name:"Portugal",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PY",alpha3:"PRY",country_code:"595",country_name:"Paraguay",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"PS",alpha3:"PSE",country_code:"970",country_name:"Palestinian Territory, Occupied",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"PF",alpha3:"PYF",country_code:"689",country_name:"French Polynesia",mobile_begin_with:["8"],phone_number_lengths:[8]},{alpha2:"QA",alpha3:"QAT",country_code:"974",country_name:"Qatar",mobile_begin_with:["3","5","6","7"],phone_number_lengths:[8]},{alpha2:"RE",alpha3:"REU",country_code:"262",country_name:"R\xE9union",mobile_begin_with:["692","693"],phone_number_lengths:[9]},{alpha2:"RO",alpha3:"ROU",country_code:"40",country_name:"Romania",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"RU",alpha3:"RUS",country_code:"7",country_name:"Russian Federation",mobile_begin_with:["9","495","498","499","835"],phone_number_lengths:[10]},{alpha2:"RW",alpha3:"RWA",country_code:"250",country_name:"Rwanda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SA",alpha3:"SAU",country_code:"966",country_name:"Saudi Arabia",mobile_begin_with:["5"],phone_number_lengths:[9]},{alpha2:"SD",alpha3:"SDN",country_code:"249",country_name:"Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SS",alpha3:"SSD",country_code:"211",country_name:"South Sudan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SN",alpha3:"SEN",country_code:"221",country_name:"Senegal",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SG",alpha3:"SGP",country_code:"65",country_name:"Singapore",mobile_begin_with:["8","9"],phone_number_lengths:[8]},{alpha2:"SH",alpha3:"SHN",country_code:"290",country_name:"Saint Helena",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"SJ",alpha3:"SJM",country_code:"47",country_name:"Svalbard And Jan Mayen",mobile_begin_with:["79"],phone_number_lengths:[8]},{alpha2:"SB",alpha3:"SLB",country_code:"677",country_name:"Solomon Islands",mobile_begin_with:["7","8"],phone_number_lengths:[7]},{alpha2:"SL",alpha3:"SLE",country_code:"232",country_name:"Sierra Leone",mobile_begin_with:["21","25","30","33","34","40","44","50","55","76","77","78","79","88"],phone_number_lengths:[8]},{alpha2:"SV",alpha3:"SLV",country_code:"503",country_name:"El Salvador",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"SM",alpha3:"SMR",country_code:"378",country_name:"San Marino",mobile_begin_with:["3","6"],phone_number_lengths:[10]},{alpha2:"SO",alpha3:"SOM",country_code:"252",country_name:"Somalia",mobile_begin_with:["61","62","63","65","66","68","69","71","90"],phone_number_lengths:[9]},{alpha2:"SX",alpha3:"SXM",country_code:"1",country_name:"Sint Maarten",mobile_begin_with:["721"],phone_number_lengths:[10]},{alpha2:"PM",alpha3:"SPM",country_code:"508",country_name:"Saint Pierre And Miquelon",mobile_begin_with:["55","41"],phone_number_lengths:[6]},{alpha2:"RS",alpha3:"SRB",country_code:"381",country_name:"Serbia",mobile_begin_with:["6"],phone_number_lengths:[8,9]},{alpha2:"ST",alpha3:"STP",country_code:"239",country_name:"Sao Tome and Principe",mobile_begin_with:["98","99"],phone_number_lengths:[7]},{alpha2:"SR",alpha3:"SUR",country_code:"597",country_name:"Suriname",mobile_begin_with:["6","7","8"],phone_number_lengths:[7]},{alpha2:"SK",alpha3:"SVK",country_code:"421",country_name:"Slovakia",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"SI",alpha3:"SVN",country_code:"386",country_name:"Slovenia",mobile_begin_with:["3","4","5","6","7"],phone_number_lengths:[8]},{alpha2:"SE",alpha3:"SWE",country_code:"46",country_name:"Sweden",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"SC",alpha3:"SYC",country_code:"248",country_name:"Seychelles",mobile_begin_with:["2"],phone_number_lengths:[7]},{alpha2:"SY",alpha3:"SYR",country_code:"963",country_name:"Syrian Arab Republic",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TC",alpha3:"TCA",country_code:"1",country_name:"Turks and Caicos Islands",mobile_begin_with:["6492","6493","6494"],phone_number_lengths:[10]},{alpha2:"TD",alpha3:"TCD",country_code:"235",country_name:"Chad",mobile_begin_with:["6","7","9"],phone_number_lengths:[8]},{alpha2:"TG",alpha3:"TGO",country_code:"228",country_name:"Togo",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"TH",alpha3:"THA",country_code:"66",country_name:"Thailand",mobile_begin_with:["6","8","9"],phone_number_lengths:[9]},{alpha2:"TJ",alpha3:"TJK",country_code:"992",country_name:"Tajikistan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TK",alpha3:"TKL",country_code:"690",country_name:"Tokelau",mobile_begin_with:[],phone_number_lengths:[4]},{alpha2:"TM",alpha3:"TKM",country_code:"993",country_name:"Turkmenistan",mobile_begin_with:["6"],phone_number_lengths:[8]},{alpha2:"TL",alpha3:"TLS",country_code:"670",country_name:"Timor-Leste",mobile_begin_with:["7"],phone_number_lengths:[8]},{alpha2:"TO",alpha3:"TON",country_code:"676",country_name:"Tonga",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TT",alpha3:"TTO",country_code:"1",country_name:"Trinidad and Tobago",mobile_begin_with:["868"],phone_number_lengths:[10]},{alpha2:"TN",alpha3:"TUN",country_code:"216",country_name:"Tunisia",mobile_begin_with:["2","4","5","9"],phone_number_lengths:[8]},{alpha2:"TR",alpha3:"TUR",country_code:"90",country_name:"Turkey",mobile_begin_with:["5"],phone_number_lengths:[10]},{alpha2:"TV",alpha3:"TUV",country_code:"688",country_name:"Tuvalu",mobile_begin_with:[],phone_number_lengths:[5]},{alpha2:"TW",alpha3:"TWN",country_code:"886",country_name:"Taiwan",mobile_begin_with:["9"],phone_number_lengths:[9]},{alpha2:"TZ",alpha3:"TZA",country_code:"255",country_name:"Tanzania, United Republic of",mobile_begin_with:["7","6"],phone_number_lengths:[9]},{alpha2:"UG",alpha3:"UGA",country_code:"256",country_name:"Uganda",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"UA",alpha3:"UKR",country_code:"380",country_name:"Ukraine",mobile_begin_with:["39","50","63","66","67","68","73","9"],phone_number_lengths:[9]},{alpha2:"UY",alpha3:"URY",country_code:"598",country_name:"Uruguay",mobile_begin_with:["9"],phone_number_lengths:[8]},{alpha2:"UZ",alpha3:"UZB",country_code:"998",country_name:"Uzbekistan",mobile_begin_with:["9","88","33"],phone_number_lengths:[9]},{alpha2:"VC",alpha3:"VCT",country_code:"1",country_name:"Saint Vincent And The Grenedines",mobile_begin_with:["784"],phone_number_lengths:[10]},{alpha2:"VE",alpha3:"VEN",country_code:"58",country_name:"Venezuela, Bolivarian Republic of",mobile_begin_with:["4"],phone_number_lengths:[10]},{alpha2:"VG",alpha3:"VGB",country_code:"1",country_name:"Virgin Islands, British",mobile_begin_with:["284"],phone_number_lengths:[10]},{alpha2:"VI",alpha3:"VIR",country_code:"1",country_name:"Virgin Islands, U.S.",mobile_begin_with:["340"],phone_number_lengths:[10]},{alpha2:"VN",alpha3:"VNM",country_code:"84",country_name:"Viet Nam",mobile_begin_with:["8","9","3","7","5"],phone_number_lengths:[9]},{alpha2:"VU",alpha3:"VUT",country_code:"678",country_name:"Vanuatu",mobile_begin_with:["5","7"],phone_number_lengths:[7]},{alpha2:"WF",alpha3:"WLF",country_code:"681",country_name:"Wallis and Futuna",mobile_begin_with:[],phone_number_lengths:[6]},{alpha2:"WS",alpha3:"WSM",country_code:"685",country_name:"Samoa",mobile_begin_with:["7"],phone_number_lengths:[7]},{alpha2:"YE",alpha3:"YEM",country_code:"967",country_name:"Yemen",mobile_begin_with:["7"],phone_number_lengths:[9]},{alpha2:"ZA",alpha3:"ZAF",country_code:"27",country_name:"South Africa",mobile_begin_with:["1","2","3","4","5","6","7","8"],phone_number_lengths:[9]},{alpha2:"ZM",alpha3:"ZMB",country_code:"260",country_name:"Zambia",mobile_begin_with:["9","7"],phone_number_lengths:[9]},{alpha2:"ZW",alpha3:"ZWE",country_code:"263",country_name:"Zimbabwe",mobile_begin_with:["71","73","77","78"],phone_number_lengths:[9]}]});var VF=$(Fr=>{"use strict";u();l();c();var lse=Fr&&Fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.validatePhoneISO3166=Fr.findCountryPhoneDataByPhoneNumber=Fr.findPossibleCountryPhoneData=Fr.findExactCountryPhoneData=Fr.findCountryPhoneDataByCountry=void 0;var Pp=lse(v6());function fse(e){return e?e.length===2?Pp.default.find(t=>e.toUpperCase()===t.alpha2)||null:e.length===3?Pp.default.find(t=>e.toUpperCase()===t.alpha3)||null:Pp.default.find(t=>e.toUpperCase()===t.country_name.toUpperCase())||null:Pp.default.find(t=>t.alpha3==="USA")||null}Fr.findCountryPhoneDataByCountry=fse;function UF(e,t,r){return r.phone_number_lengths.some(o=>r.country_code.length+o===e.length)&&(!r.mobile_begin_with.length||!t||r.mobile_begin_with.some(o=>e.match(new RegExp("^"+r.country_code+o))))?r:null}Fr.findExactCountryPhoneData=UF;function jF(e,t,r){if(!r.phone_number_lengths.some(o=>r.country_code.length+o+1===e.length))return null;if(!r.mobile_begin_with.length||!t||r.mobile_begin_with.some(o=>e.match(new RegExp("^"+r.country_code+"\\d?"+o))))return r}Fr.findPossibleCountryPhoneData=jF;function dse(e,t){let r,n;for(let o of Pp.default)!e.match(new RegExp("^"+o.country_code))||(r||(r=UF(e,t,o)),n||(n=jF(e,t,o)));return{exactCountryPhoneData:r,possibleCountryPhoneData:n}}Fr.findCountryPhoneDataByPhoneNumber=dse;function pse(e,t,r,n){if(!t.phone_number_lengths)return!1;let o=e.replace(new RegExp("^"+t.country_code),"");if(n&&t&&o.length===e.length)return!1;let i=t.phone_number_lengths,s=t.mobile_begin_with,a=i.some(d=>o.length===d),f=s.length?s.some(d=>o.match(new RegExp("^"+d))):!0;return a&&(!r||f)}Fr.validatePhoneISO3166=pse});var HF=$(xi=>{"use strict";u();l();c();var hse=xi&&xi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xi,"__esModule",{value:!0});xi.countryPhoneData=xi.phone=void 0;var mse=hse(v6());xi.countryPhoneData=mse.default;var Ip=VF();function zF(e,{country:t="",validateMobilePrefix:r=!0,strictDetection:n=!1}={}){let o={isValid:!1,phoneNumber:null,countryIso2:null,countryIso3:null,countryCode:null},i=typeof e!="string"?"":e.trim(),s=typeof t!="string"?"":t.trim(),a=Boolean(i.match(/^\+/));i=i.replace(/\D/g,"");let f=(0,Ip.findCountryPhoneDataByCountry)(s);if(!f)return o;let d=!1;if(s)["CIV","COG"].includes(f.alpha3)||(i=i.replace(/^0+/,"")),f.alpha3==="RUS"&&i.length===11&&i.match(/^89/)!==null&&(i=i.replace(/^8+/,"")),!a&&f.phone_number_lengths.includes(i.length)&&(i=`${f.country_code}${i}`);else if(a){let{exactCountryPhoneData:g,possibleCountryPhoneData:v}=(0,Ip.findCountryPhoneDataByPhoneNumber)(i,r);g?f=g:v&&!n?(f=v,i=f.country_code+i.replace(new RegExp(`^${f.country_code}\\d`),"")):f=null}else f.phone_number_lengths.indexOf(i.length)!==-1&&(i=`1${i}`,d=!0);if(!f)return o;let h=(0,Ip.validatePhoneISO3166)(i,f,r,a);return h?{isValid:!0,phoneNumber:`+${i}`,countryIso2:f.alpha2,countryIso3:f.alpha3,countryCode:`+${f.country_code}`}:d&&(f=(0,Ip.findCountryPhoneDataByCountry)("CAN"),h=(0,Ip.validatePhoneISO3166)(i,f,r,a),h)?{isValid:!0,phoneNumber:`+${i}`,countryIso2:f.alpha2,countryIso3:f.alpha3,countryCode:`+${f.country_code}`}:o}xi.default=zF;xi.phone=zF});var YF=$((Eze,WF)=>{"use strict";u();l();c();var Xa=[["Afghanistan (\u202B\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646\u202C\u200E)","af","93","+..-..-...-...."],["\xC5land Islands","ax","358",""],["Albania (Shqip\xEBri)","al","355","+...(...)...-..."],["Algeria (\u202B\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)","dz","213","+...-..-...-...."],["American Samoa","as","1684","+.(...)...-...."],["Andorra","ad","376","+...-...-..."],["Angola","ao","244","+...(...)...-..."],["Anguilla","ai","1264","+.(...)...-...."],["Antarctica","aq","672",""],["Antigua and Barbuda","ag","1268","+.(...)...-...."],["Argentina","ar","54","+..(...)...-...."],["Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)","am","374","+...-..-...-..."],["Aruba","aw","297","+...-...-...."],["Australia","au","61","+.. ... ... ..."],["Austria (\xD6sterreich)","at","43","+..(...)...-...."],["Azerbaijan (Az\u0259rbaycan)","az","994","+...-..-...-..-.."],["Bahamas","bs","1242","+.(...)...-...."],["Bahrain (\u202B\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)","bh","973","+...-....-...."],["Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)","bd","880","+...-..-...-..."],["Barbados","bb","1246","+.(...)...-...."],["Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)","by","375","+...(..)...-..-.."],["Belgium (Belgi\xEB)","be","32","+.. ... .. .. .."],["Belize","bz","501","+...-...-...."],["Benin (B\xE9nin)","bj","229","+...-..-..-...."],["Bermuda","bm","1441","+.(...)...-...."],["Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)","bt","975","+...-.-...-..."],["Bolivia","bo","591","+...-.-...-...."],["Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)","ba","387","+...-..-...."],["Botswana","bw","267","+...-..-...-..."],["Bouvet Island","bv","47",""],["Brazil (Brasil)","br","55","+..-..-....-...."],["British Indian Ocean Territory","io","246","+...-...-...."],["British Virgin Islands","vg","1284","+.(...)...-...."],["Brunei","bn","673","+...-...-...."],["Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)","bg","359","+...(...)...-..."],["Burkina Faso","bf","226","+...-..-..-...."],["Burundi (Uburundi)","bi","257","+...-..-..-...."],["Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)","kh","855","+...-..-...-..."],["Cameroon (Cameroun)","cm","237","+...-....-...."],["Canada","ca","1","+. (...) ...-....",1,["204","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238","+...(...)..-.."],["Caribbean Netherlands","bq","599","+...-...-....",1],["Cayman Islands","ky","1345","+.(...)...-...."],["Central African Republic (R\xE9publique centrafricaine)","cf","236","+...-..-..-...."],["Chad (Tchad)","td","235","+...-..-..-..-.."],["Chile","cl","56","+..-.-....-...."],["China (\u4E2D\u56FD)","cn","86","+.. ..-........"],["Christmas Island","cx","61",""],["Cocos (Keeling) Islands","cc","61",""],["Colombia","co","57","+..(...)...-...."],["Comoros (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)","km","269","+...-..-....."],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243","+...(...)...-..."],["Congo (Republic) (Congo-Brazzaville)","cg","242","+...-..-...-...."],["Cook Islands","ck","682","+...-..-..."],["Costa Rica","cr","506","+... ....-...."],["C\xF4te d\u2019Ivoire","ci","225","+...-..-...-..."],["Croatia (Hrvatska)","hr","385","+...-..-...-..."],["Cuba","cu","53","+..-.-...-...."],["Cura\xE7ao","cw","599","+...-...-....",0],["Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)","cy","357","+...-..-...-..."],["Czech Republic (\u010Cesk\xE1 republika)","cz","420","+...(...)...-..."],["Denmark (Danmark)","dk","45","+.. .. .. .. .."],["Djibouti","dj","253","+...-..-..-..-.."],["Dominica","dm","1767","+.(...)...-...."],["Dominican Republic (Rep\xFAblica Dominicana)","do","1","+.(...)...-....",2,["809","829","849"]],["Ecuador","ec","593","+...-.-...-...."],["Egypt (\u202B\u0645\u0635\u0631\u202C\u200E)","eg","20","+..(...)...-...."],["El Salvador","sv","503","+... ....-...."],["Equatorial Guinea (Guinea Ecuatorial)","gq","240","+...-..-...-...."],["Eritrea","er","291","+...-.-...-..."],["Estonia (Eesti)","ee","372","+...-...-...."],["Ethiopia","et","251","+...-..-...-...."],["Falkland Islands (Islas Malvinas)","fk","500","+...-....."],["Faroe Islands (F\xF8royar)","fo","298","+...-...-..."],["Fiji","fj","679","+...-..-....."],["Finland (Suomi)","fi","358","+... .. .... ...."],["France","fr","33","+.. . .. .. .. .."],["French Guiana (Guyane fran\xE7aise)","gf","594","+...-.....-...."],["French Polynesia (Polyn\xE9sie fran\xE7aise)","pf","689","+...-..-..-.."],["French Southern and Antarctic Lands","tf","262",""],["Gabon","ga","241","+...-.-..-..-.."],["Gambia","gm","220","+...(...)..-.."],["Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)","ge","995","+...(...)...-..."],["Germany (Deutschland)","de","49","+.. ... ......."],["Ghana (Gaana)","gh","233","+...(...)...-..."],["Gibraltar","gi","350","+...-...-....."],["Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)","gr","30","+..(...)...-...."],["Greenland (Kalaallit Nunaat)","gl","299","+...-..-..-.."],["Grenada","gd","1473","+.(...)...-...."],["Guadeloupe","gp","590","",0],["Guam","gu","1671","+.(...)...-...."],["Guatemala","gt","502","+... ....-...."],["Guernsey","gg","44",""],["Guinea (Guin\xE9e)","gn","224","+...-..-...-..."],["Guinea-Bissau (Guin\xE9 Bissau)","gw","245","+...-.-......"],["Guyana","gy","592","+...-...-...."],["Haiti","ht","509","+... ....-...."],["Heard Island and McDonald Islands","hm","672",""],["Honduras","hn","504","+...-....-...."],["Hong Kong (\u9999\u6E2F)","hk","852","+... .... ...."],["Hungary (Magyarorsz\xE1g)","hu","36","+..(...)...-..."],["Iceland (\xCDsland)","is","354","+... ... ...."],["India (\u092D\u093E\u0930\u0924)","in","91","+.. .....-....."],["Indonesia","id","62","+..-..-...-.."],["Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)","ir","98","+..(...)...-...."],["Iraq (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)","iq","964","+...(...)...-...."],["Ireland","ie","353","+... .. ......."],["Isle of Man","im","44",""],["Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)","il","972","+...-.-...-...."],["Italy (Italia)","it","39","+.. ... ......",0],["Jamaica","jm","1876","+.(...)...-...."],["Japan (\u65E5\u672C)","jp","81","+.. ... .. ...."],["Jersey","je","44",""],["Jordan (\u202B\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)","jo","962","+...-.-....-...."],["Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)","kz","7","+. ... ...-..-..",1],["Kenya","ke","254","+...-...-......"],["Kiribati","ki","686","+...-..-..."],["Kosovo","xk","383",""],["Kuwait (\u202B\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E)","kw","965","+...-....-...."],["Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)","kg","996","+...(...)...-..."],["Laos (\u0EA5\u0EB2\u0EA7)","la","856","+...-..-...-..."],["Latvia (Latvija)","lv","371","+...-..-...-..."],["Lebanon (\u202B\u0644\u0628\u0646\u0627\u0646\u202C\u200E)","lb","961","+...-.-...-..."],["Lesotho","ls","266","+...-.-...-...."],["Liberia","lr","231","+...-..-...-..."],["Libya (\u202B\u0644\u064A\u0628\u064A\u0627\u202C\u200E)","ly","218","+...-..-...-..."],["Liechtenstein","li","423","+...(...)...-...."],["Lithuania (Lietuva)","lt","370","+...(...)..-..."],["Luxembourg","lu","352","+...(...)...-..."],["Macau (\u6FB3\u9580)","mo","853","+...-....-...."],["Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)","mk","389","+...-..-...-..."],["Madagascar (Madagasikara)","mg","261","+...-..-..-....."],["Malawi","mw","265","+...-.-....-...."],["Malaysia","my","60","+.. ..-....-...."],["Maldives","mv","960","+...-...-...."],["Mali","ml","223","+...-..-..-...."],["Malta","mt","356","+...-....-...."],["Marshall Islands","mh","692","+...-...-...."],["Martinique","mq","596","+...(...)..-..-.."],["Mauritania (\u202B\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)","mr","222","+...-..-..-...."],["Mauritius (Moris)","mu","230","+...-...-...."],["Mayotte","yt","262",""],["Mexico (M\xE9xico)","mx","52","+..-..-..-...."],["Micronesia","fm","691","+...-...-...."],["Moldova (Republica Moldova)","md","373","+...-....-...."],["Monaco","mc","377","+...-..-...-..."],["Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)","mn","976","+...-..-..-...."],["Montenegro (Crna Gora)","me","382","+...-..-...-..."],["Montserrat","ms","1664","+.(...)...-...."],["Morocco (\u202B\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)","ma","212","+...-..-....-..."],["Mozambique (Mo\xE7ambique)","mz","258","+...-..-...-..."],["Myanmar (Burma) (\u1019\u103C\u1014\u103A\u1019\u102C)","mm","95","+..-...-..."],["Namibia (Namibi\xEB)","na","264","+...-..-...-...."],["Nauru","nr","674","+...-...-...."],["Nepal (\u0928\u0947\u092A\u093E\u0932)","np","977","+...-..-...-..."],["Netherlands (Nederland)","nl","31","+.. .. ........"],["New Caledonia (Nouvelle-Cal\xE9donie)","nc","687","+...-..-...."],["New Zealand","nz","64","+.. ...-...-...."],["Nicaragua","ni","505","+...-....-...."],["Niger (Nijar)","ne","227","+...-..-..-...."],["Nigeria","ng","234","+...-..-...-.."],["Niue","nu","683","+...-...."],["Norfolk Island","nf","672","+...-...-..."],["North Korea (\uC870\uC120 \uBBFC\uC8FC\uC8FC\uC758 \uC778\uBBFC \uACF5\uD654\uAD6D)","kp","850","+...-...-..."],["Northern Mariana Islands","mp","1670","+.(...)...-...."],["Norway (Norge)","no","47","+.. ... .. ..."],["Oman (\u202B\u0639\u064F\u0645\u0627\u0646\u202C\u200E)","om","968","+...-..-...-..."],["Pakistan (\u202B\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)","pk","92","+.. ...-......."],["Palau","pw","680","+...-...-...."],["Palestine (\u202B\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)","ps","970","+...-..-...-...."],["Panama (Panam\xE1)","pa","507","+...-...-...."],["Papua New Guinea","pg","675","+...(...)..-..."],["Paraguay","py","595","+...(...)...-..."],["Peru (Per\xFA)","pe","51","+..(...)...-..."],["Philippines","ph","63","+.. ... ...."],["Pitcairn Islands","pn","64",""],["Poland (Polska)","pl","48","+.. ...-...-..."],["Portugal","pt","351","+...-..-...-...."],["Puerto Rico","pr","1","+. (...) ...-....",3,["787","939"]],["Qatar (\u202B\u0642\u0637\u0631\u202C\u200E)","qa","974","+...-....-...."],["R\xE9union (La R\xE9union)","re","262","+...-.....-...."],["Romania (Rom\xE2nia)","ro","40","+..-..-...-...."],["Russia (\u0420\u043E\u0441\u0441\u0438\u044F)","ru","7","+. ... ...-..-..",0],["Rwanda","rw","250","+...(...)...-..."],["Saint Barth\xE9lemy (Saint-Barth\xE9lemy)","bl","590","",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869","+.(...)...-...."],["Saint Lucia","lc","1758","+.(...)...-...."],["Saint Martin (Saint-Martin (partie fran\xE7aise))","mf","590","",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1784","+.(...)...-...."],["Samoa","ws","685","+...-..-...."],["San Marino","sm","378","+...-....-......"],["S\xE3o Tom\xE9 and Pr\xEDncipe (S\xE3o Tom\xE9 e Pr\xEDncipe)","st","239","+...-..-....."],["Saudi Arabia (\u202B\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629\u202C\u200E)","sa","966","+...-..-...-...."],["Senegal (S\xE9n\xE9gal)","sn","221","+...-..-...-...."],["Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)","rs","381","+...-..-...-...."],["Seychelles","sc","248","+...-.-...-..."],["Sierra Leone","sl","232","+...-..-......"],["Singapore","sg","65","+.. ....-...."],["Sint Maarten","sx","1721","+.(...)...-...."],["Slovakia (Slovensko)","sk","421","+...(...)...-..."],["Slovenia (Slovenija)","si","386","+...-..-...-..."],["Solomon Islands","sb","677","+...-....."],["Somalia (Soomaaliya)","so","252","+...-.-...-..."],["South Africa","za","27","+..-..-...-...."],["South Georgia and the South Sandwich Islands","gs","500",""],["South Korea (\uB300\uD55C\uBBFC\uAD6D)","kr","82","+..-..-...-...."],["South Sudan (\u202B\u062C\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)","ss","211","+...-..-...-...."],["Spain (Espa\xF1a)","es","34","+.. ... ... ..."],["Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)","lk","94","+..-..-...-...."],["Sudan (\u202B\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)","sd","249","+...-..-...-...."],["Suriname","sr","597","+...-...-..."],["Svalbard and Jan Mayen","sj","47",""],["Swaziland","sz","268","+...-..-..-...."],["Sweden (Sverige)","se","46","+.. .. ... .. .."],["Switzerland (Schweiz)","ch","41","+.. .. ... .. .."],["Syria (\u202B\u0633\u0648\u0631\u064A\u0627\u202C\u200E)","sy","963","+...-..-....-..."],["Taiwan (\u53F0\u7063)","tw","886","+...-....-...."],["Tajikistan","tj","992","+...-..-...-...."],["Tanzania","tz","255","+...-..-...-...."],["Thailand (\u0E44\u0E17\u0E22)","th","66","+..-..-...-..."],["Timor-Leste","tl","670","+...-...-...."],["Togo","tg","228","+...-..-...-..."],["Tokelau","tk","690","+...-...."],["Tonga","to","676","+...-....."],["Trinidad and Tobago","tt","1868","+.(...)...-...."],["Tunisia (\u202B\u062A\u0648\u0646\u0633\u202C\u200E)","tn","216","+...-..-...-..."],["Turkey (T\xFCrkiye)","tr","90","+.. ... ... .. .."],["Turkmenistan","tm","993","+...-.-...-...."],["Turks and Caicos Islands","tc","1649","+.(...)...-...."],["Tuvalu","tv","688","+...-....."],["U.S. Virgin Islands","vi","1340","+.(...)...-...."],["Uganda","ug","256","+...(...)...-..."],["Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)","ua","380","+...(..)...-..-.."],["United Arab Emirates (\u202B\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629\u202C\u200E)","ae","971","+...-.-...-...."],["United Kingdom","gb","44","+.. .... ......"],["United States","us","1","+. (...) ...-....",0],["United States Minor Outlying Islands","um","1","",2],["Uruguay","uy","598","+...-.-...-..-.."],["Uzbekistan (O\u02BBzbekiston)","uz","998","+...-..-...-...."],["Vanuatu","vu","678","+...-....."],["Vatican City (Citt\xE0 del Vaticano)","va","39","+.. .. .... ....",1],["Venezuela","ve","58","+..(...)...-...."],["Vietnam (Vi\u1EC7t Nam)","vn","84","+..-..-....-..."],["Wallis and Futuna","wf","681","+...-..-...."],["Western Sahara","eh","212","+...-..-...."],["Yemen (\u202B\u0627\u0644\u064A\u0645\u0646\u202C\u200E)","ye","967","+...-.-...-..."],["Zambia","zm","260","+...-..-...-...."],["Zimbabwe","zw","263","+...-.-......"]],bv={},GF={},qF=function(e,t,r){t in bv||(bv[t]=[]);var n=r||0;bv[t][n]=e};for(_i=0;_i<Xa.length;_i++){if(Cr=Xa[_i],Xa[_i]={name:Cr[0],iso2:Cr[1],dialCode:Cr[2],priority:Cr[4]||0},Cr[3]&&(Xa[_i].format=Cr[3]),Cr[5])for(Xa[_i].hasAreaCodes=!0,vv=0;vv<Cr[5].length;vv++)KF=Cr[2]+Cr[5][vv],qF(Cr[1],KF);GF[Xa[_i].iso2]=_i,qF(Cr[1],Cr[2],Cr[4])}var Cr,KF,vv,_i;WF.exports={allCountries:Xa,iso2Lookup:GF,allCountryCodes:bv}});var Bae={};Xt(Bae,{init:()=>Mae,open:()=>Fae,reset:()=>$ae,update:()=>Lae});u();l();c();u();l();c();var vS={},YB=()=>{var t;if(typeof navigator>"u")return;let e=(t=navigator.languages.find(r=>vS[r]!=null))!=null?t:"";return vS[e]},JB=(e,t)=>{let r=e;for(let[n,o]of Object.entries(t!=null?t:{}))r=e.replace(`:${n}`,o);return r};function U(e,t){var r,n;return typeof navigator>"u"?e:JB((n=(r=YB())==null?void 0:r[e])!=null?n:e,t)}u();l();c();u();l();c();u();l();c();var bS=e=>{let t,r=new Set,n=(f,d)=>{let h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){let g=t;t=(d!=null?d:typeof h!="object")?h:Object.assign({},t,h),r.forEach(v=>v(t,g))}},o=()=>t,a={setState:n,getState:o,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{var f;((f=y)==null?void 0:f.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,o,a),a},wS=e=>e?bS(e):bS;var DS=N(z(),1),OS=N(IS(),1),{useSyncExternalStoreWithSelector:hU}=OS.default;function mU(e,t=e.getState,r){let n=hU(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,DS.useDebugValue)(n),n}var AS=e=>{var t;((t=y)==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let r=typeof e=="function"?wS(e):e,n=(o,i)=>mU(r,o,i);return Object.assign(n,r),n},Yp=e=>e?AS(e):AS;u();l();c();var Do=(b=>(b.ConnectionFailed="connection_failed",b.VerificationRejected="verification_rejected",b.MaxVerificationsReached="max_verifications_reached",b.AlreadySigned="already_signed",b.CredentialUnavailable="credential_unavailable",b.MalformedRequest="malformed_request",b.InvalidNetwork="invalid_network",b.InclusionProofFailed="inclusion_proof_failed",b.InclusionProofPending="inclusion_proof_pending",b.UnexpectedResponse="unexpected_response",b.FailedByHostApp="failed_by_host_app",b.GenericError="generic_error",b.InvalidPhoneOTP="invalid_phone_otp",b))(Do||{});u();l();c();var Jp=(r=>(r.Orb="orb",r.Phone="phone",r))(Jp||{});var Qv=(o=>(o.MAX_ATTEMPTS="max_attempts",o.TIMEOUT="timeout",o.UNSUPPORTED_COUNTRY="unsupported_country",o.SERVER_ERROR="server_error",o))(Qv||{});u();l();c();u();l();c();var eb=function(e,t){return eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},eb(e,t)};function gU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");eb(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ae=function(){return Ae=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ae.apply(this,arguments)};function Is(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(h){try{d(n.next(h))}catch(g){s(g)}}function f(h){try{d(n.throw(h))}catch(g){s(g)}}function d(h){h.done?i(h.value):o(h.value).then(a,f)}d((n=n.apply(e,t||[])).next())})}function As(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(d){return function(h){return f([d,h])}}function f(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1],i=d;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(d);break}i[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(h){d=[6,h],o=0}finally{n=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function yU(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var me;(function(e){e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.FeatureFlags="feature_flags",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties"})(me||(me={}));function vU(e,t){if(!e)throw new Error(t)}function bU(e){return e==null?void 0:e.replace(/\/+$/,"")}function wU(e,t){return t===void 0&&(t={}),Is(this,void 0,void 0,function(){var r,n,o,i,s,a,f,d,h,g;return As(this,function(v){switch(v.label){case 0:r=t.retryCount,n=r===void 0?3:r,o=t.retryDelay,i=o===void 0?5e3:o,s=t.retryCheck,a=s===void 0?function(){return!0}:s,f=null,d=0,v.label=1;case 1:if(!(d<n+1))return[3,8];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,e()];case 3:return h=v.sent(),[2,h];case 4:if(g=v.sent(),f=g,!a(g))throw g;return[3,5];case 5:return[4,new Promise(function(b){return setTimeout(b,i)})];case 6:v.sent(),v.label=7;case 7:return d++,[3,1];case 8:throw f}})})}function RS(e){var t=new Date().getTime(),r=e&&e.performance&&e.performance.now&&e.performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=Math.random()*16;return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(r+o)%16|0,r=Math.floor(r/16)),(n==="x"?o:o&3|8).toString(16)})}function $S(){return new Date().getTime()}function NS(){return new Date().toISOString()}function kS(e,t){var r=setTimeout(e,t);return r!=null&&r.unref&&(r==null||r.unref()),r}var $l=String.fromCharCode,MS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Xp={};function xU(e,t){if(!Xp[e]){Xp[e]={};for(var r=0;r<e.length;r++)Xp[e][e.charAt(r)]=r}return Xp[e][t]}var jl={compressToBase64:function(e){if(e==null)return"";var t=jl._compress(e,6,function(r){return MS.charAt(r)});switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return e==null?"":e==""?null:jl._decompress(e.length,32,function(t){return xU(MS,e.charAt(t))})},compress:function(e){return jl._compress(e,16,function(t){return $l(t)})},_compress:function(e,t,r){if(e==null)return"";var n={},o={},i=[],s,a,f="",d="",h="",g=2,v=3,b=2,w=0,_=0,C;for(C=0;C<e.length;C+=1)if(f=e.charAt(C),Object.prototype.hasOwnProperty.call(n,f)||(n[f]=v++,o[f]=!0),d=h+f,Object.prototype.hasOwnProperty.call(n,d))h=d;else{if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(s=0;s<b;s++)w=w<<1,_==t-1?(_=0,i.push(r(w)),w=0):_++;for(a=h.charCodeAt(0),s=0;s<8;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1}else{for(a=1,s=0;s<b;s++)w=w<<1|a,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=0;for(a=h.charCodeAt(0),s=0;s<16;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1}g--,g==0&&(g=Math.pow(2,b),b++),delete o[h]}else for(a=n[h],s=0;s<b;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1;g--,g==0&&(g=Math.pow(2,b),b++),n[d]=v++,h=String(f)}if(h!==""){if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(s=0;s<b;s++)w=w<<1,_==t-1?(_=0,i.push(r(w)),w=0):_++;for(a=h.charCodeAt(0),s=0;s<8;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1}else{for(a=1,s=0;s<b;s++)w=w<<1|a,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=0;for(a=h.charCodeAt(0),s=0;s<16;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1}g--,g==0&&(g=Math.pow(2,b),b++),delete o[h]}else for(a=n[h],s=0;s<b;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1;g--,g==0&&(g=Math.pow(2,b),b++)}for(a=2,s=0;s<b;s++)w=w<<1|a&1,_==t-1?(_=0,i.push(r(w)),w=0):_++,a=a>>1;for(;;)if(w=w<<1,_==t-1){i.push(r(w));break}else _++;return i.join("")},decompress:function(e){return e==null?"":e==""?null:jl._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(e,t,r){var n=[],o=[],i={val:r(0),position:t,index:1},s=4,a=4,f=3,d="",h,g,v,b,w,_,C;for(h=0;h<3;h+=1)n[h]=h;for(v=0,w=Math.pow(2,2),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;switch(v){case 0:for(v=0,w=Math.pow(2,8),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;C=$l(v);break;case 1:for(v=0,w=Math.pow(2,16),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;C=$l(v);break;case 2:return""}for(n[3]=C,g=C,o.push(C);;){if(i.index>e)return"";for(v=0,w=Math.pow(2,f),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;switch(C=v){case 0:for(v=0,w=Math.pow(2,8),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;n[a++]=$l(v),C=a-1,s--;break;case 1:for(v=0,w=Math.pow(2,16),_=1;_!=w;)b=i.val&i.position,i.position>>=1,i.position==0&&(i.position=t,i.val=r(i.index++)),v|=(b>0?1:0)*_,_<<=1;n[a++]=$l(v),C=a-1,s--;break;case 2:return o.join("")}if(s==0&&(s=Math.pow(2,f),f++),n[C])d=n[C];else if(C===a)d=g+g.charAt(0);else return null;o.push(d),n[a++]=g+d.charAt(0),s--,g=d,s==0&&(s=Math.pow(2,f),f++)}}},_U=function(){function e(){this.events={},this.events={}}return e.prototype.on=function(t,r){var n=this;return this.events[t]||(this.events[t]=[]),this.events[t].push(r),function(){n.events[t]=n.events[t].filter(function(o){return o!==r})}},e.prototype.emit=function(t,r){for(var n=0,o=this.events[t]||[];n<o.length;n++){var i=o[n];i(r)}for(var s=0,a=this.events["*"]||[];s<a.length;s++){var i=a[s];i(t,r)}},e}(),EU=function(){function e(t,r){var n=this,o,i,s,a,f,d;this.flagCallReported={},this._events=new _U,vU(t,"You must pass your PostHog project's api key."),this.apiKey=t,this.host=bU((r==null?void 0:r.host)||"https://app.posthog.com"),this.flushAt=r!=null&&r.flushAt?Math.max(r==null?void 0:r.flushAt,1):20,this.flushInterval=(o=r==null?void 0:r.flushInterval)!==null&&o!==void 0?o:1e4,this.captureMode=(r==null?void 0:r.captureMode)||"form",this.sendFeatureFlagEvent=(i=r==null?void 0:r.sendFeatureFlagEvent)!==null&&i!==void 0?i:!0,this._optoutOverride=(r==null?void 0:r.enable)===!1,this._retryOptions={retryCount:(s=r==null?void 0:r.fetchRetryCount)!==null&&s!==void 0?s:3,retryDelay:(a=r==null?void 0:r.fetchRetryDelay)!==null&&a!==void 0?a:3e3},this.requestTimeout=(f=r==null?void 0:r.requestTimeout)!==null&&f!==void 0?f:1e4,this._sessionExpirationTimeSeconds=(d=r==null?void 0:r.sessionExpirationTimeSeconds)!==null&&d!==void 0?d:1800,(r==null?void 0:r.preloadFeatureFlags)!==!1&&kS(function(){n.reloadFeatureFlagsAsync()},1)}return e.prototype.getCommonEventProperties=function(){var t=this.getFeatureFlags(),r={};if(t)for(var n=0,o=Object.entries(t);n<o.length;n++){var i=o[n],s=i[0],a=i[1];r["$feature/".concat(s)]=a}return Ae({$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion(),$active_feature_flags:t?Object.keys(t):void 0},r)},e.prototype.setupBootstrap=function(t){var r,n,o,i;if(!((r=t==null?void 0:t.bootstrap)===null||r===void 0)&&r.distinctId&&(!((n=t==null?void 0:t.bootstrap)===null||n===void 0)&&n.isIdentifiedId?this.setPersistedProperty(me.DistinctId,t.bootstrap.distinctId):this.setPersistedProperty(me.AnonymousId,t.bootstrap.distinctId)),!((o=t==null?void 0:t.bootstrap)===null||o===void 0)&&o.featureFlags){var s=Object.keys(((i=t.bootstrap)===null||i===void 0?void 0:i.featureFlags)||{}).filter(function(a){var f,d;return!!(!((d=(f=t.bootstrap)===null||f===void 0?void 0:f.featureFlags)===null||d===void 0)&&d[a])}).reduce(function(a,f){var d,h;return a[f]=((h=(d=t.bootstrap)===null||d===void 0?void 0:d.featureFlags)===null||h===void 0?void 0:h[f])||!1,a},{});this.setKnownFeatureFlags(s)}},Object.defineProperty(e.prototype,"props",{get:function(){return this._props||(this._props=this.getPersistedProperty(me.Props)),this._props||{}},set:function(t){this._props=t},enumerable:!1,configurable:!0}),e.prototype.clearProps=function(){this.props=void 0},Object.defineProperty(e.prototype,"optedOut",{get:function(){var t,r;return(r=(t=this.getPersistedProperty(me.OptedOut))!==null&&t!==void 0?t:this._optoutOverride)!==null&&r!==void 0?r:!1},enumerable:!1,configurable:!0}),e.prototype.optIn=function(){this.setPersistedProperty(me.OptedOut,!1)},e.prototype.optOut=function(){this.setPersistedProperty(me.OptedOut,!0)},e.prototype.on=function(t,r){return this._events.on(t,r)},e.prototype.reset=function(t){var r=yU([me.Queue],t||[],!0);this.clearProps();for(var n=0,o=Object.keys(me);n<o.length;n++){var i=o[n];r.includes(me[i])||this.setPersistedProperty(me[i],null)}},e.prototype.debug=function(t){var r;t===void 0&&(t=!0),(r=this.removeDebugCallback)===null||r===void 0||r.call(this),t&&(this.removeDebugCallback=this.on("*",function(n,o){return console.log("PostHog Debug",n,o)}))},e.prototype.buildPayload=function(t){return{distinct_id:t.distinct_id||this.getDistinctId(),event:t.event,properties:Ae(Ae(Ae(Ae({},this.props),t.properties||{}),this.getCommonEventProperties()),{$session_id:this.getSessionId()})}},e.prototype.getSessionId=function(){var t=this.getPersistedProperty(me.SessionId),r=this.getPersistedProperty(me.SessionLastTimestamp)||0;return(!t||Date.now()-r>this._sessionExpirationTimeSeconds*1e3)&&(t=RS(globalThis),this.setPersistedProperty(me.SessionId,t)),this.setPersistedProperty(me.SessionLastTimestamp,Date.now()),t},e.prototype.resetSessionId=function(){this.setPersistedProperty(me.SessionId,null)},e.prototype.getAnonymousId=function(){var t=this.getPersistedProperty(me.AnonymousId);return t||(t=RS(globalThis),this.setPersistedProperty(me.AnonymousId,t)),t},e.prototype.getDistinctId=function(){return this.getPersistedProperty(me.DistinctId)||this.getAnonymousId()},e.prototype.register=function(t){this.props=Ae(Ae({},this.props),t),this.setPersistedProperty(me.Props,this.props)},e.prototype.unregister=function(t){delete this.props[t],this.setPersistedProperty(me.Props,this.props)},e.prototype.identify=function(t,r){var n=this.getDistinctId();t=t||n,r!=null&&r.$groups&&this.groups(r.$groups);var o=Ae(Ae({},this.buildPayload({distinct_id:t,event:"$identify",properties:Ae(Ae({},r||{}),{$anon_distinct_id:this.getAnonymousId()})})),{$set:r});return t!==n&&(this.setPersistedProperty(me.AnonymousId,n),this.setPersistedProperty(me.DistinctId,t),this.getFeatureFlags()&&this.reloadFeatureFlagsAsync()),this.enqueue("identify",o),this},e.prototype.capture=function(t,r,n){if(n===void 0&&(n=!1),r!=null&&r.$groups&&this.groups(r.$groups),n)this._sendFeatureFlags(t,r);else{var o=this.buildPayload({event:t,properties:r});this.enqueue("capture",o)}return this},e.prototype.alias=function(t){var r=this.getDistinctId(),n=this.buildPayload({event:"$create_alias",properties:{distinct_id:r,alias:t}});return this.enqueue("alias",n),this},e.prototype.autocapture=function(t,r,n){n===void 0&&(n={});var o=this.buildPayload({event:"$autocapture",properties:Ae(Ae({},n),{$event_type:t,$elements:r})});return this.enqueue("autocapture",o),this},e.prototype.groups=function(t){var r=this.props.$groups||{};return this.register({$groups:Ae(Ae({},r),t)}),Object.keys(t).find(function(n){return r[n]!==t[n]})&&this.getFeatureFlags()&&this.reloadFeatureFlagsAsync(),this},e.prototype.group=function(t,r,n){var o;return this.groups((o={},o[t]=r,o)),n&&this.groupIdentify(t,r,n),this},e.prototype.groupIdentify=function(t,r,n){var o={event:"$groupidentify",distinctId:"$".concat(t,"_").concat(r),properties:Ae({$group_type:t,$group_key:r,$group_set:n||{}},this.getCommonEventProperties())};return this.enqueue("capture",o),this},e.prototype.personProperties=function(t){var r=this.getPersistedProperty(me.PersonProperties)||{};return this.setPersistedProperty(me.PersonProperties,Ae(Ae({},r),t)),this},e.prototype.groupProperties=function(t){var r=this.getPersistedProperty(me.GroupProperties)||{};return Object.keys(r).length!==0&&Object.keys(r).forEach(function(n){r[n]=Ae(Ae({},r[n]),t[n]),delete t[n]}),this.setPersistedProperty(me.GroupProperties,Ae(Ae({},r),t)),this},e.prototype.decideAsync=function(t){return t===void 0&&(t=!0),this._decideResponsePromise?this._decideResponsePromise:this._decideAsync(t)},e.prototype._decideAsync=function(t){return t===void 0&&(t=!0),Is(this,void 0,void 0,function(){var r,n,o,i,s,a,f=this;return As(this,function(d){return r="".concat(this.host,"/decide/?v=2"),n=this.getDistinctId(),o=this.props.$groups||{},i=this.getPersistedProperty(me.PersonProperties)||{},s=this.getPersistedProperty(me.GroupProperties)||{},a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:this.apiKey,distinct_id:n,$anon_distinct_id:t?this.getAnonymousId():void 0,groups:o,person_properties:i,group_properties:s})},this._decideResponsePromise=this.fetchWithRetry(r,a).then(function(h){return h.json()}).then(function(h){return h.featureFlags&&f.setKnownFeatureFlags(h.featureFlags),h}).finally(function(){f._decideResponsePromise=void 0}),[2,this._decideResponsePromise]})})},e.prototype.setKnownFeatureFlags=function(t){this.setPersistedProperty(me.FeatureFlags,t),this._events.emit("featureflags",t)},e.prototype.getFeatureFlag=function(t){var r=this.getFeatureFlags();if(!!r){var n=r[t];return n===void 0&&(n=!1),this.sendFeatureFlagEvent&&!this.flagCallReported[t]&&(this.flagCallReported[t]=!0,this.capture("$feature_flag_called",{$feature_flag:t,$feature_flag_response:n})),n}},e.prototype.getFeatureFlags=function(){var t=this.getPersistedProperty(me.FeatureFlags),r=this.getPersistedProperty(me.OverrideFeatureFlags);if(!r)return t;t=t||{};for(var n in r)r[n]?t[n]=r[n]:delete t[n];return t},e.prototype.isFeatureEnabled=function(t){var r=this.getFeatureFlag(t);if(r!==void 0)return!!r},e.prototype.reloadFeatureFlagsAsync=function(t){return t===void 0&&(t=!0),Is(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this.decideAsync(t)];case 1:return[2,r.sent().featureFlags]}})})},e.prototype.onFeatureFlags=function(t){var r=this;return this.on("featureflags",function(){return Is(r,void 0,void 0,function(){var n;return As(this,function(o){return n=this.getFeatureFlags(),n&&t(n),[2]})})})},e.prototype.onFeatureFlag=function(t,r){var n=this;return this.on("featureflags",function(){return Is(n,void 0,void 0,function(){var o;return As(this,function(i){return o=this.getFeatureFlag(t),o!==void 0&&r(o),[2]})})})},e.prototype.overrideFeatureFlag=function(t){return t===null?this.setPersistedProperty(me.OverrideFeatureFlags,null):this.setPersistedProperty(me.OverrideFeatureFlags,t)},e.prototype._sendFeatureFlags=function(t,r){var n=this;this.reloadFeatureFlagsAsync(!1).finally(function(){var o=n.buildPayload({event:t,properties:r});n.enqueue("capture",o)})},e.prototype.enqueue=function(t,r){var n=this;if(!this.optedOut){var o=Ae(Ae({},r),{type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:r.timestamp?r.timestamp:NS()});o.distinctId&&(o.distinct_id=o.distinctId,delete o.distinctId);var i=this.getPersistedProperty(me.Queue)||[];i.push({message:o}),this.setPersistedProperty(me.Queue,i),this._events.emit(t,o),i.length>=this.flushAt&&this.flush(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=kS(function(){return n.flush()},this.flushInterval))}},e.prototype.flushAsync=function(){var t=this;return new Promise(function(r,n){t.flush(function(o,i){return o?n(o):r(i)})})},e.prototype.flush=function(t){var r=this;if(this.optedOut)return t==null?void 0:t();this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=null);var n=this.getPersistedProperty(me.Queue)||[];if(!n.length)return t==null?void 0:t();var o=n.splice(0,this.flushAt);this.setPersistedProperty(me.Queue,n);var i=o.map(function(g){return g.message}),s={api_key:this.apiKey,batch:i,sent_at:NS()},a=function(g){t==null||t(g,i),r._events.emit("flush",i)};this.getCustomUserAgent();var f=JSON.stringify(s),d=this.captureMode==="form"?"".concat(this.host,"/e/?ip=1&_=").concat($S(),"&v=").concat(this.getLibraryVersion()):"".concat(this.host,"/batch/"),h=this.captureMode==="form"?{method:"POST",mode:"no-cors",credentials:"omit",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"data=".concat(encodeURIComponent(jl.compressToBase64(f)),"&compression=lz64")}:{method:"POST",headers:{"Content-Type":"application/json"},body:f};this.fetchWithRetry(d,h).then(function(){return a()}).catch(function(g){if(g.response){var v=new Error(g.response.statusText);return a(v)}a(g)})},e.prototype.fetchWithRetry=function(t,r,n){var o,i;return Is(this,void 0,void 0,function(){var s=this;return As(this,function(a){return(o=(i=AbortSignal).timeout)!==null&&o!==void 0||(i.timeout=function(d){var h=new AbortController;return setTimeout(function(){return h.abort()},d),h.signal}),[2,wU(function(){return s.fetch(t,Ae({signal:AbortSignal.timeout(s.requestTimeout)},r))},n||this._retryOptions)]})})},e.prototype.shutdownAsync=function(){return Is(this,void 0,void 0,function(){return As(this,function(t){switch(t.label){case 0:return clearTimeout(this._flushTimer),[4,this.flushAsync()];case 1:return t.sent(),[2]}})})},e.prototype.shutdown=function(){this.shutdownAsync()},e}(),BS="2.0.0";function SU(e){var t={};if(e.navigator){var r=e.navigator.userAgent;t=Ae(Ae({},t),{$os:TU(e),$browser:US(r,e.navigator.vendor,!!e.opera),$referrer:e.document.referrer,$referring_domain:IU(e.document.referrer),$device:PU(r),$current_url:e.location.href,$host:e.location.host,$pathname:e.location.pathname,$browser_version:CU(r,e.navigator.vendor,!!e.opera),$screen_height:e.screen.height,$screen_width:e.screen.width,$screen_dpr:e.devicePixelRatio})}return t=Ae(Ae({},t),{$lib:"js",$lib_version:BS,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:$S()/1e3}),t}function pt(e,t){return e.indexOf(t)>=0}function US(e,t,r){return t=t||"",r||pt(e," OPR/")?pt(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":pt(e,"IEMobile")||pt(e,"WPDesktop")?"Internet Explorer Mobile":pt(e,"SamsungBrowser/")?"Samsung Internet":pt(e,"Edge")||pt(e,"Edg/")?"Microsoft Edge":pt(e,"FBIOS")?"Facebook Mobile":pt(e,"Chrome")?"Chrome":pt(e,"CriOS")?"Chrome iOS":pt(e,"UCWEB")||pt(e,"UCBrowser")?"UC Browser":pt(e,"FxiOS")?"Firefox iOS":pt(t,"Apple")?pt(e,"Mobile")?"Mobile Safari":"Safari":pt(e,"Android")?"Android Mobile":pt(e,"Konqueror")?"Konqueror":pt(e,"Firefox")?"Firefox":pt(e,"MSIE")||pt(e,"Trident/")?"Internet Explorer":pt(e,"Gecko")?"Mozilla":""}function CU(e,t,r){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=US(e,t,r),i=n[o]||void 0;if(i===void 0)return null;var s=e.match(i);return s?parseFloat(s[s.length-2]):null}function TU(e){var t=e.navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""}function PU(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""}function IU(e){var t=e.split("/");return t.length>=3?t[2]:""}var jS={getItem:function(e){try{for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];o.charAt(0)==" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return decodeURIComponent(o.substring(t.length,o.length))}}catch{}return null},setItem:function(e,t){try{var r="",n="",o="",i=e+"="+encodeURIComponent(t)+n+"; path=/"+r+o;document.cookie=i}catch{return}},removeItem:function(e){try{jS.setItem(e,"")}catch{return}},clear:function(){document.cookie=""},getAllKeys:function(){for(var e=document.cookie.split(";"),t=[],r=0;r<e.length;r++){for(var n=e[r];n.charAt(0)==" ";)n=n.substring(1,n.length);t.push(n.split("=")[0])}return t}},LS=function(e){return{getItem:function(t){return e.getItem(t)},setItem:function(t,r){e.setItem(t,r)},removeItem:function(t){e.removeItem(t)},clear:function(){e.clear()},getAllKeys:function(){var t=[];for(var r in localStorage)t.push(r);return t}}},FS=function(e,t){if(t===void 0&&(t="__mplssupport__"),!window)return!1;try{var r="xyz";return e.setItem(t,r),e.getItem(t)!==r?!1:(e.removeItem(t),!0)}catch{return!1}},Zv=void 0,Bl=void 0,Ul=function(){var e={},t={getItem:function(r){return e[r]},setItem:function(r,n){e[r]=n!==null?n:void 0},removeItem:function(r){delete e[r]},clear:function(){for(var r in e)delete e[r]},getAllKeys:function(){var r=[];for(var n in e)r.push(n);return r}};return t},AU=function(e,t){if(t){if(!localStorage){var r=LS(t.localStorage);Zv=FS(r)?r:void 0}if(!Bl){var n=LS(t.sessionStorage);Bl=FS(n)?n:void 0}}switch(e){case"cookie":return jS||Zv||Bl||Ul();case"localStorage":return Zv||Bl||Ul();case"sessionStorage":return Bl||Ul();case"memory":return Ul();default:return Ul()}},VS=function(e){gU(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o._storageKey=n!=null&&n.persistence_name?"ph_".concat(n.persistence_name):"ph_".concat(r,"_posthog"),o._storage=AU((n==null?void 0:n.persistence)||"localStorage",window),o.setupBootstrap(n),o}return t.prototype.getPersistedProperty=function(r){return this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),this._storageCache[r]},t.prototype.setPersistedProperty=function(r,n){this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),n===null?delete this._storageCache[r]:this._storageCache[r]=n,this._storage.setItem(this._storageKey,JSON.stringify(this._storageCache))},t.prototype.fetch=function(r,n){return window.fetch(r,n)},t.prototype.getLibraryId=function(){return"posthog-js-lite"},t.prototype.getLibraryVersion=function(){return BS},t.prototype.getCustomUserAgent=function(){},t.prototype.getCommonEventProperties=function(){return Ae(Ae({},e.prototype.getCommonEventProperties.call(this)),SU(window))},t}(EU);function DU(e){return{name:"telemetry-error",error:e}}typeof globalThis.window<"u"&&(window.onunhandledrejection=function(e){return e.reason.name!=="telemetry-error"});async function OU(e,t){try{return await fetch(e,t)}catch(r){throw DU(r)}}var vt=null;typeof globalThis.window<"u"&&(vt=new VS("phc_QttqgDbMQDYHX1EMH7FnT6ECBVzdp0kGUq92aQaVQ6I",{persistence:"memory"}),vt.fetch=OU);var Qp={version:"0.5.1",package:"idkit-js"},tu=()=>{var e;return(e=vt==null?void 0:vt.getDistinctId())!=null?e:""},zS=e=>{e?vt==null||vt.capture("idkit loaded",Qp):vt==null||vt.optOut()},HS=()=>{vt==null||vt.capture("idkit opened",Qp)},qS=()=>{vt==null||vt.capture("idkit phone typed",Qp)},KS=e=>{vt==null||vt.capture("idkit phone code retried",B(D({},Qp),{channel:e}))};var RU=Yp()((e,t)=>({app_id:"",signal:"",action:"",phoneNumber:"",methods:[],action_description:"",walletConnectProjectId:"",credential_types:[],open:!1,code:"",result:null,theme:"light",errorTitle:"",errorDetail:"",autoClose:!0,errorState:null,processing:!1,verifyCallbacks:{},successCallbacks:{},stage:"WORLD_ID",computed:{canGoBack:r=>{switch(r){case"ENTER_PHONE":return t().methods.includes("orb");case"WORLD_ID":return t().methods.includes("phone");case"ENTER_CODE":case"PRIVACY":return!0;default:return!1}},getDefaultStage:r=>(r=r!=null?r:t().methods,r.length>1?"SELECT_METHOD":r[0]==="phone"?"ENTER_PHONE":"WORLD_ID")},setCode:r=>e({code:r}),setStage:r=>e({stage:r}),setErrorState:r=>e({errorState:r}),setProcessing:r=>e({processing:r}),setPhoneNumber:r=>e({phoneNumber:r}),retryFlow:()=>{t().methods.length===1&&e({stage:t().computed.getDefaultStage(),errorState:null}),e({stage:"SELECT_METHOD",errorState:null})},addSuccessCallback:(r,n)=>{e(o=>(o.successCallbacks[n]=r,o))},addVerificationCallback:(r,n)=>{e(o=>(o.verifyCallbacks[n]=r,o))},setOptions:({handleVerify:r,onSuccess:n,signal:o,action:i,app_id:s,credential_types:a,action_description:f,experimental_methods:d,walletConnectProjectId:h,autoClose:g,theme:v},b)=>{let w=a==null?void 0:a.filter(C=>Object.values(Jp).includes(C)),_=d&&d!==t().methods;e(C=>({theme:v,signal:o,action:i,app_id:s,autoClose:g,walletConnectProjectId:h,credential_types:w,action_description:f,methods:d!=null?d:C.methods,stage:_?C.computed.getDefaultStage(d):t().stage})),t().addSuccessCallback(n,b),r&&t().addVerificationCallback(r,b)},handleVerify:r=>{e({stage:"HOST_APP_VERIFICATION",processing:!1}),Promise.all(Object.values(t().verifyCallbacks).map(n=>n(r))).then(()=>{e({stage:"SUCCESS",result:r}),t().autoClose&&setTimeout(()=>t().onOpenChange(!1),1e3)},n=>{let o;n&&typeof n=="object"&&n.message&&(o=n.message),e({stage:"ERROR",errorState:{code:"failed_by_host_app",message:o?U(o):void 0}})})},onOpenChange:r=>{if(r)return HS(),e({open:r});if(t().stage=="SUCCESS"){let n=t().result,o=t().successCallbacks;n&&requestAnimationFrame(()=>Object.values(o).forEach(i=>void i(n)))}e({open:r,code:"",result:null,errorState:null,processing:!1,stage:t().computed.getDefaultStage()})}})),Qe=RU;u();l();c();var X$=N(hP(),1);u();l();c();var Y$=N(z(),1);u();l();c();u();l();c();var At=N(z()),EP=N(qs()),jo=N(mw()),LV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function SP(e,t){return e(t={exports:{}},t.exports),t.exports}var FV=SP(function(e){(function(t){var r=function(C,x,S){if(!f(x)||h(x)||g(x)||v(x)||a(x))return x;var E,T=0,A=0;if(d(x))for(E=[],A=x.length;T<A;T++)E.push(r(C,x[T],S));else for(var O in E={},x)Object.prototype.hasOwnProperty.call(x,O)&&(E[C(O,S)]=r(C,x[O],S));return E},n=function(C){return b(C)?C:(C=C.replace(/[\-_\s]+(.)?/g,function(x,S){return S?S.toUpperCase():""})).substr(0,1).toLowerCase()+C.substr(1)},o=function(C){var x=n(C);return x.substr(0,1).toUpperCase()+x.substr(1)},i=function(C,x){return function(S,E){var T=(E=E||{}).separator||"_",A=E.split||/(?=[A-Z])/;return S.split(A).join(T)}(C,x).toLowerCase()},s=Object.prototype.toString,a=function(C){return typeof C=="function"},f=function(C){return C===Object(C)},d=function(C){return s.call(C)=="[object Array]"},h=function(C){return s.call(C)=="[object Date]"},g=function(C){return s.call(C)=="[object RegExp]"},v=function(C){return s.call(C)=="[object Boolean]"},b=function(C){return(C-=0)==C},w=function(C,x){var S=x&&"process"in x?x.process:x;return typeof S!="function"?C:function(E,T){return S(E,C,T)}},_={camelize:n,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(C,x){return r(w(n,x),C)},decamelizeKeys:function(C,x){return r(w(i,x),C,x)},pascalizeKeys:function(C,x){return r(w(o,x),C)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=_:t.humps=_})(LV)}).decamelize,$V=SP(function(e){function t(){return e.exports=t=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])}return r},t.apply(this,arguments)}e.exports=t}),BV=function(e){if(Array.isArray(e))return e},UV=function(e,t){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(f){o=!0,i=f}finally{try{n||a.return==null||a.return()}finally{if(o)throw i}}return r}},_P=function(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},jV=function(e,t){if(e){if(typeof e=="string")return _P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_P(e,t):void 0}},VV=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},zV=function(e,t){return BV(e)||UV(e,t)||jV(e,t)||VV()},HV=function(e,t){if(e==null)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},qV=function(e,t){if(e==null)return{};var r,n,o=HV(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},KV=(0,At.createContext)(null);function yw(e){var t=e.root,r=e.children;return(0,EP.createPortal)(r,t)}function GV(e){var t=(0,At.forwardRef)(function(r,n){var o,i,s=r.mode,a=r.delegatesFocus,f=r.styleSheets,d=r.ssr,h=r.children,g=qV(r,["mode","delegatesFocus","styleSheets","ssr","children"]),v=(i=(0,At.useRef)((o=n)&&o.current),(0,At.useEffect)(function(){o&&(o.current=i.current)},[o]),i),b=(0,At.useState)(null),w=zV(b,2),_=w[0],C=w[1],x="node_".concat(s).concat(a);return(0,At.useEffect)(function(){if(v.current)try{if(typeof n=="function"&&n(v.current),d){var S=v.current.shadowRoot;return void C(S)}var E=v.current.attachShadow({mode:s,delegatesFocus:a});f.length>0&&(E.adoptedStyleSheets=f),C(E)}catch(T){(function(A){var O=A.error,P=A.styleSheets,I=A.root;switch(O.name){case"NotSupportedError":P.length>0&&(I.adoptedStyleSheets=P);break;default:throw O}})({error:T,styleSheets:f,root:_})}},[n,v,f]),At.default.createElement(At.default.Fragment,null,At.default.createElement(e.tag,$V({key:x,ref:v},g),(_||d)&&At.default.createElement(KV.Provider,{value:_},d?At.default.createElement("template",{shadowroot:"open"},e.render({root:_,ssr:d,children:h})):At.default.createElement(yw,{root:_},e.render({root:_,ssr:d,children:h})))))});return t.propTypes={mode:jo.default.oneOf(["open","closed"]),delegatesFocus:jo.default.bool,styleSheets:jo.default.arrayOf(jo.default.instanceOf(globalThis.CSSStyleSheet)),ssr:jo.default.bool,children:jo.default.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}yw.propTypes={root:jo.default.object.isRequired,children:jo.default.node},yw.defaultProps={children:null};var gw=new Map;function WV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(n){return n.children};return new Proxy(e,{get:function(n,o){var i=FV(o,{separator:"-"}),s="".concat(t,"-").concat(i);return gw.has(s)||gw.set(s,GV({tag:i,render:r})),gw.get(s)}})}var YV=WV(),CP=YV;u();l();c();var JV=`@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&family=Sora:wght@600&display=swap");
|
|
22
|
+
/*! tailwindcss v3.2.6 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:Rubik,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:414px){.container{max-width:414px}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.inset-0{bottom:0;left:0;right:0;top:0}.inset-px{bottom:1px;left:1px;right:1px;top:1px}.inset-x-0{left:0;right:0}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.\\!-m-px{margin:-1px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.-ml-4{margin-left:-1rem}.-mt-1{margin-top:-.25rem}.-mt-5{margin-top:-1.25rem}.-mt-6{margin-top:-1.5rem}.-mt-\\[2px\\]{margin-top:-2px}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-2\\.5{margin-left:.625rem}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-\\[2px\\]{margin-top:2px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-\\[6\\/7\\]{aspect-ratio:6/7}.aspect-square{aspect-ratio:1/1}.\\!h-px{height:1px!important}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-12{height:3rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[244px\\]{height:244px}.h-\\[72px\\]{height:72px}.h-auto{height:auto}.h-px{height:1px}.max-h-\\[var\\(--max-h\\2c _0px\\)\\]{max-height:var(--max-h,0)}.min-h-full{min-height:100%}.\\!w-px{width:1px!important}.w-10{width:2.5rem}.w-12{width:3rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[244px\\]{width:244px}.w-\\[34px\\]{width:34px}.w-\\[72px\\]{width:72px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[calc\\(100vw_-_48px\\)\\]{min-width:calc(100vw - 48px)}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.basis-4{flex-basis:1rem}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.scale-x-\\[2\\.0\\]{--tw-scale-x:2.0}.scale-x-\\[2\\.0\\],.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.place-items-center{place-items:center}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-4{gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.\\!overflow-hidden{overflow:hidden!important}.overflow-hidden{overflow:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.\\!whitespace-nowrap{white-space:nowrap!important}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.\\!border-0{border-width:0!important}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-4{border-width:4px}.border-solid{border-style:solid}.border-none{border-style:none}.border-current{border-color:currentColor}.border-f1f5f8{--tw-border-opacity:1;border-color:rgb(241 245 248/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white\\/10{border-color:hsla(0,0%,100%,.1)}.border-r-transparent{border-right-color:transparent}.bg-0d151d{--tw-bg-opacity:1;background-color:rgb(13 21 29/var(--tw-bg-opacity))}.bg-0d151d\\/5{background-color:rgba(13,21,29,.05)}.bg-\\[\\#fecaca\\]{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-black\\/50{background-color:rgba(0,0,0,.5)}.bg-d3dfea\\/30{background-color:rgba(211,223,234,.3)}.bg-f2f5f9{--tw-bg-opacity:1;background-color:rgb(242 245 249/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gradient-conic{background-image:conic-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#FF6848\\]{--tw-gradient-from:#ff6848;--tw-gradient-to:rgba(255,104,72,0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-black{--tw-gradient-from:#000;--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-f2f5f9{--tw-gradient-from:#f2f5f9;--tw-gradient-to:rgba(242,245,249,0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-gray-200{--tw-gradient-to:rgba(229,231,235,0);--tw-gradient-stops:var(--tw-gradient-from),#e5e7eb,var(--tw-gradient-to)}.via-white\\/30{--tw-gradient-to:hsla(0,0%,100%,0);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.3),var(--tw-gradient-to)}.to-\\[\\#4940E0\\]{--tw-gradient-to:#4940e0}.to-black{--tw-gradient-to:#000}.to-gray-200{--tw-gradient-to:#e5e7eb}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.\\!p-0{padding:0!important}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-5{padding:1.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-24{padding-left:6rem;padding-right:6rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-6{padding-left:1.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-\\[-0\\.125em\\]{vertical-align:-.125em}.font-sans{font-family:Rubik,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-sora{font-family:Sora,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.text-0d151d{--tw-text-opacity:1;color:rgb(13 21 29/var(--tw-text-opacity))}.text-0d151d\\/70{color:rgba(13,21,29,.7)}.text-29343f{--tw-text-opacity:1;color:rgb(41 52 63/var(--tw-text-opacity))}.text-4940e0{--tw-text-opacity:1;color:rgb(73 64 224/var(--tw-text-opacity))}.text-70868f{--tw-text-opacity:1;color:rgb(112 134 143/var(--tw-text-opacity))}.text-9eafc0{--tw-text-opacity:1;color:rgb(158 175 192/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.caret-transparent{caret-color:transparent}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-0{outline-width:0}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-black\\/5{--tw-ring-color:rgba(0,0,0,.05)}.ring-transparent{--tw-ring-color:transparent}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.will-change-transform{will-change:transform}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{appearance:none}.\\!\\[clip\\:rect\\(0\\2c 0\\2c 0\\2c 0\\)\\]{clip:rect(0,0,0,0)!important}.placeholder\\:text-9eafc0::placeholder{--tw-text-opacity:1;color:rgb(158 175 192/var(--tw-text-opacity))}.focus-within\\:border-0d151d:focus-within{--tw-border-opacity:1;border-color:rgb(13 21 29/var(--tw-border-opacity))}.focus-within\\:bg-white:focus-within{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus\\:bg-transparent:focus{background-color:transparent}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-0d151d:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(13 21 29/var(--tw-ring-opacity))}.focus\\:ring-5b52f3:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(91 82 243/var(--tw-ring-opacity))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\\:ring-transparent:focus{--tw-ring-color:transparent}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-purple-500\\/75:focus-visible{--tw-ring-color:rgba(168,85,247,.75)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:cursor-wait:disabled{cursor:wait}.disabled\\:bg-d3dfea:disabled{--tw-bg-opacity:1;background-color:rgb(211 223 234/var(--tw-bg-opacity))}.disabled\\:text-gray-900:disabled{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:hover\\:bg-indigo-600:hover:disabled{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}@media (prefers-reduced-motion:reduce){@keyframes spin{to{transform:rotate(1turn)}}.motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\]{animation:spin 1.5s linear infinite}}.dark .dark\\:border{border-width:1px}.dark .dark\\:border-f1f5f8\\/10{border-color:rgba(241,245,248,.1)}.dark .dark\\:bg-0d151d{--tw-bg-opacity:1;background-color:rgb(13 21 29/var(--tw-bg-opacity))}.dark .dark\\:bg-29343f{--tw-bg-opacity:1;background-color:rgb(41 52 63/var(--tw-bg-opacity))}.dark .dark\\:bg-d3dfea\\/15{background-color:rgba(211,223,234,.15)}.dark .dark\\:bg-ece8fb\\/10{background-color:rgba(236,232,251,.1)}.dark .dark\\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.dark .dark\\:text-0d151d{--tw-text-opacity:1;color:rgb(13 21 29/var(--tw-text-opacity))}.dark .dark\\:text-596673{--tw-text-opacity:1;color:rgb(89 102 115/var(--tw-text-opacity))}.dark .dark\\:text-9eafc0{--tw-text-opacity:1;color:rgb(158 175 192/var(--tw-text-opacity))}.dark .dark\\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .dark\\:text-white\\/70{color:hsla(0,0%,100%,.7)}.dark .dark\\:focus-within\\:border-white:focus-within{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.dark .dark\\:focus-within\\:bg-transparent:focus-within{background-color:transparent}.dark .dark\\:focus\\:bg-ece8fb\\/25:focus{background-color:rgba(236,232,251,.25)}.dark .dark\\:disabled\\:bg-29343f:disabled{--tw-bg-opacity:1;background-color:rgb(41 52 63/var(--tw-bg-opacity))}.dark .dark\\:disabled\\:text-white:disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}@media (min-width:414px){.xs\\:w-12{width:3rem}}@media (min-width:640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\\:mt-2{margin-top:.5rem}.md\\:block{display:block}.md\\:hidden{display:none}.md\\:max-h-96{max-height:24rem}.md\\:min-w-\\[20rem\\]{min-width:20rem}.md\\:max-w-md{max-width:28rem}.md\\:items-center{align-items:center}.md\\:overflow-y-auto{overflow-y:auto}.md\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.md\\:p-4{padding:1rem}}`,TP=()=>p.createElement("style",null,JV);u();l();c();var vm=N(z(),1),XV=()=>{let[e,t]=(0,vm.useState)("desktop");return(0,vm.useEffect)(()=>{let r=window.matchMedia("(max-width: 768px)"),n=o=>t(o.matches?"mobile":"desktop");return n(r),r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),e},Ru=XV;u();l();c();var wt=(...e)=>e.filter(Boolean).join(" "),PP=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);u();l();c();function Nu(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,o]of e)if(!Object.is(o,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}u();l();c();var QV=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}),p.createElement("path",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m16.243 7.758-8.485 8.485m8.485 0L7.758 7.758"})),ku=QV;u();l();c();var ZV=({retryFlow:e,errorState:t})=>({retryFlow:e,errorState:t}),IP={["failed_by_host_app"]:U("Verification Declined"),["generic_error"]:U("Verification Failed")},ez={["connection_failed"]:U("Connection to the World App or identity wallet failed. Please try again."),["verification_rejected"]:U("Verification request rejected in the World App."),["max_verifications_reached"]:U("You have already verified the maximum number of times for this action."),["already_signed"]:U("You have already verified for this action."),["credential_unavailable"]:U("It seems you do not have the credential required by this app."),["malformed_request"]:U("There was a problem with this request. Please try again or contact the app owner."),["invalid_network"]:U("This app is not available on the network you are connected to. Visit docs.worldcoin.org/test for details."),["inclusion_proof_failed"]:U("There was an issue fetching your credential. Please try again."),["inclusion_proof_pending"]:U("Your credential is still being registered. Please wait a few minutes and try again."),["failed_by_host_app"]:U("Verification failed by the app. Please contact the app owner for details."),["unexpected_response"]:U("Unexpected response from the World App or identity wallet. Please try again."),["generic_error"]:U("Something unexpected went wrong. Please try again."),["invalid_phone_otp"]:U("The phone verification code you entered is invalid. Please try again.")},tz=()=>{var r;let{retryFlow:e,errorState:t}=Qe(ZV,Nu);return p.createElement("div",{className:"space-y-8"},p.createElement("div",{className:"-mt-5 flex items-center justify-center"},p.createElement("div",{className:"inline-flex aspect-square items-center justify-center rounded-full bg-red-100 p-5"},p.createElement("div",{className:"flex aspect-square items-center justify-center rounded-full bg-red-500 p-5"},p.createElement(ku,{className:"w-8 text-white"})))),p.createElement("div",null,p.createElement("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white"},(t==null?void 0:t.code)&&IP[t.code]||IP["generic_error"]),p.createElement("p",{className:"mt-2 text-center text-lg text-gray-400"},(t==null?void 0:t.message)||ez[(r=t==null?void 0:t.code)!=null?r:"generic_error"])),p.createElement("div",{className:"flex justify-center"},p.createElement("button",{type:"button",onClick:e,className:"inline-flex items-center rounded-full border border-transparent bg-indigo-600 px-8 py-3 font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-indigo-600"},U("Try Again"))),p.createElement("div",null,p.createElement("p",{className:"mt-4 text-xs text-gray-400"},U("If you are the app owner, check the console for further details."))))},AP=tz;u();l();c();var rz=({className:e=""})=>p.createElement("div",{className:"flex items-center justify-center"},p.createElement("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${e}`,role:"status"},p.createElement("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"},U("Loading...")))),Ki=rz;u();l();c();u();l();c();function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Se.apply(this,arguments)}var J=N(z()),GP=N(qs());u();l();c();function xt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}u();l();c();var DP=N(z());function nz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vw(...e){return t=>e.forEach(r=>nz(r,t))}function nr(...e){return(0,DP.useCallback)(vw(...e),e)}u();l();c();var Ln=N(z());u();l();c();var gr=N(z());function OP(e,t){let r=(0,gr.createContext)(t);function n(i){let d=i,{children:s}=d,a=K(d,["children"]),f=(0,gr.useMemo)(()=>a,Object.values(a));return(0,gr.createElement)(r.Provider,{value:f},s)}function o(i){let s=(0,gr.useContext)(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Mu(e,t=[]){let r=[];function n(i,s){let a=(0,gr.createContext)(s),f=r.length;r=[...r,s];function d(g){let x=g,{scope:v,children:b}=x,w=K(x,["scope","children"]),_=(v==null?void 0:v[e][f])||a,C=(0,gr.useMemo)(()=>w,Object.values(w));return(0,gr.createElement)(_.Provider,{value:C},b)}function h(g,v){let b=(v==null?void 0:v[e][f])||a,w=(0,gr.useContext)(b);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,h]}let o=()=>{let i=r.map(s=>(0,gr.createContext)(s));return function(a){let f=(a==null?void 0:a[e])||i;return(0,gr.useMemo)(()=>({[`__scope${e}`]:B(D({},a),{[e]:f})}),[a,f])}};return o.scopeName=e,[n,oz(o,...t)]}function oz(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){let s=n.reduce((a,{useScope:f,scopeName:d})=>{let g=f(i)[`__scope${d}`];return D(D({},a),g)},{});return(0,gr.useMemo)(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}u();l();c();var it=N(z());var Gi=(0,it.forwardRef)((e,t)=>{let s=e,{children:r}=s,n=K(s,["children"]),o=it.Children.toArray(r),i=o.find(sz);if(i){let a=i.props.children,f=o.map(d=>d===i?it.Children.count(a)>1?it.Children.only(null):(0,it.isValidElement)(a)?a.props.children:null:d);return(0,it.createElement)(bw,Se({},n,{ref:t}),(0,it.isValidElement)(a)?(0,it.cloneElement)(a,void 0,f):null)}return(0,it.createElement)(bw,Se({},n,{ref:t}),r)});Gi.displayName="Slot";var bw=(0,it.forwardRef)((e,t)=>{let o=e,{children:r}=o,n=K(o,["children"]);return(0,it.isValidElement)(r)?(0,it.cloneElement)(r,B(D({},az(n,r.props)),{ref:vw(t,r.ref)})):it.Children.count(r)>1?it.Children.only(null):null});bw.displayName="SlotClone";var iz=({children:e})=>(0,it.createElement)(it.Fragment,null,e);function sz(e){return(0,it.isValidElement)(e)&&e.type===iz}function az(e,t){let r=D({},t);for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{i(...a),o(...a)}:o&&(r[n]=o):n==="style"?r[n]=D(D({},o),i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return D(D({},e),r)}function RP(e){let t=e+"CollectionProvider",[r,n]=Mu(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{let{scope:w,children:_}=b,C=Ln.default.useRef(null),x=Ln.default.useRef(new Map).current;return Ln.default.createElement(o,{scope:w,itemMap:x,collectionRef:C},_)},a=e+"CollectionSlot",f=Ln.default.forwardRef((b,w)=>{let{scope:_,children:C}=b,x=i(a,_),S=nr(w,x.collectionRef);return Ln.default.createElement(Gi,{ref:S},C)}),d=e+"CollectionItemSlot",h="data-radix-collection-item",g=Ln.default.forwardRef((b,w)=>{let A=b,{scope:_,children:C}=A,x=K(A,["scope","children"]),S=Ln.default.useRef(null),E=nr(w,S),T=i(d,_);return Ln.default.useEffect(()=>(T.itemMap.set(S,D({ref:S},x)),()=>void T.itemMap.delete(S))),Ln.default.createElement(Gi,{[h]:"",ref:E},C)});function v(b){let w=i(e+"CollectionConsumer",b);return Ln.default.useCallback(()=>{let C=w.collectionRef.current;if(!C)return[];let x=Array.from(C.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((T,A)=>x.indexOf(T.ref.current)-x.indexOf(A.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:f,ItemSlot:g},v,n]}u();l();c();var ze=N(z());u();l();c();var Lu=N(z()),NP=N(qs());var uz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ft=uz.reduce((e,t)=>{let r=(0,Lu.forwardRef)((n,o)=>{let f=n,{asChild:i}=f,s=K(f,["asChild"]),a=i?Gi:t;return(0,Lu.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,Lu.createElement)(a,Se({},s,{ref:o}))});return r.displayName=`Primitive.${t}`,B(D({},e),{[t]:r})},{});function bm(e,t){e&&(0,NP.flushSync)(()=>e.dispatchEvent(t))}u();l();c();var Fu=N(z());function or(e){let t=(0,Fu.useRef)(e);return(0,Fu.useEffect)(()=>{t.current=e}),(0,Fu.useMemo)(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}u();l();c();var kP=N(z());function MP(e,t=globalThis==null?void 0:globalThis.document){let r=or(e);(0,kP.useEffect)(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}var ww="dismissableLayer.update",cz="dismissableLayer.pointerDownOutside",lz="dismissableLayer.focusOutside",LP,$P=(0,ze.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xw=(0,ze.forwardRef)((e,t)=>{var r;let I=e,{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:f}=I,d=K(I,["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"]),h=(0,ze.useContext)($P),[g,v]=(0,ze.useState)(null),b=(r=g==null?void 0:g.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,w]=(0,ze.useState)({}),_=nr(t,R=>v(R)),C=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=C.indexOf(x),E=g?C.indexOf(g):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,A=E>=S,O=dz(R=>{let k=R.target,L=[...h.branches].some(M=>M.contains(k));!A||L||(i==null||i(R),a==null||a(R),R.defaultPrevented||f==null||f())},b),P=pz(R=>{let k=R.target;[...h.branches].some(M=>M.contains(k))||(s==null||s(R),a==null||a(R),R.defaultPrevented||f==null||f())},b);return MP(R=>{E===h.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&f&&(R.preventDefault(),f()))},b),(0,ze.useEffect)(()=>{if(!!g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(LP=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),FP(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=LP)}},[g,b,n,h]),(0,ze.useEffect)(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),FP())},[g,h]),(0,ze.useEffect)(()=>{let R=()=>w({});return document.addEventListener(ww,R),()=>document.removeEventListener(ww,R)},[]),(0,ze.createElement)(Ft.div,Se({},d,{ref:_,style:D({pointerEvents:T?A?"auto":"none":void 0},e.style),onFocusCapture:xt(e.onFocusCapture,P.onFocusCapture),onBlurCapture:xt(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:xt(e.onPointerDownCapture,O.onPointerDownCapture)}))});var fz=(0,ze.forwardRef)((e,t)=>{let r=(0,ze.useContext)($P),n=(0,ze.useRef)(null),o=nr(t,n);return(0,ze.useEffect)(()=>{let i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),(0,ze.createElement)(Ft.div,Se({},e,{ref:o}))});function dz(e,t=globalThis==null?void 0:globalThis.document){let r=or(e),n=(0,ze.useRef)(!1),o=(0,ze.useRef)(()=>{});return(0,ze.useEffect)(()=>{let i=a=>{if(a.target&&!n.current){let d=function(){BP(cz,r,f,{discrete:!0})},f={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function pz(e,t=globalThis==null?void 0:globalThis.document){let r=or(e),n=(0,ze.useRef)(!1);return(0,ze.useEffect)(()=>{let o=i=>{i.target&&!n.current&&BP(lz,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function FP(){let e=new CustomEvent(ww);document.dispatchEvent(e)}function BP(e,t,r,{discrete:n}){let o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?bm(o,i):o.dispatchEvent(i)}var UP=xw,jP=fz;u();l();c();var wm=N(z()),VP=N(qs());var xm=(0,wm.forwardRef)((e,t)=>{var r;let i=e,{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body}=i,o=K(i,["container"]);return n?VP.default.createPortal((0,wm.createElement)(Ft.div,Se({},o,{ref:t})),n):null});u();l();c();var ir=N(z()),HP=N(qs());u();l();c();var zP=N(z()),Ks=Boolean(globalThis==null?void 0:globalThis.document)?zP.useLayoutEffect:()=>{};function hz(e,t){return(0,ir.useReducer)((r,n)=>{let o=t[r][n];return o!=null?o:r},e)}var Gs=e=>{let{present:t,children:r}=e,n=mz(t),o=typeof r=="function"?r({present:n.isPresent}):ir.Children.only(r),i=nr(n.ref,o.ref);return typeof r=="function"||n.isPresent?(0,ir.cloneElement)(o,{ref:i}):null};Gs.displayName="Presence";function mz(e){let[t,r]=(0,ir.useState)(),n=(0,ir.useRef)({}),o=(0,ir.useRef)(e),i=(0,ir.useRef)("none"),s=e?"mounted":"unmounted",[a,f]=hz(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,ir.useEffect)(()=>{let d=_m(n.current);i.current=a==="mounted"?d:"none"},[a]),Ks(()=>{let d=n.current,h=o.current;if(h!==e){let v=i.current,b=_m(d);e?f("MOUNT"):b==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Ks(()=>{if(t){let d=g=>{let b=_m(n.current).includes(g.animationName);g.target===t&&b&&(0,HP.flushSync)(()=>f("ANIMATION_END"))},h=g=>{g.target===t&&(i.current=_m(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:(0,ir.useCallback)(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function _m(e){return(e==null?void 0:e.animationName)||"none"}u();l();c();var Wi=N(z());function Em({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,o]=gz({defaultProp:t,onChange:r}),i=e!==void 0,s=i?e:n,a=or(r),f=(0,Wi.useCallback)(d=>{if(i){let g=typeof d=="function"?d(e):d;g!==e&&a(g)}else o(d)},[i,e,o,a]);return[s,f]}function gz({defaultProp:e,onChange:t}){let r=(0,Wi.useState)(e),[n]=r,o=(0,Wi.useRef)(n),i=or(t);return(0,Wi.useEffect)(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}u();l();c();var Sm=N(z());var _w=(0,Sm.forwardRef)((e,t)=>(0,Sm.createElement)(Ft.span,Se({},e,{ref:t,style:D({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"},e.style)})));var WP="ToastProvider",[Tw,yz,vz]=RP("Toast"),[YP,Mce]=Mu("Toast",[vz]),[bz,Tm]=YP(WP),JP=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,f]=(0,J.useState)(null),[d,h]=(0,J.useState)(0),g=(0,J.useRef)(!1),v=(0,J.useRef)(!1);return(0,J.createElement)(Tw.Provider,{scope:t},(0,J.createElement)(bz,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:d,viewport:a,onViewportChange:f,onToastAdd:(0,J.useCallback)(()=>h(b=>b+1),[]),onToastRemove:(0,J.useCallback)(()=>h(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:v},s))};JP.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){let t=`Invalid prop \`label\` supplied to \`${WP}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};var wz="ToastViewport",xz=["F8"],Sw="toast.viewportPause",Cw="toast.viewportResume",_z=(0,J.forwardRef)((e,t)=>{let C=e,{__scopeToast:r,hotkey:n=xz,label:o="Notifications ({hotkey})"}=C,i=K(C,["__scopeToast","hotkey","label"]),s=Tm(wz,r),a=yz(r),f=(0,J.useRef)(null),d=(0,J.useRef)(null),h=(0,J.useRef)(null),g=(0,J.useRef)(null),v=nr(t,g,s.onViewportChange),b=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;(0,J.useEffect)(()=>{let x=S=>{var E;n.every(A=>S[A]||S.code===A)&&((E=g.current)===null||E===void 0||E.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),(0,J.useEffect)(()=>{let x=f.current,S=g.current;if(w&&x&&S){let E=()=>{if(!s.isClosePausedRef.current){let P=new CustomEvent(Sw);S.dispatchEvent(P),s.isClosePausedRef.current=!0}},T=()=>{if(s.isClosePausedRef.current){let P=new CustomEvent(Cw);S.dispatchEvent(P),s.isClosePausedRef.current=!1}},A=P=>{!x.contains(P.relatedTarget)&&T()},O=()=>{x.contains(document.activeElement)||T()};return x.addEventListener("focusin",E),x.addEventListener("focusout",A),x.addEventListener("pointermove",E),x.addEventListener("pointerleave",O),window.addEventListener("blur",E),window.addEventListener("focus",T),()=>{x.removeEventListener("focusin",E),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",E),x.removeEventListener("pointerleave",O),window.removeEventListener("blur",E),window.removeEventListener("focus",T)}}},[w,s.isClosePausedRef]);let _=(0,J.useCallback)(({tabbingDirection:x})=>{let E=a().map(T=>{let A=T.ref.current,O=[A,...$z(A)];return x==="forwards"?O:O.reverse()});return(x==="forwards"?E.reverse():E).flat()},[a]);return(0,J.useEffect)(()=>{let x=g.current;if(x){let S=E=>{let T=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!T){let R=document.activeElement,k=E.shiftKey;if(E.target===x&&k){var O;(O=d.current)===null||O===void 0||O.focus();return}let F=_({tabbingDirection:k?"backwards":"forwards"}),j=F.findIndex(V=>V===R);if(Ew(F.slice(j+1)))E.preventDefault();else{var P,I;k?(P=d.current)===null||P===void 0||P.focus():(I=h.current)===null||I===void 0||I.focus()}}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[a,_]),(0,J.createElement)(jP,{ref:f,role:"region","aria-label":o.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:w?void 0:"none"}},w&&(0,J.createElement)(qP,{ref:d,onFocusFromOutsideViewport:()=>{let x=_({tabbingDirection:"forwards"});Ew(x)}}),(0,J.createElement)(Tw.Slot,{scope:r},(0,J.createElement)(Ft.ol,Se({tabIndex:-1},i,{ref:v}))),w&&(0,J.createElement)(qP,{ref:h,onFocusFromOutsideViewport:()=>{let x=_({tabbingDirection:"backwards"});Ew(x)}}))}),Ez="ToastFocusProxy",qP=(0,J.forwardRef)((e,t)=>{let s=e,{__scopeToast:r,onFocusFromOutsideViewport:n}=s,o=K(s,["__scopeToast","onFocusFromOutsideViewport"]),i=Tm(Ez,r);return(0,J.createElement)(_w,Se({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var f;let d=a.relatedTarget;!((f=i.viewport)!==null&&f!==void 0&&f.contains(d))&&n()}}))}),Pm="Toast",Sz="toast.swipeStart",Cz="toast.swipeMove",Tz="toast.swipeCancel",Pz="toast.swipeEnd",Iz=(0,J.forwardRef)((e,t)=>{let d=e,{forceMount:r,open:n,defaultOpen:o,onOpenChange:i}=d,s=K(d,["forceMount","open","defaultOpen","onOpenChange"]),[a=!0,f]=Em({prop:n,defaultProp:o,onChange:i});return(0,J.createElement)(Gs,{present:r||a},(0,J.createElement)(XP,Se({open:a},s,{ref:t,onClose:()=>f(!1),onPause:or(e.onPause),onResume:or(e.onResume),onSwipeStart:xt(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:xt(e.onSwipeMove,h=>{let{x:g,y:v}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:xt(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:xt(e.onSwipeEnd,h=>{let{x:g,y:v}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),f(!1)})})))}),[Az,Dz]=YP(Pm,{onClose(){}}),XP=(0,J.forwardRef)((e,t)=>{let j=e,{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:f,onResume:d,onSwipeStart:h,onSwipeMove:g,onSwipeCancel:v,onSwipeEnd:b}=j,w=K(j,["__scopeToast","type","duration","open","onClose","onEscapeKeyDown","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd"]),_=Tm(Pm,r),[C,x]=(0,J.useState)(null),S=nr(t,V=>x(V)),E=(0,J.useRef)(null),T=(0,J.useRef)(null),A=o||_.duration,O=(0,J.useRef)(0),P=(0,J.useRef)(A),I=(0,J.useRef)(0),{onToastAdd:R,onToastRemove:k}=_,L=or(()=>{var V;(C==null?void 0:C.contains(document.activeElement))&&((V=_.viewport)===null||V===void 0||V.focus()),s()}),M=(0,J.useCallback)(V=>{!V||V===1/0||(window.clearTimeout(I.current),O.current=new Date().getTime(),I.current=window.setTimeout(L,V))},[L]);(0,J.useEffect)(()=>{let V=_.viewport;if(V){let G=()=>{M(P.current),d==null||d()},H=()=>{let ee=new Date().getTime()-O.current;P.current=P.current-ee,window.clearTimeout(I.current),f==null||f()};return V.addEventListener(Sw,H),V.addEventListener(Cw,G),()=>{V.removeEventListener(Sw,H),V.removeEventListener(Cw,G)}}},[_.viewport,A,f,d,M]),(0,J.useEffect)(()=>{i&&!_.isClosePausedRef.current&&M(A)},[i,A,_.isClosePausedRef,M]),(0,J.useEffect)(()=>(R(),()=>k()),[R,k]);let F=(0,J.useMemo)(()=>C?e8(C):null,[C]);return _.viewport?(0,J.createElement)(J.Fragment,null,F&&(0,J.createElement)(Oz,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},F),(0,J.createElement)(Az,{scope:r,onClose:L},(0,GP.createPortal)((0,J.createElement)(Tw.ItemSlot,{scope:r},(0,J.createElement)(UP,{asChild:!0,onEscapeKeyDown:xt(a,()=>{_.isFocusedToastEscapeKeyDownRef.current||L(),_.isFocusedToastEscapeKeyDownRef.current=!1})},(0,J.createElement)(Ft.li,Se({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":_.swipeDirection},w,{ref:S,style:D({userSelect:"none",touchAction:"none"},e.style),onKeyDown:xt(e.onKeyDown,V=>{V.key==="Escape"&&(a==null||a(V.nativeEvent),V.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:xt(e.onPointerDown,V=>{V.button===0&&(E.current={x:V.clientX,y:V.clientY})}),onPointerMove:xt(e.onPointerMove,V=>{if(!E.current)return;let G=V.clientX-E.current.x,H=V.clientY-E.current.y,ee=Boolean(T.current),we=["left","right"].includes(_.swipeDirection),te=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,Z=we?te(0,G):0,ae=we?0:te(0,H),ie=V.pointerType==="touch"?10:2,re={x:Z,y:ae},se={originalEvent:V,delta:re};ee?(T.current=re,Cm(Cz,g,se,{discrete:!1})):KP(re,_.swipeDirection,ie)?(T.current=re,Cm(Sz,h,se,{discrete:!1}),V.target.setPointerCapture(V.pointerId)):(Math.abs(G)>ie||Math.abs(H)>ie)&&(E.current=null)}),onPointerUp:xt(e.onPointerUp,V=>{let G=T.current,H=V.target;if(H.hasPointerCapture(V.pointerId)&&H.releasePointerCapture(V.pointerId),T.current=null,E.current=null,G){let ee=V.currentTarget,we={originalEvent:V,delta:G};KP(G,_.swipeDirection,_.swipeThreshold)?Cm(Pz,b,we,{discrete:!0}):Cm(Tz,v,we,{discrete:!0}),ee.addEventListener("click",te=>te.preventDefault(),{once:!0})}})})))),_.viewport))):null});XP.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){let t=`Invalid prop \`type\` supplied to \`${Pm}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};var Oz=e=>{let d=e,{__scopeToast:t,children:r}=d,n=K(d,["__scopeToast","children"]),o=Tm(Pm,t),[i,s]=(0,J.useState)(!1),[a,f]=(0,J.useState)(!1);return Lz(()=>s(!0)),(0,J.useEffect)(()=>{let h=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(h)},[]),a?null:(0,J.createElement)(xm,{asChild:!0},(0,J.createElement)(_w,n,i&&(0,J.createElement)(J.Fragment,null,o.label," ",r)))};var Rz=(0,J.forwardRef)((e,t)=>{let o=e,{__scopeToast:r}=o,n=K(o,["__scopeToast"]);return(0,J.createElement)(Ft.div,Se({},n,{ref:t}))});var Nz="ToastAction",QP=(0,J.forwardRef)((e,t)=>{let o=e,{altText:r}=o,n=K(o,["altText"]);return r?(0,J.createElement)(ZP,{altText:r,asChild:!0},(0,J.createElement)(Mz,Se({},n,{ref:t}))):null});QP.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${Nz}\``)}};var kz="ToastClose",Mz=(0,J.forwardRef)((e,t)=>{let i=e,{__scopeToast:r}=i,n=K(i,["__scopeToast"]),o=Dz(kz,r);return(0,J.createElement)(ZP,{asChild:!0},(0,J.createElement)(Ft.button,Se({type:"button"},n,{ref:t,onClick:xt(e.onClick,o.onClose)})))}),ZP=(0,J.forwardRef)((e,t)=>{let i=e,{__scopeToast:r,altText:n}=i,o=K(i,["__scopeToast","altText"]);return(0,J.createElement)(Ft.div,Se({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},o,{ref:t}))});function e8(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Fz(n)){let o=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!o)if(i){let s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...e8(n))}}),t}function Cm(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?bm(o,i):o.dispatchEvent(i)}var KP=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return t==="left"||t==="right"?i&&n>r:!i&&o>r};function Lz(e=()=>{}){let t=or(e);Ks(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Fz(e){return e.nodeType===e.ELEMENT_NODE}function $z(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ew(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var t8=JP,r8=_z,n8=Iz,o8=Rz;var i8=QP;u();l();c();u();l();c();var a8="data:image/webp;base64,UklGRlYhAABXRUJQVlA4TEkhAAAvX8AXEE0obNu2ge3s5P+H2yMi+j8BAKCFvQAkAB9JVPcjKfwuA2ZU4ABsJjfCcYfKJDsieO1eJDNz2T5c4wyX9OYZ65NJmll45kh68K7EhYNIkhQpj+vAv9p7fhFuHNt2k7FNjs5+ovpi/4uiQtQ5I4Vt2zb8/+GkQ0D/JwC/N57w/0IJN54cufsDwIgn2FB+4R//CVDJDBgjcOAMsHhWAjf4VZJfJ4iAnj8AuAFifRPpCcCBSFlEwAYoMO6JL/64sxK4gFmAmppEgnXECmBGCRczERLhAEBY0VIGJSUADARt2yYJf9bbfgoRMQH8q4dpLhaUgMlMqAQrsIJK4EewAEw1B1bJL7Zb245NknSc1/087xuOzEDaNsa2bdv8Nj8g1/wA27Y903aXXWk7MzKSwfd57vscZKVXf/YtSZIlSZJtIauZRWT0/d7//2n3+707s9zDTYU9SJKk2rZtW2aRrffJczPvXf+KMfPe58zRWxgl2rZNu1a/Jxdx8mzbtm3brtmq2irb+LZt23i2jZN7JsDTbdumbWvbPqFSa+tjzr0v27Zt21fQITtoX1fI1xXz9QN8XbEraNtXyDY3z1lr9N6qLNu200baT5aheYY9DSZXz5K7f5nBjqTnW5IkS5Ik20ISj6rq24f0U///71w/4Z4ZyhG+BUiSJEmSJEBEYvG4/v9Lr0wTYcLfCARt28bZ+VN+I0AM+ITyC7yPn3fnLCgBDODJ9+AeSD+bNnkU9DwHGs1AHdAEVrACkcEQSJv/ypyy/an2eq/x4atnzAafyq71XLzg+ZpMayMOCACTjApasgRYipFAUhiGb8/9nsesNT5WeHZs8KzbelttrRLbS3FAVMgUlGAgqhqoLebzkC0opJDEiMNOctbart7kQ+Vnw0rvqzScD6bBQsAADMJnntr8NtYe2HRosrf0uqXHm/T1TfrvG/6HS5/vXepnJz++eOmnXxz+4YOgAoFUUnZ09pq3DSWfAUmDQkNAYEAmiu/e//UL/ZvtV3SiHCpLNMzSC3opvr1J/3nR/8H/H/zdO3k+yeujxY/PDv3hg6/6+rS0AgQVs+HEng89n7a1PpYvXhsyywLQxhs/+fXlB79m30P145L2mD1zJDg9OltcrGaqPIlJfd+Gt1Z+fbP+/9j+H2x5PMWXD/zTh10f4wfW8UNLKxOoACgt9fxkJJ6qyn8TwRZJoNV3vu9/+Ib/afTxEI/3Fp7v/PPri2/XfZcWhjBrUmpkwdgd+7vjvx5z9ID66zWvf/n6Z5/7/HgfP3YuQUXtb6HcU5R9LAkLAgRf8MAXfkN9H+m+nJ93fvH67LePT57zBFEwIDVSEFIMYTK5ZVfRU/T0pZvN8/TO9R8f/HdBglBe9sx5anAXs80qsHyP/a+HZaPouN3xz+/Hh84xG4kgDLCoXJvVwkNYJGExS4q1zvKk+l64fV+j/1ft56fu/1cTlE1kj4pPSWLVQDFAwS4HJ7Tw5rve+zFm14AQRNCAFewazA7aLLEsGJAasWzjesWrpn89aPxXj9uex/9b2hVQoVR4K/80gFhmcUwEjRkDp8qbFt7w3AeuH5EgBpMpSGrkbEtgULGIlULAJNEmUGiKZ/jXzEP6Dv3PMbBjAalwqjwF2GpSLGQEuifKO6bfc+5CkQJBghABgLRsOAhDLSwEA5FpDyKZBUE2JY7OUzzg51H2MTEQGbGs3CdtLconryMmjHXFktx0LJ24fqyAAAMAWQBAABiSQEQgtSdngwgPhxVNI5AtBNztmHld/DpGby3bCQjosuZuVH6iNrlHGFtB5VommtSXlNud82XuQBAggEIgAAIETYGgsUDCcLEgANmwSDQCQgEELND8XNxRRasmgKBFiwXP5k/Oeu+rFfcgULnAIN1+fI/8Mcb/L8e3E5JsAZggBLUJAw1ECBM2YaCllIkKhsgC6Vz5pJBdN99gpCBSZcyQrdf76k/GIQTBccEJSIKNzac3lDm+/+L7H/GCkMLyCAklVkuGBghA4FAUJAMXSqmeIhRC6X+lv1YpI96n5LY5q0ABZYalOPHQvwke3xcg/meeI63ZZrzQ8uaHXxlzOON8+EWZBCEqhkyJQASylohigEmFJQTgioEpnGDKiVAWgz36bXVlzDDu+LpoRaQIW9Bo2p99fT/+cZ3xaNQ6U2E5YKz46k998mt4jzLjLePH04lCyBYxqxxSTEbDiZgwJhYhIxXGFkkOVQkAvrGNVhRs3107XzHDHQfoi6oqUaRQVRi7w7vaj2ONX2WFMwx33xDDJ3/iu75q9CE9dXUf/3QdJ4MgLCRCbKAqsXUthlkQ4sxN/3vE53vYt93sCFAUGZlzYURwQq4UjJGs69G/O2Y7mGNkjy+nfUYEYcB+LccfQvDI8IeKYHRiDFh751v+m1Xfbulxm3/mH1bef0ggCW0YCqWlGMNSEsoVxpLd56c3v/T6l73m1a9vf93H7v75Ax//9OD2JSASsnbimZkAAU1rgBl68n74Z5rZUsearW/eWnWPACOoOOpPvav+iGrWNQswRPu+w85vKz4Tzzy31ruuzItABJSQNLQMkFCmASKCQLpa+9zk/CjOI4/hzuTn4e1373jyl6dNvyE0pQE7XcgKUSFEYaBQgRT1ovcvvbEUoxht/TZWvQAkalSuYqVHEiomlTUErHhixTfxxM2N//g4Tl0KEABBAiGvrdymweYGYAQCxMR+czPVX6i/aroaOVGOiLi7Xv3zrduvd6kns5Rwuusd5QpUQGgkmUkBYIrgQvJScrdJG6te2fpEFkRMCZUfgV3FgkJisuwBP+CnTgQ/31ZaakIIFqCcEgUhJgrhWquOvvMbzvz8mD9E4AOyWFGhHUQd33o9/M23BGwOKuFU5piQIgYbO3aNtbjx5cfVM7Fuum7jCyEFErKNoocyf7Puitqlucqf8hMn345bC1hMsoSQYaYMjFiJ07lya3VyFGs7nXkHgZcQrWhCwyF9Hwx2HOPCPe51QBQT2xhd+OYULIpawkAj3T7H9Dv4cvP3Mv8WGYAR2XX6ISrXv4kPshjmI3+qvEbe6B0yFbYYoICazWnlSgGhFCRJlq6x6jc4d4UVImUZVAB0aeSKZnx9dGODOaYUnCItJz5+kdUYhC0MEiwkMx8oP0D+wbjx9tBKAXCp49+nHsiua4W3BAEX3+IXeEFbhYCakChkmLAVmnNXWqaUiISZQtqA36ruUoLFAkCjE3xPHlDYmO+lA4RSlGpLSsAUUalZKluUKxmDoEC8K3/v0n65XDuOSpII/72F8w8A7hhHRZYjP9K1N7Bx8J8Y2ulABkE5CAFaVjklgFfiQFSkgwIKHD/XjjUowqJRFhETCkZOZuZlMZcxSVBJK/GmruRa0KbbCBAtjlpqLQQZpG0nynW5dD4c7cgkCtezIP1OaG/BE9H5Lzn2wxWy7JGRe2QwGYpIhZ1VQAzArkSOVFmyo0tVZRTr1WscLLSWGkCNJlQUBnc8dx+7rT6HRqqzna64Wm4ZmRG7QA6TLSE9yNJCNxm7Dh+X0xnT1DGkpw0OvQM4k/iqJBnv+TV03CbudeDfK6gSkcGCbCHCUEDiwpVAwJEPCi5Liv6yt085x5YKUKPGpDteUjU9+S+XPb5qhWOuxFeVAyopS0uiMWJJtDqUICSMBAdX+iNW/mMrUXbLzklw9X6BtTCUvPeXx5kfItbtq/+aLJYiAgCQMCOCwYvB1zHCgBJZoUAKDG308/96+fE11mZQUcQdZ+iFq/BrOfZcX01aQbFIodw1iqnE0gZiYYtrSi0AY1EwAODz1pJ1eufwQCATVs6u+2U7TyFu+WIvm9Z65Pd3k//FbSoiC8+tVOLKSW1Q4ER7EiIqEtRALRiyWgiAJJ3iqz6PL3xgc6Wsc+f66Hv++hyGArZkKMhWFWVSABiUBGUAAgoEGQK0nPTQFBoZwEE7/3BPqj+3HPrS4ymo2Lh9m3af0cvycKyCRD+6lhde9SEhBTO9uMYJpA1YCCBdt+8l3/53n9Of1q8jH3rjPWfXy3SSxZQAMEGIBRIA/ZChB6IiCQQFgiwKWkmRYQg2w6e5rd/Y/rmOv+u3fvJw/oAgS0VbG2i92Awgq1xzIe8W8TN6+5I1GjGFM37Mf0v8v7mhX72MGw4mGwqKO/0RE8IKouUaOYBRhEHpld/+/6R/Ui71l12vsW9r7fl05/4/p8+86OWsNU2CQrYCIEGWIBMiAAoIDIYCy5aWFZ8in16ssQZXWGGF5FPu28/+///93I8/KFAbFsLHndC7YaVJTBx0av/OkL20M0dQq9wFn4f9P6WZQIq+ofDo9VxkKFg2TMSUZ7SslAQQPvbp543zk+mLcpqY6r02r4cdzacubfRSu52Zdb463jEVnI9uGyUyICGG0Y7VG8u31t5Y9cLe0dhEjboQrRtrcUTAAS1snxVkK0uQwMXXKy0rWLLJ8pr/ukv7pq6vcsgQFa8JAACMv/0lH7YySD51j+zybx2hwHAohmGaLMBUlRpbeN3PHnIeEQHQxBmQMwicscSKucVecYMt7mNhxlQvd3LkjKEeS4wu0GiWZmkvNjTRRF2ylBvH0rr5ioDoyiFZIhFyG/LZ0vpVOOFAu01SqXnPLBVfUnRJVDmdv8BPCwFg6vWxk0KGkh3G0h45x2sZywAskAaR+TBgKnYbWobdoHvTr69bdUQ0FAAAudKCM6IvMSvuxA3uwR5lHsoc2SXncFTWQBDN0l5saKCJZsmSpdx03LQHM26s8Qvff09ULFHA2VcvXM6+Ggw1wSzKnu8qk+HBcpHRU3DZ/2oBQLVoCRT6ZKNdD8dynFoCGyBYKkQiuVIilE69Igy37NZtd2g++/mw+R5DMwxEgA0kvMSsdC8NdA+95DlyL6VH9pAzvOQIIWASGwy0oYEadbVeXjluR76Xlz5y6lKhBJVhMe2FM9fqdOpZRzWyUrE4W1zb0NanbgVl6qoHANSrZoZ6YfN6ao/L8XMgQQwzNmTJyglSVUyCDKHBbrKPerkKq55r++vY9akNjpGKKLxEb9EVd+IWe7BHmYv3yL3kdSlrOPKSFzSh0GB2dGXfXtgvl+XF3BajRiqyCEwikyHq4OyOIMTBpw0VEKA3Co227SOMBI2pDgA25ZEMy/ZDvo4TP0CitNKCMjRSKIh5zmce4JM1lmlvuLvk7uodWNrmVgEBIsEQABADyBFVT67A92o/rv5YXIwMxAIEyikgNWCXvrwN1GLPUbbOetBg3f2mcRP0sRoAYlZJUf9gwqV9v1z6gKWUtZwQxtIGJEy5IndOQZJFmIiEeM34pqxPAQKEQIV68RoSiBFAdWbjF79+M9S0DbXiQeQmUazCiGJyjrbkNv7clwh0t9LG6p3hSlRQ4xCCT0ZWQo5osEffdeT34+qXGFwrQhKTuyTcVerudCq5bK4NQGBiymToUBupiwUKIkQgEAGMvEaiYohlQy08XMBj1aAatsz3aS8yu705aKZah2aJGcMbo4WgKPtfkbngRwEIDP1NXKKaWwtKop7E3nEijuCQYi0lSSFWkhbxwlCwFAK8QCEBJDggCQRQRUaBZeWKiTCnyKP0dF1LdpWc5a692Ixa74RW4HaGBt2dThGQmDHsRwEA0pWo4oqpWQoQKdk15bLKgTkkOPI1FUmaYCiehTAoqpwABI7UAAqUAIgqAMqGHZ6sHdYYQXeym3symRvvxdac7mcn1utE7YCWNNCkdBUB0T1/Sk/60yPzkSkf8NtyRyUAYA46ySGRaLSjnOsQUQtMEC1MRAnoagkgAQACCRlEAkCFopZKIC0LsGn3jOoSgdtKbXFaV5r14tFrPkvsW9xLgxwUMB9uwmMQogeSDPl4ST26hUXBlqGgXbkuNThVwtkCi8y0g1oYworgYhCYJCR0kAACBQRADIoLhsMAhmJhg0s6iUuw+cZ7Yq2Zaj+ltwIDhSalWIgShM6DIqDi6YC5ZPZ8s2SO1R2JEuUyqCvY9pzmvjxFSavOJ7CCsJuGlcAQVQvOkFB4SQ2khAxEAVAt5Rl2MbN7Jam0WxLXUTWxnkPbvLZdR28juJoGG0azxUIU1MOfACB9U2AhWexL5M04AUsgBAwhOzVttlOEqOodOZlTDkKeOUNn4sKVq5JhMiGAgAAQpAIXic6lb5rzjFJKTus1yWkkgIOQNJGVTAvLCbpiLOZYsIpOAUDod8hy6fxGeVk/gGRYZEkDKLEGETeZ2tRQyslucwXVVaKUw1UximFyYVCFOBAQAJXRFGvpKkek3WpidZGLUcg9ENCuFC3iWktKtnVgnDyULQV2fwkANT4MEBzOSvNyYJCoQEgEEG2Vg3PlbDFJS3Vr0QzlOhVQTzxy5ap0FCoGCYEGFAKCVBTjuVGedIybTQQj5UupR3FzT3ElWbQ0BANoc8TS8RN1VGWMrK8/AAA4B36Bjh8rZq2819LBtFIEMSGV6PT9RJo4AXTpSmViCqgkqsgVG65MNkwmVQJHAEFNabRUW9Vb8GFTVbGazloPjRaydkeHDtq0sb7ZHJHx1pKl2J/BJQAAEp9FTpxqBn17fcpWsCeQFAoQh1qTgk8qfWTs5i7N3akoSd/EYHLlypVBFVDWiMokqIBiRYlm2hJ09Rlbt1ZSaEtaQxFMmRNwX7SOdI57J05FhpTzEgAAQD+PJkaNfOhEbHzRK1G0IRuGIiROPudEa2rJpJgq1YRUVZn6gIELVwxcuCJwEBOTElOiRDg3zZGbA57nIqkJZk3FJHtghiSwyl2Vz1zQ0svraKyCNNj5/8Cf4CPoQ2/QjH1P3Ho8DLWWsAJc3TyBtwXEVeeDrF1jpiRE4ICGxmQyAYgzJIwEtaEoyYU14US4nqtQkmvN9ZQuHQxF1qSFbtH/v5PKOv7ArZUq8xq48v8AtFn06jsuBjF45r2Tsw6CZS0pdZjaFCopVIkr5bDFueldH5koTCYThQkAJDZIqEKC1OWypmq34ECSNjmRbSxIakGcgPD8BzBOwuVcqox57gfuu+jTB6H/Te/6AHN89QNLGkMrBihA0K2nGjsfASJJQMaEKbqijygoGClQwAwqR4DJEUBFVRUK7RRjJmmSJC2N22z7CaAWFSVRbtONx57y79HjX99GY2X8ttK/XgDhfcC9onUB//kFs1F36wufKFIkUUBAAKBbVEDTbMGEllLuSo06ooJCICICPgbvIUcQhcmBaemSGRPTTbKxnLZCF7+a7hxmBhnaZGHhsWdytxaevwRU7o0gBO5fmefQw/k13vs+ML7ukf6iMjKIimRQjkSWKYcywU0LtV0nc2x4CVBFRcXI1YeL91eMDICJytFkBafuIV3S0v/SS19XI+tJuylniVObZp3licdwf/+OGwv9vJZ9eRZ4R3A9c4fl774f07IZn/EKUkNAIsCk0yl3sgoopQI5MtMBagRU0REFgajA0YVrdCuAnAE4oloe/BaSGoOc850prx1ubMkNNb1hg0je8p50dPNex33wHRUt4CC4907AotkdDG8sfOyL6PFVD5mAipIhaa6zSqVE7ZRUKIJtzElaHlGpoJBBcDaak7mM0w6DAQCAkaC7tZ+2X6RJuplOCYFtSZW7h9CG1TzulLhvza6sFDyo/WsD8IDgH/imjHd/iXPs2lo66hpFLKIQh3NVgp1rVlZNGsfog3WREgACRCeKyIjk5RUIAkyGMdiMrv+311o9SDDk0hFtzdcgExa64XDHRt6ntgwV3wCXHwQodh/yypW7GdGHz32lEcCS6Kolk0/bDlcOk7sSWbsXU29yFAUdAhH01kJ/FMFRoqAwUQAbiDOchmNf5NTDfeceI7WrbW0ypx6G3e9C+f5W+nWtpg4OAw9cm/cCNwq8dg2Mfa/D0ogAAtWvqhNp7mV0F9NoCQ3LxtZNgVYUAHeDN90ayHA1uhMAABEwGjyzxOz3PQ3cvkvrjv1owKFy334swm7LHnsZ4RfVbgXX7pr3Hwwo9lAEb0V27AUooiKANKSNQD4oSiWr2WkNlZmjz3XTWKKECiC6EKR1NBBBlXG4ABAEqKvrD5YYwIkgqFuGr3k6nZPbb52lvyRRRQWGHFv3AF65kqjBm8BD9muh4bUMU79jsisFNpDYAHINSEqTmHKLwabpcHa73WDUSVhghgIFR6QvY76rioocEQABHJDcvrFEfCaFGW5oKUUap+1Im1KOaqqNgHU7XUEur9FHie88TOXVzjANNw2KPRGkBNrckWhmxy59LddykKyWbWijdMN8StThHlownVvqiaEA8gZZCEiURXC9YZkVNkXWbnv0HW63/2vQ3b42Od6ytJJkw4Tg6tLJIw0k/PQwI/6UpRA10dnIxgYrkipqLfWd1rvAkZj4zDRIEkTN1ORWbQHuoUDJDBwvGstUByljSqYCACBAbjGe3G6Ldu0Wlm3GfmVzF5g3m30SsgCmzTMcHT6Rg6KnyT/+eRgAfJ6CI4GjA1UDEURw6NppKLdRW+F6m08Wndgg4A1u2gQEUNFxtsiRqUpasETwNighEAC36YvZWbKzwsRXopb7oF2Qc9Pb//wUBCCbB8Dbl5IBvwMe2vghw6mIZhxGgxYUERs4XUpUcrTSZKVwEE5aTrrlEB1BVIqeg9ZKQZWjCNSJXp4QCLxAcOOxM5ltsbjSyqFw6B0btlNPmNbovyuSZZQ2DgjOHkMg/fxwxfncciLwUl+0hZAUDHDfjiUcnHxTXaMmRDEJbt5ct50pwD2AC9SXS5YsiiLIdJZ6RCQQyG45NlWyokXpocP2RvH0g9jbk9Ejg2D3jS7kjAtriQbw2sN102edaEaOJFifOgvKQnCNfIBaz8F1I1mb4qxi6ObjlF8miqDp6HJgCymQoixFemvcIAVkEJHdpg3EZEhgPz31Hhf2Xu1vk6U/W1IZQZ+1AZzMuhksWlPmg4cD//XsJejVyMEnUQQRRRAVmxsqDeeeuiZUhSF7y2LFfc8hZZL4Y+2oXcuTBSEue99dH0Emo7hHbxAEtrlygy2q7c7EJoE71SnXVFSsCva/JOuD5yoi/QZuPhyQcj6O4IXAyUS031AkgzCEICzrSY7E52vNbnISoBu1lB8MyL65aptegaywe+a3hRAE2c1zmwSEo9qr95/b0e7XO0G7UrR0VIiK7N4akwbedS1RmJ+AR9jJvq3omrwROPkqsgQ7sSQwAPXt1rou1NJB0NbIKIdwMPXn+stEipn2SlfxkftlnRAKYjJtY2Nx0bdFDQF7dw1KJpqUpk7I9L1PIK8fcQ6kwcuPYs6+bNzO9G9QDuyTXWRhaDgxmYS2XBKnQzEVpMm0by5HfjD4yjV/n4TS9KzNtXeFt3yfD5/dnoJQ7Hs1JLe0IU69cPgANZlFK25jsSh95tbODck/XZm1anNn1OvDRwEuRXw3osMZJwIvfH3x792QCU3poKFzRorUkmVltuKA9IWt999x64v/TH1vCR3cNFO0lSuFjc+t70PX9tnFBzafWScLQ00Mquxd/YiYIAzEQe1G9q2vxcLLF944IEg8Bs4/CkBxZ5Esf1M42XvkKO81m2xDQSg5Ka11PzPLIpnUttsPFge3bDfbUAyWTWuDciee3Ndnn1t9dw6LO/UdyqGClLgEk7hgTTUT87Snfz24I/nbUy0ENd72A48UfJgynxY54niOHNy+7+I+mLSWxWD8/9PKtelcCG1NW8nAbthRu+0MjgLroKHpDZnlYdMm7aHY7olym7XLFDVzcDDYNNzN88erL/9k6V1vevNAFxI/A589GkBxaR0V68/oBhy4V9uVe8NtGMvuC2kBkwKraErTgiiu8H30kS3QFSZ274QFSNMbTpoG0aYQE9O6d9PyNpmVJksRmPc8cuP8cUP+4FSBMOl5zgMe9YLXikyVsWNjBIA3LigCoEaK2A6Siy2OPmLZxp7UGs/U9BU6JZv9trc//c+U4suXmu2dBNb0Np1iimY3SFAbQA+OL2ll+XrZ2X8yZAVD7vnAI59zlRswHTuATGzVFdALWhFkqQ0pLkwbhGnLHpviTvcg70glt6Zbs23ybu1tum5tw73cQIDYzWoZoB/6yHJtQUkEW5tBaBwN+y5ltUcHDPrW2SrMUGBIAKqBykZrFRoCaEpLQVIhN/mlie/pVj/TWeqpbainnoMAT2bt1AZiaHkHlrXds3oiWlZIlBgMCWqUmDHNgce5aHsXQBINzwDoqKqRoiYRsMZcaYWkPq1tN9pjb5gaqqYVG2FrtP1qNh6bSaKRu+w7HF2rwHBRiRLBSmksQQ8qdAIe74DTGCgQcDuACPbeGB2du9oZn+W1Nhc7+jS3oYiGf+xN271HT7XjS23q+mPnsLBdH3E7JXTwQbtXHlpu7Z3QAcxHiYCABjWBx9x1FWtxRSQwXT/QRA4mRs1fX9yF/UUlWSN77Ik33ri1zf234zY+P4fVw622t6FyuDenWqwQts1NrmaPGpsUR01wOGohE9Jx8qZ8Lva4APwjT0olqB3FbXppKgAUrp7vf9P99UWSWBzcrjYy7K1J0uu9LzEGqVwP9gW3DtpesbB7k6MeNt6j+5xRnHeZykWABS3YxJBiwOP/MM6aNw3ZSsaZA6+duU171tXS7dvL7tzelXshkpP3wc3mtq3SOBHSbfqG2f/WJNfsDa49u5sNzz0873T9cT2ux+fdOY5AUECA8evH/eMm8CSCqINPzKJENS0YKza++BNf8kKqAOT8qROHjp44vnJroWs0lgkB6qgUI0vDMA5jVENNQab5lelgamn6wLy0QYGKGstGDa2sGm3a2HLnc++ssCJQMBt88Bp/cF0K9awWGlwOfQUBT2jiu9IvggytNLR68kVPHLy1ciABCArcXLgTNUGPJH0dg9BH/dBf0QEAVJAaSAItwszC7EIT9JZKk5Lh0ZCMbdQBK1Ew46LxyoV/eBtTUZGAgEp/hPsHEAFPLPil4u6M88EKSJBBsn6PL/jE+jsbRgQAAACQCaES0EHVi+4GcyDqq0YmfRMiNQJAIAEkAgIBcuHK4QvvunL6hKGxKjLUPNUxxz7qf98AT3S/v+6e8d2RaEEyTRvLUEMLgi4s25roGB2MFH0dJcnGzWSK7gVzXb2lnDFvKSgQ1FgD1dJRt2u4GB8Mb3UhVU1we60rC/cOXT1WDxIBSIaagj9kswv/3Aci4Ekf9bfkdd/pEppo08q2nilRK5JkZKghi6ACKAKoJ1XUWFmqKCAZhSyNlahIRVkEWQpkCAqopWv0JEvl/N+431h0Tg77++fgEfB0frEfVCj+v1/t2b54VVtkBVCxj1mtWKF4yfhP4apxvcqcy+6/O7n+x/8u9Ly7u+jz465fR/2+n5xHfquqlbtKNjVqW02mZLBYUZUGpYtNZujgUdGFjuvPbM9jv8C/3gWngKf9S/wj+AACEAKPdhIZACgCPgEEAA==";var Uz=n=>{var o=n,{border:e,size:t="sm"}=o,r=K(o,["border","size"]);let i=t==="md"?36:24;return p.createElement(p.Fragment,null,e&&p.createElement("svg",{className:wt(e,"absolute left-1/2 top-1/2 w-[34px] -mt-[2px] transform -translate-x-1/2 -translate-y-1/2"),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 26 26"},p.createElement("path",{d:"M8.382 2.244a6.938 6.938 0 0 1 9.236 0l1.626 1.451c.346.308.722.581 1.122.815l1.882 1.098a6.937 6.937 0 0 1 2.854 8.784l-.877 1.995c-.187.424-.33.866-.428 1.319l-.463 2.129a6.938 6.938 0 0 1-7.473 5.429l-2.168-.218a6.934 6.934 0 0 0-1.386 0l-2.168.218a6.938 6.938 0 0 1-7.473-5.429l-.463-2.13a6.937 6.937 0 0 0-.428-1.318l-.877-1.995a6.938 6.938 0 0 1 2.854-8.784L5.634 4.51c.4-.234.776-.507 1.122-.815l1.626-1.45Z"})),p.createElement("img",B(D({src:a8},r),{alt:"Verified",width:i,height:i})))},Yi=Uz;u();l();c();var jz=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"}),p.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.665 7.999a6.667 6.667 0 1 1-13.333 0 6.667 6.667 0 0 1 13.333 0Zm-6-3.334a.667.667 0 1 1-1.333 0 .667.667 0 0 1 1.333 0Zm-1.333 1.5a.5.5 0 0 0 0 1h.167v4.167a.5.5 0 1 0 1 0V6.665a.5.5 0 0 0-.5-.5h-.667Z",clipRule:"evenodd"})),u8=jz;var Vz=()=>p.createElement("div",{className:"-mt-6 flex flex-col items-center justify-center space-y-6 font-sans text-sm"},p.createElement(Yi,{className:"h-12 w-12"}),p.createElement("p",{className:"text-center text-2xl font-semibold dark:text-white"},U("Privacy preserving to the core.")),p.createElement("ul",{className:"text-9eafc0 mb-6 list-disc space-y-3 px-12 dark:text-white"},p.createElement("li",{className:"text-left"},U("World ID uses Zero-Knowledge Proofs to make it cryptographically impossible to track persons across applications.")),p.createElement("li",{className:"text-left"},U("Orb biometrics analyzed by the Orb are not stored.")),p.createElement("li",{className:"text-left "},U("Code and hardware are open source or source available on")," ",p.createElement("a",{href:"https://github.com/worldcoin/idkit-js",target:"_blank",className:"text-4940e0",rel:"noreferrer"},"GitHub"),".")),p.createElement("div",{className:"text-9eafc0 dark:text-9eafc0 -ml-4 flex items-center space-x-3"},p.createElement(u8,{className:"h-4 w-4 "}),p.createElement("p",{className:"whitespace-nowrap text-sm font-medium"},U("Biometrics are never shared.")))),c8=Vz;u();l();c();u();l();c();var zz=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 11 8"}),p.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6",d:"M9.868 1 3.771 7 1 4.273"})),Im=zz;var Hz=()=>p.createElement("div",{className:"space-y-6"},p.createElement("div",{className:"-mt-5 flex items-center justify-center"},p.createElement("div",{className:"inline-flex aspect-square items-center justify-center rounded-full bg-green-100 p-5"},p.createElement("div",{className:"flex aspect-square items-center justify-center rounded-full bg-green-500 p-5"},p.createElement(Im,{className:"w-8 text-white"})))),p.createElement("div",null,p.createElement("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white"},U("Success! \u{1F389}")),p.createElement("p",{className:"text-70868f mt-2 text-center text-lg"},U("World ID verification was successful")))),l8=Hz;u();l();c();u();l();c();var uO=N(m8(),1);u();l();c();var vI=N(yI(),1),Um=N(z(),1),zH=e=>{let t=vI.default.create(e,{errorCorrectionLevel:"M"}).modules.data,r=Math.sqrt(t.length);return t.reduce((n,o,i)=>(i%r===0?n.push([o]):n[n.length-1].push(o),n),[])},HH=({data:e,size:t=300})=>{let r=(0,Um.useMemo)(()=>{let n=[],o=zH(e),i=t/o.length;return[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x:a,y:f})=>{let d=(o.length-7)*i*a,h=(o.length-7)*i*f;for(let g=0;g<3;g++)n.push(p.createElement("rect",{fill:"currentColor",x:d+i*g,y:h+i*g,key:`${g}-${a}-${f}`,width:i*(7-g*2),height:i*(7-g*2),rx:(g-2)*-5,ry:(g-2)*-5,className:g%3===0?"text-black":g%3===1?"text-white":"text-black"}))}),o.forEach((a,f)=>{a.forEach((d,h)=>{!o[f][h]||f<7&&h<7||f>o.length-8&&h<7||f<7&&h>o.length-8||n.push(p.createElement("circle",{fill:"currentColor",r:i/3,key:`circle-${f}-${h}`,cx:f*i+i/2,cy:h*i+i/2,className:"text-black dark:text-white"}))})}),n},[t,e]);return p.createElement("svg",{height:t,width:t},r)},bI=(0,Um.memo)(HH);var Q0=N(z(),1);u();l();c();u();l();c();u();l();c();var Jw=N(z(),1),ta=N(z(),1);u();l();c();var wI=N(z(),1),zu=(0,wI.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});u();l();c();var jm=N(z(),1),Qs=(0,jm.createContext)({});function xI(){return(0,jm.useContext)(Qs).visualElement}u();l();c();var es=N(z(),1);u();l();c();var _I=N(z(),1),no=(0,_I.createContext)(null);u();l();c();var Vm=N(z(),1);u();l();c();var hn=typeof document<"u";var Zs=hn?Vm.useLayoutEffect:Vm.useEffect;u();l();c();var EI=N(z(),1),zm=(0,EI.createContext)({strict:!1});function SI(e,t,r,n){let o=xI(),i=(0,es.useContext)(zm),s=(0,es.useContext)(no),a=(0,es.useContext)(zu).reducedMotion,f=(0,es.useRef)();n=n||i.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:o,props:r,presenceId:s?s.id:void 0,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));let d=f.current;return Zs(()=>{d&&d.render()}),(0,es.useEffect)(()=>{d&&d.animationState&&d.animationState.animateChanges()}),Zs(()=>()=>d&&d.notify("Unmount"),[]),d}u();l();c();var CI=N(z(),1);u();l();c();function zo(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TI(e,t,r){return(0,CI.useCallback)(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):zo(r)&&(r.current=n))},[t])}u();l();c();var qm=N(z(),1);u();l();c();u();l();c();function Ho(e){return typeof e=="string"||Array.isArray(e)}u();l();c();u();l();c();function ts(e){return typeof e=="object"&&typeof e.start=="function"}var qH=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function ea(e){return ts(e.animate)||qH.some(t=>Ho(e[t]))}function Hm(e){return Boolean(ea(e)||e.variants)}function PI(e,t){if(ea(e)){let{initial:r,animate:n}=e;return{initial:r===!1||Ho(r)?r:void 0,animate:Ho(n)?n:void 0}}return e.inherit!==!1?t:{}}function AI(e){let{initial:t,animate:r}=PI(e,(0,qm.useContext)(Qs));return(0,qm.useMemo)(()=>({initial:t,animate:r}),[II(t),II(r)])}function II(e){return Array.isArray(e)?e.join(" "):e}u();l();c();var qo=e=>({isEnabled:t=>e.some(r=>!!t[r])}),rs={measureLayout:qo(["layout","layoutId","drag"]),animation:qo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:qo(["exit"]),drag:qo(["drag","dragControls"]),focus:qo(["whileFocus"]),hover:qo(["whileHover","onHoverStart","onHoverEnd"]),tap:qo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:qo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:qo(["whileInView","onViewportEnter","onViewportLeave"])};u();l();c();function DI(e){for(let t in e)t==="projectionNodeConstructor"?rs.projectionNodeConstructor=e[t]:rs[t].Component=e[t]}u();l();c();u();l();c();var OI=N(z(),1);function ns(e){let t=(0,OI.useRef)(null);return t.current===null&&(t.current=e()),t.current}u();l();c();var os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var KH=1;function RI(){return ns(()=>{if(os.hasEverUpdated)return KH++})}u();l();c();var NI=N(z(),1),Hu=(0,NI.createContext)({});u();l();c();var kI=N(z(),1),Km=class extends kI.default.Component{getSnapshotBeforeUpdate(){let{visualElement:t,props:r}=this.props;return t&&t.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}};u();l();c();var MI=N(z(),1),Gm=(0,MI.createContext)({});u();l();c();var LI=Symbol.for("motionComponentSymbol");function FI({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:r,useRender:n,useVisualState:o,Component:i}){e&&DI(e);function s(f,d){let h=B(D(D({},(0,ta.useContext)(zu)),f),{layoutId:GH(f)}),{isStatic:g}=h,v=null,b=AI(f),w=g?void 0:RI(),_=o(f,g);if(!g&&hn){b.visualElement=SI(i,_,h,t);let C=(0,ta.useContext)(zm).strict,x=(0,ta.useContext)(Gm);b.visualElement&&(v=b.visualElement.loadFeatures(h,C,e,w,r||rs.projectionNodeConstructor,x))}return Jw.createElement(Km,{visualElement:b.visualElement,props:h},v,Jw.createElement(Qs.Provider,{value:b},n(i,f,w,TI(_,b.visualElement,d),_,g,b.visualElement)))}let a=(0,ta.forwardRef)(s);return a[LI]=i,a}function GH({layoutId:e}){let t=(0,ta.useContext)(Hu).id;return t&&e!==void 0?t+"-"+e:e}u();l();c();function $I(e){function t(n,o={}){return FI(e(n,o))}if(typeof Proxy>"u")return t;let r=new Map;return new Proxy(t,{get:(n,o)=>(r.has(o)||r.set(o,t(o)),r.get(o))})}u();l();c();u();l();c();u();l();c();var BI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function qu(e){return typeof e!="string"||e.includes("-")?!1:!!(BI.indexOf(e)>-1||/[A-Z]/.test(e))}u();l();c();var s4=N(z(),1);u();l();c();var YI=N(z(),1);u();l();c();u();l();c();var Ku={};function UI(e){Object.assign(Ku,e)}u();l();c();var Gu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oo=new Set(Gu);function Wm(e,{layout:t,layoutId:r}){return oo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ku[e]||e==="opacity")}u();l();c();var $t=e=>!!(e!=null&&e.getVelocity);u();l();c();u();l();c();var WH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YH=(e,t)=>Gu.indexOf(e)-Gu.indexOf(t);function jI({transform:e,transformKeys:t},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},o,i){let s="";t.sort(YH);for(let a of t)s+=`${WH[a]||a}(${e[a]}) `;return r&&!e.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(e,o?"":s):n&&o&&(s="none"),s}u();l();c();function Ym(e){return e.startsWith("--")}u();l();c();var VI=(e,t)=>t&&typeof e=="number"?t.transform(e):e;u();l();c();u();l();c();u();l();c();u();l();c();var Jm=(e,t)=>r=>Math.max(Math.min(r,t),e),is=e=>e%1?Number(e.toFixed(5)):e,ss=/(-)?([\d]*\.?[\d])+/g,Xm=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,zI=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ko(e){return typeof e=="string"}var Hr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Go=Object.assign(Object.assign({},Hr),{transform:Jm(0,1)}),Wu=Object.assign(Object.assign({},Hr),{default:1});u();l();c();var Vf=e=>({test:t=>Ko(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fn=Vf("deg"),sr=Vf("%"),ne=Vf("px"),Xw=Vf("vh"),Qw=Vf("vw"),Qm=Object.assign(Object.assign({},sr),{parse:e=>sr.parse(e)/100,transform:e=>sr.transform(e*100)});u();l();c();u();l();c();var Yu=(e,t)=>r=>Boolean(Ko(r)&&zI.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),Zm=(e,t,r)=>n=>{if(!Ko(n))return n;let[o,i,s,a]=n.match(ss);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var io={test:Yu("hsl","hue"),parse:Zm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+sr.transform(is(t))+", "+sr.transform(is(r))+", "+is(Go.transform(n))+")"};u();l();c();var JH=Jm(0,255),e0=Object.assign(Object.assign({},Hr),{transform:e=>Math.round(JH(e))}),mn={test:Yu("rgb","red"),parse:Zm("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+e0.transform(e)+", "+e0.transform(t)+", "+e0.transform(r)+", "+is(Go.transform(n))+")"};u();l();c();function XH(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var Ju={test:Yu("#"),parse:XH,transform:mn.transform};u();l();c();var mt={test:e=>mn.test(e)||Ju.test(e)||io.test(e),parse:e=>mn.test(e)?mn.parse(e):io.test(e)?io.parse(e):Ju.parse(e),transform:e=>Ko(e)?e:e.hasOwnProperty("red")?mn.transform(e):io.transform(e)};u();l();c();var HI="${c}",qI="${n}";function QH(e){var t,r,n,o;return isNaN(e)&&Ko(e)&&((r=(t=e.match(ss))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(Xm))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function KI(e){typeof e=="number"&&(e=`${e}`);let t=[],r=0,n=e.match(Xm);n&&(r=n.length,e=e.replace(Xm,HI),t.push(...n.map(mt.parse)));let o=e.match(ss);return o&&(e=e.replace(ss,qI),t.push(...o.map(Hr.parse))),{values:t,numColors:r,tokenised:e}}function GI(e){return KI(e).values}function WI(e){let{values:t,numColors:r,tokenised:n}=KI(e),o=t.length;return i=>{let s=n;for(let a=0;a<o;a++)s=s.replace(a<r?HI:qI,a<r?mt.transform(i[a]):is(i[a]));return s}}var ZH=e=>typeof e=="number"?0:e;function eq(e){let t=GI(e);return WI(e)(t.map(ZH))}var Gt={test:QH,parse:GI,createTransformer:WI,getAnimatableNone:eq};u();l();c();var tq=new Set(["brightness","contrast","saturate","opacity"]);function rq(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(ss)||[];if(!n)return e;let o=r.replace(n,""),i=tq.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}var nq=/([a-z-]*)\(.*?\)/g,Xu=Object.assign(Object.assign({},Gt),{getAnimatableNone:e=>{let t=e.match(nq);return t?t.map(rq).join(" "):e}});u();l();c();var Zw=B(D({},Hr),{transform:Math.round});var t0={borderWidth:ne,borderTopWidth:ne,borderRightWidth:ne,borderBottomWidth:ne,borderLeftWidth:ne,borderRadius:ne,radius:ne,borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomRightRadius:ne,borderBottomLeftRadius:ne,width:ne,maxWidth:ne,height:ne,maxHeight:ne,size:ne,top:ne,right:ne,bottom:ne,left:ne,padding:ne,paddingTop:ne,paddingRight:ne,paddingBottom:ne,paddingLeft:ne,margin:ne,marginTop:ne,marginRight:ne,marginBottom:ne,marginLeft:ne,rotate:Fn,rotateX:Fn,rotateY:Fn,rotateZ:Fn,scale:Wu,scaleX:Wu,scaleY:Wu,scaleZ:Wu,skew:Fn,skewX:Fn,skewY:Fn,distance:ne,translateX:ne,translateY:ne,translateZ:ne,x:ne,y:ne,z:ne,perspective:ne,transformPerspective:ne,opacity:Go,originX:Qm,originY:Qm,originZ:ne,zIndex:Zw,fillOpacity:Go,strokeOpacity:Go,numOctaves:Zw};function Qu(e,t,r,n){let{style:o,vars:i,transform:s,transformKeys:a,transformOrigin:f}=e;a.length=0;let d=!1,h=!1,g=!0;for(let v in t){let b=t[v];if(Ym(v)){i[v]=b;continue}let w=t0[v],_=VI(b,w);if(oo.has(v)){if(d=!0,s[v]=_,a.push(v),!g)continue;b!==(w.default||0)&&(g=!1)}else v.startsWith("origin")?(h=!0,f[v]=_):o[v]=_}if(t.transform||(d||n?o.transform=jI(e,r,g,n):o.transform&&(o.transform="none")),h){let{originX:v="50%",originY:b="50%",originZ:w=0}=f;o.transformOrigin=`${v} ${b} ${w}`}}u();l();c();var Zu=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function ex(e,t,r){for(let n in t)!$t(t[n])&&!Wm(n,r)&&(e[n]=t[n])}function oq({transformTemplate:e},t,r){return(0,YI.useMemo)(()=>{let n=Zu();return Qu(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function iq(e,t,r){let n=e.style||{},o={};return ex(o,n,e),Object.assign(o,oq(e,t,r)),e.transformValues?e.transformValues(o):o}function JI(e,t,r){let n={},o=iq(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),n.style=o,n}u();l();c();u();l();c();var sq=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],aq=["whileTap","onTap","onTapStart","onTapCancel"],uq=["onPan","onPanStart","onPanSessionStart","onPanEnd"],cq=["whileInView","onViewportEnter","onViewportLeave","viewport"],lq=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...cq,...aq,...sq,...uq]);function zf(e){return lq.has(e)}var ZI=e=>!zf(e);function gq(e){!e||(ZI=t=>t.startsWith("on")?!zf(t):e(t))}try{gq(QI().default)}catch{}function e4(e,t,r){let n={};for(let o in e)(ZI(o)||r===!0&&zf(o)||!t&&!zf(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}u();l();c();var o4=N(z(),1);u();l();c();u();l();c();function t4(e,t,r){return typeof e=="string"?e:ne.transform(t+r*e)}function r4(e,t,r){let n=t4(t,e.x,e.width),o=t4(r,e.y,e.height);return`${n} ${o}`}u();l();c();var yq={offset:"stroke-dashoffset",array:"stroke-dasharray"},vq={offset:"strokeDashoffset",array:"strokeDasharray"};function n4(e,t,r=1,n=0,o=!0){e.pathLength=1;let i=o?yq:vq;e[i.offset]=ne.transform(-n);let s=ne.transform(t),a=ne.transform(r);e[i.array]=`${s} ${a}`}function ec(e,g,d,h){var v=g,{attrX:t,attrY:r,originX:n,originY:o,pathLength:i,pathSpacing:s=1,pathOffset:a=0}=v,f=K(v,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Qu(e,f,d,h),e.attrs=e.style,e.style={};let{attrs:b,style:w,dimensions:_}=e;b.transform&&(_&&(w.transform=b.transform),delete b.transform),_&&(n!==void 0||o!==void 0||w.transform)&&(w.transformOrigin=r4(_,n!==void 0?n:.5,o!==void 0?o:.5)),t!==void 0&&(b.x=t),r!==void 0&&(b.y=r),i!==void 0&&n4(b,i,s,a,!1)}u();l();c();var r0=()=>B(D({},Zu()),{attrs:{}});function i4(e,t){let r=(0,o4.useMemo)(()=>{let n=r0();return ec(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),B(D({},n.attrs),{style:D({},n.style)})},[t]);if(e.style){let n={};ex(n,e.style,e),r.style=D(D({},n),r.style)}return r}function a4(e=!1){return(r,n,o,i,{latestValues:s},a)=>{let d=(qu(r)?i4:JI)(n,s,a),h=e4(n,typeof r=="string",e),g=B(D(D({},h),d),{ref:i});return o&&(g["data-projection-id"]=o),(0,s4.createElement)(r,g)}}u();l();c();u();l();c();u();l();c();var n0=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();u();l();c();function o0(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let i in r)e.style.setProperty(i,r[i])}u();l();c();var i0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function s0(e,t,r,n){o0(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(i0.has(o)?o:n0(o),t.attrs[o])}u();l();c();u();l();c();function tc(e){let{style:t}=e,r={};for(let n in t)($t(t[n])||Wm(n,e))&&(r[n]=t[n]);return r}function a0(e){let t=tc(e);for(let r in e)if($t(e[r])){let n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}u();l();c();var nx=N(z(),1);u();l();c();function rc(e,t,r,n={},o={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,o)),t}u();l();c();u();l();c();u();l();c();var Wo=e=>Array.isArray(e);var u4=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),u0=e=>Wo(e)?e[e.length-1]||0:e;function nc(e){let t=$t(e)?e.get():e;return u4(t)?t.toValue():t}function bq({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,o,i){let s={latestValues:wq(n,o,i,e),renderState:t()};return r&&(s.mount=a=>r(n,a,s)),s}var c0=e=>(t,r)=>{let n=(0,nx.useContext)(Qs),o=(0,nx.useContext)(no),i=()=>bq(e,t,n,o);return r?i():ns(i)};function wq(e,t,r,n){let o={},i=n(e);for(let v in i)o[v]=nc(i[v]);let{initial:s,animate:a}=e,f=ea(e),d=Hm(e);t&&d&&!f&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let h=r?r.initial===!1:!1;h=h||s===!1;let g=h?a:s;return g&&typeof g!="boolean"&&!ts(g)&&(Array.isArray(g)?g:[g]).forEach(b=>{let w=rc(e,b);if(!w)return;let S=w,{transitionEnd:_,transition:C}=S,x=K(S,["transitionEnd","transition"]);for(let E in x){let T=x[E];if(Array.isArray(T)){let A=h?T.length-1:0;T=T[A]}T!==null&&(o[E]=T)}for(let E in _)o[E]=_[E]}),o}var c4={useVisualState:c0({scrapeMotionValuesFromProps:a0,createRenderState:r0,onMount:(e,t,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}ec(r,n,{enableHardwareAcceleration:!1},e.transformTemplate),s0(t,r)}})};u();l();c();var l4={useVisualState:c0({scrapeMotionValuesFromProps:tc,createRenderState:Zu})};function f4(e,{forwardMotionProps:t=!1},r,n,o){let i=qu(e)?c4:l4;return B(D({},i),{preloadedFeatures:r,useRender:a4(t),createVisualElement:n,projectionNodeConstructor:o,Component:e})}u();l();c();u();l();c();u();l();c();var Oe;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Oe||(Oe={}));u();l();c();var d4=N(z(),1);function ra(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Hf(e,t,r,n){(0,d4.useEffect)(()=>{let o=e.current;if(r&&o)return ra(o,t,r,n)},[e,t,r,n])}function p4({whileFocus:e,visualElement:t}){let{animationState:r}=t,n=()=>{r&&r.setActive(Oe.Focus,!0)},o=()=>{r&&r.setActive(Oe.Focus,!1)};Hf(t,"focus",e?n:void 0),Hf(t,"blur",e?o:void 0)}u();l();c();u();l();c();function l0(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function f0(e){return!!e.touches}u();l();c();u();l();c();function xq(e){return t=>{let r=t instanceof MouseEvent;(!r||r&&t.button===0)&&e(t)}}var _q={pageX:0,pageY:0};function Eq(e,t="page"){let n=e.touches[0]||e.changedTouches[0]||_q;return{x:n[t+"X"],y:n[t+"Y"]}}function Sq(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function qf(e,t="page"){return{point:f0(e)?Eq(e,t):Sq(e,t)}}var ox=(e,t=!1)=>{let r=n=>e(n,qf(n));return t?xq(r):r};u();l();c();var h4=()=>hn&&window.onpointerdown===null,m4=()=>hn&&window.ontouchstart===null,g4=()=>hn&&window.onmousedown===null;var Cq={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Tq={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function y4(e){return h4()?e:m4()?Tq[e]:g4()?Cq[e]:e}function Yo(e,t,r,n){return ra(e,y4(t),ox(r,t==="pointerdown"),n)}function na(e,t,r,n){return Hf(e,y4(t),r&&ox(r,t==="pointerdown"),n)}u();l();c();function w4(e){let t=null;return()=>{let r=()=>{t=null};return t===null?(t=e,r):!1}}var v4=w4("dragHorizontal"),b4=w4("dragVertical");function ix(e){let t=!1;if(e==="y")t=b4();else if(e==="x")t=v4();else{let r=v4(),n=b4();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function d0(){let e=ix(!0);return e?(e(),!1):!0}function x4(e,t,r){return(n,o)=>{!l0(n)||d0()||(e.animationState&&e.animationState.setActive(Oe.Hover,t),r&&r(n,o))}}function _4({onHoverStart:e,onHoverEnd:t,whileHover:r,visualElement:n}){na(n,"pointerenter",e||r?x4(n,!0,e):void 0,{passive:!e}),na(n,"pointerleave",t||r?x4(n,!1,t):void 0,{passive:!t})}u();l();c();var Ax=N(z(),1);u();l();c();var sx=(e,t)=>t?e===t?!0:sx(e,t.parentElement):!1;u();l();c();var E4=N(z(),1);function oc(e){return(0,E4.useEffect)(()=>()=>e(),[])}u();l();c();u();l();c();u();l();c();var K4=N(q4(),1),{__extends:Phe,__assign:Ihe,__rest:g0,__decorate:Ahe,__param:Dhe,__metadata:Ohe,__awaiter:Rhe,__generator:Nhe,__exportStar:khe,__createBinding:Mhe,__values:Lhe,__read:Fhe,__spread:$he,__spreadArrays:Bhe,__spreadArray:Uhe,__await:jhe,__asyncGenerator:Vhe,__asyncDelegator:zhe,__asyncValues:Hhe,__makeTemplateObject:qhe,__importStar:Khe,__importDefault:Ghe,__classPrivateFieldGet:Whe,__classPrivateFieldSet:Yhe,__classPrivateFieldIn:Jhe}=K4.default;u();l();c();u();l();c();u();l();c();u();l();c();var oa=function(){},Bt=function(){};u();l();c();var as=(e,t,r)=>Math.min(Math.max(r,e),t);var ux=.001,Pq=.01,G4=10,Iq=.05,Aq=1;function W4({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;oa(e<=G4*1e3,"Spring duration must be 10 seconds or less");let s=1-t;s=as(Iq,Aq,s),e=as(Pq,G4,e/1e3),s<1?(o=d=>{let h=d*s,g=h*e,v=h-r,b=y0(d,s),w=Math.exp(-g);return ux-v/b*w},i=d=>{let g=d*s*e,v=g*r+r,b=Math.pow(s,2)*Math.pow(d,2)*e,w=Math.exp(-g),_=y0(Math.pow(d,2),s);return(-o(d)+ux>0?-1:1)*((v-b)*w)/_}):(o=d=>{let h=Math.exp(-d*e),g=(d-r)*e+1;return-ux+h*g},i=d=>{let h=Math.exp(-d*e),g=(r-d)*(e*e);return h*g});let a=5/e,f=Oq(o,i,a);if(e=e*1e3,isNaN(f))return{stiffness:100,damping:10,duration:e};{let d=Math.pow(f,2)*n;return{stiffness:d,damping:s*2*Math.sqrt(n*d),duration:e}}}var Dq=12;function Oq(e,t,r){let n=r;for(let o=1;o<Dq;o++)n=n-e(n)/t(n);return n}function y0(e,t){return e*Math.sqrt(1-t*t)}var Rq=["duration","bounce"],Nq=["stiffness","damping","mass"];function Y4(e,t){return t.some(r=>e[r]!==void 0)}function kq(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Y4(e,Nq)&&Y4(e,Rq)){let r=W4(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function v0(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,i=g0(e,["from","to","restSpeed","restDelta"]);let s={done:!1,value:t},{stiffness:a,damping:f,mass:d,velocity:h,duration:g,isResolvedFromDuration:v}=kq(i),b=J4,w=J4;function _(){let C=h?-(h/1e3):0,x=r-t,S=f/(2*Math.sqrt(a*d)),E=Math.sqrt(a/d)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),S<1){let T=y0(E,S);b=A=>{let O=Math.exp(-S*E*A);return r-O*((C+S*E*x)/T*Math.sin(T*A)+x*Math.cos(T*A))},w=A=>{let O=Math.exp(-S*E*A);return S*E*O*(Math.sin(T*A)*(C+S*E*x)/T+x*Math.cos(T*A))-O*(Math.cos(T*A)*(C+S*E*x)-T*x*Math.sin(T*A))}}else if(S===1)b=T=>r-Math.exp(-E*T)*(x+(C+E*x)*T);else{let T=E*Math.sqrt(S*S-1);b=A=>{let O=Math.exp(-S*E*A),P=Math.min(T*A,300);return r-O*((C+S*E*x)*Math.sinh(P)+T*x*Math.cosh(P))/T}}}return _(),{next:C=>{let x=b(C);if(v)s.done=C>=g;else{let S=w(C)*1e3,E=Math.abs(S)<=n,T=Math.abs(r-x)<=o;s.done=E&&T}return s.value=s.done?r:x,s},flipTarget:()=>{h=-h,[t,r]=[r,t],_()}}}v0.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";var J4=e=>0;u();l();c();u();l();c();u();l();c();var Jo=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};u();l();c();var Ce=(e,t,r)=>-r*e+r*t+e;u();l();c();u();l();c();function cx(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function lx({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,s=0;if(!t)o=i=s=r;else{let a=r<.5?r*(1+t):r+t-r*t,f=2*r-a;o=cx(f,a,e+1/3),i=cx(f,a,e),s=cx(f,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}var Mq=(e,t,r)=>{let n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},Lq=[Ju,mn,io],X4=e=>Lq.find(t=>t.test(e)),Q4=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,b0=(e,t)=>{let r=X4(e),n=X4(t);Bt(!!r,Q4(e)),Bt(!!n,Q4(t));let o=r.parse(e),i=n.parse(t);r===io&&(o=lx(o),r=mn),n===io&&(i=lx(i),n=mn);let s=Object.assign({},o);return a=>{for(let f in s)f!=="alpha"&&(s[f]=Mq(o[f],i[f],a));return s.alpha=Ce(o.alpha,i.alpha,a),r.transform(s)}};u();l();c();u();l();c();var Kf=e=>typeof e=="number";u();l();c();var Fq=(e,t)=>r=>t(e(r)),Xo=(...e)=>e.reduce(Fq);function eA(e,t){return Kf(e)?r=>Ce(e,t,r):mt.test(e)?b0(e,t):dx(e,t)}var fx=(e,t)=>{let r=[...e],n=r.length,o=e.map((i,s)=>eA(i,t[s]));return i=>{for(let s=0;s<n;s++)r[s]=o[s](i);return r}},tA=(e,t)=>{let r=Object.assign(Object.assign({},e),t),n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=eA(e[o],t[o]));return o=>{for(let i in n)r[i]=n[i](o);return r}};function Z4(e){let t=Gt.parse(e),r=t.length,n=0,o=0,i=0;for(let s=0;s<r;s++)n||typeof t[s]=="number"?n++:t[s].hue!==void 0?i++:o++;return{parsed:t,numNumbers:n,numRGB:o,numHSL:i}}var dx=(e,t)=>{let r=Gt.createTransformer(t),n=Z4(e),o=Z4(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?Xo(fx(n.parsed,o.parsed),r):(oa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),s=>`${s>0?t:e}`)};var $q=(e,t)=>r=>Ce(e,t,r);function Bq(e){if(typeof e=="number")return $q;if(typeof e=="string")return mt.test(e)?b0:dx;if(Array.isArray(e))return fx;if(typeof e=="object")return tA}function Uq(e,t,r){let n=[],o=r||Bq(e[0]),i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){let f=Array.isArray(t)?t[s]:t;a=Xo(f,a)}n.push(a)}return n}function jq([e,t],[r]){return n=>r(Jo(e,t,n))}function Vq(e,t){let r=e.length,n=r-1;return o=>{let i=0,s=!1;if(o<=e[0]?s=!0:o>=e[n]&&(i=n-1,s=!0),!s){let f=1;for(;f<r&&!(e[f]>o||f===n);f++);i=f-1}let a=Jo(e[i],e[i+1],o);return t[i](a)}}function w0(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let i=e.length;Bt(i===t.length,"Both input and output ranges must be the same length"),Bt(!n||!Array.isArray(n)||n.length===i-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let s=Uq(t,n,o),a=i===2?jq(e,s):Vq(e,s);return r?f=>a(as(e[0],e[i-1],f)):a}u();l();c();u();l();c();var Gf=e=>t=>1-e(1-t),x0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rA=e=>t=>Math.pow(t,e),px=e=>t=>t*t*((e+1)*t-e),nA=e=>{let t=px(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))};var oA=1.525,zq=4/11,Hq=8/11,qq=9/10,ia=e=>e,Wf=rA(2),hx=Gf(Wf),Yf=x0(Wf),_0=e=>1-Math.sin(Math.acos(e)),ac=Gf(_0),mx=x0(ac),Jf=px(oA),gx=Gf(Jf),yx=x0(Jf),vx=nA(oA),Kq=4356/361,Gq=35442/1805,Wq=16061/1805,sc=e=>{if(e===1||e===0)return e;let t=e*e;return e<zq?7.5625*t:e<Hq?9.075*t-9.9*e+3.4:e<qq?Kq*t-Gq*e+Wq:10.8*e*e-20.52*e+10.72},bx=Gf(sc),wx=e=>e<.5?.5*(1-sc(1-e*2)):.5*sc(e*2-1)+.5;function Yq(e,t){return e.map(()=>t||Yf).splice(0,e.length-1)}function Jq(e){let t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function Xq(e,t){return e.map(r=>r*t)}function Xf({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){let i={done:!1,value:e},s=Array.isArray(t)?t:[e,t],a=Xq(n&&n.length===s.length?n:Jq(s),o);function f(){return w0(a,s,{ease:Array.isArray(r)?r:Yq(s,r)})}let d=f();return{next:h=>(i.value=d(h),i.done=h>=o,i),flipTarget:()=>{s.reverse(),d=f()}}}u();l();c();function iA({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){let s={done:!1,value:t},a=r*e,f=t+a,d=i===void 0?f:i(f);return d!==f&&(a=d-t),{next:h=>{let g=-a*Math.exp(-h/n);return s.done=!(g>o||g<-o),s.value=s.done?d:d+g,s},flipTarget:()=>{}}}var sA={keyframes:Xf,spring:v0,decay:iA};function aA(e){if(Array.isArray(e.to))return Xf;if(sA[e.type])return sA[e.type];let t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Xf:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?v0:Xf}u();l();c();u();l();c();var xx=16.666666666666668,Qq=typeof performance<"u"?()=>performance.now():()=>Date.now(),_x=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Qq()),xx);u();l();c();function uA(e){let t=[],r=[],n=0,o=!1,i=!1,s=new WeakSet,a={schedule:(f,d=!1,h=!1)=>{let g=h&&o,v=g?t:r;return d&&s.add(f),v.indexOf(f)===-1&&(v.push(f),g&&o&&(n=t.length)),f},cancel:f=>{let d=r.indexOf(f);d!==-1&&r.splice(d,1),s.delete(f)},process:f=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let d=0;d<n;d++){let h=t[d];h(f),s.has(h)&&(a.schedule(h),e())}o=!1,i&&(i=!1,a.process(f))}};return a}var Zq=40,Ex=!0,Qf=!1,Sx=!1,uc={delta:0,timestamp:0},Zf=["read","update","preRender","render","postRender"],E0=Zf.reduce((e,t)=>(e[t]=uA(()=>Qf=!0),e),{}),eK=Zf.reduce((e,t)=>{let r=E0[t];return e[t]=(n,o=!1,i=!1)=>(Qf||rK(),r.schedule(n,o,i)),e},{}),qr=Zf.reduce((e,t)=>(e[t]=E0[t].cancel,e),{}),S0=Zf.reduce((e,t)=>(e[t]=()=>E0[t].process(uc),e),{}),tK=e=>E0[e].process(uc),cA=e=>{Qf=!1,uc.delta=Ex?xx:Math.max(Math.min(e-uc.timestamp,Zq),1),uc.timestamp=e,Sx=!0,Zf.forEach(tK),Sx=!1,Qf&&(Ex=!1,_x(cA))},rK=()=>{Qf=!0,Ex=!0,Sx||_x(cA)},sa=()=>uc,Et=eK;u();l();c();function Cx(e,t,r=0){return e-t-r}function lA(e,t,r=0,n=!0){return n?Cx(t+-e,t,r):t-(e-t)+r}function fA(e,t,r,n){return n?e>=t+r:e<=-r}var nK=e=>{let t=({delta:r})=>e(r);return{start:()=>Et.update(t,!0),stop:()=>qr.update(t)}};function ed(e){var t,r,{from:n,autoplay:o=!0,driver:i=nK,elapsed:s=0,repeat:a=0,repeatType:f="loop",repeatDelay:d=0,onPlay:h,onStop:g,onComplete:v,onRepeat:b,onUpdate:w}=e,_=g0(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=_,x,S=0,E=_.duration,T,A=!1,O=!0,P,I=aA(_);!((r=(t=I).needsInterpolation)===null||r===void 0)&&r.call(t,n,C)&&(P=w0([0,100],[n,C],{clamp:!1}),n=0,C=100);let R=I(Object.assign(Object.assign({},_),{from:n,to:C}));function k(){S++,f==="reverse"?(O=S%2===0,s=lA(s,E,d,O)):(s=Cx(s,E,d),f==="mirror"&&R.flipTarget()),A=!1,b&&b()}function L(){x.stop(),v&&v()}function M(j){if(O||(j=-j),s+=j,!A){let V=R.next(Math.max(0,s));T=V.value,P&&(T=P(T)),A=O?V.done:s<=0}w==null||w(T),A&&(S===0&&(E!=null||(E=s)),S<a?fA(s,E,d,O)&&k():L())}function F(){h==null||h(),x=i(M),x.start()}return o&&F(),{stop:()=>{g==null||g(),x.stop()}}}u();l();c();u();l();c();function td(e,t){return t?e*(1e3/t):0}function Tx({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:f=1,modifyTarget:d,driver:h,onUpdate:g,onComplete:v,onStop:b}){let w;function _(E){return r!==void 0&&E<r||n!==void 0&&E>n}function C(E){return r===void 0?n:n===void 0||Math.abs(r-E)<Math.abs(n-E)?r:n}function x(E){w==null||w.stop(),w=ed(Object.assign(Object.assign({},E),{driver:h,onUpdate:T=>{var A;g==null||g(T),(A=E.onUpdate)===null||A===void 0||A.call(E,T)},onComplete:v,onStop:b}))}function S(E){x(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:f},E))}if(_(e))S({from:e,velocity:t,to:C(e)});else{let E=o*t+e;typeof d<"u"&&(E=d(E));let T=C(E),A=T===r?-1:1,O,P,I=R=>{O=P,P=R,t=td(R-O,sa().delta),(A===1&&R>T||A===-1&&R<T)&&S({from:R,to:T,velocity:t})};x({type:"decay",from:e,velocity:t,timeConstant:i,power:o,restDelta:f,modifyTarget:d,onUpdate:_(E)?I:void 0})}return{stop:()=>w==null?void 0:w.stop()}}u();l();c();u();l();c();var rd=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y");u();l();c();var Px=e=>rd(e)&&e.hasOwnProperty("z");var C0=(e,t)=>Math.abs(e-t);function aa(e,t){if(Kf(e)&&Kf(t))return C0(e,t);if(rd(e)&&rd(t)){let r=C0(e.x,t.x),n=C0(e.y,t.y),o=Px(e)&&Px(t)?C0(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}u();l();c();var dA=(e,t)=>1-3*t+3*e,pA=(e,t)=>3*t-6*e,hA=e=>3*e,I0=(e,t,r)=>((dA(t,r)*e+pA(t,r))*e+hA(t))*e,mA=(e,t,r)=>3*dA(t,r)*e*e+2*pA(t,r)*e+hA(t),oK=1e-7,iK=10;function sK(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=I0(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>oK&&++a<iK);return s}var aK=8,uK=.001;function cK(e,t,r,n){for(let o=0;o<aK;++o){let i=mA(t,r,n);if(i===0)return t;t-=(I0(t,r,n)-e)/i}return t}var P0=11,T0=1/(P0-1);function Ix(e,t,r,n){if(e===t&&r===n)return ia;let o=new Float32Array(P0);for(let s=0;s<P0;++s)o[s]=I0(s*T0,e,r);function i(s){let a=0,f=1,d=P0-1;for(;f!==d&&o[f]<=s;++f)a+=T0;--f;let h=(s-o[f])/(o[f+1]-o[f]),g=a+h*T0,v=mA(g,e,r);return v>=uK?cK(s,g,e,r):v===0?g:sK(s,a,a+T0,e,r)}return s=>s===0||s===1?s:I0(i(s),t,n)}function gA({onTap:e,onTapStart:t,onTapCancel:r,whileTap:n,visualElement:o}){let i=e||t||r||n,s=(0,Ax.useRef)(!1),a=(0,Ax.useRef)(null),f={passive:!(t||e||r||b)};function d(){a.current&&a.current(),a.current=null}function h(){return d(),s.current=!1,o.animationState&&o.animationState.setActive(Oe.Tap,!1),!d0()}function g(w,_){!h()||(sx(o.current,w.target)?e&&e(w,_):r&&r(w,_))}function v(w,_){!h()||r&&r(w,_)}function b(w,_){d(),!s.current&&(s.current=!0,a.current=Xo(Yo(window,"pointerup",g,f),Yo(window,"pointercancel",v,f)),o.animationState&&o.animationState.setActive(Oe.Tap,!0),t&&t(w,_))}na(o,"pointerdown",i?b:void 0,f),oc(d)}u();l();c();u();l();c();var lK="production",cc=typeof process>"u"||process.env===void 0?lK:"production";var nd=N(z(),1);u();l();c();var yA=new Set;function A0(e,t,r){e||yA.has(t)||(console.warn(t),r&&console.warn(r),yA.add(t))}u();l();c();var Ox=new WeakMap,Dx=new WeakMap,fK=e=>{let t=Ox.get(e.target);t&&t(e)},dK=e=>{e.forEach(fK)};function pK(r){var n=r,{root:e}=n,t=K(n,["root"]);let o=e||document;Dx.has(o)||Dx.set(o,{});let i=Dx.get(o),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(dK,D({root:e},t))),i[s]}function vA(e,t,r){let n=pK(t);return Ox.set(e,r),n.observe(e),()=>{Ox.delete(e),n.unobserve(e)}}function bA({visualElement:e,whileInView:t,onViewportEnter:r,onViewportLeave:n,viewport:o={}}){let i=(0,nd.useRef)({hasEnteredView:!1,isInView:!1}),s=Boolean(t||r||n);o.once&&i.current.hasEnteredView&&(s=!1),(typeof IntersectionObserver>"u"?gK:mK)(s,i.current,e,o)}var hK={some:0,all:1};function mK(e,t,r,{root:n,margin:o,amount:i="some",once:s}){(0,nd.useEffect)(()=>{if(!e||!r.current)return;let a={root:n==null?void 0:n.current,rootMargin:o,threshold:typeof i=="number"?i:hK[i]},f=d=>{let{isIntersecting:h}=d;if(t.isInView===h||(t.isInView=h,s&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Oe.InView,h);let g=r.getProps(),v=h?g.onViewportEnter:g.onViewportLeave;v&&v(d)};return vA(r.current,a,f)},[e,n,o,i])}function gK(e,t,r,{fallback:n=!0}){(0,nd.useEffect)(()=>{!e||!n||(cc!=="production"&&A0(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;let{onViewportEnter:o}=r.getProps();o&&o(null),r.animationState&&r.animationState.setActive(Oe.InView,!0)}))},[e])}u();l();c();var $n=e=>t=>(e(t),null);var wA={inView:$n(bA),tap:$n(gA),focus:$n(p4),hover:$n(_4)};u();l();c();var id=N(z(),1);u();l();c();var lc=N(z(),1);function D0(){let e=(0,lc.useContext)(no);if(e===null)return[!0,null];let{isPresent:t,onExitComplete:r,register:n}=e,o=(0,lc.useId)();return(0,lc.useEffect)(()=>n(o),[]),!t&&r?[!1,()=>r&&r(o)]:[!0]}u();l();c();u();l();c();function Rx(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}u();l();c();u();l();c();u();l();c();var fc=e=>e*1e3;u();l();c();var xA={linear:ia,easeIn:Wf,easeInOut:Yf,easeOut:hx,circIn:_0,circInOut:mx,circOut:ac,backIn:Jf,backInOut:yx,backOut:gx,anticipate:vx,bounceIn:bx,bounceInOut:wx,bounceOut:sc},Nx=e=>{if(Array.isArray(e)){Bt(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return Ix(t,r,n,o)}else if(typeof e=="string")return Bt(xA[e]!==void 0,`Invalid easing type '${e}'`),xA[e];return e},_A=e=>Array.isArray(e)&&typeof e[0]!="number";u();l();c();var kx=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Gt.test(t)&&!t.startsWith("url("));u();l();c();var ua=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),O0=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mx=()=>({type:"keyframes",ease:"linear",duration:.3}),yK=e=>({type:"keyframes",duration:.8,values:e}),EA={x:ua,y:ua,z:ua,rotate:ua,rotateX:ua,rotateY:ua,rotateZ:ua,scaleX:O0,scaleY:O0,scale:O0,opacity:Mx,backgroundColor:Mx,color:Mx,default:O0},SA=(e,t)=>{let r;return Wo(t)?r=yK:r=EA[e]||EA.default,D({to:t},r(t))};u();l();c();u();l();c();var vK=B(D({},t0),{color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:Xu,WebkitFilter:Xu}),dc=e=>vK[e];function od(e,t){var r;let n=dc(e);return n!==Xu&&(n=Gt),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,t)}u();l();c();var CA={current:!1};u();l();c();function R0(e,t){let r=performance.now(),n=({timestamp:o})=>{let i=o-r;i>=t&&(qr.read(n),e(i-t))};return Et.read(n,!0),()=>qr.read(n)}function bK(h){var g=h,{when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:f}=g,d=K(g,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(d).length}var TA=!1;function wK(s){var a=s,{ease:e,times:t,yoyo:r,flip:n,loop:o}=a,i=K(a,["ease","times","yoyo","flip","loop"]);let f=D({},i);return t&&(f.offset=t),i.duration&&(f.duration=fc(i.duration)),i.repeatDelay&&(f.repeatDelay=fc(i.repeatDelay)),e&&(f.ease=_A(e)?e.map(Nx):Nx(e)),i.type==="tween"&&(f.type="keyframes"),(r||o||n)&&(oa(!TA,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),TA=!0,r?f.repeatType="reverse":o?f.repeatType="loop":n&&(f.repeatType="mirror"),f.repeat=o||r||n||i.repeat),i.type!=="spring"&&(f.type="keyframes"),f}function xK(e,t){var r,n;return(n=(r=(N0(e,t)||{}).delay)!==null&&r!==void 0?r:e.delay)!==null&&n!==void 0?n:0}function _K(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function EK(e,t,r){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),_K(t),bK(e)||(e=D(D({},e),SA(r,t.to))),D(D({},t),wK(e))}function SK(e,t,r,n,o){let i=N0(n,e)||{},s=i.from!==void 0?i.from:t.get(),a=kx(e,r);s==="none"&&a&&typeof r=="string"?s=od(e,r):PA(s)&&typeof r=="string"?s=IA(r):!Array.isArray(r)&&PA(r)&&typeof s=="string"&&(r=IA(s));let f=kx(e,s);oa(f===a,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`);function d(){let g={from:s,to:r,velocity:t.getVelocity(),onComplete:o,onUpdate:v=>t.set(v)};return i.type==="inertia"||i.type==="decay"?Tx(D(D({},g),i)):ed(B(D({},EK(i,g,e)),{onUpdate:v=>{g.onUpdate(v),i.onUpdate&&i.onUpdate(v)},onComplete:()=>{g.onComplete(),i.onComplete&&i.onComplete()}}))}function h(){let g=u0(r);return t.set(g),o(),i.onUpdate&&i.onUpdate(g),i.onComplete&&i.onComplete(),{stop:()=>{}}}return!f||!a||i.type===!1?h:d}function PA(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function IA(e){return typeof e=="number"?0:od("",e)}function N0(e,t){return e[t]||e.default||e}function pc(e,t,r,n={}){return CA.current&&(n={type:!1}),t.start(o=>{let i,s=SK(e,t,r,n,o),a=xK(n,e),f=()=>i=s(),d;return a?d=R0(f,fc(a)):f(),()=>{d&&d(),i&&i.stop()}})}u();l();c();u();l();c();var AA=e=>/^\-?\d*\.?\d+$/.test(e);u();l();c();var DA=e=>/^0[^.\s]+$/.test(e);u();l();c();u();l();c();u();l();c();function hc(e,t){e.indexOf(t)===-1&&e.push(t)}function mc(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var so=class{constructor(){this.subscriptions=[]}add(t){return hc(this.subscriptions,t),()=>mc(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(!!o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i<o;i++){let s=this.subscriptions[i];s&&s(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var CK=e=>!isNaN(parseFloat(e)),Lx=class{constructor(t){this.version="7.6.7",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new so,this.velocityUpdateSubscribers=new so,this.renderSubscribers=new so,this.canTrackVelocity=!1,this.updateAndNotify=(r,n=!0)=>{this.prev=this.current,this.current=r;let{delta:o,timestamp:i}=sa();this.lastUpdated!==i&&(this.timeDelta=o,this.lastUpdated=i,Et.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),n&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Et.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=CK(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?td(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.stopAnimation=t(r)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}};function ao(e){return new Lx(e)}u();l();c();u();l();c();u();l();c();var k0=e=>t=>t.test(e);u();l();c();var OA={test:e=>e==="auto",parse:e=>e};var Fx=[Hr,ne,sr,Fn,Qw,Xw,OA],gc=e=>Fx.find(k0(e));var TK=[...Fx,mt,Gt],RA=e=>TK.find(k0(e));u();l();c();function PK(e){let t={};return e.values.forEach((r,n)=>t[n]=r.get()),t}function IK(e){let t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function ca(e,t,r){let n=e.getProps();return rc(n,t,r!==void 0?r:n.custom,PK(e),IK(e))}function AK(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ao(r))}function NA(e,t){let r=ca(e,t),s=r?e.makeTargetAnimatable(r,!1):{},{transitionEnd:n={},transition:o={}}=s,i=K(s,["transitionEnd","transition"]);i=D(D({},i),n);for(let a in i){let f=u0(i[a]);AK(e,a,f)}}function kA(e,t,r){var n,o;let i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(!!s)for(let a=0;a<s;a++){let f=i[a],d=t[f],h=null;Array.isArray(d)&&(h=d[0]),h===null&&(h=(o=(n=r[f])!==null&&n!==void 0?n:e.readValue(f))!==null&&o!==void 0?o:t[f]),h!=null&&(typeof h=="string"&&(AA(h)||DA(h))?h=parseFloat(h):!RA(h)&&Gt.test(d)&&(h=od(f,d)),e.addValue(f,ao(h)),r[f]===void 0&&(r[f]=h),h!==null&&e.setBaseTarget(f,h))}}function DK(e,t){return t?(t[e]||t.default||t).from:void 0}function MA(e,t,r){var n;let o={};for(let i in e){let s=DK(i,t);o[i]=s!==void 0?s:(n=r.getValue(i))===null||n===void 0?void 0:n.get()}return o}u();l();c();function la(e){return Boolean($t(e)&&e.add)}function LA(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(i=>$x(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=$x(e,t,r);else{let o=typeof t=="function"?ca(e,t,r.custom):t;n=FA(e,o,r)}return n.then(()=>e.notify("AnimationComplete",t))}function $x(e,t,r={}){var n;let o=ca(e,t,r.custom),{transition:i=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(i=r.transitionOverride);let s=o?()=>FA(e,o,r):()=>Promise.resolve(),a=!((n=e.variantChildren)===null||n===void 0)&&n.size?(d=0)=>{let{delayChildren:h=0,staggerChildren:g,staggerDirection:v}=i;return OK(e,t,h+d,g,v,r)}:()=>Promise.resolve(),{when:f}=i;if(f){let[d,h]=f==="beforeChildren"?[s,a]:[a,s];return d().then(h)}else return Promise.all([s(),a(r.delay)])}function FA(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var i;let v=e.makeTargetAnimatable(t),{transition:s=e.getDefaultTransition(),transitionEnd:a}=v,f=K(v,["transition","transitionEnd"]),d=e.getValue("willChange");n&&(s=n);let h=[],g=o&&((i=e.animationState)===null||i===void 0?void 0:i.getState()[o]);for(let b in f){let w=e.getValue(b),_=f[b];if(!w||_===void 0||g&&NK(g,b))continue;let C=D({delay:r},s);e.shouldReduceMotion&&oo.has(b)&&(C=B(D({},C),{type:!1,delay:0}));let x=pc(b,w,_,C);la(d)&&(d.add(b),x=x.then(()=>d.remove(b))),h.push(x)}return Promise.all(h).then(()=>{a&&NA(e,a)})}function OK(e,t,r=0,n=0,o=1,i){let s=[],a=(e.variantChildren.size-1)*n,f=o===1?(d=0)=>d*n:(d=0)=>a-d*n;return Array.from(e.variantChildren).sort(RK).forEach((d,h)=>{s.push($x(d,t,B(D({},i),{delay:r+f(h)})).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(s)}function RK(e,t){return e.sortNodePosition(t)}function NK({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}var M0=[Oe.Animate,Oe.InView,Oe.Focus,Oe.Hover,Oe.Tap,Oe.Drag,Oe.Exit],kK=[...M0].reverse(),MK=M0.length;function LK(e){return t=>Promise.all(t.map(({animation:r,options:n})=>LA(e,r,n)))}function $A(e){let t=LK(e),r=$K(),n=!0,o=(f,d)=>{let h=ca(e,d);if(h){let g=h,{transition:v,transitionEnd:b}=g,w=K(g,["transition","transitionEnd"]);f=D(D(D({},f),w),b)}return f};function i(f){t=f(e)}function s(f,d){var h;let g=e.getProps(),v=e.getVariantContext(!0)||{},b=[],w=new Set,_={},C=1/0;for(let S=0;S<MK;S++){let E=kK[S],T=r[E],A=(h=g[E])!==null&&h!==void 0?h:v[E],O=Ho(A),P=E===d?T.isActive:null;P===!1&&(C=S);let I=A===v[E]&&A!==g[E]&&O;if(I&&n&&e.manuallyAnimateOnMount&&(I=!1),T.protectedKeys=D({},_),!T.isActive&&P===null||!A&&!T.prevProp||ts(A)||typeof A=="boolean")continue;let R=FK(T.prevProp,A),k=R||E===d&&T.isActive&&!I&&O||S>C&&O,L=Array.isArray(A)?A:[A],M=L.reduce(o,{});P===!1&&(M={});let{prevResolvedValues:F={}}=T,j=D(D({},F),M),V=G=>{k=!0,w.delete(G),T.needsAnimating[G]=!0};for(let G in j){let H=M[G],ee=F[G];_.hasOwnProperty(G)||(H!==ee?Wo(H)&&Wo(ee)?!Rx(H,ee)||R?V(G):T.protectedKeys[G]=!0:H!==void 0?V(G):w.add(G):H!==void 0&&w.has(G)?V(G):T.protectedKeys[G]=!0)}T.prevProp=A,T.prevResolvedValues=M,T.isActive&&(_=D(D({},_),M)),n&&e.blockInitialAnimation&&(k=!1),k&&!I&&b.push(...L.map(G=>({animation:G,options:D({type:E},f)})))}if(w.size){let S={};w.forEach(E=>{let T=e.getBaseTarget(E);T!==void 0&&(S[E]=T)}),b.push({animation:S})}let x=Boolean(b.length);return n&&g.initial===!1&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(b):Promise.resolve()}function a(f,d,h){var g;if(r[f].isActive===d)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(b=>{var w;return(w=b.animationState)===null||w===void 0?void 0:w.setActive(f,d)}),r[f].isActive=d;let v=s(h,f);for(let b in r)r[b].protectedKeys={};return v}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>r}}function FK(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Rx(t,e):!1}function fa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $K(){return{[Oe.Animate]:fa(!0),[Oe.InView]:fa(),[Oe.Hover]:fa(),[Oe.Tap]:fa(),[Oe.Drag]:fa(),[Oe.Focus]:fa(),[Oe.Exit]:fa()}}var BA={animation:$n(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=$A(e)),ts(t)&&(0,id.useEffect)(()=>t.subscribe(e),[t])}),exit:$n(e=>{let{custom:t,visualElement:r}=e,[n,o]=D0(),i=(0,id.useContext)(no);(0,id.useEffect)(()=>{r.isPresent=n;let s=r.animationState&&r.animationState.setActive(Oe.Exit,!n,{custom:i&&i.custom||t});s&&!n&&s.then(o)},[n])})};u();l();c();u();l();c();var Kx=N(z(),1);u();l();c();u();l();c();var yc=class{constructor(t,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let d=Ux(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=aa(d.offset,{x:0,y:0})>=3;if(!h&&!g)return;let{point:v}=d,{timestamp:b}=sa();this.history.push(B(D({},v),{timestamp:b}));let{onStart:w,onMove:_}=this.handlers;h||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{if(this.lastMoveEvent=d,this.lastMoveEventInfo=Bx(h,this.transformPagePoint),l0(d)&&d.buttons===0){this.handlePointerUp(d,h);return}Et.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();let{onEnd:g,onSessionEnd:v}=this.handlers,b=Ux(Bx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,b),v&&v(d,b)},f0(t)&&t.touches.length>1)return;this.handlers=r,this.transformPagePoint=n;let o=qf(t),i=Bx(o,this.transformPagePoint),{point:s}=i,{timestamp:a}=sa();this.history=[B(D({},s),{timestamp:a})];let{onSessionStart:f}=r;f&&f(t,Ux(i,this.history)),this.removeListeners=Xo(Yo(window,"pointermove",this.handlePointerMove),Yo(window,"pointerup",this.handlePointerUp),Yo(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qr.update(this.updatePoint)}};function Bx(e,t){return t?{point:t(e.point)}:e}function UA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ux({point:e},t){return{point:e,delta:UA(e,jA(t)),offset:UA(e,BK(t)),velocity:UK(t,.1)}}function BK(e){return e[0]}function jA(e){return e[e.length-1]}function UK(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=jA(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>fc(t)));)r--;if(!n)return{x:0,y:0};let i=(o.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};let s={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}u();l();c();u();l();c();function Wt(e){return e.max-e.min}function VA(e,t=0,r=.01){return aa(e,t)<r}function zA(e,t,r,n=.5){e.origin=n,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=Wt(r)/Wt(t),(VA(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ce(r.min,r.max,e.origin)-e.originPoint,(VA(e.translate)||isNaN(e.translate))&&(e.translate=0)}function vc(e,t,r,n){zA(e.x,t.x,r.x,n==null?void 0:n.originX),zA(e.y,t.y,r.y,n==null?void 0:n.originY)}function HA(e,t,r){e.min=r.min+t.min,e.max=e.min+Wt(t)}function KA(e,t,r){HA(e.x,t.x,r.x),HA(e.y,t.y,r.y)}function qA(e,t,r){e.min=t.min-r.min,e.max=e.min+Wt(t)}function bc(e,t,r){qA(e.x,t.x,r.x),qA(e.y,t.y,r.y)}function XA(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Ce(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Ce(r,e,n.max):Math.min(e,r)),e}function GA(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function QA(e,{top:t,left:r,bottom:n,right:o}){return{x:GA(e.x,r,o),y:GA(e.y,t,n)}}function WA(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function ZA(e,t){return{x:WA(e.x,t.x),y:WA(e.y,t.y)}}function eD(e,t){let r=.5,n=Wt(e),o=Wt(t);return o>n?r=Jo(t.min,t.max-n,e.min):n>o&&(r=Jo(e.min,e.max-o,t.min)),as(0,1,r)}function tD(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var L0=.35;function rD(e=L0){return e===!1?e=0:e===!0&&(e=L0),{x:YA(e,"left","right"),y:YA(e,"top","bottom")}}function YA(e,t,r){return{min:JA(e,t),max:JA(e,r)}}function JA(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}u();l();c();var nD=()=>({translate:0,scale:1,origin:0,originPoint:0}),wc=()=>({x:nD(),y:nD()}),oD=()=>({min:0,max:0}),st=()=>({x:oD(),y:oD()});u();l();c();function gn(e){return[e("x"),e("y")]}u();l();c();u();l();c();function F0({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function iD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sD(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}u();l();c();u();l();c();function jx(e){return e===void 0||e===1}function $0({scale:e,scaleX:t,scaleY:r}){return!jx(e)||!jx(t)||!jx(r)}function Qo(e){return $0(e)||Vx(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Vx(e){return aD(e.x)||aD(e.y)}function aD(e){return e&&e!=="0%"}function sd(e,t,r){let n=e-r,o=t*n;return r+o}function uD(e,t,r,n,o){return o!==void 0&&(e=sd(e,o,n)),sd(e,r,n)+t}function zx(e,t=0,r=1,n,o){e.min=uD(e.min,t,r,n,o),e.max=uD(e.max,t,r,n,o)}function Hx(e,{x:t,y:r}){zx(e.x,t.translate,t.scale,t.originPoint),zx(e.y,r.translate,r.scale,r.originPoint)}function lD(e,t,r,n=!1){var o,i;let s=r.length;if(!s)return;t.x=t.y=1;let a,f;for(let d=0;d<s;d++)a=r[d],f=a.projectionDelta,((i=(o=a.instance)===null||o===void 0?void 0:o.style)===null||i===void 0?void 0:i.display)!=="contents"&&(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&da(e,{x:-a.scroll.x,y:-a.scroll.y}),f&&(t.x*=f.x.scale,t.y*=f.y.scale,Hx(e,f)),n&&Qo(a.latestValues)&&da(e,a.latestValues))}function uo(e,t){e.min=e.min+t,e.max=e.max+t}function cD(e,t,[r,n,o]){let i=t[o]!==void 0?t[o]:.5,s=Ce(e.min,e.max,i);zx(e,t[r],t[n],s,t.scale)}var jK=["x","scaleX","originX"],VK=["y","scaleY","originY"];function da(e,t){cD(e.x,t,jK),cD(e.y,t,VK)}function qx(e,t){return F0(sD(e.getBoundingClientRect(),t))}function fD(e,t,r){let n=qx(e,r),{scroll:o}=t;return o&&(uo(n.x,o.x),uo(n.y,o.y)),n}var zK=new WeakMap,U0=class{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;let n=a=>{this.stopAnimation(),r&&this.snapToCursor(qf(a,"page").point)},o=(a,f)=>{var d;let{drag:h,dragPropagation:g,onDragStart:v}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ix(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gn(b=>{var w,_;let C=this.getAxisMotionValue(b).get()||0;if(sr.test(C)){let x=(_=(w=this.visualElement.projection)===null||w===void 0?void 0:w.layout)===null||_===void 0?void 0:_.layoutBox[b];x&&(C=Wt(x)*(parseFloat(C)/100))}this.originPoint[b]=C}),v==null||v(a,f),(d=this.visualElement.animationState)===null||d===void 0||d.setActive(Oe.Drag,!0))},i=(a,f)=>{let{dragPropagation:d,dragDirectionLock:h,onDirectionLock:g,onDrag:v}=this.getProps();if(!d&&!this.openGlobalLock)return;let{offset:b}=f;if(h&&this.currentDirection===null){this.currentDirection=HK(b),this.currentDirection!==null&&(g==null||g(this.currentDirection));return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),v==null||v(a,f)},s=(a,f)=>this.stop(a,f);this.panSession=new yc(t,{onSessionStart:n,onStart:o,onMove:i,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:i}=this.getProps();i==null||i(t,r)}cancel(){var t,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Oe.Drag,!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!B0(t,o,this.currentDirection))return;let i=this.getAxisMotionValue(t),s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=XA(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},o=this.constraints;t&&zo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=QA(n.layoutBox,t):this.constraints=!1,this.elastic=rD(r),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&gn(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=tD(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!zo(t))return!1;let n=t.current;Bt(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let i=fD(n,o.root,this.visualElement.getTransformPagePoint()),s=ZA(o.layout.layoutBox,i);if(r){let a=r(iD(s));this.hasMutatedConstraints=!!a,a&&(s=F0(a))}return s}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),f=this.constraints||{},d=gn(h=>{var g;if(!B0(h,r,this.currentDirection))return;let v=(g=f==null?void 0:f[h])!==null&&g!==void 0?g:{};s&&(v={min:0,max:0});let b=o?200:1e6,w=o?40:1e7,_=D(D({type:"inertia",velocity:n?t[h]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10},i),v);return this.startAxisValueAnimation(h,_)});return Promise.all(d).then(a)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return pc(t,n,0,r)}stopAnimation(){gn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var r,n;let o="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[o];return i||this.visualElement.getValue(t,(n=(r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[t])!==null&&n!==void 0?n:0)}snapToCursor(t){gn(r=>{let{drag:n}=this.getProps();if(!B0(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){let{min:s,max:a}=o.layout.layoutBox[r];i.set(t[r]-Ce(s,a,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;let{drag:r,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!zo(n)||!o||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};gn(a=>{let f=this.getAxisMotionValue(a);if(f){let d=f.get();i[a]=eD({min:d,max:d},this.constraints[a])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",(t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),gn(a=>{if(!B0(a,r,null))return;let f=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];f.set(Ce(d,h,i[a]))})}addListeners(){var t;if(!this.visualElement.current)return;zK.set(this.visualElement,this);let r=this.visualElement.current,n=Yo(r,"pointerdown",d=>{let{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(d)}),o=()=>{let{dragConstraints:d}=this.getProps();zo(d)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&((t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout()),o();let a=ra(window,"resize",()=>this.scalePositionWithinConstraints()),f=i.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(gn(g=>{let v=this.getAxisMotionValue(g);!v||(this.originPoint[g]+=d[g].translate,v.set(v.get()+d[g].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),f==null||f()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=L0,dragMomentum:a=!0}=t;return B(D({},t),{drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a})}};function B0(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function HK(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}function dD(e){let{dragControls:t,visualElement:r}=e,n=ns(()=>new U0(r));(0,Kx.useEffect)(()=>t&&t.subscribe(n),[n,t]),(0,Kx.useEffect)(()=>n.addListeners(),[n])}u();l();c();var xc=N(z(),1);function pD({onPan:e,onPanStart:t,onPanEnd:r,onPanSessionStart:n,visualElement:o}){let i=e||t||r||n,s=(0,xc.useRef)(null),{transformPagePoint:a}=(0,xc.useContext)(zu),f={onSessionStart:n,onStart:t,onMove:e,onEnd:(h,g)=>{s.current=null,r&&r(h,g)}};(0,xc.useEffect)(()=>{s.current!==null&&s.current.updateHandlers(f)});function d(h){s.current=new yc(h,f,{transformPagePoint:a})}na(o,"pointerdown",i&&d),oc(()=>s.current&&s.current.end())}var hD={pan:$n(pD),drag:$n(dD)};u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();function Gx(e){return typeof e=="string"&&e.startsWith("var(--")}var Yx=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qK(e){let t=Yx.exec(e);if(!t)return[,];let[,r,n]=t;return[r,n]}var KK=4;function Wx(e,t,r=1){Bt(r<=KK,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=qK(e);if(!n)return;let i=window.getComputedStyle(t).getPropertyValue(n);return i?i.trim():Gx(o)?Wx(o,t,r+1):o}function mD(e,n,r){var t=K(n,[]);let o=e.current;if(!(o instanceof Element))return{target:t,transitionEnd:r};r&&(r=D({},r)),e.values.forEach(i=>{let s=i.get();if(!Gx(s))return;let a=Wx(s,o);a&&i.set(a)});for(let i in t){let s=t[i];if(!Gx(s))continue;let a=Wx(s,o);!a||(t[i]=a,r&&r[i]===void 0&&(r[i]=s))}return{target:t,transitionEnd:r}}u();l();c();var GK=new Set(["width","height","top","left","right","bottom","x","y"]),wD=e=>GK.has(e),WK=e=>Object.keys(e).some(wD),xD=(e,t)=>{e.set(t,!1),e.set(t)},j0=e=>e===Hr||e===ne,gD;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(gD||(gD={}));var yD=(e,t)=>parseFloat(e.split(", ")[t]),vD=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/);if(o)return yD(o[1],t);{let i=n.match(/^matrix\((.+)\)$/);return i?yD(i[1],e):0}},YK=new Set(["x","y","z"]),JK=Gu.filter(e=>!YK.has(e));function XK(e){let t=[];return JK.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}var bD={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:vD(4,13),y:vD(5,14)},QK=(e,t,r)=>{let n=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(d=>{a[d]=bD[d](n,i)}),t.render();let f=t.measureViewportBox();return r.forEach(d=>{let h=t.getValue(d);xD(h,a[d]),e[d]=bD[d](f,i)}),e},ZK=(e,t,r={},n={})=>{t=D({},t),n=D({},n);let o=Object.keys(t).filter(wD),i=[],s=!1,a=[];if(o.forEach(f=>{let d=e.getValue(f);if(!e.hasValue(f))return;let h=r[f],g=gc(h),v=t[f],b;if(Wo(v)){let w=v.length,_=v[0]===null?1:0;h=v[_],g=gc(h);for(let C=_;C<w;C++)b?Bt(gc(v[C])===b,"All keyframes must be of the same type"):(b=gc(v[C]),Bt(b===g||j0(g)&&j0(b),"Keyframes must be of the same dimension as the current value"))}else b=gc(v);if(g!==b)if(j0(g)&&j0(b)){let w=d.get();typeof w=="string"&&d.set(parseFloat(w)),typeof v=="string"?t[f]=parseFloat(v):Array.isArray(v)&&b===ne&&(t[f]=v.map(parseFloat))}else(g==null?void 0:g.transform)&&(b==null?void 0:b.transform)&&(h===0||v===0)?h===0?d.set(b.transform(h)):t[f]=g.transform(v):(s||(i=XK(e),s=!0),a.push(f),n[f]=n[f]!==void 0?n[f]:t[f],xD(d,v))}),a.length){let f=a.indexOf("height")>=0?window.pageYOffset:null,d=QK(t,e,a);return i.length&&i.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),hn&&f!==null&&window.scrollTo({top:f}),{target:d,transitionEnd:n}}else return{target:t,transitionEnd:n}};function _D(e,t,r,n){return WK(t)?ZK(e,t,r,n):{target:t,transitionEnd:n}}var ED=(e,t,r,n)=>{let o=mD(e,t,n);return t=o.target,n=o.transitionEnd,_D(e,t,r,n)};u();l();c();var PD=N(z(),1);u();l();c();u();l();c();var ad={current:null},V0={current:!1};function SD(){if(V0.current=!0,!!hn)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ad.current=e.matches;e.addListener(t),t()}else ad.current=!1}u();l();c();function CD(e,t,r){let{willChange:n}=t;for(let o in t){let i=t[o],s=r[o];if($t(i))e.addValue(o,i),la(n)&&n.add(o);else if($t(s))e.addValue(o,ao(i)),la(n)&&n.remove(o);else if(s!==i)if(e.hasValue(o)){let a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{let a=e.getStaticValue(o);e.addValue(o,ao(a!==void 0?a:i))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var ID=Object.keys(rs),eG=ID.length,TD=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],z0=class{constructor({parent:t,props:r,reducedMotionConfig:n,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Et.render(this.render,!1,!0);let{latestValues:s,renderState:a}=o;this.latestValues=s,this.baseTarget=D({},s),this.initialValues=r.initial?D({},s):{},this.renderState=a,this.parent=t,this.props=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=ea(r),this.isVariantNode=Hm(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);let h=this.scrapeMotionValuesFromProps(r),{willChange:f}=h,d=K(h,["willChange"]);for(let g in d){let v=d[g];s[g]!==void 0&&$t(v)&&(v.set(s[g],!1),la(f)&&f.add(g))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var r;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),V0.current||SD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ad.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,r,n;(t=this.projection)===null||t===void 0||t.unmount(),qr.update(this.notifyUpdate),qr.render(this.render),this.valueSubscriptions.forEach(o=>o()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(let o in this.events)this.events[o].clear();this.current=null}bindToMotionValue(t,r){let n=r.onChange(i=>{this.latestValues[t]=i,this.props.onUpdate&&Et.update(this.notifyUpdate,!1,!0)}),o=r.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{n(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,r,n,o,i,s){let a=[];cc!=="production"&&n&&r&&Bt(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(let f=0;f<eG;f++){let d=ID[f],{isEnabled:h,Component:g}=rs[d];h(t)&&g&&a.push((0,PD.createElement)(g,B(D({key:d},t),{visualElement:this})))}if(!this.projection&&i){this.projection=new i(o,this.latestValues,this.parent&&this.parent.projection);let{layoutId:f,layout:d,drag:h,dragConstraints:g,layoutScroll:v}=t;this.projection.setOptions({layoutId:f,layout:d,alwaysMeasureLayout:Boolean(h)||g&&zo(g),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof d=="string"?d:"both",initialPromotionConfig:s,layoutScroll:v})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let r=0;r<TD.length;r++){let n=TD[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let o=t["on"+n];o&&(this.propEventSubscriptions[n]=this.on(n,o))}this.prevMotionValues=CD(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var r,n;if(t)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){let i=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}let o={};for(let i=0;i<tG;i++){let s=AD[i],a=this.props[s];(Ho(a)||a===!1)&&(o[s]=a)}return o}addVariantChild(t){var r;let n=this.getClosestVariantNode();if(n)return(r=n.variantChildren)===null||r===void 0||r.add(t),()=>n.variantChildren.delete(t)}addValue(t,r){this.hasValue(t)&&this.removeValue(t),this.values.set(t,r),this.latestValues[t]=r.get(),this.bindToMotionValue(t,r)}removeValue(t){var r;this.values.delete(t),(r=this.valueSubscriptions.get(t))===null||r===void 0||r(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=ao(r),this.addValue(t,n)),n}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o=typeof n=="string"||typeof n=="object"?(r=rc(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&o!==void 0)return o;let i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!$t(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new so),this.events[t].add(r)}notify(t,...r){var n;(n=this.events[t])===null||n===void 0||n.notify(...r)}},AD=["initial",...M0],tG=AD.length;var _c=class extends z0{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){var n;return(n=t.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance(s,{transformValues:o},i){var a=s,{transition:t,transitionEnd:r}=a,n=K(a,["transition","transitionEnd"]);let f=MA(n,t||{},this);if(o&&(r&&(r=o(r)),n&&(n=o(n)),f&&(f=o(f))),i){kA(this,n,f);let d=ED(this,n,f,r);r=d.transitionEnd,n=d.target}return D({transition:t,transitionEnd:r},n)}};function rG(e){return window.getComputedStyle(e)}var H0=class extends _c{readValueFromInstance(t,r){if(oo.has(r)){let n=dc(r);return n&&n.default||0}else{let n=rG(t),o=(Ym(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return qx(t,r)}build(t,r,n,o){Qu(t,r,n,o.transformTemplate)}scrapeMotionValuesFromProps(t){return tc(t)}renderInstance(t,r,n,o){o0(t,r,n,o)}};u();l();c();var q0=class extends _c{getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){var n;return oo.has(r)?((n=dc(r))===null||n===void 0?void 0:n.default)||0:(r=i0.has(r)?r:n0(r),t.getAttribute(r))}measureInstanceViewportBox(){return st()}scrapeMotionValuesFromProps(t){return a0(t)}build(t,r,n,o){ec(t,r,n,o.transformTemplate)}renderInstance(t,r,n,o){s0(t,r,n,o)}};var DD=(e,t)=>qu(e)?new q0(t,{enableHardwareAcceleration:!1}):new H0(t,{enableHardwareAcceleration:!0});u();l();c();u();l();c();var Sc=N(z(),1);u();l();c();function OD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ec={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ne.test(e))e=parseFloat(e);else return e;let r=OD(e,t.target.x),n=OD(e,t.target.y);return`${r}% ${n}%`}};u();l();c();var RD="_$css",ND={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=e.includes("var("),i=[];o&&(e=e.replace(Yx,b=>(i.push(b),RD)));let s=Gt.parse(e);if(s.length>5)return n;let a=Gt.createTransformer(e),f=typeof s[0]!="number"?1:0,d=r.x.scale*t.x,h=r.y.scale*t.y;s[0+f]/=d,s[1+f]/=h;let g=Ce(d,h,.5);typeof s[2+f]=="number"&&(s[2+f]/=g),typeof s[3+f]=="number"&&(s[3+f]/=g);let v=a(s);if(o){let b=0;v=v.replace(RD,()=>{let w=i[b];return b++,w})}return v}};var Jx=class extends Sc.default.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;UI(nG),i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions(B(D({},i.options),{onExitComplete:()=>this.safeToRemove()}))),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,s=n.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Et.postRender(()=>{var a;!((a=s.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(o),n!=null&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t==null||t()}render(){return null}};function kD(e){let[t,r]=D0(),n=(0,Sc.useContext)(Hu);return Sc.default.createElement(Jx,B(D({},e),{layoutGroup:n,switchLayoutGroup:(0,Sc.useContext)(Gm),isPresent:t,safeToRemove:r}))}var nG={borderRadius:B(D({},Ec),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ec,borderTopRightRadius:Ec,borderBottomLeftRadius:Ec,borderBottomRightRadius:Ec,boxShadow:ND};var MD={measureLayout:kD};u();l();c();u();l();c();u();l();c();function LD(e,t,r={}){let n=$t(e)?e:ao(e);return pc("",n,t,r),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}u();l();c();var UD=["TopLeft","TopRight","BottomLeft","BottomRight"],oG=UD.length,FD=e=>typeof e=="string"?parseFloat(e):e,$D=e=>typeof e=="number"||ne.test(e);function jD(e,t,r,n,o,i){var s,a,f,d;o?(e.opacity=Ce(0,(s=r.opacity)!==null&&s!==void 0?s:1,iG(n)),e.opacityExit=Ce((a=t.opacity)!==null&&a!==void 0?a:1,0,sG(n))):i&&(e.opacity=Ce((f=t.opacity)!==null&&f!==void 0?f:1,(d=r.opacity)!==null&&d!==void 0?d:1,n));for(let h=0;h<oG;h++){let g=`border${UD[h]}Radius`,v=BD(t,g),b=BD(r,g);if(v===void 0&&b===void 0)continue;v||(v=0),b||(b=0),v===0||b===0||$D(v)===$D(b)?(e[g]=Math.max(Ce(FD(v),FD(b),n),0),(sr.test(b)||sr.test(v))&&(e[g]+="%")):e[g]=b}(t.rotate||r.rotate)&&(e.rotate=Ce(t.rotate||0,r.rotate||0,n))}function BD(e,t){var r;return(r=e[t])!==null&&r!==void 0?r:e.borderRadius}var iG=VD(0,.5,ac),sG=VD(.5,.95,ia);function VD(e,t,r){return n=>n<e?0:n>t?1:r(Jo(e,t,n))}u();l();c();function zD(e,t){e.min=t.min,e.max=t.max}function yn(e,t){zD(e.x,t.x),zD(e.y,t.y)}u();l();c();function HD(e,t,r,n,o){return e-=t,e=sd(e,1/r,n),o!==void 0&&(e=sd(e,1/o,n)),e}function aG(e,t=0,r=1,n=.5,o,i=e,s=e){if(sr.test(t)&&(t=parseFloat(t),t=Ce(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ce(i.min,i.max,n);e===i&&(a-=t),e.min=HD(e.min,t,r,a,o),e.max=HD(e.max,t,r,a,o)}function qD(e,t,[r,n,o],i,s){aG(e,t[r],t[n],t[o],t.scale,i,s)}var uG=["x","scaleX","originX"],cG=["y","scaleY","originY"];function Xx(e,t,r,n){qD(e.x,t,uG,r==null?void 0:r.x,n==null?void 0:n.x),qD(e.y,t,cG,r==null?void 0:r.y,n==null?void 0:n.y)}u();l();c();function KD(e){return e.translate===0&&e.scale===1}function Qx(e){return KD(e.x)&&KD(e.y)}function Zx(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function e_(e){return Wt(e.x)/Wt(e.y)}function GD(e,t,r=.1){return aa(e,t)<=r}u();l();c();var K0=class{constructor(){this.members=[]}add(t){hc(this.members,t),t.scheduleRender()}remove(t){if(mc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){var n;let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:i}=t.options;i===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,o,i,s;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(s=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||s===void 0||s.call(i)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};u();l();c();var lG="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function t_(e,t,r){let n=e.x.translate/t.x,o=e.y.translate/t.y,i=`translate3d(${n}px, ${o}px, 0) `;if(i+=`scale(${1/t.x}, ${1/t.y}) `,r){let{rotate:f,rotateX:d,rotateY:h}=r;f&&(i+=`rotate(${f}deg) `),d&&(i+=`rotateX(${d}deg) `),h&&(i+=`rotateY(${h}deg) `)}let s=e.x.scale*t.x,a=e.y.scale*t.y;return i+=`scale(${s}, ${a})`,i===lG?"none":i}u();l();c();u();l();c();var WD=(e,t)=>e.depth-t.depth;var G0=class{constructor(){this.children=[],this.isDirty=!1}add(t){hc(this.children,t),this.isDirty=!0}remove(t){mc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(WD),this.isDirty=!1,this.children.forEach(t)}};var YD=["","X","Y","Z"],JD=1e3;function W0({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(s,a={},f=t==null?void 0:t()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(mG),this.nodes.forEach(gG)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=s,this.latestValues=a,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new G0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new so),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){let f=this.eventHandlers.get(s);f==null||f.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}registerPotentialNode(s,a){this.potentialNodes.set(s,a)}mount(s,a=!1){var f;if(this.instance)return;this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;let{layoutId:d,layout:h,visualElement:g}=this.options;if(g&&!g.current&&g.mount(s),this.root.nodes.add(this),(f=this.parent)===null||f===void 0||f.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),a&&(h||d)&&(this.isLayoutDirty=!0),e){let v,b=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=R0(b,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(QD))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&g&&(d||h)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:b,hasRelativeTargetChanged:w,layout:_})=>{var C,x,S,E,T;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let A=(x=(C=this.options.transition)!==null&&C!==void 0?C:g.getDefaultTransition())!==null&&x!==void 0?x:xG,{onLayoutAnimationStart:O,onLayoutAnimationComplete:P}=g.getProps(),I=!this.targetLayout||!Zx(this.targetLayout,_)||w,R=!b&&w;if(((S=this.resumeFrom)===null||S===void 0?void 0:S.instance)||R||b&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,R);let k=B(D({},N0(A,"layout")),{onPlay:O,onComplete:P});g.shouldReduceMotion&&(k.delay=0,k.type=!1),this.startAnimation(k)}else!b&&this.animationProgress===0&&QD(this),this.isLead()&&((T=(E=this.options).onExitComplete)===null||T===void 0||T.call(E));this.targetLayout=_})}unmount(){var s,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,qr.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1}startUpdate(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(yG))}willUpdate(s=!0){var a,f,d;if(this.root.isUpdateBlocked()){(f=(a=this.options).onExitComplete)===null||f===void 0||f.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){let w=this.path[b];w.shouldResetTransform=!0,w.updateScroll()}let{layoutId:h,layout:g}=this.options;if(h===void 0&&!g)return;let v=(d=this.options.visualElement)===null||d===void 0?void 0:d.getProps().transformTemplate;this.prevTransformTemplateValue=v==null?void 0:v(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(XD);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(_G),this.potentialNodes.clear()),this.nodes.forEach(hG),this.nodes.forEach(fG),this.nodes.forEach(dG),this.clearAllSnapshots(),S0.update(),S0.preRender(),S0.render())}clearAllSnapshots(){this.nodes.forEach(pG),this.sharedNodes.forEach(vG)}scheduleUpdateProjection(){Et.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var s;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();let a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(s=this.options.visualElement)===null||s===void 0||s.notify("LayoutMeasure",this.layout.layoutBox,a==null?void 0:a.layoutBox)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=n(this.instance),this.scroll=r(this.instance))}resetTransform(){var s;if(!o)return;let a=this.isLayoutDirty||this.shouldResetTransform,f=this.projectionDelta&&!Qx(this.projectionDelta),d=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,h=d==null?void 0:d(this.latestValues,""),g=h!==this.prevTransformTemplateValue;a&&(f||Qo(this.latestValues)||g)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let a=this.measurePageBox(),f=this.removeElementScroll(a);return s&&(f=this.removeTransform(f)),EG(f),{measuredBox:a,layoutBox:f,latestValues:{}}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return st();let a=s.measureViewportBox(),{scroll:f}=this.root;return f&&(uo(a.x,f.x),uo(a.y,f.y)),a}removeElementScroll(s){let a=st();yn(a,s);for(let f=0;f<this.path.length;f++){let d=this.path[f],{scroll:h,options:g,isScrollRoot:v}=d;if(d!==this.root&&h&&g.layoutScroll){if(v){yn(a,s);let{scroll:b}=this.root;b&&(uo(a.x,-b.x),uo(a.y,-b.y))}uo(a.x,h.x),uo(a.y,h.y)}}return a}applyTransform(s,a=!1){let f=st();yn(f,s);for(let d=0;d<this.path.length;d++){let h=this.path[d];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&da(f,{x:-h.scroll.x,y:-h.scroll.y}),Qo(h.latestValues)&&da(f,h.latestValues)}return Qo(this.latestValues)&&da(f,this.latestValues),f}removeTransform(s){var a;let f=st();yn(f,s);for(let d=0;d<this.path.length;d++){let h=this.path[d];if(!h.instance||!Qo(h.latestValues))continue;$0(h.latestValues)&&h.updateSnapshot();let g=st(),v=h.measurePageBox();yn(g,v),Xx(f,h.latestValues,(a=h.snapshot)===null||a===void 0?void 0:a.layoutBox,g)}return Qo(this.latestValues)&&Xx(f,this.latestValues),f}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection()}setOptions(s){this.options=B(D(D({},this.options),s),{crossfade:s.crossfade!==void 0?s.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var s;let{layout:a,layoutId:f}=this.options;if(!(!this.layout||!(a||f))){if(!this.targetDelta&&!this.relativeTarget){let d=this.getClosestProjectingParent();d&&d.layout?(this.relativeParent=d,this.relativeTarget=st(),this.relativeTargetOrigin=st(),bc(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),yn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&((s=this.relativeParent)===null||s===void 0?void 0:s.target)?KA(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):yn(this.target,this.layout.layoutBox),Hx(this.target,this.targetDelta)):yn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;let d=this.getClosestProjectingParent();d&&Boolean(d.resumingFrom)===Boolean(this.resumingFrom)&&!d.options.layoutScroll&&d.target?(this.relativeParent=d,this.relativeTarget=st(),this.relativeTargetOrigin=st(),bc(this.relativeTargetOrigin,this.target,d.target),yn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||$0(this.parent.latestValues)||Vx(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var s;let{layout:a,layoutId:f}=this.options;if(this.isTreeAnimating=Boolean(((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||f))return;let d=this.getLead();yn(this.layoutCorrected,this.layout.layoutBox),lD(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==d);let{target:h}=d;if(!h)return;this.projectionDelta||(this.projectionDelta=wc(),this.projectionDeltaWithTransform=wc());let g=this.treeScale.x,v=this.treeScale.y,b=this.projectionTransform;vc(this.projectionDelta,this.layoutCorrected,h,this.latestValues),this.projectionTransform=t_(this.projectionDelta,this.treeScale),(this.projectionTransform!==b||this.treeScale.x!==g||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a,f,d;(f=(a=this.options).scheduleRender)===null||f===void 0||f.call(a),s&&((d=this.getStack())===null||d===void 0||d.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){var f;let d=this.snapshot,h=(d==null?void 0:d.latestValues)||{},g=D({},this.latestValues),v=wc();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!a;let b=st(),w=d==null?void 0:d.isShared,_=(((f=this.getStack())===null||f===void 0?void 0:f.members.length)||0)<=1,C=Boolean(w&&!_&&this.options.crossfade===!0&&!this.path.some(wG));this.animationProgress=0,this.mixTargetDelta=x=>{var S;let E=x/1e3;ZD(v.x,s.x,E),ZD(v.y,s.y,E),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((S=this.relativeParent)===null||S===void 0?void 0:S.layout)&&(bc(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bG(this.relativeTarget,this.relativeTargetOrigin,b,E)),w&&(this.animationValues=g,jD(g,h,this.latestValues,E,C,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(0)}startAnimation(s){var a,f;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((f=this.resumingFrom.currentAnimation)===null||f===void 0||f.stop()),this.pendingAnimation&&(qr.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Et.update(()=>{os.hasAnimatedSinceResize=!0,this.currentAnimation=LD(0,JD,B(D({},s),{onUpdate:d=>{var h;this.mixTargetDelta(d),(h=s.onUpdate)===null||h===void 0||h.call(s,d)},onComplete:()=>{var d;(d=s.onComplete)===null||d===void 0||d.call(s),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,JD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:a,target:f,layout:d,latestValues:h}=s;if(!(!a||!f||!d)){if(this!==s&&this.layout&&d&&rO(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||st();let g=Wt(this.layout.layoutBox.x);f.x.min=s.target.x.min,f.x.max=f.x.min+g;let v=Wt(this.layout.layoutBox.y);f.y.min=s.target.y.min,f.y.max=f.y.min+v}yn(a,f),da(a,h),vc(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(s,a){var f,d,h;this.sharedNodes.has(s)||this.sharedNodes.set(s,new K0),this.sharedNodes.get(s).add(a),a.promote({transition:(f=a.options.initialPromotionConfig)===null||f===void 0?void 0:f.transition,preserveFollowOpacity:(h=(d=a.options.initialPromotionConfig)===null||d===void 0?void 0:d.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(d,a)})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){var s;let{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;let{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:f}={}){let d=this.getStack();d&&d.promote(this,f),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetRotation(){let{visualElement:s}=this.options;if(!s)return;let a=!1,f={};for(let d=0;d<YD.length;d++){let h=YD[d],g="rotate"+h;!s.getStaticValue(g)||(a=!0,f[g]=s.getStaticValue(g),s.setStaticValue(g,0))}if(!!a){s==null||s.render();for(let d in f)s.setStaticValue(d,f[d]);s.scheduleRender()}}getProjectionStyles(s={}){var a,f,d;let h={};if(!this.instance||this.isSVG)return h;if(this.isVisible)h.visibility="";else return{visibility:"hidden"};let g=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,h.opacity="",h.pointerEvents=nc(s.pointerEvents)||"",h.transform=g?g(this.latestValues,""):"none",h;let v=this.getLead();if(!this.projectionDelta||!this.layout||!v.target){let C={};return this.options.layoutId&&(C.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,C.pointerEvents=nc(s.pointerEvents)||""),this.hasProjected&&!Qo(this.latestValues)&&(C.transform=g?g({},""):"none",this.hasProjected=!1),C}let b=v.animationValues||v.latestValues;this.applyTransformsToTarget(),h.transform=t_(this.projectionDeltaWithTransform,this.treeScale,b),g&&(h.transform=g(b,h.transform));let{x:w,y:_}=this.projectionDelta;h.transformOrigin=`${w.origin*100}% ${_.origin*100}% 0`,v.animationValues?h.opacity=v===this?(d=(f=b.opacity)!==null&&f!==void 0?f:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:h.opacity=v===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(let C in Ku){if(b[C]===void 0)continue;let{correct:x,applyTo:S}=Ku[C],E=x(b[C],v);if(S){let T=S.length;for(let A=0;A<T;A++)h[S[A]]=E}else h[C]=E}return this.options.layoutId&&(h.pointerEvents=v===this?nc(s.pointerEvents)||"":"none"),h}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(XD),this.root.sharedNodes.clear()}}}function fG(e){e.updateLayout()}function dG(e){var t,r,n;let o=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=e.layout,{animationType:a}=e.options;a==="size"?gn(v=>{let b=o.isShared?o.measuredBox[v]:o.layoutBox[v],w=Wt(b);b.min=i[v].min,b.max=b.min+w}):rO(a,o.layoutBox,i)&&gn(v=>{let b=o.isShared?o.measuredBox[v]:o.layoutBox[v],w=Wt(i[v]);b.max=b.min+w});let f=wc();vc(f,i,o.layoutBox);let d=wc();o.isShared?vc(d,e.applyTransform(s,!0),o.measuredBox):vc(d,i,o.layoutBox);let h=!Qx(f),g=!1;if(!e.resumeFrom){let v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){let{snapshot:b,layout:w}=v;if(b&&w){let _=st();bc(_,o.layoutBox,b.layoutBox);let C=st();bc(C,i,w.layoutBox),Zx(_,C)||(g=!0)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:o,delta:d,layoutDelta:f,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else e.isLead()&&((n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r));e.options.transition=void 0}function pG(e){e.clearSnapshot()}function XD(e){e.clearMeasurements()}function hG(e){let{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function QD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function mG(e){e.resolveTargetDelta()}function gG(e){e.calcProjection()}function yG(e){e.resetRotation()}function vG(e){e.removeLeadSnapshot()}function ZD(e,t,r){e.translate=Ce(t.translate,0,r),e.scale=Ce(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function eO(e,t,r,n){e.min=Ce(t.min,r.min,n),e.max=Ce(t.max,r.max,n)}function bG(e,t,r,n){eO(e.x,t.x,r.x,n),eO(e.y,t.y,r.y,n)}function wG(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var xG={duration:.45,ease:[.4,0,.1,1]};function _G(e,t){let r=e.root;for(let i=e.path.length-1;i>=0;i--)if(Boolean(e.path[i].instance)){r=e.path[i];break}let o=(r&&r!==e.root?r.instance:document).querySelector(`[data-projection-id="${t}"]`);o&&e.mount(o,!0)}function tO(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EG(e){tO(e.x),tO(e.y)}function rO(e,t,r){return e==="position"||e==="preserve-aspect"&&!GD(e_(t),e_(r),.2)}u();l();c();var nO=W0({attachResizeListener:(e,t)=>ra(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var r_={current:void 0},oO=W0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!r_.current){let e=new nO(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),r_.current=e}return r_.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")});var SG=D(D(D(D({},BA),wA),hD),MD),lt=$I((e,t)=>f4(e,t,SG,DD,oO));u();l();c();var Zo=N(z(),1),vn=N(z(),1);u();l();c();var ud=N(z(),1);u();l();c();var iO=N(z(),1);function Y0(){let e=(0,iO.useRef)(!1);return Zs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function sO(){let e=Y0(),[t,r]=(0,ud.useState)(0),n=(0,ud.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,ud.useCallback)(()=>Et.postRender(n),[n]),t]}u();l();c();var cd=N(z(),1),ld=N(z(),1);u();l();c();var Cc=N(z(),1),pa=N(z(),1),n_=class extends Cc.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function aO({children:e,isPresent:t}){let r=(0,pa.useId)(),n=(0,pa.useRef)(null),o=(0,pa.useRef)({width:0,height:0,top:0,left:0});return(0,pa.useInsertionEffect)(()=>{let{width:i,height:s,top:a,left:f}=o.current;if(t||!n.current||!i||!s)return;n.current.dataset.motionPopId=r;let d=document.createElement("style");return document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
|
|
23
|
+
[data-motion-pop-id="${r}"] {
|
|
24
|
+
position: absolute !important;
|
|
25
|
+
width: ${i}px !important;
|
|
26
|
+
height: ${s}px !important;
|
|
27
|
+
top: ${a}px !important;
|
|
28
|
+
left: ${f}px !important;
|
|
29
|
+
}
|
|
30
|
+
`),()=>{document.head.removeChild(d)}},[t]),Cc.createElement(n_,{isPresent:t,childRef:n,sizeRef:o},Cc.cloneElement(e,{ref:n}))}var J0=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:s})=>{let a=ns(CG),f=(0,ld.useId)(),d=(0,ld.useMemo)(()=>({id:f,initial:t,isPresent:r,custom:o,onExitComplete:h=>{a.set(h,!0);for(let g of a.values())if(!g)return;n&&n()},register:h=>(a.set(h,!1),()=>a.delete(h))}),i?void 0:[r]);return(0,ld.useMemo)(()=>{a.forEach((h,g)=>a.set(g,!1))},[r]),cd.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),s==="popLayout"&&(e=cd.createElement(aO,{isPresent:r},e)),cd.createElement(no.Provider,{value:d},e)};function CG(){return new Map}var Tc=e=>e.key||"";function TG(e,t){e.forEach(r=>{let n=Tc(r);t.set(n,r)})}function PG(e){let t=[];return vn.Children.forEach(e,r=>{(0,vn.isValidElement)(r)&&t.push(r)}),t}var Pc=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{o&&(s="wait",A0(!1,"Replace exitBeforeEnter with mode='wait'"));let[a]=sO(),f=(0,vn.useContext)(Hu).forceRender;f&&(a=f);let d=Y0(),h=PG(e),g=h,v=new Set,b=(0,vn.useRef)(g),w=(0,vn.useRef)(new Map).current,_=(0,vn.useRef)(!0);if(Zs(()=>{_.current=!1,TG(h,w),b.current=g}),oc(()=>{_.current=!0,w.clear(),v.clear()}),_.current)return Zo.createElement(Zo.Fragment,null,g.map(E=>Zo.createElement(J0,{key:Tc(E),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:s},E)));g=[...g];let C=b.current.map(Tc),x=h.map(Tc),S=C.length;for(let E=0;E<S;E++){let T=C[E];x.indexOf(T)===-1&&v.add(T)}return s==="wait"&&v.size&&(g=[]),v.forEach(E=>{if(x.indexOf(E)!==-1)return;let T=w.get(E);if(!T)return;let A=C.indexOf(E),O=()=>{w.delete(E),v.delete(E);let P=b.current.findIndex(I=>I.key===E);if(b.current.splice(P,1),!v.size){if(b.current=h,d.current===!1)return;a(),n&&n()}};g.splice(A,0,Zo.createElement(J0,{key:Tc(T),isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:i,mode:s},T))}),g=g.map(E=>{let T=E.key;return v.has(T)?E:Zo.createElement(J0,{key:Tc(E),isPresent:!0,presenceAffectsLayout:i,mode:s},E)}),cc!=="production"&&s==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),Zo.createElement(Zo.Fragment,null,v.size?g:g.map(E=>(0,vn.cloneElement)(E)))};u();l();c();var IG=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 33 32"}),p.createElement("path",{fill:"currentColor",d:"M30.7195 9.77312C29.9097 7.87434 28.7647 6.17103 27.2845 4.6911C25.8044 3.21117 24.1288 2.06632 22.2298 1.25654C20.247 0.418848 18.1525 0 16.0021 0C13.8238 0 11.7293 0.418848 9.7744 1.25654C7.87537 2.06632 6.17184 3.21117 4.69171 4.6911C3.21159 6.17103 2.06659 7.87434 1.25671 9.77312C0.418903 11.7277 0 13.822 0 16C0 18.1501 0.418903 20.2443 1.25671 22.2269C2.06659 24.1257 3.21159 25.829 4.69171 27.3089C6.17184 28.7888 7.87537 29.9337 9.7744 30.7155C11.7572 31.5532 13.8517 31.9721 16.0021 31.9721C18.1525 31.9721 20.247 31.5532 22.2298 30.7155C24.1288 29.9058 25.8323 28.7609 27.3125 27.281C28.7926 25.801 29.9376 24.0977 30.7475 22.1989C31.5853 20.2164 32.0042 18.1222 32.0042 15.9721C32.0042 13.822 31.5574 11.7277 30.7195 9.77312ZM10.696 14.4921C11.3383 11.9232 13.6842 10.0524 16.4489 10.0524H27.5638C28.2899 11.4206 28.7367 12.9284 28.9043 14.4921H10.696ZM28.9043 17.5079C28.7367 19.0716 28.262 20.5794 27.5638 21.9476H16.4489C13.6842 21.9476 11.3662 20.0489 10.696 17.5079H28.9043ZM6.81415 6.81326C9.27172 4.35602 12.5392 3.01571 16.0021 3.01571C19.465 3.01571 22.7325 4.35602 25.19 6.81326C25.2738 6.89703 25.3297 6.95288 25.4134 7.03665H16.4489C14.0472 7.03665 11.8131 7.95811 10.1095 9.66143C8.76903 11.0017 7.9033 12.6771 7.62403 14.4921H3.09988C3.435 11.5881 4.71964 8.9075 6.81415 6.81326ZM16.0021 28.9843C12.5392 28.9843 9.27172 27.644 6.81415 25.1867C4.71964 23.0925 3.435 20.3839 3.09988 17.5079H7.62403C7.93123 19.3229 8.79696 20.9983 10.1095 22.3386C11.8131 24.0419 14.0472 24.9633 16.4489 24.9633H25.4134C25.3297 25.0471 25.2738 25.103 25.19 25.1867C22.7325 27.644 19.465 28.9843 16.0021 28.9843Z"})),X0=IG;var AG=({qrData:e,showQR:t,setShowQR:r})=>{let n=Ru(),[o,i]=(0,Q0.useState)(!1),s=(0,Q0.useCallback)(()=>{var a;(0,uO.default)((a=e==null?void 0:e.default)!=null?a:""),i(!0),setTimeout(()=>i(!1),2e3)},[e]);return p.createElement(p.Fragment,null,(n=="desktop"||t)&&p.createElement(p.Fragment,null,p.createElement(Pc,null,o&&p.createElement(lt.div,{className:"text-9eafc0 text-sm",key:"copied",initial:"hidden",animate:"visible",exit:"hidden",variants:{visible:{y:0,opacity:1},hidden:{y:"100%",opacity:0},exit:{y:"100%",opacity:0,transition:{duration:.5}}},transition:{duration:.5,ease:"easeInOut"}},p.createElement("span",{className:"border-f1f5f8 rounded-lg border py-1 px-2 text-sm"},U("QR Code copied")))),p.createElement("div",{className:"border-f1f5f8 dark:border-f1f5f8/10 relative inline-flex items-center justify-center rounded-2xl border p-2"},p.createElement("div",{className:"text-29343f dark:text-white"},e?p.createElement("div",{onClick:s,className:"cursor-pointer"},p.createElement(bI,{data:e.default,size:244})):p.createElement("div",{className:"flex h-[244px] w-[244px] items-center justify-center"},p.createElement(Ki,{className:"h-[72px] w-[72px]"}))))),p.createElement("div",{className:"space-y-4"},p.createElement(lt.a,{whileTap:{scale:.95},whileHover:{scale:1.05},transition:{layout:{duration:.15}},layoutId:n=="desktop"?void 0:"worldid-button",href:e==null?void 0:e.mobile,className:wt("flex w-full space-x-2 items-center px-4 py-4 border border-transparent font-medium rounded-2xl shadow-sm","bg-0d151d dark:bg-white text-white dark:text-0d151d md:hidden")},p.createElement(X0,{className:"h-5 w-5"}),p.createElement(lt.span,{className:"flex-1 text-center",transition:{layout:{duration:.15}},layoutId:n=="desktop"?void 0:"worldid-text"},U("Open Worldcoin App"))),p.createElement("div",{className:"space-x-2 md:hidden"},p.createElement(lt.button,{className:"text-9eafc0 text-sm",onClick:()=>r(a=>!a)},t?U("Hide QR Code"):U("Show QR Code instead")),t&&p.createElement(p.Fragment,null,p.createElement("span",{className:"text-9eafc0"},"\xB7"),p.createElement("button",{className:"text-sm dark:text-white",onClick:s},o?U("Copied!"):U("Copy QR Code"))))))},cO=AG;var Ep=N(z(),1);u();l();c();u();l();c();var DG=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 14"}),p.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 0a3.555 3.555 0 0 0-3.563 3.547v.052A3.001 3.001 0 0 0 0 6.547V11a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V6.547a3.001 3.001 0 0 0-2.438-2.948v-.052A3.555 3.555 0 0 0 5.999 0Zm2.437 3.547A2.432 2.432 0 0 0 5.999 1.12a2.432 2.432 0 0 0-2.437 2.427h4.875ZM7.5 8.773c0 .825-.671 1.494-1.5 1.494-.828 0-1.5-.669-1.5-1.494 0-.824.672-1.493 1.5-1.493.829 0 1.5.669 1.5 1.493Z",clipRule:"evenodd"})),lO=DG;u();l();c();var OG=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 14"}),p.createElement("path",{fill:"currentColor",d:"M9.98 3.6c-.08-.345-.392-.553-.732-.477-.093.021-2.59.754-4.236.768C3.36 3.877.87 3.144.776 3.123a.629.629 0 0 0-.76.477.64.64 0 0 0 .467.767c.433.111 1.139.318 2.83.72 0 0-.02 2.28-.093 3.663-.1 1.99-.672 4.424-.672 4.424-.1.463.126.74.406.801.573.125.76-.276.826-.56l1.092-4.16A.128.128 0 0 1 5 9.164c.053 0 .106.027.126.09l1.093 4.16c.066.284.253.685.825.56.28-.062.507-.338.407-.801 0 0-.566-2.433-.673-4.424-.073-1.383-.093-3.664-.093-3.664 1.698-.4 2.398-.608 2.83-.719a.637.637 0 0 0 .467-.767Z"}),p.createElement("path",{fill:"currentColor",d:"M5.007 3.11a1.55 1.55 0 0 0 1.539-1.555C6.546.698 5.86 0 5.007 0A1.55 1.55 0 0 0 3.47 1.555c0 .857.686 1.555 1.538 1.555Z"})),fO=OG;var RG=({className:e})=>p.createElement("div",{className:wt(e,"space-y-4 text-left")},p.createElement("p",{className:"text-0d151d text-sm font-medium uppercase dark:text-white"},U("What is World ID?")),p.createElement("div",{className:"space-y-3"},p.createElement(dO,{title:"Your global digital ID",icon:fO},p.createElement("p",null,U("With Worldcoin and World ID sign in seamlessly and prove you are a unique human."))),p.createElement(dO,{title:"Privacy-preserving",icon:lO},p.createElement("p",null,U("Maximum privacy. Prevents cross-tracking and can be used fully anonymously."))))),dO=({icon:e,title:t,children:r})=>p.createElement("div",{className:"flex space-x-6"},p.createElement("div",{className:"bg-d3dfea/30 dark:bg-29343f flex aspect-square h-8 w-8 items-center justify-center rounded-full"},p.createElement(e,{className:"text-0d151d h-3 w-3 dark:text-white"})),p.createElement("div",null,p.createElement("p",{className:"text-0d151d font-medium dark:text-white"},t),p.createElement("div",{className:"text-9eafc0 dark:text-9eafc0 mt-[2px] text-sm font-normal"},r))),Ic=RG;u();l();c();u();l();c();function o_(e,t){let r=new window.URL("https://worldcoin.org/verify");return r.searchParams.append("w",e),t&&r.searchParams.append("r",t),r.toString()}var ov=N(z(),1);u();l();c();var pO="c3e6053f10efbb423808783ee874cf6a";u();l();c();var Xk=N(tg());u();l();c();var fi=N(ha()),RE=N(tg()),Mk=N(rR()),ul=N(bR()),$e=N(C_());u();l();c();h_();var CR=N(ha()),wg=class extends lo{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}};var xg=class extends lo{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}},_g=class{constructor(t,r){this.logger=t,this.core=r}},Eg=class extends lo{constructor(t,r){super(),this.relayer=t,this.logger=r}},Sg=class extends lo{constructor(t){super()}},Cg=class{constructor(t,r,n,o){this.core=t,this.logger=r,this.name=n}};var Tg=class extends lo{constructor(t,r){super(),this.relayer=t,this.logger=r}};var Pg=class extends lo{constructor(t,r){super(),this.core=t,this.logger=r}};var Ig=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}};var Ag=class{constructor(t){this.client=t}};u();l();c();var yW=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),vW=e=>{let t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function yd(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return vW(e)}catch{return e}}function jc(e){return typeof e=="string"?e:yW(e)||""}u();l();c();u();l();c();var Cd=N(rN()),kN=N(zc()),MN=N(us());u();l();c();var nN="EdDSA",oN="JWT",z_=".",H_="base64url",iN="utf8",sN="utf8",aN=":",uN="did",cN="key",q_="base58btc",lN="z",fN="K36";u();l();c();u();l();c();u();l();c();function wd(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function va(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));let r=wd(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}u();l();c();u();l();c();u();l();c();var J_={};Xt(J_,{identity:()=>vY});u();l();c();u();l();c();u();l();c();function pY(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(r[s]!==255)throw new TypeError(i+" is ambiguous");r[s]=o}var a=e.length,f=e.charAt(0),d=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function g(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var _=0,C=0,x=0,S=w.length;x!==S&&w[x]===0;)x++,_++;for(var E=(S-x)*h+1>>>0,T=new Uint8Array(E);x!==S;){for(var A=w[x],O=0,P=E-1;(A!==0||O<C)&&P!==-1;P--,O++)A+=256*T[P]>>>0,T[P]=A%a>>>0,A=A/a>>>0;if(A!==0)throw new Error("Non-zero carry");C=O,x++}for(var I=E-C;I!==E&&T[I]===0;)I++;for(var R=f.repeat(_);I<E;++I)R+=e.charAt(T[I]);return R}function v(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var _=0;if(w[_]!==" "){for(var C=0,x=0;w[_]===f;)C++,_++;for(var S=(w.length-_)*d+1>>>0,E=new Uint8Array(S);w[_];){var T=r[w.charCodeAt(_)];if(T===255)return;for(var A=0,O=S-1;(T!==0||A<x)&&O!==-1;O--,A++)T+=a*E[O]>>>0,E[O]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");x=A,_++}if(w[_]!==" "){for(var P=S-x;P!==S&&E[P]===0;)P++;for(var I=new Uint8Array(C+(S-P)),R=C;P!==S;)I[R++]=E[P++];return I}}}function b(w){var _=v(w);if(_)return _;throw new Error(`Non-${t} character`)}return{encode:g,decodeUnsafe:v,decode:b}}var hY=pY,mY=hY,dN=mY;u();l();c();var Bxe=new Uint8Array(0);var pN=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},ti=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};var hN=e=>new TextEncoder().encode(e),mN=e=>new TextDecoder().decode(e);var K_=class{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},G_=class{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return yN(this,t)}},W_=class{constructor(t){this.decoders=t}or(t){return yN(this,t)}decode(t){let r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},yN=(e,t)=>new W_(D(D({},e.decoders||{[e.prefix]:e}),t.decoders||{[t.prefix]:t})),Y_=class{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new K_(t,r,n),this.decoder=new G_(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}},Gc=({name:e,prefix:t,encode:r,decode:n})=>new Y_(e,t,r,n),ls=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:o}=dN(r,t);return Gc({prefix:e,name:t,encode:n,decode:i=>ti(o(i))})},gY=(e,t,r,n)=>{let o={};for(let h=0;h<t.length;++h)o[t[h]]=h;let i=e.length;for(;e[i-1]==="=";)--i;let s=new Uint8Array(i*r/8|0),a=0,f=0,d=0;for(let h=0;h<i;++h){let g=o[e[h]];if(g===void 0)throw new SyntaxError(`Non-${n} character`);f=f<<r|g,a+=r,a>=8&&(a-=8,s[d++]=255&f>>a)}if(a>=r||255&f<<8-a)throw new SyntaxError("Unexpected end of data");return s},yY=(e,t,r)=>{let n=t[t.length-1]==="=",o=(1<<r)-1,i="",s=0,a=0;for(let f=0;f<e.length;++f)for(a=a<<8|e[f],s+=8;s>r;)s-=r,i+=t[o&a>>s];if(s&&(i+=t[o&a<<r-s]),n)for(;i.length*r&7;)i+="=";return i},ft=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Gc({prefix:t,name:e,encode(o){return yY(o,n,r)},decode(o){return gY(o,n,r,e)}});var vY=Gc({prefix:"\0",name:"identity",encode:e=>mN(e),decode:e=>hN(e)});var X_={};Xt(X_,{base2:()=>bY});u();l();c();var bY=ft({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Q_={};Xt(Q_,{base8:()=>wY});u();l();c();var wY=ft({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Z_={};Xt(Z_,{base10:()=>xY});u();l();c();var xY=ls({prefix:"9",name:"base10",alphabet:"0123456789"});var e2={};Xt(e2,{base16:()=>_Y,base16upper:()=>EY});u();l();c();var _Y=ft({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),EY=ft({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var t2={};Xt(t2,{base32:()=>Wc,base32hex:()=>PY,base32hexpad:()=>AY,base32hexpadupper:()=>DY,base32hexupper:()=>IY,base32pad:()=>CY,base32padupper:()=>TY,base32upper:()=>SY,base32z:()=>OY});u();l();c();var Wc=ft({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),SY=ft({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),CY=ft({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),TY=ft({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),PY=ft({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),IY=ft({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),AY=ft({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),DY=ft({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),OY=ft({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var r2={};Xt(r2,{base36:()=>RY,base36upper:()=>NY});u();l();c();var RY=ls({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),NY=ls({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var n2={};Xt(n2,{base58btc:()=>fo,base58flickr:()=>kY});u();l();c();var fo=ls({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kY=ls({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var o2={};Xt(o2,{base64:()=>MY,base64pad:()=>LY,base64url:()=>FY,base64urlpad:()=>$Y});u();l();c();var MY=ft({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),LY=ft({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),FY=ft({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$Y=ft({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var i2={};Xt(i2,{base256emoji:()=>zY});u();l();c();var vN=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),BY=vN.reduce((e,t,r)=>(e[r]=t,e),[]),UY=vN.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function jY(e){return e.reduce((t,r)=>(t+=BY[r],t),"")}function VY(e){let t=[];for(let r of e){let n=UY[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}var zY=Gc({prefix:"\u{1F680}",name:"base256emoji",encode:jY,decode:VY});var c2={};Xt(c2,{sha256:()=>uJ,sha512:()=>cJ});u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();var HY=xN,bN=128,qY=127,KY=~qY,GY=Math.pow(2,31);function xN(e,t,r){t=t||[],r=r||0;for(var n=r;e>=GY;)t[r++]=e&255|bN,e/=128;for(;e&KY;)t[r++]=e&255|bN,e>>>=7;return t[r]=e|0,xN.bytes=r-n+1,t}var WY=s2,YY=128,wN=127;function s2(e,n){var r=0,n=n||0,o=0,i=n,s,a=e.length;do{if(i>=a)throw s2.bytes=0,new RangeError("Could not decode varint");s=e[i++],r+=o<28?(s&wN)<<o:(s&wN)*Math.pow(2,o),o+=7}while(s>=YY);return s2.bytes=i-n,r}var JY=Math.pow(2,7),XY=Math.pow(2,14),QY=Math.pow(2,21),ZY=Math.pow(2,28),eJ=Math.pow(2,35),tJ=Math.pow(2,42),rJ=Math.pow(2,49),nJ=Math.pow(2,56),oJ=Math.pow(2,63),iJ=function(e){return e<JY?1:e<XY?2:e<QY?3:e<ZY?4:e<eJ?5:e<tJ?6:e<rJ?7:e<nJ?8:e<oJ?9:10},sJ={encode:HY,decode:WY,encodingLength:iJ},aJ=sJ,xd=aJ;var _d=(e,t=0)=>[xd.decode(e,t),xd.decode.bytes],Yc=(e,t,r=0)=>(xd.encode(e,t,r),t),Jc=e=>xd.encodingLength(e);var ba=(e,t)=>{let r=t.byteLength,n=Jc(e),o=n+Jc(r),i=new Uint8Array(o+r);return Yc(e,i,0),Yc(r,i,n),i.set(t,o),new Xc(e,r,t,i)},_N=e=>{let t=ti(e),[r,n]=_d(t),[o,i]=_d(t.subarray(n)),s=t.subarray(n+i);if(s.byteLength!==o)throw new Error("Incorrect length");return new Xc(r,o,s,t)},EN=(e,t)=>e===t?!0:e.code===t.code&&e.size===t.size&&pN(e.bytes,t.bytes),Xc=class{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}};var u2=({name:e,code:t,encode:r})=>new a2(e,t,r),a2=class{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?ba(this.code,r):r.then(n=>ba(this.code,n))}else throw Error("Unknown type, must be binary type")}};var CN=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),uJ=u2({name:"sha2-256",code:18,encode:CN("SHA-256")}),cJ=u2({name:"sha2-512",code:19,encode:CN("SHA-512")});var l2={};Xt(l2,{identity:()=>dJ});u();l();c();var TN=0,lJ="identity",PN=ti,fJ=e=>ba(TN,PN(e)),dJ={code:TN,name:lJ,encode:PN,digest:fJ};u();l();c();u();l();c();var s_e=new TextEncoder,a_e=new TextDecoder;u();l();c();u();l();c();var Dt=class{constructor(t,r,n,o){this.code=r,this.version=t,this.multihash=n,this.bytes=o,this.byteOffset=o.byteOffset,this.byteLength=o.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Fg,byteLength:Fg,code:Lg,version:Lg,multihash:Lg,bytes:Lg,_baseCache:Fg,asCID:Fg})}toV0(){switch(this.version){case 0:return this;default:{let{code:t,multihash:r}=this;if(t!==Sd)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==vJ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Dt.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:t,digest:r}=this.multihash,n=ba(t,r);return Dt.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&EN(this.multihash,t.multihash)}toString(t){let{bytes:r,version:n,_baseCache:o}=this;switch(n){case 0:return gJ(r,o,t||fo.encoder);default:return yJ(r,o,t||Wc.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return wJ(/^0\.0/,xJ),!!(t&&(t[AN]||t.asCID===t))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof Dt)return t;if(t!=null&&t.asCID===t){let{version:r,code:n,multihash:o,bytes:i}=t;return new Dt(r,n,o,i||IN(r,n,o.bytes))}else if(t!=null&&t[AN]===!0){let{version:r,multihash:n,code:o}=t,i=_N(n);return Dt.create(r,o,i)}else return null}static create(t,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(t){case 0:{if(r!==Sd)throw new Error(`Version 0 CID must use dag-pb (code: ${Sd}) block encoding`);return new Dt(t,r,n,n.bytes)}case 1:{let o=IN(t,r,n.bytes);return new Dt(t,r,n,o)}default:throw new Error("Invalid version")}}static createV0(t){return Dt.create(0,Sd,t)}static createV1(t,r){return Dt.create(1,t,r)}static decode(t){let[r,n]=Dt.decodeFirst(t);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(t){let r=Dt.inspectBytes(t),n=r.size-r.multihashSize,o=ti(t.subarray(n,n+r.multihashSize));if(o.byteLength!==r.multihashSize)throw new Error("Incorrect length");let i=o.subarray(r.multihashSize-r.digestSize),s=new Xc(r.multihashCode,r.digestSize,i,o);return[r.version===0?Dt.createV0(s):Dt.createV1(r.codec,s),t.subarray(r.size)]}static inspectBytes(t){let r=0,n=()=>{let[g,v]=_d(t.subarray(r));return r+=v,g},o=n(),i=Sd;if(o===18?(o=0,r=0):o===1&&(i=n()),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let s=r,a=n(),f=n(),d=r+f,h=d-s;return{version:o,codec:i,multihashCode:a,digestSize:f,multihashSize:h,size:d}}static parse(t,r){let[n,o]=mJ(t,r),i=Dt.decode(o);return i._baseCache.set(n,t),i}},mJ=(e,t)=>{switch(e[0]){case"Q":{let r=t||fo;return[fo.prefix,r.decode(`${fo.prefix}${e}`)]}case fo.prefix:{let r=t||fo;return[fo.prefix,r.decode(e)]}case Wc.prefix:{let r=t||Wc;return[Wc.prefix,r.decode(e)]}default:{if(t==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}}},gJ=(e,t,r)=>{let{prefix:n}=r;if(n!==fo.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let o=t.get(n);if(o==null){let i=r.encode(e).slice(1);return t.set(n,i),i}else return o},yJ=(e,t,r)=>{let{prefix:n}=r,o=t.get(n);if(o==null){let i=r.encode(e);return t.set(n,i),i}else return o},Sd=112,vJ=18,IN=(e,t,r)=>{let n=Jc(e),o=n+Jc(t),i=new Uint8Array(o+r.byteLength);return Yc(e,i,0),Yc(t,i,n),i.set(r,o),i},AN=Symbol.for("@ipld/js-cid/CID"),Lg={writable:!1,configurable:!1,enumerable:!0},Fg={writable:!1,enumerable:!1,configurable:!1},bJ="0.0.0-dev",wJ=(e,t)=>{if(e.test(bJ))console.warn(t);else throw new Error(t)},xJ=`CID.isCID(v) is deprecated and will be removed in the next major release.
|
|
31
|
+
Following code pattern:
|
|
32
|
+
|
|
33
|
+
if (CID.isCID(value)) {
|
|
34
|
+
doSomethingWithCID(value)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Is replaced with:
|
|
38
|
+
|
|
39
|
+
const cid = CID.asCID(value)
|
|
40
|
+
if (cid) {
|
|
41
|
+
// Make sure to use cid instead of value
|
|
42
|
+
doSomethingWithCID(cid)
|
|
43
|
+
}
|
|
44
|
+
`;var f2=D(D(D(D(D(D(D(D(D(D({},J_),X_),Q_),Z_),e2),t2),r2),n2),o2),i2),m_e=D(D({},c2),l2);function ON(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var DN=ON("utf8","u",e=>{let t=new TextDecoder("utf8");return"u"+t.decode(e)},e=>new TextEncoder().encode(e.substring(1))),d2=ON("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=wd(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),_J=D({utf8:DN,"utf-8":DN,hex:f2.base16,latin1:d2,ascii:d2,binary:d2},f2),$g=_J;function Ut(e,t="utf8"){let r=$g[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}u();l();c();function jt(e,t="utf8"){let r=$g[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function Bg(e){return Ut(jt(jc(e),iN),H_)}function Ug(e){let t=jt(fN,q_),r=lN+Ut(va([t,e]),q_);return[uN,cN,r].join(aN)}function EJ(e){return Ut(e,H_)}function RN(e){return jt([Bg(e.header),Bg(e.payload)].join(z_),sN)}function NN(e){return[Bg(e.header),Bg(e.payload),EJ(e.signature)].join(z_)}function p2(e=(0,kN.randomBytes)(32)){return Cd.generateKeyPairFromSeed(e)}async function LN(e,t,r,n,o=(0,MN.fromMiliseconds)(Date.now())){let i={alg:nN,typ:oN},s=Ug(n.publicKey),a=o+r,f={iss:s,sub:e,aud:t,iat:o,exp:a},d=RN({header:i,payload:f}),h=Cd.sign(n.secretKey,d);return NN({header:i,payload:f,signature:h})}u();l();c();u();l();c();var O2=N(m2()),N9=N(v2()),R2=N(zc()),Od=N(w2()),Xg=N(E2());u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();var ZN=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},eX=function(){function e(t,r,n){this.name=t,this.version=r,this.os=n,this.type="browser"}return e}();var tX=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}();var rX=function(){function e(t,r,n,o){this.name=t,this.version=r,this.os=n,this.bot=o,this.type="bot-device"}return e}();var nX=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}();var oX=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}();var iX=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,sX=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,e9=3,aX=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",iX]],t9=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function n9(e){return e?r9(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oX:typeof navigator<"u"?r9(navigator.userAgent):lX()}function uX(e){return e!==""&&aX.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function r9(e){var t=uX(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new nX;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<e9&&(o=ZN(ZN([],o,!0),fX(e9-o.length),!0)):o=[];var i=o.join("."),s=cX(e),a=sX.exec(e);return a&&a[1]?new rX(r,i,s,a[1]):new eX(r,i,s)}function cX(e){for(var t=0,r=t9.length;t<r;t++){var n=t9[t],o=n[0],i=n[1],s=i.exec(e);if(s)return o}return null}function lX(){var e=typeof process<"u"&&process.version;return e?new tX(process.version.slice(1)):null}function fX(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var si=N(us()),xa=N(Yg()),k9=N(S2()),el=N(P2());u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();var I2={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};var M9="base10",Mr="base16",A2="base64pad",N2="utf8",L9=0,ai=1,RX=0,E9=1,D2=12,k2=32;function F9(){let e=Xg.generateKeyPair();return{privateKey:Ut(e.secretKey,Mr),publicKey:Ut(e.publicKey,Mr)}}function Qg(){let e=(0,R2.randomBytes)(k2);return Ut(e,Mr)}function $9(e,t){let r=Xg.sharedKey(jt(e,Mr),jt(t,Mr)),n=new N9.HKDF(Od.SHA256,r).expand(k2);return Ut(n,Mr)}function B9(e){let t=(0,Od.hash)(jt(e,Mr));return Ut(t,Mr)}function Zg(e){let t=(0,Od.hash)(jt(e,N2));return Ut(t,Mr)}function NX(e){return jt(`${e}`,M9)}function tl(e){return Number(Ut(e,M9))}function U9(e){let t=NX(typeof e.type<"u"?e.type:L9);if(tl(t)===ai&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");let r=typeof e.senderPublicKey<"u"?jt(e.senderPublicKey,Mr):void 0,n=typeof e.iv<"u"?jt(e.iv,Mr):(0,R2.randomBytes)(D2),o=new O2.ChaCha20Poly1305(jt(e.symKey,Mr)).seal(n,jt(e.message,N2));return kX({type:t,sealed:o,iv:n,senderPublicKey:r})}function j9(e){let t=new O2.ChaCha20Poly1305(jt(e.symKey,Mr)),{sealed:r,iv:n}=ey(e.encoded),o=t.open(n,r);if(o===null)throw new Error("Failed to decrypt");return Ut(o,N2)}function kX(e){if(tl(e.type)===ai){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Ut(va([e.type,e.senderPublicKey,e.iv,e.sealed]),A2)}return Ut(va([e.type,e.iv,e.sealed]),A2)}function ey(e){let t=jt(e,A2),r=t.slice(RX,E9),n=E9;if(tl(r)===ai){let a=n+k2,f=a+D2,d=t.slice(n,a),h=t.slice(a,f),g=t.slice(f);return{type:r,sealed:g,iv:h,senderPublicKey:d}}let o=n+D2,i=t.slice(n,o),s=t.slice(o);return{type:r,sealed:s,iv:i}}function V9(e,t){let r=ey(e);return M2({type:tl(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Ut(r.senderPublicKey,Mr):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function M2(e){let t=(e==null?void 0:e.type)||L9;if(t===ai){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function L2(e){return e.type===ai&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var MX=Object.defineProperty,S9=Object.getOwnPropertySymbols,LX=Object.prototype.hasOwnProperty,FX=Object.prototype.propertyIsEnumerable,C9=(e,t,r)=>t in e?MX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T9=(e,t)=>{for(var r in t||(t={}))LX.call(t,r)&&C9(e,r,t[r]);if(S9)for(var r of S9(t))FX.call(t,r)&&C9(e,r,t[r]);return e},$X="ReactNative",Dd={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};var BX="js";function z9(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function UX(){return!(0,xa.getDocument)()&&!!(0,xa.getNavigator)()&&navigator.product===$X}function jX(){return!z9()&&!!(0,xa.getNavigator)()}function VX(){return UX()?Dd.reactNative:z9()?Dd.node:jX()?Dd.browser:Dd.unknown}function zX(e,t){let r=el.parse(e);return r=T9(T9({},r),t),e=el.stringify(r),e}function H9(){return(0,k9.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function HX(){let e=n9();if(e===null)return"unknown";let t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function qX(){var e;let t=VX();return t===Dd.browser?[t,((e=(0,xa.getLocation)())==null?void 0:e.host)||"unknown"].join(":"):t}function KX(e,t,r){let n=HX(),o=qX();return[[e,t].join("-"),[BX,r].join("-"),n,o].join("/")}function q9({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:o,projectId:i}){let s=r.split("?"),a=KX(e,t,n),f={auth:o,ua:a,projectId:i},d=zX(s[1]||"",f);return s[0]+"?"+d}function kr(e,t){return e.filter(r=>t.includes(r)).length===e.length}function F2(e){return Object.fromEntries(e.entries())}function $2(e){return new Map(Object.entries(e))}function Bn(e,t){return(0,si.fromMiliseconds)((t||Date.now())+(0,si.toMiliseconds)(e))}function go(e){return(0,si.fromMiliseconds)(Date.now())>=(0,si.toMiliseconds)(e)}function ui(){let e=(0,si.toMiliseconds)(si.FIVE_MINUTES),t,r,n;return{resolve:o=>{n&&t&&(clearTimeout(n),t(o))},reject:o=>{n&&r&&(clearTimeout(n),r(o))},done:()=>new Promise((o,i)=>{n=setTimeout(i,e),t=o,r=i})}}function B2(e,t){return new Promise(async(r,n)=>{let o=setTimeout(()=>n(),t),i=await e;clearTimeout(o),r(i)})}function K9(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function G9(e){return K9("topic",e)}function W9(e){return K9("id",e)}function ty(e){let[t,r]=e.split(":"),n={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")n.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function at(e,t){return`${e}${t?`:${t}`:""}`}var GX="irn";function ry(e){return(e==null?void 0:e.relay)||{protocol:GX}}function ny(e){let t=I2[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var WX=Object.defineProperty,P9=Object.getOwnPropertySymbols,YX=Object.prototype.hasOwnProperty,JX=Object.prototype.propertyIsEnumerable,I9=(e,t,r)=>t in e?WX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XX=(e,t)=>{for(var r in t||(t={}))YX.call(t,r)&&I9(e,r,t[r]);if(P9)for(var r of P9(t))JX.call(t,r)&&I9(e,r,t[r]);return e};function QX(e,t="-"){let r={},n="relay"+t;return Object.keys(e).forEach(o=>{if(o.startsWith(n)){let i=o.replace(n,""),s=e[o];r[i]=s}}),r}function Y9(e){let t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,t),o=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",s=el.parse(i);return{protocol:n,topic:o[0],version:parseInt(o[1],10),symKey:s.symKey,relay:QX(s)}}function ZX(e,t="-"){let r="relay",n={};return Object.keys(e).forEach(o=>{let i=r+t+o;e[o]&&(n[i]=e[o])}),n}function J9(e){return`${e.protocol}:${e.topic}@${e.version}?`+el.stringify(XX({symKey:e.symKey},ZX(e.relay)))}function mo(e){let t=[];return e.forEach(r=>{let[n,o]=r.split(":");t.push(`${n}:${o}`)}),t}function eQ(e){let t=[];return Object.values(e).forEach(r=>{t.push(...mo(r.accounts)),r.extension&&r.extension.forEach(n=>{t.push(...mo(n.accounts))})}),t}function tQ(e,t){let r=[];return Object.values(e).forEach(n=>{mo(n.accounts).includes(t)&&r.push(...n.methods),n.extension&&n.extension.forEach(o=>{mo(o.accounts).includes(t)&&r.push(...o.methods)})}),r}function rQ(e,t){let r=[];return Object.values(e).forEach(n=>{mo(n.accounts).includes(t)&&r.push(...n.events),n.extension&&n.extension.forEach(o=>{mo(o.accounts).includes(t)&&r.push(...o.events)})}),r}function X9(e,t){let r=kd(e,t);if(r)throw new Error(r.message);let n={};for(let[o,i]of Object.entries(e))n[o]={methods:i.methods,events:i.events,chains:i.accounts.map(s=>`${s.split(":")[0]}:${s.split(":")[1]}`)};return n}var nQ={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},oQ={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function W(e,t){let{message:r,code:n}=oQ[e];return{message:t?`${r} ${t}`:r,code:n}}function St(e,t){let{message:r,code:n}=nQ[e];return{message:t?`${r} ${t}`:r,code:n}}function Rd(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function Nd(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function yr(e){return typeof e>"u"}function Ot(e,t){return t&&yr(e)?!0:typeof e=="string"&&Boolean(e.trim().length)}function Q9(e,t){return t&&yr(e)?!0:typeof e=="number"&&!isNaN(e)}function Z9(e,t){let{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),o=Object.keys(r),i=!0;return kr(o,n)?(n.forEach(s=>{let{accounts:a,methods:f,events:d,extension:h}=e.namespaces[s],g=mo(a),v=r[s];(!kr(v.chains,g)||!kr(v.methods,f)||!kr(v.events,d))&&(i=!1),i&&h&&h.forEach(b=>{var w;let{accounts:_,methods:C,events:x}=b,S=mo(_);(w=v.extension)!=null&&w.find(E=>kr(E.chains,S)&&kr(E.methods,C)&&kr(E.events,x))||(i=!1)})}),i):!1}function U2(e){return Ot(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function iQ(e){if(Ot(e,!1)&&e.includes(":")){let t=e.split(":");if(t.length===3){let r=t[0]+":"+t[1];return!!t[2]&&U2(r)}}return!1}function e7(e){if(Ot(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function t7(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function r7(e){return e==null?void 0:e.topic}function n7(e,t){let r=null;return Ot(e==null?void 0:e.publicKey,!1)||(r=W("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function j2(e,t){let r=null;return yr(e==null?void 0:e.extension)||(!Rd(e.extension)||!e.extension.length)&&(r=W("MISSING_OR_INVALID",`${t} extension should be an array of namespaces, or omitted`)),r}function A9(e){let t=!0;return Rd(e)?e.length&&(t=e.every(r=>Ot(r,!1))):t=!1,t}function D9(e,t,r){let n=null;return Rd(t)?t.forEach(o=>{n||(!U2(o)||!o.includes(e))&&(n=St("UNSUPPORTED_CHAINS",`${r}, chain ${o} should be a string and conform to "namespace:chainId" format`))}):n=St("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),n}function sQ(e,t){let r=null;return Object.entries(e).forEach(([n,o])=>{if(r)return;let i=D9(n,o==null?void 0:o.chains,`${t} requiredNamespace`),s=j2(o,t);i?r=i:s?r=s:o.extension&&o.extension.forEach(a=>{if(r)return;let f=D9(n,a.chains,`${t} extension`);f&&(r=f)})}),r}function O9(e,t){let r=null;return Rd(e)?e.forEach(n=>{r||iQ(n)||(r=St("UNSUPPORTED_ACCOUNTS",`${t}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=St("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function aQ(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;let o=O9(n==null?void 0:n.accounts,`${t} namespace`),i=j2(n,t);o?r=o:i?r=i:n.extension&&n.extension.forEach(s=>{if(r)return;let a=O9(s.accounts,`${t} extension`);a&&(r=a)})}),r}function R9(e,t){let r=null;return A9(e==null?void 0:e.methods)?A9(e==null?void 0:e.events)||(r=St("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=St("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function o7(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;let o=R9(n,`${t}, namespace`),i=j2(n,t);o?r=o:i?r=i:n.extension&&n.extension.forEach(s=>{if(r)return;let a=R9(s,`${t}, extension`);a&&(r=a)})}),r}function i7(e,t){let r=null;if(e&&Nd(e)){let n=o7(e,t);n&&(r=n);let o=sQ(e,t);o&&(r=o)}else r=W("MISSING_OR_INVALID",`${t}, requiredNamespaces should be an object with data`);return r}function kd(e,t){let r=null;if(e&&Nd(e)){let n=o7(e,t);n&&(r=n);let o=aQ(e,t);o&&(r=o)}else r=W("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function V2(e){return Ot(e.protocol,!0)}function s7(e,t){let r=!1;return t&&!e?r=!0:e&&Rd(e)&&e.length&&e.forEach(n=>{r=V2(n)}),r}function a7(e){return typeof e=="number"}function cr(e){return typeof e<"u"&&typeof e!==null}function u7(e){return!(!e||typeof e!="object"||!e.code||!Q9(e.code,!1)||!e.message||!Ot(e.message,!1))}function c7(e){return!(yr(e)||!Ot(e.method,!1))}function l7(e){return!(yr(e)||yr(e.result)&&yr(e.error)||!Q9(e.id,!1)||!Ot(e.jsonrpc,!1))}function f7(e){return!(yr(e)||!Ot(e.name,!1))}function z2(e,t){return!(!U2(t)||!eQ(e).includes(t))}function d7(e,t,r){return Ot(r,!1)?tQ(e,t).includes(r):!1}function p7(e,t,r){return Ot(r,!1)?rQ(e,t).includes(r):!1}function H2(e,t,r){let n=null,o=Object.keys(e),i=Object.keys(t);return kr(o,i)?o.forEach(s=>{var a;if(n)return;let f=e[s].chains,d=mo(t[s].accounts);kr(f,d)?kr(e[s].methods,t[s].methods)?kr(e[s].events,t[s].events)?e[s].extension&&!t[s].extension?n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces extension doesn't satisfy requiredNamespaces extension for ${s}`):e[s].extension&&t[s].extension&&((a=e[s].extension)==null||a.forEach(({methods:h,events:g,chains:v})=>{var b;n||(b=t[s].extension)!=null&&b.find(w=>{let _=mo(w.accounts);return kr(v,_)&&kr(g,w.events)&&kr(h,w.methods)})||(n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces extension doesn't satisfy requiredNamespaces extension for ${s}`))})):n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy requiredNamespaces events for ${s}`):n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy requiredNamespaces methods for ${s}`):n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy requiredNamespaces chains for ${s}`)}):n=W("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces`),n}var Je=N(us());u();l();c();u();l();c();var A7=N(ha());var Rt={};Xt(Rt,{DEFAULT_ERROR:()=>Ld,IBaseJsonRpcProvider:()=>dy,IEvents:()=>nl,IJsonRpcConnection:()=>X2,IJsonRpcProvider:()=>Fd,INTERNAL_ERROR:()=>oy,INVALID_PARAMS:()=>y7,INVALID_REQUEST:()=>m7,METHOD_NOT_FOUND:()=>g7,PARSE_ERROR:()=>h7,RESERVED_ERROR_CODES:()=>q2,SERVER_ERROR:()=>Md,SERVER_ERROR_CODE_RANGE:()=>iy,STANDARD_ERROR_MAP:()=>ds,formatErrorMessage:()=>P7,formatJsonRpcError:()=>_a,formatJsonRpcRequest:()=>ms,formatJsonRpcResult:()=>rl,getBigIntRpcId:()=>J2,getError:()=>ay,getErrorByCode:()=>uy,isHttpUrl:()=>vQ,isJsonRpcError:()=>vr,isJsonRpcPayload:()=>Z2,isJsonRpcRequest:()=>ol,isJsonRpcResponse:()=>Ea,isJsonRpcResult:()=>wn,isJsonRpcValidationInvalid:()=>bQ,isLocalhostUrl:()=>Q2,isNodeJs:()=>T7,isReservedErrorCode:()=>sy,isServerErrorCode:()=>uQ,isValidDefaultRoute:()=>ly,isValidErrorCode:()=>v7,isValidLeadingWildcardRoute:()=>pQ,isValidRoute:()=>dQ,isValidTrailingWildcardRoute:()=>hQ,isValidWildcardRoute:()=>fy,isWsUrl:()=>py,parseConnectionError:()=>K2,payloadId:()=>Y2,validateJsonRpcError:()=>cQ});u();l();c();u();l();c();var h7="PARSE_ERROR",m7="INVALID_REQUEST",g7="METHOD_NOT_FOUND",y7="INVALID_PARAMS",oy="INTERNAL_ERROR",Md="SERVER_ERROR",q2=[-32700,-32600,-32601,-32602,-32603],iy=[-32e3,-32099],ds={[h7]:{code:-32700,message:"Parse error"},[m7]:{code:-32600,message:"Invalid Request"},[g7]:{code:-32601,message:"Method not found"},[y7]:{code:-32602,message:"Invalid params"},[oy]:{code:-32603,message:"Internal error"},[Md]:{code:-32e3,message:"Server error"}},Ld=Md;u();l();c();function uQ(e){return e<=iy[0]&&e>=iy[1]}function sy(e){return q2.includes(e)}function v7(e){return typeof e=="number"}function ay(e){return Object.keys(ds).includes(e)?ds[e]:ds[Ld]}function uy(e){let t=Object.values(ds).find(r=>r.code===e);return t||ds[Ld]}function cQ(e){if(typeof e.error.code>"u")return{valid:!1,error:"Missing code for JSON-RPC error"};if(typeof e.error.message>"u")return{valid:!1,error:"Missing message for JSON-RPC error"};if(!v7(e.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${e.error.code}`};if(sy(e.error.code)){let t=uy(e.error.code);if(t.message!==ds[Ld].message&&e.error.message===t.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${e.error.code}`}}return{valid:!0}}function K2(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var yt={};Xt(yt,{isNodeJs:()=>T7});u();l();c();var C7=N(W2());Tt(yt,N(W2()));var T7=C7.isNode;Tt(Rt,yt);u();l();c();function Y2(e=3){let t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function J2(e=6){return BigInt(Y2(e))}function ms(e,t,r){return{id:r||Y2(),jsonrpc:"2.0",method:e,params:t}}function rl(e,t){return{id:e,jsonrpc:"2.0",result:t}}function _a(e,t,r){return{id:e,jsonrpc:"2.0",error:P7(t,r)}}function P7(e,t){return typeof e>"u"?ay(oy):(typeof e=="string"&&(e=Object.assign(Object.assign({},ay(Md)),{message:e})),typeof t<"u"&&(e.data=t),sy(e.code)&&(e=uy(e.code)),e)}u();l();c();function dQ(e){return e.includes("*")?fy(e):!/\W/g.test(e)}function ly(e){return e==="*"}function fy(e){return ly(e)?!0:!(!e.includes("*")||e.split("*").length!==2||e.split("*").filter(t=>t.trim()==="").length!==1)}function pQ(e){return!ly(e)&&fy(e)&&!e.split("*")[0].trim()}function hQ(e){return!ly(e)&&fy(e)&&!e.split("*")[1].trim()}u();l();c();u();l();c();u();l();c();u();l();c();var nl=class{};u();l();c();var X2=class extends nl{constructor(t){super()}},dy=class extends nl{constructor(){super()}},Fd=class extends dy{constructor(t){super()}};u();l();c();u();l();c();var mQ="^https?:",gQ="^wss?:";function yQ(e){let t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function I7(e,t){let r=yQ(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function vQ(e){return I7(e,mQ)}function py(e){return I7(e,gQ)}function Q2(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}u();l();c();function Z2(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function ol(e){return Z2(e)&&"method"in e}function Ea(e){return Z2(e)&&(wn(e)||vr(e))}function wn(e){return"result"in e}function vr(e){return"error"in e}function bQ(e){return"error"in e&&e.valid===!1}var hy=class extends Fd{constructor(t){super(t),this.events=new A7.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(ms(t.method,t.params||[],J2().toString()),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{vr(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),Ea(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}};u();l();c();u();l();c();var N7=N(ha());var R7=10,wQ=()=>typeof globalThis<"u"&&typeof globalThis.WebSocket<"u"?globalThis.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:O7(),xQ=()=>typeof window<"u",_Q=wQ(),eE=class{constructor(t){if(this.url=t,this.events=new N7.EventEmitter,this.registering=!1,!py(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(jc(t))}catch(n){this.onError(t.id,n)}}register(t=this.url){if(!py(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{let o=(0,Rt.isReactNative)()?void 0:{rejectUnauthorized:!Q2(t)},i=new _Q(t,[],o);xQ()?i.onerror=s=>{let a=s;n(this.emitError(a.error))}:i.on("error",s=>{n(this.emitError(s))}),i.onopen=()=>{this.onOpen(i),r(i)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;let r=typeof t.data=="string"?yd(t.data):t.data;this.events.emit("payload",r)}onError(t,r){let n=this.parseError(r),o=n.message||n.toString(),i=_a(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return K2(t,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>R7&&this.events.setMaxListeners(R7)}emitError(t){let r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}},k7=eE;var M7=k7;var Lk=N(gk());function ZZ(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(r[s]!==255)throw new TypeError(i+" is ambiguous");r[s]=o}var a=e.length,f=e.charAt(0),d=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function g(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var _=0,C=0,x=0,S=w.length;x!==S&&w[x]===0;)x++,_++;for(var E=(S-x)*h+1>>>0,T=new Uint8Array(E);x!==S;){for(var A=w[x],O=0,P=E-1;(A!==0||O<C)&&P!==-1;P--,O++)A+=256*T[P]>>>0,T[P]=A%a>>>0,A=A/a>>>0;if(A!==0)throw new Error("Non-zero carry");C=O,x++}for(var I=E-C;I!==E&&T[I]===0;)I++;for(var R=f.repeat(_);I<E;++I)R+=e.charAt(T[I]);return R}function v(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var _=0;if(w[_]!==" "){for(var C=0,x=0;w[_]===f;)C++,_++;for(var S=(w.length-_)*d+1>>>0,E=new Uint8Array(S);w[_];){var T=r[w.charCodeAt(_)];if(T===255)return;for(var A=0,O=S-1;(T!==0||A<x)&&O!==-1;O--,A++)T+=a*E[O]>>>0,E[O]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");x=A,_++}if(w[_]!==" "){for(var P=S-x;P!==S&&E[P]===0;)P++;for(var I=new Uint8Array(C+(S-P)),R=C;P!==S;)I[R++]=E[P++];return I}}}function b(w){var _=v(w);if(_)return _;throw new Error(`Non-${t} character`)}return{encode:g,decodeUnsafe:v,decode:b}}var eee=ZZ,tee=eee,Fk=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},ree=e=>new TextEncoder().encode(e),nee=e=>new TextDecoder().decode(e),hE=class{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},mE=class{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return $k(this,t)}},gE=class{constructor(t){this.decoders=t}or(t){return $k(this,t)}decode(t){let r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},$k=(e,t)=>new gE(D(D({},e.decoders||{[e.prefix]:e}),t.decoders||{[t.prefix]:t})),yE=class{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new hE(t,r,n),this.decoder=new mE(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}},Iy=({name:e,prefix:t,encode:r,decode:n})=>new yE(e,t,r,n),qd=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:o}=tee(r,t);return Iy({prefix:e,name:t,encode:n,decode:i=>Fk(o(i))})},oee=(e,t,r,n)=>{let o={};for(let h=0;h<t.length;++h)o[t[h]]=h;let i=e.length;for(;e[i-1]==="=";)--i;let s=new Uint8Array(i*r/8|0),a=0,f=0,d=0;for(let h=0;h<i;++h){let g=o[e[h]];if(g===void 0)throw new SyntaxError(`Non-${n} character`);f=f<<r|g,a+=r,a>=8&&(a-=8,s[d++]=255&f>>a)}if(a>=r||255&f<<8-a)throw new SyntaxError("Unexpected end of data");return s},iee=(e,t,r)=>{let n=t[t.length-1]==="=",o=(1<<r)-1,i="",s=0,a=0;for(let f=0;f<e.length;++f)for(a=a<<8|e[f],s+=8;s>r;)s-=r,i+=t[o&a>>s];if(s&&(i+=t[o&a<<r-s]),n)for(;i.length*r&7;)i+="=";return i},Yt=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Iy({prefix:t,name:e,encode(o){return iee(o,n,r)},decode(o){return oee(o,n,r,e)}}),see=Iy({prefix:"\0",name:"identity",encode:e=>nee(e),decode:e=>ree(e)}),aee=Object.freeze({__proto__:null,identity:see}),uee=Yt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),cee=Object.freeze({__proto__:null,base2:uee}),lee=Yt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),fee=Object.freeze({__proto__:null,base8:lee}),dee=qd({prefix:"9",name:"base10",alphabet:"0123456789"}),pee=Object.freeze({__proto__:null,base10:dee}),hee=Yt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),mee=Yt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),gee=Object.freeze({__proto__:null,base16:hee,base16upper:mee}),yee=Yt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),vee=Yt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),bee=Yt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),wee=Yt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),xee=Yt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),_ee=Yt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Eee=Yt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),See=Yt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Cee=Yt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Tee=Object.freeze({__proto__:null,base32:yee,base32upper:vee,base32pad:bee,base32padupper:wee,base32hex:xee,base32hexupper:_ee,base32hexpad:Eee,base32hexpadupper:See,base32z:Cee}),Pee=qd({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Iee=qd({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Aee=Object.freeze({__proto__:null,base36:Pee,base36upper:Iee}),Dee=qd({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Oee=qd({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Ree=Object.freeze({__proto__:null,base58btc:Dee,base58flickr:Oee}),Nee=Yt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),kee=Yt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Mee=Yt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Lee=Yt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Fee=Object.freeze({__proto__:null,base64:Nee,base64pad:kee,base64url:Mee,base64urlpad:Lee}),Bk=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),$ee=Bk.reduce((e,t,r)=>(e[r]=t,e),[]),Bee=Bk.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Uee(e){return e.reduce((t,r)=>(t+=$ee[r],t),"")}function jee(e){let t=[];for(let r of e){let n=Bee[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}var Vee=Iy({prefix:"\u{1F680}",name:"base256emoji",encode:Uee,decode:jee}),zee=Object.freeze({__proto__:null,base256emoji:Vee}),Hee=Uk,yk=128,qee=127,Kee=~qee,Gee=Math.pow(2,31);function Uk(e,t,r){t=t||[],r=r||0;for(var n=r;e>=Gee;)t[r++]=e&255|yk,e/=128;for(;e&Kee;)t[r++]=e&255|yk,e>>>=7;return t[r]=e|0,Uk.bytes=r-n+1,t}var Wee=vE,Yee=128,vk=127;function vE(e,n){var r=0,n=n||0,o=0,i=n,s,a=e.length;do{if(i>=a)throw vE.bytes=0,new RangeError("Could not decode varint");s=e[i++],r+=o<28?(s&vk)<<o:(s&vk)*Math.pow(2,o),o+=7}while(s>=Yee);return vE.bytes=i-n,r}var Jee=Math.pow(2,7),Xee=Math.pow(2,14),Qee=Math.pow(2,21),Zee=Math.pow(2,28),ete=Math.pow(2,35),tte=Math.pow(2,42),rte=Math.pow(2,49),nte=Math.pow(2,56),ote=Math.pow(2,63),ite=function(e){return e<Jee?1:e<Xee?2:e<Qee?3:e<Zee?4:e<ete?5:e<tte?6:e<rte?7:e<nte?8:e<ote?9:10},ste={encode:Hee,decode:Wee,encodingLength:ite},jk=ste,bk=(e,t,r=0)=>(jk.encode(e,t,r),t),wk=e=>jk.encodingLength(e),bE=(e,t)=>{let r=t.byteLength,n=wk(e),o=n+wk(r),i=new Uint8Array(o+r);return bk(e,i,0),bk(r,i,n),i.set(t,o),new wE(e,r,t,i)},wE=class{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}},Vk=({name:e,code:t,encode:r})=>new xE(e,t,r),xE=class{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?bE(this.code,r):r.then(n=>bE(this.code,n))}else throw Error("Unknown type, must be binary type")}},zk=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ate=Vk({name:"sha2-256",code:18,encode:zk("SHA-256")}),ute=Vk({name:"sha2-512",code:19,encode:zk("SHA-512")}),cte=Object.freeze({__proto__:null,sha256:ate,sha512:ute}),Hk=0,lte="identity",qk=Fk,fte=e=>bE(Hk,qk(e)),dte={code:Hk,name:lte,encode:qk,digest:fte},pte=Object.freeze({__proto__:null,identity:dte});new TextEncoder,new TextDecoder;var xk=D(D(D(D(D(D(D(D(D(D({},aee),cee),fee),pee),gee),Tee),Aee),Ree),Fee),zee);D(D({},cte),pte);function hte(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Kk(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var _k=Kk("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),dE=Kk("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=hte(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),mte=D({utf8:_k,"utf-8":_k,hex:xk.base16,latin1:dE,ascii:dE,binary:dE},xk);function gte(e,t="utf8"){let r=mte[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}var Gk="wc",yte=2,NE="core",vs=`${Gk}@${2}:${NE}:`,vte={name:NE,logger:"error"},bte={database:":memory:"},wte="crypto",Ek="client_ed25519_seed",xte=Je.ONE_DAY,_te="keychain",Ete="0.3",Ste="messages",Cte="0.3",Tte=Je.SIX_HOURS,Pte="publisher",kE="irn",Ite="error",Ate="wss://relay.walletconnect.com",Dte="relayer",br={message:"relayer_message",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed"},Ote="_subscription",Ty={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Sk=Je.ONE_SECOND;var Rte="2.2.0",Nte="0.3",bo={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"};var kte="subscription",Mte="0.3",Lte=Je.FIVE_SECONDS*1e3,Fte="pairing",$te="0.3";var zd={wc_pairingDelete:{req:{ttl:Je.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Je.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Je.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Je.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Je.ONE_DAY,prompt:!1,tag:0},res:{ttl:Je.ONE_DAY,prompt:!1,tag:0}}},vo={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},Bte="history",Ute="0.3",jte="expirer",Wr={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},Vte="0.3";var _E=class{constructor(t,r){this.core=t,this.logger=r,this.keychain=new Map,this.name=_te,this.version=Ete,this.initialized=!1,this.storagePrefix=vs,this.init=async()=>{if(!this.initialized){let n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();let o=this.keychain.get(n);if(typeof o>"u"){let{message:i}=W("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=t,this.logger=(0,$e.generateChildLogger)(r,this.name)}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,F2(t))}async getKeyChain(){let t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?$2(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},EE=class{constructor(t,r,n){this.core=t,this.logger=r,this.name=wte,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();let o=await this.getClientSeed(),i=p2(o);return Ug(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();let o=F9();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();let i=await this.getClientSeed(),s=p2(i),a=Qg();return await LN(a,o,xte,s)},this.generateSharedKey=(o,i,s)=>{this.isInitialized();let a=this.getPrivateKey(o),f=$9(a,i);return this.setSymKey(f,s)},this.setSymKey=async(o,i)=>{this.isInitialized();let s=i||B9(o);return await this.keychain.set(s,o),s},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,i,s)=>{this.isInitialized();let a=M2(s),f=jc(i);if(L2(a)){let v=a.senderPublicKey,b=a.receiverPublicKey;o=await this.generateSharedKey(v,b)}let d=this.getSymKey(o),{type:h,senderPublicKey:g}=a;return U9({type:h,symKey:d,message:f,senderPublicKey:g})},this.decode=async(o,i,s)=>{this.isInitialized();let a=V9(i,s);if(L2(a)){let h=a.receiverPublicKey,g=a.senderPublicKey;o=await this.generateSharedKey(h,g)}let f=this.getSymKey(o),d=j9({symKey:f,encoded:i});return yd(d)},this.core=t,this.logger=(0,$e.generateChildLogger)(r,this.name),this.keychain=n||new _E(this.core,this.logger)}get context(){return(0,$e.getLoggerContext)(this.logger)}getPayloadType(t){let r=ey(t);return tl(r.type)}async setPrivateKey(t,r){return await this.keychain.set(t,r),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(Ek)}catch{t=Qg(),await this.keychain.set(Ek,t)}return gte(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},SE=class extends _g{constructor(t,r){super(t,r),this.logger=t,this.core=r,this.messages=new Map,this.name=Ste,this.version=Cte,this.initialized=!1,this.storagePrefix=vs,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();let i=Zg(o),s=this.messages.get(n);return typeof s>"u"&&(s={}),typeof s[i]<"u"||(s[i]=o,this.messages.set(n,s),await this.persist()),i},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();let i=this.get(n),s=Zg(o);return typeof i[s]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=(0,$e.generateChildLogger)(t,this.name),this.core=r}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,F2(t))}async getRelayerMessages(){let t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?$2(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},CE=class extends Eg{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.events=new fi.EventEmitter,this.name=Pte,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,o,i)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}});try{let s=(i==null?void 0:i.ttl)||Tte,a=ry(i),f=(i==null?void 0:i.prompt)||!1,d=(i==null?void 0:i.tag)||0,h={topic:n,message:o,opts:{ttl:s,relay:a,prompt:f,tag:d}},g=Zg(o);this.queue.set(g,h);try{await await B2(this.rpcPublish(n,o,s,a,f,d),this.publishTimeout)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(br.connection_stalled);return}this.onPublish(g,h),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}})}catch(s){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(s),s}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=t,this.logger=(0,$e.generateChildLogger)(r,this.name),this.registerEventListeners()}get context(){return(0,$e.getLoggerContext)(this.logger)}rpcPublish(t,r,n,o,i,s){var a,f,d,h;let g={method:ny(o.protocol).publish,params:{topic:t,message:r,ttl:n,prompt:i,tag:s}};return yr((a=g.params)==null?void 0:a.prompt)&&((f=g.params)==null||delete f.prompt),yr((d=g.params)==null?void 0:d.tag)&&((h=g.params)==null||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g}),this.relayer.provider.request(g)}onPublish(t,r){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{let{topic:r,message:n,opts:o}=t;await this.publish(r,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(ul.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}},TE=class{constructor(){this.map=new Map,this.set=(t,r)=>{let n=this.get(t);this.exists(t,r)||this.map.set(t,[...n,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u"){this.map.delete(t);return}if(!this.map.has(t))return;let n=this.get(t);if(!this.exists(t,r))return;let o=n.filter(i=>i!==r);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}},zte=Object.defineProperty,Hte=Object.defineProperties,qte=Object.getOwnPropertyDescriptors,Ck=Object.getOwnPropertySymbols,Kte=Object.prototype.hasOwnProperty,Gte=Object.prototype.propertyIsEnumerable,Tk=(e,t,r)=>t in e?zte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Py=(e,t)=>{for(var r in t||(t={}))Kte.call(t,r)&&Tk(e,r,t[r]);if(Ck)for(var r of Ck(t))Gte.call(t,r)&&Tk(e,r,t[r]);return e},pE=(e,t)=>Hte(e,qte(t)),PE=class extends Tg{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new TE,this.events=new fi.EventEmitter,this.name=kte,this.version=Mte,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pendingSubInterval=20,this.storagePrefix=vs,this.subscribeTimeout=1e4,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable())},this.subscribe=async(n,o)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{let i=ry(o),s={topic:n,relay:i};this.pending.set(n,s);let a=await this.rpcSubscribe(n,i);return this.onSubscribe(a,s),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),a}catch(i){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(i),i}},this.unsubscribe=async(n,o)=>{this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,i)=>{let s=new Je.Watch;s.start(this.pendingSubscriptionWatchLabel);let a=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(a),s.stop(this.pendingSubscriptionWatchLabel),o(!0)),s.elapsed(this.pendingSubscriptionWatchLabel)>=Lte&&(clearInterval(a),s.stop(this.pendingSubscriptionWatchLabel),i(!1))},this.pendingSubInterval)}),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{await this.restore(),await this.reset()},this.relayer=t,this.logger=(0,$e.generateChildLogger)(r,this.name)}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let n=!1;try{n=this.getSubscription(t).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear(),this.initialized=!1}async unsubscribeByTopic(t,r){let n=this.topicMap.get(t);await Promise.all(n.map(async o=>await this.unsubscribeById(t,o,r)))}async unsubscribeById(t,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}});try{let o=ry(n);await this.rpcUnsubscribe(t,r,o);let i=St("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,r,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,r){let n={method:ny(r.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let o;try{o=await await B2(this.relayer.provider.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(br.connection_stalled)}return o}rpcUnsubscribe(t,r,n){let o={method:ny(n.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.provider.request(o)}onSubscribe(t,r){this.setSubscription(t,pE(Py({},r),{id:t})),this.pending.delete(r.topic)}onResubscribe(t,r){this.addSubscription(t,pE(Py({},r),{id:t})),this.pending.delete(r.topic)}async onUnsubscribe(t,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,t)&&this.deleteSubscription(r,n),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,Py({},r)),this.topicMap.set(r.topic,t),this.events.emit(bo.created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});let r=this.subscriptions.get(t);if(!r){let{message:n}=W("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});let n=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(n.topic,t),this.events.emit(bo.deleted,pE(Py({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(bo.sync)}async reset(){this.cached.length&&await Promise.all(this.cached.map(async t=>await this.resubscribe(t))),this.events.emit(bo.resubscribed)}async restore(){try{let t=await this.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(this.subscriptions.size){let{message:r}=W("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async resubscribe(t){if(!this.ids.includes(t.id)){let{topic:r,relay:n}=t,o={topic:r,relay:n};this.pending.set(o.topic,o);let i=await this.rpcSubscribe(o.topic,o.relay);this.onResubscribe(i,o)}}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}checkPending(){this.relayer.transportExplicitlyClosed||this.pending.forEach(async t=>{let r=await this.rpcSubscribe(t.topic,t.relay);this.onSubscribe(r,t)})}registerEventListeners(){this.relayer.core.heartbeat.on(ul.HEARTBEAT_EVENTS.pulse,()=>{this.checkPending()}),this.relayer.on(br.connect,async()=>{await this.onConnect()}),this.relayer.on(br.disconnect,()=>{this.onDisconnect()}),this.events.on(bo.created,async t=>{let r=bo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()}),this.events.on(bo.deleted,async t=>{let r=bo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},Wte=Object.defineProperty,Pk=Object.getOwnPropertySymbols,Yte=Object.prototype.hasOwnProperty,Jte=Object.prototype.propertyIsEnumerable,Ik=(e,t,r)=>t in e?Wte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xte=(e,t)=>{for(var r in t||(t={}))Yte.call(t,r)&&Ik(e,r,t[r]);if(Pk)for(var r of Pk(t))Jte.call(t,r)&&Ik(e,r,t[r]);return e},IE=class extends Sg{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new fi.EventEmitter,this.name=Dte,this.transportExplicitlyClosed=!1,this.initialized=!1,this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?(0,$e.generateChildLogger)(t.logger,this.name):(0,RE.default)((0,$e.getDefaultLoggerOptions)({level:t.logger||Ite})),this.messages=new SE(this.logger,t.core),this.subscriber=new PE(this,this.logger),this.publisher=new CE(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||Ate,this.projectId=t.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),this.provider=await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return(0,$e.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,r,n){this.isInitialized(),await this.publisher.publish(t,r,n),await this.recordMessageEvent({topic:t,message:r})}async subscribe(t,r){this.isInitialized();let n="";return await Promise.all([new Promise(o=>{this.subscriber.once(bo.created,i=>{i.topic===t&&o()})}),new Promise(async o=>{n=await this.subscriber.subscribe(t,r),o()})]),n}async unsubscribe(t,r){this.isInitialized(),await this.subscriber.unsubscribe(t,r)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&await this.provider.disconnect(),this.events.emit(br.transport_closed)}async transportOpen(t){this.relayUrl=t||this.relayUrl,this.transportExplicitlyClosed=!1;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once(bo.resubscribed,()=>{r()})}),await Promise.race([this.provider.connect(),new Promise((r,n)=>this.once(br.transport_closed,()=>{n()}))])])}catch(r){let n=r;if(!/socket hang up/i.test(n.message))throw new Error(n.message);this.logger.error(n),this.events.emit(br.transport_closed)}}async restartTransport(t){await this.transportClose(),await new Promise(r=>setTimeout(r,Sk)),await this.transportOpen(t)}async createProvider(){let t=await this.core.crypto.signJWT(this.relayUrl);return new hy(new M7(q9({sdkVersion:Rte,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t})))}async recordMessageEvent(t){let{topic:r,message:n}=t;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(t){let{topic:r,message:n}=t;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),ol(t)){if(!t.method.endsWith(Ote))return;let r=t.params,{topic:n,message:o}=r.data,i={topic:n,message:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Xte({type:"event",event:r.id},i)),this.events.emit(r.id,i),await this.acknowledgePayload(t),await this.onMessageEvent(i)}}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(br.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){let r=rl(t.id,!0);await this.provider.connection.send(r)}registerEventListeners(){this.provider.on(Ty.payload,t=>this.onProviderPayload(t)),this.provider.on(Ty.connect,()=>{this.events.emit(br.connect)}),this.provider.on(Ty.disconnect,()=>{this.events.emit(br.disconnect),this.attemptToReconnect()}),this.provider.on(Ty.error,t=>this.events.emit(br.error,t)),this.events.on(br.connection_stalled,async()=>{await this.restartTransport()})}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.transportOpen()},(0,Je.toMiliseconds)(Sk))}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},Qte=Object.defineProperty,Ak=Object.getOwnPropertySymbols,Zte=Object.prototype.hasOwnProperty,ere=Object.prototype.propertyIsEnumerable,Dk=(e,t,r)=>t in e?Qte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ok=(e,t)=>{for(var r in t||(t={}))Zte.call(t,r)&&Dk(e,r,t[r]);if(Ak)for(var r of Ak(t))ere.call(t,r)&&Dk(e,r,t[r]);return e},Ia=class extends Cg{constructor(t,r,n,o=vs,i=void 0){super(t,r,n,o),this.core=t,this.logger=r,this.name=n,this.map=new Map,this.version=Nte,this.cached=[],this.initialized=!1,this.storagePrefix=vs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(s=>{t7(s)?this.map.set(s.id,s):r7(s)?this.map.set(s.topic,s):this.getKey&&s!==null&&!yr(s)&&this.map.set(this.getKey(s),s)}),this.cached=[],this.initialized=!0)},this.set=async(s,a)=>{this.isInitialized(),this.map.has(s)?await this.update(s,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:s,value:a}),this.map.set(s,a),await this.persist())},this.get=s=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:s}),this.getData(s)),this.getAll=s=>(this.isInitialized(),s?this.values.filter(a=>Object.keys(s).every(f=>(0,Lk.default)(a[f],s[f]))):this.values),this.update=async(s,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:s,update:a});let f=Ok(Ok({},this.getData(s)),a);this.map.set(s,f),await this.persist()},this.delete=async(s,a)=>{this.isInitialized(),this.map.has(s)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:s,reason:a}),this.map.delete(s),await this.persist())},this.logger=(0,$e.generateChildLogger)(r,this.name),this.storagePrefix=o,this.getKey=i}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){let r=this.map.get(t);if(!r){let{message:n}=W("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{let t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){let{message:r}=W("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},AE=class{constructor(t,r){this.core=t,this.logger=r,this.name=Fte,this.version=$te,this.events=new fi.default,this.initialized=!1,this.storagePrefix=vs,this.ignoredPayloadTypes=[ai],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();let n=Qg(),o=await this.core.crypto.setSymKey(n),i=Bn(Je.FIVE_MINUTES),s={protocol:kE},a={topic:o,expiry:i,relay:s,active:!1},f=J9({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:s});return await this.pairings.set(o,a),await this.core.relayer.subscribe(o),this.core.expirer.set(o,i),{topic:o,uri:f}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);let{topic:o,symKey:i,relay:s}=Y9(n.uri),a=Bn(Je.FIVE_MINUTES),f={topic:o,relay:s,expiry:a,active:!1};return await this.pairings.set(o,f),await this.core.crypto.setSymKey(i,o),await this.core.relayer.subscribe(o,{relay:s}),this.core.expirer.set(o,a),n.activatePairing&&await this.activate({topic:o}),f},this.activate=async({topic:n})=>{this.isInitialized();let o=Bn(Je.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);let{topic:o}=n;if(this.pairings.keys.includes(o)){let i=await this.sendRequest(o,"wc_pairingPing",{}),{done:s,resolve:a,reject:f}=ui();this.events.once(at("pairing_ping",i),({error:d})=>{d?f(d):a()}),await s()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);let{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",St("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,i)=>{let s=ms(o,i),a=await this.core.crypto.encode(n,s),f=zd[o].req;return this.core.history.set(n,s),await this.core.relayer.publish(n,a,f),s.id},this.sendResult=async(n,o,i)=>{let s=rl(n,i),a=await this.core.crypto.encode(o,s),f=await this.core.history.get(o,n),d=zd[f.request.method].res;await this.core.relayer.publish(o,a,d),await this.core.history.resolve(s)},this.sendError=async(n,o,i)=>{let s=_a(n,i),a=await this.core.crypto.encode(o,s),f=await this.core.history.get(o,n),d=zd[f.request.method]?zd[f.request.method].res:zd.unregistered_method.res;await this.core.relayer.publish(o,a,d),await this.core.history.resolve(s)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,St("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{let n=this.pairings.getAll().filter(o=>go(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{let{topic:o,payload:i}=n;switch(i.method){case"wc_pairingPing":return this.onPairingPingRequest(o,i);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,i);default:return this.onUnknownRpcMethodRequest(o,i)}},this.onRelayEventResponse=async n=>{let{topic:o,payload:i}=n,s=(await this.core.history.get(o,i.id)).request.method;switch(s){case"wc_pairingPing":return this.onPairingPingResponse(o,i);default:return this.onUnknownRpcMethodResponse(s)}},this.onPairingPingRequest=async(n,o)=>{let{id:i}=o;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.events.emit("pairing_ping",{id:i,topic:n})}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onPairingPingResponse=(n,o)=>{let{id:i}=o;setTimeout(()=>{wn(o)?this.events.emit(at("pairing_ping",i),{}):vr(o)&&this.events.emit(at("pairing_ping",i),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{let{id:i}=o;try{this.isValidDisconnect({topic:n}),await this.sendResult(i,n,!0),await this.deletePairing(n),this.events.emit("pairing_delete",{id:i,topic:n})}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onUnknownRpcMethodRequest=async(n,o)=>{let{id:i,method:s}=o;try{if(this.registeredMethods.includes(s))return;let a=St("WC_METHOD_UNSUPPORTED",s);await this.sendError(i,n,a),this.logger.error(a)}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(St("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!cr(n)){let{message:o}=W("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!e7(n.uri)){let{message:o}=W("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!cr(n)){let{message:i}=W("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}let{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!cr(n)){let{message:i}=W("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}let{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!Ot(n,!1)){let{message:o}=W("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){let{message:o}=W("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(go(this.pairings.get(n).expiry)){await this.deletePairing(n);let{message:o}=W("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=t,this.logger=(0,$e.generateChildLogger)(r,this.name),this.pairings=new Ia(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,$e.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(br.message,async t=>{let{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;let o=await this.core.crypto.decode(r,n);ol(o)?(this.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):Ea(o)&&(await this.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.core.expirer.on(Wr.expired,async t=>{let{topic:r}=ty(t.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}},DE=class extends xg{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.records=new Map,this.events=new fi.EventEmitter,this.name=Bte,this.version=Ute,this.cached=[],this.initialized=!1,this.storagePrefix=vs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,i)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:i}),this.records.has(o.id))return;let s={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:i};this.records.set(s.id,s),this.events.emit(vo.created,s)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;let o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=vr(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(vo.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(i=>{if(i.topic===n){if(typeof o<"u"&&i.id!==o)return;this.records.delete(i.id),this.events.emit(vo.deleted,i)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=(0,$e.generateChildLogger)(r,this.name)}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;let n={topic:r.topic,request:ms(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(n)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();let r=this.records.get(t);if(!r){let{message:n}=W("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(vo.sync)}async restore(){try{let t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){let{message:r}=W("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(vo.created,t=>{let r=vo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(vo.updated,t=>{let r=vo.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(vo.deleted,t=>{let r=vo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()})}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},OE=class extends Pg{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.expirations=new Map,this.events=new fi.EventEmitter,this.name=jte,this.version=Vte,this.cached=[],this.initialized=!1,this.storagePrefix=vs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{let o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();let i=this.formatTarget(n),s={target:i,expiry:o};this.expirations.set(i,s),this.checkExpiry(i,s),this.events.emit(Wr.created,{target:i,expiration:s})},this.get=n=>{this.isInitialized();let o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{this.isInitialized();let o=this.formatTarget(n);if(this.has(o)){let i=this.getExpiration(o);this.expirations.delete(o),this.events.emit(Wr.deleted,{target:o,expiration:i})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=(0,$e.generateChildLogger)(r,this.name)}get context(){return(0,$e.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return G9(t);if(typeof t=="number")return W9(t);let{message:r}=W("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(r)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Wr.sync)}async restore(){try{let t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){let{message:r}=W("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){let r=this.expirations.get(t);if(!r){let{message:n}=W("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(t,r){let{expiry:n}=r;(0,Je.toMiliseconds)(n)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(Wr.expired,{target:t,expiration:r})}checkExpirations(){this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(ul.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Wr.created,t=>{let r=Wr.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(Wr.expired,t=>{let r=Wr.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(Wr.deleted,t=>{let r=Wr.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}},tre=Object.defineProperty,Rk=Object.getOwnPropertySymbols,rre=Object.prototype.hasOwnProperty,nre=Object.prototype.propertyIsEnumerable,Nk=(e,t,r)=>t in e?tre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kk=(e,t)=>{for(var r in t||(t={}))rre.call(t,r)&&Nk(e,r,t[r]);if(Rk)for(var r of Rk(t))nre.call(t,r)&&Nk(e,r,t[r]);return e},Hd=class extends wg{constructor(t){super(t),this.protocol=Gk,this.version=yte,this.name=NE,this.events=new fi.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=t==null?void 0:t.projectId;let r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:(0,RE.default)((0,$e.getDefaultLoggerOptions)({level:(t==null?void 0:t.logger)||vte.logger}));this.logger=(0,$e.generateChildLogger)(r,this.name),this.heartbeat=new ul.HeartBeat,this.crypto=new EE(this,this.logger,t==null?void 0:t.keychain),this.history=new DE(this,this.logger),this.expirer=new OE(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new Mk.default(kk(kk({},bte),t==null?void 0:t.storageOptions)),this.relayer=new IE({core:this,logger:this.logger,relayUrl:t==null?void 0:t.relayUrl,projectId:this.projectId}),this.pairing=new AE(this,this.logger)}static async init(t){let r=new Hd(t);return await r.initialize(),r}get context(){return(0,$e.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initilization Success")}catch(t){throw this.logger.warn(`Core Initilization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}},Wk=Hd;var ll=N(C_());var Dy=N(ha()),et=N(us());var Qk="wc",Zk=2,eM="client",jE=`${Qk}@${Zk}:${eM}:`,ME={name:eM,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"};var ore="proposal";var ire="session",Ay=et.SEVEN_DAYS,sre="engine",Kd={wc_sessionPropose:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1104},res:{ttl:et.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1106},res:{ttl:et.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1112},res:{ttl:et.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1115}}},are="request",ure=Object.defineProperty,cre=Object.defineProperties,lre=Object.getOwnPropertyDescriptors,Yk=Object.getOwnPropertySymbols,fre=Object.prototype.hasOwnProperty,dre=Object.prototype.propertyIsEnumerable,Jk=(e,t,r)=>t in e?ure(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,di=(e,t)=>{for(var r in t||(t={}))fre.call(t,r)&&Jk(e,r,t[r]);if(Yk)for(var r of Yk(t))dre.call(t,r)&&Jk(e,r,t[r]);return e},LE=(e,t)=>cre(e,lre(t)),FE=class extends Ag{constructor(t){super(t),this.name=sre,this.events=new Dy.default,this.initialized=!1,this.ignoredPayloadTypes=[ai],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(Kd)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized(),await this.isValidConnect(r);let{pairingTopic:n,requiredNamespaces:o,relays:i}=r,s=n,a,f=!1;if(s&&(f=this.client.core.pairing.pairings.get(s).active),!s||!f){let{topic:C,uri:x}=await this.client.core.pairing.create();s=C,a=x}let d=await this.client.core.crypto.generateKeyPair(),h={requiredNamespaces:o,relays:i!=null?i:[{protocol:kE}],proposer:{publicKey:d,metadata:this.client.metadata}},{reject:g,resolve:v,done:b}=ui();if(this.events.once(at("session_connect"),async({error:C,session:x})=>{if(C)g(C);else if(x){x.self.publicKey=d;let S=LE(di({},x),{requiredNamespaces:x.requiredNamespaces});await this.client.session.set(x.topic,S),await this.setExpiry(x.topic,x.expiry),s&&await this.client.core.pairing.updateMetadata({topic:s,metadata:x.peer.metadata}),v(S)}}),!s){let{message:C}=W("NO_MATCHING_KEY",`connect() pairing topic: ${s}`);throw new Error(C)}let w=await this.sendRequest(s,"wc_sessionPropose",h),_=Bn(et.FIVE_MINUTES);return await this.setProposal(w,di({id:w,expiry:_},h)),{uri:a,approval:b}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);let{id:n,relayProtocol:o,namespaces:i}=r,s=this.client.proposal.get(n),{pairingTopic:a,proposer:f,requiredNamespaces:d}=s;Nd(d)||(d=X9(i,"approve()"),this.client.proposal.set(n,LE(di({},s),{requiredNamespaces:d})));let h=await this.client.core.crypto.generateKeyPair(),g=f.publicKey,v=await this.client.core.crypto.generateSharedKey(h,g),b={relay:{protocol:o!=null?o:"irn"},namespaces:i,requiredNamespaces:d,controller:{publicKey:h,metadata:this.client.metadata},expiry:Bn(Ay)};await this.client.core.relayer.subscribe(v);let w=await this.sendRequest(v,"wc_sessionSettle",b),{done:_,resolve:C,reject:x}=ui();this.events.once(at("session_approve",w),({error:E})=>{E?x(E):C(this.client.session.get(v))});let S=LE(di({},b),{topic:v,acknowledged:!1,self:b.controller,peer:{publicKey:f.publicKey,metadata:f.metadata},controller:h});return await this.client.session.set(v,S),await this.setExpiry(v,Bn(Ay)),a&&await this.client.core.pairing.updateMetadata({topic:a,metadata:S.peer.metadata}),a&&n&&(await this.sendResult(n,a,{relay:{protocol:o!=null?o:"irn"},responderPublicKey:h}),await this.client.proposal.delete(n,St("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a})),{topic:v,acknowledged:_}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);let{id:n,reason:o}=r,{pairingTopic:i}=this.client.proposal.get(n);i&&(await this.sendError(n,i,o),await this.client.proposal.delete(n,St("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);let{topic:n,namespaces:o}=r,i=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:s,resolve:a,reject:f}=ui();return this.events.once(at("session_update",i),({error:d})=>{d?f(d):a()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:s}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);let{topic:n}=r,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:i,resolve:s,reject:a}=ui();return this.events.once(at("session_extend",o),({error:f})=>{f?a(f):s()}),await this.setExpiry(n,Bn(Ay)),{acknowledged:i}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);let{chainId:n,request:o,topic:i}=r,s=await this.sendRequest(i,"wc_sessionRequest",{request:o,chainId:n}),{done:a,resolve:f,reject:d}=ui();return this.events.once(at("session_request",s),({error:h,result:g})=>{h?d(h):f(g)}),await a()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);let{topic:n,response:o}=r,{id:i}=o;wn(o)?await this.sendResult(i,n,o.result):vr(o)&&await this.sendError(i,n,o.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);let{topic:n}=r;if(this.client.session.keys.includes(n)){let o=await this.sendRequest(n,"wc_sessionPing",{}),{done:i,resolve:s,reject:a}=ui();this.events.once(at("session_ping",o),({error:f})=>{f?a(f):s()}),await i()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);let{topic:n,event:o,chainId:i}=r;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:i})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);let{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",St("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>Z9(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(r,n)=>{let{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,St("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,St("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),o?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{let n=Kd.wc_sessionRequest.req.ttl,{id:o,topic:i,params:s}=r;await this.client.pendingRequest.set(o,{id:o,topic:i,params:s}),n&&this.client.core.expirer.set(o,n)},this.sendRequest=async(r,n,o)=>{let i=ms(n,o),s=await this.client.core.crypto.encode(r,i),a=Kd[n].req;return this.client.core.history.set(r,i),this.client.core.relayer.publish(r,s,a),i.id},this.sendResult=async(r,n,o)=>{let i=rl(r,o),s=await this.client.core.crypto.encode(n,i),a=await this.client.core.history.get(n,r),f=Kd[a.request.method].res;this.client.core.relayer.publish(n,s,f),await this.client.core.history.resolve(i)},this.sendError=async(r,n,o)=>{let i=_a(r,o),s=await this.client.core.crypto.encode(n,i),a=await this.client.core.history.get(n,r),f=Kd[a.request.method].res;this.client.core.relayer.publish(n,s,f),await this.client.core.history.resolve(i)},this.cleanup=async()=>{let r=[],n=[];this.client.session.getAll().forEach(o=>{go(o.expiry)&&r.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{go(o.expiry)&&n.push(o.id)}),await Promise.all([...r.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=r=>{let{topic:n,payload:o}=r,i=o.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async r=>{let{topic:n,payload:o}=r,i=(await this.client.core.history.get(n,o.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onSessionProposeRequest=async(r,n)=>{let{params:o,id:i}=n;try{this.isValidConnect(di({},n.params));let s=Bn(et.FIVE_MINUTES),a=di({id:i,pairingTopic:r,expiry:s},o);await this.setProposal(i,a),this.client.events.emit("session_proposal",{id:i,params:a})}catch(s){await this.sendError(i,r,s),this.client.logger.error(s)}},this.onSessionProposeResponse=async(r,n)=>{let{id:o}=n;if(wn(n)){let{result:i}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});let s=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:s});let a=s.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});let f=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:f});let d=await this.client.core.crypto.generateSharedKey(a,f);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:d});let h=await this.client.core.relayer.subscribe(d);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:r})}else vr(n)&&(await this.client.proposal.delete(o,St("USER_DISCONNECTED")),this.events.emit(at("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{let{id:o,params:i}=n;try{this.isValidSessionSettleRequest(i);let{relay:s,controller:a,expiry:f,namespaces:d,requiredNamespaces:h}=n.params,g={topic:r,relay:s,expiry:f,namespaces:d,acknowledged:!0,requiredNamespaces:h,controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}};await this.sendResult(n.id,r,!0),this.events.emit(at("session_connect"),{session:g})}catch(s){await this.sendError(o,r,s),this.client.logger.error(s)}},this.onSessionSettleResponse=async(r,n)=>{let{id:o}=n;wn(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(at("session_approve",o),{})):vr(n)&&(await this.client.session.delete(r,St("USER_DISCONNECTED")),this.events.emit(at("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{let{params:o,id:i}=n;try{this.isValidUpdate(di({topic:r},o)),await this.client.session.update(r,{namespaces:o.namespaces}),await this.sendResult(i,r,!0),this.client.events.emit("session_update",{id:i,topic:r,params:o})}catch(s){await this.sendError(i,r,s),this.client.logger.error(s)}},this.onSessionUpdateResponse=(r,n)=>{let{id:o}=n;wn(n)?this.events.emit(at("session_update",o),{}):vr(n)&&this.events.emit(at("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{let{id:o}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Bn(Ay)),await this.sendResult(o,r,!0),this.client.events.emit("session_extend",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,n)=>{let{id:o}=n;wn(n)?this.events.emit(at("session_extend",o),{}):vr(n)&&this.events.emit(at("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{let{id:o}=n;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.client.events.emit("session_ping",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,n)=>{let{id:o}=n;setTimeout(()=>{wn(n)?this.events.emit(at("session_ping",o),{}):vr(n)&&this.events.emit(at("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{let{id:o}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await this.sendResult(o,r,!0),await this.deleteSession(r),this.client.events.emit("session_delete",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionRequest=async(r,n)=>{let{id:o,params:i}=n;try{this.isValidRequest(di({topic:r},i)),await this.setPendingSessionRequest({id:o,topic:r,params:i}),this.client.events.emit("session_request",{id:o,topic:r,params:i})}catch(s){await this.sendError(o,r,s),this.client.logger.error(s)}},this.onSessionRequestResponse=(r,n)=>{let{id:o}=n;wn(n)?this.events.emit(at("session_request",o),{result:n.result}):vr(n)&&this.events.emit(at("session_request",o),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{let{id:o,params:i}=n;try{this.isValidEmit(di({topic:r},i)),this.client.events.emit("session_event",{id:o,topic:r,params:i})}catch(s){await this.sendError(o,r,s),this.client.logger.error(s)}},this.isValidConnect=async r=>{if(!cr(r)){let{message:a}=W("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(a)}let{pairingTopic:n,requiredNamespaces:o,relays:i}=r;if(yr(n)||await this.isValidPairingTopic(n),!yr(o)&&Nd(o)===0)return;let s=i7(o,"connect()");if(s)throw new Error(s.message);if(!s7(i,!0)){let{message:a}=W("MISSING_OR_INVALID",`connect() relays: ${i}`);throw new Error(a)}},this.isValidApprove=async r=>{if(!cr(r))throw new Error(W("MISSING_OR_INVALID",`approve() params: ${r}`).message);let{id:n,namespaces:o,relayProtocol:i}=r;await this.isValidProposalId(n);let s=this.client.proposal.get(n),a=kd(o,"approve()");if(a)throw new Error(a.message);let f=H2(s.requiredNamespaces,o,"update()");if(f)throw new Error(f.message);if(!Ot(i,!0)){let{message:d}=W("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(d)}},this.isValidReject=async r=>{if(!cr(r)){let{message:i}=W("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(i)}let{id:n,reason:o}=r;if(await this.isValidProposalId(n),!u7(o)){let{message:i}=W("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidSessionSettleRequest=r=>{if(!cr(r)){let{message:d}=W("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(d)}let{relay:n,controller:o,namespaces:i,expiry:s}=r;if(!V2(n)){let{message:d}=W("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}let a=n7(o,"onSessionSettleRequest()");if(a)throw new Error(a.message);let f=kd(i,"onSessionSettleRequest()");if(f)throw new Error(f.message);if(go(s)){let{message:d}=W("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async r=>{if(!cr(r)){let{message:f}=W("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(f)}let{topic:n,namespaces:o}=r;await this.isValidSessionTopic(n);let i=this.client.session.get(n),s=kd(o,"update()");if(s)throw new Error(s.message);let a=H2(i.requiredNamespaces,o,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async r=>{if(!cr(r)){let{message:o}=W("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(o)}let{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!cr(r)){let{message:a}=W("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(a)}let{topic:n,request:o,chainId:i}=r;await this.isValidSessionTopic(n);let{namespaces:s}=this.client.session.get(n);if(!z2(s,i)){let{message:a}=W("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(a)}if(!c7(o)){let{message:a}=W("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(a)}if(!d7(s,i,o.method)){let{message:a}=W("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(a)}},this.isValidRespond=async r=>{if(!cr(r)){let{message:i}=W("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(i)}let{topic:n,response:o}=r;if(await this.isValidSessionTopic(n),!l7(o)){let{message:i}=W("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidPing=async r=>{if(!cr(r)){let{message:o}=W("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!cr(r)){let{message:a}=W("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(a)}let{topic:n,event:o,chainId:i}=r;await this.isValidSessionTopic(n);let{namespaces:s}=this.client.session.get(n);if(!z2(s,i)){let{message:a}=W("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(a)}if(!f7(o)){let{message:a}=W("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(a)}if(!p7(s,i,o.name)){let{message:a}=W("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(a)}},this.isValidDisconnect=async r=>{if(!cr(r)){let{message:o}=W("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}}isInitialized(){if(!this.initialized){let{message:t}=W("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(br.message,async t=>{let{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;let o=await this.client.core.crypto.decode(r,n);ol(o)?(this.client.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):Ea(o)&&(await this.client.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.client.core.expirer.on(Wr.expired,async t=>{let{topic:r,id:n}=ty(t.target);if(n&&this.getPendingSessionRequests()[n])return await this.deletePendingSessionRequest(n,W("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&await this.deleteProposal(n,!0)})}isValidPairingTopic(t){if(!Ot(t,!1)){let{message:r}=W("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){let{message:r}=W("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(go(this.client.core.pairing.pairings.get(t).expiry)){let{message:r}=W("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}async isValidSessionTopic(t){if(!Ot(t,!1)){let{message:r}=W("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(r)}if(!this.client.session.keys.includes(t)){let{message:r}=W("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(r)}if(go(this.client.session.get(t).expiry)){await this.deleteSession(t);let{message:r}=W("EXPIRED",`session topic: ${t}`);throw new Error(r)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(Ot(t,!1)){let{message:r}=W("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(r)}else{let{message:r}=W("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(r)}}async isValidProposalId(t){if(!a7(t)){let{message:r}=W("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(r)}if(!this.client.proposal.keys.includes(t)){let{message:r}=W("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(r)}if(go(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);let{message:r}=W("EXPIRED",`proposal id: ${t}`);throw new Error(r)}}},$E=class extends Ia{constructor(t,r){super(t,r,ore,jE),this.core=t,this.logger=r}},BE=class extends Ia{constructor(t,r){super(t,r,ire,jE),this.core=t,this.logger=r}},UE=class extends Ia{constructor(t,r){super(t,r,are,jE),this.core=t,this.logger=r}},cl=class extends Ig{constructor(t){super(t),this.protocol=Qk,this.version=Zk,this.name=ME.name,this.events=new Dy.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(t==null?void 0:t.name)||ME.name,this.metadata=(t==null?void 0:t.metadata)||H9();let r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:(0,Xk.default)((0,ll.getDefaultLoggerOptions)({level:(t==null?void 0:t.logger)||ME.logger}));this.core=(t==null?void 0:t.core)||new Wk(t),this.logger=(0,ll.generateChildLogger)(r,this.name),this.session=new BE(this.core,this.logger),this.proposal=new $E(this.core,this.logger),this.pendingRequest=new UE(this.core,this.logger),this.engine=new FE(this)}static async init(t){let r=new cl(t);return await r.initialize(),r}get context(){return(0,ll.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.logger.info("SignClient Initilization Success")}catch(t){throw this.logger.info("SignClient Initilization Failure"),this.logger.error(t.message),t}}};u();l();c();var pre=N(m2()),hre=N(v2()),mre=N(zc()),tM=N(w2()),rM=N(E2());var VE=N(us()),zE=N(Yg()),gre=N(S2()),nM=N(P2());var yre={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function oM(e,t){let{message:r,code:n}=yre[e];return{message:t?`${r} ${t}`:r,code:n}}u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();Vt();u();l();c();Ke();xr();u();l();c();JE();_n();Vn();wo();Eo();fe();u();l();c();u();l();c();Zr();zn();u();l();c();Vt();Ke();Ss();u();l();c();Zr();u();l();c();Ke();fe();u();l();c();u();l();c();wl();La();Ke();tn();fp();dp();rn();ja();Va();u();l();c();Zr();u();l();c();u();l();c();Ke();fe();u();l();c();rn();u();l();c();Jt();rn();var pp={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function _l(e){let t=B(D({},e),{blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?lr(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?lr(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?pp[e.type]:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0});return t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip2930"&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}var MM=vi({format:_l});function qy(e){var r;let t=(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:_l(n));return B(D({},e),{baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null})}var LM=vi({format:qy});rn();u();l();c();u();l();c();Jt();fe();Ke();Va();u();l();c();wi();zn();qa();u();l();c();Zr();wi();zn();qa();u();l();c();Eo();u();l();c();u();l();c();u();l();c();Sr();u();l();c();u();l();c();u();l();c();u();l();c();Vt();Ma();wo();u();l();c();function yp(e,{args:t,eventName:r}={}){return D(B(D({},e),{blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?BigInt(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?BigInt(e.transactionIndex):null}),r?{args:t,eventName:r}:{})}u();l();c();fe();u();l();c();u();l();c();zn();u();l();c();Zr();To();u();l();c();tn();fp();dp();rn();ja();Va();u();l();c();Jt();qa();u();l();c();fe();u();l();c();u();l();c();Vt();Er();Vn();u();l();c();fe();u();l();c();Jt();fe();u();l();c();fe();u();l();c();za();wi();zn();To();hi();fe();u();l();c();Er();xr();fe();_n();u();l();c();xr();u();l();c();Uy();Ss();To();fe();u();l();c();To();fe();u();l();c();fe();u();l();c();u();l();c();u();l();c();fe();u();l();c();u();l();c();tn();fe();rn();u();l();c();tn();rn();u();l();c();Jt();rn();var Gne={"0x0":"reverted","0x1":"success"};function QM(e){return B(D({},e),{blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(t=>yp(t)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?lr(e.transactionIndex):null,status:e.status?Gne[e.status]:null,type:e.type?pp[e.type]:null})}var ZM=vi({format:QM});u();l();c();za();Vt();Ss();wi();zn();To();u();l();c();Sr();u();l();c();Jt();Sr();u();l();c();Sr();u();l();c();Sr();u();l();c();u();l();c();tn();u();l();c();Sr();u();l();c();u();l();c();ja();u();l();c();Zr();fe();u();l();c();Zr();xn();Sr();u();l();c();Vt();jn();Qr();xo();fe();u();l();c();var g3=/^(.*)\[([0-9]*)\]$/,Xy=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Qy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();Ke();Ba();Hy();u();l();c();u();l();c();u();l();c();Ke();u();l();c();Ba();f3();u();l();c();Sr();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();Ke();var G4e=new RegExp("(?<protocol>https?:\\/\\/[^\\/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?<root>\\/)?(?<subpath>ipfs\\/|ipns\\/)?(?<target>[\\w\\-.]+)(?<subtarget>\\/.*)?"),W4e=new RegExp("^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?<target>[\\w\\-.]+))?(?<subtarget>\\/.*)?$");u();l();c();za();wi();zn();To();fe();qa();u();l();c();u();l();c();u();l();c();b3();To();Sr();Ma();Zd();u();l();c();Vt();_o();ka();Ma();wo();wi();Vn();u();l();c();Vt();Er();ka();Vn();wo();Eo();zn();u();l();c();Vt();Vn();Eo();Eo();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();var PDe=new RegExp("^error (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)$");var IDe=new RegExp("^event (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)$");var ADe=new RegExp("^function (?<name>[a-zA-Z0-9_]+)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns \\((?<returns>.*?)\\))?$");var DDe=new RegExp("^struct (?<name>[a-zA-Z0-9_]+) \\{(?<properties>.*?)\\}$");var ODe=new RegExp("^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$");u();l();c();u();l();c();u();l();c();var ZDe=new RegExp("^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z0-9_]+))?$"),eOe=new RegExp("^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z0-9_]+))?$");var cOe=new RegExp("^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\\[\\d*?\\])+?)?$");u();l();c();u();l();c();u();l();c();u();l();c();Vt();jn();Qr();Er();pi();fe();function nv(e,t){if(e.length!==t.length)throw new fl({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n];r.push(aL(o,i))}return En(r)}function aL(e,t,r=!1){if(e==="address"){let s=t;if(!Xr(s))throw new Jr({address:s});return wr(s.toLowerCase(),{size:r?32:null})}if(e==="string")return gl(t);if(e==="bytes")return t;if(e==="bool")return wr(ml(t),{size:r?32:1});let n=e.match(Qy);if(n){let[s,a,f="256"]=n,d=parseInt(f)/8;return pe(t,{size:r?32:d,signed:a==="int"})}let o=e.match(Xy);if(o){let[s,a]=o;if(parseInt(a)!==(t.length-2)/2)throw new Wd({expectedSize:parseInt(a),givenSize:(t.length-2)/2});return wr(t,{dir:"right",size:r?32:null})}let i=e.match(g3);if(i&&Array.isArray(t)){let[s,a]=i,f=[];for(let d=0;d<t.length;d++)f.push(aL(a,t[d],!0));return En(f)}throw new Ry(e)}t3();wo();Zr();u();l();c();So();_n();u();l();c();Er();u();l();c();function xp(e){return!e||typeof e!="object"||!("BYTES_PER_ELEMENT"in e)?!1:e.BYTES_PER_ELEMENT===1&&e.constructor.name==="Uint8Array"}pi();_o();xr();u();l();c();Er();xr();fe();_n();So();So();Qr();Cl();GE();Er();xn();pi();xo();_o();hi();rn();ja();dp();xr();fe();u();l();c();pl();hi();Jt();fe();Jt();u();l();c();pl();xr();fe();fp();l3();ka();u();l();c();xn();xo();_n();u();l();c();Vn();Er();fe();_n();u();l();c();u();l();c();xn();Jt();fe();u();l();c();u();l();c();Er();xr();_n();u();l();c();u();l();c();So();Cl();u();l();c();So();Cl();u();l();c();tn();_o();Jt();u();l();c();tn();Va();u();l();c();jn();Ke();gp();lp();Qr();u();l();c();jn();tn();Qr();xn();pi();hi();Jt();u();l();c();jn();tn();Qr();Er();hi();fe();wl();La();tp();u();l();c();u();l();c();bl();u();l();c();bl();u();l();c();za();u();l();c();Ss();u();l();c();vL();qa();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();Jt();u();l();c();u();l();c();fe();u();l();c();u();l();c();fe();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();fe();u();l();c();fe();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();fe();u();l();c();fe();u();l();c();fe();u();l();c();fe();u();l();c();u();l();c();fe();u();l();c();u();l();c();u();l();c();Zr();u();l();c();u();l();c();fe();u();l();c();So();u();l();c();u();l();c();So();u();l();c();fe();u();l();c();za();bl();u();l();c();Vt();Ke();Ss();Hy();gp();pl();lp();Ba();jn();tn();Ny();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();u();l();c();xr();fe();_n();Ma();Zd();wi();Vn();zn();rn();ja();Eo();Va();xr();fe();b3();Er();To();wl();La();tp();Jt();So();ka();Qr();Cl();xn();_n();pi();xo();_o();Sr();hi();function G3(e){return xp(e)||zt(e)?Y3(e):Y3(_r(e))}function W3(e){let[t,r]=e.reduce(([n,o],[i,s])=>(n.push(i),o.push(s),[n,o]),[[],[]]);return Y3(nv(t,r))}function Y3(e){let t=BigInt(Yr(e))>>BigInt(8),r=t.toString(16);return{hash:t,digest:`0x${r.padStart(64,"0")}`}}var bL=e=>{let t=/^0x[\dabcdef]+$/;return!!e.toString().match(t)&&e.length>=66},uie=(e,t)=>{if(e.length!==t.length)throw new Error("Types and values arrays must have the same length.");return{types:e,values:t}},wL=e=>!e||typeof e=="string"?G3(e!=null?e:""):W3(e.types.map((t,r)=>[t,e.values[r]])),xL=(e,t)=>t?(typeof t=="string"&&(t=uie(["string"],[t])),W3([["uint256",G3(e).hash],...t.types.map((r,n)=>[r,t.values[n]])])):W3([["uint256",G3(e).hash]]),_L=e=>e?typeof e=="string"?e:e.types.map((t,r)=>`${t}(${e.values[r]})`).join(","):"";var lie={eip155:{methods:["world_id_v1"],chains:["eip155:1"],events:["accountsChanged"]}},fie=Yp()((e,t)=>({qrData:null,config:null,result:null,connected:!1,uri:"",topic:"",errorCode:null,verificationState:"loading_widget",client:null,createClient:async(r,n,o,i,s,a=pO)=>{i&&!i.length&&console.warn(U("Cannot set empty `:param`. Defaulting to only Orb credential.",{param:"credential_types"})),e({config:{app_id:r,action:n,signal:o,action_description:s,walletConnectProjectId:a,credential_types:i!=null&&i.length?i:["orb"]}});try{let f=await cl.init({projectId:a,metadata:{name:"IDKit",description:U("Verify with World ID"),url:"https://worldcoin.org",icons:["https://worldcoin.org/icons/logo-small.svg"]}});return e({client:f}),t().connectClient(f)}catch(f){console.error(f)}},connectClient:async r=>{try{let{uri:n,approval:o}=await r.connect({requiredNamespaces:lie});if(n){t().setUri(n);let i=await o();if(typeof i<"u")return e({topic:i.topic}),t().onConnectionEstablished(r)}}catch(n){e({errorCode:"connection_failed"}),console.error(U("Unable to establish a connection with the World app."),n)}},setUri:r=>{!r||e({uri:r,verificationState:"awaiting_connection",qrData:{default:o_(r),mobile:o_(r,window.location.href)}})},onConnectionEstablished:async r=>{e({verificationState:"awaiting_verification"}),await r.request({topic:t().topic,chainId:"eip155:1",request:die(t().config)}).then(n=>{if(!pie(n))return e({errorCode:"unexpected_response"});e({result:n,verificationState:"confirmed"})}).catch(n=>{let o="generic_error",i=n.message;i&&Object.values(Do).includes(i)&&(o=i),console.warn(U("Error receiving proof: :errorCode",{errorCode:o})),console.warn(U("Raw error response"),n),e({errorCode:o,verificationState:"failed"})}).finally(()=>void r.disconnect({topic:t().topic,reason:oM("USER_DISCONNECTED")})).catch(n=>{console.error(U("Unable to disconnect: :error",{error:n}))})},resetConnection:()=>{e({result:null,config:null,qrData:null,errorCode:null,connected:!1,client:null,verificationState:"loading_widget"})}})),die=e=>({jsonrpc:"2.0",method:"world_id_v1",id:PP(1e5,9999999),params:[{app_id:e.app_id,action:_L(e.action),credential_types:e.credential_types,signal:wL(e.signal).digest,action_description:e.action_description,external_nullifier:xL(e.app_id,e.action).digest}]}),pie=e=>{if(!e||typeof e!="object")return!1;let t="proof"in e?e.proof:void 0,r="merkle_root"in e?e.merkle_root:void 0,n="nullifier_hash"in e?e.nullifier_hash:void 0;if(!("credential_type"in e?e.credential_type:void 0))return!1;for(let i of[r,n,t])if(!i||!bL(i))return!1;return!0},hie=e=>({qrData:e.qrData,result:e.result,errorCode:e.errorCode,reset:e.resetConnection,client:e.client,createClient:e.createClient,connectClient:e.connectClient,verificationState:e.verificationState}),mie=(e,t,r,n,o,i)=>{let{result:s,verificationState:a,errorCode:f,qrData:d,client:h,createClient:g,reset:v}=fie(hie),b=(0,ov.useRef)(n);return(0,ov.useEffect)(()=>{!e||h||g(e,t,r,b.current,o,i)},[e,t,r,i,o,h,g,a,b]),{result:s,reset:v,verificationState:a,errorCode:f,qrData:d}},EL=mie;u();l();c();var gie=e=>p.createElement("svg",B(D({},e),{fill:"none",strokeWidth:1.5,viewBox:"0 0 24 24",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"})),iv=gie;var yie=e=>({signal:e.signal,app_id:e.app_id,action:e.action,setStage:e.setStage,handleVerify:e.handleVerify,setErrorState:e.setErrorState,showAbout:e.methods.length==1,credential_types:e.credential_types,isExperimental:e.methods.length>0,hasPhone:e.methods.includes("phone"),action_description:e.action_description,walletConnectProjectId:e.walletConnectProjectId,usePhone:()=>e.setStage("ENTER_PHONE")}),vie=()=>{let e=Ru(),[t,r]=(0,Ep.useState)(!1),{app_id:n,action:o,signal:i,setStage:s,usePhone:a,handleVerify:f,isExperimental:d,action_description:h,credential_types:g,hasPhone:v,walletConnectProjectId:b,setErrorState:w}=Qe(yie,Nu),{result:_,qrData:C,verificationState:x,reset:S,errorCode:E}=EL(n,o,i,g,h,b);return(0,Ep.useEffect)(()=>S,[S]),(0,Ep.useEffect)(()=>{if(x==="failed"&&(s("ERROR"),w({code:E!=null?E:"generic_error"})),_){if(!d)return f(_);let T=_,{nullifier_hash:A,credential_type:O}=T,P=K(T,["nullifier_hash","credential_type"]);f({proof_payload:P,nullifier_hash:A,credential_type:O})}},[_,S,f,x,s,E,w,d]),p.createElement("div",{className:"-mt-6 space-y-6"},p.createElement("div",null,p.createElement("div",{className:"mb-2 flex items-center justify-center"},p.createElement(X0,{className:"text-0d151d h-8 dark:text-white"})),p.createElement("p",{className:"font-sora text-center text-2xl font-semibold text-gray-900 dark:text-white"},x==="awaiting_verification"?U("Confirm in World App"):U("Continue with Worldcoin")),x==="awaiting_verification"&&p.createElement("p",{className:"text-70868f dark:text-9eafc0 mt-3 text-center md:mt-2"},"Please confirm the request in your app to continue.")),x==="awaiting_verification"?p.createElement("div",{className:"flex items-center justify-center"},p.createElement(Ki,{className:"h-20 w-20"})):p.createElement(cO,{showQR:t,setShowQR:r,qrData:C}),(e=="desktop"||!t)&&(x==="awaiting_connection"||x==="loading_widget")&&p.createElement(Ic,null),v&&x=="awaiting_connection"&&p.createElement("div",{className:"hidden space-y-3 md:block"},p.createElement("div",{className:"flex items-center justify-between space-x-6"},p.createElement("div",{className:"bg-f2f5f9 dark:bg-29343f h-px flex-1"}),p.createElement("p",{className:"text-9eafc0 dark:text-596673 text-xs"},"or"),p.createElement("div",{className:"bg-f2f5f9 dark:bg-29343f h-px flex-1"})),p.createElement("div",{className:"flex items-center justify-center"},p.createElement("button",{onClick:a,className:"flex items-center space-x-2"},p.createElement(iv,{className:"text-0d151d/70 h-6 w-6 dark:text-white/70"}),p.createElement("p",{className:"text-0d151d text-sm font-medium dark:text-white"},U("Verify with Phone Number"))))))},SL=vie;u();l();c();var he=N(z());u();l();c();var J3=N(z());var bie=J3["useId".toString()]||(()=>{}),wie=0;function sv(e){let[t,r]=J3.useState(bie());return Ks(()=>{e||r(n=>n!=null?n:String(wie++))},[e]),e||(t?`radix-${t}`:"")}u();l();c();var Lr=N(z());var X3="focusScope.autoFocusOnMount",Q3="focusScope.autoFocusOnUnmount",CL={bubbles:!1,cancelable:!0};var AL=(0,Lr.forwardRef)((e,t)=>{let _=e,{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i}=_,s=K(_,["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"]),[a,f]=(0,Lr.useState)(null),d=or(o),h=or(i),g=(0,Lr.useRef)(null),v=nr(t,C=>f(C)),b=(0,Lr.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,Lr.useEffect)(()=>{if(n){let C=function(S){if(b.paused||!a)return;let E=S.target;a.contains(E)?g.current=E:Ga(g.current,{select:!0})},x=function(S){b.paused||!a||a.contains(S.relatedTarget)||Ga(g.current,{select:!0})};return document.addEventListener("focusin",C),document.addEventListener("focusout",x),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",x)}}},[n,a,b.paused]),(0,Lr.useEffect)(()=>{if(a){PL.add(b);let C=document.activeElement;if(!a.contains(C)){let S=new CustomEvent(X3,CL);a.addEventListener(X3,d),a.dispatchEvent(S),S.defaultPrevented||(xie(Tie(DL(a)),{select:!0}),document.activeElement===C&&Ga(a))}return()=>{a.removeEventListener(X3,d),setTimeout(()=>{let S=new CustomEvent(Q3,CL);a.addEventListener(Q3,h),a.dispatchEvent(S),S.defaultPrevented||Ga(C!=null?C:document.body,{select:!0}),a.removeEventListener(Q3,h),PL.remove(b)},0)}}},[a,d,h,b]);let w=(0,Lr.useCallback)(C=>{if(!r&&!n||b.paused)return;let x=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,S=document.activeElement;if(x&&S){let E=C.currentTarget,[T,A]=_ie(E);T&&A?!C.shiftKey&&S===A?(C.preventDefault(),r&&Ga(T,{select:!0})):C.shiftKey&&S===T&&(C.preventDefault(),r&&Ga(A,{select:!0})):S===E&&C.preventDefault()}},[r,n,b.paused]);return(0,Lr.createElement)(Ft.div,Se({tabIndex:-1},s,{ref:v,onKeyDown:w}))});function xie(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Ga(n,{select:t}),document.activeElement!==r)return}function _ie(e){let t=DL(e),r=TL(t,e),n=TL(t.reverse(),e);return[r,n]}function DL(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function TL(e,t){for(let r of e)if(!Eie(r,{upTo:t}))return r}function Eie(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sie(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sie(e)&&t&&e.select()}}var PL=Cie();function Cie(){let e=[];return{add(t){let r=e[0];t!==r&&(r==null||r.pause()),e=IL(e,t),e.unshift(t)},remove(t){var r;e=IL(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function IL(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Tie(e){return e.filter(t=>t.tagName!=="A")}u();l();c();var RL=N(z()),Z3=0;function NL(){(0,RL.useEffect)(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:OL()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:OL()),Z3++,()=>{Z3===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Z3--}},[])}function OL(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}u();l();c();u();l();c();u();l();c();var sF=N(iF(),1),{__extends:vje,__assign:Sn,__rest:lv,__decorate:bje,__param:wje,__esDecorate:xje,__runInitializers:_je,__propKey:Eje,__setFunctionName:Sje,__metadata:Cje,__awaiter:Tje,__generator:Pje,__exportStar:Ije,__createBinding:Aje,__values:Dje,__read:Oje,__spread:Rje,__spreadArrays:Nje,__spreadArray:aF,__await:kje,__asyncGenerator:Mje,__asyncDelegator:Lje,__asyncValues:Fje,__makeTemplateObject:$je,__importStar:Bje,__importDefault:Uje,__classPrivateFieldGet:jje,__classPrivateFieldSet:Vje,__classPrivateFieldIn:zje}=sF.default;var hv=N(z());u();l();c();var fr=N(z());u();l();c();var Wa="right-scroll-bar-position",Ya="width-before-scroll-bar",t6="with-scroll-bars-hidden",r6="--removed-body-scroll-bar-size";u();l();c();u();l();c();function uF(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}u();l();c();var cF=N(z());function lF(e,t){var r=(0,cF.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}u();l();c();function n6(e,t){return lF(t||null,function(r){return e.forEach(function(n){return uF(n,r)})})}u();l();c();u();l();c();u();l();c();function Pie(e){return e}function Iie(e,t){t===void 0&&(t=Pie);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var f=function(){var h=s;s=[],h.forEach(i)},d=function(){return Promise.resolve().then(f)};d(),r={push:function(h){s.push(h),d()},filter:function(h){return s=s.filter(h),r}}}};return o}function o6(e){e===void 0&&(e={});var t=Iie(null);return t.options=Sn({async:!0,ssr:!1},e),t}u();l();c();var fF=N(z()),dF=function(e){var t=e.sideCar,r=lv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return fF.createElement(n,Sn({},r))};dF.isSideCarExport=!0;function i6(e,t){return e.useMedium(t),dF}var fv=o6();var s6=function(){},Sp=fr.forwardRef(function(e,t){var r=fr.useRef(null),n=fr.useState({onScrollCapture:s6,onWheelCapture:s6,onTouchMoveCapture:s6}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,f=e.className,d=e.removeScrollBar,h=e.enabled,g=e.shards,v=e.sideCar,b=e.noIsolation,w=e.inert,_=e.allowPinchZoom,C=e.as,x=C===void 0?"div":C,S=lv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=v,T=n6([r,t]),A=Sn(Sn({},S),o);return fr.createElement(fr.Fragment,null,h&&fr.createElement(E,{sideCar:fv,removeScrollBar:d,shards:g,noIsolation:b,inert:w,setCallbacks:i,allowPinchZoom:!!_,lockRef:r}),s?fr.cloneElement(fr.Children.only(a),Sn(Sn({},A),{ref:T})):fr.createElement(x,Sn({},A,{className:f,ref:T}),a))});Sp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sp.classNames={fullWidth:Ya,zeroRight:Wa};u();l();c();u();l();c();var Xe=N(z());u();l();c();u();l();c();var dv=N(z());u();l();c();u();l();c();u();l();c();var mF=N(z());u();l();c();u();l();c();var pF;var hF=function(){if(pF)return pF;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Aie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hF();return t&&e.setAttribute("nonce",t),e}function Die(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oie(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a6=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Aie())&&(Die(t,r),Oie(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var u6=function(){var e=a6();return function(t,r){mF.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Cp=function(){var e=u6(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};u();l();c();var Rie={left:0,top:0,right:0,gap:0},c6=function(e){return parseInt(e||"",10)||0},Nie=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[c6(r),c6(n),c6(o)]},l6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rie;var t=Nie(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var kie=Cp(),Mie=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
45
|
+
.`.concat(t6,` {
|
|
46
|
+
overflow: hidden `).concat(n,`;
|
|
47
|
+
padding-right: `).concat(a,"px ").concat(n,`;
|
|
48
|
+
}
|
|
49
|
+
body {
|
|
50
|
+
overflow: hidden `).concat(n,`;
|
|
51
|
+
overscroll-behavior: contain;
|
|
52
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
53
|
+
padding-left: `.concat(o,`px;
|
|
54
|
+
padding-top: `).concat(i,`px;
|
|
55
|
+
padding-right: `).concat(s,`px;
|
|
56
|
+
margin-left:0;
|
|
57
|
+
margin-top:0;
|
|
58
|
+
margin-right: `).concat(a,"px ").concat(n,`;
|
|
59
|
+
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.`).concat(Wa,` {
|
|
63
|
+
right: `).concat(a,"px ").concat(n,`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.`).concat(Ya,` {
|
|
67
|
+
margin-right: `).concat(a,"px ").concat(n,`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.`).concat(Wa," .").concat(Wa,` {
|
|
71
|
+
right: 0 `).concat(n,`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.`).concat(Ya," .").concat(Ya,` {
|
|
75
|
+
margin-right: 0 `).concat(n,`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
body {
|
|
79
|
+
`).concat(r6,": ").concat(a,`px;
|
|
80
|
+
}
|
|
81
|
+
`)},f6=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=dv.useMemo(function(){return l6(o)},[o]);return dv.createElement(kie,{styles:Mie(i,!t,o,r?"":"!important")})};u();l();c();var d6=!1;if(typeof window<"u")try{Tp=Object.defineProperty({},"passive",{get:function(){return d6=!0,!0}}),window.addEventListener("test",Tp,Tp),window.removeEventListener("test",Tp,Tp)}catch{d6=!1}var Tp,Ja=d6?{passive:!1}:!1;u();l();c();var Lie=function(e){return e.tagName==="TEXTAREA"},gF=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Lie(e)&&r[t]==="visible")},Fie=function(e){return gF(e,"overflowY")},$ie=function(e){return gF(e,"overflowX")},p6=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=yF(e,r);if(n){var o=vF(e,r),i=o[1],s=o[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Bie=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Uie=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},yF=function(e,t){return e==="v"?Fie(t):$ie(t)},vF=function(e,t){return e==="v"?Bie(t):Uie(t)},jie=function(e,t){return e==="h"&&t==="rtl"?-1:1},bF=function(e,t,r,n,o){var i=jie(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,f=t.contains(a),d=!1,h=s>0,g=0,v=0;do{var b=vF(e,a),w=b[0],_=b[1],C=b[2],x=_-C-i*w;(w||x)&&yF(e,a)&&(g+=x,v+=w),a=a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(h&&(o&&g===0||!o&&s>g)||!h&&(o&&v===0||!o&&-s>v))&&(d=!0),d};var pv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wF=function(e){return[e.deltaX,e.deltaY]},xF=function(e){return e&&"current"in e?e.current:e},Vie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zie=function(e){return`
|
|
82
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
83
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
84
|
+
`)},Hie=0,Pl=[];function _F(e){var t=Xe.useRef([]),r=Xe.useRef([0,0]),n=Xe.useRef(),o=Xe.useState(Hie++)[0],i=Xe.useState(function(){return Cp()})[0],s=Xe.useRef(e);Xe.useEffect(function(){s.current=e},[e]),Xe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=aF([e.lockRef.current],(e.shards||[]).map(xF),!0).filter(Boolean);return _.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=Xe.useCallback(function(_,C){if("touches"in _&&_.touches.length===2)return!s.current.allowPinchZoom;var x=pv(_),S=r.current,E="deltaX"in _?_.deltaX:S[0]-x[0],T="deltaY"in _?_.deltaY:S[1]-x[1],A,O=_.target,P=Math.abs(E)>Math.abs(T)?"h":"v";if("touches"in _&&P==="h"&&O.type==="range")return!1;var I=p6(P,O);if(!I)return!0;if(I?A=P:(A=P==="v"?"h":"v",I=p6(P,O)),!I)return!1;if(!n.current&&"changedTouches"in _&&(E||T)&&(n.current=A),!A)return!0;var R=n.current||A;return bF(R,C,_,R==="h"?E:T,!0)},[]),f=Xe.useCallback(function(_){var C=_;if(!(!Pl.length||Pl[Pl.length-1]!==i)){var x="deltaY"in C?wF(C):pv(C),S=t.current.filter(function(A){return A.name===C.type&&A.target===C.target&&Vie(A.delta,x)})[0];if(S&&S.should){C.cancelable&&C.preventDefault();return}if(!S){var E=(s.current.shards||[]).map(xF).filter(Boolean).filter(function(A){return A.contains(C.target)}),T=E.length>0?a(C,E[0]):!s.current.noIsolation;T&&C.cancelable&&C.preventDefault()}}},[]),d=Xe.useCallback(function(_,C,x,S){var E={name:_,delta:C,target:x,should:S};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(T){return T!==E})},1)},[]),h=Xe.useCallback(function(_){r.current=pv(_),n.current=void 0},[]),g=Xe.useCallback(function(_){d(_.type,wF(_),_.target,a(_,e.lockRef.current))},[]),v=Xe.useCallback(function(_){d(_.type,pv(_),_.target,a(_,e.lockRef.current))},[]);Xe.useEffect(function(){return Pl.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Ja),document.addEventListener("touchmove",f,Ja),document.addEventListener("touchstart",h,Ja),function(){Pl=Pl.filter(function(_){return _!==i}),document.removeEventListener("wheel",f,Ja),document.removeEventListener("touchmove",f,Ja),document.removeEventListener("touchstart",h,Ja)}},[]);var b=e.removeScrollBar,w=e.inert;return Xe.createElement(Xe.Fragment,null,w?Xe.createElement(i,{styles:zie(o)}):null,b?Xe.createElement(f6,{gapMode:"margin"}):null)}var EF=i6(fv,_F);var SF=hv.forwardRef(function(e,t){return hv.createElement(Sp,Sn({},e,{ref:t,sideCar:EF}))});SF.classNames=Sp.classNames;var h6=SF;u();l();c();var qie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Il=new WeakMap,mv=new WeakMap,gv={},m6=0,CF=function(e){return e&&(e.host||CF(e.parentNode))},Kie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=CF(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},Gie=function(e,t,r,n){var o=Kie(t,Array.isArray(e)?e:[e]);gv[r]||(gv[r]=new WeakMap);var i=gv[r],s=[],a=new Set,f=new Set(o),d=function(g){!g||a.has(g)||(a.add(g),d(g.parentNode))};o.forEach(d);var h=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(a.has(v))h(v);else{var b=v.getAttribute(n),w=b!==null&&b!=="false",_=(Il.get(v)||0)+1,C=(i.get(v)||0)+1;Il.set(v,_),i.set(v,C),s.push(v),_===1&&w&&mv.set(v,!0),C===1&&v.setAttribute(r,"true"),w||v.setAttribute(n,"true")}})};return h(t),a.clear(),m6++,function(){s.forEach(function(g){var v=Il.get(g)-1,b=i.get(g)-1;Il.set(g,v),i.set(g,b),v||(mv.has(g)||g.removeAttribute(n),mv.delete(g)),b||g.removeAttribute(r)}),m6--,m6||(Il=new WeakMap,Il=new WeakMap,mv=new WeakMap,gv={})}},TF=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||qie(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Gie(n,o,r,"aria-hidden")):function(){return null}};var PF="Dialog",[IF,hze]=Mu(PF),[Wie,Cs]=IF(PF),Yie=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=(0,he.useRef)(null),f=(0,he.useRef)(null),[d=!1,h]=Em({prop:n,defaultProp:o,onChange:i});return(0,he.createElement)(Wie,{scope:t,triggerRef:a,contentRef:f,contentId:sv(),titleId:sv(),descriptionId:sv(),open:d,onOpenChange:h,onOpenToggle:(0,he.useCallback)(()=>h(g=>!g),[h]),modal:s},r)};var AF="DialogPortal",[Jie,DF]=IF(AF,{forceMount:void 0}),Xie=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=Cs(AF,t);return(0,he.createElement)(Jie,{scope:t,forceMount:r},he.Children.map(n,s=>(0,he.createElement)(Gs,{present:r||i.open},(0,he.createElement)(xm,{asChild:!0,container:o},s))))},g6="DialogOverlay",Qie=(0,he.forwardRef)((e,t)=>{let r=DF(g6,e.__scopeDialog),s=e,{forceMount:n=r.forceMount}=s,o=K(s,["forceMount"]),i=Cs(g6,e.__scopeDialog);return i.modal?(0,he.createElement)(Gs,{present:n||i.open},(0,he.createElement)(Zie,Se({},o,{ref:t}))):null}),Zie=(0,he.forwardRef)((e,t)=>{let i=e,{__scopeDialog:r}=i,n=K(i,["__scopeDialog"]),o=Cs(g6,r);return(0,he.createElement)(h6,{as:Gi,allowPinchZoom:!0,shards:[o.contentRef]},(0,he.createElement)(Ft.div,Se({"data-state":RF(o.open)},n,{ref:t,style:D({pointerEvents:"auto"},n.style)})))}),Al="DialogContent",ese=(0,he.forwardRef)((e,t)=>{let r=DF(Al,e.__scopeDialog),s=e,{forceMount:n=r.forceMount}=s,o=K(s,["forceMount"]),i=Cs(Al,e.__scopeDialog);return(0,he.createElement)(Gs,{present:n||i.open},i.modal?(0,he.createElement)(tse,Se({},o,{ref:t})):(0,he.createElement)(rse,Se({},o,{ref:t})))}),tse=(0,he.forwardRef)((e,t)=>{let r=Cs(Al,e.__scopeDialog),n=(0,he.useRef)(null),o=nr(t,r.contentRef,n);return(0,he.useEffect)(()=>{let i=n.current;if(i)return TF(i)},[]),(0,he.createElement)(OF,Se({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xt(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:xt(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:xt(e.onFocusOutside,i=>i.preventDefault())}))}),rse=(0,he.forwardRef)((e,t)=>{let r=Cs(Al,e.__scopeDialog),n=(0,he.useRef)(!1);return(0,he.createElement)(OF,Se({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,s;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);let a=o.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(a))&&o.preventDefault()}}))}),OF=(0,he.forwardRef)((e,t)=>{let h=e,{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i}=h,s=K(h,["__scopeDialog","trapFocus","onOpenAutoFocus","onCloseAutoFocus"]),a=Cs(Al,r),f=(0,he.useRef)(null),d=nr(t,f);return NL(),(0,he.createElement)(he.Fragment,null,(0,he.createElement)(AL,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},(0,he.createElement)(xw,Se({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":RF(a.open)},s,{ref:d,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),nse="DialogTitle";var ose="DialogClose",ise=(0,he.forwardRef)((e,t)=>{let i=e,{__scopeDialog:r}=i,n=K(i,["__scopeDialog"]),o=Cs(ose,r);return(0,he.createElement)(Ft.button,Se({type:"button"},n,{ref:t,onClick:xt(e.onClick,()=>o.onOpenChange(!1))}))});function RF(e){return e?"open":"closed"}var sse="DialogTitleWarning",[mze,gze]=OP(sse,{contentName:Al,titleName:nse,docsSlug:"dialog"});var NF=Yie;var kF=Xie,MF=Qie,LF=ese;var FF=ise;var kl=N(z(),1);u();l();c();var use=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 188 32",clipRule:"evenodd",fillRule:"evenodd"}),p.createElement("g",{clipPath:"url(#clip0_17_787)"},p.createElement("path",{d:"M68.7294 9.91241C72.0806 9.91241 74.8174 12.6489 74.8174 15.9997C74.8174 19.3504 72.0806 22.0869 68.7294 22.0869C65.3781 22.0869 62.6413 19.3504 62.6413 15.9997C62.6413 12.6489 65.3502 9.91241 68.7294 9.91241ZM68.7294 6.98047C63.7584 6.98047 59.709 11.0293 59.709 15.9997C59.709 20.97 63.7584 25.0189 68.7294 25.0189C73.7003 25.0189 77.7497 20.97 77.7497 15.9997C77.7497 11.0014 73.7003 6.98047 68.7294 6.98047Z",fill:"black"}),p.createElement("path",{d:"M156.112 9.91241C159.463 9.91241 162.2 12.6489 162.2 15.9997C162.2 19.3504 159.463 22.0869 156.112 22.0869C152.761 22.0869 150.024 19.3504 150.024 15.9997C150.024 12.6489 152.761 9.91241 156.112 9.91241ZM156.112 6.98047C151.141 6.98047 147.092 11.0293 147.092 15.9997C147.092 20.97 151.141 25.0189 156.112 25.0189C161.083 25.0189 165.133 20.97 165.133 15.9997C165.133 11.0014 161.111 6.98047 156.112 6.98047Z",fill:"black"}),p.createElement("path",{d:"M142.511 18.0939C141.645 20.4395 139.411 22.0869 136.786 22.0869C133.435 22.0869 130.698 19.3504 130.698 15.9997C130.698 12.6489 133.435 9.91241 136.786 9.91241C139.411 9.91241 141.645 11.5878 142.511 13.9054H145.555C144.633 9.94033 141.059 6.98047 136.786 6.98047C131.815 6.98047 127.766 11.0293 127.766 15.9997C127.766 20.97 131.815 25.0189 136.786 25.0189C141.059 25.0189 144.633 22.059 145.555 18.0939H142.511Z",fill:"black"}),p.createElement("path",{d:"M117.209 10.1937C120.477 10.1937 123.13 12.9301 123.018 16.2251C122.906 19.3804 120.225 21.8097 117.07 21.8097H113.858V10.1937H117.209ZM117.209 7.26172H110.926V24.7416H117.209C122.041 24.7416 125.95 20.8324 125.95 16.0017C125.95 11.171 122.041 7.26172 117.209 7.26172Z",fill:"black"}),p.createElement("path",{d:"M170.216 7.28906H167.283V24.7131H170.216V7.28906Z",fill:"black"}),p.createElement("path",{d:"M44.0696 24.7947L47.3929 11.978L50.7162 24.7947H54.7377L59.2898 7.20312H56.2737L52.727 20.8576L49.1803 7.20312H45.6056L42.0589 20.8576L38.5122 7.20312H35.4961L40.0482 24.7947H44.0696Z",fill:"black"}),p.createElement("path",{d:"M176.079 12.3158L184.96 24.7137H185.295H187.892V7.28964H184.96V19.6875L176.079 7.26172H175.855L175.827 7.28964H173.146V24.7137H176.079V12.3158Z",fill:"black"}),p.createElement("path",{d:"M99.4753 7.28906H96.543V24.7131H108.775V21.7812H99.4753V7.28906Z",fill:"black"}),p.createElement("path",{d:"M90.9038 17.5363C92.6911 16.6428 93.9199 14.8277 93.9199 12.7056C93.9199 9.7178 91.4902 7.31641 88.53 7.31641H83.0005H79.9844V18.1227V24.7405H83.0005V18.0948H84.6761C88.2507 18.2065 91.0993 21.1105 91.0993 24.7126H94.1154C94.1433 21.8644 92.8866 19.2955 90.9038 17.5363ZM83.0005 15.0791V10.3042H88.53C89.8426 10.3042 90.9038 11.3653 90.9038 12.6777C90.9038 13.9901 89.8426 15.0791 88.53 15.0791H83.0005Z",fill:"black"}),p.createElement("path",{d:"M30.7195 9.77312C29.9097 7.87434 28.7647 6.17103 27.2845 4.6911C25.8044 3.21117 24.1288 2.06632 22.2298 1.25654C20.247 0.418848 18.1525 0 16.0021 0C13.8238 0 11.7293 0.418848 9.7744 1.25654C7.87537 2.06632 6.17184 3.21117 4.69171 4.6911C3.21159 6.17103 2.06659 7.87434 1.25671 9.77312C0.418903 11.7277 0 13.822 0 16C0 18.1501 0.418903 20.2443 1.25671 22.2269C2.06659 24.1257 3.21159 25.829 4.69171 27.3089C6.17184 28.7888 7.87537 29.9337 9.7744 30.7155C11.7572 31.5532 13.8517 31.9721 16.0021 31.9721C18.1525 31.9721 20.247 31.5532 22.2298 30.7155C24.1288 29.9058 25.8323 28.7609 27.3125 27.281C28.7926 25.801 29.9376 24.0977 30.7475 22.1989C31.5853 20.2164 32.0042 18.1222 32.0042 15.9721C32.0042 13.822 31.5574 11.7277 30.7195 9.77312ZM10.696 14.4921C11.3383 11.9232 13.6842 10.0524 16.4489 10.0524H27.5638C28.2899 11.4206 28.7367 12.9284 28.9043 14.4921H10.696ZM28.9043 17.5079C28.7367 19.0716 28.262 20.5794 27.5638 21.9476H16.4489C13.6842 21.9476 11.3662 20.0489 10.696 17.5079H28.9043ZM6.81415 6.81326C9.27172 4.35602 12.5392 3.01571 16.0021 3.01571C19.465 3.01571 22.7325 4.35602 25.19 6.81326C25.2738 6.89703 25.3297 6.95288 25.4134 7.03665H16.4489C14.0472 7.03665 11.8131 7.95811 10.1095 9.66143C8.76903 11.0017 7.9033 12.6771 7.62403 14.4921H3.09988C3.435 11.5881 4.71964 8.9075 6.81415 6.81326ZM16.0021 28.9843C12.5392 28.9843 9.27172 27.644 6.81415 25.1867C4.71964 23.0925 3.435 20.3839 3.09988 17.5079H7.62403C7.93123 19.3229 8.79696 20.9983 10.1095 22.3386C11.8131 24.0419 14.0472 24.9633 16.4489 24.9633H25.4134C25.3297 25.0471 25.2738 25.103 25.19 25.1867C22.7325 27.644 19.465 28.9843 16.0021 28.9843Z",fill:"black"})),p.createElement("defs",null,p.createElement("clipPath",{id:"clip0_17_787"},p.createElement("rect",{width:"187.892",height:"32",fill:"white"})))),$F=use;u();l();c();var cse=e=>p.createElement("svg",B(D({},e),{fill:"none",strokeWidth:1.5,viewBox:"0 0 24 24",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18"})),BF=cse;u();l();c();u();l();c();var P$=N(HF(),1);var Si=N(z(),1);u();l();c();u();l();c();var b6=N(z());function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yv.apply(this,arguments)}function gse(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var yse=["cdnSuffix","cdnUrl","countryCode","style","svg"],vse="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",bse="svg",wse=127397,xse=function(t){var r=t.cdnSuffix,n=r===void 0?bse:r,o=t.cdnUrl,i=o===void 0?vse:o,s=t.countryCode,a=t.style,f=t.svg,d=f===void 0?!1:f,h=gse(t,yse);if(typeof s!="string")return null;if(d){var g=""+i+s.toLowerCase()+"."+n;return(0,b6.createElement)("img",Object.assign({},h,{src:g,style:yv({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},a)}))}var v=s.toUpperCase().replace(/./g,function(b){return String.fromCodePoint(b.charCodeAt(0)+wse)});return(0,b6.createElement)("span",Object.assign({role:"img"},h,{style:yv({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},a)}),v)},w6=xse;var N6=N(YF(),1);u();l();c();var XF=N(z(),1);u();l();c();var xv=N(z(),1);u();l();c();var wv=typeof window>"u"||typeof document>"u";var tt=wv?xv.useEffect:xv.useLayoutEffect;u();l();c();var JF=N(z(),1);function nn(e){let t=(0,JF.useRef)(e);return tt(()=>{t.current=e},[e]),t}function x6(e,t){let[r,n]=(0,XF.useState)(e),o=nn(e);return tt(()=>n(o.current),[o,n,...t]),r}u();l();c();var _v=N(z(),1);u();l();c();u();l();c();function QF(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function qn(){let e=[],t=[],r={enqueue(n){t.push(n)},addEventListener(n,o,i,s){return n.addEventListener(o,i,s),r.add(()=>n.removeEventListener(o,i,s))},requestAnimationFrame(...n){let o=requestAnimationFrame(...n);return r.add(()=>cancelAnimationFrame(o))},nextFrame(...n){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...n))},setTimeout(...n){let o=setTimeout(...n);return r.add(()=>clearTimeout(o))},microTask(...n){let o={current:!0};return QF(()=>{o.current&&n[0]()}),r.add(()=>{o.current=!1})},add(n){return e.push(n),()=>{let o=e.indexOf(n);if(o>=0){let[i]=e.splice(o,1);i()}}},dispose(){for(let n of e.splice(0))n()},async workQueue(){for(let n of t.splice(0))await n()}};return r}function Ts(){let[e]=(0,_v.useState)(qn);return(0,_v.useEffect)(()=>()=>e.dispose(),[e]),e}u();l();c();var ZF=N(z(),1);var ut=function(e){let t=nn(e);return ZF.default.useCallback((...r)=>t.current(...r),[t])};u();l();c();var E6=N(z(),1);u();l();c();var Ap=N(z(),1),_6={serverHandoffComplete:!1};function Dp(){let[e,t]=(0,Ap.useState)(_6.serverHandoffComplete);return(0,Ap.useEffect)(()=>{e!==!0&&t(!0)},[e]),(0,Ap.useEffect)(()=>{_6.serverHandoffComplete===!1&&(_6.serverHandoffComplete=!0)},[]),e}var e$,_se=0;function t$(){return++_se}var Op=(e$=E6.default.useId)!=null?e$:function(){let e=Dp(),[t,r]=E6.default.useState(e?t$:null);return tt(()=>{t===null&&r(t$())},[t]),t!=null?""+t:void 0};u();l();c();var Np=N(z(),1);u();l();c();u();l();c();function Be(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Be),n}u();l();c();function Ev(e){return wv?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}var r$=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Ese=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ese||{}),Sse=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Sse||{}),Cse=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Cse||{});var Rp=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Rp||{});function Sv(e,t=0){var r;return e===((r=Ev(e))==null?void 0:r.body)?!1:Be(t,{[0](){return e.matches(r$)},[1](){let n=e;for(;n!==null;){if(n.matches(r$))return!0;n=n.parentElement}return!1}})}var Wze=["textarea","input"].join(",");function n$(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}u();l();c();var o$=N(z(),1);function Cv(e,t,r){let n=nn(t);(0,o$.useEffect)(()=>{function o(i){n.current(i)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function i$(e,t,r=!0){let n=(0,Np.useRef)(!1);(0,Np.useEffect)(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function o(s,a){if(!n.current||s.defaultPrevented)return;let f=function h(g){return typeof g=="function"?h(g()):Array.isArray(g)||g instanceof Set?g:[g]}(e),d=a(s);if(d!==null&&!!d.getRootNode().contains(d)){for(let h of f){if(h===null)continue;let g=h instanceof HTMLElement?h:h.current;if(g!=null&&g.contains(d))return}return!Sv(d,Rp.Loose)&&d.tabIndex!==-1&&s.preventDefault(),t(s,d)}}let i=(0,Np.useRef)(null);Cv("mousedown",s=>{var a,f;n.current&&(i.current=((f=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:f[0])||s.target)},!0),Cv("click",s=>{!i.current||(o(s,()=>i.current),i.current=null)},!0),Cv("blur",s=>o(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}u();l();c();var a$=N(z(),1);function s$(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function u$(e,t){let[r,n]=(0,a$.useState)(()=>s$(e));return tt(()=>{n(s$(e))},[e.type,e.as]),tt(()=>{r||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}u();l();c();var Tv=N(z(),1);var Tse=Symbol();function Ei(...e){let t=(0,Tv.useRef)(e);(0,Tv.useEffect)(()=>{t.current=e},[e]);let r=ut(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Tse]))?void 0:r}u();l();c();function Pse(e){throw new Error("Unexpected object: "+e)}var Cn=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Cn||{});function c$(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n!=null?n:-1,i=(()=>{switch(e.focus){case 0:return r.findIndex(s=>!t.resolveDisabled(s));case 1:{let s=r.slice().reverse().findIndex((a,f,d)=>o!==-1&&d.length-f-1>=o?!1:!t.resolveDisabled(a));return s===-1?s:r.length-1-s}case 2:return r.findIndex((s,a)=>a<=o?!1:!t.resolveDisabled(s));case 3:{let s=r.slice().reverse().findIndex(a=>!t.resolveDisabled(a));return s===-1?s:r.length-1-s}case 4:return r.findIndex(s=>t.resolveId(s)===e.id);case 5:return null;default:Pse(e)}})();return i===-1?n:i}u();l();c();var Tn=N(z(),1);var Dl=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Dl||{}),Po=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Po||{});function Kn({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s}){let a=l$(t,e);if(i)return Pv(a,r,n,s);let f=o!=null?o:0;if(f&2){let d=a,{static:g=!1}=d,v=K(d,["static"]);if(g)return Pv(v,r,n,s)}if(f&1){let h=a,{unmount:g=!0}=h,v=K(h,["unmount"]);return Be(g?0:1,{[0](){return null},[1](){return Pv(B(D({},v),{hidden:!0,style:{display:"none"}}),r,n,s)}})}return Pv(a,r,n,s)}function Pv(e,t={},r,n){let g=S6(e,["unmount","static"]),{as:o=r,children:i,refName:s="ref"}=g,a=K(g,["as","children","refName"]),f=e.ref!==void 0?{[s]:e.ref}:{},d=typeof i=="function"?i(t):i;a.className&&typeof a.className=="function"&&(a.className=a.className(t));let h={};if(t){let v=!1,b=[];for(let[w,_]of Object.entries(t))typeof _=="boolean"&&(v=!0),_===!0&&b.push(w);v&&(h["data-headlessui-state"]=b.join(" "))}if(o===Tn.Fragment&&Object.keys(Iv(a)).length>0){if(!(0,Tn.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(v=>` - ${v}`).join(`
|
|
85
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(`
|
|
86
|
+
`)].join(`
|
|
87
|
+
`));return(0,Tn.cloneElement)(d,Object.assign({},l$(d.props,Iv(S6(a,["ref"]))),h,f,Ise(d.ref,f.ref)))}return(0,Tn.createElement)(o,Object.assign({},S6(a,["ref"]),o!==Tn.Fragment&&f,o!==Tn.Fragment&&h),d)}function Ise(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function l$(...e){var t;if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={};for(let o of e)for(let i in o)i.startsWith("on")&&typeof o[i]=="function"?((t=n[i])!=null||(n[i]=[]),n[i].push(o[i])):r[i]=o[i];if(r.disabled||r["aria-disabled"])return Object.assign(r,Object.fromEntries(Object.keys(n).map(o=>[o,void 0])));for(let o in n)Object.assign(r,{[o](i,...s){let a=n[o];for(let f of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;f(i,...s)}}});return r}function Pn(e){var t;return Object.assign((0,Tn.forwardRef)(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Iv(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function S6(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}u();l();c();function f$(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&Ase(r)?!1:n}function Ase(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}u();l();c();function C6(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))p$(r,d$(t,n),o);return r}function d$(e,t){return e?e+"["+t+"]":t}function p$(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())p$(e,d$(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):C6(r,t,e)}u();l();c();var Dse="div",T6=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(T6||{}),h$=Pn(function(e,t){let i=e,{features:r=1}=i,n=K(i,["features"]),o={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:D({position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},(r&4)===4&&(r&2)!==2&&{display:"none"})};return Kn({ourProps:o,theirProps:n,slot:{},defaultTag:Dse,name:"Hidden"})});u();l();c();var Ol=N(z(),1),P6=(0,Ol.createContext)(null);P6.displayName="OpenClosedContext";var Io=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Io||{});function kp(){return(0,Ol.useContext)(P6)}function Av({value:e,children:t}){return Ol.default.createElement(P6.Provider,{value:e},t)}u();l();c();var Nt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Nt||{});u();l();c();var Rl=N(z(),1);function m$(e,t,r){let[n,o]=(0,Rl.useState)(r),i=e!==void 0,s=(0,Rl.useRef)(i),a=(0,Rl.useRef)(!1),f=(0,Rl.useRef)(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!f.current&&(f.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,ut(d=>(i||o(d),t==null?void 0:t(d)))]}u();l();c();var g$=N(z(),1);function Dv(){let e=(0,g$.useRef)(!1);return tt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}u();l();c();var Ue=N(z(),1);var Ose=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ose||{}),Rse=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Rse||{}),Nse=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Nse||{}),kse=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(kse||{});function I6(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=n$(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}var Mse={[1](e){return e.disabled||e.listboxState===1?e:B(D({},e),{activeOptionIndex:null,listboxState:1})},[0](e){if(e.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{value:r,mode:n,compare:o}=e.propsRef.current,i=e.options.findIndex(s=>{let a=s.dataRef.current.value;return Be(n,{[1]:()=>r.some(f=>o(f,a)),[0]:()=>o(r,a)})});return i!==-1&&(t=i),B(D({},e),{listboxState:0,activeOptionIndex:t})},[2](e,t){return e.disabled===t.disabled?e:B(D({},e),{disabled:t.disabled})},[3](e,t){return e.orientation===t.orientation?e:B(D({},e),{orientation:t.orientation})},[4](e,t){var r;if(e.disabled||e.listboxState===1)return e;let n=I6(e),o=c$(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return B(D(D({},e),n),{searchQuery:"",activeOptionIndex:o,activationTrigger:(r=t.trigger)!=null?r:1})},[5]:(e,t)=>{if(e.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?B(D({},e),{searchQuery:n}):B(D({},e),{searchQuery:n,activeOptionIndex:i,activationTrigger:1})},[6](e){return e.disabled||e.listboxState===1||e.searchQuery===""?e:B(D({},e),{searchQuery:""})},[7]:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=I6(e,o=>[...o,r]);if(e.activeOptionIndex===null){let{value:o,mode:i,compare:s}=e.propsRef.current,a=t.dataRef.current.value;Be(i,{[1]:()=>o.some(f=>s(f,a)),[0]:()=>s(o,a)})&&(n.activeOptionIndex=n.options.indexOf(r))}return D(D({},e),n)},[8]:(e,t)=>{let r=I6(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return B(D(D({},e),r),{activationTrigger:1})}},A6=(0,Ue.createContext)(null);A6.displayName="ListboxContext";function Mp(e){let t=(0,Ue.useContext)(A6);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Mp),r}return t}function Lse(e,t){return Be(t.type,Mse,e,t)}var Fse=Ue.Fragment,$se=Pn(function(e,t){let P=e,{value:r,defaultValue:n,name:o,onChange:i,by:s=(I,R)=>I===R,disabled:a=!1,horizontal:f=!1,multiple:d=!1}=P,h=K(P,["value","defaultValue","name","onChange","by","disabled","horizontal","multiple"]),g=f?"horizontal":"vertical",v=Ei(t),[b,w]=m$(r,i,n),_=(0,Ue.useReducer)(Lse,{listboxState:1,propsRef:{current:{value:b,onChange:w,mode:d?1:0,compare:ut(typeof s=="string"?(I,R)=>{let k=s;return(I==null?void 0:I[k])===(R==null?void 0:R[k])}:s)}},labelRef:(0,Ue.createRef)(),buttonRef:(0,Ue.createRef)(),optionsRef:(0,Ue.createRef)(),disabled:a,orientation:g,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:C,propsRef:x,optionsRef:S,buttonRef:E},T]=_;x.current.value=b,x.current.mode=d?1:0,tt(()=>{x.current.onChange=I=>Be(x.current.mode,{[0](){return w(I)},[1](){let R=x.current.value.slice(),{compare:k}=x.current,L=R.findIndex(M=>k(M,I));return L===-1?R.push(I):R.splice(L,1),w(R)}})},[w,x]),tt(()=>T({type:2,disabled:a}),[a]),tt(()=>T({type:3,orientation:g}),[g]),i$([E,S],(I,R)=>{var k;T({type:1}),Sv(R,Rp.Loose)||(I.preventDefault(),(k=E.current)==null||k.focus())},C===0);let A=(0,Ue.useMemo)(()=>({open:C===0,disabled:a,value:b}),[C,a,b]),O={ref:v};return Ue.default.createElement(A6.Provider,{value:_},Ue.default.createElement(Av,{value:Be(C,{[0]:Io.Open,[1]:Io.Closed})},o!=null&&b!=null&&C6({[o]:b}).map(([I,R])=>Ue.default.createElement(h$,D({features:T6.Hidden},Iv({key:I,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:I,value:R})))),Kn({ourProps:O,theirProps:h,slot:A,defaultTag:Fse,name:"Listbox"})))}),Bse="button",Use=Pn(function(e,t){var r;let[n,o]=Mp("Listbox.Button"),i=Ei(n.buttonRef,t),s=`headlessui-listbox-button-${Op()}`,a=Ts(),f=ut(_=>{switch(_.key){case Nt.Space:case Nt.Enter:case Nt.ArrowDown:_.preventDefault(),o({type:0}),a.nextFrame(()=>{n.propsRef.current.value||o({type:4,focus:Cn.First})});break;case Nt.ArrowUp:_.preventDefault(),o({type:0}),a.nextFrame(()=>{n.propsRef.current.value||o({type:4,focus:Cn.Last})});break}}),d=ut(_=>{switch(_.key){case Nt.Space:_.preventDefault();break}}),h=ut(_=>{if(f$(_.currentTarget))return _.preventDefault();n.listboxState===0?(o({type:1}),a.nextFrame(()=>{var C;return(C=n.buttonRef.current)==null?void 0:C.focus({preventScroll:!0})})):(_.preventDefault(),o({type:0}))}),g=x6(()=>{if(n.labelRef.current)return[n.labelRef.current.id,s].join(" ")},[n.labelRef.current,s]),v=(0,Ue.useMemo)(()=>({open:n.listboxState===0,disabled:n.disabled,value:n.propsRef.current.value}),[n]),b=e,w={ref:i,id:s,type:u$(e,n.buttonRef),"aria-haspopup":!0,"aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.disabled?void 0:n.listboxState===0,"aria-labelledby":g,disabled:n.disabled,onKeyDown:f,onKeyUp:d,onClick:h};return Kn({ourProps:w,theirProps:b,slot:v,defaultTag:Bse,name:"Listbox.Button"})}),jse="label",Vse=Pn(function(e,t){let[r]=Mp("Listbox.Label"),n=`headlessui-listbox-label-${Op()}`,o=Ei(r.labelRef,t),i=ut(()=>{var a;return(a=r.buttonRef.current)==null?void 0:a.focus({preventScroll:!0})}),s=(0,Ue.useMemo)(()=>({open:r.listboxState===0,disabled:r.disabled}),[r]);return Kn({ourProps:{ref:o,id:n,onClick:i},theirProps:e,slot:s,defaultTag:jse,name:"Listbox.Label"})}),zse="ul",Hse=Dl.RenderStrategy|Dl.Static,qse=Pn(function(e,t){var r;let[n,o]=Mp("Listbox.Options"),i=Ei(n.optionsRef,t),s=`headlessui-listbox-options-${Op()}`,a=Ts(),f=Ts(),d=kp(),h=(()=>d!==null?d===Io.Open:n.listboxState===0)();(0,Ue.useEffect)(()=>{var C;let x=n.optionsRef.current;!x||n.listboxState===0&&x!==((C=Ev(x))==null?void 0:C.activeElement)&&x.focus({preventScroll:!0})},[n.listboxState,n.optionsRef]);let g=ut(C=>{switch(f.dispose(),C.key){case Nt.Space:if(n.searchQuery!=="")return C.preventDefault(),C.stopPropagation(),o({type:5,value:C.key});case Nt.Enter:if(C.preventDefault(),C.stopPropagation(),n.activeOptionIndex!==null){let{dataRef:x}=n.options[n.activeOptionIndex];n.propsRef.current.onChange(x.current.value)}n.propsRef.current.mode===0&&(o({type:1}),qn().nextFrame(()=>{var x;return(x=n.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})}));break;case Be(n.orientation,{vertical:Nt.ArrowDown,horizontal:Nt.ArrowRight}):return C.preventDefault(),C.stopPropagation(),o({type:4,focus:Cn.Next});case Be(n.orientation,{vertical:Nt.ArrowUp,horizontal:Nt.ArrowLeft}):return C.preventDefault(),C.stopPropagation(),o({type:4,focus:Cn.Previous});case Nt.Home:case Nt.PageUp:return C.preventDefault(),C.stopPropagation(),o({type:4,focus:Cn.First});case Nt.End:case Nt.PageDown:return C.preventDefault(),C.stopPropagation(),o({type:4,focus:Cn.Last});case Nt.Escape:return C.preventDefault(),C.stopPropagation(),o({type:1}),a.nextFrame(()=>{var x;return(x=n.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})});case Nt.Tab:C.preventDefault(),C.stopPropagation();break;default:C.key.length===1&&(o({type:5,value:C.key}),f.setTimeout(()=>o({type:6}),350));break}}),v=x6(()=>{var C,x,S;return(S=(C=n.labelRef.current)==null?void 0:C.id)!=null?S:(x=n.buttonRef.current)==null?void 0:x.id},[n.labelRef.current,n.buttonRef.current]),b=(0,Ue.useMemo)(()=>({open:n.listboxState===0}),[n]),w=e,_={"aria-activedescendant":n.activeOptionIndex===null||(r=n.options[n.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":n.propsRef.current.mode===1?!0:void 0,"aria-labelledby":v,"aria-orientation":n.orientation,id:s,onKeyDown:g,role:"listbox",tabIndex:0,ref:i};return Kn({ourProps:_,theirProps:w,slot:b,defaultTag:zse,features:Hse,visible:h,name:"Listbox.Options"})}),Kse="li",Gse=Pn(function(e,t){let A=e,{disabled:r=!1,value:n}=A,o=K(A,["disabled","value"]),[i,s]=Mp("Listbox.Option"),a=`headlessui-listbox-option-${Op()}`,f=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===a:!1,{value:d,compare:h}=i.propsRef.current,g=Be(i.propsRef.current.mode,{[1]:()=>d.some(O=>h(O,n)),[0]:()=>h(d,n)}),v=(0,Ue.useRef)(null),b=Ei(t,v);tt(()=>{if(i.listboxState!==0||!f||i.activationTrigger===0)return;let O=qn();return O.requestAnimationFrame(()=>{var P,I;(I=(P=v.current)==null?void 0:P.scrollIntoView)==null||I.call(P,{block:"nearest"})}),O.dispose},[v,f,i.listboxState,i.activationTrigger,i.activeOptionIndex]);let w=(0,Ue.useRef)({disabled:r,value:n,domRef:v});tt(()=>{w.current.disabled=r},[w,r]),tt(()=>{w.current.value=n},[w,n]),tt(()=>{var O,P;w.current.textValue=(P=(O=v.current)==null?void 0:O.textContent)==null?void 0:P.toLowerCase()},[w,v]);let _=ut(()=>i.propsRef.current.onChange(n));tt(()=>(s({type:7,id:a,dataRef:w}),()=>s({type:8,id:a})),[w,a]);let C=ut(O=>{if(r)return O.preventDefault();_(),i.propsRef.current.mode===0&&(s({type:1}),qn().nextFrame(()=>{var P;return(P=i.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})}))}),x=ut(()=>{if(r)return s({type:4,focus:Cn.Nothing});s({type:4,focus:Cn.Specific,id:a})}),S=ut(()=>{r||f||s({type:4,focus:Cn.Specific,id:a,trigger:0})}),E=ut(()=>{r||!f||s({type:4,focus:Cn.Nothing})}),T=(0,Ue.useMemo)(()=>({active:f,selected:g,disabled:r}),[f,g,r]);return Kn({ourProps:{id:a,ref:b,role:"option",tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":g,disabled:void 0,onClick:C,onFocus:x,onPointerMove:S,onMouseMove:S,onPointerLeave:E,onMouseLeave:E},theirProps:o,slot:T,defaultTag:Kse,name:"Listbox.Option"})}),Nl=Object.assign($se,{Button:Use,Label:Vse,Options:qse,Option:Gse});u();l();c();var de=N(z(),1);u();l();c();u();l();c();u();l();c();function y$(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function D6(e,...t){e&&t.length>0&&e.classList.add(...t)}function O6(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ov=(e=>(e.Ended="ended",e.Cancelled="cancelled",e))(Ov||{});function Wse(e,t){let r=qn();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:o}=getComputedStyle(e),[i,s]=[n,o].map(a=>{let[f=0]=a.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,h)=>h-d);return f});if(i+s!==0){let a=[];a.push(r.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(a.splice(0).forEach(d=>d()),a.push(r.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(t("ended"),a.splice(0).forEach(h=>h()))}),r.addEventListener(e,"transitioncancel",d=>{d.target===d.currentTarget&&(t("cancelled"),a.splice(0).forEach(h=>h()))})))}))}else t("ended");return r.add(()=>t("cancelled")),r.dispose}function v$(e,t,r,n){let o=r?"enter":"leave",i=qn(),s=n!==void 0?y$(n):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=Be(o,{enter:()=>t.enter,leave:()=>t.leave}),f=Be(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),d=Be(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return O6(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),D6(e,...a,...d),i.nextFrame(()=>{O6(e,...d),D6(e,...f),Wse(e,h=>(h==="ended"&&(O6(e,...a),D6(e,...t.entered)),s(h)))}),i.dispose}function b$({container:e,direction:t,classes:r,onStart:n,onStop:o}){let i=Dv(),s=Ts(),a=nn(t);tt(()=>{let f=qn();s.add(f.dispose);let d=e.current;if(!!d&&a.current!=="idle"&&!!i.current)return f.dispose(),n.current(a.current),f.add(v$(d,r.current,a.current==="enter",h=>{f.dispose(),Be(h,{[Ov.Ended](){o.current(a.current)},[Ov.Cancelled]:()=>{}})})),f.dispose},[t])}function Qa(e=""){return e.split(" ").filter(t=>t.trim().length>1)}var Rv=(0,de.createContext)(null);Rv.displayName="TransitionContext";var Yse=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Yse||{});function Jse(){let e=(0,de.useContext)(Rv);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Xse(){let e=(0,de.useContext)(Nv);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}var Nv=(0,de.createContext)(null);Nv.displayName="NestingContext";function kv(e){return"children"in e?kv(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function x$(e,t){let r=nn(e),n=(0,de.useRef)([]),o=Dv(),i=Ts(),s=ut((b,w=Po.Hidden)=>{let _=n.current.findIndex(({el:C})=>C===b);_!==-1&&(Be(w,{[Po.Unmount](){n.current.splice(_,1)},[Po.Hidden](){n.current[_].state="hidden"}}),i.microTask(()=>{var C;!kv(n)&&o.current&&((C=r.current)==null||C.call(r))}))}),a=ut(b=>{let w=n.current.find(({el:_})=>_===b);return w?w.state!=="visible"&&(w.state="visible"):n.current.push({el:b,state:"visible"}),()=>s(b,Po.Unmount)}),f=(0,de.useRef)([]),d=(0,de.useRef)(Promise.resolve()),h=(0,de.useRef)({enter:[],leave:[],idle:[]}),g=ut((b,w,_)=>{f.current.splice(0),t&&(t.chains.current[w]=t.chains.current[w].filter(([C])=>C!==b)),t==null||t.chains.current[w].push([b,new Promise(C=>{f.current.push(C)})]),t==null||t.chains.current[w].push([b,new Promise(C=>{Promise.all(h.current[w].map(([x,S])=>S)).then(()=>C())})]),w==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>_(w)):_(w)}),v=ut((b,w,_)=>{Promise.all(h.current[w].splice(0).map(([C,x])=>x)).then(()=>{var C;(C=f.current.shift())==null||C()}).then(()=>_(w))});return(0,de.useMemo)(()=>({children:n,register:a,unregister:s,onStart:g,onStop:v,wait:d,chains:h}),[a,s,n,g,v,h,d])}function Qse(){}var Zse=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function w$(e){var t;let r={};for(let n of Zse)r[n]=(t=e[n])!=null?t:Qse;return r}function eae(e){let t=(0,de.useRef)(w$(e));return(0,de.useEffect)(()=>{t.current=w$(e)},[e]),t}var tae="div",_$=Dl.RenderStrategy,E$=Pn(function(e,t){let te=e,{beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:i,enter:s,enterFrom:a,enterTo:f,entered:d,leave:h,leaveFrom:g,leaveTo:v}=te,b=K(te,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),w=(0,de.useRef)(null),_=Ei(w,t),C=b.unmount?Po.Unmount:Po.Hidden,{show:x,appear:S,initial:E}=Jse(),[T,A]=(0,de.useState)(x?"visible":"hidden"),O=Xse(),{register:P,unregister:I}=O,R=(0,de.useRef)(null);(0,de.useEffect)(()=>P(w),[P,w]),(0,de.useEffect)(()=>{if(C===Po.Hidden&&!!w.current){if(x&&T!=="visible"){A("visible");return}return Be(T,{hidden:()=>I(w),visible:()=>P(w)})}},[T,w,P,I,x,C]);let k=nn({enter:Qa(s),enterFrom:Qa(a),enterTo:Qa(f),entered:Qa(d),leave:Qa(h),leaveFrom:Qa(g),leaveTo:Qa(v)}),L=eae({beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:i}),M=Dp();(0,de.useEffect)(()=>{if(M&&T==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,T,M]);let F=E&&!S,j=(()=>!M||F||R.current===x?"idle":x?"enter":"leave")(),V=ut(Z=>Be(Z,{enter:()=>L.current.beforeEnter(),leave:()=>L.current.beforeLeave(),idle:()=>{}})),G=ut(Z=>Be(Z,{enter:()=>L.current.afterEnter(),leave:()=>L.current.afterLeave(),idle:()=>{}})),H=x$(()=>{A("hidden"),I(w)},O);b$({container:w,classes:k,direction:j,onStart:nn(Z=>{H.onStart(w,Z,V)}),onStop:nn(Z=>{H.onStop(w,Z,G),Z==="leave"&&!kv(H)&&(A("hidden"),I(w))})}),(0,de.useEffect)(()=>{!F||(C===Po.Hidden?R.current=null:R.current=x)},[x,F,T]);let ee=b,we={ref:_};return de.default.createElement(Nv.Provider,{value:H},de.default.createElement(Av,{value:Be(T,{visible:Io.Open,hidden:Io.Closed})},Kn({ourProps:we,theirProps:ee,defaultTag:tae,features:_$,visible:T==="visible",name:"Transition.Child"})))}),R6=Pn(function(e,t){let x=e,{show:r,appear:n=!1,unmount:o}=x,i=K(x,["show","appear","unmount"]),s=(0,de.useRef)(null),a=Ei(s,t);Dp();let f=kp();if(r===void 0&&f!==null&&(r=Be(f,{[Io.Open]:!0,[Io.Closed]:!1})),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,h]=(0,de.useState)(r?"visible":"hidden"),g=x$(()=>{h("hidden")}),[v,b]=(0,de.useState)(!0),w=(0,de.useRef)([r]);tt(()=>{v!==!1&&w.current[w.current.length-1]!==r&&(w.current.push(r),b(!1))},[w,r]);let _=(0,de.useMemo)(()=>({show:r,appear:n,initial:v}),[r,n,v]);(0,de.useEffect)(()=>{if(r)h("visible");else if(!kv(g))h("hidden");else{let S=s.current;if(!S)return;let E=S.getBoundingClientRect();E.x===0&&E.y===0&&E.width===0&&E.height===0&&h("hidden")}},[r,g]);let C={unmount:o};return de.default.createElement(Nv.Provider,{value:g},de.default.createElement(Rv.Provider,{value:_},Kn({ourProps:B(D({},C),{as:de.Fragment,children:de.default.createElement(E$,D(D({ref:a},C),i))}),theirProps:{},defaultTag:de.Fragment,features:_$,visible:d==="visible",name:"Transition"})))}),rae=Pn(function(e,t){let r=(0,de.useContext)(Rv)!==null,n=kp()!==null;return de.default.createElement(de.default.Fragment,null,!r&&n?de.default.createElement(R6,D({ref:t},e)):de.default.createElement(E$,D({ref:t},e)))}),S$=Object.assign(R6,{Child:rae,Root:R6});u();l();c();var nae=e=>p.createElement("svg",B(D({},e),{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"}),p.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.846",d:"m1.004 1 4 4 4-4"})),C$=nae;var Gn=N(z(),1),oae=({value:e,onChange:t})=>{let[r,n]=(0,Gn.useState)("us"),o=(0,Gn.useRef)(null);(0,Gn.useEffect)(()=>{let s=o.current;if(!s)return;let a=0,f=g=>{s.scrollTop+=g.deltaY},d=g=>{a=s.scrollTop+g.touches[0].pageY},h=g=>{s.scrollTop=a-g.touches[0].pageY};return s.addEventListener("wheel",f),s.addEventListener("touchstart",d),s.addEventListener("touchmove",h),()=>{s.removeEventListener("wheel",f),s.removeEventListener("touchstart",d),s.removeEventListener("touchmove",h)}},[]);let i=(0,Gn.useCallback)(()=>{let s=o.current;if(!s)return;let a=s.getBoundingClientRect();s.style.maxHeight=`${window.innerHeight-a.top-12}px`},[]);return(0,Gn.useEffect)(()=>{t(N6.allCountries.find(s=>s.iso2===r).dialCode)},[r,t]),p.createElement(Nl,{value:r,onChange:n},({open:s})=>p.createElement(p.Fragment,null,p.createElement(Nl.Label,{className:"sr-only block text-sm font-medium text-gray-700"},U("Country Code")),p.createElement(Nl.Button,{className:"relative z-20 flex flex-none items-center"},p.createElement(w6,{svg:!0,countryCode:r,style:{width:24,height:24,flexShrink:0,objectFit:"cover",borderRadius:"50%"}}),p.createElement("p",{className:"ml-2.5 mr-1 dark:text-white"},"+",e),p.createElement(C$,{className:"text-9eafc0 h-1.5 w-auto shrink-0 basis-4","aria-hidden":"true"})),p.createElement(S$,{show:s,as:Gn.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",beforeEnter:i,unmount:!1},p.createElement(Nl.Options,{ref:o,className:"dark:bg-29343f absolute inset-x-0 top-full z-10 mt-1.5 max-h-[var(--max-h,_0px)] w-full min-w-[calc(100vw_-_48px)] overflow-hidden rounded-2xl bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm md:max-h-96 md:min-w-[20rem]",unmount:!1},p.createElement("div",{className:"overflow-y-scroll px-2 py-1"},N6.allCountries.map(a=>p.createElement(Nl.Option,{key:a.iso2,className:({selected:f,active:d})=>wt("dark:text-white",f?"bg-0d151d dark:bg-white text-white dark:text-0d151d font-medium":d?"bg-0d151d/5 dark:bg-ece8fb/10":"text-gray-900 dark:text-white","relative flex items-center justify-between px-2 py-2 w-full rounded-xl text-sm focus:bg-gray-100 dark:focus:bg-ece8fb/25","focus:outline-none select-none"),value:a.iso2},({selected:f})=>p.createElement(p.Fragment,null,p.createElement("div",{className:"flex items-center"},p.createElement(w6,{svg:!0,countryCode:a.iso2,style:{width:24,height:24,flexShrink:0}}),p.createElement("p",{className:"mx-2 whitespace-pre-wrap"},a.name),f?p.createElement("span",{className:"text-white"},p.createElement(Im,{className:"h-auto w-3","aria-hidden":"true"})):null),p.createElement("span",{className:wt("font-medium",f?"text-white dark:text-0d151d":"text-0d151d dark:text-white")},"+",a.dialCode)))))))))},T$=oae;var iae=({setPhoneNumber:e})=>({setPhoneNumber:e}),sae=({disabled:e,onSubmit:t})=>{let{setPhoneNumber:r}=Qe(iae),[n,o]=(0,Si.useState)("1"),[i,s]=(0,Si.useState)("");return(0,Si.useEffect)(()=>{let a=(0,P$.phone)(`+${n} ${i}`);if(!a.isValid){r("");return}r(a.phoneNumber)},[n,i,r]),p.createElement(Si.Fragment,null,p.createElement("label",{htmlFor:"phone-number",className:"sr-only block text-sm font-medium text-gray-700"},U("Phone Number")),p.createElement("div",{className:"dark:bg-29343f focus-within:border-0d151d relative mt-1 flex rounded-2xl border-2 border-transparent bg-gray-100 py-2 px-3 shadow-sm transition-colors focus-within:bg-white dark:focus-within:border-white dark:focus-within:bg-transparent"},p.createElement("div",{className:"flex items-center"},p.createElement("label",{htmlFor:"country",className:"sr-only"},U("Country")),p.createElement(T$,{value:n,onChange:o})),p.createElement("input",{type:"tel",name:"phone-number",value:i,placeholder:U("Phone number"),onChange:a=>s(a.target.value),className:"placeholder:text-9eafc0 block w-full rounded-md border-transparent bg-transparent pl-6 focus:border-transparent focus:ring-transparent dark:text-white sm:text-sm",disabled:e,onKeyDown:a=>a.key==="Enter"&&void(t==null?void 0:t())})))},I$=(0,Si.memo)(sae);u();l();c();var aae="https://world-id-lens-bridge.vercel.app/api/v1";async function Mv(e,t,r,n){let o=await O$("/phone/request",{phone_number:e,app_id:t,channel:r,ph_distinct_id:n});if(!o.ok)throw await o.json()}async function A$(e,t,r,n){let o=await O$("/phone/verify",{phone_number:e,code:t,app_id:r,ph_distinct_id:n});if(!o.ok)throw await o.json();return o.json()}function Lv(e){return typeof e=="object"&&e!==null&&Object.prototype.hasOwnProperty.call(e,"code")&&Object.prototype.hasOwnProperty.call(e,"detail")}function D$(e){return typeof e=="object"&&e!==null&&Object.prototype.hasOwnProperty.call(e,"code")}var O$=(e,t)=>fetch(`${aae}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});var cae=({processing:e,errorState:t,phoneNumber:r,setStage:n,methods:o,setProcessing:i,setErrorState:s,app_id:a})=>({processing:e,errorState:t,app_id:a,phoneNumber:r,showAbout:o.length==1,hasWorldID:o.includes("orb"),useWorldID:()=>n("WORLD_ID"),onSubmit:async()=>{try{i(!0),s(null),await Mv(r,a,"sms",tu()),qS(),i(!1),n("ENTER_CODE")}catch(f){console.error(f),i(!1);let d;Lv(f)?(d=Object.values(Qv).includes(f.code)&&f.detail||void 0,f.code!=="timeout"&&n("ERROR")):n("ERROR"),s({code:"invalid_phone_otp",message:d})}},onResetErrorState:()=>{s(null)}}),lae=()=>{let{phoneNumber:e,processing:t,showAbout:r,onSubmit:n,errorState:o,onResetErrorState:i,hasWorldID:s,useWorldID:a}=Qe(cae);return p.createElement("div",{className:"-mt-6 space-y-6"},p.createElement(n8,{className:"absolute -mt-1 flex gap-4 rounded-md bg-[#fecaca] p-3 shadow-lg",open:!!o,onOpenChange:i,asChild:!0},p.createElement(lt.div,{initial:{opacity:0,y:-40},animate:{opacity:1,y:0},transition:{duration:.3}},p.createElement(o8,{className:"text-xs font-medium text-red-600"},U((o==null?void 0:o.message)||"Unable to send code. Please try again.")),p.createElement(i8,{altText:"Close"},p.createElement(ku,{className:"h-4 w-4"})))),p.createElement("div",null,p.createElement("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white"},U("Verify with Phone"))),p.createElement("div",{className:"mt-2 space-y-2"},p.createElement(I$,{disabled:t,onSubmit:n}),p.createElement("p",{className:"text-9eafc0 dark:text-9eafc0 text-center text-xs"},U("We'll call or text to confirm your number. No data is stored."))),p.createElement("div",{className:"mt-4 flex justify-center"},p.createElement(lt.button,{animate:{opacity:e?1:.4},type:"button",whileTap:{scale:e?.95:1},whileHover:{scale:e?1.05:1},transition:{layout:{duration:.15}},onClick:()=>void n(),layoutId:"phone-button",disabled:!e||t,className:wt("flex w-full items-center justify-center px-8 py-4 border border-transparent font-medium rounded-xl shadow-sm","bg-0d151d dark:bg-white text-white dark:text-0d151d","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","disabled:cursor-not-allowed disabled:bg-d3dfea dark:disabled:bg-29343f")},p.createElement(lt.span,{transition:{layout:{duration:.15}},layoutId:"phone-text"},U("Continue")))),r&&p.createElement(Ic,null),s&&p.createElement("div",{className:"hidden space-y-3 md:block"},p.createElement("div",{className:"flex items-center justify-between space-x-6"},p.createElement("div",{className:"bg-f2f5f9 dark:bg-29343f h-px flex-1"}),p.createElement("p",{className:"text-9eafc0 dark:text-596673 text-xs"},"or"),p.createElement("div",{className:"bg-f2f5f9 dark:bg-29343f h-px flex-1"})),p.createElement("div",{className:"flex items-center justify-center"},p.createElement("button",{onClick:a,className:"flex items-center space-x-2"},p.createElement(Yi,null),p.createElement("p",{className:"text-0d151d text-sm font-medium dark:text-white"},U("Verify with World ID"))))))},R$=lae;u();l();c();var Uv=N(z(),1);u();l();c();var $v=N(z(),1);u();l();c();var Wn=N(z()),Re=N(mw());function k$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function M$(e,t,r){return t&&N$(e.prototype,t),r&&N$(e,r),e}function L$(e,t){if(typeof t!="function"&&t!==null)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}}),t&&k6(e,t)}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Fv(e)}function k6(e,t){return k6=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},k6(e,t)}function fae(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function dae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pae(e,t){return t&&(typeof t=="object"||typeof t=="function")?t:dae(e)}function F$(e){var t=fae();return function(){var n=Fv(e),o;if(t){var i=Fv(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return pae(this,o)}}function hae(e){return mae(e)||gae(e)||yae(e)||vae()}function mae(e){if(Array.isArray(e))return M6(e)}function gae(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function yae(e,t){if(!!e){if(typeof e=="string")return M6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M6(e,t)}}function M6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
88
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=String(e);if(t===0)return r;var n=r.match(/(.*?)([0-9]+)(.*)/),o=n?n[1]:"",i=n?n[3]:"",s=n?n[2]:r,a=s.length>=t?s:(hae(Array(t)).map(function(){return"0"}).join("")+s).slice(t*-1);return"".concat(o).concat(a).concat(i)}var $$={daysInHours:!1,zeroPadTime:2};function bae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.now,n=r===void 0?Date.now:r,o=t.precision,i=o===void 0?0:o,s=t.controlled,a=t.offsetTime,f=a===void 0?0:a,d=t.overtime,h;typeof e=="string"?h=new Date(e).getTime():e instanceof Date?h=e.getTime():h=e,s||(h+=f);var g=s?h:h-n(),v=Math.min(20,Math.max(0,i)),b=Math.round(parseFloat(((d?g:Math.max(0,g))/1e3).toFixed(v))*1e3),w=Math.abs(b)/1e3;return{total:b,days:Math.floor(w/(3600*24)),hours:Math.floor(w/3600%24),minutes:Math.floor(w/60%60),seconds:Math.floor(w%60),milliseconds:Number((w%1*1e3).toFixed()),completed:b<=0}}function wae(e,t){var r=e.days,n=e.hours,o=e.minutes,i=e.seconds,s=Object.assign(Object.assign({},$$),t),a=s.daysInHours,f=s.zeroPadTime,d=s.zeroPadDays,h=d===void 0?f:d,g=Math.min(2,f),v=a?Lp(n+r*24,f):Lp(n,g);return{days:a?"":Lp(r,h),hours:v,minutes:Lp(o,g),seconds:Lp(i,g)}}var B$=function(e){L$(r,e);var t=F$(r);function r(){var n;return k$(this,r),n=t.apply(this,arguments),n.state={count:n.props.count||3},n.startCountdown=function(){n.interval=window.setInterval(function(){var o=n.state.count-1;o===0?(n.stopCountdown(),n.props.onComplete&&n.props.onComplete()):n.setState(function(i){return{count:i.count-1}})},1e3)},n.stopCountdown=function(){clearInterval(n.interval)},n.addTime=function(o){n.stopCountdown(),n.setState(function(i){return{count:i.count+o}},n.startCountdown)},n}return M$(r,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?(0,Wn.cloneElement)(this.props.children,{count:this.state.count}):null}}]),r}(Wn.Component);B$.propTypes={count:Re.number,children:Re.element,onComplete:Re.func};var L6=function(e){L$(r,e);var t=F$(r);function r(n){var o;if(k$(this,r),o=t.call(this,n),o.mounted=!1,o.initialTimestamp=o.calcOffsetStartTimestamp(),o.offsetStartTimestamp=o.props.autoStart?0:o.initialTimestamp,o.offsetTime=0,o.legacyMode=!1,o.legacyCountdownRef=(0,Wn.createRef)(),o.tick=function(){var s=o.calcTimeDelta(),a=s.completed&&!o.props.overtime?void 0:o.props.onTick;o.setTimeDeltaState(s,void 0,a)},o.start=function(){if(!o.isStarted()){var s=o.offsetStartTimestamp;o.offsetStartTimestamp=0,o.offsetTime+=s?o.calcOffsetStartTimestamp()-s:0;var a=o.calcTimeDelta();o.setTimeDeltaState(a,"STARTED",o.props.onStart),!o.props.controlled&&(!a.completed||o.props.overtime)&&(o.clearTimer(),o.interval=window.setInterval(o.tick,o.props.intervalDelay))}},o.pause=function(){o.isPaused()||(o.clearTimer(),o.offsetStartTimestamp=o.calcOffsetStartTimestamp(),o.setTimeDeltaState(o.state.timeDelta,"PAUSED",o.props.onPause))},o.stop=function(){o.isStopped()||(o.clearTimer(),o.offsetStartTimestamp=o.calcOffsetStartTimestamp(),o.offsetTime=o.offsetStartTimestamp-o.initialTimestamp,o.setTimeDeltaState(o.calcTimeDelta(),"STOPPED",o.props.onStop))},o.isStarted=function(){return o.isStatus("STARTED")},o.isPaused=function(){return o.isStatus("PAUSED")},o.isStopped=function(){return o.isStatus("STOPPED")},o.isCompleted=function(){return o.isStatus("COMPLETED")},n.date){var i=o.calcTimeDelta();o.state={timeDelta:i,status:i.completed?"COMPLETED":"STOPPED"}}else o.legacyMode=!0;return o}return M$(r,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(o){this.legacyMode||this.props.date!==o.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var o=this.props,i=o.date,s=o.now,a=o.precision,f=o.controlled,d=o.overtime;return bae(i,{now:s,precision:a,controlled:f,offsetTime:this.offsetTime,overtime:d})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(o){this.legacyCountdownRef.current.addTime(o)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(o){return this.state.status===o}},{key:"setTimeDeltaState",value:function(o,i,s){var a=this;if(!!this.mounted){var f=o.completed&&!this.state.timeDelta.completed,d=o.completed&&i==="STARTED";f&&!this.props.overtime&&this.clearTimer();var h=function(){s&&s(a.state.timeDelta),a.props.onComplete&&(f||d)&&a.props.onComplete(o,d)};return this.setState(function(g){var v=i||g.status;return o.completed&&!a.props.overtime?v="COMPLETED":!i&&v==="COMPLETED"&&(v="STOPPED"),{timeDelta:o,status:v}},h)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var o=this.props,i=o.daysInHours,s=o.zeroPadTime,a=o.zeroPadDays,f=this.state.timeDelta;return Object.assign(Object.assign({},f),{api:this.getApi(),props:this.props,formatted:wae(f,{daysInHours:i,zeroPadTime:s,zeroPadDays:a})})}},{key:"render",value:function(){if(this.legacyMode){var o=this.props,i=o.count,s=o.children,a=o.onComplete;return(0,Wn.createElement)(B$,{ref:this.legacyCountdownRef,count:i,onComplete:a},s)}var f=this.props,d=f.className,h=f.overtime,g=f.children,v=f.renderer,b=this.getRenderProps();if(v)return v(b);if(g&&this.state.timeDelta.completed&&!h)return(0,Wn.cloneElement)(g,{countdown:b});var w=b.formatted,_=w.days,C=w.hours,x=w.minutes,S=w.seconds;return(0,Wn.createElement)("span",{className:d},b.total<0?"-":"",_,_?":":"",C,":",x,":",S)}}]),r}(Wn.Component);L6.defaultProps=Object.assign(Object.assign({},$$),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});L6.propTypes={date:(0,Re.oneOfType)([(0,Re.instanceOf)(Date),Re.string,Re.number]),daysInHours:Re.bool,zeroPadTime:Re.number,zeroPadDays:Re.number,controlled:Re.bool,intervalDelay:Re.number,precision:Re.number,autoStart:Re.bool,overtime:Re.bool,className:Re.string,children:Re.element,renderer:Re.func,now:Re.func,onMount:Re.func,onStart:Re.func,onPause:Re.func,onStop:Re.func,onTick:Re.func,onComplete:Re.func};var U$=L6;var j$=59*1e3,xae=({minutes:e,seconds:t,completed:r})=>{if(!r)return p.createElement("span",null,"in ",e,":",t<10?`0${t}`:t)},_ae=()=>{let{phoneNumber:e,app_id:t,setProcessing:r,setStage:n,setErrorState:o}=Qe(),[i,s]=(0,$v.useState)(new Date().getTime()+j$),a=async f=>{s(new Date().getTime()+j$);try{r(!0),await Mv(e,t,f,tu()),KS(f),r(!1)}catch(d){r(!1),s(void 0),Lv(d)&&d.code!=="server_error"?(o({code:"generic_error"}),console.error(d)):n("ERROR")}};return p.createElement(p.Fragment,null,p.createElement("button",{type:"button",disabled:!!i,className:"font-medium text-indigo-500 disabled:cursor-wait disabled:text-gray-900 dark:disabled:text-white",onClick:()=>void a("sms")},U("Resend")," ",i&&p.createElement(U$,{onComplete:()=>s(void 0),date:i,renderer:xae}))," ","or"," ",p.createElement("button",{type:"button",className:"font-medium text-indigo-500 disabled:cursor-wait disabled:text-gray-900 dark:disabled:text-white",disabled:!!i,onClick:()=>void a("call")},U("Call me")))},V$=(0,$v.memo)(_ae);u();l();c();var Ct=N(z(),1),Bv=e=>new Array(6).fill("").map((t,r)=>e[r]||""),Eae=({code:e,setCode:t})=>({code:e,setCode:t}),Sae=({submitRef:e,disabled:t})=>{let{code:r,setCode:n}=Qe(Eae),o=(0,Ct.useMemo)(()=>new Array(6).fill(null).map(()=>(0,Ct.createRef)()),[]),[i,s]=(0,Ct.useState)(Bv("")),[a,f]=(0,Ct.useState)(-1);(0,Ct.useEffect)(()=>{r||s(Bv(""))},[r]);let d=(0,Ct.useCallback)(x=>{requestAnimationFrame(()=>{var S;(S=o[x].current)==null||S.select()})},[o]),h=(0,Ct.useCallback)((x,S)=>{let E=[...i];E[S]=x,s(E);let T=E.join("");n(""),T.length===6&&n(T)},[n,i]),g=(0,Ct.useCallback)(x=>{requestAnimationFrame(()=>{var S,E;(E=(S=o[x])==null?void 0:S.current)==null||E.focus()})},[o]),v=(0,Ct.useCallback)(x=>{requestAnimationFrame(()=>{var S;(S=o[x].current)==null||S.blur()})},[o]),b=x=>{var S;!((S=o[x])!=null&&S.current)||(f(x),d(x))},w=(0,Ct.useCallback)((x,S)=>{let E=x.target.value.replace(i[S],"");if(!/^\d/.test(E))return d(S);if(E.length>1)return s(Bv(x.target.value)),x.target.value.length!==6?void 0:(n(x.target.value),v(S));h(E,S),S===5?requestAnimationFrame(()=>{var T;(T=e.current)==null||T.focus()}):g(S+1)},[v,e,g,d,n,h,i]),_=(0,Ct.useCallback)((x,S)=>{if(x.key==="Backspace"||x.key==="Delete")return x.preventDefault(),h("",a),g(S-1);if(x.key===i[S]){if(S===5)return v(S);g(S+1)}},[g,v,a,h,i]),C=(0,Ct.useCallback)((x,S)=>{x.preventDefault();let T=x.clipboardData.getData("text").slice(0,6);if(!!/^\d/.test(T)){if(s(Bv(T)),T.length!==6)return g(T.length);n(T),v(S)}},[v,g,n]);return(0,Ct.useEffect)(()=>{g(0)},[g,o]),p.createElement("fieldset",{className:"flex items-center justify-center space-x-3"},p.createElement("legend",{className:"sr-only"},U("Enter your SMS code")),o.map((x,S)=>p.createElement("input",{ref:x,key:S,maxLength:1,type:"number",pattern:"[0-9]*",value:i[S],inputMode:"numeric",autoComplete:"one-time-code",autoFocus:S===0,onFocus:()=>b(S),onPaste:E=>C(E,S),onChange:E=>w(E,S),onKeyDown:E=>_(E,S),className:wt("w-10 xs:w-12 aspect-[6/7] border-0 outline-0 rounded-xl text-center caret-transparent text-29343f dark:text-white","bg-gray-100 dark:bg-29343f focus:bg-transparent","ring ring-transparent focus:ring-5b52f3"),disabled:t})))},z$=(0,Ct.memo)(Sae);var Cae=({processing:e,phoneNumber:t,code:r,setStage:n,setProcessing:o,setCode:i,handleVerify:s,setErrorState:a,errorState:f,app_id:d})=>({processing:e,phoneNumber:t,code:r,errorState:f,setCode:i,setErrorState:a,app_id:d,onSubmit:async()=>{try{a(null),o(!0);let h=await A$(t,r,d,tu()),{nullifier_hash:g}=h,v=K(h,["nullifier_hash"]);s({credential_type:"phone",nullifier_hash:g,proof_payload:v})}catch(g){o(!1),i(""),D$(g)?(a({code:"invalid_phone_otp"}),console.error(g)):n("ERROR")}},useWorldID:()=>n("WORLD_ID")}),Tae=()=>{let e=(0,Uv.useRef)(null),{phoneNumber:t,processing:r,code:n,onSubmit:o,useWorldID:i,errorState:s}=Qe(Cae),a=(0,Uv.useMemo)(()=>{if(!r&&s)return{x:[0,-16,16,-8,8,0]}},[r,s]);return p.createElement("div",{className:"space-y-6"},p.createElement("div",null,p.createElement("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white"},U("Enter your 6-digit code to complete the verification.")),p.createElement("p",{className:"text-70868f mt-2 text-center"},U("Code has been sent to")," ",p.createElement("span",{className:"font-medium"},t))),p.createElement("form",{className:"mt-2 space-y-2"},p.createElement(lt.div,{animate:a,transition:{type:"spring",stiffness:30}},p.createElement(z$,{submitRef:e,disabled:r})),p.createElement("p",{className:"text-70868f text-center text-xs"},s?p.createElement("span",{className:"text-red-400"},U("That code is invalid. Please try again.")):U("Did not receive a code?")," ",p.createElement(V$,null))),p.createElement("div",{className:"flex items-center justify-center space-x-1"},p.createElement("div",{className:"flex items-center space-x-2"},p.createElement(Yi,null),p.createElement("p",{className:"text-70868f font-medium"},U("I have World ID"))),p.createElement("span",{className:"font-medium text-gray-400"},"\u2022"),p.createElement("button",{type:"button",onClick:i,className:"bg-gradient-to-r from-[#FF6848] to-[#4940E0] bg-clip-text font-medium text-transparent"},U("Verify human"))),p.createElement("div",{className:"mt-4 flex justify-center"},p.createElement(lt.button,{layoutId:"phone-button",type:"button",whileTap:{scale:t?.95:1},whileHover:{scale:t?1.05:1},animate:{opacity:n?1:.4},transition:{layout:{duration:.15}},onClick:()=>void o(),disabled:!n||r,ref:e,className:wt("flex w-full items-center justify-center px-8 py-4 border border-transparent font-medium rounded-xl shadow-sm","bg-0d151d dark:bg-white text-white dark:text-0d151d","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-0d151d","disabled:cursor-not-allowed disabled:bg-d3dfea dark:disabled:bg-29343f")},p.createElement(lt.span,{transition:{layout:{duration:.15}},layoutId:"phone-text"},U("Continue")))))},H$=Tae;u();l();c();var Pae=({setStage:e,methods:t})=>({methods:t,setStage:e}),Iae=()=>{let{methods:e}=Qe(Pae);return p.createElement("div",{className:"-mt-6 space-y-6"},p.createElement("div",null,p.createElement("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white"},U("Verify your account")),p.createElement("p",{className:"text-70868f mt-3 text-center md:mt-2"},U("Help prevent spam and abuse by verifying your account."))),p.createElement("div",{className:"space-y-3"},e.map((t,r)=>p.createElement(Dae,{primary:r==0,key:t,method:t}))),e.includes("orb")&&p.createElement("div",{className:"mt-4 flex justify-center"},p.createElement("p",{className:"text-70868f text-sm"},U("Don't have your World ID yet?")," ",p.createElement("a",{className:"text-4940e0 font-medium",target:"_blank",href:"https://worldcoin.org/download",rel:"noreferrer"},U("Download Now")))),p.createElement(Ic,{className:"mt-8"}))},Aae=({setStage:e})=>e,Dae=({method:e,primary:t})=>{let r=Qe(Aae);return p.createElement(lt.button,{whileTap:{scale:.95},whileHover:{scale:1.05},transition:{layout:{duration:.15}},layoutId:e=="orb"?"worldid-button":"phone-button",onClick:()=>r(e=="orb"?"WORLD_ID":"ENTER_PHONE"),className:wt("flex w-full space-x-2 items-center px-4 py-4 border border-transparent font-medium rounded-2xl shadow-sm",t?"bg-0d151d dark:bg-white text-white dark:text-0d151d":"bg-d3dfea/30 dark:bg-29343f text-0d151d dark:text-white")},e=="orb"?p.createElement(Yi,{className:"h-5 w-5 text-gray-400"}):p.createElement(iv,{className:"h-5 w-5 text-gray-400"}),p.createElement(lt.span,{className:"flex-1 text-center",transition:{layout:{duration:.15}},layoutId:e=="orb"?"worldid-text":"phone-text"},e=="orb"?U("Verify with World ID"):U("Verify with Phone Number")))},q$=Iae;u();l();c();var K$=N(z(),1);var Oae=()=>p.createElement("div",{className:"space-y-6"},p.createElement("div",{className:"flex justify-center"},p.createElement(Ki,{className:"h-24 w-24"})),p.createElement("div",{className:"text-70868f mt-4"},U("Transmitting verification to host app. Please wait..."))),G$=(0,K$.memo)(Oae);var Nae=({open:e,processing:t,onOpenChange:r,stage:n,setStage:o,theme:i,computed:s,setOptions:a})=>({stage:n,theme:i,setStage:o,processing:t,setOptions:a,isOpen:e,onOpenChange:r,canGoBack:s.canGoBack(n),defaultStage:s.getDefaultStage()}),kae=r=>{var n=r,{children:e}=n,t=K(n,["children"]);let{isOpen:o,onOpenChange:i,processing:s,stage:a,setStage:f,canGoBack:d,defaultStage:h,setOptions:g,theme:v}=Qe(Nae,Nu),b=Ru();(0,kl.useEffect)(()=>{g(t,"props")},[t,g]);let w=(0,kl.useMemo)(()=>{switch(a){case"SELECT_METHOD":return q$;case"ENTER_PHONE":return R$;case"WORLD_ID":return SL;case"ENTER_CODE":return H$;case"SUCCESS":return l8;case"ERROR":return AP;case"PRIVACY":return c8;case"HOST_APP_VERIFICATION":return G$;default:throw new Error(U("Invalid IDKitStage."))}},[a]);return p.createElement(NF,{open:o,onOpenChange:i},e==null?void 0:e({open:()=>i(!0)}),p.createElement(kF,{forceMount:!0},p.createElement(kl.Fragment,null,p.createElement(Pc,null,o&&p.createElement(CP.div,{mode:"open",id:"idkit-widget"},p.createElement(TP,null),p.createElement("div",{id:"modal",className:wt(v=="dark"&&"dark","fixed z-10 font-sans")},p.createElement(MF,{asChild:!0},p.createElement(lt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-lg"})),p.createElement("div",{className:"fixed inset-0 z-10 overflow-y-hidden md:overflow-y-auto"},p.createElement("div",{className:"flex min-h-full items-end justify-center text-center md:items-center md:p-4"},p.createElement(LF,{asChild:!0},p.createElement(lt.div,{layout:b=="mobile"?"position":!0,exit:b=="mobile"?"initMob":"init",initial:b=="mobile"?"initMob":"init",animate:b=="mobile"?"animateMob":"animate",variants:{init:{opacity:0,scale:.9},initMob:{translateY:"100%"},animate:{opacity:1,scale:1},animateMob:{translateY:0}},transition:{layout:{duration:.15}},className:"dark:bg-0d151d relative z-50 w-full rounded-t-2xl bg-white pt-6 shadow focus:outline-none focus-visible:ring focus-visible:ring-purple-500/75 md:max-w-md md:rounded-b-2xl"},p.createElement(t8,null,p.createElement(r8,{className:"flex justify-center"}),p.createElement("div",{className:"mx-6 mb-12 flex items-center justify-between"},p.createElement("button",{onClick:()=>f(h),disabled:!d,className:wt(!d&&"invisible pointer-events-none","dark:bg-d3dfea/15 flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:text-white")},p.createElement(BF,{className:"w-4"})),p.createElement(FF,{className:"dark:bg-d3dfea/15 flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:text-white"},p.createElement(ku,{className:"h-5 w-5"}))),p.createElement("div",{className:"relative"},p.createElement(lt.div,{className:"mx-6 mb-6",layout:"position",animate:{visibility:s?"hidden":"visible"},transition:{layout:{duration:.15}}},p.createElement(w,null)),p.createElement(Pc,null,s&&p.createElement(lt.div,{className:"absolute inset-0 flex items-center justify-center pb-10",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},p.createElement(Ki,{className:"h-24 w-24"})))),p.createElement("div",{className:"flex items-center justify-between py-3 px-5 md:rounded-b-2xl"},p.createElement("p",{className:"text-9eafc0 flex items-center gap-1 text-sm"},p.createElement("span",null,U("Verified with")),p.createElement("a",{href:"https://worldcoin.org/world-id",target:"_blank",rel:"noreferrer"},p.createElement($F,{className:"text-0d151d h-4 dark:text-white"}))),a!="PRIVACY"?p.createElement("button",{onClick:()=>f("PRIVACY"),className:"text-9eafc0 text-sm hover:underline"},U("Privacy")):p.createElement("a",{target:"_blank",href:"https://docs.worldcoin.org/privacy",className:"text-9eafc0 dark:text-9eafc0 text-sm hover:underline",rel:"noreferrer"},U("Learn More")," \u2192")))))))))))))},W$=kae;var J$=(0,Y$.memo)(W$);var F6,Ml=!1,Mae=e=>{if(Ml)throw new Error(U("IDKit is already initialized"));if(!e.app_id)throw new Error(U("You must provide your App ID & Action"));e.walletConnectProjectId||(console.warn(U("WalletConnect project ID not detected. Using default, but this is not advisable for production usage!")),console.warn(U("Get your own project ID at :url",{url:"https://cloud.walletconnect.com/"})));let t=()=>{try{if(!Ml){let r=document.createElement("div");document.body.appendChild(r),F6=(0,X$.createRoot)(r),F6.render(p.createElement(J$,D({},e))),zS(e.enableTelemetry),Ml=!0}}catch(r){console.error(U("Error while rendering IDKit"),r)}};/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)},Lae=e=>{if(!Ml)throw new Error(U("IDKit is not initialized"));Qe.getState().setOptions(e,"props")},Fae=()=>new Promise((e,t)=>{if(!Ml)return t(U("IDKitWidget is not initialized"));Qe.getState().addSuccessCallback(e,"manual"),Qe.setState({open:!0})}),$ae=()=>{console.warn(U("Advanced method intended for internal use! Avoid calling this method directly.")),F6.unmount(),Ml=!1,Qe.destroy()};return j6(Bae);})();
|
|
89
|
+
/*!
|
|
90
|
+
* The buffer module from node.js, for the browser.
|
|
91
|
+
*
|
|
92
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
93
|
+
* @license MIT
|
|
94
|
+
*/
|
|
95
|
+
/*! *****************************************************************************
|
|
96
|
+
Copyright (c) Microsoft Corporation.
|
|
97
|
+
|
|
98
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
99
|
+
purpose with or without fee is hereby granted.
|
|
100
|
+
|
|
101
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
102
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
103
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
104
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
105
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
106
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
107
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
108
|
+
***************************************************************************** */
|
|
109
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
110
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
111
|
+
/**
|
|
112
|
+
* @license React
|
|
113
|
+
* react-dom.production.min.js
|
|
114
|
+
*
|
|
115
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the MIT license found in the
|
|
118
|
+
* LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* @license React
|
|
122
|
+
* react.production.min.js
|
|
123
|
+
*
|
|
124
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the MIT license found in the
|
|
127
|
+
* LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/
|
|
129
|
+
/**
|
|
130
|
+
* @license React
|
|
131
|
+
* scheduler.production.min.js
|
|
132
|
+
*
|
|
133
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the MIT license found in the
|
|
136
|
+
* LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/
|
|
138
|
+
/**
|
|
139
|
+
* @license React
|
|
140
|
+
* use-sync-external-store-shim.production.min.js
|
|
141
|
+
*
|
|
142
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the MIT license found in the
|
|
145
|
+
* LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/
|
|
147
|
+
/**
|
|
148
|
+
* @license React
|
|
149
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
150
|
+
*
|
|
151
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the MIT license found in the
|
|
154
|
+
* LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/
|