@imtbl/sdk 0.45.0 → 0.45.2

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.
@@ -32,7 +32,7 @@ n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){
32
32
 
33
33
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
34
  */
35
- function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,p,v,w,x,E,T,C,I,S,k=this._hash.words,O=d.words,P=f.words,R=s.words,N=u.words,L=l.words,M=c.words;for(x=a=k[0],E=o=k[1],T=p=k[2],C=v=k[3],I=w=k[4],n=0;n<80;n+=1)S=a+e[t+R[n]]|0,S+=n<16?h(o,p,v)+O[0]:n<32?m(o,p,v)+O[1]:n<48?y(o,p,v)+O[2]:n<64?g(o,p,v)+O[3]:A(o,p,v)+O[4],S=(S=b(S|=0,L[n]))+w|0,a=w,w=v,v=b(p,10),p=o,o=S,S=x+e[t+N[n]]|0,S+=n<16?A(E,T,C)+P[0]:n<32?g(E,T,C)+P[1]:n<48?y(E,T,C)+P[2]:n<64?m(E,T,C)+P[3]:h(E,T,C)+P[4],S=(S=b(S|=0,M[n]))+I|0,x=I,I=C,C=b(T,10),T=E,E=S;S=k[1]+p+C|0,k[1]=k[2]+v+I|0,k[2]=k[3]+w+x|0,k[3]=k[4]+a+E|0,k[4]=k[0]+o+T|0,k[0]=S},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function y(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function A(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(p),t.HmacRIPEMD160=a._createHmacHelper(p)}(),n.RIPEMD160)}(eP)),rP(),iP||(iP=1,function(e,t){var n;e.exports=(n=yO(),rP(),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,u=a.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=s.create(n.hasher,e),a=i.create(),o=i.create([1]),u=a.words,l=o.words,c=n.keySize,d=n.iterations;u.length<c;){var f=r.update(t).finalize(o);r.reset();for(var p=f.words,h=p.length,m=f,y=1;y<d;y++){m=r.finalize(m),r.reset();for(var g=m.words,A=0;A<h;A++)p[A]^=g[A]}a.concat(f),l[0]++}return a.sigBytes=4*c,a}});e.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)}}(),n.PBKDF2)}(aP)),uP(),dP(),hP(),gP(),vP(),EP(),TP||(TP=1,function(e,t){var n,r;e.exports=(r=yO(),dP(),r.mode.ECB=((n=r.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),r.mode.ECB)}(CP)),IP||(IP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,a=n+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)}(SP)),kP||(kP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)}(OP)),PP||(PP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)}(RP)),NP||(NP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},n.pad.ZeroPadding)}(LP)),MP||(MP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}(DP)),FP||(FP=1,function(e,t){var n;e.exports=(n=yO(),dP(),function(e){var t=n,r=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}}(),n.format.Hex)}(jP)),BP||(BP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],u=[],l=[],c=[],d=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var h=r^r<<1^r<<2^r<<3^r<<4;h=h>>>8^255&h^99,i[n]=h,a[h]=n;var m=e[n],y=e[m],g=e[y],A=257*e[h]^16843008*h;o[n]=A<<24|A>>>8,s[n]=A<<16|A>>>16,u[n]=A<<8|A>>>24,l[n]=A,A=16843009*g^65537*y^257*m^16843008*n,c[h]=A<<24|A>>>8,d[h]=A<<16|A>>>16,f[h]=A<<8|A>>>24,p[h]=A,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o<r;o++)o<n?a[o]=t[o]:(l=a[o-1],o%n?n>6&&o%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=h[o/n|0]<<24),a[o]=a[o-n]^l);for(var s=this._invKeySchedule=[],u=0;u<r;u++){if(o=r-u,u%4)var l=a[o];else l=a[o-4];s[u]=u<4||o<=4?l:c[i[l>>>24]]^d[i[l>>>16&255]]^f[i[l>>>8&255]]^p[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,u,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,c,d,f,p,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var u=this._nRounds,l=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],f=e[t+3]^n[3],p=4,h=1;h<u;h++){var m=r[l>>>24]^i[c>>>16&255]^a[d>>>8&255]^o[255&f]^n[p++],y=r[c>>>24]^i[d>>>16&255]^a[f>>>8&255]^o[255&l]^n[p++],g=r[d>>>24]^i[f>>>16&255]^a[l>>>8&255]^o[255&c]^n[p++],A=r[f>>>24]^i[l>>>16&255]^a[c>>>8&255]^o[255&d]^n[p++];l=m,c=y,d=g,f=A}m=(s[l>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[p++],y=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^n[p++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&c])^n[p++],A=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=m,e[t+1]=y,e[t+2]=g,e[t+3]=A},keySize:8});e.AES=t._createHelper(m)}(),n.AES)}(_P)),WP(),HP||(HP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var u=r[i];r[i]=r[a],r[a]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),n.RC4)}(VP)),qP||(qP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=c,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=c,i[7]^=f,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^l}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)}(GP)),XP||(XP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;for(r[0]^=l,r[1]^=d,r[2]^=c,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=c,r[7]^=f,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^l}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)}(ZP)),QP(),n)}(xO);var JP=xO.exports,$P=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wO,"__esModule",{value:!0}),wO.Base=void 0;const eR=fn,tR=$P(JP);let nR=class e{print(){e.print(this)}bufferIndexOf(e,t,n=!1){if(n)return this.binarySearch(e,t,eR.Buffer.compare);return this.linearSearch(e,t,((e,t)=>e.equals(t)))}static binarySearch(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=n(e[a],t);if(0===o){for(let r=a-1;r>=0;r--)if(0!==n(e[r],t))return r+1;return 0}o<0?r=a+1:i=a-1}return-1}binarySearch(t,n,r){return e.binarySearch(t,n,r)}static linearSearch(e,t,n){for(let r=0;r<e.length;r++)if(n(e[r],t))return r;return-1}linearSearch(t,n,r){return e.linearSearch(t,n,r)}static bufferify(t){if(!eR.Buffer.isBuffer(t)){if("object"==typeof t&&t.words)return eR.Buffer.from(t.toString(tR.default.enc.Hex),"hex");if(e.isHexString(t))return eR.Buffer.from(t.replace(/^0x/,""),"hex");if("string"==typeof t)return eR.Buffer.from(t);if("bigint"==typeof t)return eR.Buffer.from(t.toString(16),"hex");if(t instanceof Uint8Array)return eR.Buffer.from(t.buffer);if("number"==typeof t){let e=t.toString();return e.length%2&&(e=`0${e}`),eR.Buffer.from(e,"hex")}if(ArrayBuffer.isView(t))return eR.Buffer.from(t.buffer,t.byteOffset,t.byteLength)}return t}bigNumberify(t){return e.bigNumberify(t)}static bigNumberify(t){if("bigint"==typeof t)return t;if("string"==typeof t)return t.startsWith("0x")&&e.isHexString(t)?BigInt("0x"+t.replace("0x","").toString()):BigInt(t);if(eR.Buffer.isBuffer(t))return BigInt("0x"+t.toString("hex"));if(t instanceof Uint8Array)return BigInt(t);if("number"==typeof t)return BigInt(t);throw new Error("cannot bigNumberify")}static isHexString(e){return"string"==typeof e&&/^(0x)?[0-9A-Fa-f]*$/.test(e)}static print(e){console.log(e.toString())}bufferToHex(t,n=!0){return e.bufferToHex(t,n)}static bufferToHex(e,t=!0){return`${t?"0x":""}${(e||eR.Buffer.alloc(0)).toString("hex")}`}bufferify(t){return e.bufferify(t)}bufferifyFn(e){return t=>{const n=e(t);return eR.Buffer.isBuffer(n)?n:this.isHexString(n)?eR.Buffer.from(n.replace("0x",""),"hex"):"string"==typeof n?eR.Buffer.from(n):"bigint"==typeof n?eR.Buffer.from(t.toString(16),"hex"):ArrayBuffer.isView(n)?eR.Buffer.from(n.buffer,n.byteOffset,n.byteLength):eR.Buffer.from(e(tR.default.enc.Hex.parse(t.toString("hex"))).toString(tR.default.enc.Hex),"hex")}}isHexString(t){return e.isHexString(t)}log2(e){return 1===e?0:1+this.log2(e/2|0)}zip(e,t){return e.map(((e,n)=>[e,t[n]]))}static hexZeroPad(e,t){return"0x"+e.replace("0x","").padStart(t,"0")}};wO.Base=nR,wO.default=nR;var rR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cO,"__esModule",{value:!0}),cO.MerkleTree=void 0;const iR=fn,aR=rR((function(e){for(var t=new Buffer(e.length),n=0,r=e.length-1;n<=r;++n,--r)t[n]=e[r],t[r]=e[n];return t})),oR=rR(gO),sR=rR(vO),uR=rR(wO);let lR=class e extends uR.default{constructor(e,t=oR.default,n={}){if(super(),this.duplicateOdd=!1,this.concatenator=iR.Buffer.concat,this.hashLeaves=!1,this.isBitcoinTree=!1,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sort=!1,this.fillDefaultHash=null,this.complete=!1,n.complete){if(n.isBitcoinTree)throw new Error('option "complete" is incompatible with "isBitcoinTree"');if(n.duplicateOdd)throw new Error('option "complete" is incompatible with "duplicateOdd"')}if(this.isBitcoinTree=!!n.isBitcoinTree,this.hashLeaves=!!n.hashLeaves,this.sortLeaves=!!n.sortLeaves,this.sortPairs=!!n.sortPairs,this.complete=!!n.complete,n.fillDefaultHash)if("function"==typeof n.fillDefaultHash)this.fillDefaultHash=n.fillDefaultHash;else{if(!iR.Buffer.isBuffer(n.fillDefaultHash)&&"string"!=typeof n.fillDefaultHash)throw new Error('method "fillDefaultHash" must be a function, Buffer, or string');this.fillDefaultHash=(e,t)=>n.fillDefaultHash}this.sort=!!n.sort,this.sort&&(this.sortLeaves=!0,this.sortPairs=!0),this.duplicateOdd=!!n.duplicateOdd,n.concatenator&&(this.concatenator=n.concatenator),this.hashFn=this.bufferifyFn(t),this.processLeaves(e)}getOptions(){var e,t;return{complete:this.complete,isBitcoinTree:this.isBitcoinTree,hashLeaves:this.hashLeaves,sortLeaves:this.sortLeaves,sortPairs:this.sortPairs,sort:this.sort,fillDefaultHash:null!==(t=null===(e=this.fillDefaultHash)||void 0===e?void 0:e.toString())&&void 0!==t?t:null,duplicateOdd:this.duplicateOdd}}processLeaves(e){if(this.hashLeaves&&(e=e.map(this.hashFn)),this.leaves=e.map(this.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(iR.Buffer.compare)),this.fillDefaultHash)for(let e=this.leaves.length;e<Math.pow(2,Math.ceil(Math.log2(this.leaves.length)));e++)this.leaves.push(this.bufferify(this.fillDefaultHash(e,this.hashFn)));this.createHashes(this.leaves)}createHashes(e){for(this.layers=[e];e.length>1;){const t=this.layers.length;this.layers.push([]);const n=this.complete&&1===t&&!Number.isInteger(Math.log2(e.length))?2*e.length-Math.pow(2,Math.ceil(Math.log2(e.length))):e.length;for(let r=0;r<e.length;r+=2){if(r>=n){this.layers[t].push(...e.slice(n));break}if(r+1===e.length&&e.length%2==1){const n=e[e.length-1];let i=n;if(this.isBitcoinTree){i=this.hashFn(this.concatenator([aR.default(n),aR.default(n)])),i=aR.default(this.hashFn(i)),this.layers[t].push(i);continue}if(!this.duplicateOdd){this.layers[t].push(e[r]);continue}}const i=e[r],a=r+1===e.length?i:e[r+1];let o=null;o=this.isBitcoinTree?[aR.default(i),aR.default(a)]:[i,a],this.sortPairs&&o.sort(iR.Buffer.compare);let s=this.hashFn(this.concatenator(o));this.isBitcoinTree&&(s=aR.default(this.hashFn(s))),this.layers[t].push(s)}e=this.layers[t]}}addLeaf(e,t=!1){t&&(e=this.hashFn(e)),this.processLeaves(this.leaves.concat(e))}addLeaves(e,t=!1){t&&(e=e.map(this.hashFn)),this.processLeaves(this.leaves.concat(e))}getLeaves(e){return Array.isArray(e)?(this.hashLeaves&&(e=e.map(this.hashFn),this.sortLeaves&&(e=e.sort(iR.Buffer.compare))),this.leaves.filter((t=>-1!==this.bufferIndexOf(e,t,this.sortLeaves)))):this.leaves}getLeaf(e){return e<0||e>this.leaves.length-1?iR.Buffer.from([]):this.leaves[e]}getLeafIndex(e){e=this.bufferify(e);const t=this.getLeaves();for(let n=0;n<t.length;n++){if(t[n].equals(e))return n}return-1}getLeafCount(){return this.leaves.length}getHexLeaves(){return this.leaves.map((e=>this.bufferToHex(e)))}static marshalLeaves(t){return JSON.stringify(t.map((t=>e.bufferToHex(t))),null,2)}static unmarshalLeaves(t){let n=null;if("string"==typeof t)n=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");n=t}if(!n)return[];if(!Array.isArray(n))throw new Error("Expected JSON string to be array");return n.map(e.bufferify)}getLayers(){return this.layers}getHexLayers(){return this.layers.reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(e)))):e.push(t),e)),[])}getLayersFlat(){const e=this.layers.reduce(((e,t)=>(Array.isArray(t)?e.unshift(...t):e.unshift(t),e)),[]);return e.unshift(iR.Buffer.from([0])),e}getHexLayersFlat(){return this.getLayersFlat().map((e=>this.bufferToHex(e)))}getLayerCount(){return this.getLayers().length}getRoot(){return 0===this.layers.length?iR.Buffer.from([]):this.layers[this.layers.length-1][0]||iR.Buffer.from([])}getHexRoot(){return this.bufferToHex(this.getRoot())}getProof(e,t){if(void 0===e)throw new Error("leaf is required");e=this.bufferify(e);const n=[];if(!Number.isInteger(t)){t=-1;for(let n=0;n<this.leaves.length;n++)0===iR.Buffer.compare(e,this.leaves[n])&&(t=n)}if(t<=-1)return[];for(let e=0;e<this.layers.length;e++){const r=this.layers[e],i=t%2,a=i?t-1:this.isBitcoinTree&&t===r.length-1&&e<this.layers.length-1?t:t+1;a<r.length&&n.push({position:i?"left":"right",data:r[a]}),t=t/2|0}return n}getHexProof(e,t){return this.getProof(e,t).map((e=>this.bufferToHex(e.data)))}getProofs(){const e=[];return this.getProofsDFS(this.layers.length-1,0,[],e),e}getProofsDFS(e,t,n,r){const i=t%2;if(-1===e)return void(i||r.push([...n].reverse()));if(t>=this.layers[e].length)return;const a=this.layers[e],o=i?t-1:t+1;let s=!1;o<a.length&&(s=!0,n.push({position:i?"left":"right",data:a[o]}));const u=2*t,l=2*t+1;this.getProofsDFS(e-1,u,n,r),this.getProofsDFS(e-1,l,n,r),s&&n.splice(n.length-1,1)}getHexProofs(){return this.getProofs().map((e=>this.bufferToHex(e.data)))}getPositionalHexProof(e,t){return this.getProof(e,t).map((e=>["left"===e.position?0:1,this.bufferToHex(e.data)]))}static marshalProof(t){const n=t.map((t=>"string"==typeof t?t:iR.Buffer.isBuffer(t)?e.bufferToHex(t):{position:t.position,data:e.bufferToHex(t.data)}));return JSON.stringify(n,null,2)}static unmarshalProof(t){let n=null;if("string"==typeof t)n=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");n=t}if(!n)return[];if(!Array.isArray(n))throw new Error("Expected JSON string to be array");return n.map((t=>{if("string"==typeof t)return e.bufferify(t);if(t instanceof Object)return{position:t.position,data:e.bufferify(t.data)};throw new Error("Expected item to be of type string or object")}))}static marshalTree(t){const n=t.getHexRoot(),r=t.leaves.map((t=>e.bufferToHex(t))),i=t.getHexLayers(),a=t.getOptions();return JSON.stringify({options:a,root:n,layers:i,leaves:r},null,2)}static unmarshalTree(t,n=oR.default,r={}){let i=null;if("string"==typeof t)i=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");i=t}if(!i)throw new Error("could not parse json");return r=Object.assign({},i.options||{},r),new e(i.leaves,n,r)}getProofIndices(e,t){const n=Math.pow(2,t);let r=new Set;for(const t of e){let e=n+t;for(;e>1;)r.add(1^e),e=e/2|0}const i=e.map((e=>n+e)),a=Array.from(r).sort(((e,t)=>e-t)).reverse();r=i.concat(a);const o=new Set,s=[];for(let e of r)if(!o.has(e))for(s.push(e);e>1&&(o.add(e),o.has(1^e));)e=e/2|0;return s.filter((t=>!e.includes(t-n)))}getProofIndicesForUnevenTree(e,t){const n=Math.ceil(Math.log2(t)),r=[];for(let e=0;e<n;e++){t%2!=0&&r.push({index:e,leavesCount:t}),t=Math.ceil(t/2)}const i=[];let a=e;for(let e=0;e<n;e++){const t=a.map((e=>e%2==0?e+1:e-1));let n=t.filter((e=>!a.includes(e)));const o=r.find((({index:t})=>t===e));o&&a.includes(o.leavesCount-1)&&(n=n.slice(0,-1)),i.push(n),a=[...new Set(a.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))]}return i}getMultiProof(e,t){this.complete||console.warn("Warning: For correct multiProofs it's strongly recommended to set complete: true"),t||(t=e,e=this.getLayersFlat());if(this.isUnevenTree()&&t.every(Number.isInteger))return this.getMultiProofForUnevenTree(t);if(!t.every(Number.isInteger)){let e=t;this.sortPairs&&(e=e.sort(iR.Buffer.compare));let n=e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1));if(!n.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const r=[],i=[];let a=[];for(let e=0;e<this.layers.length;e++){const t=this.layers[e];for(let e=0;e<n.length;e++){const o=n[e],s=this.getPairNode(t,o);r.push(t[o]),s&&i.push(s),a.push(o/2|0)}n=a.filter(((e,t,n)=>n.indexOf(e)===t)),a=[]}return i.filter((e=>!r.includes(e)))}return this.getProofIndices(t,Math.log2(e.length/2|0)).map((t=>e[t]))}getMultiProofForUnevenTree(e,t){t||(t=e,e=this.getLayers());let n=[],r=t;for(const t of e){const e=[];for(const n of r){if(n%2==0){const i=n+1;if(!r.includes(i)&&t[i]){e.push(t[i]);continue}}const i=n-1;r.includes(i)||!t[i]||e.push(t[i])}n=n.concat(e);const i=new Set;for(const e of r)e%2!=0?e%2!=0?i.add((e-1)/2):i.add((e+1)/2):i.add(e/2);r=Array.from(i)}return n}getHexMultiProof(e,t){return this.getMultiProof(e,t).map((e=>this.bufferToHex(e)))}getProofFlags(e,t){if(!Array.isArray(e)||e.length<=0)throw new Error("Invalid Inputs!");let n;if(n=e.every(Number.isInteger)?[...e].sort(((e,t)=>e===t?0:e>t?1:-1)):e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1)),!n.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const r=t.map((e=>this.bufferify(e))),i=[],a=[];for(let e=0;e<this.layers.length;e++){const t=this.layers[e];n=n.reduce(((e,n)=>{if(!i.includes(t[n])){const e=this.getPairNode(t,n),o=r.includes(t[n])||r.includes(e);e&&a.push(!o),i.push(t[n]),i.push(e)}return e.push(n/2|0),e}),[])}return a}verify(e,t,n){let r=this.bufferify(t);if(n=this.bufferify(n),!Array.isArray(e)||!t||!n)return!1;for(let t=0;t<e.length;t++){const n=e[t];let i=null,a=null;if("string"==typeof n)i=this.bufferify(n),a=!0;else if(Array.isArray(n))a=0===n[0],i=this.bufferify(n[1]);else if(iR.Buffer.isBuffer(n))i=n,a=!0;else{if(!(n instanceof Object))throw new Error("Expected node to be of type string or object");i=this.bufferify(n.data),a="left"===n.position}const o=[];this.isBitcoinTree?(o.push(aR.default(r)),o[a?"unshift":"push"](aR.default(i)),r=this.hashFn(this.concatenator(o)),r=aR.default(this.hashFn(r))):this.sortPairs?-1===iR.Buffer.compare(r,i)?(o.push(r,i),r=this.hashFn(this.concatenator(o))):(o.push(i,r),r=this.hashFn(this.concatenator(o))):(o.push(r),o[a?"unshift":"push"](i),r=this.hashFn(this.concatenator(o)))}return 0===iR.Buffer.compare(r,n)}verifyMultiProof(e,t,n,r,i){if(this.isUnevenTree())return this.verifyMultiProofForUnevenTree(e,t,n,r,i);const a=Math.ceil(Math.log2(r));e=this.bufferify(e),n=n.map((e=>this.bufferify(e))),i=i.map((e=>this.bufferify(e)));const o={};for(const[e,r]of this.zip(t,n))o[Math.pow(2,a)+e]=r;for(const[e,n]of this.zip(this.getProofIndices(t,a),i))o[e]=n;let s=Object.keys(o).map((e=>+e)).sort(((e,t)=>e-t));s=s.slice(0,s.length-1);let u=0;for(;u<s.length;){const e=s[u];if(e>=2&&{}.hasOwnProperty.call(o,1^e)){let t=[o[e-e%2],o[e-e%2+1]];this.sortPairs&&(t=t.sort(iR.Buffer.compare));const n=t[1]?this.hashFn(this.concatenator(t)):t[0];o[e/2|0]=n,s.push(e/2|0)}u+=1}return!t.length||{}.hasOwnProperty.call(o,1)&&o[1].equals(e)}verifyMultiProofWithFlags(e,t,n,r){e=this.bufferify(e),t=t.map(this.bufferify),n=n.map(this.bufferify);const i=t.length,a=r.length,o=[];let s=0,u=0,l=0;for(let e=0;e<a;e++){const a=[r[e]?s<i?t[s++]:o[u++]:n[l++],s<i?t[s++]:o[u++]].sort(iR.Buffer.compare);o[e]=this.hashFn(this.concatenator(a))}return 0===iR.Buffer.compare(o[a-1],e)}verifyMultiProofForUnevenTree(e,t,n,r,i){e=this.bufferify(e),n=n.map((e=>this.bufferify(e))),i=i.map((e=>this.bufferify(e)));const a=this.calculateRootForUnevenTree(t,n,r,i);return e.equals(a)}getDepth(){return this.getLayers().length-1}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(e,!1))))),t=[];for(let n=0;n<e.length;n++){const r=[];for(let i=0;i<e[n].length;i++){const a={[e[n][i]]:null};if(t.length){a[e[n][i]]={};const r=t.shift(),o=Object.keys(r)[0];if(a[e[n][i]][o]=r[o],t.length){const r=t.shift(),o=Object.keys(r)[0];a[e[n][i]][o]=r[o]}}r.push(a)}t.push(...r)}return t[0]}static verify(t,n,r,i=oR.default,a={}){return new e([],i,a).verify(t,n,r)}static getMultiProof(t,n){return new e([]).getMultiProof(t,n)}resetTree(){this.leaves=[],this.layers=[]}getPairNode(e,t){const n=t%2==0?t+1:t-1;return n<e.length?e[n]:null}toTreeString(){const e=this.getLayersAsObject();return sR.default.asTree(e,!0)}toString(){return this.toTreeString()}isUnevenTree(e){const t=(null==e?void 0:e.length)||this.getDepth();return!this.isPowOf2(t)}isPowOf2(e){return e&&!(e&e-1)}calculateRootForUnevenTree(e,t,n,r){const i=this.zip(e,t).sort((([e],[t])=>e-t)),a=i.map((([e])=>e)),o=this.getProofIndicesForUnevenTree(a,n);let s=0;const u=[];for(let e=0;e<o.length;e++){const t=o[e],n=s;s+=t.length,u[e]=this.zip(t,r.slice(n,s))}const l=[i];for(let e=0;e<u.length;e++){const t=u[e].concat(l[e]).sort((([e],[t])=>e-t)).map((([,e])=>e)),n=l[e].map((([e])=>e)),r=[...new Set(n.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))],i=[];for(let e=0;e<r.length;e++){const n=r[e],a=t[2*e],o=t[2*e+1],s=o?this.hashFn(this.concatenator([a,o])):a;i.push([n,s])}l.push(i)}return l[l.length-1][0][1]}};cO.MerkleTree=lR,"undefined"!=typeof window&&(window.MerkleTree=lR),cO.default=lR;var cR={},dR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cR,"__esModule",{value:!0}),cR.MerkleMountainRange=void 0;const fR=fn,pR=dR(gO),hR=dR(wO);class mR extends hR.default{constructor(e=pR.default,t=[],n,r,i){super(),this.root=fR.Buffer.alloc(0),this.size=0,this.width=0,this.hashes={},this.data={},t=t.map(this.bufferify),this.hashFn=this.bufferifyFn(e),this.hashLeafFn=n,this.peakBaggingFn=r,this.hashBranchFn=i;for(const e of t)this.append(e)}append(e){e=this.bufferify(e);const t=this.hashFn(e),n=this.bufferToHex(t);this.data[n]&&this.bufferToHex(this.hashFn(this.data[n]))===n||(this.data[n]=e);const r=this.hashLeaf(this.size+1,t);this.hashes[this.size+1]=r,this.width+=1;const i=this.getPeakIndexes(this.width);this.size=this.getSize(this.width);const a=[];for(let e=0;e<i.length;e++)a[e]=this._getOrCreateNode(i[e]);this.root=this.peakBagging(this.width,a)}hashLeaf(e,t){return t=this.bufferify(t),this.hashLeafFn?this.bufferify(this.hashLeafFn(e,t)):this.hashFn(fR.Buffer.concat([this.bufferify(e),t]))}hashBranch(e,t,n){return this.hashBranchFn?this.bufferify(this.hashBranchFn(e,t,n)):this.hashFn(fR.Buffer.concat([this.bufferify(e),this.bufferify(t),this.bufferify(n)]))}getPeaks(){const e=this.getPeakIndexes(this.width),t=[];for(let n=0;n<e.length;n++)t[n]=this.hashes[e[n]];return t}getLeafIndex(e){return e%2==1?this.getSize(e):this.getSize(e-1)+1}getPeakIndexes(e){const t=this.numOfPeaks(e),n=[];let r=0,i=0;for(let a=255;a>0&&!(0!=(e&1<<a-1)&&(i=i+(1<<a)-1,n[r++]=i,n.length>=t));a--);if(r!==n.length)throw new Error("invalid bit calculation");return n}numOfPeaks(e){let t=e,n=0;for(;t>0;)t%2==1&&n++,t>>=1;return n}peakBagging(e,t){const n=this.getSize(e);if(this.numOfPeaks(e)!==t.length)throw new Error("received invalid number of peaks");return 0!==e||t.length?this.peakBaggingFn?this.bufferify(this.peakBaggingFn(n,t)):this.hashFn(fR.Buffer.concat([this.bufferify(n),...t.map(this.bufferify)])):fR.Buffer.alloc(0)}getSize(e){return(e<<1)-this.numOfPeaks(e)}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.getRoot())}getNode(e){return this.hashes[e]}mountainHeight(e){let t=1;for(;1<<t<=e+t;)t++;return t-1}heightAt(e){let t=e,n=0,r=0;for(;t>n;)t-=(1<<r)-1,r=this.mountainHeight(t),n=(1<<r)-1;return r-(n-t)}isLeaf(e){return 1===this.heightAt(e)}getChildren(e){const t=e-(1<<this.heightAt(e)-1),n=e-1;if(t===n)throw new Error("not a parent");return[t,n]}getMerkleProof(e){if(e>this.size)throw new Error("out of range");if(!this.isLeaf(e))throw new Error("not a leaf");const t=this.root,n=this.width,r=this.getPeakIndexes(this.width),i=[];let a=0;for(let t=0;t<r.length;t++)i[t]=this.hashes[r[t]],r[t]>=e&&0===a&&(a=r[t]);let o=0,s=0,u=this.heightAt(a);const l=[];for(;a!==e;)u--,[o,s]=this.getChildren(a),a=e<=o?o:s,l[u-1]=this.hashes[e<=o?s:o];return{root:t,width:n,peakBagging:i,siblings:l}}verify(e,t,n,r,i,a){r=this.bufferify(r);if(this.getSize(t)<n)throw new Error("index is out of range");if(!e.equals(this.peakBagging(t,i)))throw new Error("invalid root hash from the peaks");let o,s=0;const u=this.getPeakIndexes(t);for(let e=0;e<u.length;e++)if(u[e]>=n){o=i[e],s=u[e];break}if(!o)throw new Error("target not found");let l=a.length+1;const c=new Array(l);let d,f=0,p=0;for(;l>0&&(c[--l]=s,s!==n);)[f,p]=this.getChildren(s),s=n>f?p:f;for(;l<c.length;)s=c[l],d=0===l?this.hashLeaf(s,this.hashFn(r)):s-1===c[l-1]?this.hashBranch(s,a[l-1],d):this.hashBranch(s,d,a[l-1]),l++;if(!d.equals(o))throw new Error("hashed peak is invalid");return!0}peaksToPeakMap(e,t){const n={};let r=0,i=0,a=t.length;for(let o=1;o<=32;o++)r=32-o,i=1<<o-1,n[r]=0!=(e&i)?t[--a]:0;if(0!==a)throw new Error("invalid number of peaks");return n}peakMapToPeaks(e,t){const n=this.numOfPeaks(e),r=new Array(n);let i=0;for(let e=0;e<32;e++)0!==t[e]&&(r[i++]=t[e]);if(i!==n)throw new Error("invalid number of peaks");return r}peakUpdate(e,t,n){const r={},i=e+1;let a=this.getLeafIndex(i),o=this.hashLeaf(a,n),s=0,u=0,l=!1,c=!1,d=!1;for(let n=1;n<=32;n++)s=32-n,d?r[s]=t[s]:(u=1<<n-1,l=0!=(e&u),c=0!=(i&u),a++,l&&(o=this.hashBranch(a,t[s],o)),c?(r[s]=l?t[s]:o,d=!0):r[s]=0);return r}rollUp(e,t,n,r){if(!e.equals(this.peakBagging(t,n)))throw new Error("invalid root hash from the peaks");let i=t,a=this.peaksToPeakMap(t,n);for(let e=0;e<r.length;e++)a=this.peakUpdate(i,a,r[e]),i++;return this.peakBagging(i,this.peakMapToPeaks(i,a))}_getOrCreateNode(e){if(e>this.size)throw new Error("out of range");if(!this.hashes[e]){const[t,n]=this.getChildren(e),r=this._getOrCreateNode(t),i=this._getOrCreateNode(n);this.hashes[e]=this.hashBranch(e,r,i)}return this.hashes[e]}}cR.MerkleMountainRange=mR,"undefined"!=typeof window&&(window.MerkleMountainRange=mR),cR.default=mR;var yR={},gR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yR,"__esModule",{value:!0}),yR.IncrementalMerkleTree=void 0;const AR=gR(wO),bR=gR(vO);class vR extends AR.default{constructor(e,t){if(super(),this.hashFn=e,t.depth&&(this.depth=t.depth),t.arity&&(this.arity=t.arity),this.depth<1)throw new Error("depth must be greater than 0");if(this.arity<1)throw new Error("arity must be greater than 0");const n=[];let r=t.zeroValue;if(this.zeroValue=r,this.zeroes=[],this.depth)for(let e=0;e<this.depth;e++)this.zeroes.push(r),n[e]=[],r=this.hashFn(Array(this.arity).fill(r));this.nodes=n,this.root=r}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.bufferify(this.getRoot()))}insert(e){if(this.depth&&this.arity&&this.nodes[0].length>=this.getMaxLeaves())throw new Error("tree is full");let t=e,n=this.nodes[0].length;for(let e=0;e<this.depth;e+=1){const r=n-n%this.arity,i=r+this.arity,a=[];this.nodes[e][n]=t;for(let t=r;t<i;t+=1)t<this.nodes[e].length?a.push(this.nodes[e][t]):a.push(this.zeroes[e]);t=this.hashFn(a),n=Math.floor(n/this.arity)}this.root=t}delete(e){this.update(e,this.zeroValue)}update(e,t){if(e<0||e>=this.nodes[0].length)throw new Error("out of bounds");let n=t;for(let t=0;t<this.depth;t+=1){const r=e-e%this.arity,i=r+this.arity,a=[];this.nodes[t][e]=n;for(let e=r;e<i;e+=1)e<this.nodes[t].length?a.push(this.nodes[t][e]):a.push(this.zeroes[t]);n=this.hashFn(a),e=Math.floor(e/this.arity)}this.root=n}getDepth(){return this.depth}getArity(){return this.arity}getMaxLeaves(){return Math.pow(this.depth,this.arity)}indexOf(e){return this.nodes[0].indexOf(e)}getLeaves(){const e=this.copyList(this.nodes[0]);for(let t=this.nodes[0].length;t<this.getMaxLeaves();t++)e[t]=this.zeroValue;return e}copyList(e){return e.map((e=>BigInt(e)))}getLayers(){const e=[];for(const t of this.nodes)e.push(this.copyList(t));if(e[0].length<this.getMaxLeaves()){let t=e[0].length;for(let n=t;n<this.getMaxLeaves();n++)e[0][n]=this.zeroValue;for(let n=0;n<this.depth;n++){const r=t-t%this.arity,i=r+this.arity;for(let t=r;t<i;t++)t>=e[n].length&&(e[n][t]=this.zeroes[n]);t=Math.floor(t/this.arity)}}return e.push([this.root]),e}getHexLayers(){return this.getLayers().reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(this.bufferify(e))))):e.push(t),e)),[])}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(this.bufferify(e),!1))))),t=[];for(let n=0;n<e.length;n++){const r=[];for(let i=0;i<e[n].length;i++){const a={[e[n][i]]:null};if(t.length){a[e[n][i]]={};const r=t.shift(),o=Object.keys(r)[0];if(a[e[n][i]][o]=r[o],t.length){const r=t.shift(),o=Object.keys(r)[0];a[e[n][i]][o]=r[o]}}r.push(a)}t.push(...r)}return t[0]}computeRoot(){let e,t=this.nodes[0].length;for(let n=0;n<this.depth;n+=1){const r=t-t%this.arity,i=r+this.arity,a=[];for(let e=r;e<i;e+=1)e<this.nodes[n].length?a.push(this.nodes[n][e]):a.push(this.zeroes[n]);e=this.hashFn(a),t=Math.floor(t/this.arity)}return e}getProof(e){if(e<0||e>=this.nodes[0].length)throw new Error("The leaf does not exist in this tree");const t=[],n=[],r=e;for(let r=0;r<this.depth;r+=1){const i=e%this.arity,a=e-i,o=a+this.arity;n[r]=i,t[r]=[];for(let n=a;n<o;n+=1)n!==e&&(n<this.nodes[r].length?t[r].push(this.nodes[r][n]):t[r].push(this.zeroes[r]));e=Math.floor(e/this.arity)}return{root:this.root,leaf:this.nodes[0][r],pathIndices:n,siblings:t}}verify(e){let t=e.leaf;for(let n=0;n<e.siblings.length;n+=1){const r=e.siblings[n].slice();r.splice(e.pathIndices[n],0,t),t=this.hashFn(r)}return e.root===t}toString(){return this.toTreeString()}toTreeString(){const e=this.getLayersAsObject();return bR.default.asTree(e,!0)}}yR.IncrementalMerkleTree=vR,"undefined"!=typeof window&&(window.IncrementalMerkleTree=vR),yR.default=vR;var wR={};Object.defineProperty(wR,"__esModule",{value:!0}),wR.MerkleSumTree=wR.ProofStep=wR.Leaf=wR.Bucket=void 0;const xR=wO;class ER{constructor(e,t){this.size=BigInt(e),this.hashed=t,this.parent=null,this.left=null,this.right=null}}wR.Bucket=ER;wR.Leaf=class{constructor(e,t,n){this.hashFn=e,this.rng=t.map((e=>BigInt(e))),this.data=n}getBucket(){let e;return e=this.data?this.hashFn(this.data):Buffer.alloc(32),new ER(BigInt(this.rng[1])-BigInt(this.rng[0]),e)}};class TR{constructor(e,t){this.bucket=e,this.right=t}}wR.ProofStep=TR;class CR extends xR.Base{constructor(e,t){super(),this.leaves=e,this.hashFn=t,CR.checkConsecutive(e),this.buckets=[];for(const t of e)this.buckets.push(t.getBucket());let n=[];for(const e of this.buckets)n.push(e);for(;1!==n.length;){const e=[];for(;n.length;)if(n.length>=2){const t=n.shift(),r=n.shift(),i=t.size+r.size,a=this.hashFn(Buffer.concat([this.sizeToBuffer(t.size),this.bufferify(t.hashed),this.sizeToBuffer(r.size),this.bufferify(r.hashed)])),o=new ER(i,a);r.parent=o,t.parent=r.parent,t.right=r,r.left=t,e.push(o)}else e.push(n.shift());n=e}this.root=n[0]}sizeToBuffer(e){const t=Buffer.alloc(8);return new DataView(t.buffer).setBigInt64(0,BigInt(e),!1),t}static checkConsecutive(e){let t=BigInt(0);for(const n of e){if(n.rng[0]!==t)throw new Error("leaf ranges are invalid");t=BigInt(n.rng[1])}}getProof(e){let t=this.buckets[Number(e)];const n=[];for(;t&&t.parent;){const e=!!t.right,r=t.right?t.right:t.left;t=t.parent,n.push(new TR(r,e))}return n}sum(e){let t=BigInt(0);for(const n of e)t+=BigInt(n);return t}verifyProof(e,t,n){const r=[this.sum(n.filter((e=>!e.right)).map((e=>e.bucket.size))),BigInt(e.size)-this.sum(n.filter((e=>e.right)).map((e=>e.bucket.size)))];if(r[0]!==t.rng[0]||r[1]!==t.rng[1])return!1;let i,a=t.getBucket();for(const e of n)i=e.right?this.hashFn(Buffer.concat([this.sizeToBuffer(a.size),this.bufferify(a.hashed),this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed)])):this.hashFn(Buffer.concat([this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed),this.sizeToBuffer(a.size),this.bufferify(a.hashed)])),a=new ER(BigInt(a.size)+BigInt(e.bucket.size),i);return a.size===e.size&&a.hashed.toString("hex")===e.hashed.toString("hex")}}wR.MerkleSumTree=CR,"undefined"!=typeof window&&(window.MerkleSumTree=CR),wR.default=CR,function(e){var t=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleTree=void 0;const n=t(cO);e.MerkleTree=n.default;var r=cR;Object.defineProperty(e,"MerkleMountainRange",{enumerable:!0,get:function(){return r.MerkleMountainRange}});var i=yR;Object.defineProperty(e,"IncrementalMerkleTree",{enumerable:!0,get:function(){return i.IncrementalMerkleTree}});var a=wR;Object.defineProperty(e,"MerkleSumTree",{enumerable:!0,get:function(){return a.MerkleSumTree}}),e.default=n.default}(lO);var IR={};Object.defineProperty(IR,"__esModule",{value:!0}),IR.DefaultGetter=void 0;const SR=ck,kR=new bk.Logger("defaults"),OR={integer:0,address:(0,SR.hexZeroPad)("0x",20),bool:!1,bytes:"0x",string:""},PR=e=>void 0!==e&&(null!=e&&(["string","number"].includes(typeof e)&&BigInt(e)===BigInt(0)||Array.isArray(e)&&e.every(PR)||"object"==typeof e&&Object.values(e).every(PR)||"boolean"==typeof e&&!1===e));class RR{constructor(e){this.types=e,this.defaultValues={};for(const t in e){const e=this.getDefaultValue(t);this.defaultValues[t]=e,PR(e)||kR.throwError(`Got non-empty value for type ${t} in default generator: ${e}`)}}static from(e,t){const{defaultValues:n}=new RR(e);return t?n[t]:n}getDefaultValue(e){if(this.defaultValues[e])return this.defaultValues[e];const t=function(e){var t;const[,n]=null!==(t=e.match(/^bytes(\d+)$/))&&void 0!==t?t:[];return n?(0,SR.hexZeroPad)("0x",parseInt(n)):(e.match(/^(u?)int(\d*)$/)&&(e="integer"),OR[e])}(e);if(void 0!==t)return t;const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],t=parseInt(n[3]);if(t>0){const n=this.getDefaultValue(e);return Array(t).fill(n)}return[]}const r=this.types[e];return r?r.reduce(((e,{name:t,type:n})=>Object.assign(Object.assign({},e),{[t]:this.getDefaultValue(n)})),{}):kR.throwArgumentError(`unknown type: ${e}`,"type",e)}}IR.DefaultGetter=RR;var NR={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNextLayer=e.getRoot=e.fillArray=e.hashConcat=e.bufferKeccak=e.hexToBuffer=e.bufferToHex=e.chunk=e.makeArray=void 0;const t=ck;e.makeArray=(e,t)=>Array(e).fill(0).map(((e,n)=>t(n)));e.chunk=(t,n)=>(0,e.makeArray)(Math.ceil(t.length/n),(e=>t.slice(e*n,(e+1)*n)));e.bufferToHex=e=>(0,t.hexlify)(e);e.hexToBuffer=e=>Buffer.from(e.slice(2),"hex");e.bufferKeccak=n=>(0,e.hexToBuffer)((0,t.keccak256)(n));e.hashConcat=n=>(0,e.bufferKeccak)((0,t.hexConcat)(n));e.fillArray=(e,t,n)=>(t>e.length&&e.push(...Array(t-e.length).fill(n)),e);e.getRoot=(t,n=!0)=>{if(0===t.length)throw new Error("empty tree");const r=t.map((t=>{const r=Buffer.isBuffer(t)?t:(0,e.hexToBuffer)(t);return n?(0,e.bufferKeccak)(r):r})),i=[r];for(;i[i.length-1].length>1;)i.push((0,e.getNextLayer)(i[i.length-1]));return i[i.length-1][0]};e.getNextLayer=t=>(0,e.chunk)(t,2).map(e.hashConcat)}(NR),Object.defineProperty(uO,"__esModule",{value:!0}),uO.Eip712MerkleTree=void 0;const LR=mk,MR=ck,DR=lO,FR=IR,jR=NR;uO.Eip712MerkleTree=class{get completedSize(){return Math.pow(2,this.depth)}getCompleteElements(){const e=this.elements;return(0,jR.fillArray)([...e],this.completedSize,this.defaultNode)}getCompleteLeaves(){const e=this.elements.map(this.leafHasher);return(0,jR.fillArray)([...e],this.completedSize,this.defaultLeaf)}get root(){return this.tree.getHexRoot()}getProof(e){const t=this.getCompleteLeaves()[e];return{leaf:t,proof:this.tree.getHexProof(t,e),root:this.tree.getHexRoot()}}getEncodedProofAndSignature(e,t){const{proof:n}=this.getProof(e);return((e,t,n=`0x${"ff".repeat(64)}`)=>(0,MR.hexConcat)([n,`0x${e.toString(16).padStart(6,"0")}`,MR.defaultAbiCoder.encode([`uint256[${t.length}]`],[t])]))(e,n,t)}getDataToSign(){let e=this.getCompleteElements();for(;e.length>2;)e=(0,jR.chunk)(e,2);return e}add(e){this.elements.push(e)}getBulkOrderHash(){const e=this.encoder.hashStruct("BulkOrder",{tree:this.getDataToSign()}),t=this.getCompleteLeaves().map(jR.hexToBuffer),n=(0,jR.bufferToHex)((0,jR.getRoot)(t,!1)),r=(0,MR.keccak256)((0,MR.toUtf8Bytes)(this.encoder._types.BulkOrder));if((0,MR.keccak256)((0,MR.hexConcat)([r,n]))!==e)throw new Error("expected derived bulk order hash to match");return e}constructor(e,t,n,r,i){this.types=e,this.rootType=t,this.leafType=n,this.elements=r,this.depth=i;const a=LR._TypedDataEncoder.from(e);var o,s;this.encoder=a,this.leafHasher=e=>a.hashStruct(n,e),this.defaultNode=FR.DefaultGetter.from(e,n),this.defaultLeaf=this.leafHasher(this.defaultNode),this.tree=(o=this.getCompleteLeaves(),s=this.defaultLeaf,new DR.MerkleTree(o.map(jR.hexToBuffer),jR.bufferKeccak,{complete:!0,sort:!1,hashLeaves:!1,fillDefaultHash:(0,jR.hexToBuffer)(s)}))}},Object.defineProperty(sO,"__esModule",{value:!0}),sO.getBulkOrderTypeHashes=sO.getBulkOrderTypeHash=sO.getBulkOrderTree=sO.getBulkOrderTreeHeight=void 0;const BR=ck,_R=uO,zR=IR,UR=NR,WR=Nk;function HR(e){const t=Object.assign({},WR.EIP_712_BULK_ORDER_TYPE);return t.BulkOrder=[{name:"tree",type:`OrderComponents${"[2]".repeat(e)}`}],t}function VR(e){return Math.max(Math.ceil(Math.log2(e)),1)}function qR(e){const t=HR(e),n=BR._TypedDataEncoder.from(t),r=(0,BR.toUtf8Bytes)(n._types.BulkOrder);return(0,BR.keccak256)(r)}sO.getBulkOrderTreeHeight=VR,sO.getBulkOrderTree=function(e,t=0,n=VR(e.length+t)){const r=HR(n),i=zR.DefaultGetter.from(r,"OrderComponents");let a=[...e];return t>0&&(a=[...(0,UR.fillArray)([],t,i),...e]),new _R.Eip712MerkleTree(r,"BulkOrder","OrderComponents",a,n)},sO.getBulkOrderTypeHash=qR,sO.getBulkOrderTypeHashes=function(e){const t=[];for(let n=0;n<e;n++)t.push(qR(n+1));return t};var GR={},XR={},ZR={};Object.defineProperty(ZR,"__esModule",{value:!0}),ZR.MerkleTree=void 0;const YR=lk,KR=ck,QR=lO,JR=e=>(0,KR.keccak256)(Buffer.from(YR.BigNumber.from(e).toHexString().slice(2).padStart(64,"0"),"hex"));ZR.MerkleTree=class{constructor(e){this.tree=new QR.default(e.map(JR),KR.keccak256,{sort:!0})}getProof(e){return this.tree.getHexProof(JR(e))}getRoot(){return this.tree.getRoot().toString("hex")?this.tree.getHexRoot():"0"}},Object.defineProperty(XR,"__esModule",{value:!0}),XR.shouldUseMatchForFulfill=XR.generateRandomSalt=XR.mapOrderAmountsFromUnitsToFill=XR.mapOrderAmountsFromFilledStatus=XR.totalItemsAmount=XR.areAllCurrenciesSame=XR.mapInputItemToOfferItem=XR.deductFees=XR.feeToConsiderationItem=void 0;const $R=lk,eN=ck,tN=Nk,nN=Wk(),rN=ZR,iN=(e,t)=>$R.BigNumber.from(e).mul($R.BigNumber.from(t)).div(tN.ONE_HUNDRED_PERCENT_BP);XR.feeToConsiderationItem=({fee:e,token:t,baseAmount:n,baseEndAmount:r=n})=>({itemType:t===$R.ethers.constants.AddressZero?tN.ItemType.NATIVE:tN.ItemType.ERC20,token:t,identifierOrCriteria:"0",startAmount:iN(n,e.basisPoints).toString(),endAmount:iN(r,e.basisPoints).toString(),recipient:e.recipient});XR.deductFees=(e,t)=>{if(!t)return e;const n=t.reduce(((e,t)=>e+t.basisPoints),0);return e.map((e=>Object.assign(Object.assign({},e),{startAmount:(0,nN.isCurrencyItem)(e)?$R.BigNumber.from(e.startAmount).sub(iN(e.startAmount,n)).toString():e.startAmount,endAmount:(0,nN.isCurrencyItem)(e)?$R.BigNumber.from(e.endAmount).sub(iN(e.endAmount,n)).toString():e.endAmount})))};XR.mapInputItemToOfferItem=e=>{var t,n,r,i,a,o,s,u;if("itemType"in e){if("identifiers"in e||"criteria"in e){const i="criteria"in e?e.criteria:new rN.MerkleTree(e.identifiers).getRoot();return{itemType:e.itemType===tN.ItemType.ERC721?tN.ItemType.ERC721_WITH_CRITERIA:tN.ItemType.ERC1155_WITH_CRITERIA,token:e.token,identifierOrCriteria:i,startAmount:null!==(t=e.amount)&&void 0!==t?t:"1",endAmount:null!==(r=null!==(n=e.endAmount)&&void 0!==n?n:e.amount)&&void 0!==r?r:"1"}}return"amount"in e||"endAmount"in e?{itemType:e.itemType,token:e.token,identifierOrCriteria:null!==(i=e.identifier)&&void 0!==i?i:"0",startAmount:e.amount,endAmount:null!==(o=null!==(a=e.endAmount)&&void 0!==a?a:e.amount)&&void 0!==o?o:"1"}:{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:"1",endAmount:"1"}}return{itemType:e.token&&e.token!==$R.ethers.constants.AddressZero?tN.ItemType.ERC20:tN.ItemType.NATIVE,token:null!==(s=e.token)&&void 0!==s?s:$R.ethers.constants.AddressZero,identifierOrCriteria:"0",startAmount:e.amount,endAmount:null!==(u=e.endAmount)&&void 0!==u?u:e.amount}};XR.areAllCurrenciesSame=({offer:e,consideration:t})=>{const n=[...e,...t].filter(nN.isCurrencyItem);return n.every((({itemType:e,token:t})=>e===n[0].itemType&&t.toLowerCase()===n[0].token.toLowerCase()))};XR.totalItemsAmount=e=>($R.BigNumber.from(0),$R.BigNumber.from(0),e.map((({startAmount:e,endAmount:t})=>({startAmount:e,endAmount:t}))).reduce((({startAmount:e,endAmount:t},{startAmount:n,endAmount:r})=>({startAmount:e.add(n),endAmount:t.add(r)})),{startAmount:$R.BigNumber.from(0),endAmount:$R.BigNumber.from(0)}));XR.mapOrderAmountsFromFilledStatus=(e,{totalFilled:t,totalSize:n})=>{if(t.eq(0)||n.eq(0))return e;const r=n.sub(t).mul(tN.ONE_HUNDRED_PERCENT_BP).div(n);return{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:iN(e.startAmount,r).toString(),endAmount:iN(e.endAmount,r).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:iN(e.startAmount,r).toString(),endAmount:iN(e.endAmount,r).toString()})))}),signature:e.signature}};const aN=(e,t,n)=>$R.BigNumber.from(e).mul($R.BigNumber.from(t)).div(n);XR.mapOrderAmountsFromUnitsToFill=(e,{unitsToFill:t,totalSize:n})=>{const r=$R.BigNumber.from(t);if(r.lte(0))throw new Error("Units to fill must be greater than 1");const i=(0,nN.getMaximumSizeForOrder)(e);return n.eq(0)&&(n=i),{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:aN(e.startAmount,r,n).toString(),endAmount:aN(e.endAmount,r,n).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:aN(e.startAmount,r,n).toString(),endAmount:aN(e.endAmount,r,n).toString()})))}),signature:e.signature}};XR.generateRandomSalt=e=>e?`0x${Buffer.from((0,eN.concat)([(0,eN.keccak256)((0,eN.toUtf8Bytes)(e)).slice(0,10),Uint8Array.from(Array(20).fill(0)),(0,eN.randomBytes)(8)])).toString("hex")}`:`0x${Buffer.from((0,eN.randomBytes)(8)).toString("hex").padStart(64,"0")}`;XR.shouldUseMatchForFulfill=()=>!0,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getAdvancedOrderNumeratorDenominator=e.generateFulfillOrdersFulfillments=e.fulfillAvailableOrders=e.validateAndSanitizeFromOrderStatus=e.fulfillStandardOrder=e.fulfillBasicOrder=e.shouldUseBasicFulfill=void 0;const t=lk,n=Nk,r=Lk,i=Qk,a=_k(),o=Uk,s=Wk(),u=XR,l=Hk;e.shouldUseBasicFulfill=({offer:e,consideration:r,offerer:i},a)=>{if(!a.eq(0))return!1;if(e.length>1||0===r.length)return!1;const o=[...e,...r],l=o.filter((({itemType:e})=>[n.ItemType.ERC721,n.ItemType.ERC1155].includes(e))),c=o.filter((({itemType:e})=>(0,s.isCriteriaItem)(e)));if((0,s.isNativeCurrencyItem)(e[0]))return!1;if(1!==l.length||0!==c.length)return!1;if(!(0,u.areAllCurrenciesSame)({offer:e,consideration:r}))return!1;if(o.some((({startAmount:e,endAmount:t})=>e!==t)))return!1;const[d,...f]=r;if(d.recipient.toLowerCase()!==i.toLowerCase())return!1;if(r.length>1&&f.every((t=>t.itemType===e[0].itemType))&&(0,u.totalItemsAmount)(f).endAmount.gt(e[0].endAmount))return!1;const p=o.filter(s.isCurrencyItem),h=p.filter((({itemType:e})=>e===n.ItemType.NATIVE)).every((({token:e})=>e===t.ethers.constants.AddressZero)),m=p.every((({identifierOrCriteria:e})=>t.BigNumber.from(e).eq(0))),y=l.filter((({itemType:e})=>e===n.ItemType.ERC721)).every((({endAmount:e})=>"1"===e));return h&&m&&y};const c={[n.ItemType.ERC20]:{[n.ItemType.ERC721]:n.BasicOrderRouteType.ERC721_TO_ERC20,[n.ItemType.ERC1155]:n.BasicOrderRouteType.ERC1155_TO_ERC20},[n.ItemType.ERC721]:{[n.ItemType.NATIVE]:n.BasicOrderRouteType.ETH_TO_ERC721,[n.ItemType.ERC20]:n.BasicOrderRouteType.ERC20_TO_ERC721},[n.ItemType.ERC1155]:{[n.ItemType.NATIVE]:n.BasicOrderRouteType.ETH_TO_ERC1155,[n.ItemType.ERC20]:n.BasicOrderRouteType.ERC20_TO_ERC1155}};function d(e,t){const{isValidated:n,isCancelled:r,totalFilled:i,totalSize:a}=t;if(a.gt(0)&&i.div(a).eq(1))throw new Error("The order you are trying to fulfill is already filled");if(r)throw new Error("The order you are trying to fulfill is cancelled");return n?{parameters:Object.assign({},e.parameters),signature:"0x"}:e}function f(e){const t=({sourceOrDestination:e,operator:t="",token:n,identifier:r})=>`${e}-${t}-${n}-${r}`,n={},r={};return e.forEach((({order:e,offererOperator:r,offerCriteria:i},o)=>{const u=(0,a.getItemToCriteriaMap)(e.parameters.offer,i);return e.parameters.offer.forEach(((i,a)=>{var l,c,d;const f=`${t({sourceOrDestination:e.parameters.offerer,operator:r,token:i.token,identifier:null!==(c=null===(l=u.get(i))||void 0===l?void 0:l.identifier)&&void 0!==c?c:i.identifierOrCriteria})}${(0,s.isErc721Item)(i.itemType)?a:""}`;n[f]=[...null!==(d=n[f])&&void 0!==d?d:[],{orderIndex:o,itemIndex:a}]}))})),e.forEach((({order:e,considerationCriteria:n,tips:i},o)=>{const u=(0,a.getItemToCriteriaMap)(e.parameters.consideration,n);return[...e.parameters.consideration,...i].forEach(((e,n)=>{var i,a,l;const c=`${t({sourceOrDestination:e.recipient,token:e.token,identifier:null!==(a=null===(i=u.get(e))||void 0===i?void 0:i.identifier)&&void 0!==a?a:e.identifierOrCriteria})}${(0,s.isErc721Item)(e.itemType)?n:""}`;r[c]=[...null!==(l=r[c])&&void 0!==l?l:[],{orderIndex:o,itemIndex:n}]}))})),{offerFulfillments:Object.values(n),considerationFulfillments:Object.values(r)}}e.fulfillBasicOrder=function({order:e,seaportContract:a,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:u,timeBasedItemParams:d,offererOperator:f,fulfillerOperator:p,signer:h,tips:m=[],conduitKey:y=n.NO_CONDUIT,domain:g},A){var b,v;const{offer:w,consideration:x}=e.parameters,E=[...x,...m],T=w[0],[C,...I]=E,S=null===(b=c[T.itemType])||void 0===b?void 0:b[C.itemType];if(void 0===S)throw new Error("Order parameters did not result in a valid basic fulfillment");const k=I.map((({startAmount:e,recipient:t})=>({amount:e,recipient:t}))),O=E.filter((e=>e.itemType!==w[0].itemType)),P=null===(v=(0,s.getSummedTokenAndIdentifierAmounts)({items:O,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},d),{isConsiderationItem:!0})})[t.ethers.constants.AddressZero])||void 0===v?void 0:v[0],R=(0,i.validateBasicFulfillBalancesAndApprovals)({offer:w,consideration:E,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:u,timeBasedItemParams:d,offererOperator:f,fulfillerOperator:p}),N={offerer:e.parameters.offerer,offererConduitKey:e.parameters.conduitKey,zone:e.parameters.zone,basicOrderType:e.parameters.orderType+4*S,offerToken:T.token,offerIdentifier:T.identifierOrCriteria,offerAmount:T.endAmount,considerationToken:C.token,considerationIdentifier:C.identifierOrCriteria,considerationAmount:C.endAmount,startTime:e.parameters.startTime,endTime:e.parameters.endTime,salt:e.parameters.salt,totalOriginalAdditionalRecipients:e.parameters.consideration.length-1,signature:e.signature,fulfillerConduitKey:y,additionalRecipients:k,zoneHash:e.parameters.zoneHash},L={value:P},M=[...(0,r.getApprovalActions)(R,A,h),{type:"exchange",transactionMethods:(0,l.getTransactionMethods)(a.connect(h),"fulfillBasicOrder",[N,L],g)}];return{actions:M,executeAllActions:()=>(0,l.executeAllActions)(M)}},e.fulfillStandardOrder=function({order:n,unitsToFill:o=0,totalSize:c,totalFilled:d,offerCriteria:f,considerationCriteria:p,tips:h=[],extraData:m,seaportContract:y,offererBalancesAndApprovals:g,fulfillerBalancesAndApprovals:A,offererOperator:b,fulfillerOperator:v,timeBasedItemParams:w,conduitKey:x,recipientAddress:E,signer:T,domain:C},I){var S;const k=o?(0,u.mapOrderAmountsFromUnitsToFill)(n,{unitsToFill:o,totalSize:c}):(0,u.mapOrderAmountsFromFilledStatus)(n,{totalFilled:d,totalSize:c}),{parameters:{offer:O,consideration:P}}=k,R=[...P,...h],N=O.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),L=R.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),M=N.length>0||L.length>0;if(N.length!==f.length||L.length!==p.length)throw new Error("You must supply the appropriate criterias for criteria based items");const D=null===(S=(0,s.getSummedTokenAndIdentifierAmounts)({items:R,criterias:p,timeBasedItemParams:Object.assign(Object.assign({},w),{isConsiderationItem:!0})})[t.ethers.constants.AddressZero])||void 0===S?void 0:S[0],F=(0,i.validateStandardFulfillBalancesAndApprovals)({offer:O,consideration:R,offerCriteria:f,considerationCriteria:p,offererBalancesAndApprovals:g,fulfillerBalancesAndApprovals:A,timeBasedItemParams:w,offererOperator:b,fulfillerOperator:v}),j={value:D},B=(0,r.getApprovalActions)(F,I,T),_=E!==t.ethers.constants.AddressZero,z=Boolean(o)||M||_,U=Object.assign(Object.assign({},n),{parameters:Object.assign(Object.assign({},n.parameters),{consideration:[...n.parameters.consideration,...h],totalOriginalConsiderationItems:P.length})}),{numerator:W,denominator:H}=(0,e.getAdvancedOrderNumeratorDenominator)(n,o),V=[...B,{type:"exchange",transactionMethods:z?(0,l.getTransactionMethods)(y.connect(T),"fulfillAdvancedOrder",[Object.assign(Object.assign({},U),{numerator:W,denominator:H,extraData:null!=m?m:"0x"}),M?(0,a.generateCriteriaResolvers)({orders:[n],offerCriterias:[f],considerationCriterias:[p]}):[],x,E,j],C):(0,l.getTransactionMethods)(y.connect(T),"fulfillOrder",[U,x,j],C)}];return{actions:V,executeAllActions:()=>(0,l.executeAllActions)(V)}},e.validateAndSanitizeFromOrderStatus=d,e.fulfillAvailableOrders=function({ordersMetadata:n,seaportContract:o,fulfillerBalancesAndApprovals:c,fulfillerOperator:p,currentBlockTimestamp:h,ascendingAmountTimestampBuffer:m,conduitKey:y,signer:g,recipientAddress:A,exactApproval:b,domain:v}){const w=n.map((e=>Object.assign(Object.assign({},e),{order:d(e.order,e.orderStatus)}))),x=w.map((e=>Object.assign(Object.assign({},e),{order:e.unitsToFill?(0,u.mapOrderAmountsFromUnitsToFill)(e.order,{unitsToFill:e.unitsToFill,totalSize:e.orderStatus.totalSize}):(0,u.mapOrderAmountsFromFilledStatus)(e.order,{totalFilled:e.orderStatus.totalFilled,totalSize:e.orderStatus.totalSize})})));let E=t.BigNumber.from(0);const T=[],C=w.flatMap((e=>[e.order.parameters.offer,e.order.parameters.consideration])).flat().filter((({itemType:e})=>(0,s.isCriteriaItem)(e))).length>0;x.forEach((({order:e,tips:n,offerCriteria:r,considerationCriteria:a,offererBalancesAndApprovals:o,offererOperator:u})=>{var l,d;const f=[...e.parameters.consideration,...n],y={startTime:e.parameters.startTime,endTime:e.parameters.endTime,currentBlockTimestamp:h,ascendingAmountTimestampBuffer:m,isConsiderationItem:!0};E=E.add(null!==(d=null===(l=(0,s.getSummedTokenAndIdentifierAmounts)({items:f,criterias:a,timeBasedItemParams:y})[t.ethers.constants.AddressZero])||void 0===l?void 0:l[0])&&void 0!==d?d:t.BigNumber.from(0));const g=(0,i.validateStandardFulfillBalancesAndApprovals)({offer:e.parameters.offer,consideration:f,offerCriteria:r,considerationCriteria:a,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:c,timeBasedItemParams:y,offererOperator:u,fulfillerOperator:p}),A=e.parameters.offer.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),b=f.filter((({itemType:e})=>(0,s.isCriteriaItem)(e)));if(A.length!==r.length||b.length!==a.length)throw new Error("You must supply the appropriate criterias for criteria based items");g.forEach((e=>{T.find((t=>t.token===e.token))||T.push(e)}))}));const I={value:E},S=(0,r.getApprovalActions)(T,b,g),k=w.map((({order:t,unitsToFill:n=0,tips:r,extraData:i})=>{const{numerator:a,denominator:o}=(0,e.getAdvancedOrderNumeratorDenominator)(t,n),s=[...t.parameters.consideration,...r];return Object.assign(Object.assign({},t),{parameters:Object.assign(Object.assign({},t.parameters),{consideration:s,totalOriginalConsiderationItems:t.parameters.consideration.length}),numerator:a,denominator:o,extraData:i})})),{offerFulfillments:O,considerationFulfillments:P}=f(n),R={type:"exchange",transactionMethods:(0,l.getTransactionMethods)(o.connect(g),"fulfillAvailableAdvancedOrders",[k,C?(0,a.generateCriteriaResolvers)({orders:n.map((({order:e})=>e)),offerCriterias:n.map((({offerCriteria:e})=>e)),considerationCriterias:n.map((({considerationCriteria:e})=>e))}):[],O,P,y,A,k.length,I],v)},N=[...S,R];return{actions:N,executeAllActions:()=>(0,l.executeAllActions)(N)}},e.generateFulfillOrdersFulfillments=f;e.getAdvancedOrderNumeratorDenominator=(e,n)=>{const r=(0,s.getMaximumSizeForOrder)(e),i=t.BigNumber.from(n),a=(0,o.gcd)(i,r);return{numerator:n?i.div(a):t.BigNumber.from(1),denominator:n?r.div(a):t.BigNumber.from(1)}}}(GR);var oN=ot&&ot.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(BS,"__esModule",{value:!0}),BS.Seaport=void 0;const sN=uk,uN=lk,lN=ck,cN=Pk,dN=Rk,fN=Nk,pN=Lk,hN=Qk,mN=sO,yN=GR,gN=Wk(),AN=XR,bN=Hk;var vN,wN,xN,EN,TN,CN,IN,SN,kN,ON,PN,RN,NN,LN,MN,DN,FN,jN,BN,_N,zN,UN,WN,HN,VN,qN,GN,XN,ZN,YN,KN,QN,JN,$N,eL,tL,nL,rL,iL,aL,oL,sL,uL,lL,cL,dL,fL;BS.Seaport=class{constructor(e,{overrides:t,ascendingAmountFulfillmentBuffer:n=300,balanceAndApprovalChecksOnOrderCreation:r=!0,conduitKeyToConduit:i,seaportVersion:a="1.5"}={}){var o,s,u;this.OPENSEA_CONDUIT_KEY=fN.OPENSEA_CONDUIT_KEY,this.getOrderHash=e=>{const t="OfferItem(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)",n="ConsiderationItem(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)",r=`OrderComponents(address offerer,address zone,OfferItem[] offer,ConsiderationItem[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 counter)${n}${t}`,i=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(t)),a=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(n)),o=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(r)),s=uN.ethers.utils.keccak256("0x"+e.offer.map((e=>uN.ethers.utils.keccak256("0x"+[i.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.identifierOrCriteria).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.startAmount).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endAmount).toHexString().slice(2).padStart(64,"0")].join("")).slice(2))).join("")),u=uN.ethers.utils.keccak256("0x"+e.consideration.map((e=>uN.ethers.utils.keccak256("0x"+[a.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.identifierOrCriteria).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.startAmount).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endAmount).toHexString().slice(2).padStart(64,"0"),e.recipient.slice(2).padStart(64,"0")].join("")).slice(2))).join(""));return uN.ethers.utils.keccak256("0x"+[o.slice(2),e.offerer.slice(2).padStart(64,"0"),e.zone.slice(2).padStart(64,"0"),s.slice(2),u.slice(2),e.orderType.toString().padStart(64,"0"),uN.ethers.BigNumber.from(e.startTime).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endTime).toHexString().slice(2).padStart(64,"0"),e.zoneHash.slice(2),uN.BigNumber.from(e.salt).toHexString().slice(2).padStart(64,"0"),e.conduitKey.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.counter).toHexString().slice(2).padStart(64,"0")].join(""))};const l=e instanceof uN.providers.Provider?e:e.provider;if(this.signer=e._isSigner?e:void 0,!l)throw new Error("Either a provider or custom signer with provider must be provided");this.provider=l,this.multicallProvider=new sN.providers.MulticallProvider(this.provider),this.contract=new uN.Contract(null!==(o=null==t?void 0:t.contractAddress)&&void 0!==o?o:"1.5"===a?fN.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS:fN.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS,dN.SeaportABIv14,this.multicallProvider),this.domainRegistry=new uN.Contract(null!==(s=null==t?void 0:t.domainRegistryAddress)&&void 0!==s?s:fN.DOMAIN_REGISTRY_ADDRESS,cN.DomainRegistryABI,this.multicallProvider),this.config={ascendingAmountFulfillmentBuffer:n,balanceAndApprovalChecksOnOrderCreation:r,conduitKeyToConduit:Object.assign(Object.assign(Object.assign({},fN.KNOWN_CONDUIT_KEYS_TO_CONDUIT),{[fN.NO_CONDUIT]:this.contract.address}),i),seaportVersion:a},this.defaultConduitKey=null!==(u=null==t?void 0:t.defaultConduitKey)&&void 0!==u?u:fN.NO_CONDUIT}createOrder(e,t,n){return oN(this,void 0,void 0,(function*(){const r=this._getSigner(t),i=null!=t?t:yield r.getAddress(),{orderComponents:a,approvalActions:o}=yield this._formatOrder(r,i,Boolean(n),e),s={type:"create",getMessageToSign:()=>this._getMessageToSign(a),createOrder:()=>oN(this,void 0,void 0,(function*(){const e=yield this.signOrder(a,i);return{parameters:a,signature:e}}))},u=[...o,s];return{actions:u,executeAllActions:()=>(0,bN.executeAllActions)(u)}}))}createBulkOrders(e,t,n){var r;return oN(this,void 0,void 0,(function*(){const i=this._getSigner(t),a=yield i.getAddress(),o=yield this.getCounter(a),s=[],u=[];for(const t of e){null!==(r=t.counter)&&void 0!==r||(t.counter=o);const{orderComponents:e,approvalActions:l}=yield this._formatOrder(i,a,Boolean(n),t);u.push(e);for(const e of l)void 0===s.find((t=>t.token===e.token))&&s.push(e)}const l={type:"createBulk",getMessageToSign:()=>this._getBulkMessageToSign(u),createBulkOrders:()=>oN(this,void 0,void 0,(function*(){return yield this.signBulkOrder(u,a)}))},c=[...s,l];return{actions:c,executeAllActions:()=>(0,bN.executeAllActions)(c)}}))}_formatOrder(e,t,n,{conduitKey:r=this.defaultConduitKey,zone:i=uN.ethers.constants.AddressZero,zoneHash:a=uN.ethers.constants.HashZero,startTime:o=Math.floor(Date.now()/1e3).toString(),endTime:s=fN.MAX_INT.toString(),offer:u,consideration:l,counter:c,allowPartialFills:d,restrictedByZone:f,fees:p,domain:h,salt:m}){var y;return oN(this,void 0,void 0,(function*(){const g=u.map(AN.mapInputItemToOfferItem),A=[...l.map((e=>{var n;return Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:null!==(n=e.recipient)&&void 0!==n?n:t})}))];if((null==p?void 0:p.length)&&!(0,AN.areAllCurrenciesSame)({offer:g,consideration:A}))throw new Error("All currency tokens in the order must be the same token when applying fees");const b=[...g,...A].filter(gN.isCurrencyItem),v=(0,AN.totalItemsAmount)(b),w=this.config.conduitKeyToConduit[r],x=this._getOrderTypeFromOrderOptions({allowPartialFills:d,restrictedByZone:f}),E=[...(0,AN.deductFees)(A,p),...b.length&&null!==(y=null==p?void 0:p.map((e=>(0,AN.feeToConsiderationItem)({fee:e,token:b[0].token,baseAmount:v.startAmount,baseEndAmount:v.endAmount}))))&&void 0!==y?y:[]],T=void 0!==m?`0x${uN.BigNumber.from(m).toHexString().slice(2).padStart(64,"0")}`:(0,AN.generateRandomSalt)(h),C={offerer:t,zone:i,zoneHash:a,startTime:o,endTime:s,orderType:x,offer:g,consideration:E,totalOriginalConsiderationItems:E.length,salt:T,conduitKey:r,counter:(null!=c?c:yield this.getCounter(t)).toString()},I=[];if(this.config.balanceAndApprovalChecksOnOrderCreation){const r=yield(0,hN.getBalancesAndApprovals)({owner:t,items:g,criterias:[],multicallProvider:this.multicallProvider,operator:w}),i=(0,hN.validateOfferBalancesAndApprovals)({offer:g,criterias:[],balancesAndApprovals:r,throwOnInsufficientBalances:!0,operator:w}),a=(0,pN.getApprovalActions)(i,n,e);I.push(...a)}return{orderComponents:C,approvalActions:I}}))}_getSigner(e){if(this.signer)return this.signer;if(!(this.provider instanceof uN.providers.JsonRpcProvider))throw new Error("Either signer or a JsonRpcProvider must be provided");return this.provider.getSigner(e)}_getOrderTypeFromOrderOptions({allowPartialFills:e,restrictedByZone:t}){return e?t?fN.OrderType.PARTIAL_RESTRICTED:fN.OrderType.PARTIAL_OPEN:t?fN.OrderType.FULL_RESTRICTED:fN.OrderType.FULL_OPEN}_getDomainData(){return oN(this,void 0,void 0,(function*(){const{chainId:e}=yield this.provider.getNetwork();return{name:fN.SEAPORT_CONTRACT_NAME,version:"1.5"===this.config.seaportVersion?fN.SEAPORT_CONTRACT_VERSION_V1_5:fN.SEAPORT_CONTRACT_VERSION_V1_4,chainId:e,verifyingContract:this.contract.address}}))}_getMessageToSign(e){return oN(this,void 0,void 0,(function*(){const t=yield this._getDomainData();return JSON.stringify(lN._TypedDataEncoder.getPayload(t,fN.EIP_712_ORDER_TYPE,e))}))}_getBulkMessageToSign(e){return oN(this,void 0,void 0,(function*(){const t=yield this._getDomainData(),n=(0,mN.getBulkOrderTree)(e),r=n.types,i=n.getDataToSign();return JSON.stringify(lN._TypedDataEncoder.getPayload(t,r,{tree:i}))}))}signOrder(e,t){return oN(this,void 0,void 0,(function*(){const n=this._getSigner(t),r=yield this._getDomainData();let i=yield n._signTypedData(r,fN.EIP_712_ORDER_TYPE,e);return 132===i.length&&(i=uN.ethers.utils.splitSignature(i).compact),i}))}signBulkOrder(e,t){return oN(this,void 0,void 0,(function*(){const n=this._getSigner(t),r=yield this._getDomainData(),i=(0,mN.getBulkOrderTree)(e),a=i.types,o={tree:i.getDataToSign()};let s=yield n._signTypedData(r,a,o);132===s.length&&(s=uN.ethers.utils.splitSignature(s).compact);const u=e.map(((e,t)=>({parameters:e,signature:i.getEncodedProofAndSignature(t,s)})));return u}))}cancelOrders(e,t,n){const r=this._getSigner(t);return(0,bN.getTransactionMethods)(this.contract.connect(r),"cancel",[e],n)}bulkCancelOrders(e,t){const n=this._getSigner(e);return(0,bN.getTransactionMethods)(this.contract.connect(n),"incrementCounter",[],t)}validate(e,t,n){const r=this._getSigner(t);return(0,bN.getTransactionMethods)(this.contract.connect(r),"validate",[e],n)}getOrderStatus(e){return this.contract.getOrderStatus(e)}getCounter(e){return this.contract.getCounter(e)}fulfillOrder({order:e,unitsToFill:t,offerCriteria:n=[],considerationCriteria:r=[],tips:i=[],extraData:a="0x",accountAddress:o,conduitKey:s=this.defaultConduitKey,recipientAddress:u=uN.ethers.constants.AddressZero,domain:l,exactApproval:c=!1}){return oN(this,void 0,void 0,(function*(){if(!e.signature)throw new Error("Order is missing signature");const{parameters:d}=e,{offerer:f,offer:p,consideration:h}=d,m=this._getSigner(o),y=yield m.getAddress(),g=this.config.conduitKeyToConduit[d.conduitKey],A=this.config.conduitKeyToConduit[s],[b,v,w,x]=yield Promise.all([(0,hN.getBalancesAndApprovals)({owner:f,items:p,criterias:n,multicallProvider:this.multicallProvider,operator:g}),(0,hN.getBalancesAndApprovals)({owner:y,items:[...p,...h],criterias:[...n,...r],multicallProvider:this.multicallProvider,operator:A}),this.multicallProvider.getBlock("latest"),this.getOrderStatus(this.getOrderHash(d))]),E=w.timestamp,{totalFilled:T,totalSize:C}=x,I=(0,yN.validateAndSanitizeFromOrderStatus)(e,x),S={startTime:I.parameters.startTime,endTime:I.parameters.endTime,currentBlockTimestamp:E,ascendingAmountTimestampBuffer:this.config.ascendingAmountFulfillmentBuffer},k=i.map((e=>Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:e.recipient}))),O=u===uN.ethers.constants.AddressZero;return!t&&O&&(0,yN.shouldUseBasicFulfill)(I.parameters,T)?(0,yN.fulfillBasicOrder)({order:I,seaportContract:this.contract,offererBalancesAndApprovals:b,fulfillerBalancesAndApprovals:v,timeBasedItemParams:S,conduitKey:s,offererOperator:g,fulfillerOperator:A,signer:m,tips:k,domain:l},c):(0,yN.fulfillStandardOrder)({order:I,unitsToFill:t,totalFilled:T,totalSize:C.eq(0)?(0,gN.getMaximumSizeForOrder)(I):C,offerCriteria:n,considerationCriteria:r,tips:k,extraData:a,seaportContract:this.contract,offererBalancesAndApprovals:b,fulfillerBalancesAndApprovals:v,timeBasedItemParams:S,conduitKey:s,signer:m,offererOperator:g,fulfillerOperator:A,recipientAddress:u,domain:l},c)}))}fulfillOrders({fulfillOrderDetails:e,accountAddress:t,conduitKey:n=this.defaultConduitKey,recipientAddress:r=uN.ethers.constants.AddressZero,domain:i,exactApproval:a=!1}){return oN(this,void 0,void 0,(function*(){if(e.some((e=>!e.order.signature)))throw new Error("All orders must include signatures");const o=this._getSigner(t),s=yield o.getAddress(),u=e.map((({order:e})=>this.config.conduitKeyToConduit[e.parameters.conduitKey])),l=this.config.conduitKeyToConduit[n],c=e.flatMap((({order:e})=>e.parameters.offer)),d=e.flatMap((({order:e})=>e.parameters.consideration)),f=e.flatMap((({offerCriteria:e=[]})=>e)),p=e.flatMap((({considerationCriteria:e=[]})=>e)),[h,m,y,g]=yield Promise.all([Promise.all(e.map((({order:e,offerCriteria:t=[]},n)=>(0,hN.getBalancesAndApprovals)({owner:e.parameters.offerer,items:e.parameters.offer,criterias:t,operator:u[n],multicallProvider:this.multicallProvider})))),(0,hN.getBalancesAndApprovals)({owner:s,items:[...c,...d],criterias:[...f,...p],operator:l,multicallProvider:this.multicallProvider}),this.multicallProvider.getBlock("latest"),Promise.all(e.map((({order:e})=>this.getOrderStatus(this.getOrderHash(e.parameters)))))]),A=e.map(((e,t)=>{var n,r,i,a,o;return{order:e.order,unitsToFill:e.unitsToFill,orderStatus:g[t],offerCriteria:null!==(n=e.offerCriteria)&&void 0!==n?n:[],considerationCriteria:null!==(r=e.considerationCriteria)&&void 0!==r?r:[],tips:null!==(a=null===(i=e.tips)||void 0===i?void 0:i.map((e=>Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:e.recipient}))))&&void 0!==a?a:[],extraData:null!==(o=e.extraData)&&void 0!==o?o:"0x",offererBalancesAndApprovals:h[t],offererOperator:u[t]}}));return(0,yN.fulfillAvailableOrders)({ordersMetadata:A,seaportContract:this.contract,fulfillerBalancesAndApprovals:m,currentBlockTimestamp:y.timestamp,ascendingAmountTimestampBuffer:this.config.ascendingAmountFulfillmentBuffer,fulfillerOperator:l,signer:o,conduitKey:n,recipientAddress:r,domain:i,exactApproval:a})}))}matchOrders({orders:e,fulfillments:t,overrides:n,accountAddress:r,domain:i}){const a=this._getSigner(r);return(0,bN.getTransactionMethods)(this.contract.connect(a),"matchOrders",[e,t,n],i)}setDomain(e,t){const n=this._getSigner(t);return(0,bN.getTransactionMethods)(this.domainRegistry.connect(n),"setDomain",[e])}getNumberOfDomains(e){return oN(this,void 0,void 0,(function*(){return this.domainRegistry.getNumberOfDomains(e)}))}getDomain(e,t){return this.domainRegistry.getDomain(e,t)}getDomains(e,t){return oN(this,void 0,void 0,(function*(){try{if(t)throw Error;return this.domainRegistry.getDomains(e)}catch(t){const n=(yield this.domainRegistry.getNumberOfDomains(e)).toNumber(),r=Promise.all([...Array(n).keys()].map((t=>this.domainRegistry.getDomain(e,t))));return r}}))}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Seaport=void 0;const t=BS;Object.defineProperty(e,"Seaport",{enumerable:!0,get:function(){return t.Seaport}})}({}),function(e){var t;(t=e.cancellation_type||(e.cancellation_type={})).ON_CHAIN="ON_CHAIN",t.OFF_CHAIN="OFF_CHAIN"}(vN||(vN={})),function(e){(e.reason_code||(e.reason_code={})).FILLED="FILLED"}(wN||(wN={})),function(e){var t;(t=e.type||(e.type={})).ROYALTY="ROYALTY",t.MAKER_ECOSYSTEM="MAKER_ECOSYSTEM",t.TAKER_ECOSYSTEM="TAKER_ECOSYSTEM",t.PROTOCOL="PROTOCOL"}(xN||(xN={})),function(e){(e.type||(e.type={})).LISTING="LISTING"}(EN||(EN={})),function(e){e.PENDING="PENDING",e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e.FILLED="FILLED",e.EXPIRED="EXPIRED",e.CANCELLED="CANCELLED"}(TN||(TN={})),function(e){(e.order_type||(e.order_type={})).FULL_RESTRICTED="FULL_RESTRICTED"}(CN||(CN={})),function(e){e.MAKER_ECOSYSTEM="MAKER_ECOSYSTEM",e.TAKER_ECOSYSTEM="TAKER_ECOSYSTEM",e.PROTOCOL="PROTOCOL",e.ROYALTY="ROYALTY"}(IN||(IN={})),function(e){e.APPROVAL="APPROVAL",e.FULFILL_ORDER="FULFILL_ORDER",e.CANCEL="CANCEL"}(SN||(SN={})),function(e){e.CREATE_LISTING="CREATE_LISTING",e.OFF_CHAIN_CANCELLATION="OFF_CHAIN_CANCELLATION"}(kN||(kN={})),function(e){e.TRANSACTION="TRANSACTION",e.SIGNABLE="SIGNABLE"}(ON||(ON={})),function(e){e[e.FULL_OPEN=0]="FULL_OPEN",e[e.PARTIAL_OPEN=1]="PARTIAL_OPEN",e[e.FULL_RESTRICTED=2]="FULL_RESTRICTED",e[e.PARTIAL_RESTRICTED=3]="PARTIAL_RESTRICTED"}(PN||(PN={})),function(e){e[e.NATIVE=0]="NATIVE",e[e.ERC20=1]="ERC20",e[e.ERC721=2]="ERC721",e[e.ERC1155=3]="ERC1155",e[e.ERC721_WITH_CRITERIA=4]="ERC721_WITH_CRITERIA",e[e.ERC1155_WITH_CRITERIA=5]="ERC1155_WITH_CRITERIA"}(RN||(RN={})),function(e){e[e.OFFER=0]="OFFER",e[e.CONSIDERATION=1]="CONSIDERATION"}(NN||(NN={})),function(e){e[e.ETH_TO_ERC721=0]="ETH_TO_ERC721",e[e.ETH_TO_ERC1155=1]="ETH_TO_ERC1155",e[e.ERC20_TO_ERC721=2]="ERC20_TO_ERC721",e[e.ERC20_TO_ERC1155=3]="ERC20_TO_ERC1155",e[e.ERC721_TO_ERC20=4]="ERC721_TO_ERC20",e[e.ERC1155_TO_ERC20=5]="ERC1155_TO_ERC20"}(LN||(LN={})),function(e){e.IMTBL_WIDGETS_PROVIDER="imtbl-widgets-provider",e.IMTBL_CONNECT_WIDGET_EVENT="imtbl-connect-widget",e.IMTBL_WALLET_WIDGET_EVENT="imtbl-wallet-widget",e.IMTBL_SWAP_WIDGET_EVENT="imtbl-swap-widget",e.IMTBL_BRIDGE_WIDGET_EVENT="imtbl-bridge-widget",e.IMTBL_ONRAMP_WIDGET_EVENT="imtbl-onramp-widget",e.IMTBL_SALE_WIDGET_EVENT="imtbl-sale-widget"}(MN||(MN={})),function(e){e.PROVIDER_UPDATED="PROVIDER_UPDATED"}(DN||(DN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.LANGUAGE_CHANGED="language-changed"}(FN||(FN={})),function(e){e.CLOSE_WIDGET="close-widget",e.NETWORK_SWITCH="network-switch",e.DISCONNECT_WALLET="disconnect-wallet",e.LANGUAGE_CHANGED="language-changed"}(jN||(jN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.REJECTED="rejected",e.LANGUAGE_CHANGED="language-changed"}(BN||(BN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.REJECTED="rejected",e.TRANSACTION_SUCCESS="transaction-success",e.LANGUAGE_CHANGED="language-changed",e.PAYMENT_METHOD="payment-method"}(_N||(_N={})),function(e){e.CRYPTO="crypto",e.FIAT="fiat"}(zN||(zN={})),function(e){e.CLOSE_WIDGET="close-widget",e.FAILURE="failure",e.TRANSACTION_SENT="transaction-sent",e.LANGUAGE_CHANGED="language-changed"}(UN||(UN={})),function(e){e.REQUEST_CONNECT="request-connect",e.REQUEST_WALLET="request-wallet",e.REQUEST_SWAP="request-swap",e.REQUEST_BRIDGE="request-bridge",e.REQUEST_ONRAMP="request-onramp"}(WN||(WN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.LANGUAGE_CHANGED="language-changed"}(HN||(HN={})),function(e){e.CONNECT="connect",e.WALLET="wallet",e.SWAP="swap",e.BRIDGE="bridge",e.ONRAMP="onramp",e.SALE="sale"}(VN||(VN={})),function(e){e.LAYER1="LAYER1",e.LAYER2="LAYER2"}(qN||(qN={})),function(e){e.LIGHT="light",e.DARK="dark"}(GN||(GN={})),function(e){e[e.IMTBL_ZKEVM_MAINNET=13371]="IMTBL_ZKEVM_MAINNET",e[e.IMTBL_ZKEVM_TESTNET=13473]="IMTBL_ZKEVM_TESTNET",e[e.IMTBL_ZKEVM_DEVNET=13433]="IMTBL_ZKEVM_DEVNET",e[e.ETHEREUM=1]="ETHEREUM",e[e.SEPOLIA=11155111]="SEPOLIA"}(XN||(XN={})),function(e){e.ETHEREUM="Ethereum",e.SEPOLIA="Sepolia",e.IMTBL_ZKEVM_TESTNET="Immutable zkEVM Test",e.IMTBL_ZKEVM_DEVNET="Immutable zkEVM Dev",e.IMTBL_ZKEVM_MAINNET="Immutable zkEVM"}(ZN||(ZN={})),function(e){e.ETHEREUM="ethereum",e.SEPOLIA="sepolia",e.IMTBL_ZKEVM_MAINNET="imtbl-zkevm-mainnet",e.IMTBL_ZKEVM_TESTNET="imtbl-zkevm-testnet",e.IMTBL_ZKEVM_DEVNET="imtbl-zkevm-devnet"}(YN||(YN={})),function(e){e.TRANSAK="201811419111"}(KN||(KN={})),function(e){e.BRIDGE_TO_L2="BRIDGE_TO_L2",e.SWAP="SWAP"}(QN||(QN={})),function(e){e.ALL="all"}(JN||(JN={})),function(e){e.ALL="all",e.SWAP="swap",e.BRIDGE="bridge",e.ONRAMP="onramp"}($N||($N={})),function(e){e.CHECK_CONNECTION="eth_accounts",e.CONNECT="eth_requestAccounts",e.ADD_NETWORK="wallet_addEthereumChain",e.SWITCH_NETWORK="wallet_switchEthereumChain",e.GET_CHAINID="eth_chainId"}(eL||(eL={})),function(e){e.ALL="all"}(tL||(tL={})),function(e){e.PASSPORT="passport",e.METAMASK="metamask"}(nL||(nL={})),function(e){e.SUCCESS="SUCCESS",e.FAILED="FAILED",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.FULFILLMENTS_UNSETTLED="FULFILLMENTS_UNSETTLED"}(rL||(rL={})),function(e){e.NATIVE="NATIVE",e.ERC20="ERC20",e.ERC721="ERC721"}(iL||(iL={})),function(e){e.TRANSACTION="TRANSACTION",e.GAS="GAS"}(aL||(aL={})),function(e){e.NATIVE="NATIVE",e.ERC20="ERC20"}(oL||(oL={})),function(e){e.ROUTES_FOUND="ROUTES_FOUND",e.NO_ROUTES_FOUND="NO_ROUTES_FOUND",e.NO_ROUTE_OPTIONS="NO_ROUTE_OPTIONS"}(sL||(sL={})),function(e){e.GAS="GAS",e.BRIDGE_FEE="BRIDGE_FEE",e.SWAP_FEE="SWAP_FEE",e.IMMUTABLE_FEE="IMMUTABLE_FEE"}(uL||(uL={})),function(e){e.BRIDGE="BRIDGE",e.SWAP="SWAP",e.ONRAMP="ONRAMP"}(lL||(lL={})),function(e){e.ONRAMP="onramp"}(cL||(cL={})),function(e){e.MISSING_PARAMS="MISSING_PARAMS",e.WEB3_PROVIDER_ERROR="WEB3_PROVIDER_ERROR",e.PROVIDER_ERROR="PROVIDER_ERROR",e.DEFAULT_PROVIDER_ERROR="DEFAULT_PROVIDER_ERROR",e.CONNECT_PROVIDER_ERROR="CONNECT_PROVIDER_ERROR",e.GET_BALANCE_ERROR="GET_BALANCE_ERROR",e.GET_INDEXER_BALANCE_ERROR="GET_INDEXER_BALANCE_ERROR",e.GET_ERC20_INFO_ERROR="GET_ERC20_INFO_ERROR",e.GET_ERC20_BALANCE_ERROR="GET_ERC20_BALANCE_ERROR",e.GET_ERC721_BALANCE_ERROR="GET_ERC721_BALANCE_ERROR",e.GET_NETWORK_INFO_ERROR="GET_NETWORK_INFO_ERROR",e.METAMASK_PROVIDER_ERROR="METAMASK_PROVIDER_ERROR",e.CHAIN_NOT_SUPPORTED_ERROR="CHAIN_NOT_SUPPORTED_ERROR",e.PROVIDER_REQUEST_MISSING_ERROR="PROVIDER_REQUEST_MISSING_ERROR",e.PROVIDER_REQUEST_FAILED_ERROR="PROVIDER_REQUEST_FAILED_ERROR",e.USER_REJECTED_REQUEST_ERROR="USER_REJECTED_REQUEST_ERROR",e.TRANSACTION_FAILED="TRANSACTION_FAILED",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.INVALID_GAS_ESTIMATE_TYPE="INVALID_GAS_ESTIMATE_TYPE",e.UNSUPPORTED_TOKEN_TYPE_ERROR="UNSUPPORTED_TOKEN_TYPE_ERROR",e.UNSUPPORTED_BALANCE_REQUIREMENT_ERROR="UNSUPPORTED_BALANCE_REQUIREMENT_ERROR",e.GET_ORDER_LISTING_ERROR="GET_ORDER_LISTING_ERROR",e.CANCEL_ORDER_LISTING_ERROR="CANCEL_ORDER_LISTING_ERROR",e.PREPARE_ORDER_LISTING_ERROR="PREPARE_ORDER_LISTING_ERROR",e.CREATE_ORDER_LISTING_ERROR="CREATE_ORDER_LISTING_ERROR",e.FULFILL_ORDER_LISTING_ERROR="FULFILL_ORDER_LISTING_ERROR",e.SWITCH_NETWORK_UNSUPPORTED="SWITCH_NETWORK_UNSUPPORTED",e.GET_ERC20_ALLOWANCE_ERROR="GET_ERC20_ALLOWANCE_ERROR",e.GET_ERC721_ALLOWANCE_ERROR="GET_ERC721_ALLOWANCE_ERROR",e.EXECUTE_APPROVAL_TRANSACTION_ERROR="EXECUTE_APPROVAL_TRANSACTION_ERROR",e.EXECUTE_FULFILLMENT_TRANSACTION_ERROR="EXECUTE_FULFILLMENT_TRANSACTION_ERROR",e.SIGN_MESSAGE_ERROR="SIGN_MESSAGE_ERROR",e.BRIDGE_GAS_ESTIMATE_ERROR="BRIDGE_GAS_ESTIMATE_ERROR",e.ORDER_FEE_ERROR="ORDER_FEE_ERROR",e.ITEM_REQUIREMENTS_ERROR="ITEM_REQUIREMENTS_ERROR",e.API_ERROR="API_ERROR",e.ORDER_EXPIRED_ERROR="ORDER_EXPIRED_ERROR",e.WIDGETS_SCRIPT_LOAD_ERROR="WIDGETS_SCRIPT_LOAD_ERROR"}(dL||(dL={})),function(e){e.REJECTED_SWITCH_AFTER_ADDING_NETWORK="REJECTED_SWITCH_AFTER_ADDING_NETWORK"}(fL||(fL={}));const pL="development",hL={name:"IMX",symbol:"IMX",decimals:18,address:"native"},mL={[pL]:"https://api.dev.immutable.com",[it.SANDBOX]:"https://api.sandbox.immutable.com",[it.PRODUCTION]:"https://api.immutable.com"};it.SANDBOX,it.PRODUCTION,it.SANDBOX,it.PRODUCTION;const yL=new Map([[XN.ETHEREUM,{chainIdHex:`0x${XN.ETHEREUM.toString(16)}`,chainName:ZN.ETHEREUM,rpcUrls:["https://checkout-api.immutable.com/v1/rpc/eth-mainnet"],nativeCurrency:{name:ZN.ETHEREUM,symbol:"ETH",decimals:18},blockExplorerUrls:["https://etherscan.io/"]}],[XN.IMTBL_ZKEVM_MAINNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_MAINNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_MAINNET,rpcUrls:["https://rpc.immutable.com"],nativeCurrency:hL}]]),gL=new Map([[XN.SEPOLIA,{chainIdHex:`0x${XN.SEPOLIA.toString(16)}`,chainName:ZN.SEPOLIA,rpcUrls:["https://checkout-api.sandbox.immutable.com/v1/rpc/eth-sepolia"],nativeCurrency:{name:"Sep Eth",symbol:"ETH",decimals:18},blockExplorerUrls:["https://sepolia.etherscan.io/"]}],[XN.IMTBL_ZKEVM_TESTNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_TESTNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_TESTNET,rpcUrls:["https://rpc.testnet.immutable.com"],nativeCurrency:hL}]]);new Map([[XN.SEPOLIA,{chainIdHex:`0x${XN.SEPOLIA.toString(16)}`,chainName:ZN.SEPOLIA,rpcUrls:["https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"],nativeCurrency:{name:"Sep Eth",symbol:"ETH",decimals:18},blockExplorerUrls:["https://sepolia.etherscan.io/"]}],[XN.IMTBL_ZKEVM_DEVNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_DEVNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_DEVNET,rpcUrls:["https://rpc.dev.immutable.com"],nativeCurrency:hL}]]);const AL={[XN.IMTBL_ZKEVM_TESTNET]:{url:"https://explorer.testnet.immutable.com",nativeToken:gL.get(XN.IMTBL_ZKEVM_TESTNET).nativeCurrency},[XN.IMTBL_ZKEVM_MAINNET]:{url:"https://explorer.immutable.com",nativeToken:yL.get(XN.IMTBL_ZKEVM_MAINNET).nativeCurrency},[XN.SEPOLIA]:{url:"https://eth-sepolia.blockscout.com",nativeToken:gL.get(XN.SEPOLIA).nativeCurrency},[XN.ETHEREUM]:{url:"https://eth.blockscout.com/",nativeToken:yL.get(XN.ETHEREUM).nativeCurrency}};var bL,vL;$n.from(102e9),$n.from(101e9),function(e){e.ERC20="ERC-20"}(bL||(bL={})),function(e){e.SUCCESS="SUCCESS",e.FAILED="FAILED"}(vL||(vL={})),it.SANDBOX;class wL{static getTransactionLink(e,t){const n=AL?.[e]?.url;if(n&&t)return`${n}/tx/${t}`}}var xL,EL={exports:{}},TL={},CL={exports:{}},IL={};CL.exports=function(){if(xL)return IL;xL=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,h={};function m(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var A=g.prototype=new y;A.constructor=g,p(A,m.prototype),A.isPureReactComponent=!0;var b=Array.isArray,v=Object.prototype.hasOwnProperty,w={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function E(t,n,r){var i,a={},o=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(o=""+n.key),n)v.call(n,i)&&!x.hasOwnProperty(i)&&(a[i]=n[i]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===a[i]&&(a[i]=u[i]);return{$$typeof:e,type:t,key:o,ref:s,props:a,_owner:w.current}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function S(n,r,i,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var u=!1;if(null===n)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0}}if(u)return o=o(u=n),n=""===a?"."+I(u,0):a,b(o)?(i="",null!=n&&(i=n.replace(C,"$&/")+"/"),S(o,r,i,"",(function(e){return e}))):null!=o&&(T(o)&&(o=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(o,i+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+n)),r.push(o)),1;if(u=0,a=""===a?".":a+":",b(n))for(var l=0;l<n.length;l++){var c=a+I(s=n[l],l);u+=S(s,r,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),l=0;!(s=n.next()).done;)u+=S(s=s.value,r,i,c=a+I(s,l++),o);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return u}function k(e,t,n){if(null==e)return e;var r=[],i=0;return S(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},R={transition:null},N={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:R,ReactCurrentOwner:w};return IL.Children={map:k,forEach:function(e,t,n){k(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return k(e,(function(){t++})),t},toArray:function(e){return k(e,(function(e){return e}))||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},IL.Component=m,IL.Fragment=n,IL.Profiler=i,IL.PureComponent=g,IL.StrictMode=r,IL.Suspense=u,IL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,IL.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=p({},t.props),a=t.key,o=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(o=n.ref,s=w.current),void 0!==n.key&&(a=""+n.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in n)v.call(n,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===n[l]&&void 0!==u?u[l]:n[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:e,type:t.type,key:a,ref:o,props:i,_owner:s}},IL.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},IL.createElement=E,IL.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},IL.createRef=function(){return{current:null}},IL.forwardRef=function(e){return{$$typeof:s,render:e}},IL.isValidElement=T,IL.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:O}},IL.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},IL.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},IL.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},IL.useCallback=function(e,t){return P.current.useCallback(e,t)},IL.useContext=function(e){return P.current.useContext(e)},IL.useDebugValue=function(){},IL.useDeferredValue=function(e){return P.current.useDeferredValue(e)},IL.useEffect=function(e,t){return P.current.useEffect(e,t)},IL.useId=function(){return P.current.useId()},IL.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},IL.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},IL.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},IL.useMemo=function(e,t){return P.current.useMemo(e,t)},IL.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},IL.useRef=function(e){return P.current.useRef(e)},IL.useState=function(e){return P.current.useState(e)},IL.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},IL.useTransition=function(){return P.current.useTransition()},IL.version="18.2.0",IL}();var SL,kL=CL.exports,OL=st(kL),PL=t({__proto__:null,default:OL},[kL]);EL.exports=function(){if(SL)return TL;SL=1;var e=kL,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,n,o){var s,u={},l=null,c=null;for(s in void 0!==o&&(l=""+o),void 0!==n.key&&(l=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!a.hasOwnProperty(s)&&(u[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===u[s]&&(u[s]=n[s]);return{$$typeof:t,type:e,key:l,ref:c,props:u,_owner:i.current}}return TL.Fragment=n,TL.jsx=o,TL.jsxs=o,TL}();var RL=EL.exports;var NL=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),LL="-ms-",ML="-moz-",DL="-webkit-",FL="comm",jL="rule",BL="decl",_L="@keyframes",zL=Math.abs,UL=String.fromCharCode,WL=Object.assign;function HL(e){return e.trim()}function VL(e,t,n){return e.replace(t,n)}function qL(e,t){return e.indexOf(t)}function GL(e,t){return 0|e.charCodeAt(t)}function XL(e,t,n){return e.slice(t,n)}function ZL(e){return e.length}function YL(e){return e.length}function KL(e,t){return t.push(e),e}var QL=1,JL=1,$L=0,eM=0,tM=0,nM="";function rM(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:QL,column:JL,length:o,return:""}}function iM(e,t){return WL(rM("",null,null,"",null,null,0),e,{length:-e.length},t)}function aM(){return tM=eM>0?GL(nM,--eM):0,JL--,10===tM&&(JL=1,QL--),tM}function oM(){return tM=eM<$L?GL(nM,eM++):0,JL++,10===tM&&(JL=1,QL++),tM}function sM(){return GL(nM,eM)}function uM(){return eM}function lM(e,t){return XL(nM,e,t)}function cM(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dM(e){return QL=JL=1,$L=ZL(nM=e),eM=0,[]}function fM(e){return nM="",e}function pM(e){return HL(lM(eM-1,yM(91===e?e+2:40===e?e+1:e)))}function hM(e){for(;(tM=sM())&&tM<33;)oM();return cM(e)>2||cM(tM)>3?"":" "}function mM(e,t){for(;--t&&oM()&&!(tM<48||tM>102||tM>57&&tM<65||tM>70&&tM<97););return lM(e,uM()+(t<6&&32==sM()&&32==oM()))}function yM(e){for(;oM();)switch(tM){case e:return eM;case 34:case 39:34!==e&&39!==e&&yM(tM);break;case 40:41===e&&yM(e);break;case 92:oM()}return eM}function gM(e,t){for(;oM()&&e+tM!==57&&(e+tM!==84||47!==sM()););return"/*"+lM(t,eM-1)+"*"+UL(47===e?e:oM())}function AM(e){for(;!cM(sM());)oM();return lM(e,eM)}function bM(e){return fM(vM("",null,null,null,[""],e=dM(e),0,[0],e))}function vM(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,d=o,f=0,p=0,h=0,m=1,y=1,g=1,A=0,b="",v=i,w=a,x=r,E=b;y;)switch(h=A,A=oM()){case 40:if(108!=h&&58==GL(E,d-1)){-1!=qL(E+=VL(pM(A),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:E+=pM(A);break;case 9:case 10:case 13:case 32:E+=hM(h);break;case 92:E+=mM(uM()-1,7);continue;case 47:switch(sM()){case 42:case 47:KL(xM(gM(oM(),uM()),t,n),u);break;default:E+="/"}break;case 123*m:s[l++]=ZL(E)*g;case 125*m:case 59:case 0:switch(A){case 0:case 125:y=0;case 59+c:-1==g&&(E=VL(E,/\f/g,"")),p>0&&ZL(E)-d&&KL(p>32?EM(E+";",r,n,d-1):EM(VL(E," ","")+";",r,n,d-2),u);break;case 59:E+=";";default:if(KL(x=wM(E,t,n,l,c,i,s,b,v=[],w=[],d),a),123===A)if(0===c)vM(E,t,x,x,v,a,d,s,w);else switch(99===f&&110===GL(E,3)?100:f){case 100:case 108:case 109:case 115:vM(e,x,x,r&&KL(wM(e,x,x,0,0,i,s,b,i,v=[],d),w),i,w,d,s,r?v:w);break;default:vM(E,x,x,x,[""],w,0,s,w)}}l=c=p=0,m=g=1,b=E="",d=o;break;case 58:d=1+ZL(E),p=h;default:if(m<1)if(123==A)--m;else if(125==A&&0==m++&&125==aM())continue;switch(E+=UL(A),A*m){case 38:g=c>0?1:(E+="\f",-1);break;case 44:s[l++]=(ZL(E)-1)*g,g=1;break;case 64:45===sM()&&(E+=pM(oM())),f=sM(),c=d=ZL(b=E+=AM(uM())),A++;break;case 45:45===h&&2==ZL(E)&&(m=0)}}return a}function wM(e,t,n,r,i,a,o,s,u,l,c){for(var d=i-1,f=0===i?a:[""],p=YL(f),h=0,m=0,y=0;h<r;++h)for(var g=0,A=XL(e,d+1,d=zL(m=o[h])),b=e;g<p;++g)(b=HL(m>0?f[g]+" "+A:VL(A,/&\f/g,f[g])))&&(u[y++]=b);return rM(e,t,n,0===i?jL:s,u,l,c)}function xM(e,t,n){return rM(e,t,n,FL,UL(tM),XL(e,2,-2),0)}function EM(e,t,n,r){return rM(e,t,n,BL,XL(e,0,r),XL(e,r+1,-1),r)}function TM(e,t){for(var n="",r=YL(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function CM(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case BL:return e.return=e.return||e.value;case FL:return"";case _L:return e.return=e.value+"{"+TM(e.children,r)+"}";case jL:e.value=e.props.join(",")}return ZL(n=TM(e.children,r))?e.return=e.value+"{"+n+"}":""}var IM=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function SM(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var kM=function(e,t,n){for(var r=0,i=0;r=i,i=sM(),38===r&&12===i&&(t[n]=1),!cM(i);)oM();return lM(e,eM)},OM=function(e,t){return fM(function(e,t){var n=-1,r=44;do{switch(cM(r)){case 0:38===r&&12===sM()&&(t[n]=1),e[n]+=kM(eM-1,t,n);break;case 2:e[n]+=pM(r);break;case 4:if(44===r){e[++n]=58===sM()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=UL(r)}}while(r=oM());return e}(dM(e),t))},PM=new WeakMap,RM=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||PM.get(n))&&!r){PM.set(e,!0);for(var i=[],a=OM(t,i),o=n.props,s=0,u=0;s<a.length;s++)for(var l=0;l<o.length;l++,u++)e.props[u]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+" "+a[s]}}},NM=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function LM(e,t){switch(function(e,t){return 45^GL(e,0)?(((t<<2^GL(e,0))<<2^GL(e,1))<<2^GL(e,2))<<2^GL(e,3):0}(e,t)){case 5103:return DL+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return DL+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return DL+e+ML+e+LL+e+e;case 6828:case 4268:return DL+e+LL+e+e;case 6165:return DL+e+LL+"flex-"+e+e;case 5187:return DL+e+VL(e,/(\w+).+(:[^]+)/,DL+"box-$1$2"+LL+"flex-$1$2")+e;case 5443:return DL+e+LL+"flex-item-"+VL(e,/flex-|-self/,"")+e;case 4675:return DL+e+LL+"flex-line-pack"+VL(e,/align-content|flex-|-self/,"")+e;case 5548:return DL+e+LL+VL(e,"shrink","negative")+e;case 5292:return DL+e+LL+VL(e,"basis","preferred-size")+e;case 6060:return DL+"box-"+VL(e,"-grow","")+DL+e+LL+VL(e,"grow","positive")+e;case 4554:return DL+VL(e,/([^-])(transform)/g,"$1"+DL+"$2")+e;case 6187:return VL(VL(VL(e,/(zoom-|grab)/,DL+"$1"),/(image-set)/,DL+"$1"),e,"")+e;case 5495:case 3959:return VL(e,/(image-set\([^]*)/,DL+"$1$`$1");case 4968:return VL(VL(e,/(.+:)(flex-)?(.*)/,DL+"box-pack:$3"+LL+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+DL+e+e;case 4095:case 3583:case 4068:case 2532:return VL(e,/(.+)-inline(.+)/,DL+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ZL(e)-1-t>6)switch(GL(e,t+1)){case 109:if(45!==GL(e,t+4))break;case 102:return VL(e,/(.+:)(.+)-([^]+)/,"$1"+DL+"$2-$3$1"+ML+(108==GL(e,t+3)?"$3":"$2-$3"))+e;case 115:return~qL(e,"stretch")?LM(VL(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==GL(e,t+1))break;case 6444:switch(GL(e,ZL(e)-3-(~qL(e,"!important")&&10))){case 107:return VL(e,":",":"+DL)+e;case 101:return VL(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+DL+(45===GL(e,14)?"inline-":"")+"box$3$1"+DL+"$2$3$1"+LL+"$2box$3")+e}break;case 5936:switch(GL(e,t+11)){case 114:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return DL+e+LL+e+e}return e}var MM=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case BL:e.return=LM(e.value,e.length);break;case _L:return TM([iM(e,{value:VL(e.value,"@","@"+DL)})],r);case jL:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return TM([iM(e,{props:[VL(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return TM([iM(e,{props:[VL(t,/:(plac\w+)/,":"+DL+"input-$1")]}),iM(e,{props:[VL(t,/:(plac\w+)/,":-moz-$1")]}),iM(e,{props:[VL(t,/:(plac\w+)/,LL+"input-$1")]})],r)}return""}))}}],DM=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||MM,o={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)}));var u,l,c=[CM,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],d=function(e){var t=YL(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}([RM,NM].concat(a,c));i=function(e,t,n,r){u=n,TM(bM(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new NL({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return f.sheet.hydrate(s),f};function FM(){return FM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FM.apply(this,arguments)}var jM,BM={exports:{}},_M={};BM.exports=function(){if(jM)return _M;jM=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case u:case l:case r:case a:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case h:case p:case o:return e;default:return f}}case n:return f}}}function v(e){return b(e)===l}return _M.AsyncMode=u,_M.ConcurrentMode=l,_M.ContextConsumer=s,_M.ContextProvider=o,_M.Element=t,_M.ForwardRef=c,_M.Fragment=r,_M.Lazy=h,_M.Memo=p,_M.Portal=n,_M.Profiler=a,_M.StrictMode=i,_M.Suspense=d,_M.isAsyncMode=function(e){return v(e)||b(e)===u},_M.isConcurrentMode=v,_M.isContextConsumer=function(e){return b(e)===s},_M.isContextProvider=function(e){return b(e)===o},_M.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_M.isForwardRef=function(e){return b(e)===c},_M.isFragment=function(e){return b(e)===r},_M.isLazy=function(e){return b(e)===h},_M.isMemo=function(e){return b(e)===p},_M.isPortal=function(e){return b(e)===n},_M.isProfiler=function(e){return b(e)===a},_M.isStrictMode=function(e){return b(e)===i},_M.isSuspense=function(e){return b(e)===d},_M.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===a||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===o||e.$$typeof===s||e.$$typeof===c||e.$$typeof===y||e.$$typeof===g||e.$$typeof===A||e.$$typeof===m)},_M.typeOf=b,_M}();var zM=BM.exports,UM={};UM[zM.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},UM[zM.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function WM(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var HM=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},VM=function(e,t,n){HM(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var qM={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GM=/[A-Z]|^ms/g,XM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ZM=function(e){return 45===e.charCodeAt(1)},YM=function(e){return null!=e&&"boolean"!=typeof e},KM=SM((function(e){return ZM(e)?e:e.replace(GM,"-$&").toLowerCase()})),QM=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(XM,(function(e,t,n){return $M={name:t,styles:n,next:$M},t}))}return 1===qM[e]||ZM(e)||"number"!=typeof t||0===t?t:t+"px"};function JM(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return $M={name:n.name,styles:n.styles,next:$M},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)$M={name:r.name,styles:r.styles,next:$M},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=JM(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":YM(o)&&(r+=KM(a)+":"+QM(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=JM(e,t,o);switch(a){case"animation":case"animationName":r+=KM(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var u=0;u<o.length;u++)YM(o[u])&&(r+=KM(a)+":"+QM(a,o[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=$M,a=n(e);return $M=i,JM(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var $M,eD=/label:\s*([^\s;\n{]+)\s*(;|$)/g,tD=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";$M=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=JM(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=JM(n,t,e[o]),r&&(i+=a[o]);eD.lastIndex=0;for(var s,u="";null!==(s=eD.exec(i));)u+="-"+s[1];var l=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+u;return{name:l,styles:i,next:$M}},nD=!!PL.useInsertionEffect&&PL.useInsertionEffect,rD=nD||function(e){return e()},iD=nD||kL.useLayoutEffect,aD={}.hasOwnProperty,oD=kL.createContext("undefined"!=typeof HTMLElement?DM({key:"css"}):null);oD.Provider;var sD=function(e){return kL.forwardRef((function(t,n){var r=kL.useContext(oD);return e(t,r,n)}))},uD=kL.createContext({}),lD=function(){return kL.useContext(uD)},cD=IM((function(e){return IM((function(t){return function(e,t){return"function"==typeof t?t(e):FM({},e,t)}(e,t)}))})),dD=function(e){var t=kL.useContext(uD);return e.theme!==t&&(t=cD(t)(e.theme)),kL.createElement(uD.Provider,{value:t},e.children)},fD="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",pD=function(e,t){var n={};for(var r in t)aD.call(t,r)&&(n[r]=t[r]);return n[fD]=e,n},hD=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return HM(t,n,r),rD((function(){return VM(t,n,r)})),null},mD=sD((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[fD],a=[r],o="";"string"==typeof e.className?o=WM(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=tD(a,void 0,kL.useContext(uD));o+=t.key+"-"+s.name;var u={};for(var l in e)aD.call(e,l)&&"css"!==l&&l!==fD&&(u[l]=e[l]);return u.ref=n,u.className=o,kL.createElement(kL.Fragment,null,kL.createElement(hD,{cache:t,serialized:s,isStringTag:"string"==typeof i}),kL.createElement(i,u))})),yD=mD,gD=function(e,t){var n=arguments;if(null==t||!aD.call(t,"css"))return kL.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=yD,i[1]=pD(e,t);for(var a=2;a<r;a++)i[a]=n[a];return kL.createElement.apply(null,i)},AD=sD((function(e,t){var n=e.styles,r=tD([n],void 0,kL.useContext(uD)),i=kL.useRef();return iD((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(a=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}}),[t]),iD((function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&VM(t,r.next,!0),n.tags.length){var a=n.tags[n.tags.length-1].nextElementSibling;n.before=a,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function bD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tD(t)}var vD=function(){var e=bD.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},wD=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var a=t[r];if(null!=a){var o=void 0;switch(typeof a){case"boolean":break;case"object":if(Array.isArray(a))o=e(a);else for(var s in o="",a)a[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};var xD=function(e){var t=e.cache,n=e.serializedArr;return rD((function(){for(var e=0;e<n.length;e++)VM(t,n[e],!1)})),null},ED=sD((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=tD(r,t.registered);return n.push(a),HM(t,a,!1),t.key+"-"+a.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return function(e,t,n){var r=[],i=WM(e,r,n);return r.length<2?n:i+t(r)}(t.registered,r,wD(n))},theme:kL.useContext(uD)},a=e.children(i);return!0,kL.createElement(kL.Fragment,null,kL.createElement(xD,{cache:t,serializedArr:n}),a)}));const TD=kL.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),CD=kL.createContext({}),ID=kL.createContext(null),SD="undefined"!=typeof document,kD=SD?kL.useLayoutEffect:kL.useEffect,OD=kL.createContext({strict:!1});function PD(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function RD(e){return"string"==typeof e||Array.isArray(e)}function ND(e){return"object"==typeof e&&"function"==typeof e.start}const LD=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MD=["initial",...LD];function DD(e){return ND(e.animate)||MD.some((t=>RD(e[t])))}function FD(e){return Boolean(DD(e)||e.variants)}function jD(e){const{initial:t,animate:n}=function(e,t){if(DD(e)){const{initial:t,animate:n}=e;return{initial:!1===t||RD(t)?t:void 0,animate:RD(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,kL.useContext(CD));return kL.useMemo((()=>({initial:t,animate:n})),[BD(t),BD(n)])}function BD(e){return Array.isArray(e)?e.join(" "):e}const _D={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zD={};for(const e in _D)zD[e]={isEnabled:t=>_D[e].some((e=>!!t[e]))};const UD=kL.createContext({}),WD=kL.createContext({}),HD=Symbol.for("motionComponentSymbol");function VD({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)zD[t]={...zD[t],...e[t]}}(e);const a=kL.forwardRef((function(a,o){let s;const u={...kL.useContext(TD),...a,layoutId:qD(a)},{isStatic:l}=u,c=jD(a),d=r(a,l);if(!l&&SD){c.visualElement=function(e,t,n,r){const{visualElement:i}=kL.useContext(CD),a=kL.useContext(OD),o=kL.useContext(ID),s=kL.useContext(TD).reducedMotion,u=kL.useRef();r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:s}));const l=u.current;return kL.useInsertionEffect((()=>{l&&l.update(n,o)})),kD((()=>{l&&l.render()})),kL.useEffect((()=>{l&&l.updateFeatures()})),(window.HandoffAppearAnimations?kD:kL.useEffect)((()=>{l&&l.animationState&&l.animationState.animateChanges()})),l}(i,d,u,t);const n=kL.useContext(WD),r=kL.useContext(OD).strict;c.visualElement&&(s=c.visualElement.loadFeatures(u,r,e,n))}return kL.createElement(CD.Provider,{value:c},s&&c.visualElement?kL.createElement(s,{visualElement:c.visualElement,...u}):null,n(i,a,function(e,t,n){return kL.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):PD(n)&&(n.current=r))}),[t])}(d,c.visualElement,o),d,l,c.visualElement))}));return a[HD]=i,a}function qD({layoutId:e}){const t=kL.useContext(UD).id;return t&&void 0!==e?t+"-"+e:e}function GD(e){function t(t,n={}){return VD(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const XD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ZD(e){return"string"==typeof e&&!e.includes("-")&&!!(XD.indexOf(e)>-1||/[A-Z]/.test(e))}const YD={};const KD=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],QD=new Set(KD);function JD(e,{layout:t,layoutId:n}){return QD.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!YD[e]||"opacity"===e)}const $D=e=>Boolean(e&&e.getVelocity),eF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tF=KD.length;const nF=e=>t=>"string"==typeof t&&t.startsWith(e),rF=nF("--"),iF=nF("var(--"),aF=(e,t)=>t&&"number"==typeof e?t.transform(e):e,oF=(e,t,n)=>Math.min(Math.max(n,e),t),sF={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},uF={...sF,transform:e=>oF(0,1,e)},lF={...sF,default:1},cF=e=>Math.round(1e5*e)/1e5,dF=/(-)?([\d]*\.?[\d])+/g,fF=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function hF(e){return"string"==typeof e}const mF=e=>({test:t=>hF(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),yF=mF("deg"),gF=mF("%"),AF=mF("px"),bF=mF("vh"),vF=mF("vw"),wF={...gF,parse:e=>gF.parse(e)/100,transform:e=>gF.transform(100*e)},xF={...sF,transform:Math.round},EF={borderWidth:AF,borderTopWidth:AF,borderRightWidth:AF,borderBottomWidth:AF,borderLeftWidth:AF,borderRadius:AF,radius:AF,borderTopLeftRadius:AF,borderTopRightRadius:AF,borderBottomRightRadius:AF,borderBottomLeftRadius:AF,width:AF,maxWidth:AF,height:AF,maxHeight:AF,size:AF,top:AF,right:AF,bottom:AF,left:AF,padding:AF,paddingTop:AF,paddingRight:AF,paddingBottom:AF,paddingLeft:AF,margin:AF,marginTop:AF,marginRight:AF,marginBottom:AF,marginLeft:AF,rotate:yF,rotateX:yF,rotateY:yF,rotateZ:yF,scale:lF,scaleX:lF,scaleY:lF,scaleZ:lF,skew:yF,skewX:yF,skewY:yF,distance:AF,translateX:AF,translateY:AF,translateZ:AF,x:AF,y:AF,z:AF,perspective:AF,transformPerspective:AF,opacity:uF,originX:wF,originY:wF,originZ:AF,zIndex:xF,fillOpacity:uF,strokeOpacity:uF,numOctaves:xF};function TF(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let u=!1,l=!1,c=!0;for(const e in t){const n=t[e];if(rF(e)){a[e]=n;continue}const r=EF[e],d=aF(n,r);if(QD.has(e)){if(u=!0,o[e]=d,!c)continue;n!==(r.default||0)&&(c=!1)}else e.startsWith("origin")?(l=!0,s[e]=d):i[e]=d}if(t.transform||(u||r?i.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let t=0;t<tF;t++){const n=KD[t];void 0!==e[n]&&(a+=`${eF[n]||n}(${e[n]}) `)}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}(e.transform,n,c,r):i.transform&&(i.transform="none")),l){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;i.transformOrigin=`${e} ${t} ${n}`}}const CF=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function IF(e,t,n){for(const r in t)$D(t[r])||JD(r,n)||(e[r]=t[r])}function SF(e,t,n){const r={};return IF(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return kL.useMemo((()=>{const r=CF();return TF(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function kF(e,t,n){const r={},i=SF(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const OF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function PF(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||OF.has(e)}let RF=e=>!PF(e);try{(NF=require("@emotion/is-prop-valid").default)&&(RF=e=>e.startsWith("on")?!PF(e):NF(e))}catch(G6){}var NF;function LF(e,t,n){return"string"==typeof e?e:AF.transform(t+n*e)}const MF={offset:"stroke-dashoffset",array:"stroke-dasharray"},DF={offset:"strokeDashoffset",array:"strokeDasharray"};function FF(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d,f){if(TF(e,l,c,f),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:m}=e;p.transform&&(m&&(h.transform=p.transform),delete p.transform),m&&(void 0!==i||void 0!==a||h.transform)&&(h.transformOrigin=function(e,t,n){return`${LF(t,e.x,e.width)} ${LF(n,e.y,e.height)}`}(m,void 0!==i?i:.5,void 0!==a?a:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==o&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?MF:DF;e[a.offset]=AF.transform(-r);const o=AF.transform(t),s=AF.transform(n);e[a.array]=`${o} ${s}`}(p,o,s,u,!1)}const jF=()=>({...CF(),attrs:{}}),BF=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _F(e,t,n,r){const i=kL.useMemo((()=>{const n=jF();return FF(n,t,{enableHardwareAcceleration:!1},BF(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};IF(t,e.style,e),i.style={...t,...i.style}}return i}function zF(e=!1){return(t,n,r,{latestValues:i},a)=>{const o=(ZD(t)?_F:kF)(n,i,a,t),s=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(RF(i)||!0===n&&PF(i)||!t&&!PF(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),u={...s,...o,ref:r},{children:l}=n,c=kL.useMemo((()=>$D(l)?l.get():l),[l]);return kL.createElement(t,{...u,children:c})}}const UF=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function WF(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const HF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function VF(e,t,n,r){WF(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(HF.has(n)?n:UF(n),t.attrs[n])}function qF(e,t){const{style:n}=e,r={};for(const i in n)($D(n[i])||t.style&&$D(t.style[i])||JD(i,e))&&(r[i]=n[i]);return r}function GF(e,t){const n=qF(e,t);for(const r in e)if($D(e[r])||$D(t[r])){n[-1!==KD.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function XF(e,t,n,r={},i={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),t}function ZF(e){const t=kL.useRef(null);return null===t.current&&(t.current=e()),t.current}const YF=e=>Array.isArray(e),KF=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),QF=e=>YF(e)?e[e.length-1]||0:e;function JF(e){const t=$D(e)?e.get():e;return KF(t)?t.toValue():t}const $F=e=>(t,n)=>{const r=kL.useContext(CD),i=kL.useContext(ID),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:ej(r,i,a,e),renderState:t()};return n&&(o.mount=e=>n(r,e,o)),o}(e,t,r,i);return n?a():ZF(a)};function ej(e,t,n,r){const i={},a=r(e,{});for(const e in a)i[e]=JF(a[e]);let{initial:o,animate:s}=e;const u=DD(e),l=FD(e);t&&l&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?s:o;if(d&&"boolean"!=typeof d&&!ND(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=XF(e,t);if(!n)return;const{transitionEnd:r,transition:a,...o}=n;for(const e in o){let t=o[e];if(Array.isArray(t)){t=t[c?t.length-1:0]}null!==t&&(i[e]=t)}for(const e in r)i[e]=r[e]}))}return i}const tj={useVisualState:$F({scrapeMotionValuesFromProps:GF,createRenderState:jF,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}FF(n,r,{enableHardwareAcceleration:!1},BF(t.tagName),e.transformTemplate),VF(t,n)}})},nj={useVisualState:$F({scrapeMotionValuesFromProps:qF,createRenderState:CF})};function rj(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ij=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function aj(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const oj=e=>t=>ij(t)&&e(t,aj(t));function sj(e,t,n,r){return rj(e,t,oj(n),r)}const uj=(e,t)=>n=>t(e(n)),lj=(...e)=>e.reduce(uj);function cj(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const dj=cj("dragHorizontal"),fj=cj("dragVertical");function pj(e){let t=!1;if("y"===e)t=fj();else if("x"===e)t=dj();else{const e=dj(),n=fj();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function hj(){const e=pj(!0);return!e||(e(),!1)}class mj{constructor(e){this.isMounted=!1,this.node=e}update(){}}const yj=e=>e;const gj=["prepare","read","update","preRender","render","postRender"];const{schedule:Aj,cancel:bj,state:vj,steps:wj}=function(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=gj.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{const u=s&&i,l=u?t:n;return a&&o.add(e),-1===l.indexOf(e)&&(l.push(e),u&&i&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),o.delete(e)},process:u=>{if(i)a=!0;else{if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(u),o.has(r)&&(s.schedule(r),e())}i=!1,a&&(a=!1,s.process(u))}}};return s}((()=>n=!0)),e)),{}),o=e=>a[e].process(i),s=a=>{n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1),i.timestamp=a,i.isProcessing=!0,gj.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(s))},u=gj.reduce(((t,o)=>{const u=a[o];return t[o]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(s)),u.schedule(t,a,o)),t}),{});return{schedule:u,cancel:e=>gj.forEach((t=>a[t].cancel(e))),state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:yj,!0);function xj(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return sj(e.current,n,((n,i)=>{if("touch"===n.type||hj())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Aj.update((()=>a[r](n,i)))}),{passive:!e.getProps()[r]})}const Ej=(e,t)=>!!t&&(e===t||Ej(e,t.parentElement));function Tj(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,aj(n))}const Cj=new WeakMap,Ij=new WeakMap,Sj=e=>{const t=Cj.get(e.target);t&&t(e)},kj=e=>{e.forEach(Sj)};function Oj(e,t,n){const r=function({root:e,...t}){const n=e||document;Ij.has(n)||Ij.set(n,{});const r=Ij.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kj,{root:e,...t})),r[i]}(t);return Cj.set(e,n),r.observe(e),()=>{Cj.delete(e),r.unobserve(e)}}const Pj={some:0,all:1};const Rj={inView:{Feature:class extends mj{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Pj[r]};return Oj(this.node.current,a,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends mj{constructor(){super(...arguments),this.removeStartListeners=yj,this.removeEndListeners=yj,this.removeAccessibleListeners=yj,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=sj(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Aj.update((()=>{Ej(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=sj(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=lj(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=rj(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rj(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Tj("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Aj.update((()=>n(e,t)))}))})),Tj("down",((e,t)=>{this.startPress(e,t)}))})),t=rj(this.node.current,"blur",(()=>{this.isPressing&&Tj("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=lj(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Aj.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!hj()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Aj.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=sj(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=rj(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=lj(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends mj{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lj(rj(this.node.current,"focus",(()=>this.onFocus())),rj(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends mj{mount(){this.unmount=lj(xj(this.node,!0),xj(this.node,!1))}unmount(){}}}};function Nj(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Lj(e,t,n){const r=e.getProps();return XF(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Mj="data-"+UF("framerAppearId");let Dj=yj,Fj=yj;const jj=e=>1e3*e,Bj=e=>e/1e3,_j=!1,zj=e=>Array.isArray(e)&&"number"==typeof e[0];function Uj(e){return Boolean(!e||"string"==typeof e&&Hj[e]||zj(e)||Array.isArray(e)&&e.every(Uj))}const Wj=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wj([0,.65,.55,1]),circOut:Wj([.55,0,1,.45]),backIn:Wj([.31,.01,.66,-.59]),backOut:Wj([.33,1.53,.69,.99])};function Vj(e){if(e)return zj(e)?Wj(e):Array.isArray(e)?e.map(Vj):Hj[e]}const qj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gj=1e-7,Xj=12;function Zj(e,t,n,r){if(e===t&&n===r)return yj;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=qj(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>Gj&&++s<Xj);return o}(t,0,1,e,n);return e=>0===e||1===e?e:qj(i(e),t,r)}const Yj=Zj(.42,0,1,1),Kj=Zj(0,0,.58,1),Qj=Zj(.42,0,.58,1),Jj=e=>Array.isArray(e)&&"number"!=typeof e[0],$j=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eB=e=>t=>1-e(1-t),tB=e=>1-Math.sin(Math.acos(e)),nB=eB(tB),rB=$j(nB),iB=Zj(.33,1.53,.69,.99),aB=eB(iB),oB=$j(aB),sB={linear:yj,easeIn:Yj,easeInOut:Qj,easeOut:Kj,circIn:tB,circInOut:rB,circOut:nB,backIn:aB,backInOut:oB,backOut:iB,anticipate:e=>(e*=2)<1?.5*aB(e):.5*(2-Math.pow(2,-10*(e-1)))},uB=e=>{if(Array.isArray(e)){Fj(4===e.length);const[t,n,r,i]=e;return Zj(t,n,r,i)}return"string"==typeof e?sB[e]:e},lB=(e,t)=>n=>Boolean(hF(n)&&pF.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),cB=(e,t,n)=>r=>{if(!hF(r))return r;const[i,a,o,s]=r.match(dF);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},dB={...sF,transform:e=>Math.round((e=>oF(0,255,e))(e))},fB={test:lB("rgb","red"),parse:cB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+dB.transform(e)+", "+dB.transform(t)+", "+dB.transform(n)+", "+cF(uF.transform(r))+")"};const pB={test:lB("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:fB.transform},hB={test:lB("hsl","hue"),parse:cB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gF.transform(cF(t))+", "+gF.transform(cF(n))+", "+cF(uF.transform(r))+")"},mB={test:e=>fB.test(e)||pB.test(e)||hB.test(e),parse:e=>fB.test(e)?fB.parse(e):hB.test(e)?hB.parse(e):pB.parse(e),transform:e=>hF(e)?e:e.hasOwnProperty("red")?fB.transform(e):hB.transform(e)},yB=(e,t,n)=>-n*e+n*t+e;function gB(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const AB=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},bB=[pB,fB,hB];function vB(e){const t=(n=e,bB.find((e=>e.test(n))));var n;let r=t.parse(e);return t===hB&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=gB(s,r,e+1/3),a=gB(s,r,e),o=gB(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const wB=(e,t)=>{const n=vB(e),r=vB(t),i={...n};return e=>(i.red=AB(n.red,r.red,e),i.green=AB(n.green,r.green,e),i.blue=AB(n.blue,r.blue,e),i.alpha=yB(n.alpha,r.alpha,e),fB.transform(i))};const xB={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:yj},EB={regex:fF,countKey:"Colors",token:"${c}",parse:mB.parse},TB={regex:dF,countKey:"Numbers",token:"${n}",parse:sF.parse};function CB(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function IB(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&CB(n,xB),CB(n,EB),CB(n,TB),n}function SB(e){return IB(e).values}function kB(e){const{values:t,numColors:n,numVars:r,tokenised:i}=IB(e),a=t.length;return e=>{let t=i;for(let i=0;i<a;i++)t=i<r?t.replace(xB.token,e[i]):i<r+n?t.replace(EB.token,mB.transform(e[i])):t.replace(TB.token,cF(e[i]));return t}}const OB=e=>"number"==typeof e?0:e;const PB={test:function(e){var t,n;return isNaN(e)&&hF(e)&&((null===(t=e.match(dF))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(fF))||void 0===n?void 0:n.length)||0)>0},parse:SB,createTransformer:kB,getAnimatableNone:function(e){const t=SB(e);return kB(e)(t.map(OB))}},RB=(e,t)=>n=>`${n>0?t:e}`;function NB(e,t){return"number"==typeof e?n=>yB(e,t,n):mB.test(e)?wB(e,t):e.startsWith("var(")?RB(e,t):DB(e,t)}const LB=(e,t)=>{const n=[...e],r=n.length,i=e.map(((e,n)=>NB(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},MB=(e,t)=>{const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=NB(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}},DB=(e,t)=>{const n=PB.createTransformer(t),r=IB(e),i=IB(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?lj(LB(r.values,i.values),n):RB(e,t)},FB=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},jB=(e,t)=>n=>yB(e,t,n);function BB(e,t,n){const r=[],i=n||("number"==typeof(a=e[0])?jB:"string"==typeof a?mB.test(a)?wB:DB:Array.isArray(a)?LB:"object"==typeof a?MB:jB);var a;const o=e.length-1;for(let n=0;n<o;n++){let a=i(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||yj:t;a=lj(e,a)}r.push(a)}return r}function _B(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Fj(a===t.length),1===a)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=BB(t,r,i),s=o.length,u=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=FB(e[n],e[n+1],t);return o[n](r)};return n?t=>u(oF(e[0],e[a-1],t)):u}function zB(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=FB(0,t,r);e.push(yB(n,1,i))}}(t,e.length-1),t}function UB({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Jj(r)?r.map(uB):uB(r),a={done:!1,value:t[0]},o=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:zB(t),e),s=_B(o,t,{ease:Array.isArray(i)?i:(u=t,l=i,u.map((()=>l||Qj)).splice(0,u.length-1))});var u,l;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}function WB(e,t){return t?e*(1e3/t):0}const HB=5;function VB(e,t,n){const r=Math.max(t-HB,0);return WB(n-e(r),t-r)}const qB=.001,GB=.01,XB=10,ZB=.05,YB=1;function KB({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;Dj(e<=jj(XB));let o=1-t;o=oF(ZB,YB,o),e=oF(GB,XB,Bj(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=JB(t,o),u=Math.exp(-i);return qB-a/s*u},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,u=Math.exp(-r),l=JB(Math.pow(t,2),o);return(-i(t)+qB>0?-1:1)*((a-s)*u)/l}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-qB,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<QB;n++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=jj(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const QB=12;function JB(e,t){return e*Math.sqrt(1-t*t)}const $B=["duration","bounce"],e_=["stiffness","damping","mass"];function t_(e,t){return t.some((t=>void 0!==e[t]))}function n_({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!t_(e,e_)&&t_(e,$B)){const n=KB(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=c?-Bj(c):0,h=u/(2*Math.sqrt(s*l)),m=a-i,y=Bj(Math.sqrt(s/l)),g=Math.abs(m)<5;let A;if(n||(n=g?.01:2),t||(t=g?.005:.5),h<1){const e=JB(y,h);A=t=>{const n=Math.exp(-h*y*t);return a-n*((p+h*y*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)A=e=>a-Math.exp(-y*e)*(m+(p+y*m)*e);else{const e=y*Math.sqrt(h*h-1);A=t=>{const n=Math.exp(-h*y*t),r=Math.min(e*t,300);return a-n*((p+h*y*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=A(e);if(f)o.done=e>=d;else{let i=p;0!==e&&(i=h<1?VB(A,e,r):0);const s=Math.abs(i)<=n,u=Math.abs(a-r)<=t;o.done=s&&u}return o.value=o.done?a:r,o}}}function r_({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?u:void 0===u||Math.abs(s-e)<Math.abs(u-e)?s:u;let h=n*t;const m=d+h,y=void 0===o?m:o(m);y!==m&&(h=y-d);const g=e=>-h*Math.exp(-e/r),A=e=>y+g(e),b=e=>{const t=g(e),n=A(e);f.done=Math.abs(t)<=l,f.value=f.done?y:n};let v,w;const x=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==u&&t>u)&&(v=e,w=n_({keyframes:[f.value,p(f.value)],velocity:VB(A,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==v||(t=!0,b(e),x(e)),void 0!==v&&e>v?w.next(e-v):(!t&&b(e),f)}}}const i_=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Aj.update(t,!0),stop:()=>bj(t),now:()=>vj.isProcessing?vj.timestamp:performance.now()}},a_=2e4;function o_(e){let t=0;let n=e.next(t);for(;!n.done&&t<a_;)t+=50,n=e.next(t);return t>=a_?1/0:t}const s_={decay:r_,inertia:r_,tween:UB,keyframes:UB,spring:n_};function u_({autoplay:e=!0,delay:t=0,driver:n=i_,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:s="loop",onPlay:u,onStop:l,onComplete:c,onUpdate:d,...f}){let p,h,m=1,y=!1;const g=()=>{h=new Promise((e=>{p=e}))};let A;g();const b=s_[i]||UB;let v;b!==UB&&"number"!=typeof r[0]&&(v=_B([0,100],r,{clamp:!1}),r=[0,100]);const w=b({...f,keyframes:r});let x;"mirror"===s&&(x=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let E="idle",T=null,C=null,I=null;null===w.calculatedDuration&&a&&(w.calculatedDuration=o_(w));const{calculatedDuration:S}=w;let k=1/0,O=1/0;null!==S&&(k=S+o,O=k*(a+1)-o);let P=0;const R=e=>{if(null===C)return;m>0&&(C=Math.min(C,e)),m<0&&(C=Math.min(e-O/m,C)),P=null!==T?T:Math.round(e-C)*m;const n=P-t*(m>=0?1:-1),i=m>=0?n<0:n>O;P=Math.max(n,0),"finished"===E&&null===T&&(P=O);let u=P,l=w;if(a){const e=P/k;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,a+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,o&&(n-=o/k)):"mirror"===s&&(l=x));let i=oF(0,1,n);P>O&&(i="reverse"===s&&r?1:0),u=i*k}const c=i?{done:!1,value:r[0]}:l.next(u);v&&(c.value=v(c.value));let{done:f}=c;i||null===S||(f=m>=0?P>=O:P<=0);const p=null===T&&("finished"===E||"running"===E&&f);return d&&d(c.value),p&&M(),c},N=()=>{A&&A.stop(),A=void 0},L=()=>{E="idle",N(),p(),g(),C=I=null},M=()=>{E="finished",c&&c(),N(),p()},D=()=>{if(y)return;A||(A=n(R));const e=A.now();u&&u(),null!==T?C=e-T:C&&"finished"!==E||(C=e),"finished"===E&&g(),I=C,T=null,E="running",A.start()};e&&D();const F={then:(e,t)=>h.then(e,t),get time(){return Bj(P)},set time(e){e=jj(e),P=e,null===T&&A&&0!==m?C=A.now()-e/m:T=e},get duration(){const e=null===w.calculatedDuration?o_(w):w.calculatedDuration;return Bj(e)},get speed(){return m},set speed(e){e!==m&&A&&(m=e,F.time=Bj(P))},get state(){return E},play:D,pause:()=>{E="paused",T=P},stop:()=>{y=!0,"idle"!==E&&(E="idle",l&&l(),L())},cancel:()=>{null!==I&&R(I),L()},complete:()=>{E="finished"},sample:e=>(C=0,R(e))};return F}const l_=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),c_=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function d_(e,t,{onUpdate:n,onComplete:r,...i}){if(!(l_()&&c_.has(t)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let a,o,s=!1;const u=()=>{o=new Promise((e=>{a=e}))};u();let{keyframes:l,duration:c=300,ease:d,times:f}=i;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!Uj(t.ease))(t,i)){const e=u_({...i,repeat:0,delay:0});let t={done:!1,value:l[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;f=void 0,l=n,c=r-10,d="linear"}const p=function(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=Vj(s);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"})}(e.owner.current,t,l,{...i,duration:c,ease:d,times:f}),h=()=>p.cancel(),m=()=>{Aj.update(h),a(),u()};return p.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(l,i)),r&&r(),m()},{then:(e,t)=>o.then(e,t),get timeline(){return p.timeline},set timeline(e){p.timeline=e,p.onfinish=null},get time(){return Bj(p.currentTime||0)},set time(e){p.currentTime=jj(e)},get speed(){return p.playbackRate},set speed(e){p.playbackRate=e},get duration(){return Bj(c)},play:()=>{s||(p.play(),bj(h))},pause:()=>p.pause(),stop:()=>{if(s=!0,"idle"===p.playState)return;const{currentTime:t}=p;if(t){const n=u_({...i,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}m()},complete:()=>p.finish(),cancel:m}}const f_={type:"spring",stiffness:500,damping:25,restSpeed:10},p_={type:"keyframes",duration:.8},h_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},m_=(e,{keyframes:t})=>t.length>2?p_:QD.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:f_:h_,y_=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!PB.test(t)&&"0"!==t||t.startsWith("url("))),g_=new Set(["brightness","contrast","saturate","opacity"]);function A_(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(dF)||[];if(!r)return e;const i=n.replace(r,"");let a=g_.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const b_=/([a-z-]*)\(.*?\)/g,v_={...PB,getAnimatableNone:e=>{const t=e.match(b_);return t?t.map(A_).join(" "):e}},w_={...EF,color:mB,backgroundColor:mB,outlineColor:mB,fill:mB,stroke:mB,borderColor:mB,borderTopColor:mB,borderRightColor:mB,borderBottomColor:mB,borderLeftColor:mB,filter:v_,WebkitFilter:v_},x_=e=>w_[e];function E_(e,t){let n=x_(e);return n!==v_&&(n=PB),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const T_=e=>/^0[^.\s]+$/.test(e);function C_(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||T_(e):void 0}function I_(e,t){return e[t]||e.default||e}const S_=(e,t,n,r={})=>i=>{const a=I_(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s-=jj(o);const u=function(e,t,n,r){const i=y_(t,n);let a;a=Array.isArray(n)?[...n]:[null,n];const o=void 0!==r.from?r.from:e.get();let s;const u=[];for(let e=0;e<a.length;e++)null===a[e]&&(a[e]=0===e?o:a[e-1]),C_(a[e])&&u.push(e),"string"==typeof a[e]&&"none"!==a[e]&&"0"!==a[e]&&(s=a[e]);if(i&&u.length&&s)for(let e=0;e<u.length;e++)a[u[e]]=E_(t,s);return a}(t,e,n,a),l=u[0],c=u[u.length-1],d=y_(e,l),f=y_(e,c);let p={keyframes:u,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}(a)||(p={...p,...m_(e,p)}),p.duration&&(p.duration=jj(p.duration)),p.repeatDelay&&(p.repeatDelay=jj(p.repeatDelay)),!d||!f||_j||!1===a.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:yj,pause:yj,stop:yj,then:e=>(e(),Promise.resolve()),cancel:yj,complete:yj});return t?u_({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=d_(t,e,p);if(n)return n}return u_(p)};function k_(e){return Boolean($D(e)&&e.add)}function O_(e,t){-1===e.indexOf(t)&&e.push(t)}function P_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class R_{constructor(){this.subscriptions=[]}add(e){return O_(this.subscriptions,e),()=>P_(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class N_{constructor(e,t={}){var n;this.version="10.13.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=vj;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Aj.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Aj.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new R_);const n=this.events[e].add(t);return"change"===e?()=>{n(),Aj.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?WB(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function L_(e,t){return new N_(e,t)}const M_=e=>t=>t.test(e),D_=[sF,AF,gF,yF,vF,bF,{test:e=>"auto"===e,parse:e=>e}],F_=e=>D_.find(M_(e)),j_=[...D_,mB,PB],B_=e=>j_.find(M_(e));function __(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L_(n))}function z_(e,t){if(!t)return;return(t[e]||t.default||t).from}function U_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function W_(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const t in s){const r=e.getValue(t),i=s[t];if(!r||void 0===i||c&&U_(c,t))continue;const o={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[Mj];n&&(o.elapsed=window.HandoffAppearAnimations(n,t,r,Aj))}r.start(S_(t,r,i,e.shouldReduceMotion&&QD.has(t)?{type:!1}:o));const d=r.animation;k_(u)&&(u.add(t),d.then((()=>u.remove(t)))),l.push(d)}return o&&Promise.all(l).then((()=>{o&&function(e,t){const n=Lj(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const t in a)__(e,t,QF(a[t]))}(e,o)})),l}function H_(e,t,n={}){const r=Lj(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(W_(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=1===i?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(V_).forEach(((e,r)=>{e.notify("AnimationStart",t),o.push(H_(e,t,{...a,delay:n+u(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(o)}(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[a,o]:[o,a];return e().then((()=>t()))}return Promise.all([a(),o(n.delay)])}function V_(e,t){return e.sortNodePosition(t)}const q_=[...LD].reverse(),G_=LD.length;function X_(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>H_(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=H_(e,t,n);else{const i="function"==typeof t?Lj(e,t,n.custom):t;r=Promise.all(W_(e,i,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function Z_(e){let t=X_(e);const n={animate:K_(!0),whileInView:K_(),whileHover:K_(),whileTap:K_(),whileDrag:K_(),whileFocus:K_(),exit:K_()};let r=!0;const i=(t,n)=>{const r=Lj(e,n);if(r){const{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function a(a,o){const s=e.getProps(),u=e.getVariantContext(!0)||{},l=[],c=new Set;let d={},f=1/0;for(let t=0;t<G_;t++){const p=q_[t],h=n[p],m=void 0!==s[p]?s[p]:u[p],y=RD(m),g=p===o?h.isActive:null;!1===g&&(f=t);let A=m===u[p]&&m!==s[p]&&y;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),h.protectedKeys={...d},!h.isActive&&null===g||!m&&!h.prevProp||ND(m)||"boolean"==typeof m)continue;const b=Y_(h.prevProp,m);let v=b||p===o&&h.isActive&&!A&&y||t>f&&y;const w=Array.isArray(m)?m:[m];let x=w.reduce(i,{});!1===g&&(x={});const{prevResolvedValues:E={}}=h,T={...E,...x},C=e=>{v=!0,c.delete(e),h.needsAnimating[e]=!0};for(const e in T){const t=x[e],n=E[e];d.hasOwnProperty(e)||(t!==n?YF(t)&&YF(n)?!Nj(t,n)||b?C(e):h.protectedKeys[e]=!0:void 0!==t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=x,h.isActive&&(d={...d,...x}),r&&e.blockInitialAnimation&&(v=!1),v&&!A&&l.push(...w.map((e=>({animation:e,options:{type:p,...a}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),l.push({animation:t})}let p=Boolean(l.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r,i){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=a(i,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Y_(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Nj(t,e)}function K_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Q_=0;const J_={animation:{Feature:class extends mj{constructor(e){super(e),e.animationState||(e.animationState=Z_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ND(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends mj{constructor(){super(...arguments),this.id=Q_++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},$_=(e,t)=>Math.abs(e-t);class ez{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=rz(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=$_(e.x,t.x),r=$_(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=vj;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=tz(t,this.transformPagePoint),Aj.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,i=rz("pointercancel"===e.type?this.lastMoveEventInfo:tz(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!ij(e))return;this.handlers=t,this.transformPagePoint=n;const r=tz(aj(e),this.transformPagePoint),{point:i}=r,{timestamp:a}=vj;this.history=[{...i,timestamp:a}];const{onSessionStart:o}=t;o&&o(e,rz(r,this.history)),this.removeListeners=lj(sj(window,"pointermove",this.handlePointerMove),sj(window,"pointerup",this.handlePointerUp),sj(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bj(this.updatePoint)}}function tz(e,t){return t?{point:t(e.point)}:e}function nz(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rz({point:e},t){return{point:e,delta:nz(e,az(t)),offset:nz(e,iz(t)),velocity:oz(t,.1)}}function iz(e){return e[0]}function az(e){return e[e.length-1]}function oz(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=az(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>jj(t)));)n--;if(!r)return{x:0,y:0};const a=Bj(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function sz(e){return e.max-e.min}function uz(e,t=0,n=.01){return Math.abs(e-t)<=n}function lz(e,t,n,r=.5){e.origin=r,e.originPoint=yB(t.min,t.max,e.origin),e.scale=sz(n)/sz(t),(uz(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=yB(n.min,n.max,e.origin)-e.originPoint,(uz(e.translate)||isNaN(e.translate))&&(e.translate=0)}function cz(e,t,n,r){lz(e.x,t.x,n.x,r?r.originX:void 0),lz(e.y,t.y,n.y,r?r.originY:void 0)}function dz(e,t,n){e.min=n.min+t.min,e.max=e.min+sz(t)}function fz(e,t,n){e.min=t.min-n.min,e.max=e.min+sz(t)}function pz(e,t,n){fz(e.x,t.x,n.x),fz(e.y,t.y,n.y)}function hz(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function mz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const yz=.35;function gz(e,t,n){return{min:Az(e,t),max:Az(e,n)}}function Az(e,t){return"number"==typeof e?e:e[t]||0}const bz=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),vz=()=>({x:{min:0,max:0},y:{min:0,max:0}});function wz(e){return[e("x"),e("y")]}function xz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ez(e){return void 0===e||1===e}function Tz({scale:e,scaleX:t,scaleY:n}){return!Ez(e)||!Ez(t)||!Ez(n)}function Cz(e){return Tz(e)||Iz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Iz(e){return Sz(e.x)||Sz(e.y)}function Sz(e){return e&&"0%"!==e}function kz(e,t,n){return n+t*(e-n)}function Oz(e,t,n,r,i){return void 0!==i&&(e=kz(e,i,r)),kz(e,n,r)+t}function Pz(e,t=0,n=1,r,i){e.min=Oz(e.min,t,n,r,i),e.max=Oz(e.max,t,n,r,i)}function Rz(e,{x:t,y:n}){Pz(e.x,t.translate,t.scale,t.originPoint),Pz(e.y,n.translate,n.scale,n.originPoint)}function Nz(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Lz(e,t){e.min=e.min+t,e.max=e.max+t}function Mz(e,t,[n,r,i]){const a=void 0!==t[i]?t[i]:.5,o=yB(e.min,e.max,a);Pz(e,t[n],t[r],o,t.scale)}const Dz=["x","scaleX","originX"],Fz=["y","scaleY","originY"];function jz(e,t){Mz(e.x,t,Dz),Mz(e.y,t,Fz)}function Bz(e,t){return xz(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const _z=new WeakMap;class zz{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vz(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new ez(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(aj(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pj(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wz((e=>{let t=this.getAxisMotionValue(e).get()||0;if(gF.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=sz(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),i&&Aj.update((()=>i(e,t)),!1,!0);const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:i}=this.getProps();i&&Aj.update((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Uz(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?yB(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?yB(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&PD(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:hz(e.x,n,i),y:hz(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=yz){return!1===e?e=0:!0===e&&(e=yz),{x:gz(e,"left","right"),y:gz(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wz((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!PD(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Bz(e,n),{scroll:i}=t;return i&&(Lz(r.x,i.offset.x),Lz(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:mz(e.x,t.x),y:mz(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=xz(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},u=wz((o=>{if(!Uz(o,t,this.currentDirection))return;let u=s&&s[o]||{};a&&(u={min:0,max:0});const l=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(o,d)}));return Promise.all(u).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(S_(e,n,0,t))}stopAnimation(){wz((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wz((t=>{const{drag:n}=this.getProps();if(!Uz(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-yB(n,a,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!PD(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};wz((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=sz(e),i=sz(t);return i>r?n=FB(t.min,t.max-r,e.min):r>i&&(n=FB(e.min,e.max-i,t.min)),oF(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),wz((t=>{if(!Uz(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(yB(i,a,r[t]))}))}addListeners(){if(!this.visualElement.current)return;_z.set(this.visualElement,this);const e=sj(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();PD(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const i=rj(window,"resize",(()=>this.scalePositionWithinConstraints())),a=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wz((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=yz,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Uz(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Wz=e=>(t,n)=>{e&&Aj.update((()=>e(t,n)))};const Hz={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vz(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qz={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!AF.test(e))return e;e=parseFloat(e)}return`${Vz(e,t.target.x)}% ${Vz(e,t.target.y)}%`}},Gz={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=PB.parse(e);if(i.length>5)return r;const a=PB.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=yB(s,u,.5);return"number"==typeof i[2+o]&&(i[2+o]/=l),"number"==typeof i[3+o]&&(i[3+o]/=l),a(i)}};class Xz extends OL.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var a;a=Yz,Object.assign(YD,a),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Hz.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Aj.postRender((()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Zz(e){const[t,n]=function(){const e=kL.useContext(ID);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=kL.useId();return kL.useEffect((()=>r(i)),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}(),r=kL.useContext(UD);return OL.createElement(Xz,{...e,layoutGroup:r,switchLayoutGroup:kL.useContext(WD),isPresent:t,safeToRemove:n})}const Yz={borderRadius:{...qz,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qz,borderTopRightRadius:qz,borderBottomLeftRadius:qz,borderBottomRightRadius:qz,boxShadow:Gz},Kz=["TopLeft","TopRight","BottomLeft","BottomRight"],Qz=Kz.length,Jz=e=>"string"==typeof e?parseFloat(e):e,$z=e=>"number"==typeof e||AF.test(e);function eU(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const tU=rU(0,.5,nB),nU=rU(.5,.95,yj);function rU(e,t,n){return r=>r<e?0:r>t?1:n(FB(e,t,r))}function iU(e,t){e.min=t.min,e.max=t.max}function aU(e,t){iU(e.x,t.x),iU(e.y,t.y)}function oU(e,t,n,r,i){return e=kz(e-=t,1/n,r),void 0!==i&&(e=kz(e,1/i,r)),e}function sU(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){gF.test(t)&&(t=parseFloat(t),t=yB(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=yB(a.min,a.max,r);e===a&&(s-=t),e.min=oU(e.min,t,n,s,i),e.max=oU(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const uU=["x","scaleX","originX"],lU=["y","scaleY","originY"];function cU(e,t,n,r){sU(e.x,t,uU,n?n.x:void 0,r?r.x:void 0),sU(e.y,t,lU,n?n.y:void 0,r?r.y:void 0)}function dU(e){return 0===e.translate&&1===e.scale}function fU(e){return dU(e.x)&&dU(e.y)}function pU(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 hU(e){return sz(e.x)/sz(e.y)}class mU{constructor(){this.members=[]}add(e){O_(this.members,e),e.scheduleRender()}remove(e){if(P_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function yU(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:i}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),i&&(r+=`rotateY(${i}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return 1===o&&1===s||(r+=`scale(${o}, ${s})`),r||"none"}const gU=(e,t)=>e.depth-t.depth;class AU{constructor(){this.children=[],this.isDirty=!1}add(e){O_(this.children,e),this.isDirty=!0}remove(e){P_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gU),this.isDirty=!1,this.children.forEach(e)}}const bU=["","X","Y","Z"];let vU=0;const wU={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function xU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=vU++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;wU.totalNodes=wU.resolvedTargetDeltas=wU.recalculatedProjection=0,this.nodes.forEach(CU),this.nodes.forEach(NU),this.nodes.forEach(LU),this.nodes.forEach(IU),e=wU,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new AU)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new R_),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(a||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(bj(r),e(a-t))};return Aj.read(r,!0),()=>bj(r)}(r,250),Hz.hasAnimatedSinceResize&&(Hz.hasAnimatedSinceResize=!1,this.nodes.forEach(RU))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||_U,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=o.getProps(),u=!this.targetLayout||!pU(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);const t={...I_(i,"layout"),onPlay:a,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||RU(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,bj(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MU),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(kU);this.isUpdating||this.nodes.forEach(OU),this.isUpdating=!1,this.nodes.forEach(PU),this.nodes.forEach(EU),this.nodes.forEach(TU),this.clearAllSnapshots();const e=performance.now();vj.delta=oF(0,1e3/60,e-vj.timestamp),vj.timestamp=e,vj.isProcessing=!0,wj.update.process(vj),wj.preRender.process(vj),wj.render.process(vj),vj.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(SU),this.sharedNodes.forEach(DU)}scheduleUpdateProjection(){Aj.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Aj.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vz(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!fU(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Cz(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),function(e){zU||(zU=UU()?Math.round:e=>Math.round(2*e)/2);WU(e.x),WU(e.y)}(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return vz();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Lz(t.x,n.offset.x),Lz(t.y,n.offset.y)),t}removeElementScroll(e){const t=vz();aU(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;if(r!==this.root&&i&&a.layoutScroll){if(i.isRoot){aU(t,e);const{scroll:n}=this.root;n&&(Lz(t.x,-n.offset.x),Lz(t.y,-n.offset.y))}Lz(t.x,i.offset.x),Lz(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){const n=vz();aU(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&jz(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Cz(r.latestValues)&&jz(n,r.latestValues)}return Cz(this.latestValues)&&jz(n,this.latestValues),n}removeTransform(e){const t=vz();aU(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Cz(n.latestValues))continue;Tz(n.latestValues)&&n.updateSnapshot();const r=vz();aU(r,n.measurePageBox()),cU(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Cz(this.latestValues)&&cU(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==vj.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:a}=this.options;if(this.layout&&(i||a)){if(this.resolvedRelativeTargetAt=vj.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vz(),this.relativeTargetOrigin=vz(),pz(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),aU(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,s,u;if(this.target||(this.target=vz(),this.targetWithTransforms=vz()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,u=this.relativeParent.target,dz(o.x,s.x,u.x),dz(o.y,s.y,u.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):aU(this.target,this.layout.layoutBox),Rz(this.target,this.targetDelta)):aU(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vz(),this.relativeTargetOrigin=vz(),pz(this.relativeTargetOrigin,this.target,e.target),aU(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}wU.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Tz(this.parent.latestValues)&&!Iz(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===vj.timestamp&&(r=!1),r)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!a)return;aU(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const i=a.instance;i&&i.style&&"contents"===i.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&jz(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Rz(e,o)),r&&Cz(a.latestValues)&&jz(e,a.latestValues))}t.x=Nz(t.x),t.y=Nz(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:u}=t;if(!u)return void(this.projectionTransform&&(this.projectionDelta=bz(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bz(),this.projectionDeltaWithTransform=bz());const l=this.projectionTransform;cz(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.projectionTransform=yU(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===o&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),wU.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=bz();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o=vz(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),l=!u||u.members.length<=1,c=Boolean(s&&!l&&!0===this.options.crossfade&&!this.path.some(BU));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;FU(a.x,e.x,n),FU(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pz(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){jU(e.x,t.x,n.x,r),jU(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&pU(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=vz()),aU(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=yB(0,void 0!==n.opacity?n.opacity:1,tU(r)),e.opacityExit=yB(void 0!==t.opacity?t.opacity:1,0,nU(r))):a&&(e.opacity=yB(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i<Qz;i++){const a=`border${Kz[i]}Radius`;let o=eU(t,a),s=eU(n,a);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||$z(o)===$z(s)?(e[a]=Math.max(yB(Jz(o),Jz(s),r),0),(gF.test(s)||gF.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=yB(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(bj(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Aj.update((()=>{Hz.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=$D(e)?e:L_(e);return r.start(S_("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&HU(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||vz();const t=sz(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=sz(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}aU(t,n),jz(t,i),cz(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new mU);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<bU.length;t++){const i="rotate"+bU[t];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=JF(e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=JF(e.pointerEvents)||""),this.hasProjected&&!Cz(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const o=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=yU(this.projectionDeltaWithTransform,this.treeScale,o),i&&(r.transform=i(o,r.transform));const{x:s,y:u}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*u.origin}% 0`,a.animationValues?r.opacity=a===this?null!==(n=null!==(t=o.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:r.opacity=a===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in YD){if(void 0===o[e])continue;const{correct:t,applyTo:n}=YD[e],i="none"===r.transform?o[e]:t(o[e],a);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=i}else r[e]=i}return this.options.layoutId&&(r.pointerEvents=a===this?JF(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(kU),this.root.sharedNodes.clear()}}}function EU(e){e.updateLayout()}function TU(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;"size"===i?wz((e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],i=sz(r);r.min=t[e].min,r.max=r.min+i})):HU(i,n.layoutBox,t)&&wz((r=>{const i=a?n.measuredBox[r]:n.layoutBox[r],o=sz(t[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)}));const o=bz();cz(o,t,n.layoutBox);const s=bz();a?cz(s,e.applyTransform(r,!0),n.measuredBox):cz(s,t,n.layoutBox);const u=!fU(o);let l=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o=vz();pz(o,n.layoutBox,i.layoutBox);const s=vz();pz(s,t,a.layoutBox),pU(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function CU(e){wU.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function SU(e){e.clearSnapshot()}function kU(e){e.clearMeasurements()}function OU(e){e.isLayoutDirty=!1}function PU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RU(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NU(e){e.resolveTargetDelta()}function LU(e){e.calcProjection()}function MU(e){e.resetRotation()}function DU(e){e.removeLeadSnapshot()}function FU(e,t,n){e.translate=yB(t.translate,0,n),e.scale=yB(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jU(e,t,n,r){e.min=yB(t.min,n.min,r),e.max=yB(t.max,n.max,r)}function BU(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const _U={duration:.45,ease:[.4,0,.1,1]};let zU;const UU=()=>navigator.userAgent.toLowerCase().includes("applewebkit/");function WU(e){e.min=zU(e.min),e.max=zU(e.max)}function HU(e,t,n){return"position"===e||"preserve-aspect"===e&&!uz(hU(t),hU(n),.2)}const VU=xU({attachResizeListener:(e,t)=>rj(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qU={current:void 0},GU=xU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qU.current){const e=new VU({});e.mount(window),e.setOptions({layoutScroll:!0}),qU.current=e}return qU.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),XU={pan:{Feature:class extends mj{constructor(){super(...arguments),this.removePointerDownListener=yj}onPointerDown(e){this.session=new ez(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Wz(e),onStart:Wz(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Aj.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=sj(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends mj{constructor(e){super(e),this.removeGroupControls=yj,this.removeListeners=yj,this.controls=new zz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yj}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:GU,MeasureLayout:Zz}},ZU=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function YU(e,t,n=1){const[r,i]=function(e){const t=ZU.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);return a?a.trim():iF(i)?YU(i,t,n+1):i}const KU=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),QU=e=>KU.has(e),JU=e=>e===sF||e===AF,$U=(e,t)=>parseFloat(e.split(", ")[t]),eW=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return $U(i[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?$U(t[1],e):0}},tW=new Set(["x","y","z"]),nW=KD.filter((e=>!tW.has(e)));const rW={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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:eW(4,13),y:eW(5,14)};rW.translateX=rW.x,rW.translateY=rW.y;const iW=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(QU);let a=[],o=!1;const s=[];if(i.forEach((i=>{const u=e.getValue(i);if(!e.hasValue(i))return;let l=n[i],c=F_(l);const d=t[i];let f;if(YF(d)){const e=d.length,t=null===d[0]?1:0;l=d[t],c=F_(l);for(let n=t;n<e&&null!==d[n];n++)f?Fj(F_(d[n])===f):f=F_(d[n])}else f=F_(d);if(c!==f)if(JU(c)&&JU(f)){const e=u.get();"string"==typeof e&&u.set(parseFloat(e)),"string"==typeof d?t[i]=parseFloat(d):Array.isArray(d)&&f===AF&&(t[i]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==f?void 0:f.transform)&&(0===l||0===d)?0===l?u.set(f.transform(l)):t[i]=c.transform(d):(o||(a=function(e){const t=[];return nW.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),o=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],u.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,i=((e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};"none"===o&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=rW[e](r,a)})),t.render();const u=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=rW[n](u,a)})),e})(t,e,s);return a.length&&a.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),SD&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}return{target:t,transitionEnd:r}};function aW(e,t,n,r){return(e=>Object.keys(e).some(QU))(t)?iW(e,t,n,r):{target:t,transitionEnd:r}}const oW=(e,t,n,r)=>{const i=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!iF(t))return;const n=YU(t,r);n&&e.set(n)}));for(const e in t){const i=t[e];if(!iF(i))continue;const a=YU(i,r);a&&(t[e]=a,n||(n={}),void 0===n[e]&&(n[e]=i))}return{target:t,transitionEnd:n}}(e,t,r);return aW(e,t=i.target,n,r=i.transitionEnd)},sW={current:null},uW={current:!1};const lW=new WeakMap,cW=Object.keys(zD),dW=cW.length,fW=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pW=MD.length;class hW{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>Aj.render(this.render,!1,!0);const{latestValues:o,renderState:s}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.isControllingVariants=DD(t),this.isVariantNode=FD(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(t,{});for(const e in l){const t=l[e];void 0!==o[e]&&$D(t)&&(t.set(o[e],!1),k_(u)&&u.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,lW.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),uW.current||function(){if(uW.current=!0,SD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sW.current=e.matches;e.addListener(t),t()}else sW.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sW.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lW.delete(this.current),this.projection&&this.projection.unmount(),bj(this.notifyUpdate),bj(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=QD.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Aj.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),i()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,i){let a,o;for(let e=0;e<dW;e++){const n=cW[e],{isEnabled:r,Feature:i,ProjectionNode:s,MeasureLayout:u}=zD[n];s&&(a=s),r(t)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),u&&(o=u))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:o,layoutScroll:s,layoutRoot:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||o&&PD(o),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:s,layoutRoot:u})}return o}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vz()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<fW.length;t++){const n=fW[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if($D(a))e.addValue(i,a),k_(r)&&r.add(i);else if($D(o))e.addValue(i,L_(a,{owner:e})),k_(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const t=e.getValue(i);!t.hasAnimated&&t.set(a)}else{const t=e.getStaticValue(i);e.addValue(i,L_(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<pW;e++){const n=MD[e],r=this.props[n];(RD(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=L_(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=XF(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||$D(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new R_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class mW extends hW{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let a=function(e,t,n){const r={};for(const i in e){const e=z_(i,t);if(void 0!==e)r[i]=e;else{const e=n.getValue(i);e&&(r[i]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),a&&(a=r(a))),i){!function(e,t,n){var r,i;const a=Object.keys(t).filter((t=>!e.hasValue(t))),o=a.length;if(o)for(let s=0;s<o;s++){const o=a[s],u=t[o];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(i=null!==(r=n[o])&&void 0!==r?r:e.readValue(o))&&void 0!==i?i:t[o]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||T_(l))?l=parseFloat(l):!B_(l)&&PB.test(u)&&(l=E_(o,u)),e.addValue(o,L_(l,{owner:e})),void 0===n[o]&&(n[o]=l),null!==l&&e.setBaseTarget(o,l))}}(this,n,a);const e=oW(this,n,a,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class yW extends mW{readValueFromInstance(e,t){if(QD.has(t)){const e=x_(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(rF(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Bz(e,t)}build(e,t,n,r){TF(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return qF(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$D(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){WF(e,t,n,r)}}class gW extends mW{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(QD.has(t)){const e=x_(t);return e&&e.default||0}return t=HF.has(t)?t:UF(t),e.getAttribute(t)}measureInstanceViewportBox(){return vz()}scrapeMotionValuesFromProps(e,t){return GF(e,t)}build(e,t,n,r){FF(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){VF(e,t,0,r)}mount(e){this.isSVGTag=BF(e.tagName),super.mount(e)}}const AW=(e,t)=>ZD(e)?new gW(t,{enableHardwareAcceleration:!1}):new yW(t,{enableHardwareAcceleration:!0}),bW={...J_,...Rj,...XU,...{layout:{ProjectionNode:GU,MeasureLayout:Zz}}},vW=GD(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...ZD(e)?tj:nj,preloadedFeatures:n,useRender:zF(t),createVisualElement:r,Component:e}}(e,t,bW,AW)));function wW(){const e=kL.useRef(!1);return kD((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class xW extends kL.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function EW({children:e,isPresent:t}){const n=kL.useId(),r=kL.useRef(null),i=kL.useRef({width:0,height:0,top:0,left:0});return kL.useInsertionEffect((()=>{const{width:e,height:a,top:o,left:s}=i.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${o}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),kL.createElement(xW,{isPresent:t,childRef:r,sizeRef:i},kL.cloneElement(e,{ref:r}))}const TW=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=ZF(CW),u=kL.useId(),l=kL.useMemo((()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))})),a?void 0:[n]);return kL.useMemo((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),kL.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===o&&(e=kL.createElement(EW,{isPresent:n},e)),kL.createElement(ID.Provider,{value:l},e)};function CW(){return new Map}const IW=e=>e.key||"";const SW=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=kL.useContext(UD).forceRender||function(){const e=wW(),[t,n]=kL.useState(0),r=kL.useCallback((()=>{e.current&&n(t+1)}),[t]);return[kL.useCallback((()=>Aj.postRender(r)),[r]),t]}()[0],u=wW(),l=function(e){const t=[];return kL.Children.forEach(e,(e=>{kL.isValidElement(e)&&t.push(e)})),t}(e);let c=l;const d=kL.useRef(new Map).current,f=kL.useRef(c),p=kL.useRef(new Map).current,h=kL.useRef(!0);var m;if(kD((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=IW(e);t.set(n,e)}))}(l,p),f.current=c})),m=()=>{h.current=!0,p.clear(),d.clear()},kL.useEffect((()=>()=>m()),[]),h.current)return kL.createElement(kL.Fragment,null,c.map((e=>kL.createElement(TW,{key:IW(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:o},e))));c=[...c];const y=f.current.map(IW),g=l.map(IW),A=y.length;for(let e=0;e<A;e++){const t=y[e];-1!==g.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===o&&d.size&&(c=[]),d.forEach(((e,n)=>{if(-1!==g.indexOf(n))return;const i=p.get(n);if(!i)return;const h=y.indexOf(n);let m=e;if(!m){const e=()=>{p.delete(n),d.delete(n);const e=f.current.findIndex((e=>e.key===n));if(f.current.splice(e,1),!d.size){if(f.current=l,!1===u.current)return;s(),r&&r()}};m=kL.createElement(TW,{key:IW(i),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:a,mode:o},i),d.set(n,m)}c.splice(h,0,m)})),c=c.map((e=>{const t=e.key;return d.has(t)?e:kL.createElement(TW,{key:IW(e),isPresent:!0,presenceAffectsLayout:a,mode:o},e)})),kL.createElement(kL.Fragment,null,d.size?c:c.map((e=>kL.cloneElement(e))))},kW=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},OW=(...e)=>e.reduce(((e,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=OW.options.mergeArrays?OW.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:kW(e[n])&&kW(t[n])?e[n]=OW(e[n],t[n]):e[n]=void 0===t[n]?OW.options.allowUndefinedOverrides?t[n]:e[n]:t[n])})),e}),{}),PW={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};OW.options=PW,OW.withOptions=(e,...t)=>{OW.options=Object.assign(Object.assign({},PW),e);const n=OW(...t);return OW.options=PW,n};var RW="__lodash_hash_undefined__",NW=1/0,LW="[object Function]",MW="[object GeneratorFunction]",DW="[object Symbol]",FW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jW=/^\w*$/,BW=/^\./,_W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zW=/\\(\\)?/g,UW=/^\[object .+?Constructor\]$/,WW="object"==typeof ot&&ot&&ot.Object===Object&&ot,HW="object"==typeof self&&self&&self.Object===Object&&self,VW=WW||HW||Function("return this")();var qW,GW=Array.prototype,XW=Function.prototype,ZW=Object.prototype,YW=VW["__core-js_shared__"],KW=(qW=/[^.]+$/.exec(YW&&YW.keys&&YW.keys.IE_PROTO||""))?"Symbol(src)_1."+qW:"",QW=XW.toString,JW=ZW.hasOwnProperty,$W=ZW.toString,eH=RegExp("^"+QW.call(JW).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tH=VW.Symbol,nH=GW.splice,rH=hH(VW,"Map"),iH=hH(Object,"create"),aH=tH?tH.prototype:void 0,oH=aH?aH.toString:void 0;function sH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function uH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function lH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function cH(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function dH(e,t){var n;t=function(e,t){if(AH(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||vH(e))return!0;return jW.test(e)||!FW.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:AH(n=t)?n:mH(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[yH(t[r++])];return r&&r==i?e:void 0}function fH(e){if(!bH(e)||(t=e,KW&&KW in t))return!1;var t,n=function(e){var t=bH(e)?$W.call(e):"";return t==LW||t==MW}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?eH:UW;return n.test(function(e){if(null!=e){try{return QW.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function pH(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function hH(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return fH(n)?n:void 0}sH.prototype.clear=function(){this.__data__=iH?iH(null):{}},sH.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},sH.prototype.get=function(e){var t=this.__data__;if(iH){var n=t[e];return n===RW?void 0:n}return JW.call(t,e)?t[e]:void 0},sH.prototype.has=function(e){var t=this.__data__;return iH?void 0!==t[e]:JW.call(t,e)},sH.prototype.set=function(e,t){return this.__data__[e]=iH&&void 0===t?RW:t,this},uH.prototype.clear=function(){this.__data__=[]},uH.prototype.delete=function(e){var t=this.__data__,n=cH(t,e);return!(n<0)&&(n==t.length-1?t.pop():nH.call(t,n,1),!0)},uH.prototype.get=function(e){var t=this.__data__,n=cH(t,e);return n<0?void 0:t[n][1]},uH.prototype.has=function(e){return cH(this.__data__,e)>-1},uH.prototype.set=function(e,t){var n=this.__data__,r=cH(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},lH.prototype.clear=function(){this.__data__={hash:new sH,map:new(rH||uH),string:new sH}},lH.prototype.delete=function(e){return pH(this,e).delete(e)},lH.prototype.get=function(e){return pH(this,e).get(e)},lH.prototype.has=function(e){return pH(this,e).has(e)},lH.prototype.set=function(e,t){return pH(this,e).set(e,t),this};var mH=gH((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(vH(e))return oH?oH.call(e):"";var t=e+"";return"0"==t&&1/e==-NW?"-0":t}(t);var n=[];return BW.test(e)&&n.push(""),e.replace(_W,(function(e,t,r,i){n.push(r?i.replace(zW,"$1"):t||e)})),n}));function yH(e){if("string"==typeof e||vH(e))return e;var t=e+"";return"0"==t&&1/e==-NW?"-0":t}function gH(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(gH.Cache||lH),n}gH.Cache=lH;var AH=Array.isArray;function bH(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function vH(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&$W.call(e)==DW}var wH=function(e,t,n){var r=null==e?void 0:dH(e,t);return void 0===r?n:r},xH=st(wH),EH={size:{600:"6px",500:"5px",400:"4px",300:"3px",200:"2px",100:"1px"}},TH={size:{600:"64px",500:"48px",400:"32px",300:"24px",250:"20px",200:"16px",100:"12px"}},CH={family:{heading:{primary:"'Suisse-Intl', sans-serif",secondary:"'Suisse-Intl', sans-serif"},body:{primary:"'Roboto', sans-serif",secondary:"'Roboto Mono', monospace"}},decoration:{underline:"underline",lineThrough:"line-through",none:"none"},casing:{uppercase:"uppercase",none:"none"}},IH={body:{large:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:400},bold:{fontWeight:500}},medium:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:400},bold:{fontWeight:500}},small:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"12px",lineHeight:"16px",fontWeight:400},bold:{fontWeight:700}},xxSmall:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400},bold:{fontWeight:700}}},caption:{medium:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"14px",lineHeight:"20px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}},small:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"10px",lineHeight:"14px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}}},heading:{xxLarge:{regular:{fontSize:"96px",lineHeight:"112px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xLarge:{regular:{fontSize:"64px",lineHeight:"72px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},large:{regular:{fontSize:"40px",lineHeight:"48px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},medium:{regular:{fontSize:"28px",lineHeight:"32px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},small:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}}}},SH={x1:"4px",x2:"8px",x3:"12px",x4:"16px",x5:"20px",x6:"24px",x7:"28px",x8:"32px",x9:"36px",x10:"40px",x11:"44px",x12:"48px",x13:"52px",x14:"56px",x15:"60px",x16:"64px",x17:"68px",x18:"72px",x19:"76px",x20:"80px",x21:"84px",x22:"88px",x23:"92px",x24:"96px",x25:"100px",x26:"104px",x27:"108px",x28:"112px",x29:"116px",x30:"120px",x31:"124px",x32:"128px",x33:"132px",x34:"136px",x35:"140px",x36:"144px",x37:"148px",x38:"152px",x39:"156px",x40:"160px",x41:"164px",x42:"168px",x43:"172px",x44:"176px",x45:"180px",x46:"184px",x47:"188px",x48:"192px",x49:"196px",x50:"200px"},kH={x1:"2px",x2:"4px",x3:"6px",x4:"8px",x5:"10px",x6:"12px",x7:"14px",x8:"16px",x9:"18px",x10:"20px",x11:"22px",x12:"24px",x13:"26px",x14:"28px",x15:"30px",x16:"32px",x17:"34px",x18:"36px",x19:"38px",x20:"40px",x21:"42px",x22:"44px",x23:"46px",x24:"48px",x25:"50px"},OH={small:450,medium:768,large:1024,xLarge:1280,xxLarge:1536,xxxLarge:1920},PH={tooltip:12,toast:11,popover:10,modal:9,drawer:8},RH={normal:{gentle:{cssDuration:"0.4s",jsDuration:.4,cssEase:"ease-in-out",jsEase:"easeInOut"},fast:{cssDuration:"0.25s",jsDuration:.25,cssEase:"ease-in-out",jsEase:"easeInOut"}},bounce:{gentle:{cssDuration:"0.6s",jsDuration:.6,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]},fast:{cssDuration:"0.45s",jsDuration:.45,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]}}},NH={colorMode:"darkOnLight",color:{brand:{1:"#131313",2:"#FFFFFF",3:"#E0E0E0",4:"#868686",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#ECECEC",900:"#F0F0F0",800:"#F5F5F5",700:"#FAFAFA",600:"#FDFDFD",500:"#FFFFFF"},accent:{1:"#B026BD",2:"#1FD3F5",3:"#67C6E0",4:"#5AA0D9",5:"#8395E5",6:"#D8EFF4",7:"#F5BDD0",8:"#EC98CA"},translucent:{emphasis:{500:"#FFFFFFF5",400:"#FFFFFFE0",300:"#FFFFFFCC",200:"#FFFFFFA3",100:"#FFFFFF7A"},standard:{1e3:"#0D0D0DFF",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D1A",150:"#0D0D0D14",100:"#0D0D0D0A",50:"#0D0D0D05"},inverse:{1e3:"#FFFFFFFF",900:"#FFFFFFE6",800:"#FFFFFFCC",700:"#FFFFFFA3",600:"#FFFFFF7A",500:"#FFFFFF3D",400:"#FFFFFF29",300:"#FFFFFF1F",200:"#FFFFFF14",100:"#FFFFFF0A"}},status:{guidance:{bright:"#36E0F8",dim:"#9AEFFB"},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FBFF6D",dim:"#FCFEBF"},fatal:{bright:"#FF637F",dim:"#FFB1BF"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},text:{primary:"base.color.brand.1",secondary:"#5C5C5C",link:{primary:"base.color.accent.1",secondary:"base.color.brand.1"},inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},fixed:{black:{1e3:"base.color.translucent.standard.1000",100:"#0D0D0D14"},white:{1e3:"base.color.brand.2",100:"#FFFFFF14"}}},gradient:{1:{spectrum:"linear-gradient(90.68deg, #F191FA 0%, #83E3F0 99.82%)",blendMode:"normal",svgDefs:'<linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#F191FA" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'<radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'<radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 8px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:SH,borderRadius:kH,font:CH,text:IH,breakpoint:OH,icon:TH,border:EH,zLevel:PH,motion:RH},LH={colorMode:"lightOnDark",color:{brand:{1:"#F3F3F3",2:"#131313",3:"#E0E0E0",4:"#B6B6B6",5:"#36E0F8",6:"#1F8290"},neutral:{500:"#575757",600:"#444444",700:"#323232",800:"#1F1F1F",900:"#131313",1e3:"#0D0D0D"},accent:{1:"#F191FA",2:"#36E0F8",3:"#6FD6F2",4:"#61ADEB",5:"#99A8EA",6:"#E4F4F7",7:"#F8D1DE",8:"#F2B7DA"},translucent:{emphasis:{500:"#F3F3F333",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",100:"#F3F3F30A"},standard:{1e3:"#F3F3F3FF",900:"#F3F3F3E0",800:"#F3F3F3CC",700:"#F3F3F3A3",600:"#F3F3F37A",500:"#F3F3F33D",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",150:"#F3F3F30F",100:"#F3F3F30A",50:"#F3F3F305"},inverse:{1e3:"#0D0D0DFF",900:"#0D0D0DE6",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D14",100:"#0D0D0D0A"}},status:{guidance:{bright:"#36E0F8",dim:"#94E9F5 "},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FAFD7E",dim:"#F6F8B9"},fatal:{bright:"#FF637F",dim:"#F9ABB9"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},text:{primary:"base.color.brand.1",secondary:"base.color.brand.4",link:{primary:"base.color.accent.1",secondary:"base.color.brand.1"},inverse:{primary:"base.color.brand.2",secondary:"#464646"}},fixed:{black:{1e3:"base.brand.2",100:"#13131314"},white:{1e3:"base.brand.1",100:"#F3F3F314"}}},gradient:{1:{spectrum:"linear-gradient(105.76deg, #F191FA -46.96%, #83E3F0 99.99%)",blendMode:"normal",svgDefs:'\n <linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9A2F6" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'\n <radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'\n <radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 6px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:SH,borderRadius:kH,font:CH,text:IH,breakpoint:OH,icon:TH,border:EH,zLevel:PH,motion:RH};var MH=(e,t)=>xH(e,t);function DH(e,t){let n=MH(e,t);return"string"==typeof n&&n.match(/^base./)&&(n=DH(e,n)),n}var FH,jH={base:NH},BH={exports:{}},_H={};BH.exports=function(){if(FH)return _H;FH=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case o:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),_H.ContextConsumer=s,_H.ContextProvider=o,_H.Element=t,_H.ForwardRef=l,_H.Fragment=r,_H.Lazy=p,_H.Memo=f,_H.Portal=n,_H.Profiler=a,_H.StrictMode=i,_H.Suspense=c,_H.SuspenseList=d,_H.isAsyncMode=function(){return!1},_H.isConcurrentMode=function(){return!1},_H.isContextConsumer=function(e){return m(e)===s},_H.isContextProvider=function(e){return m(e)===o},_H.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_H.isForwardRef=function(e){return m(e)===l},_H.isFragment=function(e){return m(e)===r},_H.isLazy=function(e){return m(e)===p},_H.isMemo=function(e){return m(e)===f},_H.isPortal=function(e){return m(e)===n},_H.isProfiler=function(e){return m(e)===a},_H.isStrictMode=function(e){return m(e)===i},_H.isSuspense=function(e){return m(e)===c},_H.isSuspenseList=function(e){return m(e)===d},_H.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===i||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===o||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},_H.typeOf=m,_H}();var zH=BH.exports,UH=RL.Fragment;function WH(e,t,n){return aD.call(t,"css")?RL.jsx(yD,pD(e,t),n):RL.jsx(e,t,n)}function HH(e,t,n){return aD.call(t,"css")?RL.jsxs(yD,pD(e,t),n):RL.jsxs(e,t,n)}var VH={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",u="[object AsyncFunction]",l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",g="[object Object]",A="[object Promise]",b="[object Proxy]",v="[object RegExp]",w="[object Set]",x="[object String]",E="[object Symbol]",T="[object Undefined]",C="[object WeakMap]",I="[object ArrayBuffer]",S="[object DataView]",k=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[o]=P[s]=P[I]=P[l]=P[S]=P[c]=P[d]=P[f]=P[h]=P[m]=P[g]=P[v]=P[w]=P[x]=P[C]=!1;var R="object"==typeof ot&&ot&&ot.Object===Object&&ot,N="object"==typeof self&&self&&self.Object===Object&&self,L=R||N||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,F=D&&D.exports===M,j=F&&R.process,B=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),_=B&&B.isTypedArray;function z(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function U(e,t){return e.has(t)}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,q=Function.prototype,G=Object.prototype,X=L["__core-js_shared__"],Z=q.toString,Y=G.hasOwnProperty,K=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Q=G.toString,J=RegExp("^"+Z.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=F?L.Buffer:void 0,ee=L.Symbol,te=L.Uint8Array,ne=G.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ue=Fe(L,"DataView"),le=Fe(L,"Map"),ce=Fe(L,"Promise"),de=Fe(L,"Set"),fe=Fe(L,"WeakMap"),pe=Fe(Object,"create"),he=ze(ue),me=ze(le),ye=ze(ce),ge=ze(de),Ae=ze(fe),be=ee?ee.prototype:void 0,ve=be?be.valueOf:void 0;function we(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ee;++t<n;)this.add(e[t])}function Ce(e){var t=this.__data__=new xe(e);this.size=t.size}function Ie(e,t){var n=He(e),r=!n&&We(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ke(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var l in e)!t&&!Y.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_e(l,u))||s.push(l);return s}function Se(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?T:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=Q.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return Q.call(e)}(e)}function Oe(e){return Ze(e)&&ke(e)==o}function Pe(e,t,n,a,u){return e===t||(null==e||null==t||!Ze(e)&&!Ze(t)?e!=e&&t!=t:function(e,t,n,a,u,f){var p=He(e),y=He(t),A=p?s:Be(e),b=y?s:Be(t),T=(A=A==o?g:A)==g,C=(b=b==o?g:b)==g,k=A==b;if(k&&Ve(e)){if(!Ve(t))return!1;p=!0,T=!1}if(k&&!T)return f||(f=new Ce),p||Ke(e)?Le(e,t,n,a,u,f):function(e,t,n,a,o,s,u){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case l:case c:case m:return Ue(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case x:return e==t+"";case h:var f=W;case w:var p=a&r;if(f||(f=H),e.size!=t.size&&!p)return!1;var y=u.get(e);if(y)return y==t;a|=i,u.set(e,t);var g=Le(f(e),f(t),a,o,s,u);return u.delete(e),g;case E:if(ve)return ve.call(e)==ve.call(t)}return!1}(e,t,A,n,a,u,f);if(!(n&r)){var O=T&&Y.call(e,"__wrapped__"),P=C&&Y.call(t,"__wrapped__");if(O||P){var R=O?e.value():e,N=P?t.value():t;return f||(f=new Ce),u(R,N,n,a,f)}}if(!k)return!1;return f||(f=new Ce),function(e,t,n,i,a,o){var s=n&r,u=Me(e),l=u.length,c=Me(t),d=c.length;if(l!=d&&!s)return!1;var f=l;for(;f--;){var p=u[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<l;){var g=e[p=u[f]],A=t[p];if(i)var b=s?i(A,g,p,t,e,o):i(g,A,p,e,t,o);if(!(void 0===b?g===A||a(g,A,n,i,o):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,u,f)}(e,t,n,a,Pe,u))}function Re(e){return!(!Xe(e)||(t=e,K&&K in t))&&(qe(e)?J:k).test(ze(e));var t}function Ne(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||G,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Le(e,t,n,a,o,s){var u=n&r,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new Te:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var m=e[f],y=t[f];if(a)var g=u?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!z(t,(function(e,t){if(!U(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return He(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Qe,je)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Fe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Re(n)?n:void 0}we.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},we.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},we.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[],this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ee.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(le||xe),string:new we}},Ee.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ee.prototype.get=function(e){return De(this,e).get(e)},Ee.prototype.has=function(e){return De(this,e).has(e)},Ee.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,n),this},Te.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new xe,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ee(r)}return n.set(e,t),this.size=n.size,this};var je=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=ke;function _e(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(ue&&Be(new ue(new ArrayBuffer(1)))!=S||le&&Be(new le)!=h||ce&&Be(ce.resolve())!=A||de&&Be(new de)!=w||fe&&Be(new fe)!=C)&&(Be=function(e){var t=ke(e),n=t==g?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case he:return S;case me:return h;case ye:return A;case ge:return w;case Ae:return C}return t});var We=Oe(function(){return arguments}())?Oe:function(e){return Ze(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},He=Array.isArray;var Ve=oe||function(){return!1};function qe(e){if(!Xe(e))return!1;var t=ke(e);return t==f||t==p||t==u||t==b}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ze(e){return null!=e&&"object"==typeof e}var Ye,Ke=_?(Ye=_,function(e){return Ye(e)}):function(e){return Ze(e)&&Ge(e.length)&&!!P[ke(e)]};function Qe(e){return null!=(t=e)&&Ge(t.length)&&!qe(t)?Ie(e):Ne(e);var t}e.exports=function(e,t){return Pe(e,t)}}(VH,VH.exports);var qH=st(VH.exports),GH=NaN,XH="[object Symbol]",ZH=/^\s+|\s+$/g,YH=/^[-+]0x[0-9a-f]+$/i,KH=/^0b[01]+$/i,QH=/^0o[0-7]+$/i,JH=parseInt,$H="object"==typeof ot&&ot&&ot.Object===Object&&ot,eV="object"==typeof self&&self&&self.Object===Object&&self,tV=$H||eV||Function("return this")(),nV=Object.prototype.toString,rV=Math.max,iV=Math.min,aV=function(){return tV.Date.now()};function oV(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function sV(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&nV.call(e)==XH}(e))return GH;if(oV(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oV(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ZH,"");var n=KH.test(e);return n||QH.test(e)?JH(e.slice(2),n?2:8):YH.test(e)?GH:+e}var uV=function(e,t,n){var r,i,a,o,s,u,l=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function h(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=a}function m(){var e=aV();if(h(e))return y(e);s=setTimeout(m,function(e){var n=t-(e-u);return d?iV(n,a-(e-l)):n}(e))}function y(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function g(){var e=aV(),n=h(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(m,t),c?p(e):o}(u);if(d)return s=setTimeout(m,t),p(u)}return void 0===s&&(s=setTimeout(m,t)),o}return t=sV(t)||0,oV(n)&&(c=!!n.leading,a=(d="maxWait"in n)?rV(sV(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},g.flush=function(){return void 0===s?o:y(aV())},g},lV=st(uV),cV={exports:{}};
35
+ function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,p,v,w,x,E,T,C,I,S,k=this._hash.words,O=d.words,P=f.words,R=s.words,N=u.words,L=l.words,M=c.words;for(x=a=k[0],E=o=k[1],T=p=k[2],C=v=k[3],I=w=k[4],n=0;n<80;n+=1)S=a+e[t+R[n]]|0,S+=n<16?h(o,p,v)+O[0]:n<32?m(o,p,v)+O[1]:n<48?y(o,p,v)+O[2]:n<64?g(o,p,v)+O[3]:A(o,p,v)+O[4],S=(S=b(S|=0,L[n]))+w|0,a=w,w=v,v=b(p,10),p=o,o=S,S=x+e[t+N[n]]|0,S+=n<16?A(E,T,C)+P[0]:n<32?g(E,T,C)+P[1]:n<48?y(E,T,C)+P[2]:n<64?m(E,T,C)+P[3]:h(E,T,C)+P[4],S=(S=b(S|=0,M[n]))+I|0,x=I,I=C,C=b(T,10),T=E,E=S;S=k[1]+p+C|0,k[1]=k[2]+v+I|0,k[2]=k[3]+w+x|0,k[3]=k[4]+a+E|0,k[4]=k[0]+o+T|0,k[0]=S},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function y(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function A(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(p),t.HmacRIPEMD160=a._createHmacHelper(p)}(),n.RIPEMD160)}(eP)),rP(),iP||(iP=1,function(e,t){var n;e.exports=(n=yO(),rP(),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,u=a.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=s.create(n.hasher,e),a=i.create(),o=i.create([1]),u=a.words,l=o.words,c=n.keySize,d=n.iterations;u.length<c;){var f=r.update(t).finalize(o);r.reset();for(var p=f.words,h=p.length,m=f,y=1;y<d;y++){m=r.finalize(m),r.reset();for(var g=m.words,A=0;A<h;A++)p[A]^=g[A]}a.concat(f),l[0]++}return a.sigBytes=4*c,a}});e.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)}}(),n.PBKDF2)}(aP)),uP(),dP(),hP(),gP(),vP(),EP(),TP||(TP=1,function(e,t){var n,r;e.exports=(r=yO(),dP(),r.mode.ECB=((n=r.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),r.mode.ECB)}(CP)),IP||(IP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,a=n+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)}(SP)),kP||(kP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)}(OP)),PP||(PP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)}(RP)),NP||(NP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},n.pad.ZeroPadding)}(LP)),MP||(MP=1,function(e,t){var n;e.exports=(n=yO(),dP(),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}(DP)),FP||(FP=1,function(e,t){var n;e.exports=(n=yO(),dP(),function(e){var t=n,r=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}}(),n.format.Hex)}(jP)),BP||(BP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],u=[],l=[],c=[],d=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var h=r^r<<1^r<<2^r<<3^r<<4;h=h>>>8^255&h^99,i[n]=h,a[h]=n;var m=e[n],y=e[m],g=e[y],A=257*e[h]^16843008*h;o[n]=A<<24|A>>>8,s[n]=A<<16|A>>>16,u[n]=A<<8|A>>>24,l[n]=A,A=16843009*g^65537*y^257*m^16843008*n,c[h]=A<<24|A>>>8,d[h]=A<<16|A>>>16,f[h]=A<<8|A>>>24,p[h]=A,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o<r;o++)o<n?a[o]=t[o]:(l=a[o-1],o%n?n>6&&o%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=h[o/n|0]<<24),a[o]=a[o-n]^l);for(var s=this._invKeySchedule=[],u=0;u<r;u++){if(o=r-u,u%4)var l=a[o];else l=a[o-4];s[u]=u<4||o<=4?l:c[i[l>>>24]]^d[i[l>>>16&255]]^f[i[l>>>8&255]]^p[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,u,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,c,d,f,p,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var u=this._nRounds,l=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],f=e[t+3]^n[3],p=4,h=1;h<u;h++){var m=r[l>>>24]^i[c>>>16&255]^a[d>>>8&255]^o[255&f]^n[p++],y=r[c>>>24]^i[d>>>16&255]^a[f>>>8&255]^o[255&l]^n[p++],g=r[d>>>24]^i[f>>>16&255]^a[l>>>8&255]^o[255&c]^n[p++],A=r[f>>>24]^i[l>>>16&255]^a[c>>>8&255]^o[255&d]^n[p++];l=m,c=y,d=g,f=A}m=(s[l>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[p++],y=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^n[p++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&c])^n[p++],A=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=m,e[t+1]=y,e[t+2]=g,e[t+3]=A},keySize:8});e.AES=t._createHelper(m)}(),n.AES)}(_P)),WP(),HP||(HP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var u=r[i];r[i]=r[a],r[a]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),n.RC4)}(VP)),qP||(qP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=c,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=c,i[7]^=f,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^l}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)}(GP)),XP||(XP=1,function(e,t){var n;e.exports=(n=yO(),LO(),_O(),uP(),dP(),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;for(r[0]^=l,r[1]^=d,r[2]^=c,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=c,r[7]^=f,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^l}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)}(ZP)),QP(),n)}(xO);var JP=xO.exports,$P=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wO,"__esModule",{value:!0}),wO.Base=void 0;const eR=fn,tR=$P(JP);let nR=class e{print(){e.print(this)}bufferIndexOf(e,t,n=!1){if(n)return this.binarySearch(e,t,eR.Buffer.compare);return this.linearSearch(e,t,((e,t)=>e.equals(t)))}static binarySearch(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=n(e[a],t);if(0===o){for(let r=a-1;r>=0;r--)if(0!==n(e[r],t))return r+1;return 0}o<0?r=a+1:i=a-1}return-1}binarySearch(t,n,r){return e.binarySearch(t,n,r)}static linearSearch(e,t,n){for(let r=0;r<e.length;r++)if(n(e[r],t))return r;return-1}linearSearch(t,n,r){return e.linearSearch(t,n,r)}static bufferify(t){if(!eR.Buffer.isBuffer(t)){if("object"==typeof t&&t.words)return eR.Buffer.from(t.toString(tR.default.enc.Hex),"hex");if(e.isHexString(t))return eR.Buffer.from(t.replace(/^0x/,""),"hex");if("string"==typeof t)return eR.Buffer.from(t);if("bigint"==typeof t)return eR.Buffer.from(t.toString(16),"hex");if(t instanceof Uint8Array)return eR.Buffer.from(t.buffer);if("number"==typeof t){let e=t.toString();return e.length%2&&(e=`0${e}`),eR.Buffer.from(e,"hex")}if(ArrayBuffer.isView(t))return eR.Buffer.from(t.buffer,t.byteOffset,t.byteLength)}return t}bigNumberify(t){return e.bigNumberify(t)}static bigNumberify(t){if("bigint"==typeof t)return t;if("string"==typeof t)return t.startsWith("0x")&&e.isHexString(t)?BigInt("0x"+t.replace("0x","").toString()):BigInt(t);if(eR.Buffer.isBuffer(t))return BigInt("0x"+t.toString("hex"));if(t instanceof Uint8Array)return BigInt(t);if("number"==typeof t)return BigInt(t);throw new Error("cannot bigNumberify")}static isHexString(e){return"string"==typeof e&&/^(0x)?[0-9A-Fa-f]*$/.test(e)}static print(e){console.log(e.toString())}bufferToHex(t,n=!0){return e.bufferToHex(t,n)}static bufferToHex(e,t=!0){return`${t?"0x":""}${(e||eR.Buffer.alloc(0)).toString("hex")}`}bufferify(t){return e.bufferify(t)}bufferifyFn(e){return t=>{const n=e(t);return eR.Buffer.isBuffer(n)?n:this.isHexString(n)?eR.Buffer.from(n.replace("0x",""),"hex"):"string"==typeof n?eR.Buffer.from(n):"bigint"==typeof n?eR.Buffer.from(t.toString(16),"hex"):ArrayBuffer.isView(n)?eR.Buffer.from(n.buffer,n.byteOffset,n.byteLength):eR.Buffer.from(e(tR.default.enc.Hex.parse(t.toString("hex"))).toString(tR.default.enc.Hex),"hex")}}isHexString(t){return e.isHexString(t)}log2(e){return 1===e?0:1+this.log2(e/2|0)}zip(e,t){return e.map(((e,n)=>[e,t[n]]))}static hexZeroPad(e,t){return"0x"+e.replace("0x","").padStart(t,"0")}};wO.Base=nR,wO.default=nR;var rR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cO,"__esModule",{value:!0}),cO.MerkleTree=void 0;const iR=fn,aR=rR((function(e){for(var t=new Buffer(e.length),n=0,r=e.length-1;n<=r;++n,--r)t[n]=e[r],t[r]=e[n];return t})),oR=rR(gO),sR=rR(vO),uR=rR(wO);let lR=class e extends uR.default{constructor(e,t=oR.default,n={}){if(super(),this.duplicateOdd=!1,this.concatenator=iR.Buffer.concat,this.hashLeaves=!1,this.isBitcoinTree=!1,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sort=!1,this.fillDefaultHash=null,this.complete=!1,n.complete){if(n.isBitcoinTree)throw new Error('option "complete" is incompatible with "isBitcoinTree"');if(n.duplicateOdd)throw new Error('option "complete" is incompatible with "duplicateOdd"')}if(this.isBitcoinTree=!!n.isBitcoinTree,this.hashLeaves=!!n.hashLeaves,this.sortLeaves=!!n.sortLeaves,this.sortPairs=!!n.sortPairs,this.complete=!!n.complete,n.fillDefaultHash)if("function"==typeof n.fillDefaultHash)this.fillDefaultHash=n.fillDefaultHash;else{if(!iR.Buffer.isBuffer(n.fillDefaultHash)&&"string"!=typeof n.fillDefaultHash)throw new Error('method "fillDefaultHash" must be a function, Buffer, or string');this.fillDefaultHash=(e,t)=>n.fillDefaultHash}this.sort=!!n.sort,this.sort&&(this.sortLeaves=!0,this.sortPairs=!0),this.duplicateOdd=!!n.duplicateOdd,n.concatenator&&(this.concatenator=n.concatenator),this.hashFn=this.bufferifyFn(t),this.processLeaves(e)}getOptions(){var e,t;return{complete:this.complete,isBitcoinTree:this.isBitcoinTree,hashLeaves:this.hashLeaves,sortLeaves:this.sortLeaves,sortPairs:this.sortPairs,sort:this.sort,fillDefaultHash:null!==(t=null===(e=this.fillDefaultHash)||void 0===e?void 0:e.toString())&&void 0!==t?t:null,duplicateOdd:this.duplicateOdd}}processLeaves(e){if(this.hashLeaves&&(e=e.map(this.hashFn)),this.leaves=e.map(this.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(iR.Buffer.compare)),this.fillDefaultHash)for(let e=this.leaves.length;e<Math.pow(2,Math.ceil(Math.log2(this.leaves.length)));e++)this.leaves.push(this.bufferify(this.fillDefaultHash(e,this.hashFn)));this.createHashes(this.leaves)}createHashes(e){for(this.layers=[e];e.length>1;){const t=this.layers.length;this.layers.push([]);const n=this.complete&&1===t&&!Number.isInteger(Math.log2(e.length))?2*e.length-Math.pow(2,Math.ceil(Math.log2(e.length))):e.length;for(let r=0;r<e.length;r+=2){if(r>=n){this.layers[t].push(...e.slice(n));break}if(r+1===e.length&&e.length%2==1){const n=e[e.length-1];let i=n;if(this.isBitcoinTree){i=this.hashFn(this.concatenator([aR.default(n),aR.default(n)])),i=aR.default(this.hashFn(i)),this.layers[t].push(i);continue}if(!this.duplicateOdd){this.layers[t].push(e[r]);continue}}const i=e[r],a=r+1===e.length?i:e[r+1];let o=null;o=this.isBitcoinTree?[aR.default(i),aR.default(a)]:[i,a],this.sortPairs&&o.sort(iR.Buffer.compare);let s=this.hashFn(this.concatenator(o));this.isBitcoinTree&&(s=aR.default(this.hashFn(s))),this.layers[t].push(s)}e=this.layers[t]}}addLeaf(e,t=!1){t&&(e=this.hashFn(e)),this.processLeaves(this.leaves.concat(e))}addLeaves(e,t=!1){t&&(e=e.map(this.hashFn)),this.processLeaves(this.leaves.concat(e))}getLeaves(e){return Array.isArray(e)?(this.hashLeaves&&(e=e.map(this.hashFn),this.sortLeaves&&(e=e.sort(iR.Buffer.compare))),this.leaves.filter((t=>-1!==this.bufferIndexOf(e,t,this.sortLeaves)))):this.leaves}getLeaf(e){return e<0||e>this.leaves.length-1?iR.Buffer.from([]):this.leaves[e]}getLeafIndex(e){e=this.bufferify(e);const t=this.getLeaves();for(let n=0;n<t.length;n++){if(t[n].equals(e))return n}return-1}getLeafCount(){return this.leaves.length}getHexLeaves(){return this.leaves.map((e=>this.bufferToHex(e)))}static marshalLeaves(t){return JSON.stringify(t.map((t=>e.bufferToHex(t))),null,2)}static unmarshalLeaves(t){let n=null;if("string"==typeof t)n=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");n=t}if(!n)return[];if(!Array.isArray(n))throw new Error("Expected JSON string to be array");return n.map(e.bufferify)}getLayers(){return this.layers}getHexLayers(){return this.layers.reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(e)))):e.push(t),e)),[])}getLayersFlat(){const e=this.layers.reduce(((e,t)=>(Array.isArray(t)?e.unshift(...t):e.unshift(t),e)),[]);return e.unshift(iR.Buffer.from([0])),e}getHexLayersFlat(){return this.getLayersFlat().map((e=>this.bufferToHex(e)))}getLayerCount(){return this.getLayers().length}getRoot(){return 0===this.layers.length?iR.Buffer.from([]):this.layers[this.layers.length-1][0]||iR.Buffer.from([])}getHexRoot(){return this.bufferToHex(this.getRoot())}getProof(e,t){if(void 0===e)throw new Error("leaf is required");e=this.bufferify(e);const n=[];if(!Number.isInteger(t)){t=-1;for(let n=0;n<this.leaves.length;n++)0===iR.Buffer.compare(e,this.leaves[n])&&(t=n)}if(t<=-1)return[];for(let e=0;e<this.layers.length;e++){const r=this.layers[e],i=t%2,a=i?t-1:this.isBitcoinTree&&t===r.length-1&&e<this.layers.length-1?t:t+1;a<r.length&&n.push({position:i?"left":"right",data:r[a]}),t=t/2|0}return n}getHexProof(e,t){return this.getProof(e,t).map((e=>this.bufferToHex(e.data)))}getProofs(){const e=[];return this.getProofsDFS(this.layers.length-1,0,[],e),e}getProofsDFS(e,t,n,r){const i=t%2;if(-1===e)return void(i||r.push([...n].reverse()));if(t>=this.layers[e].length)return;const a=this.layers[e],o=i?t-1:t+1;let s=!1;o<a.length&&(s=!0,n.push({position:i?"left":"right",data:a[o]}));const u=2*t,l=2*t+1;this.getProofsDFS(e-1,u,n,r),this.getProofsDFS(e-1,l,n,r),s&&n.splice(n.length-1,1)}getHexProofs(){return this.getProofs().map((e=>this.bufferToHex(e.data)))}getPositionalHexProof(e,t){return this.getProof(e,t).map((e=>["left"===e.position?0:1,this.bufferToHex(e.data)]))}static marshalProof(t){const n=t.map((t=>"string"==typeof t?t:iR.Buffer.isBuffer(t)?e.bufferToHex(t):{position:t.position,data:e.bufferToHex(t.data)}));return JSON.stringify(n,null,2)}static unmarshalProof(t){let n=null;if("string"==typeof t)n=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");n=t}if(!n)return[];if(!Array.isArray(n))throw new Error("Expected JSON string to be array");return n.map((t=>{if("string"==typeof t)return e.bufferify(t);if(t instanceof Object)return{position:t.position,data:e.bufferify(t.data)};throw new Error("Expected item to be of type string or object")}))}static marshalTree(t){const n=t.getHexRoot(),r=t.leaves.map((t=>e.bufferToHex(t))),i=t.getHexLayers(),a=t.getOptions();return JSON.stringify({options:a,root:n,layers:i,leaves:r},null,2)}static unmarshalTree(t,n=oR.default,r={}){let i=null;if("string"==typeof t)i=JSON.parse(t);else{if(!(t instanceof Object))throw new Error("Expected type of string or object");i=t}if(!i)throw new Error("could not parse json");return r=Object.assign({},i.options||{},r),new e(i.leaves,n,r)}getProofIndices(e,t){const n=Math.pow(2,t);let r=new Set;for(const t of e){let e=n+t;for(;e>1;)r.add(1^e),e=e/2|0}const i=e.map((e=>n+e)),a=Array.from(r).sort(((e,t)=>e-t)).reverse();r=i.concat(a);const o=new Set,s=[];for(let e of r)if(!o.has(e))for(s.push(e);e>1&&(o.add(e),o.has(1^e));)e=e/2|0;return s.filter((t=>!e.includes(t-n)))}getProofIndicesForUnevenTree(e,t){const n=Math.ceil(Math.log2(t)),r=[];for(let e=0;e<n;e++){t%2!=0&&r.push({index:e,leavesCount:t}),t=Math.ceil(t/2)}const i=[];let a=e;for(let e=0;e<n;e++){const t=a.map((e=>e%2==0?e+1:e-1));let n=t.filter((e=>!a.includes(e)));const o=r.find((({index:t})=>t===e));o&&a.includes(o.leavesCount-1)&&(n=n.slice(0,-1)),i.push(n),a=[...new Set(a.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))]}return i}getMultiProof(e,t){this.complete||console.warn("Warning: For correct multiProofs it's strongly recommended to set complete: true"),t||(t=e,e=this.getLayersFlat());if(this.isUnevenTree()&&t.every(Number.isInteger))return this.getMultiProofForUnevenTree(t);if(!t.every(Number.isInteger)){let e=t;this.sortPairs&&(e=e.sort(iR.Buffer.compare));let n=e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1));if(!n.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const r=[],i=[];let a=[];for(let e=0;e<this.layers.length;e++){const t=this.layers[e];for(let e=0;e<n.length;e++){const o=n[e],s=this.getPairNode(t,o);r.push(t[o]),s&&i.push(s),a.push(o/2|0)}n=a.filter(((e,t,n)=>n.indexOf(e)===t)),a=[]}return i.filter((e=>!r.includes(e)))}return this.getProofIndices(t,Math.log2(e.length/2|0)).map((t=>e[t]))}getMultiProofForUnevenTree(e,t){t||(t=e,e=this.getLayers());let n=[],r=t;for(const t of e){const e=[];for(const n of r){if(n%2==0){const i=n+1;if(!r.includes(i)&&t[i]){e.push(t[i]);continue}}const i=n-1;r.includes(i)||!t[i]||e.push(t[i])}n=n.concat(e);const i=new Set;for(const e of r)e%2!=0?e%2!=0?i.add((e-1)/2):i.add((e+1)/2):i.add(e/2);r=Array.from(i)}return n}getHexMultiProof(e,t){return this.getMultiProof(e,t).map((e=>this.bufferToHex(e)))}getProofFlags(e,t){if(!Array.isArray(e)||e.length<=0)throw new Error("Invalid Inputs!");let n;if(n=e.every(Number.isInteger)?[...e].sort(((e,t)=>e===t?0:e>t?1:-1)):e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1)),!n.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const r=t.map((e=>this.bufferify(e))),i=[],a=[];for(let e=0;e<this.layers.length;e++){const t=this.layers[e];n=n.reduce(((e,n)=>{if(!i.includes(t[n])){const e=this.getPairNode(t,n),o=r.includes(t[n])||r.includes(e);e&&a.push(!o),i.push(t[n]),i.push(e)}return e.push(n/2|0),e}),[])}return a}verify(e,t,n){let r=this.bufferify(t);if(n=this.bufferify(n),!Array.isArray(e)||!t||!n)return!1;for(let t=0;t<e.length;t++){const n=e[t];let i=null,a=null;if("string"==typeof n)i=this.bufferify(n),a=!0;else if(Array.isArray(n))a=0===n[0],i=this.bufferify(n[1]);else if(iR.Buffer.isBuffer(n))i=n,a=!0;else{if(!(n instanceof Object))throw new Error("Expected node to be of type string or object");i=this.bufferify(n.data),a="left"===n.position}const o=[];this.isBitcoinTree?(o.push(aR.default(r)),o[a?"unshift":"push"](aR.default(i)),r=this.hashFn(this.concatenator(o)),r=aR.default(this.hashFn(r))):this.sortPairs?-1===iR.Buffer.compare(r,i)?(o.push(r,i),r=this.hashFn(this.concatenator(o))):(o.push(i,r),r=this.hashFn(this.concatenator(o))):(o.push(r),o[a?"unshift":"push"](i),r=this.hashFn(this.concatenator(o)))}return 0===iR.Buffer.compare(r,n)}verifyMultiProof(e,t,n,r,i){if(this.isUnevenTree())return this.verifyMultiProofForUnevenTree(e,t,n,r,i);const a=Math.ceil(Math.log2(r));e=this.bufferify(e),n=n.map((e=>this.bufferify(e))),i=i.map((e=>this.bufferify(e)));const o={};for(const[e,r]of this.zip(t,n))o[Math.pow(2,a)+e]=r;for(const[e,n]of this.zip(this.getProofIndices(t,a),i))o[e]=n;let s=Object.keys(o).map((e=>+e)).sort(((e,t)=>e-t));s=s.slice(0,s.length-1);let u=0;for(;u<s.length;){const e=s[u];if(e>=2&&{}.hasOwnProperty.call(o,1^e)){let t=[o[e-e%2],o[e-e%2+1]];this.sortPairs&&(t=t.sort(iR.Buffer.compare));const n=t[1]?this.hashFn(this.concatenator(t)):t[0];o[e/2|0]=n,s.push(e/2|0)}u+=1}return!t.length||{}.hasOwnProperty.call(o,1)&&o[1].equals(e)}verifyMultiProofWithFlags(e,t,n,r){e=this.bufferify(e),t=t.map(this.bufferify),n=n.map(this.bufferify);const i=t.length,a=r.length,o=[];let s=0,u=0,l=0;for(let e=0;e<a;e++){const a=[r[e]?s<i?t[s++]:o[u++]:n[l++],s<i?t[s++]:o[u++]].sort(iR.Buffer.compare);o[e]=this.hashFn(this.concatenator(a))}return 0===iR.Buffer.compare(o[a-1],e)}verifyMultiProofForUnevenTree(e,t,n,r,i){e=this.bufferify(e),n=n.map((e=>this.bufferify(e))),i=i.map((e=>this.bufferify(e)));const a=this.calculateRootForUnevenTree(t,n,r,i);return e.equals(a)}getDepth(){return this.getLayers().length-1}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(e,!1))))),t=[];for(let n=0;n<e.length;n++){const r=[];for(let i=0;i<e[n].length;i++){const a={[e[n][i]]:null};if(t.length){a[e[n][i]]={};const r=t.shift(),o=Object.keys(r)[0];if(a[e[n][i]][o]=r[o],t.length){const r=t.shift(),o=Object.keys(r)[0];a[e[n][i]][o]=r[o]}}r.push(a)}t.push(...r)}return t[0]}static verify(t,n,r,i=oR.default,a={}){return new e([],i,a).verify(t,n,r)}static getMultiProof(t,n){return new e([]).getMultiProof(t,n)}resetTree(){this.leaves=[],this.layers=[]}getPairNode(e,t){const n=t%2==0?t+1:t-1;return n<e.length?e[n]:null}toTreeString(){const e=this.getLayersAsObject();return sR.default.asTree(e,!0)}toString(){return this.toTreeString()}isUnevenTree(e){const t=(null==e?void 0:e.length)||this.getDepth();return!this.isPowOf2(t)}isPowOf2(e){return e&&!(e&e-1)}calculateRootForUnevenTree(e,t,n,r){const i=this.zip(e,t).sort((([e],[t])=>e-t)),a=i.map((([e])=>e)),o=this.getProofIndicesForUnevenTree(a,n);let s=0;const u=[];for(let e=0;e<o.length;e++){const t=o[e],n=s;s+=t.length,u[e]=this.zip(t,r.slice(n,s))}const l=[i];for(let e=0;e<u.length;e++){const t=u[e].concat(l[e]).sort((([e],[t])=>e-t)).map((([,e])=>e)),n=l[e].map((([e])=>e)),r=[...new Set(n.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))],i=[];for(let e=0;e<r.length;e++){const n=r[e],a=t[2*e],o=t[2*e+1],s=o?this.hashFn(this.concatenator([a,o])):a;i.push([n,s])}l.push(i)}return l[l.length-1][0][1]}};cO.MerkleTree=lR,"undefined"!=typeof window&&(window.MerkleTree=lR),cO.default=lR;var cR={},dR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cR,"__esModule",{value:!0}),cR.MerkleMountainRange=void 0;const fR=fn,pR=dR(gO),hR=dR(wO);class mR extends hR.default{constructor(e=pR.default,t=[],n,r,i){super(),this.root=fR.Buffer.alloc(0),this.size=0,this.width=0,this.hashes={},this.data={},t=t.map(this.bufferify),this.hashFn=this.bufferifyFn(e),this.hashLeafFn=n,this.peakBaggingFn=r,this.hashBranchFn=i;for(const e of t)this.append(e)}append(e){e=this.bufferify(e);const t=this.hashFn(e),n=this.bufferToHex(t);this.data[n]&&this.bufferToHex(this.hashFn(this.data[n]))===n||(this.data[n]=e);const r=this.hashLeaf(this.size+1,t);this.hashes[this.size+1]=r,this.width+=1;const i=this.getPeakIndexes(this.width);this.size=this.getSize(this.width);const a=[];for(let e=0;e<i.length;e++)a[e]=this._getOrCreateNode(i[e]);this.root=this.peakBagging(this.width,a)}hashLeaf(e,t){return t=this.bufferify(t),this.hashLeafFn?this.bufferify(this.hashLeafFn(e,t)):this.hashFn(fR.Buffer.concat([this.bufferify(e),t]))}hashBranch(e,t,n){return this.hashBranchFn?this.bufferify(this.hashBranchFn(e,t,n)):this.hashFn(fR.Buffer.concat([this.bufferify(e),this.bufferify(t),this.bufferify(n)]))}getPeaks(){const e=this.getPeakIndexes(this.width),t=[];for(let n=0;n<e.length;n++)t[n]=this.hashes[e[n]];return t}getLeafIndex(e){return e%2==1?this.getSize(e):this.getSize(e-1)+1}getPeakIndexes(e){const t=this.numOfPeaks(e),n=[];let r=0,i=0;for(let a=255;a>0&&!(0!=(e&1<<a-1)&&(i=i+(1<<a)-1,n[r++]=i,n.length>=t));a--);if(r!==n.length)throw new Error("invalid bit calculation");return n}numOfPeaks(e){let t=e,n=0;for(;t>0;)t%2==1&&n++,t>>=1;return n}peakBagging(e,t){const n=this.getSize(e);if(this.numOfPeaks(e)!==t.length)throw new Error("received invalid number of peaks");return 0!==e||t.length?this.peakBaggingFn?this.bufferify(this.peakBaggingFn(n,t)):this.hashFn(fR.Buffer.concat([this.bufferify(n),...t.map(this.bufferify)])):fR.Buffer.alloc(0)}getSize(e){return(e<<1)-this.numOfPeaks(e)}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.getRoot())}getNode(e){return this.hashes[e]}mountainHeight(e){let t=1;for(;1<<t<=e+t;)t++;return t-1}heightAt(e){let t=e,n=0,r=0;for(;t>n;)t-=(1<<r)-1,r=this.mountainHeight(t),n=(1<<r)-1;return r-(n-t)}isLeaf(e){return 1===this.heightAt(e)}getChildren(e){const t=e-(1<<this.heightAt(e)-1),n=e-1;if(t===n)throw new Error("not a parent");return[t,n]}getMerkleProof(e){if(e>this.size)throw new Error("out of range");if(!this.isLeaf(e))throw new Error("not a leaf");const t=this.root,n=this.width,r=this.getPeakIndexes(this.width),i=[];let a=0;for(let t=0;t<r.length;t++)i[t]=this.hashes[r[t]],r[t]>=e&&0===a&&(a=r[t]);let o=0,s=0,u=this.heightAt(a);const l=[];for(;a!==e;)u--,[o,s]=this.getChildren(a),a=e<=o?o:s,l[u-1]=this.hashes[e<=o?s:o];return{root:t,width:n,peakBagging:i,siblings:l}}verify(e,t,n,r,i,a){r=this.bufferify(r);if(this.getSize(t)<n)throw new Error("index is out of range");if(!e.equals(this.peakBagging(t,i)))throw new Error("invalid root hash from the peaks");let o,s=0;const u=this.getPeakIndexes(t);for(let e=0;e<u.length;e++)if(u[e]>=n){o=i[e],s=u[e];break}if(!o)throw new Error("target not found");let l=a.length+1;const c=new Array(l);let d,f=0,p=0;for(;l>0&&(c[--l]=s,s!==n);)[f,p]=this.getChildren(s),s=n>f?p:f;for(;l<c.length;)s=c[l],d=0===l?this.hashLeaf(s,this.hashFn(r)):s-1===c[l-1]?this.hashBranch(s,a[l-1],d):this.hashBranch(s,d,a[l-1]),l++;if(!d.equals(o))throw new Error("hashed peak is invalid");return!0}peaksToPeakMap(e,t){const n={};let r=0,i=0,a=t.length;for(let o=1;o<=32;o++)r=32-o,i=1<<o-1,n[r]=0!=(e&i)?t[--a]:0;if(0!==a)throw new Error("invalid number of peaks");return n}peakMapToPeaks(e,t){const n=this.numOfPeaks(e),r=new Array(n);let i=0;for(let e=0;e<32;e++)0!==t[e]&&(r[i++]=t[e]);if(i!==n)throw new Error("invalid number of peaks");return r}peakUpdate(e,t,n){const r={},i=e+1;let a=this.getLeafIndex(i),o=this.hashLeaf(a,n),s=0,u=0,l=!1,c=!1,d=!1;for(let n=1;n<=32;n++)s=32-n,d?r[s]=t[s]:(u=1<<n-1,l=0!=(e&u),c=0!=(i&u),a++,l&&(o=this.hashBranch(a,t[s],o)),c?(r[s]=l?t[s]:o,d=!0):r[s]=0);return r}rollUp(e,t,n,r){if(!e.equals(this.peakBagging(t,n)))throw new Error("invalid root hash from the peaks");let i=t,a=this.peaksToPeakMap(t,n);for(let e=0;e<r.length;e++)a=this.peakUpdate(i,a,r[e]),i++;return this.peakBagging(i,this.peakMapToPeaks(i,a))}_getOrCreateNode(e){if(e>this.size)throw new Error("out of range");if(!this.hashes[e]){const[t,n]=this.getChildren(e),r=this._getOrCreateNode(t),i=this._getOrCreateNode(n);this.hashes[e]=this.hashBranch(e,r,i)}return this.hashes[e]}}cR.MerkleMountainRange=mR,"undefined"!=typeof window&&(window.MerkleMountainRange=mR),cR.default=mR;var yR={},gR=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yR,"__esModule",{value:!0}),yR.IncrementalMerkleTree=void 0;const AR=gR(wO),bR=gR(vO);class vR extends AR.default{constructor(e,t){if(super(),this.hashFn=e,t.depth&&(this.depth=t.depth),t.arity&&(this.arity=t.arity),this.depth<1)throw new Error("depth must be greater than 0");if(this.arity<1)throw new Error("arity must be greater than 0");const n=[];let r=t.zeroValue;if(this.zeroValue=r,this.zeroes=[],this.depth)for(let e=0;e<this.depth;e++)this.zeroes.push(r),n[e]=[],r=this.hashFn(Array(this.arity).fill(r));this.nodes=n,this.root=r}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.bufferify(this.getRoot()))}insert(e){if(this.depth&&this.arity&&this.nodes[0].length>=this.getMaxLeaves())throw new Error("tree is full");let t=e,n=this.nodes[0].length;for(let e=0;e<this.depth;e+=1){const r=n-n%this.arity,i=r+this.arity,a=[];this.nodes[e][n]=t;for(let t=r;t<i;t+=1)t<this.nodes[e].length?a.push(this.nodes[e][t]):a.push(this.zeroes[e]);t=this.hashFn(a),n=Math.floor(n/this.arity)}this.root=t}delete(e){this.update(e,this.zeroValue)}update(e,t){if(e<0||e>=this.nodes[0].length)throw new Error("out of bounds");let n=t;for(let t=0;t<this.depth;t+=1){const r=e-e%this.arity,i=r+this.arity,a=[];this.nodes[t][e]=n;for(let e=r;e<i;e+=1)e<this.nodes[t].length?a.push(this.nodes[t][e]):a.push(this.zeroes[t]);n=this.hashFn(a),e=Math.floor(e/this.arity)}this.root=n}getDepth(){return this.depth}getArity(){return this.arity}getMaxLeaves(){return Math.pow(this.depth,this.arity)}indexOf(e){return this.nodes[0].indexOf(e)}getLeaves(){const e=this.copyList(this.nodes[0]);for(let t=this.nodes[0].length;t<this.getMaxLeaves();t++)e[t]=this.zeroValue;return e}copyList(e){return e.map((e=>BigInt(e)))}getLayers(){const e=[];for(const t of this.nodes)e.push(this.copyList(t));if(e[0].length<this.getMaxLeaves()){let t=e[0].length;for(let n=t;n<this.getMaxLeaves();n++)e[0][n]=this.zeroValue;for(let n=0;n<this.depth;n++){const r=t-t%this.arity,i=r+this.arity;for(let t=r;t<i;t++)t>=e[n].length&&(e[n][t]=this.zeroes[n]);t=Math.floor(t/this.arity)}}return e.push([this.root]),e}getHexLayers(){return this.getLayers().reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(this.bufferify(e))))):e.push(t),e)),[])}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(this.bufferify(e),!1))))),t=[];for(let n=0;n<e.length;n++){const r=[];for(let i=0;i<e[n].length;i++){const a={[e[n][i]]:null};if(t.length){a[e[n][i]]={};const r=t.shift(),o=Object.keys(r)[0];if(a[e[n][i]][o]=r[o],t.length){const r=t.shift(),o=Object.keys(r)[0];a[e[n][i]][o]=r[o]}}r.push(a)}t.push(...r)}return t[0]}computeRoot(){let e,t=this.nodes[0].length;for(let n=0;n<this.depth;n+=1){const r=t-t%this.arity,i=r+this.arity,a=[];for(let e=r;e<i;e+=1)e<this.nodes[n].length?a.push(this.nodes[n][e]):a.push(this.zeroes[n]);e=this.hashFn(a),t=Math.floor(t/this.arity)}return e}getProof(e){if(e<0||e>=this.nodes[0].length)throw new Error("The leaf does not exist in this tree");const t=[],n=[],r=e;for(let r=0;r<this.depth;r+=1){const i=e%this.arity,a=e-i,o=a+this.arity;n[r]=i,t[r]=[];for(let n=a;n<o;n+=1)n!==e&&(n<this.nodes[r].length?t[r].push(this.nodes[r][n]):t[r].push(this.zeroes[r]));e=Math.floor(e/this.arity)}return{root:this.root,leaf:this.nodes[0][r],pathIndices:n,siblings:t}}verify(e){let t=e.leaf;for(let n=0;n<e.siblings.length;n+=1){const r=e.siblings[n].slice();r.splice(e.pathIndices[n],0,t),t=this.hashFn(r)}return e.root===t}toString(){return this.toTreeString()}toTreeString(){const e=this.getLayersAsObject();return bR.default.asTree(e,!0)}}yR.IncrementalMerkleTree=vR,"undefined"!=typeof window&&(window.IncrementalMerkleTree=vR),yR.default=vR;var wR={};Object.defineProperty(wR,"__esModule",{value:!0}),wR.MerkleSumTree=wR.ProofStep=wR.Leaf=wR.Bucket=void 0;const xR=wO;class ER{constructor(e,t){this.size=BigInt(e),this.hashed=t,this.parent=null,this.left=null,this.right=null}}wR.Bucket=ER;wR.Leaf=class{constructor(e,t,n){this.hashFn=e,this.rng=t.map((e=>BigInt(e))),this.data=n}getBucket(){let e;return e=this.data?this.hashFn(this.data):Buffer.alloc(32),new ER(BigInt(this.rng[1])-BigInt(this.rng[0]),e)}};class TR{constructor(e,t){this.bucket=e,this.right=t}}wR.ProofStep=TR;class CR extends xR.Base{constructor(e,t){super(),this.leaves=e,this.hashFn=t,CR.checkConsecutive(e),this.buckets=[];for(const t of e)this.buckets.push(t.getBucket());let n=[];for(const e of this.buckets)n.push(e);for(;1!==n.length;){const e=[];for(;n.length;)if(n.length>=2){const t=n.shift(),r=n.shift(),i=t.size+r.size,a=this.hashFn(Buffer.concat([this.sizeToBuffer(t.size),this.bufferify(t.hashed),this.sizeToBuffer(r.size),this.bufferify(r.hashed)])),o=new ER(i,a);r.parent=o,t.parent=r.parent,t.right=r,r.left=t,e.push(o)}else e.push(n.shift());n=e}this.root=n[0]}sizeToBuffer(e){const t=Buffer.alloc(8);return new DataView(t.buffer).setBigInt64(0,BigInt(e),!1),t}static checkConsecutive(e){let t=BigInt(0);for(const n of e){if(n.rng[0]!==t)throw new Error("leaf ranges are invalid");t=BigInt(n.rng[1])}}getProof(e){let t=this.buckets[Number(e)];const n=[];for(;t&&t.parent;){const e=!!t.right,r=t.right?t.right:t.left;t=t.parent,n.push(new TR(r,e))}return n}sum(e){let t=BigInt(0);for(const n of e)t+=BigInt(n);return t}verifyProof(e,t,n){const r=[this.sum(n.filter((e=>!e.right)).map((e=>e.bucket.size))),BigInt(e.size)-this.sum(n.filter((e=>e.right)).map((e=>e.bucket.size)))];if(r[0]!==t.rng[0]||r[1]!==t.rng[1])return!1;let i,a=t.getBucket();for(const e of n)i=e.right?this.hashFn(Buffer.concat([this.sizeToBuffer(a.size),this.bufferify(a.hashed),this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed)])):this.hashFn(Buffer.concat([this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed),this.sizeToBuffer(a.size),this.bufferify(a.hashed)])),a=new ER(BigInt(a.size)+BigInt(e.bucket.size),i);return a.size===e.size&&a.hashed.toString("hex")===e.hashed.toString("hex")}}wR.MerkleSumTree=CR,"undefined"!=typeof window&&(window.MerkleSumTree=CR),wR.default=CR,function(e){var t=ot&&ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleTree=void 0;const n=t(cO);e.MerkleTree=n.default;var r=cR;Object.defineProperty(e,"MerkleMountainRange",{enumerable:!0,get:function(){return r.MerkleMountainRange}});var i=yR;Object.defineProperty(e,"IncrementalMerkleTree",{enumerable:!0,get:function(){return i.IncrementalMerkleTree}});var a=wR;Object.defineProperty(e,"MerkleSumTree",{enumerable:!0,get:function(){return a.MerkleSumTree}}),e.default=n.default}(lO);var IR={};Object.defineProperty(IR,"__esModule",{value:!0}),IR.DefaultGetter=void 0;const SR=ck,kR=new bk.Logger("defaults"),OR={integer:0,address:(0,SR.hexZeroPad)("0x",20),bool:!1,bytes:"0x",string:""},PR=e=>void 0!==e&&(null!=e&&(["string","number"].includes(typeof e)&&BigInt(e)===BigInt(0)||Array.isArray(e)&&e.every(PR)||"object"==typeof e&&Object.values(e).every(PR)||"boolean"==typeof e&&!1===e));class RR{constructor(e){this.types=e,this.defaultValues={};for(const t in e){const e=this.getDefaultValue(t);this.defaultValues[t]=e,PR(e)||kR.throwError(`Got non-empty value for type ${t} in default generator: ${e}`)}}static from(e,t){const{defaultValues:n}=new RR(e);return t?n[t]:n}getDefaultValue(e){if(this.defaultValues[e])return this.defaultValues[e];const t=function(e){var t;const[,n]=null!==(t=e.match(/^bytes(\d+)$/))&&void 0!==t?t:[];return n?(0,SR.hexZeroPad)("0x",parseInt(n)):(e.match(/^(u?)int(\d*)$/)&&(e="integer"),OR[e])}(e);if(void 0!==t)return t;const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],t=parseInt(n[3]);if(t>0){const n=this.getDefaultValue(e);return Array(t).fill(n)}return[]}const r=this.types[e];return r?r.reduce(((e,{name:t,type:n})=>Object.assign(Object.assign({},e),{[t]:this.getDefaultValue(n)})),{}):kR.throwArgumentError(`unknown type: ${e}`,"type",e)}}IR.DefaultGetter=RR;var NR={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNextLayer=e.getRoot=e.fillArray=e.hashConcat=e.bufferKeccak=e.hexToBuffer=e.bufferToHex=e.chunk=e.makeArray=void 0;const t=ck;e.makeArray=(e,t)=>Array(e).fill(0).map(((e,n)=>t(n)));e.chunk=(t,n)=>(0,e.makeArray)(Math.ceil(t.length/n),(e=>t.slice(e*n,(e+1)*n)));e.bufferToHex=e=>(0,t.hexlify)(e);e.hexToBuffer=e=>Buffer.from(e.slice(2),"hex");e.bufferKeccak=n=>(0,e.hexToBuffer)((0,t.keccak256)(n));e.hashConcat=n=>(0,e.bufferKeccak)((0,t.hexConcat)(n));e.fillArray=(e,t,n)=>(t>e.length&&e.push(...Array(t-e.length).fill(n)),e);e.getRoot=(t,n=!0)=>{if(0===t.length)throw new Error("empty tree");const r=t.map((t=>{const r=Buffer.isBuffer(t)?t:(0,e.hexToBuffer)(t);return n?(0,e.bufferKeccak)(r):r})),i=[r];for(;i[i.length-1].length>1;)i.push((0,e.getNextLayer)(i[i.length-1]));return i[i.length-1][0]};e.getNextLayer=t=>(0,e.chunk)(t,2).map(e.hashConcat)}(NR),Object.defineProperty(uO,"__esModule",{value:!0}),uO.Eip712MerkleTree=void 0;const LR=mk,MR=ck,DR=lO,FR=IR,jR=NR;uO.Eip712MerkleTree=class{get completedSize(){return Math.pow(2,this.depth)}getCompleteElements(){const e=this.elements;return(0,jR.fillArray)([...e],this.completedSize,this.defaultNode)}getCompleteLeaves(){const e=this.elements.map(this.leafHasher);return(0,jR.fillArray)([...e],this.completedSize,this.defaultLeaf)}get root(){return this.tree.getHexRoot()}getProof(e){const t=this.getCompleteLeaves()[e];return{leaf:t,proof:this.tree.getHexProof(t,e),root:this.tree.getHexRoot()}}getEncodedProofAndSignature(e,t){const{proof:n}=this.getProof(e);return((e,t,n=`0x${"ff".repeat(64)}`)=>(0,MR.hexConcat)([n,`0x${e.toString(16).padStart(6,"0")}`,MR.defaultAbiCoder.encode([`uint256[${t.length}]`],[t])]))(e,n,t)}getDataToSign(){let e=this.getCompleteElements();for(;e.length>2;)e=(0,jR.chunk)(e,2);return e}add(e){this.elements.push(e)}getBulkOrderHash(){const e=this.encoder.hashStruct("BulkOrder",{tree:this.getDataToSign()}),t=this.getCompleteLeaves().map(jR.hexToBuffer),n=(0,jR.bufferToHex)((0,jR.getRoot)(t,!1)),r=(0,MR.keccak256)((0,MR.toUtf8Bytes)(this.encoder._types.BulkOrder));if((0,MR.keccak256)((0,MR.hexConcat)([r,n]))!==e)throw new Error("expected derived bulk order hash to match");return e}constructor(e,t,n,r,i){this.types=e,this.rootType=t,this.leafType=n,this.elements=r,this.depth=i;const a=LR._TypedDataEncoder.from(e);var o,s;this.encoder=a,this.leafHasher=e=>a.hashStruct(n,e),this.defaultNode=FR.DefaultGetter.from(e,n),this.defaultLeaf=this.leafHasher(this.defaultNode),this.tree=(o=this.getCompleteLeaves(),s=this.defaultLeaf,new DR.MerkleTree(o.map(jR.hexToBuffer),jR.bufferKeccak,{complete:!0,sort:!1,hashLeaves:!1,fillDefaultHash:(0,jR.hexToBuffer)(s)}))}},Object.defineProperty(sO,"__esModule",{value:!0}),sO.getBulkOrderTypeHashes=sO.getBulkOrderTypeHash=sO.getBulkOrderTree=sO.getBulkOrderTreeHeight=void 0;const BR=ck,_R=uO,zR=IR,UR=NR,WR=Nk;function HR(e){const t=Object.assign({},WR.EIP_712_BULK_ORDER_TYPE);return t.BulkOrder=[{name:"tree",type:`OrderComponents${"[2]".repeat(e)}`}],t}function VR(e){return Math.max(Math.ceil(Math.log2(e)),1)}function qR(e){const t=HR(e),n=BR._TypedDataEncoder.from(t),r=(0,BR.toUtf8Bytes)(n._types.BulkOrder);return(0,BR.keccak256)(r)}sO.getBulkOrderTreeHeight=VR,sO.getBulkOrderTree=function(e,t=0,n=VR(e.length+t)){const r=HR(n),i=zR.DefaultGetter.from(r,"OrderComponents");let a=[...e];return t>0&&(a=[...(0,UR.fillArray)([],t,i),...e]),new _R.Eip712MerkleTree(r,"BulkOrder","OrderComponents",a,n)},sO.getBulkOrderTypeHash=qR,sO.getBulkOrderTypeHashes=function(e){const t=[];for(let n=0;n<e;n++)t.push(qR(n+1));return t};var GR={},XR={},ZR={};Object.defineProperty(ZR,"__esModule",{value:!0}),ZR.MerkleTree=void 0;const YR=lk,KR=ck,QR=lO,JR=e=>(0,KR.keccak256)(Buffer.from(YR.BigNumber.from(e).toHexString().slice(2).padStart(64,"0"),"hex"));ZR.MerkleTree=class{constructor(e){this.tree=new QR.default(e.map(JR),KR.keccak256,{sort:!0})}getProof(e){return this.tree.getHexProof(JR(e))}getRoot(){return this.tree.getRoot().toString("hex")?this.tree.getHexRoot():"0"}},Object.defineProperty(XR,"__esModule",{value:!0}),XR.shouldUseMatchForFulfill=XR.generateRandomSalt=XR.mapOrderAmountsFromUnitsToFill=XR.mapOrderAmountsFromFilledStatus=XR.totalItemsAmount=XR.areAllCurrenciesSame=XR.mapInputItemToOfferItem=XR.deductFees=XR.feeToConsiderationItem=void 0;const $R=lk,eN=ck,tN=Nk,nN=Wk(),rN=ZR,iN=(e,t)=>$R.BigNumber.from(e).mul($R.BigNumber.from(t)).div(tN.ONE_HUNDRED_PERCENT_BP);XR.feeToConsiderationItem=({fee:e,token:t,baseAmount:n,baseEndAmount:r=n})=>({itemType:t===$R.ethers.constants.AddressZero?tN.ItemType.NATIVE:tN.ItemType.ERC20,token:t,identifierOrCriteria:"0",startAmount:iN(n,e.basisPoints).toString(),endAmount:iN(r,e.basisPoints).toString(),recipient:e.recipient});XR.deductFees=(e,t)=>{if(!t)return e;const n=t.reduce(((e,t)=>e+t.basisPoints),0);return e.map((e=>Object.assign(Object.assign({},e),{startAmount:(0,nN.isCurrencyItem)(e)?$R.BigNumber.from(e.startAmount).sub(iN(e.startAmount,n)).toString():e.startAmount,endAmount:(0,nN.isCurrencyItem)(e)?$R.BigNumber.from(e.endAmount).sub(iN(e.endAmount,n)).toString():e.endAmount})))};XR.mapInputItemToOfferItem=e=>{var t,n,r,i,a,o,s,u;if("itemType"in e){if("identifiers"in e||"criteria"in e){const i="criteria"in e?e.criteria:new rN.MerkleTree(e.identifiers).getRoot();return{itemType:e.itemType===tN.ItemType.ERC721?tN.ItemType.ERC721_WITH_CRITERIA:tN.ItemType.ERC1155_WITH_CRITERIA,token:e.token,identifierOrCriteria:i,startAmount:null!==(t=e.amount)&&void 0!==t?t:"1",endAmount:null!==(r=null!==(n=e.endAmount)&&void 0!==n?n:e.amount)&&void 0!==r?r:"1"}}return"amount"in e||"endAmount"in e?{itemType:e.itemType,token:e.token,identifierOrCriteria:null!==(i=e.identifier)&&void 0!==i?i:"0",startAmount:e.amount,endAmount:null!==(o=null!==(a=e.endAmount)&&void 0!==a?a:e.amount)&&void 0!==o?o:"1"}:{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:"1",endAmount:"1"}}return{itemType:e.token&&e.token!==$R.ethers.constants.AddressZero?tN.ItemType.ERC20:tN.ItemType.NATIVE,token:null!==(s=e.token)&&void 0!==s?s:$R.ethers.constants.AddressZero,identifierOrCriteria:"0",startAmount:e.amount,endAmount:null!==(u=e.endAmount)&&void 0!==u?u:e.amount}};XR.areAllCurrenciesSame=({offer:e,consideration:t})=>{const n=[...e,...t].filter(nN.isCurrencyItem);return n.every((({itemType:e,token:t})=>e===n[0].itemType&&t.toLowerCase()===n[0].token.toLowerCase()))};XR.totalItemsAmount=e=>($R.BigNumber.from(0),$R.BigNumber.from(0),e.map((({startAmount:e,endAmount:t})=>({startAmount:e,endAmount:t}))).reduce((({startAmount:e,endAmount:t},{startAmount:n,endAmount:r})=>({startAmount:e.add(n),endAmount:t.add(r)})),{startAmount:$R.BigNumber.from(0),endAmount:$R.BigNumber.from(0)}));XR.mapOrderAmountsFromFilledStatus=(e,{totalFilled:t,totalSize:n})=>{if(t.eq(0)||n.eq(0))return e;const r=n.sub(t).mul(tN.ONE_HUNDRED_PERCENT_BP).div(n);return{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:iN(e.startAmount,r).toString(),endAmount:iN(e.endAmount,r).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:iN(e.startAmount,r).toString(),endAmount:iN(e.endAmount,r).toString()})))}),signature:e.signature}};const aN=(e,t,n)=>$R.BigNumber.from(e).mul($R.BigNumber.from(t)).div(n);XR.mapOrderAmountsFromUnitsToFill=(e,{unitsToFill:t,totalSize:n})=>{const r=$R.BigNumber.from(t);if(r.lte(0))throw new Error("Units to fill must be greater than 1");const i=(0,nN.getMaximumSizeForOrder)(e);return n.eq(0)&&(n=i),{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:aN(e.startAmount,r,n).toString(),endAmount:aN(e.endAmount,r,n).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:aN(e.startAmount,r,n).toString(),endAmount:aN(e.endAmount,r,n).toString()})))}),signature:e.signature}};XR.generateRandomSalt=e=>e?`0x${Buffer.from((0,eN.concat)([(0,eN.keccak256)((0,eN.toUtf8Bytes)(e)).slice(0,10),Uint8Array.from(Array(20).fill(0)),(0,eN.randomBytes)(8)])).toString("hex")}`:`0x${Buffer.from((0,eN.randomBytes)(8)).toString("hex").padStart(64,"0")}`;XR.shouldUseMatchForFulfill=()=>!0,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getAdvancedOrderNumeratorDenominator=e.generateFulfillOrdersFulfillments=e.fulfillAvailableOrders=e.validateAndSanitizeFromOrderStatus=e.fulfillStandardOrder=e.fulfillBasicOrder=e.shouldUseBasicFulfill=void 0;const t=lk,n=Nk,r=Lk,i=Qk,a=_k(),o=Uk,s=Wk(),u=XR,l=Hk;e.shouldUseBasicFulfill=({offer:e,consideration:r,offerer:i},a)=>{if(!a.eq(0))return!1;if(e.length>1||0===r.length)return!1;const o=[...e,...r],l=o.filter((({itemType:e})=>[n.ItemType.ERC721,n.ItemType.ERC1155].includes(e))),c=o.filter((({itemType:e})=>(0,s.isCriteriaItem)(e)));if((0,s.isNativeCurrencyItem)(e[0]))return!1;if(1!==l.length||0!==c.length)return!1;if(!(0,u.areAllCurrenciesSame)({offer:e,consideration:r}))return!1;if(o.some((({startAmount:e,endAmount:t})=>e!==t)))return!1;const[d,...f]=r;if(d.recipient.toLowerCase()!==i.toLowerCase())return!1;if(r.length>1&&f.every((t=>t.itemType===e[0].itemType))&&(0,u.totalItemsAmount)(f).endAmount.gt(e[0].endAmount))return!1;const p=o.filter(s.isCurrencyItem),h=p.filter((({itemType:e})=>e===n.ItemType.NATIVE)).every((({token:e})=>e===t.ethers.constants.AddressZero)),m=p.every((({identifierOrCriteria:e})=>t.BigNumber.from(e).eq(0))),y=l.filter((({itemType:e})=>e===n.ItemType.ERC721)).every((({endAmount:e})=>"1"===e));return h&&m&&y};const c={[n.ItemType.ERC20]:{[n.ItemType.ERC721]:n.BasicOrderRouteType.ERC721_TO_ERC20,[n.ItemType.ERC1155]:n.BasicOrderRouteType.ERC1155_TO_ERC20},[n.ItemType.ERC721]:{[n.ItemType.NATIVE]:n.BasicOrderRouteType.ETH_TO_ERC721,[n.ItemType.ERC20]:n.BasicOrderRouteType.ERC20_TO_ERC721},[n.ItemType.ERC1155]:{[n.ItemType.NATIVE]:n.BasicOrderRouteType.ETH_TO_ERC1155,[n.ItemType.ERC20]:n.BasicOrderRouteType.ERC20_TO_ERC1155}};function d(e,t){const{isValidated:n,isCancelled:r,totalFilled:i,totalSize:a}=t;if(a.gt(0)&&i.div(a).eq(1))throw new Error("The order you are trying to fulfill is already filled");if(r)throw new Error("The order you are trying to fulfill is cancelled");return n?{parameters:Object.assign({},e.parameters),signature:"0x"}:e}function f(e){const t=({sourceOrDestination:e,operator:t="",token:n,identifier:r})=>`${e}-${t}-${n}-${r}`,n={},r={};return e.forEach((({order:e,offererOperator:r,offerCriteria:i},o)=>{const u=(0,a.getItemToCriteriaMap)(e.parameters.offer,i);return e.parameters.offer.forEach(((i,a)=>{var l,c,d;const f=`${t({sourceOrDestination:e.parameters.offerer,operator:r,token:i.token,identifier:null!==(c=null===(l=u.get(i))||void 0===l?void 0:l.identifier)&&void 0!==c?c:i.identifierOrCriteria})}${(0,s.isErc721Item)(i.itemType)?a:""}`;n[f]=[...null!==(d=n[f])&&void 0!==d?d:[],{orderIndex:o,itemIndex:a}]}))})),e.forEach((({order:e,considerationCriteria:n,tips:i},o)=>{const u=(0,a.getItemToCriteriaMap)(e.parameters.consideration,n);return[...e.parameters.consideration,...i].forEach(((e,n)=>{var i,a,l;const c=`${t({sourceOrDestination:e.recipient,token:e.token,identifier:null!==(a=null===(i=u.get(e))||void 0===i?void 0:i.identifier)&&void 0!==a?a:e.identifierOrCriteria})}${(0,s.isErc721Item)(e.itemType)?n:""}`;r[c]=[...null!==(l=r[c])&&void 0!==l?l:[],{orderIndex:o,itemIndex:n}]}))})),{offerFulfillments:Object.values(n),considerationFulfillments:Object.values(r)}}e.fulfillBasicOrder=function({order:e,seaportContract:a,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:u,timeBasedItemParams:d,offererOperator:f,fulfillerOperator:p,signer:h,tips:m=[],conduitKey:y=n.NO_CONDUIT,domain:g},A){var b,v;const{offer:w,consideration:x}=e.parameters,E=[...x,...m],T=w[0],[C,...I]=E,S=null===(b=c[T.itemType])||void 0===b?void 0:b[C.itemType];if(void 0===S)throw new Error("Order parameters did not result in a valid basic fulfillment");const k=I.map((({startAmount:e,recipient:t})=>({amount:e,recipient:t}))),O=E.filter((e=>e.itemType!==w[0].itemType)),P=null===(v=(0,s.getSummedTokenAndIdentifierAmounts)({items:O,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},d),{isConsiderationItem:!0})})[t.ethers.constants.AddressZero])||void 0===v?void 0:v[0],R=(0,i.validateBasicFulfillBalancesAndApprovals)({offer:w,consideration:E,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:u,timeBasedItemParams:d,offererOperator:f,fulfillerOperator:p}),N={offerer:e.parameters.offerer,offererConduitKey:e.parameters.conduitKey,zone:e.parameters.zone,basicOrderType:e.parameters.orderType+4*S,offerToken:T.token,offerIdentifier:T.identifierOrCriteria,offerAmount:T.endAmount,considerationToken:C.token,considerationIdentifier:C.identifierOrCriteria,considerationAmount:C.endAmount,startTime:e.parameters.startTime,endTime:e.parameters.endTime,salt:e.parameters.salt,totalOriginalAdditionalRecipients:e.parameters.consideration.length-1,signature:e.signature,fulfillerConduitKey:y,additionalRecipients:k,zoneHash:e.parameters.zoneHash},L={value:P},M=[...(0,r.getApprovalActions)(R,A,h),{type:"exchange",transactionMethods:(0,l.getTransactionMethods)(a.connect(h),"fulfillBasicOrder",[N,L],g)}];return{actions:M,executeAllActions:()=>(0,l.executeAllActions)(M)}},e.fulfillStandardOrder=function({order:n,unitsToFill:o=0,totalSize:c,totalFilled:d,offerCriteria:f,considerationCriteria:p,tips:h=[],extraData:m,seaportContract:y,offererBalancesAndApprovals:g,fulfillerBalancesAndApprovals:A,offererOperator:b,fulfillerOperator:v,timeBasedItemParams:w,conduitKey:x,recipientAddress:E,signer:T,domain:C},I){var S;const k=o?(0,u.mapOrderAmountsFromUnitsToFill)(n,{unitsToFill:o,totalSize:c}):(0,u.mapOrderAmountsFromFilledStatus)(n,{totalFilled:d,totalSize:c}),{parameters:{offer:O,consideration:P}}=k,R=[...P,...h],N=O.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),L=R.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),M=N.length>0||L.length>0;if(N.length!==f.length||L.length!==p.length)throw new Error("You must supply the appropriate criterias for criteria based items");const D=null===(S=(0,s.getSummedTokenAndIdentifierAmounts)({items:R,criterias:p,timeBasedItemParams:Object.assign(Object.assign({},w),{isConsiderationItem:!0})})[t.ethers.constants.AddressZero])||void 0===S?void 0:S[0],F=(0,i.validateStandardFulfillBalancesAndApprovals)({offer:O,consideration:R,offerCriteria:f,considerationCriteria:p,offererBalancesAndApprovals:g,fulfillerBalancesAndApprovals:A,timeBasedItemParams:w,offererOperator:b,fulfillerOperator:v}),j={value:D},B=(0,r.getApprovalActions)(F,I,T),_=E!==t.ethers.constants.AddressZero,z=Boolean(o)||M||_,U=Object.assign(Object.assign({},n),{parameters:Object.assign(Object.assign({},n.parameters),{consideration:[...n.parameters.consideration,...h],totalOriginalConsiderationItems:P.length})}),{numerator:W,denominator:H}=(0,e.getAdvancedOrderNumeratorDenominator)(n,o),V=[...B,{type:"exchange",transactionMethods:z?(0,l.getTransactionMethods)(y.connect(T),"fulfillAdvancedOrder",[Object.assign(Object.assign({},U),{numerator:W,denominator:H,extraData:null!=m?m:"0x"}),M?(0,a.generateCriteriaResolvers)({orders:[n],offerCriterias:[f],considerationCriterias:[p]}):[],x,E,j],C):(0,l.getTransactionMethods)(y.connect(T),"fulfillOrder",[U,x,j],C)}];return{actions:V,executeAllActions:()=>(0,l.executeAllActions)(V)}},e.validateAndSanitizeFromOrderStatus=d,e.fulfillAvailableOrders=function({ordersMetadata:n,seaportContract:o,fulfillerBalancesAndApprovals:c,fulfillerOperator:p,currentBlockTimestamp:h,ascendingAmountTimestampBuffer:m,conduitKey:y,signer:g,recipientAddress:A,exactApproval:b,domain:v}){const w=n.map((e=>Object.assign(Object.assign({},e),{order:d(e.order,e.orderStatus)}))),x=w.map((e=>Object.assign(Object.assign({},e),{order:e.unitsToFill?(0,u.mapOrderAmountsFromUnitsToFill)(e.order,{unitsToFill:e.unitsToFill,totalSize:e.orderStatus.totalSize}):(0,u.mapOrderAmountsFromFilledStatus)(e.order,{totalFilled:e.orderStatus.totalFilled,totalSize:e.orderStatus.totalSize})})));let E=t.BigNumber.from(0);const T=[],C=w.flatMap((e=>[e.order.parameters.offer,e.order.parameters.consideration])).flat().filter((({itemType:e})=>(0,s.isCriteriaItem)(e))).length>0;x.forEach((({order:e,tips:n,offerCriteria:r,considerationCriteria:a,offererBalancesAndApprovals:o,offererOperator:u})=>{var l,d;const f=[...e.parameters.consideration,...n],y={startTime:e.parameters.startTime,endTime:e.parameters.endTime,currentBlockTimestamp:h,ascendingAmountTimestampBuffer:m,isConsiderationItem:!0};E=E.add(null!==(d=null===(l=(0,s.getSummedTokenAndIdentifierAmounts)({items:f,criterias:a,timeBasedItemParams:y})[t.ethers.constants.AddressZero])||void 0===l?void 0:l[0])&&void 0!==d?d:t.BigNumber.from(0));const g=(0,i.validateStandardFulfillBalancesAndApprovals)({offer:e.parameters.offer,consideration:f,offerCriteria:r,considerationCriteria:a,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:c,timeBasedItemParams:y,offererOperator:u,fulfillerOperator:p}),A=e.parameters.offer.filter((({itemType:e})=>(0,s.isCriteriaItem)(e))),b=f.filter((({itemType:e})=>(0,s.isCriteriaItem)(e)));if(A.length!==r.length||b.length!==a.length)throw new Error("You must supply the appropriate criterias for criteria based items");g.forEach((e=>{T.find((t=>t.token===e.token))||T.push(e)}))}));const I={value:E},S=(0,r.getApprovalActions)(T,b,g),k=w.map((({order:t,unitsToFill:n=0,tips:r,extraData:i})=>{const{numerator:a,denominator:o}=(0,e.getAdvancedOrderNumeratorDenominator)(t,n),s=[...t.parameters.consideration,...r];return Object.assign(Object.assign({},t),{parameters:Object.assign(Object.assign({},t.parameters),{consideration:s,totalOriginalConsiderationItems:t.parameters.consideration.length}),numerator:a,denominator:o,extraData:i})})),{offerFulfillments:O,considerationFulfillments:P}=f(n),R={type:"exchange",transactionMethods:(0,l.getTransactionMethods)(o.connect(g),"fulfillAvailableAdvancedOrders",[k,C?(0,a.generateCriteriaResolvers)({orders:n.map((({order:e})=>e)),offerCriterias:n.map((({offerCriteria:e})=>e)),considerationCriterias:n.map((({considerationCriteria:e})=>e))}):[],O,P,y,A,k.length,I],v)},N=[...S,R];return{actions:N,executeAllActions:()=>(0,l.executeAllActions)(N)}},e.generateFulfillOrdersFulfillments=f;e.getAdvancedOrderNumeratorDenominator=(e,n)=>{const r=(0,s.getMaximumSizeForOrder)(e),i=t.BigNumber.from(n),a=(0,o.gcd)(i,r);return{numerator:n?i.div(a):t.BigNumber.from(1),denominator:n?r.div(a):t.BigNumber.from(1)}}}(GR);var oN=ot&&ot.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(BS,"__esModule",{value:!0}),BS.Seaport=void 0;const sN=uk,uN=lk,lN=ck,cN=Pk,dN=Rk,fN=Nk,pN=Lk,hN=Qk,mN=sO,yN=GR,gN=Wk(),AN=XR,bN=Hk;var vN,wN,xN,EN,TN,CN,IN,SN,kN,ON,PN,RN,NN,LN,MN,DN,FN,jN,BN,_N,zN,UN,WN,HN,VN,qN,GN,XN,ZN,YN,KN,QN,JN,$N,eL,tL,nL,rL,iL,aL,oL,sL,uL,lL,cL,dL,fL;BS.Seaport=class{constructor(e,{overrides:t,ascendingAmountFulfillmentBuffer:n=300,balanceAndApprovalChecksOnOrderCreation:r=!0,conduitKeyToConduit:i,seaportVersion:a="1.5"}={}){var o,s,u;this.OPENSEA_CONDUIT_KEY=fN.OPENSEA_CONDUIT_KEY,this.getOrderHash=e=>{const t="OfferItem(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)",n="ConsiderationItem(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)",r=`OrderComponents(address offerer,address zone,OfferItem[] offer,ConsiderationItem[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 counter)${n}${t}`,i=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(t)),a=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(n)),o=uN.ethers.utils.keccak256(uN.ethers.utils.toUtf8Bytes(r)),s=uN.ethers.utils.keccak256("0x"+e.offer.map((e=>uN.ethers.utils.keccak256("0x"+[i.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.identifierOrCriteria).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.startAmount).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endAmount).toHexString().slice(2).padStart(64,"0")].join("")).slice(2))).join("")),u=uN.ethers.utils.keccak256("0x"+e.consideration.map((e=>uN.ethers.utils.keccak256("0x"+[a.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.identifierOrCriteria).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.startAmount).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endAmount).toHexString().slice(2).padStart(64,"0"),e.recipient.slice(2).padStart(64,"0")].join("")).slice(2))).join(""));return uN.ethers.utils.keccak256("0x"+[o.slice(2),e.offerer.slice(2).padStart(64,"0"),e.zone.slice(2).padStart(64,"0"),s.slice(2),u.slice(2),e.orderType.toString().padStart(64,"0"),uN.ethers.BigNumber.from(e.startTime).toHexString().slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.endTime).toHexString().slice(2).padStart(64,"0"),e.zoneHash.slice(2),uN.BigNumber.from(e.salt).toHexString().slice(2).padStart(64,"0"),e.conduitKey.slice(2).padStart(64,"0"),uN.ethers.BigNumber.from(e.counter).toHexString().slice(2).padStart(64,"0")].join(""))};const l=e instanceof uN.providers.Provider?e:e.provider;if(this.signer=e._isSigner?e:void 0,!l)throw new Error("Either a provider or custom signer with provider must be provided");this.provider=l,this.multicallProvider=new sN.providers.MulticallProvider(this.provider),this.contract=new uN.Contract(null!==(o=null==t?void 0:t.contractAddress)&&void 0!==o?o:"1.5"===a?fN.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS:fN.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS,dN.SeaportABIv14,this.multicallProvider),this.domainRegistry=new uN.Contract(null!==(s=null==t?void 0:t.domainRegistryAddress)&&void 0!==s?s:fN.DOMAIN_REGISTRY_ADDRESS,cN.DomainRegistryABI,this.multicallProvider),this.config={ascendingAmountFulfillmentBuffer:n,balanceAndApprovalChecksOnOrderCreation:r,conduitKeyToConduit:Object.assign(Object.assign(Object.assign({},fN.KNOWN_CONDUIT_KEYS_TO_CONDUIT),{[fN.NO_CONDUIT]:this.contract.address}),i),seaportVersion:a},this.defaultConduitKey=null!==(u=null==t?void 0:t.defaultConduitKey)&&void 0!==u?u:fN.NO_CONDUIT}createOrder(e,t,n){return oN(this,void 0,void 0,(function*(){const r=this._getSigner(t),i=null!=t?t:yield r.getAddress(),{orderComponents:a,approvalActions:o}=yield this._formatOrder(r,i,Boolean(n),e),s={type:"create",getMessageToSign:()=>this._getMessageToSign(a),createOrder:()=>oN(this,void 0,void 0,(function*(){const e=yield this.signOrder(a,i);return{parameters:a,signature:e}}))},u=[...o,s];return{actions:u,executeAllActions:()=>(0,bN.executeAllActions)(u)}}))}createBulkOrders(e,t,n){var r;return oN(this,void 0,void 0,(function*(){const i=this._getSigner(t),a=yield i.getAddress(),o=yield this.getCounter(a),s=[],u=[];for(const t of e){null!==(r=t.counter)&&void 0!==r||(t.counter=o);const{orderComponents:e,approvalActions:l}=yield this._formatOrder(i,a,Boolean(n),t);u.push(e);for(const e of l)void 0===s.find((t=>t.token===e.token))&&s.push(e)}const l={type:"createBulk",getMessageToSign:()=>this._getBulkMessageToSign(u),createBulkOrders:()=>oN(this,void 0,void 0,(function*(){return yield this.signBulkOrder(u,a)}))},c=[...s,l];return{actions:c,executeAllActions:()=>(0,bN.executeAllActions)(c)}}))}_formatOrder(e,t,n,{conduitKey:r=this.defaultConduitKey,zone:i=uN.ethers.constants.AddressZero,zoneHash:a=uN.ethers.constants.HashZero,startTime:o=Math.floor(Date.now()/1e3).toString(),endTime:s=fN.MAX_INT.toString(),offer:u,consideration:l,counter:c,allowPartialFills:d,restrictedByZone:f,fees:p,domain:h,salt:m}){var y;return oN(this,void 0,void 0,(function*(){const g=u.map(AN.mapInputItemToOfferItem),A=[...l.map((e=>{var n;return Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:null!==(n=e.recipient)&&void 0!==n?n:t})}))];if((null==p?void 0:p.length)&&!(0,AN.areAllCurrenciesSame)({offer:g,consideration:A}))throw new Error("All currency tokens in the order must be the same token when applying fees");const b=[...g,...A].filter(gN.isCurrencyItem),v=(0,AN.totalItemsAmount)(b),w=this.config.conduitKeyToConduit[r],x=this._getOrderTypeFromOrderOptions({allowPartialFills:d,restrictedByZone:f}),E=[...(0,AN.deductFees)(A,p),...b.length&&null!==(y=null==p?void 0:p.map((e=>(0,AN.feeToConsiderationItem)({fee:e,token:b[0].token,baseAmount:v.startAmount,baseEndAmount:v.endAmount}))))&&void 0!==y?y:[]],T=void 0!==m?`0x${uN.BigNumber.from(m).toHexString().slice(2).padStart(64,"0")}`:(0,AN.generateRandomSalt)(h),C={offerer:t,zone:i,zoneHash:a,startTime:o,endTime:s,orderType:x,offer:g,consideration:E,totalOriginalConsiderationItems:E.length,salt:T,conduitKey:r,counter:(null!=c?c:yield this.getCounter(t)).toString()},I=[];if(this.config.balanceAndApprovalChecksOnOrderCreation){const r=yield(0,hN.getBalancesAndApprovals)({owner:t,items:g,criterias:[],multicallProvider:this.multicallProvider,operator:w}),i=(0,hN.validateOfferBalancesAndApprovals)({offer:g,criterias:[],balancesAndApprovals:r,throwOnInsufficientBalances:!0,operator:w}),a=(0,pN.getApprovalActions)(i,n,e);I.push(...a)}return{orderComponents:C,approvalActions:I}}))}_getSigner(e){if(this.signer)return this.signer;if(!(this.provider instanceof uN.providers.JsonRpcProvider))throw new Error("Either signer or a JsonRpcProvider must be provided");return this.provider.getSigner(e)}_getOrderTypeFromOrderOptions({allowPartialFills:e,restrictedByZone:t}){return e?t?fN.OrderType.PARTIAL_RESTRICTED:fN.OrderType.PARTIAL_OPEN:t?fN.OrderType.FULL_RESTRICTED:fN.OrderType.FULL_OPEN}_getDomainData(){return oN(this,void 0,void 0,(function*(){const{chainId:e}=yield this.provider.getNetwork();return{name:fN.SEAPORT_CONTRACT_NAME,version:"1.5"===this.config.seaportVersion?fN.SEAPORT_CONTRACT_VERSION_V1_5:fN.SEAPORT_CONTRACT_VERSION_V1_4,chainId:e,verifyingContract:this.contract.address}}))}_getMessageToSign(e){return oN(this,void 0,void 0,(function*(){const t=yield this._getDomainData();return JSON.stringify(lN._TypedDataEncoder.getPayload(t,fN.EIP_712_ORDER_TYPE,e))}))}_getBulkMessageToSign(e){return oN(this,void 0,void 0,(function*(){const t=yield this._getDomainData(),n=(0,mN.getBulkOrderTree)(e),r=n.types,i=n.getDataToSign();return JSON.stringify(lN._TypedDataEncoder.getPayload(t,r,{tree:i}))}))}signOrder(e,t){return oN(this,void 0,void 0,(function*(){const n=this._getSigner(t),r=yield this._getDomainData();let i=yield n._signTypedData(r,fN.EIP_712_ORDER_TYPE,e);return 132===i.length&&(i=uN.ethers.utils.splitSignature(i).compact),i}))}signBulkOrder(e,t){return oN(this,void 0,void 0,(function*(){const n=this._getSigner(t),r=yield this._getDomainData(),i=(0,mN.getBulkOrderTree)(e),a=i.types,o={tree:i.getDataToSign()};let s=yield n._signTypedData(r,a,o);132===s.length&&(s=uN.ethers.utils.splitSignature(s).compact);const u=e.map(((e,t)=>({parameters:e,signature:i.getEncodedProofAndSignature(t,s)})));return u}))}cancelOrders(e,t,n){const r=this._getSigner(t);return(0,bN.getTransactionMethods)(this.contract.connect(r),"cancel",[e],n)}bulkCancelOrders(e,t){const n=this._getSigner(e);return(0,bN.getTransactionMethods)(this.contract.connect(n),"incrementCounter",[],t)}validate(e,t,n){const r=this._getSigner(t);return(0,bN.getTransactionMethods)(this.contract.connect(r),"validate",[e],n)}getOrderStatus(e){return this.contract.getOrderStatus(e)}getCounter(e){return this.contract.getCounter(e)}fulfillOrder({order:e,unitsToFill:t,offerCriteria:n=[],considerationCriteria:r=[],tips:i=[],extraData:a="0x",accountAddress:o,conduitKey:s=this.defaultConduitKey,recipientAddress:u=uN.ethers.constants.AddressZero,domain:l,exactApproval:c=!1}){return oN(this,void 0,void 0,(function*(){if(!e.signature)throw new Error("Order is missing signature");const{parameters:d}=e,{offerer:f,offer:p,consideration:h}=d,m=this._getSigner(o),y=yield m.getAddress(),g=this.config.conduitKeyToConduit[d.conduitKey],A=this.config.conduitKeyToConduit[s],[b,v,w,x]=yield Promise.all([(0,hN.getBalancesAndApprovals)({owner:f,items:p,criterias:n,multicallProvider:this.multicallProvider,operator:g}),(0,hN.getBalancesAndApprovals)({owner:y,items:[...p,...h],criterias:[...n,...r],multicallProvider:this.multicallProvider,operator:A}),this.multicallProvider.getBlock("latest"),this.getOrderStatus(this.getOrderHash(d))]),E=w.timestamp,{totalFilled:T,totalSize:C}=x,I=(0,yN.validateAndSanitizeFromOrderStatus)(e,x),S={startTime:I.parameters.startTime,endTime:I.parameters.endTime,currentBlockTimestamp:E,ascendingAmountTimestampBuffer:this.config.ascendingAmountFulfillmentBuffer},k=i.map((e=>Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:e.recipient}))),O=u===uN.ethers.constants.AddressZero;return!t&&O&&(0,yN.shouldUseBasicFulfill)(I.parameters,T)?(0,yN.fulfillBasicOrder)({order:I,seaportContract:this.contract,offererBalancesAndApprovals:b,fulfillerBalancesAndApprovals:v,timeBasedItemParams:S,conduitKey:s,offererOperator:g,fulfillerOperator:A,signer:m,tips:k,domain:l},c):(0,yN.fulfillStandardOrder)({order:I,unitsToFill:t,totalFilled:T,totalSize:C.eq(0)?(0,gN.getMaximumSizeForOrder)(I):C,offerCriteria:n,considerationCriteria:r,tips:k,extraData:a,seaportContract:this.contract,offererBalancesAndApprovals:b,fulfillerBalancesAndApprovals:v,timeBasedItemParams:S,conduitKey:s,signer:m,offererOperator:g,fulfillerOperator:A,recipientAddress:u,domain:l},c)}))}fulfillOrders({fulfillOrderDetails:e,accountAddress:t,conduitKey:n=this.defaultConduitKey,recipientAddress:r=uN.ethers.constants.AddressZero,domain:i,exactApproval:a=!1}){return oN(this,void 0,void 0,(function*(){if(e.some((e=>!e.order.signature)))throw new Error("All orders must include signatures");const o=this._getSigner(t),s=yield o.getAddress(),u=e.map((({order:e})=>this.config.conduitKeyToConduit[e.parameters.conduitKey])),l=this.config.conduitKeyToConduit[n],c=e.flatMap((({order:e})=>e.parameters.offer)),d=e.flatMap((({order:e})=>e.parameters.consideration)),f=e.flatMap((({offerCriteria:e=[]})=>e)),p=e.flatMap((({considerationCriteria:e=[]})=>e)),[h,m,y,g]=yield Promise.all([Promise.all(e.map((({order:e,offerCriteria:t=[]},n)=>(0,hN.getBalancesAndApprovals)({owner:e.parameters.offerer,items:e.parameters.offer,criterias:t,operator:u[n],multicallProvider:this.multicallProvider})))),(0,hN.getBalancesAndApprovals)({owner:s,items:[...c,...d],criterias:[...f,...p],operator:l,multicallProvider:this.multicallProvider}),this.multicallProvider.getBlock("latest"),Promise.all(e.map((({order:e})=>this.getOrderStatus(this.getOrderHash(e.parameters)))))]),A=e.map(((e,t)=>{var n,r,i,a,o;return{order:e.order,unitsToFill:e.unitsToFill,orderStatus:g[t],offerCriteria:null!==(n=e.offerCriteria)&&void 0!==n?n:[],considerationCriteria:null!==(r=e.considerationCriteria)&&void 0!==r?r:[],tips:null!==(a=null===(i=e.tips)||void 0===i?void 0:i.map((e=>Object.assign(Object.assign({},(0,AN.mapInputItemToOfferItem)(e)),{recipient:e.recipient}))))&&void 0!==a?a:[],extraData:null!==(o=e.extraData)&&void 0!==o?o:"0x",offererBalancesAndApprovals:h[t],offererOperator:u[t]}}));return(0,yN.fulfillAvailableOrders)({ordersMetadata:A,seaportContract:this.contract,fulfillerBalancesAndApprovals:m,currentBlockTimestamp:y.timestamp,ascendingAmountTimestampBuffer:this.config.ascendingAmountFulfillmentBuffer,fulfillerOperator:l,signer:o,conduitKey:n,recipientAddress:r,domain:i,exactApproval:a})}))}matchOrders({orders:e,fulfillments:t,overrides:n,accountAddress:r,domain:i}){const a=this._getSigner(r);return(0,bN.getTransactionMethods)(this.contract.connect(a),"matchOrders",[e,t,n],i)}setDomain(e,t){const n=this._getSigner(t);return(0,bN.getTransactionMethods)(this.domainRegistry.connect(n),"setDomain",[e])}getNumberOfDomains(e){return oN(this,void 0,void 0,(function*(){return this.domainRegistry.getNumberOfDomains(e)}))}getDomain(e,t){return this.domainRegistry.getDomain(e,t)}getDomains(e,t){return oN(this,void 0,void 0,(function*(){try{if(t)throw Error;return this.domainRegistry.getDomains(e)}catch(t){const n=(yield this.domainRegistry.getNumberOfDomains(e)).toNumber(),r=Promise.all([...Array(n).keys()].map((t=>this.domainRegistry.getDomain(e,t))));return r}}))}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Seaport=void 0;const t=BS;Object.defineProperty(e,"Seaport",{enumerable:!0,get:function(){return t.Seaport}})}({}),function(e){var t;(t=e.cancellation_type||(e.cancellation_type={})).ON_CHAIN="ON_CHAIN",t.OFF_CHAIN="OFF_CHAIN"}(vN||(vN={})),function(e){(e.reason_code||(e.reason_code={})).FILLED="FILLED"}(wN||(wN={})),function(e){var t;(t=e.type||(e.type={})).ROYALTY="ROYALTY",t.MAKER_ECOSYSTEM="MAKER_ECOSYSTEM",t.TAKER_ECOSYSTEM="TAKER_ECOSYSTEM",t.PROTOCOL="PROTOCOL"}(xN||(xN={})),function(e){(e.type||(e.type={})).LISTING="LISTING"}(EN||(EN={})),function(e){e.PENDING="PENDING",e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e.FILLED="FILLED",e.EXPIRED="EXPIRED",e.CANCELLED="CANCELLED"}(TN||(TN={})),function(e){(e.order_type||(e.order_type={})).FULL_RESTRICTED="FULL_RESTRICTED"}(CN||(CN={})),function(e){e.MAKER_ECOSYSTEM="MAKER_ECOSYSTEM",e.TAKER_ECOSYSTEM="TAKER_ECOSYSTEM",e.PROTOCOL="PROTOCOL",e.ROYALTY="ROYALTY"}(IN||(IN={})),function(e){e.APPROVAL="APPROVAL",e.FULFILL_ORDER="FULFILL_ORDER",e.CANCEL="CANCEL"}(SN||(SN={})),function(e){e.CREATE_LISTING="CREATE_LISTING",e.OFF_CHAIN_CANCELLATION="OFF_CHAIN_CANCELLATION"}(kN||(kN={})),function(e){e.TRANSACTION="TRANSACTION",e.SIGNABLE="SIGNABLE"}(ON||(ON={})),function(e){e[e.FULL_OPEN=0]="FULL_OPEN",e[e.PARTIAL_OPEN=1]="PARTIAL_OPEN",e[e.FULL_RESTRICTED=2]="FULL_RESTRICTED",e[e.PARTIAL_RESTRICTED=3]="PARTIAL_RESTRICTED"}(PN||(PN={})),function(e){e[e.NATIVE=0]="NATIVE",e[e.ERC20=1]="ERC20",e[e.ERC721=2]="ERC721",e[e.ERC1155=3]="ERC1155",e[e.ERC721_WITH_CRITERIA=4]="ERC721_WITH_CRITERIA",e[e.ERC1155_WITH_CRITERIA=5]="ERC1155_WITH_CRITERIA"}(RN||(RN={})),function(e){e[e.OFFER=0]="OFFER",e[e.CONSIDERATION=1]="CONSIDERATION"}(NN||(NN={})),function(e){e[e.ETH_TO_ERC721=0]="ETH_TO_ERC721",e[e.ETH_TO_ERC1155=1]="ETH_TO_ERC1155",e[e.ERC20_TO_ERC721=2]="ERC20_TO_ERC721",e[e.ERC20_TO_ERC1155=3]="ERC20_TO_ERC1155",e[e.ERC721_TO_ERC20=4]="ERC721_TO_ERC20",e[e.ERC1155_TO_ERC20=5]="ERC1155_TO_ERC20"}(LN||(LN={})),function(e){e.IMTBL_WIDGETS_PROVIDER="imtbl-widgets-provider",e.IMTBL_CONNECT_WIDGET_EVENT="imtbl-connect-widget",e.IMTBL_WALLET_WIDGET_EVENT="imtbl-wallet-widget",e.IMTBL_SWAP_WIDGET_EVENT="imtbl-swap-widget",e.IMTBL_BRIDGE_WIDGET_EVENT="imtbl-bridge-widget",e.IMTBL_ONRAMP_WIDGET_EVENT="imtbl-onramp-widget",e.IMTBL_SALE_WIDGET_EVENT="imtbl-sale-widget"}(MN||(MN={})),function(e){e.PROVIDER_UPDATED="PROVIDER_UPDATED"}(DN||(DN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.LANGUAGE_CHANGED="language-changed"}(FN||(FN={})),function(e){e.CLOSE_WIDGET="close-widget",e.NETWORK_SWITCH="network-switch",e.DISCONNECT_WALLET="disconnect-wallet",e.LANGUAGE_CHANGED="language-changed"}(jN||(jN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.REJECTED="rejected",e.LANGUAGE_CHANGED="language-changed"}(BN||(BN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.REJECTED="rejected",e.TRANSACTION_SUCCESS="transaction-success",e.LANGUAGE_CHANGED="language-changed",e.PAYMENT_METHOD="payment-method"}(_N||(_N={})),function(e){e.CRYPTO="crypto",e.FIAT="fiat"}(zN||(zN={})),function(e){e.CLOSE_WIDGET="close-widget",e.FAILURE="failure",e.TRANSACTION_SENT="transaction-sent",e.LANGUAGE_CHANGED="language-changed"}(UN||(UN={})),function(e){e.REQUEST_CONNECT="request-connect",e.REQUEST_WALLET="request-wallet",e.REQUEST_SWAP="request-swap",e.REQUEST_BRIDGE="request-bridge",e.REQUEST_ONRAMP="request-onramp"}(WN||(WN={})),function(e){e.CLOSE_WIDGET="close-widget",e.SUCCESS="success",e.FAILURE="failure",e.LANGUAGE_CHANGED="language-changed"}(HN||(HN={})),function(e){e.CONNECT="connect",e.WALLET="wallet",e.SWAP="swap",e.BRIDGE="bridge",e.ONRAMP="onramp",e.SALE="sale"}(VN||(VN={})),function(e){e.LAYER1="LAYER1",e.LAYER2="LAYER2"}(qN||(qN={})),function(e){e.LIGHT="light",e.DARK="dark"}(GN||(GN={})),function(e){e[e.IMTBL_ZKEVM_MAINNET=13371]="IMTBL_ZKEVM_MAINNET",e[e.IMTBL_ZKEVM_TESTNET=13473]="IMTBL_ZKEVM_TESTNET",e[e.IMTBL_ZKEVM_DEVNET=13433]="IMTBL_ZKEVM_DEVNET",e[e.ETHEREUM=1]="ETHEREUM",e[e.SEPOLIA=11155111]="SEPOLIA"}(XN||(XN={})),function(e){e.ETHEREUM="Ethereum",e.SEPOLIA="Sepolia",e.IMTBL_ZKEVM_TESTNET="Immutable zkEVM Test",e.IMTBL_ZKEVM_DEVNET="Immutable zkEVM Dev",e.IMTBL_ZKEVM_MAINNET="Immutable zkEVM"}(ZN||(ZN={})),function(e){e.ETHEREUM="ethereum",e.SEPOLIA="sepolia",e.IMTBL_ZKEVM_MAINNET="imtbl-zkevm-mainnet",e.IMTBL_ZKEVM_TESTNET="imtbl-zkevm-testnet",e.IMTBL_ZKEVM_DEVNET="imtbl-zkevm-devnet"}(YN||(YN={})),function(e){e.TRANSAK="201811419111"}(KN||(KN={})),function(e){e.BRIDGE_TO_L2="BRIDGE_TO_L2",e.SWAP="SWAP"}(QN||(QN={})),function(e){e.ALL="all"}(JN||(JN={})),function(e){e.ALL="all",e.SWAP="swap",e.BRIDGE="bridge",e.ONRAMP="onramp"}($N||($N={})),function(e){e.CHECK_CONNECTION="eth_accounts",e.CONNECT="eth_requestAccounts",e.ADD_NETWORK="wallet_addEthereumChain",e.SWITCH_NETWORK="wallet_switchEthereumChain",e.GET_CHAINID="eth_chainId"}(eL||(eL={})),function(e){e.ALL="all"}(tL||(tL={})),function(e){e.PASSPORT="passport",e.METAMASK="metamask"}(nL||(nL={})),function(e){e.SUCCESS="SUCCESS",e.FAILED="FAILED",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.FULFILLMENTS_UNSETTLED="FULFILLMENTS_UNSETTLED"}(rL||(rL={})),function(e){e.NATIVE="NATIVE",e.ERC20="ERC20",e.ERC721="ERC721"}(iL||(iL={})),function(e){e.TRANSACTION="TRANSACTION",e.GAS="GAS"}(aL||(aL={})),function(e){e.NATIVE="NATIVE",e.ERC20="ERC20"}(oL||(oL={})),function(e){e.ROUTES_FOUND="ROUTES_FOUND",e.NO_ROUTES_FOUND="NO_ROUTES_FOUND",e.NO_ROUTE_OPTIONS="NO_ROUTE_OPTIONS"}(sL||(sL={})),function(e){e.GAS="GAS",e.BRIDGE_FEE="BRIDGE_FEE",e.SWAP_FEE="SWAP_FEE",e.IMMUTABLE_FEE="IMMUTABLE_FEE"}(uL||(uL={})),function(e){e.BRIDGE="BRIDGE",e.SWAP="SWAP",e.ONRAMP="ONRAMP"}(lL||(lL={})),function(e){e.ONRAMP="onramp"}(cL||(cL={})),function(e){e.MISSING_PARAMS="MISSING_PARAMS",e.WEB3_PROVIDER_ERROR="WEB3_PROVIDER_ERROR",e.PROVIDER_ERROR="PROVIDER_ERROR",e.DEFAULT_PROVIDER_ERROR="DEFAULT_PROVIDER_ERROR",e.CONNECT_PROVIDER_ERROR="CONNECT_PROVIDER_ERROR",e.GET_BALANCE_ERROR="GET_BALANCE_ERROR",e.GET_INDEXER_BALANCE_ERROR="GET_INDEXER_BALANCE_ERROR",e.GET_ERC20_INFO_ERROR="GET_ERC20_INFO_ERROR",e.GET_ERC20_BALANCE_ERROR="GET_ERC20_BALANCE_ERROR",e.GET_ERC721_BALANCE_ERROR="GET_ERC721_BALANCE_ERROR",e.GET_NETWORK_INFO_ERROR="GET_NETWORK_INFO_ERROR",e.METAMASK_PROVIDER_ERROR="METAMASK_PROVIDER_ERROR",e.CHAIN_NOT_SUPPORTED_ERROR="CHAIN_NOT_SUPPORTED_ERROR",e.PROVIDER_REQUEST_MISSING_ERROR="PROVIDER_REQUEST_MISSING_ERROR",e.PROVIDER_REQUEST_FAILED_ERROR="PROVIDER_REQUEST_FAILED_ERROR",e.USER_REJECTED_REQUEST_ERROR="USER_REJECTED_REQUEST_ERROR",e.TRANSACTION_FAILED="TRANSACTION_FAILED",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.INVALID_GAS_ESTIMATE_TYPE="INVALID_GAS_ESTIMATE_TYPE",e.UNSUPPORTED_TOKEN_TYPE_ERROR="UNSUPPORTED_TOKEN_TYPE_ERROR",e.UNSUPPORTED_BALANCE_REQUIREMENT_ERROR="UNSUPPORTED_BALANCE_REQUIREMENT_ERROR",e.GET_ORDER_LISTING_ERROR="GET_ORDER_LISTING_ERROR",e.CANCEL_ORDER_LISTING_ERROR="CANCEL_ORDER_LISTING_ERROR",e.PREPARE_ORDER_LISTING_ERROR="PREPARE_ORDER_LISTING_ERROR",e.CREATE_ORDER_LISTING_ERROR="CREATE_ORDER_LISTING_ERROR",e.FULFILL_ORDER_LISTING_ERROR="FULFILL_ORDER_LISTING_ERROR",e.SWITCH_NETWORK_UNSUPPORTED="SWITCH_NETWORK_UNSUPPORTED",e.GET_ERC20_ALLOWANCE_ERROR="GET_ERC20_ALLOWANCE_ERROR",e.GET_ERC721_ALLOWANCE_ERROR="GET_ERC721_ALLOWANCE_ERROR",e.EXECUTE_APPROVAL_TRANSACTION_ERROR="EXECUTE_APPROVAL_TRANSACTION_ERROR",e.EXECUTE_FULFILLMENT_TRANSACTION_ERROR="EXECUTE_FULFILLMENT_TRANSACTION_ERROR",e.SIGN_MESSAGE_ERROR="SIGN_MESSAGE_ERROR",e.BRIDGE_GAS_ESTIMATE_ERROR="BRIDGE_GAS_ESTIMATE_ERROR",e.ORDER_FEE_ERROR="ORDER_FEE_ERROR",e.ITEM_REQUIREMENTS_ERROR="ITEM_REQUIREMENTS_ERROR",e.API_ERROR="API_ERROR",e.ORDER_EXPIRED_ERROR="ORDER_EXPIRED_ERROR",e.WIDGETS_SCRIPT_LOAD_ERROR="WIDGETS_SCRIPT_LOAD_ERROR"}(dL||(dL={})),function(e){e.REJECTED_SWITCH_AFTER_ADDING_NETWORK="REJECTED_SWITCH_AFTER_ADDING_NETWORK"}(fL||(fL={}));const pL="development",hL={name:"IMX",symbol:"IMX",decimals:18,address:"native"},mL={[pL]:"https://api.dev.immutable.com",[it.SANDBOX]:"https://api.sandbox.immutable.com",[it.PRODUCTION]:"https://api.immutable.com"};it.SANDBOX,it.PRODUCTION,it.SANDBOX,it.PRODUCTION;const yL=new Map([[XN.ETHEREUM,{chainIdHex:`0x${XN.ETHEREUM.toString(16)}`,chainName:ZN.ETHEREUM,rpcUrls:["https://checkout-api.immutable.com/v1/rpc/eth-mainnet"],nativeCurrency:{name:ZN.ETHEREUM,symbol:"ETH",decimals:18},blockExplorerUrls:["https://etherscan.io/"]}],[XN.IMTBL_ZKEVM_MAINNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_MAINNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_MAINNET,rpcUrls:["https://rpc.immutable.com"],nativeCurrency:hL}]]),gL=new Map([[XN.SEPOLIA,{chainIdHex:`0x${XN.SEPOLIA.toString(16)}`,chainName:ZN.SEPOLIA,rpcUrls:["https://checkout-api.sandbox.immutable.com/v1/rpc/eth-sepolia"],nativeCurrency:{name:"Sep Eth",symbol:"ETH",decimals:18},blockExplorerUrls:["https://sepolia.etherscan.io/"]}],[XN.IMTBL_ZKEVM_TESTNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_TESTNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_TESTNET,rpcUrls:["https://rpc.testnet.immutable.com"],nativeCurrency:hL}]]);new Map([[XN.SEPOLIA,{chainIdHex:`0x${XN.SEPOLIA.toString(16)}`,chainName:ZN.SEPOLIA,rpcUrls:["https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"],nativeCurrency:{name:"Sep Eth",symbol:"ETH",decimals:18},blockExplorerUrls:["https://sepolia.etherscan.io/"]}],[XN.IMTBL_ZKEVM_DEVNET,{chainIdHex:`0x${XN.IMTBL_ZKEVM_DEVNET.toString(16)}`,chainName:ZN.IMTBL_ZKEVM_DEVNET,rpcUrls:["https://rpc.dev.immutable.com"],nativeCurrency:hL}]]);const AL={[XN.IMTBL_ZKEVM_TESTNET]:{url:"https://explorer.testnet.immutable.com",nativeToken:gL.get(XN.IMTBL_ZKEVM_TESTNET).nativeCurrency},[XN.IMTBL_ZKEVM_MAINNET]:{url:"https://explorer.immutable.com",nativeToken:yL.get(XN.IMTBL_ZKEVM_MAINNET).nativeCurrency},[XN.SEPOLIA]:{url:"https://eth-sepolia.blockscout.com",nativeToken:gL.get(XN.SEPOLIA).nativeCurrency},[XN.ETHEREUM]:{url:"https://eth.blockscout.com/",nativeToken:yL.get(XN.ETHEREUM).nativeCurrency}};var bL,vL;$n.from(15e9),$n.from(1e10),function(e){e.ERC20="ERC-20"}(bL||(bL={})),function(e){e.SUCCESS="SUCCESS",e.FAILED="FAILED"}(vL||(vL={})),it.SANDBOX;class wL{static getTransactionLink(e,t){const n=AL?.[e]?.url;if(n&&t)return`${n}/tx/${t}`}}var xL,EL={exports:{}},TL={},CL={exports:{}},IL={};CL.exports=function(){if(xL)return IL;xL=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,h={};function m(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var A=g.prototype=new y;A.constructor=g,p(A,m.prototype),A.isPureReactComponent=!0;var b=Array.isArray,v=Object.prototype.hasOwnProperty,w={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function E(t,n,r){var i,a={},o=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(o=""+n.key),n)v.call(n,i)&&!x.hasOwnProperty(i)&&(a[i]=n[i]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===a[i]&&(a[i]=u[i]);return{$$typeof:e,type:t,key:o,ref:s,props:a,_owner:w.current}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function S(n,r,i,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var u=!1;if(null===n)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0}}if(u)return o=o(u=n),n=""===a?"."+I(u,0):a,b(o)?(i="",null!=n&&(i=n.replace(C,"$&/")+"/"),S(o,r,i,"",(function(e){return e}))):null!=o&&(T(o)&&(o=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(o,i+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+n)),r.push(o)),1;if(u=0,a=""===a?".":a+":",b(n))for(var l=0;l<n.length;l++){var c=a+I(s=n[l],l);u+=S(s,r,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),l=0;!(s=n.next()).done;)u+=S(s=s.value,r,i,c=a+I(s,l++),o);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return u}function k(e,t,n){if(null==e)return e;var r=[],i=0;return S(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},R={transition:null},N={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:R,ReactCurrentOwner:w};return IL.Children={map:k,forEach:function(e,t,n){k(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return k(e,(function(){t++})),t},toArray:function(e){return k(e,(function(e){return e}))||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},IL.Component=m,IL.Fragment=n,IL.Profiler=i,IL.PureComponent=g,IL.StrictMode=r,IL.Suspense=u,IL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,IL.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=p({},t.props),a=t.key,o=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(o=n.ref,s=w.current),void 0!==n.key&&(a=""+n.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in n)v.call(n,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===n[l]&&void 0!==u?u[l]:n[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:e,type:t.type,key:a,ref:o,props:i,_owner:s}},IL.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},IL.createElement=E,IL.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},IL.createRef=function(){return{current:null}},IL.forwardRef=function(e){return{$$typeof:s,render:e}},IL.isValidElement=T,IL.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:O}},IL.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},IL.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},IL.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},IL.useCallback=function(e,t){return P.current.useCallback(e,t)},IL.useContext=function(e){return P.current.useContext(e)},IL.useDebugValue=function(){},IL.useDeferredValue=function(e){return P.current.useDeferredValue(e)},IL.useEffect=function(e,t){return P.current.useEffect(e,t)},IL.useId=function(){return P.current.useId()},IL.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},IL.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},IL.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},IL.useMemo=function(e,t){return P.current.useMemo(e,t)},IL.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},IL.useRef=function(e){return P.current.useRef(e)},IL.useState=function(e){return P.current.useState(e)},IL.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},IL.useTransition=function(){return P.current.useTransition()},IL.version="18.2.0",IL}();var SL,kL=CL.exports,OL=st(kL),PL=t({__proto__:null,default:OL},[kL]);EL.exports=function(){if(SL)return TL;SL=1;var e=kL,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,n,o){var s,u={},l=null,c=null;for(s in void 0!==o&&(l=""+o),void 0!==n.key&&(l=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!a.hasOwnProperty(s)&&(u[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===u[s]&&(u[s]=n[s]);return{$$typeof:t,type:e,key:l,ref:c,props:u,_owner:i.current}}return TL.Fragment=n,TL.jsx=o,TL.jsxs=o,TL}();var RL=EL.exports;var NL=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),LL="-ms-",ML="-moz-",DL="-webkit-",FL="comm",jL="rule",BL="decl",_L="@keyframes",zL=Math.abs,UL=String.fromCharCode,WL=Object.assign;function HL(e){return e.trim()}function VL(e,t,n){return e.replace(t,n)}function qL(e,t){return e.indexOf(t)}function GL(e,t){return 0|e.charCodeAt(t)}function XL(e,t,n){return e.slice(t,n)}function ZL(e){return e.length}function YL(e){return e.length}function KL(e,t){return t.push(e),e}var QL=1,JL=1,$L=0,eM=0,tM=0,nM="";function rM(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:QL,column:JL,length:o,return:""}}function iM(e,t){return WL(rM("",null,null,"",null,null,0),e,{length:-e.length},t)}function aM(){return tM=eM>0?GL(nM,--eM):0,JL--,10===tM&&(JL=1,QL--),tM}function oM(){return tM=eM<$L?GL(nM,eM++):0,JL++,10===tM&&(JL=1,QL++),tM}function sM(){return GL(nM,eM)}function uM(){return eM}function lM(e,t){return XL(nM,e,t)}function cM(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dM(e){return QL=JL=1,$L=ZL(nM=e),eM=0,[]}function fM(e){return nM="",e}function pM(e){return HL(lM(eM-1,yM(91===e?e+2:40===e?e+1:e)))}function hM(e){for(;(tM=sM())&&tM<33;)oM();return cM(e)>2||cM(tM)>3?"":" "}function mM(e,t){for(;--t&&oM()&&!(tM<48||tM>102||tM>57&&tM<65||tM>70&&tM<97););return lM(e,uM()+(t<6&&32==sM()&&32==oM()))}function yM(e){for(;oM();)switch(tM){case e:return eM;case 34:case 39:34!==e&&39!==e&&yM(tM);break;case 40:41===e&&yM(e);break;case 92:oM()}return eM}function gM(e,t){for(;oM()&&e+tM!==57&&(e+tM!==84||47!==sM()););return"/*"+lM(t,eM-1)+"*"+UL(47===e?e:oM())}function AM(e){for(;!cM(sM());)oM();return lM(e,eM)}function bM(e){return fM(vM("",null,null,null,[""],e=dM(e),0,[0],e))}function vM(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,d=o,f=0,p=0,h=0,m=1,y=1,g=1,A=0,b="",v=i,w=a,x=r,E=b;y;)switch(h=A,A=oM()){case 40:if(108!=h&&58==GL(E,d-1)){-1!=qL(E+=VL(pM(A),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:E+=pM(A);break;case 9:case 10:case 13:case 32:E+=hM(h);break;case 92:E+=mM(uM()-1,7);continue;case 47:switch(sM()){case 42:case 47:KL(xM(gM(oM(),uM()),t,n),u);break;default:E+="/"}break;case 123*m:s[l++]=ZL(E)*g;case 125*m:case 59:case 0:switch(A){case 0:case 125:y=0;case 59+c:-1==g&&(E=VL(E,/\f/g,"")),p>0&&ZL(E)-d&&KL(p>32?EM(E+";",r,n,d-1):EM(VL(E," ","")+";",r,n,d-2),u);break;case 59:E+=";";default:if(KL(x=wM(E,t,n,l,c,i,s,b,v=[],w=[],d),a),123===A)if(0===c)vM(E,t,x,x,v,a,d,s,w);else switch(99===f&&110===GL(E,3)?100:f){case 100:case 108:case 109:case 115:vM(e,x,x,r&&KL(wM(e,x,x,0,0,i,s,b,i,v=[],d),w),i,w,d,s,r?v:w);break;default:vM(E,x,x,x,[""],w,0,s,w)}}l=c=p=0,m=g=1,b=E="",d=o;break;case 58:d=1+ZL(E),p=h;default:if(m<1)if(123==A)--m;else if(125==A&&0==m++&&125==aM())continue;switch(E+=UL(A),A*m){case 38:g=c>0?1:(E+="\f",-1);break;case 44:s[l++]=(ZL(E)-1)*g,g=1;break;case 64:45===sM()&&(E+=pM(oM())),f=sM(),c=d=ZL(b=E+=AM(uM())),A++;break;case 45:45===h&&2==ZL(E)&&(m=0)}}return a}function wM(e,t,n,r,i,a,o,s,u,l,c){for(var d=i-1,f=0===i?a:[""],p=YL(f),h=0,m=0,y=0;h<r;++h)for(var g=0,A=XL(e,d+1,d=zL(m=o[h])),b=e;g<p;++g)(b=HL(m>0?f[g]+" "+A:VL(A,/&\f/g,f[g])))&&(u[y++]=b);return rM(e,t,n,0===i?jL:s,u,l,c)}function xM(e,t,n){return rM(e,t,n,FL,UL(tM),XL(e,2,-2),0)}function EM(e,t,n,r){return rM(e,t,n,BL,XL(e,0,r),XL(e,r+1,-1),r)}function TM(e,t){for(var n="",r=YL(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function CM(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case BL:return e.return=e.return||e.value;case FL:return"";case _L:return e.return=e.value+"{"+TM(e.children,r)+"}";case jL:e.value=e.props.join(",")}return ZL(n=TM(e.children,r))?e.return=e.value+"{"+n+"}":""}var IM=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function SM(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var kM=function(e,t,n){for(var r=0,i=0;r=i,i=sM(),38===r&&12===i&&(t[n]=1),!cM(i);)oM();return lM(e,eM)},OM=function(e,t){return fM(function(e,t){var n=-1,r=44;do{switch(cM(r)){case 0:38===r&&12===sM()&&(t[n]=1),e[n]+=kM(eM-1,t,n);break;case 2:e[n]+=pM(r);break;case 4:if(44===r){e[++n]=58===sM()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=UL(r)}}while(r=oM());return e}(dM(e),t))},PM=new WeakMap,RM=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||PM.get(n))&&!r){PM.set(e,!0);for(var i=[],a=OM(t,i),o=n.props,s=0,u=0;s<a.length;s++)for(var l=0;l<o.length;l++,u++)e.props[u]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+" "+a[s]}}},NM=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function LM(e,t){switch(function(e,t){return 45^GL(e,0)?(((t<<2^GL(e,0))<<2^GL(e,1))<<2^GL(e,2))<<2^GL(e,3):0}(e,t)){case 5103:return DL+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return DL+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return DL+e+ML+e+LL+e+e;case 6828:case 4268:return DL+e+LL+e+e;case 6165:return DL+e+LL+"flex-"+e+e;case 5187:return DL+e+VL(e,/(\w+).+(:[^]+)/,DL+"box-$1$2"+LL+"flex-$1$2")+e;case 5443:return DL+e+LL+"flex-item-"+VL(e,/flex-|-self/,"")+e;case 4675:return DL+e+LL+"flex-line-pack"+VL(e,/align-content|flex-|-self/,"")+e;case 5548:return DL+e+LL+VL(e,"shrink","negative")+e;case 5292:return DL+e+LL+VL(e,"basis","preferred-size")+e;case 6060:return DL+"box-"+VL(e,"-grow","")+DL+e+LL+VL(e,"grow","positive")+e;case 4554:return DL+VL(e,/([^-])(transform)/g,"$1"+DL+"$2")+e;case 6187:return VL(VL(VL(e,/(zoom-|grab)/,DL+"$1"),/(image-set)/,DL+"$1"),e,"")+e;case 5495:case 3959:return VL(e,/(image-set\([^]*)/,DL+"$1$`$1");case 4968:return VL(VL(e,/(.+:)(flex-)?(.*)/,DL+"box-pack:$3"+LL+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+DL+e+e;case 4095:case 3583:case 4068:case 2532:return VL(e,/(.+)-inline(.+)/,DL+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ZL(e)-1-t>6)switch(GL(e,t+1)){case 109:if(45!==GL(e,t+4))break;case 102:return VL(e,/(.+:)(.+)-([^]+)/,"$1"+DL+"$2-$3$1"+ML+(108==GL(e,t+3)?"$3":"$2-$3"))+e;case 115:return~qL(e,"stretch")?LM(VL(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==GL(e,t+1))break;case 6444:switch(GL(e,ZL(e)-3-(~qL(e,"!important")&&10))){case 107:return VL(e,":",":"+DL)+e;case 101:return VL(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+DL+(45===GL(e,14)?"inline-":"")+"box$3$1"+DL+"$2$3$1"+LL+"$2box$3")+e}break;case 5936:switch(GL(e,t+11)){case 114:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return DL+e+LL+VL(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return DL+e+LL+e+e}return e}var MM=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case BL:e.return=LM(e.value,e.length);break;case _L:return TM([iM(e,{value:VL(e.value,"@","@"+DL)})],r);case jL:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return TM([iM(e,{props:[VL(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return TM([iM(e,{props:[VL(t,/:(plac\w+)/,":"+DL+"input-$1")]}),iM(e,{props:[VL(t,/:(plac\w+)/,":-moz-$1")]}),iM(e,{props:[VL(t,/:(plac\w+)/,LL+"input-$1")]})],r)}return""}))}}],DM=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||MM,o={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)}));var u,l,c=[CM,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],d=function(e){var t=YL(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}([RM,NM].concat(a,c));i=function(e,t,n,r){u=n,TM(bM(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new NL({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return f.sheet.hydrate(s),f};function FM(){return FM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FM.apply(this,arguments)}var jM,BM={exports:{}},_M={};BM.exports=function(){if(jM)return _M;jM=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case u:case l:case r:case a:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case h:case p:case o:return e;default:return f}}case n:return f}}}function v(e){return b(e)===l}return _M.AsyncMode=u,_M.ConcurrentMode=l,_M.ContextConsumer=s,_M.ContextProvider=o,_M.Element=t,_M.ForwardRef=c,_M.Fragment=r,_M.Lazy=h,_M.Memo=p,_M.Portal=n,_M.Profiler=a,_M.StrictMode=i,_M.Suspense=d,_M.isAsyncMode=function(e){return v(e)||b(e)===u},_M.isConcurrentMode=v,_M.isContextConsumer=function(e){return b(e)===s},_M.isContextProvider=function(e){return b(e)===o},_M.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_M.isForwardRef=function(e){return b(e)===c},_M.isFragment=function(e){return b(e)===r},_M.isLazy=function(e){return b(e)===h},_M.isMemo=function(e){return b(e)===p},_M.isPortal=function(e){return b(e)===n},_M.isProfiler=function(e){return b(e)===a},_M.isStrictMode=function(e){return b(e)===i},_M.isSuspense=function(e){return b(e)===d},_M.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===a||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===o||e.$$typeof===s||e.$$typeof===c||e.$$typeof===y||e.$$typeof===g||e.$$typeof===A||e.$$typeof===m)},_M.typeOf=b,_M}();var zM=BM.exports,UM={};UM[zM.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},UM[zM.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function WM(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var HM=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},VM=function(e,t,n){HM(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var qM={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GM=/[A-Z]|^ms/g,XM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ZM=function(e){return 45===e.charCodeAt(1)},YM=function(e){return null!=e&&"boolean"!=typeof e},KM=SM((function(e){return ZM(e)?e:e.replace(GM,"-$&").toLowerCase()})),QM=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(XM,(function(e,t,n){return $M={name:t,styles:n,next:$M},t}))}return 1===qM[e]||ZM(e)||"number"!=typeof t||0===t?t:t+"px"};function JM(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return $M={name:n.name,styles:n.styles,next:$M},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)$M={name:r.name,styles:r.styles,next:$M},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=JM(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":YM(o)&&(r+=KM(a)+":"+QM(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=JM(e,t,o);switch(a){case"animation":case"animationName":r+=KM(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var u=0;u<o.length;u++)YM(o[u])&&(r+=KM(a)+":"+QM(a,o[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=$M,a=n(e);return $M=i,JM(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var $M,eD=/label:\s*([^\s;\n{]+)\s*(;|$)/g,tD=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";$M=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=JM(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=JM(n,t,e[o]),r&&(i+=a[o]);eD.lastIndex=0;for(var s,u="";null!==(s=eD.exec(i));)u+="-"+s[1];var l=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+u;return{name:l,styles:i,next:$M}},nD=!!PL.useInsertionEffect&&PL.useInsertionEffect,rD=nD||function(e){return e()},iD=nD||kL.useLayoutEffect,aD={}.hasOwnProperty,oD=kL.createContext("undefined"!=typeof HTMLElement?DM({key:"css"}):null);oD.Provider;var sD=function(e){return kL.forwardRef((function(t,n){var r=kL.useContext(oD);return e(t,r,n)}))},uD=kL.createContext({}),lD=function(){return kL.useContext(uD)},cD=IM((function(e){return IM((function(t){return function(e,t){return"function"==typeof t?t(e):FM({},e,t)}(e,t)}))})),dD=function(e){var t=kL.useContext(uD);return e.theme!==t&&(t=cD(t)(e.theme)),kL.createElement(uD.Provider,{value:t},e.children)},fD="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",pD=function(e,t){var n={};for(var r in t)aD.call(t,r)&&(n[r]=t[r]);return n[fD]=e,n},hD=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return HM(t,n,r),rD((function(){return VM(t,n,r)})),null},mD=sD((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[fD],a=[r],o="";"string"==typeof e.className?o=WM(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=tD(a,void 0,kL.useContext(uD));o+=t.key+"-"+s.name;var u={};for(var l in e)aD.call(e,l)&&"css"!==l&&l!==fD&&(u[l]=e[l]);return u.ref=n,u.className=o,kL.createElement(kL.Fragment,null,kL.createElement(hD,{cache:t,serialized:s,isStringTag:"string"==typeof i}),kL.createElement(i,u))})),yD=mD,gD=function(e,t){var n=arguments;if(null==t||!aD.call(t,"css"))return kL.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=yD,i[1]=pD(e,t);for(var a=2;a<r;a++)i[a]=n[a];return kL.createElement.apply(null,i)},AD=sD((function(e,t){var n=e.styles,r=tD([n],void 0,kL.useContext(uD)),i=kL.useRef();return iD((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(a=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}}),[t]),iD((function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&VM(t,r.next,!0),n.tags.length){var a=n.tags[n.tags.length-1].nextElementSibling;n.before=a,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function bD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tD(t)}var vD=function(){var e=bD.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},wD=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var a=t[r];if(null!=a){var o=void 0;switch(typeof a){case"boolean":break;case"object":if(Array.isArray(a))o=e(a);else for(var s in o="",a)a[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};var xD=function(e){var t=e.cache,n=e.serializedArr;return rD((function(){for(var e=0;e<n.length;e++)VM(t,n[e],!1)})),null},ED=sD((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=tD(r,t.registered);return n.push(a),HM(t,a,!1),t.key+"-"+a.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return function(e,t,n){var r=[],i=WM(e,r,n);return r.length<2?n:i+t(r)}(t.registered,r,wD(n))},theme:kL.useContext(uD)},a=e.children(i);return!0,kL.createElement(kL.Fragment,null,kL.createElement(xD,{cache:t,serializedArr:n}),a)}));const TD=kL.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),CD=kL.createContext({}),ID=kL.createContext(null),SD="undefined"!=typeof document,kD=SD?kL.useLayoutEffect:kL.useEffect,OD=kL.createContext({strict:!1});function PD(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function RD(e){return"string"==typeof e||Array.isArray(e)}function ND(e){return"object"==typeof e&&"function"==typeof e.start}const LD=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MD=["initial",...LD];function DD(e){return ND(e.animate)||MD.some((t=>RD(e[t])))}function FD(e){return Boolean(DD(e)||e.variants)}function jD(e){const{initial:t,animate:n}=function(e,t){if(DD(e)){const{initial:t,animate:n}=e;return{initial:!1===t||RD(t)?t:void 0,animate:RD(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,kL.useContext(CD));return kL.useMemo((()=>({initial:t,animate:n})),[BD(t),BD(n)])}function BD(e){return Array.isArray(e)?e.join(" "):e}const _D={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zD={};for(const e in _D)zD[e]={isEnabled:t=>_D[e].some((e=>!!t[e]))};const UD=kL.createContext({}),WD=kL.createContext({}),HD=Symbol.for("motionComponentSymbol");function VD({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(const t in e)zD[t]={...zD[t],...e[t]}}(e);const a=kL.forwardRef((function(a,o){let s;const u={...kL.useContext(TD),...a,layoutId:qD(a)},{isStatic:l}=u,c=jD(a),d=r(a,l);if(!l&&SD){c.visualElement=function(e,t,n,r){const{visualElement:i}=kL.useContext(CD),a=kL.useContext(OD),o=kL.useContext(ID),s=kL.useContext(TD).reducedMotion,u=kL.useRef();r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:s}));const l=u.current;return kL.useInsertionEffect((()=>{l&&l.update(n,o)})),kD((()=>{l&&l.render()})),kL.useEffect((()=>{l&&l.updateFeatures()})),(window.HandoffAppearAnimations?kD:kL.useEffect)((()=>{l&&l.animationState&&l.animationState.animateChanges()})),l}(i,d,u,t);const n=kL.useContext(WD),r=kL.useContext(OD).strict;c.visualElement&&(s=c.visualElement.loadFeatures(u,r,e,n))}return kL.createElement(CD.Provider,{value:c},s&&c.visualElement?kL.createElement(s,{visualElement:c.visualElement,...u}):null,n(i,a,function(e,t,n){return kL.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):PD(n)&&(n.current=r))}),[t])}(d,c.visualElement,o),d,l,c.visualElement))}));return a[HD]=i,a}function qD({layoutId:e}){const t=kL.useContext(UD).id;return t&&void 0!==e?t+"-"+e:e}function GD(e){function t(t,n={}){return VD(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const XD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ZD(e){return"string"==typeof e&&!e.includes("-")&&!!(XD.indexOf(e)>-1||/[A-Z]/.test(e))}const YD={};const KD=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],QD=new Set(KD);function JD(e,{layout:t,layoutId:n}){return QD.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!YD[e]||"opacity"===e)}const $D=e=>Boolean(e&&e.getVelocity),eF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tF=KD.length;const nF=e=>t=>"string"==typeof t&&t.startsWith(e),rF=nF("--"),iF=nF("var(--"),aF=(e,t)=>t&&"number"==typeof e?t.transform(e):e,oF=(e,t,n)=>Math.min(Math.max(n,e),t),sF={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},uF={...sF,transform:e=>oF(0,1,e)},lF={...sF,default:1},cF=e=>Math.round(1e5*e)/1e5,dF=/(-)?([\d]*\.?[\d])+/g,fF=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function hF(e){return"string"==typeof e}const mF=e=>({test:t=>hF(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),yF=mF("deg"),gF=mF("%"),AF=mF("px"),bF=mF("vh"),vF=mF("vw"),wF={...gF,parse:e=>gF.parse(e)/100,transform:e=>gF.transform(100*e)},xF={...sF,transform:Math.round},EF={borderWidth:AF,borderTopWidth:AF,borderRightWidth:AF,borderBottomWidth:AF,borderLeftWidth:AF,borderRadius:AF,radius:AF,borderTopLeftRadius:AF,borderTopRightRadius:AF,borderBottomRightRadius:AF,borderBottomLeftRadius:AF,width:AF,maxWidth:AF,height:AF,maxHeight:AF,size:AF,top:AF,right:AF,bottom:AF,left:AF,padding:AF,paddingTop:AF,paddingRight:AF,paddingBottom:AF,paddingLeft:AF,margin:AF,marginTop:AF,marginRight:AF,marginBottom:AF,marginLeft:AF,rotate:yF,rotateX:yF,rotateY:yF,rotateZ:yF,scale:lF,scaleX:lF,scaleY:lF,scaleZ:lF,skew:yF,skewX:yF,skewY:yF,distance:AF,translateX:AF,translateY:AF,translateZ:AF,x:AF,y:AF,z:AF,perspective:AF,transformPerspective:AF,opacity:uF,originX:wF,originY:wF,originZ:AF,zIndex:xF,fillOpacity:uF,strokeOpacity:uF,numOctaves:xF};function TF(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let u=!1,l=!1,c=!0;for(const e in t){const n=t[e];if(rF(e)){a[e]=n;continue}const r=EF[e],d=aF(n,r);if(QD.has(e)){if(u=!0,o[e]=d,!c)continue;n!==(r.default||0)&&(c=!1)}else e.startsWith("origin")?(l=!0,s[e]=d):i[e]=d}if(t.transform||(u||r?i.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let t=0;t<tF;t++){const n=KD[t];void 0!==e[n]&&(a+=`${eF[n]||n}(${e[n]}) `)}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}(e.transform,n,c,r):i.transform&&(i.transform="none")),l){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;i.transformOrigin=`${e} ${t} ${n}`}}const CF=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function IF(e,t,n){for(const r in t)$D(t[r])||JD(r,n)||(e[r]=t[r])}function SF(e,t,n){const r={};return IF(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return kL.useMemo((()=>{const r=CF();return TF(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function kF(e,t,n){const r={},i=SF(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const OF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function PF(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||OF.has(e)}let RF=e=>!PF(e);try{(NF=require("@emotion/is-prop-valid").default)&&(RF=e=>e.startsWith("on")?!PF(e):NF(e))}catch(G6){}var NF;function LF(e,t,n){return"string"==typeof e?e:AF.transform(t+n*e)}const MF={offset:"stroke-dashoffset",array:"stroke-dasharray"},DF={offset:"strokeDashoffset",array:"strokeDasharray"};function FF(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d,f){if(TF(e,l,c,f),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:m}=e;p.transform&&(m&&(h.transform=p.transform),delete p.transform),m&&(void 0!==i||void 0!==a||h.transform)&&(h.transformOrigin=function(e,t,n){return`${LF(t,e.x,e.width)} ${LF(n,e.y,e.height)}`}(m,void 0!==i?i:.5,void 0!==a?a:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==o&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?MF:DF;e[a.offset]=AF.transform(-r);const o=AF.transform(t),s=AF.transform(n);e[a.array]=`${o} ${s}`}(p,o,s,u,!1)}const jF=()=>({...CF(),attrs:{}}),BF=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _F(e,t,n,r){const i=kL.useMemo((()=>{const n=jF();return FF(n,t,{enableHardwareAcceleration:!1},BF(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};IF(t,e.style,e),i.style={...t,...i.style}}return i}function zF(e=!1){return(t,n,r,{latestValues:i},a)=>{const o=(ZD(t)?_F:kF)(n,i,a,t),s=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(RF(i)||!0===n&&PF(i)||!t&&!PF(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),u={...s,...o,ref:r},{children:l}=n,c=kL.useMemo((()=>$D(l)?l.get():l),[l]);return kL.createElement(t,{...u,children:c})}}const UF=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function WF(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const HF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function VF(e,t,n,r){WF(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(HF.has(n)?n:UF(n),t.attrs[n])}function qF(e,t){const{style:n}=e,r={};for(const i in n)($D(n[i])||t.style&&$D(t.style[i])||JD(i,e))&&(r[i]=n[i]);return r}function GF(e,t){const n=qF(e,t);for(const r in e)if($D(e[r])||$D(t[r])){n[-1!==KD.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function XF(e,t,n,r={},i={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),t}function ZF(e){const t=kL.useRef(null);return null===t.current&&(t.current=e()),t.current}const YF=e=>Array.isArray(e),KF=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),QF=e=>YF(e)?e[e.length-1]||0:e;function JF(e){const t=$D(e)?e.get():e;return KF(t)?t.toValue():t}const $F=e=>(t,n)=>{const r=kL.useContext(CD),i=kL.useContext(ID),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:ej(r,i,a,e),renderState:t()};return n&&(o.mount=e=>n(r,e,o)),o}(e,t,r,i);return n?a():ZF(a)};function ej(e,t,n,r){const i={},a=r(e,{});for(const e in a)i[e]=JF(a[e]);let{initial:o,animate:s}=e;const u=DD(e),l=FD(e);t&&l&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?s:o;if(d&&"boolean"!=typeof d&&!ND(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=XF(e,t);if(!n)return;const{transitionEnd:r,transition:a,...o}=n;for(const e in o){let t=o[e];if(Array.isArray(t)){t=t[c?t.length-1:0]}null!==t&&(i[e]=t)}for(const e in r)i[e]=r[e]}))}return i}const tj={useVisualState:$F({scrapeMotionValuesFromProps:GF,createRenderState:jF,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}FF(n,r,{enableHardwareAcceleration:!1},BF(t.tagName),e.transformTemplate),VF(t,n)}})},nj={useVisualState:$F({scrapeMotionValuesFromProps:qF,createRenderState:CF})};function rj(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ij=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function aj(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const oj=e=>t=>ij(t)&&e(t,aj(t));function sj(e,t,n,r){return rj(e,t,oj(n),r)}const uj=(e,t)=>n=>t(e(n)),lj=(...e)=>e.reduce(uj);function cj(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const dj=cj("dragHorizontal"),fj=cj("dragVertical");function pj(e){let t=!1;if("y"===e)t=fj();else if("x"===e)t=dj();else{const e=dj(),n=fj();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function hj(){const e=pj(!0);return!e||(e(),!1)}class mj{constructor(e){this.isMounted=!1,this.node=e}update(){}}const yj=e=>e;const gj=["prepare","read","update","preRender","render","postRender"];const{schedule:Aj,cancel:bj,state:vj,steps:wj}=function(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=gj.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{const u=s&&i,l=u?t:n;return a&&o.add(e),-1===l.indexOf(e)&&(l.push(e),u&&i&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),o.delete(e)},process:u=>{if(i)a=!0;else{if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(u),o.has(r)&&(s.schedule(r),e())}i=!1,a&&(a=!1,s.process(u))}}};return s}((()=>n=!0)),e)),{}),o=e=>a[e].process(i),s=a=>{n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1),i.timestamp=a,i.isProcessing=!0,gj.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(s))},u=gj.reduce(((t,o)=>{const u=a[o];return t[o]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(s)),u.schedule(t,a,o)),t}),{});return{schedule:u,cancel:e=>gj.forEach((t=>a[t].cancel(e))),state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:yj,!0);function xj(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return sj(e.current,n,((n,i)=>{if("touch"===n.type||hj())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Aj.update((()=>a[r](n,i)))}),{passive:!e.getProps()[r]})}const Ej=(e,t)=>!!t&&(e===t||Ej(e,t.parentElement));function Tj(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,aj(n))}const Cj=new WeakMap,Ij=new WeakMap,Sj=e=>{const t=Cj.get(e.target);t&&t(e)},kj=e=>{e.forEach(Sj)};function Oj(e,t,n){const r=function({root:e,...t}){const n=e||document;Ij.has(n)||Ij.set(n,{});const r=Ij.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kj,{root:e,...t})),r[i]}(t);return Cj.set(e,n),r.observe(e),()=>{Cj.delete(e),r.unobserve(e)}}const Pj={some:0,all:1};const Rj={inView:{Feature:class extends mj{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Pj[r]};return Oj(this.node.current,a,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends mj{constructor(){super(...arguments),this.removeStartListeners=yj,this.removeEndListeners=yj,this.removeAccessibleListeners=yj,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=sj(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Aj.update((()=>{Ej(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=sj(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=lj(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=rj(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rj(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Tj("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Aj.update((()=>n(e,t)))}))})),Tj("down",((e,t)=>{this.startPress(e,t)}))})),t=rj(this.node.current,"blur",(()=>{this.isPressing&&Tj("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=lj(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Aj.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!hj()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Aj.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=sj(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=rj(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=lj(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends mj{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lj(rj(this.node.current,"focus",(()=>this.onFocus())),rj(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends mj{mount(){this.unmount=lj(xj(this.node,!0),xj(this.node,!1))}unmount(){}}}};function Nj(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Lj(e,t,n){const r=e.getProps();return XF(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Mj="data-"+UF("framerAppearId");let Dj=yj,Fj=yj;const jj=e=>1e3*e,Bj=e=>e/1e3,_j=!1,zj=e=>Array.isArray(e)&&"number"==typeof e[0];function Uj(e){return Boolean(!e||"string"==typeof e&&Hj[e]||zj(e)||Array.isArray(e)&&e.every(Uj))}const Wj=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wj([0,.65,.55,1]),circOut:Wj([.55,0,1,.45]),backIn:Wj([.31,.01,.66,-.59]),backOut:Wj([.33,1.53,.69,.99])};function Vj(e){if(e)return zj(e)?Wj(e):Array.isArray(e)?e.map(Vj):Hj[e]}const qj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gj=1e-7,Xj=12;function Zj(e,t,n,r){if(e===t&&n===r)return yj;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=qj(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>Gj&&++s<Xj);return o}(t,0,1,e,n);return e=>0===e||1===e?e:qj(i(e),t,r)}const Yj=Zj(.42,0,1,1),Kj=Zj(0,0,.58,1),Qj=Zj(.42,0,.58,1),Jj=e=>Array.isArray(e)&&"number"!=typeof e[0],$j=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eB=e=>t=>1-e(1-t),tB=e=>1-Math.sin(Math.acos(e)),nB=eB(tB),rB=$j(nB),iB=Zj(.33,1.53,.69,.99),aB=eB(iB),oB=$j(aB),sB={linear:yj,easeIn:Yj,easeInOut:Qj,easeOut:Kj,circIn:tB,circInOut:rB,circOut:nB,backIn:aB,backInOut:oB,backOut:iB,anticipate:e=>(e*=2)<1?.5*aB(e):.5*(2-Math.pow(2,-10*(e-1)))},uB=e=>{if(Array.isArray(e)){Fj(4===e.length);const[t,n,r,i]=e;return Zj(t,n,r,i)}return"string"==typeof e?sB[e]:e},lB=(e,t)=>n=>Boolean(hF(n)&&pF.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),cB=(e,t,n)=>r=>{if(!hF(r))return r;const[i,a,o,s]=r.match(dF);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},dB={...sF,transform:e=>Math.round((e=>oF(0,255,e))(e))},fB={test:lB("rgb","red"),parse:cB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+dB.transform(e)+", "+dB.transform(t)+", "+dB.transform(n)+", "+cF(uF.transform(r))+")"};const pB={test:lB("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:fB.transform},hB={test:lB("hsl","hue"),parse:cB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gF.transform(cF(t))+", "+gF.transform(cF(n))+", "+cF(uF.transform(r))+")"},mB={test:e=>fB.test(e)||pB.test(e)||hB.test(e),parse:e=>fB.test(e)?fB.parse(e):hB.test(e)?hB.parse(e):pB.parse(e),transform:e=>hF(e)?e:e.hasOwnProperty("red")?fB.transform(e):hB.transform(e)},yB=(e,t,n)=>-n*e+n*t+e;function gB(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const AB=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},bB=[pB,fB,hB];function vB(e){const t=(n=e,bB.find((e=>e.test(n))));var n;let r=t.parse(e);return t===hB&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=gB(s,r,e+1/3),a=gB(s,r,e),o=gB(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const wB=(e,t)=>{const n=vB(e),r=vB(t),i={...n};return e=>(i.red=AB(n.red,r.red,e),i.green=AB(n.green,r.green,e),i.blue=AB(n.blue,r.blue,e),i.alpha=yB(n.alpha,r.alpha,e),fB.transform(i))};const xB={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:yj},EB={regex:fF,countKey:"Colors",token:"${c}",parse:mB.parse},TB={regex:dF,countKey:"Numbers",token:"${n}",parse:sF.parse};function CB(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function IB(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&CB(n,xB),CB(n,EB),CB(n,TB),n}function SB(e){return IB(e).values}function kB(e){const{values:t,numColors:n,numVars:r,tokenised:i}=IB(e),a=t.length;return e=>{let t=i;for(let i=0;i<a;i++)t=i<r?t.replace(xB.token,e[i]):i<r+n?t.replace(EB.token,mB.transform(e[i])):t.replace(TB.token,cF(e[i]));return t}}const OB=e=>"number"==typeof e?0:e;const PB={test:function(e){var t,n;return isNaN(e)&&hF(e)&&((null===(t=e.match(dF))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(fF))||void 0===n?void 0:n.length)||0)>0},parse:SB,createTransformer:kB,getAnimatableNone:function(e){const t=SB(e);return kB(e)(t.map(OB))}},RB=(e,t)=>n=>`${n>0?t:e}`;function NB(e,t){return"number"==typeof e?n=>yB(e,t,n):mB.test(e)?wB(e,t):e.startsWith("var(")?RB(e,t):DB(e,t)}const LB=(e,t)=>{const n=[...e],r=n.length,i=e.map(((e,n)=>NB(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},MB=(e,t)=>{const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=NB(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}},DB=(e,t)=>{const n=PB.createTransformer(t),r=IB(e),i=IB(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?lj(LB(r.values,i.values),n):RB(e,t)},FB=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},jB=(e,t)=>n=>yB(e,t,n);function BB(e,t,n){const r=[],i=n||("number"==typeof(a=e[0])?jB:"string"==typeof a?mB.test(a)?wB:DB:Array.isArray(a)?LB:"object"==typeof a?MB:jB);var a;const o=e.length-1;for(let n=0;n<o;n++){let a=i(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||yj:t;a=lj(e,a)}r.push(a)}return r}function _B(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Fj(a===t.length),1===a)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=BB(t,r,i),s=o.length,u=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=FB(e[n],e[n+1],t);return o[n](r)};return n?t=>u(oF(e[0],e[a-1],t)):u}function zB(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=FB(0,t,r);e.push(yB(n,1,i))}}(t,e.length-1),t}function UB({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Jj(r)?r.map(uB):uB(r),a={done:!1,value:t[0]},o=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:zB(t),e),s=_B(o,t,{ease:Array.isArray(i)?i:(u=t,l=i,u.map((()=>l||Qj)).splice(0,u.length-1))});var u,l;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}function WB(e,t){return t?e*(1e3/t):0}const HB=5;function VB(e,t,n){const r=Math.max(t-HB,0);return WB(n-e(r),t-r)}const qB=.001,GB=.01,XB=10,ZB=.05,YB=1;function KB({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;Dj(e<=jj(XB));let o=1-t;o=oF(ZB,YB,o),e=oF(GB,XB,Bj(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=JB(t,o),u=Math.exp(-i);return qB-a/s*u},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,u=Math.exp(-r),l=JB(Math.pow(t,2),o);return(-i(t)+qB>0?-1:1)*((a-s)*u)/l}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-qB,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<QB;n++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=jj(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const QB=12;function JB(e,t){return e*Math.sqrt(1-t*t)}const $B=["duration","bounce"],e_=["stiffness","damping","mass"];function t_(e,t){return t.some((t=>void 0!==e[t]))}function n_({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!t_(e,e_)&&t_(e,$B)){const n=KB(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=c?-Bj(c):0,h=u/(2*Math.sqrt(s*l)),m=a-i,y=Bj(Math.sqrt(s/l)),g=Math.abs(m)<5;let A;if(n||(n=g?.01:2),t||(t=g?.005:.5),h<1){const e=JB(y,h);A=t=>{const n=Math.exp(-h*y*t);return a-n*((p+h*y*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)A=e=>a-Math.exp(-y*e)*(m+(p+y*m)*e);else{const e=y*Math.sqrt(h*h-1);A=t=>{const n=Math.exp(-h*y*t),r=Math.min(e*t,300);return a-n*((p+h*y*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=A(e);if(f)o.done=e>=d;else{let i=p;0!==e&&(i=h<1?VB(A,e,r):0);const s=Math.abs(i)<=n,u=Math.abs(a-r)<=t;o.done=s&&u}return o.value=o.done?a:r,o}}}function r_({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?u:void 0===u||Math.abs(s-e)<Math.abs(u-e)?s:u;let h=n*t;const m=d+h,y=void 0===o?m:o(m);y!==m&&(h=y-d);const g=e=>-h*Math.exp(-e/r),A=e=>y+g(e),b=e=>{const t=g(e),n=A(e);f.done=Math.abs(t)<=l,f.value=f.done?y:n};let v,w;const x=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==u&&t>u)&&(v=e,w=n_({keyframes:[f.value,p(f.value)],velocity:VB(A,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==v||(t=!0,b(e),x(e)),void 0!==v&&e>v?w.next(e-v):(!t&&b(e),f)}}}const i_=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Aj.update(t,!0),stop:()=>bj(t),now:()=>vj.isProcessing?vj.timestamp:performance.now()}},a_=2e4;function o_(e){let t=0;let n=e.next(t);for(;!n.done&&t<a_;)t+=50,n=e.next(t);return t>=a_?1/0:t}const s_={decay:r_,inertia:r_,tween:UB,keyframes:UB,spring:n_};function u_({autoplay:e=!0,delay:t=0,driver:n=i_,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:s="loop",onPlay:u,onStop:l,onComplete:c,onUpdate:d,...f}){let p,h,m=1,y=!1;const g=()=>{h=new Promise((e=>{p=e}))};let A;g();const b=s_[i]||UB;let v;b!==UB&&"number"!=typeof r[0]&&(v=_B([0,100],r,{clamp:!1}),r=[0,100]);const w=b({...f,keyframes:r});let x;"mirror"===s&&(x=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let E="idle",T=null,C=null,I=null;null===w.calculatedDuration&&a&&(w.calculatedDuration=o_(w));const{calculatedDuration:S}=w;let k=1/0,O=1/0;null!==S&&(k=S+o,O=k*(a+1)-o);let P=0;const R=e=>{if(null===C)return;m>0&&(C=Math.min(C,e)),m<0&&(C=Math.min(e-O/m,C)),P=null!==T?T:Math.round(e-C)*m;const n=P-t*(m>=0?1:-1),i=m>=0?n<0:n>O;P=Math.max(n,0),"finished"===E&&null===T&&(P=O);let u=P,l=w;if(a){const e=P/k;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,a+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,o&&(n-=o/k)):"mirror"===s&&(l=x));let i=oF(0,1,n);P>O&&(i="reverse"===s&&r?1:0),u=i*k}const c=i?{done:!1,value:r[0]}:l.next(u);v&&(c.value=v(c.value));let{done:f}=c;i||null===S||(f=m>=0?P>=O:P<=0);const p=null===T&&("finished"===E||"running"===E&&f);return d&&d(c.value),p&&M(),c},N=()=>{A&&A.stop(),A=void 0},L=()=>{E="idle",N(),p(),g(),C=I=null},M=()=>{E="finished",c&&c(),N(),p()},D=()=>{if(y)return;A||(A=n(R));const e=A.now();u&&u(),null!==T?C=e-T:C&&"finished"!==E||(C=e),"finished"===E&&g(),I=C,T=null,E="running",A.start()};e&&D();const F={then:(e,t)=>h.then(e,t),get time(){return Bj(P)},set time(e){e=jj(e),P=e,null===T&&A&&0!==m?C=A.now()-e/m:T=e},get duration(){const e=null===w.calculatedDuration?o_(w):w.calculatedDuration;return Bj(e)},get speed(){return m},set speed(e){e!==m&&A&&(m=e,F.time=Bj(P))},get state(){return E},play:D,pause:()=>{E="paused",T=P},stop:()=>{y=!0,"idle"!==E&&(E="idle",l&&l(),L())},cancel:()=>{null!==I&&R(I),L()},complete:()=>{E="finished"},sample:e=>(C=0,R(e))};return F}const l_=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),c_=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function d_(e,t,{onUpdate:n,onComplete:r,...i}){if(!(l_()&&c_.has(t)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let a,o,s=!1;const u=()=>{o=new Promise((e=>{a=e}))};u();let{keyframes:l,duration:c=300,ease:d,times:f}=i;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!Uj(t.ease))(t,i)){const e=u_({...i,repeat:0,delay:0});let t={done:!1,value:l[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;f=void 0,l=n,c=r-10,d="linear"}const p=function(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=Vj(s);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"})}(e.owner.current,t,l,{...i,duration:c,ease:d,times:f}),h=()=>p.cancel(),m=()=>{Aj.update(h),a(),u()};return p.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(l,i)),r&&r(),m()},{then:(e,t)=>o.then(e,t),get timeline(){return p.timeline},set timeline(e){p.timeline=e,p.onfinish=null},get time(){return Bj(p.currentTime||0)},set time(e){p.currentTime=jj(e)},get speed(){return p.playbackRate},set speed(e){p.playbackRate=e},get duration(){return Bj(c)},play:()=>{s||(p.play(),bj(h))},pause:()=>p.pause(),stop:()=>{if(s=!0,"idle"===p.playState)return;const{currentTime:t}=p;if(t){const n=u_({...i,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}m()},complete:()=>p.finish(),cancel:m}}const f_={type:"spring",stiffness:500,damping:25,restSpeed:10},p_={type:"keyframes",duration:.8},h_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},m_=(e,{keyframes:t})=>t.length>2?p_:QD.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:f_:h_,y_=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!PB.test(t)&&"0"!==t||t.startsWith("url("))),g_=new Set(["brightness","contrast","saturate","opacity"]);function A_(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(dF)||[];if(!r)return e;const i=n.replace(r,"");let a=g_.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const b_=/([a-z-]*)\(.*?\)/g,v_={...PB,getAnimatableNone:e=>{const t=e.match(b_);return t?t.map(A_).join(" "):e}},w_={...EF,color:mB,backgroundColor:mB,outlineColor:mB,fill:mB,stroke:mB,borderColor:mB,borderTopColor:mB,borderRightColor:mB,borderBottomColor:mB,borderLeftColor:mB,filter:v_,WebkitFilter:v_},x_=e=>w_[e];function E_(e,t){let n=x_(e);return n!==v_&&(n=PB),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const T_=e=>/^0[^.\s]+$/.test(e);function C_(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||T_(e):void 0}function I_(e,t){return e[t]||e.default||e}const S_=(e,t,n,r={})=>i=>{const a=I_(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s-=jj(o);const u=function(e,t,n,r){const i=y_(t,n);let a;a=Array.isArray(n)?[...n]:[null,n];const o=void 0!==r.from?r.from:e.get();let s;const u=[];for(let e=0;e<a.length;e++)null===a[e]&&(a[e]=0===e?o:a[e-1]),C_(a[e])&&u.push(e),"string"==typeof a[e]&&"none"!==a[e]&&"0"!==a[e]&&(s=a[e]);if(i&&u.length&&s)for(let e=0;e<u.length;e++)a[u[e]]=E_(t,s);return a}(t,e,n,a),l=u[0],c=u[u.length-1],d=y_(e,l),f=y_(e,c);let p={keyframes:u,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}(a)||(p={...p,...m_(e,p)}),p.duration&&(p.duration=jj(p.duration)),p.repeatDelay&&(p.repeatDelay=jj(p.repeatDelay)),!d||!f||_j||!1===a.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:yj,pause:yj,stop:yj,then:e=>(e(),Promise.resolve()),cancel:yj,complete:yj});return t?u_({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=d_(t,e,p);if(n)return n}return u_(p)};function k_(e){return Boolean($D(e)&&e.add)}function O_(e,t){-1===e.indexOf(t)&&e.push(t)}function P_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class R_{constructor(){this.subscriptions=[]}add(e){return O_(this.subscriptions,e),()=>P_(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class N_{constructor(e,t={}){var n;this.version="10.13.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=vj;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Aj.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Aj.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new R_);const n=this.events[e].add(t);return"change"===e?()=>{n(),Aj.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?WB(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function L_(e,t){return new N_(e,t)}const M_=e=>t=>t.test(e),D_=[sF,AF,gF,yF,vF,bF,{test:e=>"auto"===e,parse:e=>e}],F_=e=>D_.find(M_(e)),j_=[...D_,mB,PB],B_=e=>j_.find(M_(e));function __(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,L_(n))}function z_(e,t){if(!t)return;return(t[e]||t.default||t).from}function U_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function W_(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const t in s){const r=e.getValue(t),i=s[t];if(!r||void 0===i||c&&U_(c,t))continue;const o={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[Mj];n&&(o.elapsed=window.HandoffAppearAnimations(n,t,r,Aj))}r.start(S_(t,r,i,e.shouldReduceMotion&&QD.has(t)?{type:!1}:o));const d=r.animation;k_(u)&&(u.add(t),d.then((()=>u.remove(t)))),l.push(d)}return o&&Promise.all(l).then((()=>{o&&function(e,t){const n=Lj(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const t in a)__(e,t,QF(a[t]))}(e,o)})),l}function H_(e,t,n={}){const r=Lj(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(W_(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=1===i?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(V_).forEach(((e,r)=>{e.notify("AnimationStart",t),o.push(H_(e,t,{...a,delay:n+u(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(o)}(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[a,o]:[o,a];return e().then((()=>t()))}return Promise.all([a(),o(n.delay)])}function V_(e,t){return e.sortNodePosition(t)}const q_=[...LD].reverse(),G_=LD.length;function X_(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>H_(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=H_(e,t,n);else{const i="function"==typeof t?Lj(e,t,n.custom):t;r=Promise.all(W_(e,i,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function Z_(e){let t=X_(e);const n={animate:K_(!0),whileInView:K_(),whileHover:K_(),whileTap:K_(),whileDrag:K_(),whileFocus:K_(),exit:K_()};let r=!0;const i=(t,n)=>{const r=Lj(e,n);if(r){const{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function a(a,o){const s=e.getProps(),u=e.getVariantContext(!0)||{},l=[],c=new Set;let d={},f=1/0;for(let t=0;t<G_;t++){const p=q_[t],h=n[p],m=void 0!==s[p]?s[p]:u[p],y=RD(m),g=p===o?h.isActive:null;!1===g&&(f=t);let A=m===u[p]&&m!==s[p]&&y;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),h.protectedKeys={...d},!h.isActive&&null===g||!m&&!h.prevProp||ND(m)||"boolean"==typeof m)continue;const b=Y_(h.prevProp,m);let v=b||p===o&&h.isActive&&!A&&y||t>f&&y;const w=Array.isArray(m)?m:[m];let x=w.reduce(i,{});!1===g&&(x={});const{prevResolvedValues:E={}}=h,T={...E,...x},C=e=>{v=!0,c.delete(e),h.needsAnimating[e]=!0};for(const e in T){const t=x[e],n=E[e];d.hasOwnProperty(e)||(t!==n?YF(t)&&YF(n)?!Nj(t,n)||b?C(e):h.protectedKeys[e]=!0:void 0!==t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=x,h.isActive&&(d={...d,...x}),r&&e.blockInitialAnimation&&(v=!1),v&&!A&&l.push(...w.map((e=>({animation:e,options:{type:p,...a}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),l.push({animation:t})}let p=Boolean(l.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r,i){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=a(i,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Y_(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Nj(t,e)}function K_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Q_=0;const J_={animation:{Feature:class extends mj{constructor(e){super(e),e.animationState||(e.animationState=Z_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ND(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends mj{constructor(){super(...arguments),this.id=Q_++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},$_=(e,t)=>Math.abs(e-t);class ez{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=rz(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=$_(e.x,t.x),r=$_(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=vj;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=tz(t,this.transformPagePoint),Aj.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,i=rz("pointercancel"===e.type?this.lastMoveEventInfo:tz(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!ij(e))return;this.handlers=t,this.transformPagePoint=n;const r=tz(aj(e),this.transformPagePoint),{point:i}=r,{timestamp:a}=vj;this.history=[{...i,timestamp:a}];const{onSessionStart:o}=t;o&&o(e,rz(r,this.history)),this.removeListeners=lj(sj(window,"pointermove",this.handlePointerMove),sj(window,"pointerup",this.handlePointerUp),sj(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bj(this.updatePoint)}}function tz(e,t){return t?{point:t(e.point)}:e}function nz(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rz({point:e},t){return{point:e,delta:nz(e,az(t)),offset:nz(e,iz(t)),velocity:oz(t,.1)}}function iz(e){return e[0]}function az(e){return e[e.length-1]}function oz(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=az(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>jj(t)));)n--;if(!r)return{x:0,y:0};const a=Bj(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function sz(e){return e.max-e.min}function uz(e,t=0,n=.01){return Math.abs(e-t)<=n}function lz(e,t,n,r=.5){e.origin=r,e.originPoint=yB(t.min,t.max,e.origin),e.scale=sz(n)/sz(t),(uz(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=yB(n.min,n.max,e.origin)-e.originPoint,(uz(e.translate)||isNaN(e.translate))&&(e.translate=0)}function cz(e,t,n,r){lz(e.x,t.x,n.x,r?r.originX:void 0),lz(e.y,t.y,n.y,r?r.originY:void 0)}function dz(e,t,n){e.min=n.min+t.min,e.max=e.min+sz(t)}function fz(e,t,n){e.min=t.min-n.min,e.max=e.min+sz(t)}function pz(e,t,n){fz(e.x,t.x,n.x),fz(e.y,t.y,n.y)}function hz(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function mz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const yz=.35;function gz(e,t,n){return{min:Az(e,t),max:Az(e,n)}}function Az(e,t){return"number"==typeof e?e:e[t]||0}const bz=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),vz=()=>({x:{min:0,max:0},y:{min:0,max:0}});function wz(e){return[e("x"),e("y")]}function xz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ez(e){return void 0===e||1===e}function Tz({scale:e,scaleX:t,scaleY:n}){return!Ez(e)||!Ez(t)||!Ez(n)}function Cz(e){return Tz(e)||Iz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Iz(e){return Sz(e.x)||Sz(e.y)}function Sz(e){return e&&"0%"!==e}function kz(e,t,n){return n+t*(e-n)}function Oz(e,t,n,r,i){return void 0!==i&&(e=kz(e,i,r)),kz(e,n,r)+t}function Pz(e,t=0,n=1,r,i){e.min=Oz(e.min,t,n,r,i),e.max=Oz(e.max,t,n,r,i)}function Rz(e,{x:t,y:n}){Pz(e.x,t.translate,t.scale,t.originPoint),Pz(e.y,n.translate,n.scale,n.originPoint)}function Nz(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Lz(e,t){e.min=e.min+t,e.max=e.max+t}function Mz(e,t,[n,r,i]){const a=void 0!==t[i]?t[i]:.5,o=yB(e.min,e.max,a);Pz(e,t[n],t[r],o,t.scale)}const Dz=["x","scaleX","originX"],Fz=["y","scaleY","originY"];function jz(e,t){Mz(e.x,t,Dz),Mz(e.y,t,Fz)}function Bz(e,t){return xz(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const _z=new WeakMap;class zz{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vz(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new ez(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(aj(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pj(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wz((e=>{let t=this.getAxisMotionValue(e).get()||0;if(gF.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=sz(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),i&&Aj.update((()=>i(e,t)),!1,!0);const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:i}=this.getProps();i&&Aj.update((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Uz(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?yB(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?yB(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&PD(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:hz(e.x,n,i),y:hz(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=yz){return!1===e?e=0:!0===e&&(e=yz),{x:gz(e,"left","right"),y:gz(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wz((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!PD(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Bz(e,n),{scroll:i}=t;return i&&(Lz(r.x,i.offset.x),Lz(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:mz(e.x,t.x),y:mz(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=xz(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},u=wz((o=>{if(!Uz(o,t,this.currentDirection))return;let u=s&&s[o]||{};a&&(u={min:0,max:0});const l=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(o,d)}));return Promise.all(u).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(S_(e,n,0,t))}stopAnimation(){wz((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wz((t=>{const{drag:n}=this.getProps();if(!Uz(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-yB(n,a,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!PD(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};wz((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=sz(e),i=sz(t);return i>r?n=FB(t.min,t.max-r,e.min):r>i&&(n=FB(e.min,e.max-i,t.min)),oF(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),wz((t=>{if(!Uz(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(yB(i,a,r[t]))}))}addListeners(){if(!this.visualElement.current)return;_z.set(this.visualElement,this);const e=sj(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();PD(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const i=rj(window,"resize",(()=>this.scalePositionWithinConstraints())),a=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wz((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=yz,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Uz(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Wz=e=>(t,n)=>{e&&Aj.update((()=>e(t,n)))};const Hz={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vz(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qz={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!AF.test(e))return e;e=parseFloat(e)}return`${Vz(e,t.target.x)}% ${Vz(e,t.target.y)}%`}},Gz={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=PB.parse(e);if(i.length>5)return r;const a=PB.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=yB(s,u,.5);return"number"==typeof i[2+o]&&(i[2+o]/=l),"number"==typeof i[3+o]&&(i[3+o]/=l),a(i)}};class Xz extends OL.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var a;a=Yz,Object.assign(YD,a),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Hz.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Aj.postRender((()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Zz(e){const[t,n]=function(){const e=kL.useContext(ID);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=kL.useId();return kL.useEffect((()=>r(i)),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}(),r=kL.useContext(UD);return OL.createElement(Xz,{...e,layoutGroup:r,switchLayoutGroup:kL.useContext(WD),isPresent:t,safeToRemove:n})}const Yz={borderRadius:{...qz,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qz,borderTopRightRadius:qz,borderBottomLeftRadius:qz,borderBottomRightRadius:qz,boxShadow:Gz},Kz=["TopLeft","TopRight","BottomLeft","BottomRight"],Qz=Kz.length,Jz=e=>"string"==typeof e?parseFloat(e):e,$z=e=>"number"==typeof e||AF.test(e);function eU(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const tU=rU(0,.5,nB),nU=rU(.5,.95,yj);function rU(e,t,n){return r=>r<e?0:r>t?1:n(FB(e,t,r))}function iU(e,t){e.min=t.min,e.max=t.max}function aU(e,t){iU(e.x,t.x),iU(e.y,t.y)}function oU(e,t,n,r,i){return e=kz(e-=t,1/n,r),void 0!==i&&(e=kz(e,1/i,r)),e}function sU(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){gF.test(t)&&(t=parseFloat(t),t=yB(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=yB(a.min,a.max,r);e===a&&(s-=t),e.min=oU(e.min,t,n,s,i),e.max=oU(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const uU=["x","scaleX","originX"],lU=["y","scaleY","originY"];function cU(e,t,n,r){sU(e.x,t,uU,n?n.x:void 0,r?r.x:void 0),sU(e.y,t,lU,n?n.y:void 0,r?r.y:void 0)}function dU(e){return 0===e.translate&&1===e.scale}function fU(e){return dU(e.x)&&dU(e.y)}function pU(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 hU(e){return sz(e.x)/sz(e.y)}class mU{constructor(){this.members=[]}add(e){O_(this.members,e),e.scheduleRender()}remove(e){if(P_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function yU(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:i}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),i&&(r+=`rotateY(${i}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return 1===o&&1===s||(r+=`scale(${o}, ${s})`),r||"none"}const gU=(e,t)=>e.depth-t.depth;class AU{constructor(){this.children=[],this.isDirty=!1}add(e){O_(this.children,e),this.isDirty=!0}remove(e){P_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gU),this.isDirty=!1,this.children.forEach(e)}}const bU=["","X","Y","Z"];let vU=0;const wU={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function xU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=vU++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;wU.totalNodes=wU.resolvedTargetDeltas=wU.recalculatedProjection=0,this.nodes.forEach(CU),this.nodes.forEach(NU),this.nodes.forEach(LU),this.nodes.forEach(IU),e=wU,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new AU)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new R_),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(a||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(bj(r),e(a-t))};return Aj.read(r,!0),()=>bj(r)}(r,250),Hz.hasAnimatedSinceResize&&(Hz.hasAnimatedSinceResize=!1,this.nodes.forEach(RU))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||_U,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=o.getProps(),u=!this.targetLayout||!pU(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);const t={...I_(i,"layout"),onPlay:a,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||RU(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,bj(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MU),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(kU);this.isUpdating||this.nodes.forEach(OU),this.isUpdating=!1,this.nodes.forEach(PU),this.nodes.forEach(EU),this.nodes.forEach(TU),this.clearAllSnapshots();const e=performance.now();vj.delta=oF(0,1e3/60,e-vj.timestamp),vj.timestamp=e,vj.isProcessing=!0,wj.update.process(vj),wj.preRender.process(vj),wj.render.process(vj),vj.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(SU),this.sharedNodes.forEach(DU)}scheduleUpdateProjection(){Aj.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Aj.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vz(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!fU(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Cz(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),function(e){zU||(zU=UU()?Math.round:e=>Math.round(2*e)/2);WU(e.x),WU(e.y)}(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return vz();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Lz(t.x,n.offset.x),Lz(t.y,n.offset.y)),t}removeElementScroll(e){const t=vz();aU(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;if(r!==this.root&&i&&a.layoutScroll){if(i.isRoot){aU(t,e);const{scroll:n}=this.root;n&&(Lz(t.x,-n.offset.x),Lz(t.y,-n.offset.y))}Lz(t.x,i.offset.x),Lz(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){const n=vz();aU(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&jz(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Cz(r.latestValues)&&jz(n,r.latestValues)}return Cz(this.latestValues)&&jz(n,this.latestValues),n}removeTransform(e){const t=vz();aU(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Cz(n.latestValues))continue;Tz(n.latestValues)&&n.updateSnapshot();const r=vz();aU(r,n.measurePageBox()),cU(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Cz(this.latestValues)&&cU(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==vj.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:a}=this.options;if(this.layout&&(i||a)){if(this.resolvedRelativeTargetAt=vj.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vz(),this.relativeTargetOrigin=vz(),pz(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),aU(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,s,u;if(this.target||(this.target=vz(),this.targetWithTransforms=vz()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,u=this.relativeParent.target,dz(o.x,s.x,u.x),dz(o.y,s.y,u.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):aU(this.target,this.layout.layoutBox),Rz(this.target,this.targetDelta)):aU(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vz(),this.relativeTargetOrigin=vz(),pz(this.relativeTargetOrigin,this.target,e.target),aU(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}wU.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Tz(this.parent.latestValues)&&!Iz(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===vj.timestamp&&(r=!1),r)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!a)return;aU(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const i=a.instance;i&&i.style&&"contents"===i.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&jz(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Rz(e,o)),r&&Cz(a.latestValues)&&jz(e,a.latestValues))}t.x=Nz(t.x),t.y=Nz(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:u}=t;if(!u)return void(this.projectionTransform&&(this.projectionDelta=bz(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bz(),this.projectionDeltaWithTransform=bz());const l=this.projectionTransform;cz(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.projectionTransform=yU(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===o&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),wU.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=bz();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o=vz(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),l=!u||u.members.length<=1,c=Boolean(s&&!l&&!0===this.options.crossfade&&!this.path.some(BU));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;FU(a.x,e.x,n),FU(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pz(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){jU(e.x,t.x,n.x,r),jU(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&pU(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=vz()),aU(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=yB(0,void 0!==n.opacity?n.opacity:1,tU(r)),e.opacityExit=yB(void 0!==t.opacity?t.opacity:1,0,nU(r))):a&&(e.opacity=yB(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i<Qz;i++){const a=`border${Kz[i]}Radius`;let o=eU(t,a),s=eU(n,a);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||$z(o)===$z(s)?(e[a]=Math.max(yB(Jz(o),Jz(s),r),0),(gF.test(s)||gF.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=yB(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(bj(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Aj.update((()=>{Hz.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=$D(e)?e:L_(e);return r.start(S_("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&HU(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||vz();const t=sz(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=sz(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}aU(t,n),jz(t,i),cz(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new mU);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<bU.length;t++){const i="rotate"+bU[t];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=JF(e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=JF(e.pointerEvents)||""),this.hasProjected&&!Cz(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const o=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=yU(this.projectionDeltaWithTransform,this.treeScale,o),i&&(r.transform=i(o,r.transform));const{x:s,y:u}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*u.origin}% 0`,a.animationValues?r.opacity=a===this?null!==(n=null!==(t=o.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:r.opacity=a===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in YD){if(void 0===o[e])continue;const{correct:t,applyTo:n}=YD[e],i="none"===r.transform?o[e]:t(o[e],a);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=i}else r[e]=i}return this.options.layoutId&&(r.pointerEvents=a===this?JF(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(kU),this.root.sharedNodes.clear()}}}function EU(e){e.updateLayout()}function TU(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;"size"===i?wz((e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],i=sz(r);r.min=t[e].min,r.max=r.min+i})):HU(i,n.layoutBox,t)&&wz((r=>{const i=a?n.measuredBox[r]:n.layoutBox[r],o=sz(t[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)}));const o=bz();cz(o,t,n.layoutBox);const s=bz();a?cz(s,e.applyTransform(r,!0),n.measuredBox):cz(s,t,n.layoutBox);const u=!fU(o);let l=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o=vz();pz(o,n.layoutBox,i.layoutBox);const s=vz();pz(s,t,a.layoutBox),pU(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function CU(e){wU.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function SU(e){e.clearSnapshot()}function kU(e){e.clearMeasurements()}function OU(e){e.isLayoutDirty=!1}function PU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RU(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NU(e){e.resolveTargetDelta()}function LU(e){e.calcProjection()}function MU(e){e.resetRotation()}function DU(e){e.removeLeadSnapshot()}function FU(e,t,n){e.translate=yB(t.translate,0,n),e.scale=yB(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jU(e,t,n,r){e.min=yB(t.min,n.min,r),e.max=yB(t.max,n.max,r)}function BU(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const _U={duration:.45,ease:[.4,0,.1,1]};let zU;const UU=()=>navigator.userAgent.toLowerCase().includes("applewebkit/");function WU(e){e.min=zU(e.min),e.max=zU(e.max)}function HU(e,t,n){return"position"===e||"preserve-aspect"===e&&!uz(hU(t),hU(n),.2)}const VU=xU({attachResizeListener:(e,t)=>rj(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qU={current:void 0},GU=xU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qU.current){const e=new VU({});e.mount(window),e.setOptions({layoutScroll:!0}),qU.current=e}return qU.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),XU={pan:{Feature:class extends mj{constructor(){super(...arguments),this.removePointerDownListener=yj}onPointerDown(e){this.session=new ez(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Wz(e),onStart:Wz(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Aj.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=sj(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends mj{constructor(e){super(e),this.removeGroupControls=yj,this.removeListeners=yj,this.controls=new zz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yj}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:GU,MeasureLayout:Zz}},ZU=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function YU(e,t,n=1){const[r,i]=function(e){const t=ZU.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);return a?a.trim():iF(i)?YU(i,t,n+1):i}const KU=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),QU=e=>KU.has(e),JU=e=>e===sF||e===AF,$U=(e,t)=>parseFloat(e.split(", ")[t]),eW=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return $U(i[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?$U(t[1],e):0}},tW=new Set(["x","y","z"]),nW=KD.filter((e=>!tW.has(e)));const rW={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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:eW(4,13),y:eW(5,14)};rW.translateX=rW.x,rW.translateY=rW.y;const iW=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(QU);let a=[],o=!1;const s=[];if(i.forEach((i=>{const u=e.getValue(i);if(!e.hasValue(i))return;let l=n[i],c=F_(l);const d=t[i];let f;if(YF(d)){const e=d.length,t=null===d[0]?1:0;l=d[t],c=F_(l);for(let n=t;n<e&&null!==d[n];n++)f?Fj(F_(d[n])===f):f=F_(d[n])}else f=F_(d);if(c!==f)if(JU(c)&&JU(f)){const e=u.get();"string"==typeof e&&u.set(parseFloat(e)),"string"==typeof d?t[i]=parseFloat(d):Array.isArray(d)&&f===AF&&(t[i]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==f?void 0:f.transform)&&(0===l||0===d)?0===l?u.set(f.transform(l)):t[i]=c.transform(d):(o||(a=function(e){const t=[];return nW.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),o=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],u.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,i=((e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};"none"===o&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=rW[e](r,a)})),t.render();const u=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=rW[n](u,a)})),e})(t,e,s);return a.length&&a.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),SD&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}return{target:t,transitionEnd:r}};function aW(e,t,n,r){return(e=>Object.keys(e).some(QU))(t)?iW(e,t,n,r):{target:t,transitionEnd:r}}const oW=(e,t,n,r)=>{const i=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!iF(t))return;const n=YU(t,r);n&&e.set(n)}));for(const e in t){const i=t[e];if(!iF(i))continue;const a=YU(i,r);a&&(t[e]=a,n||(n={}),void 0===n[e]&&(n[e]=i))}return{target:t,transitionEnd:n}}(e,t,r);return aW(e,t=i.target,n,r=i.transitionEnd)},sW={current:null},uW={current:!1};const lW=new WeakMap,cW=Object.keys(zD),dW=cW.length,fW=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pW=MD.length;class hW{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>Aj.render(this.render,!1,!0);const{latestValues:o,renderState:s}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.isControllingVariants=DD(t),this.isVariantNode=FD(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(t,{});for(const e in l){const t=l[e];void 0!==o[e]&&$D(t)&&(t.set(o[e],!1),k_(u)&&u.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,lW.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),uW.current||function(){if(uW.current=!0,SD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sW.current=e.matches;e.addListener(t),t()}else sW.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sW.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lW.delete(this.current),this.projection&&this.projection.unmount(),bj(this.notifyUpdate),bj(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=QD.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Aj.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),i()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,i){let a,o;for(let e=0;e<dW;e++){const n=cW[e],{isEnabled:r,Feature:i,ProjectionNode:s,MeasureLayout:u}=zD[n];s&&(a=s),r(t)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),u&&(o=u))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:o,layoutScroll:s,layoutRoot:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||o&&PD(o),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:s,layoutRoot:u})}return o}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vz()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<fW.length;t++){const n=fW[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if($D(a))e.addValue(i,a),k_(r)&&r.add(i);else if($D(o))e.addValue(i,L_(a,{owner:e})),k_(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const t=e.getValue(i);!t.hasAnimated&&t.set(a)}else{const t=e.getStaticValue(i);e.addValue(i,L_(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<pW;e++){const n=MD[e],r=this.props[n];(RD(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=L_(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=XF(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||$D(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new R_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class mW extends hW{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let a=function(e,t,n){const r={};for(const i in e){const e=z_(i,t);if(void 0!==e)r[i]=e;else{const e=n.getValue(i);e&&(r[i]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),a&&(a=r(a))),i){!function(e,t,n){var r,i;const a=Object.keys(t).filter((t=>!e.hasValue(t))),o=a.length;if(o)for(let s=0;s<o;s++){const o=a[s],u=t[o];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(i=null!==(r=n[o])&&void 0!==r?r:e.readValue(o))&&void 0!==i?i:t[o]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||T_(l))?l=parseFloat(l):!B_(l)&&PB.test(u)&&(l=E_(o,u)),e.addValue(o,L_(l,{owner:e})),void 0===n[o]&&(n[o]=l),null!==l&&e.setBaseTarget(o,l))}}(this,n,a);const e=oW(this,n,a,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class yW extends mW{readValueFromInstance(e,t){if(QD.has(t)){const e=x_(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(rF(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Bz(e,t)}build(e,t,n,r){TF(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return qF(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$D(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){WF(e,t,n,r)}}class gW extends mW{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(QD.has(t)){const e=x_(t);return e&&e.default||0}return t=HF.has(t)?t:UF(t),e.getAttribute(t)}measureInstanceViewportBox(){return vz()}scrapeMotionValuesFromProps(e,t){return GF(e,t)}build(e,t,n,r){FF(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){VF(e,t,0,r)}mount(e){this.isSVGTag=BF(e.tagName),super.mount(e)}}const AW=(e,t)=>ZD(e)?new gW(t,{enableHardwareAcceleration:!1}):new yW(t,{enableHardwareAcceleration:!0}),bW={...J_,...Rj,...XU,...{layout:{ProjectionNode:GU,MeasureLayout:Zz}}},vW=GD(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...ZD(e)?tj:nj,preloadedFeatures:n,useRender:zF(t),createVisualElement:r,Component:e}}(e,t,bW,AW)));function wW(){const e=kL.useRef(!1);return kD((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class xW extends kL.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function EW({children:e,isPresent:t}){const n=kL.useId(),r=kL.useRef(null),i=kL.useRef({width:0,height:0,top:0,left:0});return kL.useInsertionEffect((()=>{const{width:e,height:a,top:o,left:s}=i.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${o}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(u)}}),[t]),kL.createElement(xW,{isPresent:t,childRef:r,sizeRef:i},kL.cloneElement(e,{ref:r}))}const TW=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=ZF(CW),u=kL.useId(),l=kL.useMemo((()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))})),a?void 0:[n]);return kL.useMemo((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),kL.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===o&&(e=kL.createElement(EW,{isPresent:n},e)),kL.createElement(ID.Provider,{value:l},e)};function CW(){return new Map}const IW=e=>e.key||"";const SW=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=kL.useContext(UD).forceRender||function(){const e=wW(),[t,n]=kL.useState(0),r=kL.useCallback((()=>{e.current&&n(t+1)}),[t]);return[kL.useCallback((()=>Aj.postRender(r)),[r]),t]}()[0],u=wW(),l=function(e){const t=[];return kL.Children.forEach(e,(e=>{kL.isValidElement(e)&&t.push(e)})),t}(e);let c=l;const d=kL.useRef(new Map).current,f=kL.useRef(c),p=kL.useRef(new Map).current,h=kL.useRef(!0);var m;if(kD((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=IW(e);t.set(n,e)}))}(l,p),f.current=c})),m=()=>{h.current=!0,p.clear(),d.clear()},kL.useEffect((()=>()=>m()),[]),h.current)return kL.createElement(kL.Fragment,null,c.map((e=>kL.createElement(TW,{key:IW(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:o},e))));c=[...c];const y=f.current.map(IW),g=l.map(IW),A=y.length;for(let e=0;e<A;e++){const t=y[e];-1!==g.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===o&&d.size&&(c=[]),d.forEach(((e,n)=>{if(-1!==g.indexOf(n))return;const i=p.get(n);if(!i)return;const h=y.indexOf(n);let m=e;if(!m){const e=()=>{p.delete(n),d.delete(n);const e=f.current.findIndex((e=>e.key===n));if(f.current.splice(e,1),!d.size){if(f.current=l,!1===u.current)return;s(),r&&r()}};m=kL.createElement(TW,{key:IW(i),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:a,mode:o},i),d.set(n,m)}c.splice(h,0,m)})),c=c.map((e=>{const t=e.key;return d.has(t)?e:kL.createElement(TW,{key:IW(e),isPresent:!0,presenceAffectsLayout:a,mode:o},e)})),kL.createElement(kL.Fragment,null,d.size?c:c.map((e=>kL.cloneElement(e))))},kW=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},OW=(...e)=>e.reduce(((e,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach((n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=OW.options.mergeArrays?OW.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:kW(e[n])&&kW(t[n])?e[n]=OW(e[n],t[n]):e[n]=void 0===t[n]?OW.options.allowUndefinedOverrides?t[n]:e[n]:t[n])})),e}),{}),PW={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};OW.options=PW,OW.withOptions=(e,...t)=>{OW.options=Object.assign(Object.assign({},PW),e);const n=OW(...t);return OW.options=PW,n};var RW="__lodash_hash_undefined__",NW=1/0,LW="[object Function]",MW="[object GeneratorFunction]",DW="[object Symbol]",FW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jW=/^\w*$/,BW=/^\./,_W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zW=/\\(\\)?/g,UW=/^\[object .+?Constructor\]$/,WW="object"==typeof ot&&ot&&ot.Object===Object&&ot,HW="object"==typeof self&&self&&self.Object===Object&&self,VW=WW||HW||Function("return this")();var qW,GW=Array.prototype,XW=Function.prototype,ZW=Object.prototype,YW=VW["__core-js_shared__"],KW=(qW=/[^.]+$/.exec(YW&&YW.keys&&YW.keys.IE_PROTO||""))?"Symbol(src)_1."+qW:"",QW=XW.toString,JW=ZW.hasOwnProperty,$W=ZW.toString,eH=RegExp("^"+QW.call(JW).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tH=VW.Symbol,nH=GW.splice,rH=hH(VW,"Map"),iH=hH(Object,"create"),aH=tH?tH.prototype:void 0,oH=aH?aH.toString:void 0;function sH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function uH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function lH(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function cH(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function dH(e,t){var n;t=function(e,t){if(AH(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||vH(e))return!0;return jW.test(e)||!FW.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:AH(n=t)?n:mH(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[yH(t[r++])];return r&&r==i?e:void 0}function fH(e){if(!bH(e)||(t=e,KW&&KW in t))return!1;var t,n=function(e){var t=bH(e)?$W.call(e):"";return t==LW||t==MW}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?eH:UW;return n.test(function(e){if(null!=e){try{return QW.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function pH(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function hH(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return fH(n)?n:void 0}sH.prototype.clear=function(){this.__data__=iH?iH(null):{}},sH.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},sH.prototype.get=function(e){var t=this.__data__;if(iH){var n=t[e];return n===RW?void 0:n}return JW.call(t,e)?t[e]:void 0},sH.prototype.has=function(e){var t=this.__data__;return iH?void 0!==t[e]:JW.call(t,e)},sH.prototype.set=function(e,t){return this.__data__[e]=iH&&void 0===t?RW:t,this},uH.prototype.clear=function(){this.__data__=[]},uH.prototype.delete=function(e){var t=this.__data__,n=cH(t,e);return!(n<0)&&(n==t.length-1?t.pop():nH.call(t,n,1),!0)},uH.prototype.get=function(e){var t=this.__data__,n=cH(t,e);return n<0?void 0:t[n][1]},uH.prototype.has=function(e){return cH(this.__data__,e)>-1},uH.prototype.set=function(e,t){var n=this.__data__,r=cH(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},lH.prototype.clear=function(){this.__data__={hash:new sH,map:new(rH||uH),string:new sH}},lH.prototype.delete=function(e){return pH(this,e).delete(e)},lH.prototype.get=function(e){return pH(this,e).get(e)},lH.prototype.has=function(e){return pH(this,e).has(e)},lH.prototype.set=function(e,t){return pH(this,e).set(e,t),this};var mH=gH((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(vH(e))return oH?oH.call(e):"";var t=e+"";return"0"==t&&1/e==-NW?"-0":t}(t);var n=[];return BW.test(e)&&n.push(""),e.replace(_W,(function(e,t,r,i){n.push(r?i.replace(zW,"$1"):t||e)})),n}));function yH(e){if("string"==typeof e||vH(e))return e;var t=e+"";return"0"==t&&1/e==-NW?"-0":t}function gH(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(gH.Cache||lH),n}gH.Cache=lH;var AH=Array.isArray;function bH(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function vH(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&$W.call(e)==DW}var wH=function(e,t,n){var r=null==e?void 0:dH(e,t);return void 0===r?n:r},xH=st(wH),EH={size:{600:"6px",500:"5px",400:"4px",300:"3px",200:"2px",100:"1px"}},TH={size:{600:"64px",500:"48px",400:"32px",300:"24px",250:"20px",200:"16px",100:"12px"}},CH={family:{heading:{primary:"'Suisse-Intl', sans-serif",secondary:"'Suisse-Intl', sans-serif"},body:{primary:"'Roboto', sans-serif",secondary:"'Roboto Mono', monospace"}},decoration:{underline:"underline",lineThrough:"line-through",none:"none"},casing:{uppercase:"uppercase",none:"none"}},IH={body:{large:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:400},bold:{fontWeight:500}},medium:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:400},bold:{fontWeight:500}},small:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"12px",lineHeight:"16px",fontWeight:400},bold:{fontWeight:700}},xxSmall:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400},bold:{fontWeight:700}}},caption:{medium:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"14px",lineHeight:"20px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}},small:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"10px",lineHeight:"14px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}}},heading:{xxLarge:{regular:{fontSize:"96px",lineHeight:"112px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xLarge:{regular:{fontSize:"64px",lineHeight:"72px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},large:{regular:{fontSize:"40px",lineHeight:"48px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},medium:{regular:{fontSize:"28px",lineHeight:"32px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},small:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}}}},SH={x1:"4px",x2:"8px",x3:"12px",x4:"16px",x5:"20px",x6:"24px",x7:"28px",x8:"32px",x9:"36px",x10:"40px",x11:"44px",x12:"48px",x13:"52px",x14:"56px",x15:"60px",x16:"64px",x17:"68px",x18:"72px",x19:"76px",x20:"80px",x21:"84px",x22:"88px",x23:"92px",x24:"96px",x25:"100px",x26:"104px",x27:"108px",x28:"112px",x29:"116px",x30:"120px",x31:"124px",x32:"128px",x33:"132px",x34:"136px",x35:"140px",x36:"144px",x37:"148px",x38:"152px",x39:"156px",x40:"160px",x41:"164px",x42:"168px",x43:"172px",x44:"176px",x45:"180px",x46:"184px",x47:"188px",x48:"192px",x49:"196px",x50:"200px"},kH={x1:"2px",x2:"4px",x3:"6px",x4:"8px",x5:"10px",x6:"12px",x7:"14px",x8:"16px",x9:"18px",x10:"20px",x11:"22px",x12:"24px",x13:"26px",x14:"28px",x15:"30px",x16:"32px",x17:"34px",x18:"36px",x19:"38px",x20:"40px",x21:"42px",x22:"44px",x23:"46px",x24:"48px",x25:"50px"},OH={small:450,medium:768,large:1024,xLarge:1280,xxLarge:1536,xxxLarge:1920},PH={tooltip:12,toast:11,popover:10,modal:9,drawer:8},RH={normal:{gentle:{cssDuration:"0.4s",jsDuration:.4,cssEase:"ease-in-out",jsEase:"easeInOut"},fast:{cssDuration:"0.25s",jsDuration:.25,cssEase:"ease-in-out",jsEase:"easeInOut"}},bounce:{gentle:{cssDuration:"0.6s",jsDuration:.6,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]},fast:{cssDuration:"0.45s",jsDuration:.45,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]}}},NH={colorMode:"darkOnLight",color:{brand:{1:"#131313",2:"#FFFFFF",3:"#E0E0E0",4:"#868686",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#ECECEC",900:"#F0F0F0",800:"#F5F5F5",700:"#FAFAFA",600:"#FDFDFD",500:"#FFFFFF"},accent:{1:"#B026BD",2:"#1FD3F5",3:"#67C6E0",4:"#5AA0D9",5:"#8395E5",6:"#D8EFF4",7:"#F5BDD0",8:"#EC98CA"},translucent:{emphasis:{500:"#FFFFFFF5",400:"#FFFFFFE0",300:"#FFFFFFCC",200:"#FFFFFFA3",100:"#FFFFFF7A"},standard:{1e3:"#0D0D0DFF",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D1A",150:"#0D0D0D14",100:"#0D0D0D0A",50:"#0D0D0D05"},inverse:{1e3:"#FFFFFFFF",900:"#FFFFFFE6",800:"#FFFFFFCC",700:"#FFFFFFA3",600:"#FFFFFF7A",500:"#FFFFFF3D",400:"#FFFFFF29",300:"#FFFFFF1F",200:"#FFFFFF14",100:"#FFFFFF0A"}},status:{guidance:{bright:"#36E0F8",dim:"#9AEFFB"},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FBFF6D",dim:"#FCFEBF"},fatal:{bright:"#FF637F",dim:"#FFB1BF"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},text:{primary:"base.color.brand.1",secondary:"#5C5C5C",link:{primary:"base.color.accent.1",secondary:"base.color.brand.1"},inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},fixed:{black:{1e3:"base.color.translucent.standard.1000",100:"#0D0D0D14"},white:{1e3:"base.color.brand.2",100:"#FFFFFF14"}}},gradient:{1:{spectrum:"linear-gradient(90.68deg, #F191FA 0%, #83E3F0 99.82%)",blendMode:"normal",svgDefs:'<linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#F191FA" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'<radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'<radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 8px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:SH,borderRadius:kH,font:CH,text:IH,breakpoint:OH,icon:TH,border:EH,zLevel:PH,motion:RH},LH={colorMode:"lightOnDark",color:{brand:{1:"#F3F3F3",2:"#131313",3:"#E0E0E0",4:"#B6B6B6",5:"#36E0F8",6:"#1F8290"},neutral:{500:"#575757",600:"#444444",700:"#323232",800:"#1F1F1F",900:"#131313",1e3:"#0D0D0D"},accent:{1:"#F191FA",2:"#36E0F8",3:"#6FD6F2",4:"#61ADEB",5:"#99A8EA",6:"#E4F4F7",7:"#F8D1DE",8:"#F2B7DA"},translucent:{emphasis:{500:"#F3F3F333",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",100:"#F3F3F30A"},standard:{1e3:"#F3F3F3FF",900:"#F3F3F3E0",800:"#F3F3F3CC",700:"#F3F3F3A3",600:"#F3F3F37A",500:"#F3F3F33D",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",150:"#F3F3F30F",100:"#F3F3F30A",50:"#F3F3F305"},inverse:{1e3:"#0D0D0DFF",900:"#0D0D0DE6",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D14",100:"#0D0D0D0A"}},status:{guidance:{bright:"#36E0F8",dim:"#94E9F5 "},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FAFD7E",dim:"#F6F8B9"},fatal:{bright:"#FF637F",dim:"#F9ABB9"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},text:{primary:"base.color.brand.1",secondary:"base.color.brand.4",link:{primary:"base.color.accent.1",secondary:"base.color.brand.1"},inverse:{primary:"base.color.brand.2",secondary:"#464646"}},fixed:{black:{1e3:"base.brand.2",100:"#13131314"},white:{1e3:"base.brand.1",100:"#F3F3F314"}}},gradient:{1:{spectrum:"linear-gradient(105.76deg, #F191FA -46.96%, #83E3F0 99.99%)",blendMode:"normal",svgDefs:'\n <linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9A2F6" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'\n <radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'\n <radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 6px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:SH,borderRadius:kH,font:CH,text:IH,breakpoint:OH,icon:TH,border:EH,zLevel:PH,motion:RH};var MH=(e,t)=>xH(e,t);function DH(e,t){let n=MH(e,t);return"string"==typeof n&&n.match(/^base./)&&(n=DH(e,n)),n}var FH,jH={base:NH},BH={exports:{}},_H={};BH.exports=function(){if(FH)return _H;FH=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case o:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),_H.ContextConsumer=s,_H.ContextProvider=o,_H.Element=t,_H.ForwardRef=l,_H.Fragment=r,_H.Lazy=p,_H.Memo=f,_H.Portal=n,_H.Profiler=a,_H.StrictMode=i,_H.Suspense=c,_H.SuspenseList=d,_H.isAsyncMode=function(){return!1},_H.isConcurrentMode=function(){return!1},_H.isContextConsumer=function(e){return m(e)===s},_H.isContextProvider=function(e){return m(e)===o},_H.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_H.isForwardRef=function(e){return m(e)===l},_H.isFragment=function(e){return m(e)===r},_H.isLazy=function(e){return m(e)===p},_H.isMemo=function(e){return m(e)===f},_H.isPortal=function(e){return m(e)===n},_H.isProfiler=function(e){return m(e)===a},_H.isStrictMode=function(e){return m(e)===i},_H.isSuspense=function(e){return m(e)===c},_H.isSuspenseList=function(e){return m(e)===d},_H.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===i||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===o||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},_H.typeOf=m,_H}();var zH=BH.exports,UH=RL.Fragment;function WH(e,t,n){return aD.call(t,"css")?RL.jsx(yD,pD(e,t),n):RL.jsx(e,t,n)}function HH(e,t,n){return aD.call(t,"css")?RL.jsxs(yD,pD(e,t),n):RL.jsxs(e,t,n)}var VH={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",u="[object AsyncFunction]",l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",g="[object Object]",A="[object Promise]",b="[object Proxy]",v="[object RegExp]",w="[object Set]",x="[object String]",E="[object Symbol]",T="[object Undefined]",C="[object WeakMap]",I="[object ArrayBuffer]",S="[object DataView]",k=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[o]=P[s]=P[I]=P[l]=P[S]=P[c]=P[d]=P[f]=P[h]=P[m]=P[g]=P[v]=P[w]=P[x]=P[C]=!1;var R="object"==typeof ot&&ot&&ot.Object===Object&&ot,N="object"==typeof self&&self&&self.Object===Object&&self,L=R||N||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,F=D&&D.exports===M,j=F&&R.process,B=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),_=B&&B.isTypedArray;function z(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function U(e,t){return e.has(t)}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,q=Function.prototype,G=Object.prototype,X=L["__core-js_shared__"],Z=q.toString,Y=G.hasOwnProperty,K=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Q=G.toString,J=RegExp("^"+Z.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=F?L.Buffer:void 0,ee=L.Symbol,te=L.Uint8Array,ne=G.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ue=Fe(L,"DataView"),le=Fe(L,"Map"),ce=Fe(L,"Promise"),de=Fe(L,"Set"),fe=Fe(L,"WeakMap"),pe=Fe(Object,"create"),he=ze(ue),me=ze(le),ye=ze(ce),ge=ze(de),Ae=ze(fe),be=ee?ee.prototype:void 0,ve=be?be.valueOf:void 0;function we(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ee;++t<n;)this.add(e[t])}function Ce(e){var t=this.__data__=new xe(e);this.size=t.size}function Ie(e,t){var n=He(e),r=!n&&We(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ke(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var l in e)!t&&!Y.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_e(l,u))||s.push(l);return s}function Se(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?T:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=Q.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return Q.call(e)}(e)}function Oe(e){return Ze(e)&&ke(e)==o}function Pe(e,t,n,a,u){return e===t||(null==e||null==t||!Ze(e)&&!Ze(t)?e!=e&&t!=t:function(e,t,n,a,u,f){var p=He(e),y=He(t),A=p?s:Be(e),b=y?s:Be(t),T=(A=A==o?g:A)==g,C=(b=b==o?g:b)==g,k=A==b;if(k&&Ve(e)){if(!Ve(t))return!1;p=!0,T=!1}if(k&&!T)return f||(f=new Ce),p||Ke(e)?Le(e,t,n,a,u,f):function(e,t,n,a,o,s,u){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case l:case c:case m:return Ue(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case x:return e==t+"";case h:var f=W;case w:var p=a&r;if(f||(f=H),e.size!=t.size&&!p)return!1;var y=u.get(e);if(y)return y==t;a|=i,u.set(e,t);var g=Le(f(e),f(t),a,o,s,u);return u.delete(e),g;case E:if(ve)return ve.call(e)==ve.call(t)}return!1}(e,t,A,n,a,u,f);if(!(n&r)){var O=T&&Y.call(e,"__wrapped__"),P=C&&Y.call(t,"__wrapped__");if(O||P){var R=O?e.value():e,N=P?t.value():t;return f||(f=new Ce),u(R,N,n,a,f)}}if(!k)return!1;return f||(f=new Ce),function(e,t,n,i,a,o){var s=n&r,u=Me(e),l=u.length,c=Me(t),d=c.length;if(l!=d&&!s)return!1;var f=l;for(;f--;){var p=u[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<l;){var g=e[p=u[f]],A=t[p];if(i)var b=s?i(A,g,p,t,e,o):i(g,A,p,e,t,o);if(!(void 0===b?g===A||a(g,A,n,i,o):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,u,f)}(e,t,n,a,Pe,u))}function Re(e){return!(!Xe(e)||(t=e,K&&K in t))&&(qe(e)?J:k).test(ze(e));var t}function Ne(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||G,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Le(e,t,n,a,o,s){var u=n&r,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new Te:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var m=e[f],y=t[f];if(a)var g=u?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!z(t,(function(e,t){if(!U(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return He(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Qe,je)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Fe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Re(n)?n:void 0}we.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},we.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},we.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[],this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ee.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(le||xe),string:new we}},Ee.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ee.prototype.get=function(e){return De(this,e).get(e)},Ee.prototype.has=function(e){return De(this,e).has(e)},Ee.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,n),this},Te.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new xe,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ee(r)}return n.set(e,t),this.size=n.size,this};var je=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=ke;function _e(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(ue&&Be(new ue(new ArrayBuffer(1)))!=S||le&&Be(new le)!=h||ce&&Be(ce.resolve())!=A||de&&Be(new de)!=w||fe&&Be(new fe)!=C)&&(Be=function(e){var t=ke(e),n=t==g?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case he:return S;case me:return h;case ye:return A;case ge:return w;case Ae:return C}return t});var We=Oe(function(){return arguments}())?Oe:function(e){return Ze(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},He=Array.isArray;var Ve=oe||function(){return!1};function qe(e){if(!Xe(e))return!1;var t=ke(e);return t==f||t==p||t==u||t==b}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ze(e){return null!=e&&"object"==typeof e}var Ye,Ke=_?(Ye=_,function(e){return Ye(e)}):function(e){return Ze(e)&&Ge(e.length)&&!!P[ke(e)]};function Qe(e){return null!=(t=e)&&Ge(t.length)&&!qe(t)?Ie(e):Ne(e);var t}e.exports=function(e,t){return Pe(e,t)}}(VH,VH.exports);var qH=st(VH.exports),GH=NaN,XH="[object Symbol]",ZH=/^\s+|\s+$/g,YH=/^[-+]0x[0-9a-f]+$/i,KH=/^0b[01]+$/i,QH=/^0o[0-7]+$/i,JH=parseInt,$H="object"==typeof ot&&ot&&ot.Object===Object&&ot,eV="object"==typeof self&&self&&self.Object===Object&&self,tV=$H||eV||Function("return this")(),nV=Object.prototype.toString,rV=Math.max,iV=Math.min,aV=function(){return tV.Date.now()};function oV(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function sV(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&nV.call(e)==XH}(e))return GH;if(oV(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oV(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ZH,"");var n=KH.test(e);return n||QH.test(e)?JH(e.slice(2),n?2:8):YH.test(e)?GH:+e}var uV=function(e,t,n){var r,i,a,o,s,u,l=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function h(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=a}function m(){var e=aV();if(h(e))return y(e);s=setTimeout(m,function(e){var n=t-(e-u);return d?iV(n,a-(e-l)):n}(e))}function y(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function g(){var e=aV(),n=h(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(m,t),c?p(e):o}(u);if(d)return s=setTimeout(m,t),p(u)}return void 0===s&&(s=setTimeout(m,t)),o}return t=sV(t)||0,oV(n)&&(c=!!n.leading,a=(d="maxWait"in n)?rV(sV(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},g.flush=function(){return void 0===s?o:y(aV())},g},lV=st(uV),cV={exports:{}};
36
36
  /*!
37
37
  localForage -- Offline Storage, Improved
38
38
  Version 1.10.0