@liquidcommercedev/rmn-sdk 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.2.0](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.8...v1.2.0) (2024-09-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * fixed fluid ([#31](https://github.com/liquidcommerce/rmn-sdk/issues/31)) ([c72433a](https://github.com/liquidcommerce/rmn-sdk/commit/c72433a97b3d53f1c30fb2a50b48badbe93b0658))
7
+
1
8
  ## [1.1.8](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.7...v1.1.8) (2024-09-27)
2
9
 
3
10
 
package/dist/index.js CHANGED
@@ -15,5 +15,5 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function n(e){
15
15
 
16
16
  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.
17
17
  */
18
- function(){var t=e,n=t.lib,r=n.WordArray,o=n.Hasher,i=t.algo,s=r.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]),a=r.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]),c=r.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]),l=r.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]),h=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,v,_,x,E,S,A,k,R,T=this._hash.words,O=h.words,B=u.words,C=s.words,P=a.words,I=c.words,H=l.words;for(x=i=T[0],E=f=T[1],S=b=T[2],A=v=T[3],k=_=T[4],n=0;n<80;n+=1)R=i+e[t+C[n]]|0,R+=n<16?d(f,b,v)+O[0]:n<32?p(f,b,v)+O[1]:n<48?g(f,b,v)+O[2]:n<64?y(f,b,v)+O[3]:m(f,b,v)+O[4],R=(R=w(R|=0,I[n]))+_|0,i=_,_=v,v=w(b,10),b=f,f=R,R=x+e[t+P[n]]|0,R+=n<16?m(E,S,A)+B[0]:n<32?y(E,S,A)+B[1]:n<48?g(E,S,A)+B[2]:n<64?p(E,S,A)+B[3]:d(E,S,A)+B[4],R=(R=w(R|=0,H[n]))+k|0,x=k,k=A,A=w(S,10),S=E,E=R;R=T[1]+b+A|0,T[1]=T[2]+v+k|0,T[2]=T[3]+_+x|0,T[3]=T[4]+i+E|0,T[4]=T[0]+f+S|0,T[0]=R},_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 o=this._hash,i=o.words,s=0;s<5;s++){var a=i[s];i[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function y(e,t,n){return e&n|t&~n}function m(e,t,n){return e^(t|~n)}function w(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160));var e}(),Hr(),function(){return Nr||(Nr=1,Dr.exports=(c=Vn(),br(),Hr(),t=(e=c).lib,n=t.Base,r=t.WordArray,o=e.algo,i=o.SHA256,s=o.HMAC,a=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=s.create(n.hasher,e),i=r.create(),a=r.create([1]),c=i.words,l=a.words,h=n.keySize,u=n.iterations;c.length<h;){var f=o.update(t).finalize(a);o.reset();for(var d=f.words,p=d.length,g=f,y=1;y<u;y++){g=o.finalize(g),o.reset();for(var m=g.words,w=0;w<p;w++)d[w]^=m[w]}i.concat(f),l[0]++}return i.sigBytes=4*h,i}}),e.PBKDF2=function(e,t,n){return a.create(n).compute(e,t)},c.PBKDF2)),Dr.exports;var e,t,n,r,o,i,s,a,c}(),Lr(),qr(),Wr(),Yr(),Xr(),eo(),function(){return to?no.exports:(to=1,no.exports=(t=Vn(),qr(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return ro?oo.exports:(ro=1,oo.exports=(e=Vn(),qr(),e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,o=r-n%r,i=n+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return io?so.exports:(io=1,so.exports=(e=Vn(),qr(),e.pad.Iso10126={pad:function(t,n){var r=4*n,o=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return ao?co.exports:(ao=1,co.exports=(e=Vn(),qr(),e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return lo?ho.exports:(lo=1,ho.exports=(e=Vn(),qr(),e.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}}},e.pad.ZeroPadding));var e}(),function(){return uo?fo.exports:(uo=1,fo.exports=(e=Vn(),qr(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return po?go.exports:(po=1,go.exports=(r=Vn(),qr(),t=(e=r).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var r=n.parse(e);return t.create({ciphertext:r})}},r.format.Hex));var e,t,n,r}(),function(){return yo?mo.exports:(yo=1,mo.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.BlockCipher,r=t.algo,o=[],i=[],s=[],a=[],c=[],l=[],h=[],u=[],f=[],d=[];!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 p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,o[n]=p,i[p]=n;var g=e[n],y=e[g],m=e[y],w=257*e[p]^16843008*p;s[n]=w<<24|w>>>8,a[n]=w<<16|w>>>16,c[n]=w<<8|w>>>24,l[n]=w,w=16843009*m^65537*y^257*g^16843008*n,h[p]=w<<24|w>>>8,u[p]=w<<16|w>>>16,f[p]=w<<8|w>>>24,d[p]=w,n?(n=g^e[e[e[m^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.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),i=this._keySchedule=[],s=0;s<r;s++)s<n?i[s]=t[s]:(l=i[s-1],s%n?n>6&&s%n==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[s/n|0]<<24),i[s]=i[s-n]^l);for(var a=this._invKeySchedule=[],c=0;c<r;c++){if(s=r-c,c%4)var l=i[s];else l=i[s-4];a[c]=c<4||s<=4?l:h[o[l>>>24]]^u[o[l>>>16&255]]^f[o[l>>>8&255]]^d[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,l,o)},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,h,u,f,d,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,s,a){for(var c=this._nRounds,l=e[t]^n[0],h=e[t+1]^n[1],u=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<c;p++){var g=r[l>>>24]^o[h>>>16&255]^i[u>>>8&255]^s[255&f]^n[d++],y=r[h>>>24]^o[u>>>16&255]^i[f>>>8&255]^s[255&l]^n[d++],m=r[u>>>24]^o[f>>>16&255]^i[l>>>8&255]^s[255&h]^n[d++],w=r[f>>>24]^o[l>>>16&255]^i[h>>>8&255]^s[255&u]^n[d++];l=g,h=y,u=m,f=w}g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[u>>>8&255]<<8|a[255&f])^n[d++],y=(a[h>>>24]<<24|a[u>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^n[d++],m=(a[u>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],w=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&u])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=m,e[t+3]=w},keySize:8});t.AES=n._createHelper(g)}(),e.AES));var e}(),vo(),function(){return _o?xo.exports:(_o=1,xo.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;o=0;for(var i=0;o<256;o++){var s=o%n,a=t[s>>>2]>>>24-s%4*8&255;i=(i+r[o]+a)%256;var c=r[o];r[o]=r[i],r[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,n=this._j,r=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}t.RC4=n._createHelper(o);var s=r.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4));var e}(),function(){return Eo?So.exports:(Eo=1,So.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],s=[],a=r.Rabbit=n.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],o=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++)c.call(this);for(n=0;n<8;n++)o[n]^=r[n+4&7];if(t){var i=t.words,s=i[0],a=i[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=l>>>16|4294901760&h,f=h<<16|65535&l;for(o[0]^=l,o[1]^=u,o[2]^=h,o[3]^=f,o[4]^=l,o[5]^=u,o[6]^=h,o[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,a=r>>>16,c=((o*o>>>17)+o*a>>>15)+a*a,l=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit));var e}(),function(){return Ao?ko.exports:(Ao=1,ko.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],s=[],a=r.RabbitLegacy=n.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 o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)r[o]^=n[o+4&7];if(t){var i=t.words,s=i[0],a=i[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=l>>>16|4294901760&h,f=h<<16|65535&l;for(r[0]^=l,r[1]^=u,r[2]^=h,r[3]^=f,r[4]^=l,r[5]^=u,r[6]^=h,r[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,a=r>>>16,c=((o*o>>>17)+o*a>>>15)+a*a,l=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy));var e}(),No());var Do=Wn.exports,Uo=crypto;const zo=e=>e instanceof CryptoKey,Lo=new TextEncoder,Mo=new TextDecoder;function Fo(...e){const t=e.reduce(((e,{length:t})=>e+t),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const qo=e=>(e=>{let t=e;"string"==typeof t&&(t=Lo.encode(t));const n=[];for(let e=0;e<t.length;e+=32768)n.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(n.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),jo=e=>{let t=e;t instanceof Uint8Array&&(t=Mo.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class $o extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class Wo extends $o{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,n="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=r,this.payload=t}}class Ko extends $o{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,n="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=r,this.payload=t}}class Jo extends $o{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class Yo extends $o{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class Vo extends $o{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class Go extends $o{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Xo(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Zo(e,t){return e.name===t}function Qo(e){return parseInt(e.name.slice(4),10)}function ei(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!Zo(e.algorithm,"HMAC"))throw Xo("HMAC");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Zo(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Xo("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Zo(e.algorithm,"RSA-PSS"))throw Xo("RSA-PSS");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw Xo("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!Zo(e.algorithm,"ECDSA"))throw Xo("ECDSA");const n=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==n)throw Xo(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,n)}function ti(e,t,...n){if((n=n.filter(Boolean)).length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var ni=(e,...t)=>ti("Key must be ",e,...t);function ri(e,t,...n){return ti(`Key for the ${e} algorithm must be `,t,...n)}var oi=e=>!!zo(e)||"KeyObject"===e?.[Symbol.toStringTag];const ii=["CryptoKey"],si=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let n;for(const e of t){const t=Object.keys(e);if(n&&0!==n.size)for(const e of t){if(n.has(e))return!1;n.add(e)}else n=new Set(t)}return!0};function ai(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}var ci=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if("number"!=typeof n||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function li(e){return ai(e)&&"string"==typeof e.kty}const hi=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:n}=function(e){let t,n;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Jo('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}(e),r=[t,e.ext??!1,e.key_ops??n],o={...e};return delete o.alg,delete o.use,Uo.subtle.importKey("jwk",o,...r)},ui=e=>jo(e);let fi,di;const pi=e=>"KeyObject"===e?.[Symbol.toStringTag],gi=async(e,t,n,r,o=!1)=>{let i=e.get(t);if(i?.[r])return i[r];const s=await hi({...n,alg:r});return o&&Object.freeze(t),i?i[r]=s:e.set(t,{[r]:s}),s};var yi=(e,t)=>{if(pi(e)){let n=e.export({format:"jwk"});return delete n.d,delete n.dp,delete n.dq,delete n.p,delete n.q,delete n.qi,n.k?ui(n.k):(di||(di=new WeakMap),gi(di,e,n,t))}if(li(e)){if(e.k)return jo(e.k);di||(di=new WeakMap);return gi(di,e,e,t,!0)}return e},mi=(e,t)=>{if(pi(e)){let n=e.export({format:"jwk"});return n.k?ui(n.k):(fi||(fi=new WeakMap),gi(fi,e,n,t))}if(li(e)){if(e.k)return jo(e.k);fi||(fi=new WeakMap);return gi(fi,e,e,t,!0)}return e};const wi=e=>e?.[Symbol.toStringTag],bi=(e,t,n)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(n))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},vi=(e,t,n,r)=>{if(!(t instanceof Uint8Array)){if(r&&li(t)){if(function(e){return li(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&bi(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!oi(t))throw new TypeError(ri(e,t,...ii,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${wi(t)} instances for symmetric algorithms must be of type "secret"`)}};function _i(e,t,n,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?vi(t,n,r,e):((e,t,n,r)=>{if(r&&li(t))switch(n){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&bi(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&bi(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!oi(t))throw new TypeError(ri(e,t,...ii,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===n&&"public"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===n&&"public"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===n&&"private"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===n&&"private"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,n,r,e)}_i.bind(void 0,!1);const xi=_i.bind(void 0,!0);function Ei(e,t,n,r,o){if(void 0!==o.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;i=void 0!==n?new Map([...Object.entries(n),...t.entries()]):t;for(const t of r.crit){if(!i.has(t))throw new Jo(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(i.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)}function Si(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Jo(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function Ai(e,t,n){if("sign"===n&&(t=await mi(t,e)),"verify"===n&&(t=await yi(t,e)),zo(t))return ei(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(ni(t,...ii));return Uo.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(ni(t,...ii,"Uint8Array","JSON Web Key"))}const ki=async(e,t,n,r)=>{const o=await Ai(e,t,"verify");ci(e,o);const i=Si(e,o.algorithm);try{return await Uo.subtle.verify(i,o,n,r)}catch{return!1}};async function Ri(e,t,n){if(!ai(e))throw new Yo("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Yo('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Yo("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Yo("JWS Payload missing");if("string"!=typeof e.signature)throw new Yo("JWS Signature missing or incorrect type");if(void 0!==e.header&&!ai(e.header))throw new Yo("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=jo(e.protected);r=JSON.parse(Mo.decode(t))}catch{throw new Yo("JWS Protected Header is invalid")}if(!si(r,e.header))throw new Yo("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header};let i=!0;if(Ei(Yo,new Map([["b64",!0]]),n?.crit,r,o).has("b64")&&(i=r.b64,"boolean"!=typeof i))throw new Yo('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=o;if("string"!=typeof s||!s)throw new Yo('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(i){if("string"!=typeof e.payload)throw new Yo("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Yo("JWS Payload must be a string or an Uint8Array instance");let a=!1;"function"==typeof t?(t=await t(r,e),a=!0,xi(s,t,"verify"),li(t)&&(t=await async function(e,t){if(!ai(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return jo(e.k);case"RSA":if(void 0!==e.oth)throw new Jo('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return hi({...e,alg:t});default:throw new Jo('Unsupported "kty" (Key Type) Parameter value')}}(t,s))):xi(s,t,"verify");const c=Fo(Lo.encode(e.protected??""),Lo.encode("."),"string"==typeof e.payload?Lo.encode(e.payload):e.payload);let l;try{l=jo(e.signature)}catch{throw new Yo("Failed to base64url decode the signature")}if(!await ki(s,t,l,c))throw new Go;let h;if(i)try{h=jo(e.payload)}catch{throw new Yo("Failed to base64url decode the payload")}else h="string"==typeof e.payload?Lo.encode(e.payload):e.payload;const u={payload:h};return void 0!==e.protected&&(u.protectedHeader=r),void 0!==e.header&&(u.unprotectedHeader=e.header),a?{...u,key:t}:u}var Ti=e=>Math.floor(e.getTime()/1e3);const Oi=86400,Bi=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var Ci=e=>{const t=Bi.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*n);break;case"day":case"days":case"d":r=Math.round(n*Oi);break;case"week":case"weeks":case"w":r=Math.round(604800*n);break;default:r=Math.round(31557600*n)}return"-"===t[1]||"ago"===t[4]?-r:r};const Pi=e=>e.toLowerCase().replace(/^application\//,"");var Ii=(e,t,n={})=>{let r;try{r=JSON.parse(Mo.decode(t))}catch{}if(!ai(r))throw new Vo("JWT Claims Set must be a top-level JSON object");const{typ:o}=n;if(o&&("string"!=typeof e.typ||Pi(e.typ)!==Pi(o)))throw new Wo('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:i=[],issuer:s,subject:a,audience:c,maxTokenAge:l}=n,h=[...i];void 0!==l&&h.push("iat"),void 0!==c&&h.push("aud"),void 0!==a&&h.push("sub"),void 0!==s&&h.push("iss");for(const e of new Set(h.reverse()))if(!(e in r))throw new Wo(`missing required "${e}" claim`,r,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(r.iss))throw new Wo('unexpected "iss" claim value',r,"iss","check_failed");if(a&&r.sub!==a)throw new Wo('unexpected "sub" claim value',r,"sub","check_failed");if(c&&(u=r.aud,f="string"==typeof c?[c]:c,!("string"==typeof u?f.includes(u):Array.isArray(u)&&f.some(Set.prototype.has.bind(new Set(u))))))throw new Wo('unexpected "aud" claim value',r,"aud","check_failed");var u,f;let d;switch(typeof n.clockTolerance){case"string":d=Ci(n.clockTolerance);break;case"number":d=n.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:p}=n,g=Ti(p||new Date);if((void 0!==r.iat||l)&&"number"!=typeof r.iat)throw new Wo('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new Wo('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>g+d)throw new Wo('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new Wo('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=g-d)throw new Ko('"exp" claim timestamp check failed',r,"exp","check_failed")}if(l){const e=g-r.iat;if(e-d>("number"==typeof l?l:Ci(l)))throw new Ko('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-d)throw new Wo('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function Hi(e,t,n){const r=await async function(e,t,n){if(e instanceof Uint8Array&&(e=Mo.decode(e)),"string"!=typeof e)throw new Yo("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:i,length:s}=e.split(".");if(3!==s)throw new Yo("Invalid Compact JWS");const a=await Ri({payload:o,protected:r,signature:i},t,n),c={payload:a.payload,protectedHeader:a.protectedHeader};return"function"==typeof t?{...c,key:a.key}:c}(e,t,n);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new Vo("JWTs MUST NOT use unencoded payload");const o={payload:Ii(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return"function"==typeof t?{...o,key:r.key}:o}class Ni{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new Yo("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!si(this._protectedHeader,this._unprotectedHeader))throw new Yo("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(Ei(Yo,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new Yo('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=n;if("string"!=typeof o||!o)throw new Yo('JWS "alg" (Algorithm) Header Parameter missing or invalid');xi(o,e,"sign");let i,s=this._payload;r&&(s=Lo.encode(qo(s))),i=this._protectedHeader?Lo.encode(qo(JSON.stringify(this._protectedHeader))):Lo.encode("");const a=Fo(i,Lo.encode("."),s),c=await(async(e,t,n)=>{const r=await Ai(e,t,"sign");ci(e,r);const o=await Uo.subtle.sign(Si(e,r.algorithm),r,n);return new Uint8Array(o)})(o,e,a),l={signature:qo(c),payload:""};return r&&(l.payload=Mo.decode(s)),this._unprotectedHeader&&(l.header=this._unprotectedHeader),this._protectedHeader&&(l.protected=Mo.decode(i)),l}}class Di{constructor(e){this._flattened=new Ni(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(void 0===n.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function Ui(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class zi{constructor(e={}){if(!ai(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:Ui("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Ui("setNotBefore",Ti(e))}:this._payload={...this._payload,nbf:Ti(new Date)+Ci(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:Ui("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Ui("setExpirationTime",Ti(e))}:this._payload={...this._payload,exp:Ti(new Date)+Ci(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:Ti(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Ui("setIssuedAt",Ti(e))}:this._payload="string"==typeof e?{...this._payload,iat:Ui("setIssuedAt",Ti(new Date)+Ci(e))}:{...this._payload,iat:Ui("setIssuedAt",e)},this}}class Li extends zi{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new Di(Lo.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new Vo("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}class Mi{constructor(e){var t,n,r,o,i,s,a;const c=e;this.cause=null!==(o=null!==(n=null===(t=null==c?void 0:c.response)||void 0===t?void 0:t.data.statusCode)&&void 0!==n?n:null===(r=null==c?void 0:c.response)||void 0===r?void 0:r.status)&&void 0!==o?o:0,this.errorMessage=null!==(a=null!==(s=null===(i=null==c?void 0:c.response)||void 0===i?void 0:i.data.message)&&void 0!==s?s:null==c?void 0:c.message)&&void 0!==a?a:"There's been an error related to the API request to LiquidCommerce RMN Services."}}class Fi{constructor(e){this.apiKey=e}static getInstance(e){return Fn.getInstance("EncryptedApi",(()=>new Fi(e)))}async handleEncryption(e,t){const n=this.getKey(t);try{return this.joseEncrypt(e,n,this.forwardInMinutes(30,t))}catch(e){this.handleError({cause:"Payload decryption error",message:"The decryption of the payload failed"})}}async handleDecryption(e,t){const n=this.getKey(t);return this.joseDecrypt(e,n)}getKey(e){return this.apiKey.slice(Number(`${e}`.replace(/0/g,"").slice(-1)))}forwardInMinutes(e,t){const n=new Date(t);return n.setMinutes(n.getMinutes()+e)}async joseDecrypt(e,t){return Hi(Do.AES.decrypt(e,t).toString(Do.enc.Utf8),Ue.from(t))}async joseEncrypt(e,t,n){const r=new Date,o=new Li(e).setProtectedHeader({alg:"HS256"}).setIssuedAt(r.getTime()).setExpirationTime(n),i=await o.sign(Ue.from(t));return Do.AES.encrypt(i,t).toString()}handleError(e){throw new Mi(e)}}class qi extends a{constructor(e){var t;super(),this.authInfo=e,this.encryptedApi=Fi.getInstance(this.authInfo.apiKey),this.objectHelper=qn.getInstance(),this.baseUrl=null!==(t=s.url[this.authInfo.env])&&void 0!==t?t:s.url.dev,this.client=Mn.create(Object.assign({baseURL:this.baseUrl},this.getConfig({[s.accessHeader]:`Bearer ${this.authInfo.token}`})))}getConfig(e){return{headers:Object.assign({"Content-Type":"application/json",[i]:this.authInfo.env},e)}}async get(e,t){return this.createRequest(e,t,this.client.get)}async post(e,t,n){let i=t;if(this.authInfo.env!==exports.RMN_ENV.DEV){const e=(new Date).getTime();n=Object.assign(Object.assign({},n),{headers:Object.assign(Object.assign({},null==n?void 0:n.headers),{[r]:"true",[o]:e,[s.apiHeader]:this.authInfo.apiKey})}),i={t:await this.encryptedApi.handleEncryption(t,e)}}return this.createRequest(e,n,((e,t)=>this.client.post(e,i,t)))}async createRequest(e,t,n){try{const r=this.createURL(e),o=this.createFullConfig(t),i=await this.sendRequest(r,o,n);return await this.getResponse(i)}catch(e){return{isOk:!1,val:null,isErr:new Mi(e)}}}createFullConfig(e){return this.objectHelper.merge(this.getConfig(),null!=e?e:{})}async sendRequest(e,t,n){return n(e,t)}async getResponse(e){var t,n,i,s,a,c,l;let h=(null==e?void 0:e.data)?e.data:null,u=!1,f=0;if((null==e?void 0:e.headers)&&(null===(t=null==e?void 0:e.headers)||void 0===t?void 0:t.has)&&(null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n.has(r))&&(null===(i=null==e?void 0:e.headers)||void 0===i?void 0:i.has(o))&&(null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s.get)&&(u="true"===(null===(a=null==e?void 0:e.headers)||void 0===a?void 0:a.get(r)),f=(null===(c=null==e?void 0:e.headers)||void 0===c?void 0:c.get(o))?Number(null===(l=null==e?void 0:e.headers)||void 0===l?void 0:l.get(o)):0),h&&u&&this.objectHelper.includes(h,"t")&&f>0){const{t:e}=h,t=await this.encryptedApi.handleDecryption(e,f);(null==t?void 0:t.payload)&&(delete t.payload.exp,delete t.payload.iat,h=t.payload)}return{isOk:!0,val:h,isErr:!1}}createURL(e){const t=e&&"/"!==e[0]?`/${e}`:e;return`${this.baseUrl}/api${t}`}}class ji extends qi{constructor(e,t){super({authenticated:!1,apiKey:e,token:"",env:t})}static getInstance(e,t){return Fn.getInstance("AuthService",(()=>new ji(e,t)))}async initialize(){const{isOk:e,isErr:t,val:n}=await this.get("/auth",{headers:{[s.apiHeader]:this.authInfo.apiKey}});if(t)throw new Error(`There was an error during authentication: (${null==t?void 0:t.errorMessage})`);if(!e||!(null==n?void 0:n.data.token))throw new Error("Auth response was not successful");return this.authInfo.token=n.data.token,this.authInfo.authenticated=!0,this.authInfo}}const $i="spot-element";function Wi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e,secondaryImage:t})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n background-color: #FFFFFF;\n gap: 0.5cqw;\n text-decoration: none;\n color: inherit;\n }\n .big-image {\n width: 65%;\n height: 100%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .main {\n width: 35%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 0.5cqw;\n }\n .small-image {\n width: 100%;\n height: 50%;\n background-image: url("${t}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .text {\n background: #E8E6DE;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 50%;\n width: 100%;\n padding: 5% 10%;\n box-sizing: border-box;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 2.2cqw;\n color: #000000;\n font-style: normal;\n font-weight: 400;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 1.2cqw;\n color: #000000;\n font-style: normal;\n font-weight: 400;\n margin: 1cqh 0;\n }\n .button {\n font-size: 1cqw;\n color: #000000;\n background-color: transparent;\n font-style: normal;\n font-weight: 700;\n text-decoration: underline;\n text-transform: uppercase;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: opacity 0.3s ease;\n }\n .content:hover .button {\n opacity: 0.7;\n }\n @container (max-width: 600px) {\n .header {\n font-size: 3cqw;\n }\n .description {\n font-size: 1.6cqw;\n margin: 0;\n }\n .button {\n font-size: 1.4cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="big-image"></div>\n <div class="main">\n <div class="small-image"></div>\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="button">${e.ctaText}</span>\n </div>\n </div>\n </a>\n `}function Ki(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n font-family: "Source Sans 3", sans-serif;\n background-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%), url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n padding: 3%;\n box-sizing: border-box;\n text-decoration: none;\n color: #FFF;\n }\n .text-container {\n max-width: 50%;\n }\n .header {\n font-size: clamp(1.8cqw, 2.4cqw, 2.8cqw);\n font-style: normal;\n font-weight: 700;\n font-family: "Cormorant", serif;\n line-height: 1.2;\n margin: 0 0 0.8cqh 0;\n }\n .description {\n font-size: clamp(1.2cqw, 1.4cqw, 1.6cqw);\n font-style: normal;\n font-weight: 400;\n line-height: 1.4;\n margin: 0 0 1.2cqh 0;\n }\n .cta-button {\n font-size: clamp(1cqw, 1.1cqw, 1.4cqw);\n border-radius: 0.4cqh;\n border: 0.1cqh solid #FFF;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(2px);\n display: inline-block;\n padding: 0.8cqh 1.6cqw;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .cta-button {\n background-color: #FFF;\n color: #000;\n }\n @container (max-width: 600px) {\n .text-container {\n max-width: 100%;\n }\n .header {\n font-size: clamp(1.6cqw, 4vw, 2.4cqw);\n margin: 0 0 0.4cqh 0;\n }\n .description {\n font-size: clamp(1cqw, 2.5vw, 1.4cqw);\n margin: 0 0 .3cqh 0;\n }\n .cta-button {\n font-size: clamp(0.9cqw, 2vw, 1.2cqw);\n padding: 0.4cqh 0.8cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text-container">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Ji(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n text-decoration: none;\n color: inherit;\n }\n .text {\n width: 40%;\n padding: 4cqh 5cqw;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n gap: 0.7cqh;\n font-family: "Source Sans 3", sans-serif;\n background-color: #F9F7F5;\n }\n .header {\n font-size: clamp(18px, 4cqw, 36px);\n color: #000000;\n font-style: normal;\n font-weight: 300;\n font-family: "Cormorant", serif;\n margin: 0;\n line-height: 1.2;\n }\n .description {\n font-size: clamp(12px, 2cqw, 16px);\n color: #000000;\n font-style: normal;\n font-weight: 400;\n margin: 0;\n line-height: 1.5;\n }\n .button {\n font-size: clamp(10px, 1.5cqw, 14px);\n border: 1px solid #000000;\n border-radius: 5px;\n display: inline-block;\n padding: 0.7cqh 1.5cqw;\n color: #000000;\n font-weight: 600;\n text-transform: uppercase;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .button {\n background-color: #000000;\n color: #FFFFFF;\n }\n .image {\n width: 60%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @container (max-width: 600px) {\n .text {\n padding: 1cqh 4cqw;\n width: 60%;\n }\n .image {\n width: 40%;\n }\n .header {\n font-size: clamp(12px, 3cqw, 24px);\n line-height: 0.5;\n }\n .description {\n font-size: clamp(10px, 2.5cqw, 14px);\n line-height: 1;\n }\n .button {\n font-size: clamp(6px, 2cqw, 12px);\n padding: 0.4cqh 1cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="button">${e.ctaText}</span>\n </div>\n <div class="image"></div>\n </a>\n `}function Yi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n <style>\n .content {\n display: inline-block;\n text-decoration: none;\n max-width: 100%;\n padding: 0.5em;\n background-color: #fff;\n }\n .header {\n display: block;\n font-size: 1.1em;\n font-weight: 500;\n color: #333;\n font-family: "Cormorant", serif;\n line-height: 1.2;\n margin-bottom: 0.2em;\n }\n .description {\n display: block;\n font-size: 0.9em;\n color: #4d4d4d;\n font-family: "Source Sans 3", sans-serif;\n line-height: 1.3;\n }\n </style>\n\n <a href="${e.clickUrl}" class="content">\n <span class="header">${e.header}</span>\n <span class="description">${e.description}</span>\n </a>\n `}function Vi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: inherit;\n }\n .text {\n width: 50%;\n padding-left: 3%;\n display: flex;\n flex-direction: column;\n gap: 0.3cqh;\n }\n .header {\n font-size: clamp(1.8cqh, 2.2cqw, 3cqh);\n font-weight: 300;\n color: #333;\n font-family: "Cormorant", serif;\n line-height: 1.1;\n margin: 0;\n }\n .description {\n font-size: clamp(1.2cqh, 1.3cqw, 2cqh);\n color: #4d4d4d;\n line-height: 1.2;\n margin: 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .cta-button {\n font-size: clamp(1cqh, 1.1cqw, 1.5cqh);\n font-weight: 600;\n color: #98773c;\n text-transform: uppercase;\n margin-top: 0.3cqh;\n display: inline-block;\n position: relative;\n width: fit-content;\n }\n .cta-button::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -0.2cqh;\n width: 100%;\n height: 1px;\n background-color: #98773c;\n transition: opacity 0.3s ease;\n }\n .content:hover .cta-button::after {\n opacity: 0.7;\n }\n\n @container (max-height: 100px) {\n .text {\n gap: 0.1cqh;\n }\n .description {\n -webkit-line-clamp: 1;\n }\n .cta-button::after {\n bottom: -0.1cqh;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Gi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n width: 50%;\n padding-right: 3%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 0.3cqh;\n }\n .header {\n font-size: clamp(1.8cqh, 2.2cqw, 3cqh);\n font-weight: 300;\n font-family: "Cormorant", serif;\n line-height: 1.1;\n margin: 0;\n text-align: left;\n }\n .description {\n font-size: clamp(1.2cqh, 1.3cqw, 2cqh);\n line-height: 1.2;\n margin: 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-align: left;\n }\n .cta-button {\n font-size: clamp(1cqh, 1.1cqw, 1.5cqh);\n font-weight: 600;\n color: #FFF;\n text-transform: uppercase;\n margin-top: 0.3cqh;\n display: inline-block;\n padding: 0.5cqh 1cqw;\n border: 1px solid #FFF;\n border-radius: 4px;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background-color: rgba(255, 255, 255, 0.2);\n }\n\n @container (max-height: 100px) {\n .text {\n gap: 0.1cqh;\n }\n .description {\n -webkit-line-clamp: 1;\n }\n .cta-button {\n padding: 0.3cqh 0.8cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Xi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-color: #fff;\n text-decoration: none;\n display: flex;\n flex-direction: column;\n }\n .image {\n width: 100%;\n height: 80%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n .text {\n text-align: left;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: auto;\n width: 100%;\n position: relative;\n overflow: hidden;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 5.5cqw;\n font-weight: 400;\n color: black;\n padding: 10px 10px 0 10px;\n font-family: "Cormorant", serif;\n }\n .description {\n font-size: 4cqw;\n color: rgb(77, 77, 77);\n padding: 0 10px 10px 10px;\n }\n </style>\n`)(e)}\n <a class="content" href="${e.clickUrl}">\n <div class="image"></div>\n <div class="text">\n <span class="header">${e.header}</span>\n <span class="description">${e.description}</span>\n </div>\n </a>\n `}function Zi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 2%;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 5%;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-family: "Cormorant", serif;\n font-size: 7cqw;\n font-weight: 300;\n line-height: 1.2;\n margin: 0 0 0.5cqw 0;\n }\n .description {\n font-size: 4cqw;\n line-height: 1.4;\n margin: 0 0 2cqw 0;\n }\n .cta-button {\n display: inline-block;\n padding: 1.5cqw 3cqw;\n border: 0.3cqw solid rgba(255, 255, 255, 0.5);\n border-radius: 1cqw;\n background: rgba(255, 255, 255, 0.2);\n color: #FFF;\n font-size: 3.5cqw;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background: rgba(255, 255, 255, 0.3);\n }\n\n @container (max-width: 380px) {\n .header {\n font-size: 8cqw;\n }\n .description {\n font-size: 4.5cqw;\n }\n .cta-button {\n font-size: 4cqw;\n padding: 2cqw 4cqw;\n }\n }\n\n @container (min-width: 381px) and (max-width: 480px) {\n .header {\n font-size: 7.5cqw;\n }\n .description {\n font-size: 4.2cqw;\n }\n .cta-button {\n font-size: 3.8cqw;\n }\n }\n\n @container (min-width: 481px) {\n .header {\n font-size: 6.5cqw;\n }\n .description {\n font-size: 3.8cqw;\n }\n .cta-button {\n font-size: 3.2cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Qi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-color: #fff;\n text-decoration: none;\n display: flex;\n justify-content: flex-start;\n align-items: flex-end;\n border-radius: 1cqw;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 52.1%, #000 100%), url("${e}") lightgray 50% / cover no-repeat;\n overflow: hidden;\n }\n .header {\n font-size: 7cqw;\n color: #FFF;\n font-style: normal;\n font-weight: 400;\n line-height: 1.2;\n font-family: "Cormorant", serif;\n padding: 0 5cqw 5cqw 5cqw;\n }\n\n @container (min-width: 400px) {\n .header {\n font-size: 6cqw;\n padding: 0 4cqw 4cqw 4cqw;\n }\n }\n\n @container (min-width: 800px) {\n .header {\n font-size: 5cqw;\n padding: 0 3cqw 3cqw 3cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <span class="header">${e.header}</span>\n </a>\n `}function es(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n background-color: #000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: inherit;\n }\n .text {\n padding: 5%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: left;\n gap: 1.5cqw;\n background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 30%);\n }\n .header {\n font-size: 7cqw;\n color: #FFF;\n font-weight: 300;\n line-height: 1.2;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 4cqw;\n color: #CCC;\n font-weight: 400;\n line-height: 1.3;\n margin: 0.5cqw 0 1.5cqw 0;\n }\n .cta-button {\n font-size: 3.5cqw;\n font-weight: 600;\n color: #B59048;\n text-transform: uppercase;\n letter-spacing: 0.1em;\n }\n .content:hover .cta-button {\n opacity: 0.8;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function ts(e){return`\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n display: block;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content"></a>\n `}function ns(e){return`\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 223px;\n }\n .content {\n display: block;\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content"></a>\n `}function rs(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 388px;\n }\n .content {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n font-family: "Source Sans 3", sans-serif;\n background-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%), url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n padding: 3%;\n box-sizing: border-box;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: fit-content;\n gap: 5px;\n }\n .header {\n font-size: 18px;\n font-style: normal;\n font-weight: 300;\n font-family: "Cormorant", serif;\n line-height: normal;\n margin: 0;\n }\n .description {\n font-size: 10px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n margin: 0;\n }\n .cta-button {\n font-size: 8px;\n border-radius: 5px;\n border: 0.5px solid #FFF;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(2px);\n display: inline-block;\n padding: 7px 20px;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .cta-button {\n background-color: #FFF;\n color: #000;\n }\n @media (min-width: 768px) {\n .primary-image {\n width: 66.66666%;\n height: 100%;\n }\n .main {\n flex-direction: column;\n height: 100%;\n width: 33.33333%;\n }\n .secondary-image {\n width: 100%;\n height: 50%;\n }\n .header {\n font-size: 22px;\n }\n .description {\n font-size: 12px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n`}function os(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e,secondaryImage:t})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 388px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column; \n background-color: #FFFFFF;\n gap: 5px;\n text-decoration: none;\n color: inherit;\n }\n .primary-image {\n width: 100%;\n height: 60%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .main {\n width: 100%;\n height: 40%;\n display: flex;\n flex-direction: row;\n gap: 5px;\n }\n .secondary-image {\n width: 50%;\n height: 100%;\n background-image: url("${t}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .text {\n background: #E8E6DE;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 50%;\n height: 100%;\n gap: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 18px;\n color: #212121;\n font-style: normal;\n font-weight: 400;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 10px;\n color: #212121;\n font-style: normal;\n font-weight: 400;\n margin: 0;\n }\n .cta-button {\n font-size: 8px;\n color: #212121;\n background-color: transparent;\n font-style: normal;\n font-weight: 700;\n text-decoration: underline;\n text-transform: uppercase;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: opacity 0.3s ease;\n }\n .content:hover .cta-button {\n opacity: 0.7;\n }\n @media (min-width: 768px) {\n .content {\n flex-direction: row;\n }\n .primary-image {\n width: 66.66666%;\n height: 100%;\n }\n .main {\n flex-direction: column;\n height: 100%;\n width: 33.33333%;\n }\n .secondary-image {\n width: 100%;\n height: 50%;\n }\n .text {\n width: 100%;\n height: 50%;\n }\n .header {\n font-size: 22px;\n }\n .description {\n font-size: 12px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="primary-image"></div>\n <div class="main">\n <div class="secondary-image"></div>\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </div>\n </a>\n `}function is(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 340px;\n min-height: 334px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 20px;\n width: 70%;\n font-family: "Source Sans 3", sans-serif;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n }\n .header {\n font-family: "Cormorant", serif;\n font-size: 20px;\n font-weight: 300;\n line-height: normal;\n margin: 0;\n }\n .description {\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n margin: 0;\n }\n .cta-button {\n width: fit-content;\n display: inline-block;\n padding: 7px 20px;\n border: 0.5px solid rgba(255, 255, 255, 0.5);\n border-radius: 5px;\n color: #fff;\n font-size: 8px;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background: rgba(255, 255, 255, 0.15);\n }\n @media (min-width: 768px) {\n .text {\n padding: 25px;\n }\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n line-height: 18px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .text {\n padding: 30px;\n }\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function ss(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 340px;\n min-height: 150px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n background-image: url("${e}"), linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(128,128,128,0.7), rgba(0,0,0,0.7));\n background-size: cover;\n background-position: center;\n background-blend-mode: overlay;\n }\n .text {\n padding: 15px 10%;\n width: fit-content;\n }\n .header {\n font-size: 16px;\n font-weight: 400;\n color: #fff;\n line-height: 20px;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n @media (min-width: 768px) {\n .header {\n font-size: 22px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n </div>\n </a>\n `}function as(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 165px;\n min-height: 334px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 10px;\n width: 70%;\n }\n .header {\n font-size: 12px;\n font-weight: 400;\n color: #000;\n line-height: 16px;\n font-family: "Cormorant", serif;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n </div>\n </a>\n `}function cs(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 165px;\n min-height: 300px;\n }\n .content {\n width: 100%;\n height: 100%;\n background-color: transparent;\n text-decoration: none;\n display: flex;\n flex-direction: column;\n }\n .image {\n width: 100%;\n height: 85%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n .text {\n text-align: left;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n width: 100%;\n height: 15%;\n position: relative;\n overflow: hidden;\n }\n .header {\n font-size: 12px;\n font-weight: 400;\n color: #000;\n padding-top: 5px;\n line-height: 16px;\n font-family: "Cormorant", serif;\n }\n </style>\n`)(e)}\n <a class="content" href="${e.clickUrl}">\n <div class="image"></div>\n <div class="text">\n <span class="header">${e.header}</span>\n </div>\n </a>\n `}var ls;!function(e){e.SPOT="spot",e.VARIANT="variant",e.WIDTH="width",e.HEIGHT="height",e.FLUID="fluid",e.PRE_HEADER="preHeader",e.HEADER="header",e.DESCRIPTION="description",e.PRIMARY_IMAGE="primaryImage",e.SECONDARY_IMAGE="secondaryImage",e.MOBILE_PRIMARY_IMAGE="mobilePrimaryImage",e.MOBILE_SECONDARY_IMAGE="mobileSecondaryImage",e.CTA_TEXT="ctaText",e.CLICK_URL="clickUrl"}(ls||(ls={}));let hs;if("undefined"!=typeof window&&void 0!==window.customElements){class e extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}render(){const e={spot:String(this.getAttribute(ls.SPOT)),variant:String(this.getAttribute(ls.VARIANT)),width:Number(this.getAttribute(ls.WIDTH)),height:Number(this.getAttribute(ls.HEIGHT)),fluid:String(this.getAttribute(ls.FLUID)),preHeader:this.getAttribute(ls.PRE_HEADER)||"",header:this.getAttribute(ls.HEADER)||"",description:this.getAttribute(ls.DESCRIPTION)||"",primaryImage:this.getAttribute(ls.PRIMARY_IMAGE)||"",secondaryImage:this.getAttribute(ls.SECONDARY_IMAGE)||"",mobilePrimaryImage:this.getAttribute(ls.MOBILE_PRIMARY_IMAGE)||"",mobileSecondaryImage:this.getAttribute(ls.MOBILE_SECONDARY_IMAGE)||"",ctaText:this.getAttribute(ls.CTA_TEXT)||"",clickUrl:this.getAttribute(ls.CLICK_URL)||""};if(this.shadowRoot){const t=((e,t)=>{const n=t/e*100,r=document.createElement("style");r.textContent=`\n :host {\n display: block;\n position: relative;\n container-type: inline-size;\n }\n :host([fluid="true"]) {\n width: 100%;\n height: auto;\n padding-top: ${n}%;\n }\n :host([fluid="false"]) {\n width: ${e}px;\n height: ${t}px;\n }\n .wrapper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n`;const o=document.createElement("div");return o.className="wrapper",{style:r,wrapper:o}})(e.width,e.height);t.wrapper.innerHTML=(e=>{const t={[exports.RMN_SPOT_TYPE.RB_HOMEPAGE_HERO_THREE_TILE]:{rbHomepageHeroThreeTile:os},[exports.RMN_SPOT_TYPE.RB_HOMEPAGE_HERO_FULL_IMAGE]:{rbHomepageHeroFullImage:rs},[exports.RMN_SPOT_TYPE.RB_LARGE_CATEGORY_IMAGE_TOUT]:{rbLargeCategoryImageTout:is},[exports.RMN_SPOT_TYPE.RB_SMALL_DISCOVER_TOUT]:{rbSmallDiscoverTout:cs},[exports.RMN_SPOT_TYPE.RB_SMALL_CATEGORY_IMAGE_TOUT]:{rbSmallCategoryImageTout:as},[exports.RMN_SPOT_TYPE.RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK]:{rbCollectionBannerWithoutTextBlock:ns},[exports.RMN_SPOT_TYPE.RB_NAVIGATION_BANNER]:{rbNavigationBanner:ss},[exports.RMN_SPOT_TYPE.RB_PRODUCT_UPCS]:{rbProductUpcs:()=>""},[exports.RMN_SPOT_TYPE.BILLBOARD]:{billboardV1:Wi,billboardV2:Ki,billboardV3:Ji},[exports.RMN_SPOT_TYPE.LARGE_RECTANGLE]:{largeRectangleV1:Xi},[exports.RMN_SPOT_TYPE.VERTICAL_RECTANGLE]:{verticalRectangleV1:es},[exports.RMN_SPOT_TYPE.SQUARE]:{squareV1:Zi,squareV2:Qi},[exports.RMN_SPOT_TYPE.LARGE_LEADERBOARD]:{largeLeaderboardV1:Vi,largeLeaderboardV2:Gi},[exports.RMN_SPOT_TYPE.WIDE_SKYSCRAPER]:{wideSkyscraperV1:ts},[exports.RMN_SPOT_TYPE.IN_TEXT]:{inTextV1:Yi}}[e.spot];if(!t)return"";const n=t[e.variant];return n?n(e):""})(e),this.shadowRoot.innerHTML="",this.shadowRoot.appendChild(t.style),this.shadowRoot.appendChild(t.wrapper)}}}e.observedAttributes=Object.values(ls),hs=e}class us{static getInstance(){return Fn.getInstance("SpotHtmlService",(()=>new us))}createSpotHtmlElement(e,t){if(!this.ensureBrowserEnvironmentAndDefineElement())return null;const n=document.createElement($i),r=this.onlySpotAttributes(e,t);for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&void 0!==r[e]&&""!==r[e]&&n.setAttribute(e,String(r[e]));return n}ensureBrowserEnvironmentAndDefineElement(){return"undefined"==typeof window||"undefined"==typeof document?(console.warn("LiquidCommerce Rmn Sdk: createSpotElement is only available in browser environments!!!"),!1):(customElements.get($i)||customElements.define($i,hs),!0)}onlySpotAttributes(e,t){const n=e,r=Object.values(ls);for(const e in n)r.includes(e)||delete n[e];return n.fluid=String(t),n}}class fs extends qi{constructor(e){super(e)}static getInstance(e){return Fn.getInstance("SpotSelectionService",(()=>new fs(e)))}async spotSelection(e){const{isOk:t,val:n,isErr:r}=await this.post("/spots/selection",e,{});if(r)throw new Error(`There was an error during spot selection: (${null==r?void 0:r.errorMessage})`);if(t&&n&&n.data&&(null==n?void 0:n.refresh.token))return this.authInfo.authenticated=!0,this.authInfo.token=n.refresh.token,n.data.spots;throw new Error("Spot selection response was not successful")}}class ds{constructor(e){this.spotSelectionService=fs.getInstance(e),this.spotHtmlService=us.getInstance()}async spotSelection(e){return this.spotSelectionService.spotSelection(e)}createSpotElement(e,t){return this.spotHtmlService.createSpotHtmlElement(e,null!=t&&t)}}exports.LiquidCommerceRmnClient=ds,exports.RmnClient=async function(e,t){const n=ji.getInstance(e,t.env),r=await n.initialize();return new ds(r)},exports.RmnCreateSpotElement=function(e,t){return us.getInstance().createSpotHtmlElement(e,null!=t&&t)};
18
+ function(){var t=e,n=t.lib,r=n.WordArray,o=n.Hasher,i=t.algo,s=r.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]),a=r.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]),c=r.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]),l=r.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]),h=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,v,_,x,E,S,A,k,R,T=this._hash.words,O=h.words,B=u.words,C=s.words,P=a.words,I=c.words,H=l.words;for(x=i=T[0],E=f=T[1],S=b=T[2],A=v=T[3],k=_=T[4],n=0;n<80;n+=1)R=i+e[t+C[n]]|0,R+=n<16?d(f,b,v)+O[0]:n<32?p(f,b,v)+O[1]:n<48?g(f,b,v)+O[2]:n<64?y(f,b,v)+O[3]:m(f,b,v)+O[4],R=(R=w(R|=0,I[n]))+_|0,i=_,_=v,v=w(b,10),b=f,f=R,R=x+e[t+P[n]]|0,R+=n<16?m(E,S,A)+B[0]:n<32?y(E,S,A)+B[1]:n<48?g(E,S,A)+B[2]:n<64?p(E,S,A)+B[3]:d(E,S,A)+B[4],R=(R=w(R|=0,H[n]))+k|0,x=k,k=A,A=w(S,10),S=E,E=R;R=T[1]+b+A|0,T[1]=T[2]+v+k|0,T[2]=T[3]+_+x|0,T[3]=T[4]+i+E|0,T[4]=T[0]+f+S|0,T[0]=R},_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 o=this._hash,i=o.words,s=0;s<5;s++){var a=i[s];i[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function y(e,t,n){return e&n|t&~n}function m(e,t,n){return e^(t|~n)}function w(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160));var e}(),Hr(),function(){return Nr||(Nr=1,Dr.exports=(c=Vn(),br(),Hr(),t=(e=c).lib,n=t.Base,r=t.WordArray,o=e.algo,i=o.SHA256,s=o.HMAC,a=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=s.create(n.hasher,e),i=r.create(),a=r.create([1]),c=i.words,l=a.words,h=n.keySize,u=n.iterations;c.length<h;){var f=o.update(t).finalize(a);o.reset();for(var d=f.words,p=d.length,g=f,y=1;y<u;y++){g=o.finalize(g),o.reset();for(var m=g.words,w=0;w<p;w++)d[w]^=m[w]}i.concat(f),l[0]++}return i.sigBytes=4*h,i}}),e.PBKDF2=function(e,t,n){return a.create(n).compute(e,t)},c.PBKDF2)),Dr.exports;var e,t,n,r,o,i,s,a,c}(),Lr(),qr(),Wr(),Yr(),Xr(),eo(),function(){return to?no.exports:(to=1,no.exports=(t=Vn(),qr(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return ro?oo.exports:(ro=1,oo.exports=(e=Vn(),qr(),e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,o=r-n%r,i=n+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return io?so.exports:(io=1,so.exports=(e=Vn(),qr(),e.pad.Iso10126={pad:function(t,n){var r=4*n,o=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return ao?co.exports:(ao=1,co.exports=(e=Vn(),qr(),e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return lo?ho.exports:(lo=1,ho.exports=(e=Vn(),qr(),e.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}}},e.pad.ZeroPadding));var e}(),function(){return uo?fo.exports:(uo=1,fo.exports=(e=Vn(),qr(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return po?go.exports:(po=1,go.exports=(r=Vn(),qr(),t=(e=r).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var r=n.parse(e);return t.create({ciphertext:r})}},r.format.Hex));var e,t,n,r}(),function(){return yo?mo.exports:(yo=1,mo.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.BlockCipher,r=t.algo,o=[],i=[],s=[],a=[],c=[],l=[],h=[],u=[],f=[],d=[];!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 p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,o[n]=p,i[p]=n;var g=e[n],y=e[g],m=e[y],w=257*e[p]^16843008*p;s[n]=w<<24|w>>>8,a[n]=w<<16|w>>>16,c[n]=w<<8|w>>>24,l[n]=w,w=16843009*m^65537*y^257*g^16843008*n,h[p]=w<<24|w>>>8,u[p]=w<<16|w>>>16,f[p]=w<<8|w>>>24,d[p]=w,n?(n=g^e[e[e[m^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.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),i=this._keySchedule=[],s=0;s<r;s++)s<n?i[s]=t[s]:(l=i[s-1],s%n?n>6&&s%n==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[s/n|0]<<24),i[s]=i[s-n]^l);for(var a=this._invKeySchedule=[],c=0;c<r;c++){if(s=r-c,c%4)var l=i[s];else l=i[s-4];a[c]=c<4||s<=4?l:h[o[l>>>24]]^u[o[l>>>16&255]]^f[o[l>>>8&255]]^d[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,l,o)},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,h,u,f,d,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,s,a){for(var c=this._nRounds,l=e[t]^n[0],h=e[t+1]^n[1],u=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<c;p++){var g=r[l>>>24]^o[h>>>16&255]^i[u>>>8&255]^s[255&f]^n[d++],y=r[h>>>24]^o[u>>>16&255]^i[f>>>8&255]^s[255&l]^n[d++],m=r[u>>>24]^o[f>>>16&255]^i[l>>>8&255]^s[255&h]^n[d++],w=r[f>>>24]^o[l>>>16&255]^i[h>>>8&255]^s[255&u]^n[d++];l=g,h=y,u=m,f=w}g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[u>>>8&255]<<8|a[255&f])^n[d++],y=(a[h>>>24]<<24|a[u>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^n[d++],m=(a[u>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],w=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&u])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=m,e[t+3]=w},keySize:8});t.AES=n._createHelper(g)}(),e.AES));var e}(),vo(),function(){return _o?xo.exports:(_o=1,xo.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;o=0;for(var i=0;o<256;o++){var s=o%n,a=t[s>>>2]>>>24-s%4*8&255;i=(i+r[o]+a)%256;var c=r[o];r[o]=r[i],r[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,n=this._j,r=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}t.RC4=n._createHelper(o);var s=r.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4));var e}(),function(){return Eo?So.exports:(Eo=1,So.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],s=[],a=r.Rabbit=n.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],o=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++)c.call(this);for(n=0;n<8;n++)o[n]^=r[n+4&7];if(t){var i=t.words,s=i[0],a=i[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=l>>>16|4294901760&h,f=h<<16|65535&l;for(o[0]^=l,o[1]^=u,o[2]^=h,o[3]^=f,o[4]^=l,o[5]^=u,o[6]^=h,o[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,a=r>>>16,c=((o*o>>>17)+o*a>>>15)+a*a,l=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit));var e}(),function(){return Ao?ko.exports:(Ao=1,ko.exports=(e=Vn(),ar(),dr(),Lr(),qr(),function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],s=[],a=r.RabbitLegacy=n.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 o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)r[o]^=n[o+4&7];if(t){var i=t.words,s=i[0],a=i[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=l>>>16|4294901760&h,f=h<<16|65535&l;for(r[0]^=l,r[1]^=u,r[2]^=h,r[3]^=f,r[4]^=l,r[5]^=u,r[6]^=h,r[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,a=r>>>16,c=((o*o>>>17)+o*a>>>15)+a*a,l=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy));var e}(),No());var Do=Wn.exports,Uo=crypto;const zo=e=>e instanceof CryptoKey,Lo=new TextEncoder,Mo=new TextDecoder;function Fo(...e){const t=e.reduce(((e,{length:t})=>e+t),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const qo=e=>(e=>{let t=e;"string"==typeof t&&(t=Lo.encode(t));const n=[];for(let e=0;e<t.length;e+=32768)n.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(n.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),jo=e=>{let t=e;t instanceof Uint8Array&&(t=Mo.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class $o extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class Wo extends $o{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,n="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=r,this.payload=t}}class Ko extends $o{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,n="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=r,this.payload=t}}class Jo extends $o{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class Yo extends $o{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class Vo extends $o{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class Go extends $o{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Xo(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Zo(e,t){return e.name===t}function Qo(e){return parseInt(e.name.slice(4),10)}function ei(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!Zo(e.algorithm,"HMAC"))throw Xo("HMAC");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Zo(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Xo("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Zo(e.algorithm,"RSA-PSS"))throw Xo("RSA-PSS");const n=parseInt(t.slice(2),10);if(Qo(e.algorithm.hash)!==n)throw Xo(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw Xo("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!Zo(e.algorithm,"ECDSA"))throw Xo("ECDSA");const n=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==n)throw Xo(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,n)}function ti(e,t,...n){if((n=n.filter(Boolean)).length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var ni=(e,...t)=>ti("Key must be ",e,...t);function ri(e,t,...n){return ti(`Key for the ${e} algorithm must be `,t,...n)}var oi=e=>!!zo(e)||"KeyObject"===e?.[Symbol.toStringTag];const ii=["CryptoKey"],si=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let n;for(const e of t){const t=Object.keys(e);if(n&&0!==n.size)for(const e of t){if(n.has(e))return!1;n.add(e)}else n=new Set(t)}return!0};function ai(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}var ci=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if("number"!=typeof n||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function li(e){return ai(e)&&"string"==typeof e.kty}const hi=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:n}=function(e){let t,n;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Jo('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Jo('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}(e),r=[t,e.ext??!1,e.key_ops??n],o={...e};return delete o.alg,delete o.use,Uo.subtle.importKey("jwk",o,...r)},ui=e=>jo(e);let fi,di;const pi=e=>"KeyObject"===e?.[Symbol.toStringTag],gi=async(e,t,n,r,o=!1)=>{let i=e.get(t);if(i?.[r])return i[r];const s=await hi({...n,alg:r});return o&&Object.freeze(t),i?i[r]=s:e.set(t,{[r]:s}),s};var yi=(e,t)=>{if(pi(e)){let n=e.export({format:"jwk"});return delete n.d,delete n.dp,delete n.dq,delete n.p,delete n.q,delete n.qi,n.k?ui(n.k):(di||(di=new WeakMap),gi(di,e,n,t))}if(li(e)){if(e.k)return jo(e.k);di||(di=new WeakMap);return gi(di,e,e,t,!0)}return e},mi=(e,t)=>{if(pi(e)){let n=e.export({format:"jwk"});return n.k?ui(n.k):(fi||(fi=new WeakMap),gi(fi,e,n,t))}if(li(e)){if(e.k)return jo(e.k);fi||(fi=new WeakMap);return gi(fi,e,e,t,!0)}return e};const wi=e=>e?.[Symbol.toStringTag],bi=(e,t,n)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(n))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},vi=(e,t,n,r)=>{if(!(t instanceof Uint8Array)){if(r&&li(t)){if(function(e){return li(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&bi(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!oi(t))throw new TypeError(ri(e,t,...ii,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${wi(t)} instances for symmetric algorithms must be of type "secret"`)}};function _i(e,t,n,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?vi(t,n,r,e):((e,t,n,r)=>{if(r&&li(t))switch(n){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&bi(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&bi(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!oi(t))throw new TypeError(ri(e,t,...ii,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===n&&"public"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===n&&"public"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===n&&"private"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===n&&"private"===t.type)throw new TypeError(`${wi(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,n,r,e)}_i.bind(void 0,!1);const xi=_i.bind(void 0,!0);function Ei(e,t,n,r,o){if(void 0!==o.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;i=void 0!==n?new Map([...Object.entries(n),...t.entries()]):t;for(const t of r.crit){if(!i.has(t))throw new Jo(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(i.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)}function Si(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Jo(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function Ai(e,t,n){if("sign"===n&&(t=await mi(t,e)),"verify"===n&&(t=await yi(t,e)),zo(t))return ei(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(ni(t,...ii));return Uo.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(ni(t,...ii,"Uint8Array","JSON Web Key"))}const ki=async(e,t,n,r)=>{const o=await Ai(e,t,"verify");ci(e,o);const i=Si(e,o.algorithm);try{return await Uo.subtle.verify(i,o,n,r)}catch{return!1}};async function Ri(e,t,n){if(!ai(e))throw new Yo("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Yo('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Yo("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Yo("JWS Payload missing");if("string"!=typeof e.signature)throw new Yo("JWS Signature missing or incorrect type");if(void 0!==e.header&&!ai(e.header))throw new Yo("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=jo(e.protected);r=JSON.parse(Mo.decode(t))}catch{throw new Yo("JWS Protected Header is invalid")}if(!si(r,e.header))throw new Yo("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header};let i=!0;if(Ei(Yo,new Map([["b64",!0]]),n?.crit,r,o).has("b64")&&(i=r.b64,"boolean"!=typeof i))throw new Yo('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=o;if("string"!=typeof s||!s)throw new Yo('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(i){if("string"!=typeof e.payload)throw new Yo("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Yo("JWS Payload must be a string or an Uint8Array instance");let a=!1;"function"==typeof t?(t=await t(r,e),a=!0,xi(s,t,"verify"),li(t)&&(t=await async function(e,t){if(!ai(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return jo(e.k);case"RSA":if(void 0!==e.oth)throw new Jo('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return hi({...e,alg:t});default:throw new Jo('Unsupported "kty" (Key Type) Parameter value')}}(t,s))):xi(s,t,"verify");const c=Fo(Lo.encode(e.protected??""),Lo.encode("."),"string"==typeof e.payload?Lo.encode(e.payload):e.payload);let l;try{l=jo(e.signature)}catch{throw new Yo("Failed to base64url decode the signature")}if(!await ki(s,t,l,c))throw new Go;let h;if(i)try{h=jo(e.payload)}catch{throw new Yo("Failed to base64url decode the payload")}else h="string"==typeof e.payload?Lo.encode(e.payload):e.payload;const u={payload:h};return void 0!==e.protected&&(u.protectedHeader=r),void 0!==e.header&&(u.unprotectedHeader=e.header),a?{...u,key:t}:u}var Ti=e=>Math.floor(e.getTime()/1e3);const Oi=86400,Bi=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var Ci=e=>{const t=Bi.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*n);break;case"day":case"days":case"d":r=Math.round(n*Oi);break;case"week":case"weeks":case"w":r=Math.round(604800*n);break;default:r=Math.round(31557600*n)}return"-"===t[1]||"ago"===t[4]?-r:r};const Pi=e=>e.toLowerCase().replace(/^application\//,"");var Ii=(e,t,n={})=>{let r;try{r=JSON.parse(Mo.decode(t))}catch{}if(!ai(r))throw new Vo("JWT Claims Set must be a top-level JSON object");const{typ:o}=n;if(o&&("string"!=typeof e.typ||Pi(e.typ)!==Pi(o)))throw new Wo('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:i=[],issuer:s,subject:a,audience:c,maxTokenAge:l}=n,h=[...i];void 0!==l&&h.push("iat"),void 0!==c&&h.push("aud"),void 0!==a&&h.push("sub"),void 0!==s&&h.push("iss");for(const e of new Set(h.reverse()))if(!(e in r))throw new Wo(`missing required "${e}" claim`,r,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(r.iss))throw new Wo('unexpected "iss" claim value',r,"iss","check_failed");if(a&&r.sub!==a)throw new Wo('unexpected "sub" claim value',r,"sub","check_failed");if(c&&(u=r.aud,f="string"==typeof c?[c]:c,!("string"==typeof u?f.includes(u):Array.isArray(u)&&f.some(Set.prototype.has.bind(new Set(u))))))throw new Wo('unexpected "aud" claim value',r,"aud","check_failed");var u,f;let d;switch(typeof n.clockTolerance){case"string":d=Ci(n.clockTolerance);break;case"number":d=n.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:p}=n,g=Ti(p||new Date);if((void 0!==r.iat||l)&&"number"!=typeof r.iat)throw new Wo('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new Wo('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>g+d)throw new Wo('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new Wo('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=g-d)throw new Ko('"exp" claim timestamp check failed',r,"exp","check_failed")}if(l){const e=g-r.iat;if(e-d>("number"==typeof l?l:Ci(l)))throw new Ko('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-d)throw new Wo('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function Hi(e,t,n){const r=await async function(e,t,n){if(e instanceof Uint8Array&&(e=Mo.decode(e)),"string"!=typeof e)throw new Yo("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:i,length:s}=e.split(".");if(3!==s)throw new Yo("Invalid Compact JWS");const a=await Ri({payload:o,protected:r,signature:i},t,n),c={payload:a.payload,protectedHeader:a.protectedHeader};return"function"==typeof t?{...c,key:a.key}:c}(e,t,n);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new Vo("JWTs MUST NOT use unencoded payload");const o={payload:Ii(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return"function"==typeof t?{...o,key:r.key}:o}class Ni{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new Yo("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!si(this._protectedHeader,this._unprotectedHeader))throw new Yo("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(Ei(Yo,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new Yo('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=n;if("string"!=typeof o||!o)throw new Yo('JWS "alg" (Algorithm) Header Parameter missing or invalid');xi(o,e,"sign");let i,s=this._payload;r&&(s=Lo.encode(qo(s))),i=this._protectedHeader?Lo.encode(qo(JSON.stringify(this._protectedHeader))):Lo.encode("");const a=Fo(i,Lo.encode("."),s),c=await(async(e,t,n)=>{const r=await Ai(e,t,"sign");ci(e,r);const o=await Uo.subtle.sign(Si(e,r.algorithm),r,n);return new Uint8Array(o)})(o,e,a),l={signature:qo(c),payload:""};return r&&(l.payload=Mo.decode(s)),this._unprotectedHeader&&(l.header=this._unprotectedHeader),this._protectedHeader&&(l.protected=Mo.decode(i)),l}}class Di{constructor(e){this._flattened=new Ni(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(void 0===n.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function Ui(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class zi{constructor(e={}){if(!ai(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:Ui("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Ui("setNotBefore",Ti(e))}:this._payload={...this._payload,nbf:Ti(new Date)+Ci(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:Ui("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Ui("setExpirationTime",Ti(e))}:this._payload={...this._payload,exp:Ti(new Date)+Ci(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:Ti(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Ui("setIssuedAt",Ti(e))}:this._payload="string"==typeof e?{...this._payload,iat:Ui("setIssuedAt",Ti(new Date)+Ci(e))}:{...this._payload,iat:Ui("setIssuedAt",e)},this}}class Li extends zi{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new Di(Lo.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new Vo("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}class Mi{constructor(e){var t,n,r,o,i,s,a;const c=e;this.cause=null!==(o=null!==(n=null===(t=null==c?void 0:c.response)||void 0===t?void 0:t.data.statusCode)&&void 0!==n?n:null===(r=null==c?void 0:c.response)||void 0===r?void 0:r.status)&&void 0!==o?o:0,this.errorMessage=null!==(a=null!==(s=null===(i=null==c?void 0:c.response)||void 0===i?void 0:i.data.message)&&void 0!==s?s:null==c?void 0:c.message)&&void 0!==a?a:"There's been an error related to the API request to LiquidCommerce RMN Services."}}class Fi{constructor(e){this.apiKey=e}static getInstance(e){return Fn.getInstance("EncryptedApi",(()=>new Fi(e)))}async handleEncryption(e,t){const n=this.getKey(t);try{return this.joseEncrypt(e,n,this.forwardInMinutes(30,t))}catch(e){this.handleError({cause:"Payload decryption error",message:"The decryption of the payload failed"})}}async handleDecryption(e,t){const n=this.getKey(t);return this.joseDecrypt(e,n)}getKey(e){return this.apiKey.slice(Number(`${e}`.replace(/0/g,"").slice(-1)))}forwardInMinutes(e,t){const n=new Date(t);return n.setMinutes(n.getMinutes()+e)}async joseDecrypt(e,t){return Hi(Do.AES.decrypt(e,t).toString(Do.enc.Utf8),Ue.from(t))}async joseEncrypt(e,t,n){const r=new Date,o=new Li(e).setProtectedHeader({alg:"HS256"}).setIssuedAt(r.getTime()).setExpirationTime(n),i=await o.sign(Ue.from(t));return Do.AES.encrypt(i,t).toString()}handleError(e){throw new Mi(e)}}class qi extends a{constructor(e){var t;super(),this.authInfo=e,this.encryptedApi=Fi.getInstance(this.authInfo.apiKey),this.objectHelper=qn.getInstance(),this.baseUrl=null!==(t=s.url[this.authInfo.env])&&void 0!==t?t:s.url.dev,this.client=Mn.create(Object.assign({baseURL:this.baseUrl},this.getConfig({[s.accessHeader]:`Bearer ${this.authInfo.token}`})))}getConfig(e){return{headers:Object.assign({"Content-Type":"application/json",[i]:this.authInfo.env},e)}}async get(e,t){return this.createRequest(e,t,this.client.get)}async post(e,t,n){let i=t;if(this.authInfo.env!==exports.RMN_ENV.DEV){const e=(new Date).getTime();n=Object.assign(Object.assign({},n),{headers:Object.assign(Object.assign({},null==n?void 0:n.headers),{[r]:"true",[o]:e,[s.apiHeader]:this.authInfo.apiKey})}),i={t:await this.encryptedApi.handleEncryption(t,e)}}return this.createRequest(e,n,((e,t)=>this.client.post(e,i,t)))}async createRequest(e,t,n){try{const r=this.createURL(e),o=this.createFullConfig(t),i=await this.sendRequest(r,o,n);return await this.getResponse(i)}catch(e){return{isOk:!1,val:null,isErr:new Mi(e)}}}createFullConfig(e){return this.objectHelper.merge(this.getConfig(),null!=e?e:{})}async sendRequest(e,t,n){return n(e,t)}async getResponse(e){var t,n,i,s,a,c,l;let h=(null==e?void 0:e.data)?e.data:null,u=!1,f=0;if((null==e?void 0:e.headers)&&(null===(t=null==e?void 0:e.headers)||void 0===t?void 0:t.has)&&(null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n.has(r))&&(null===(i=null==e?void 0:e.headers)||void 0===i?void 0:i.has(o))&&(null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s.get)&&(u="true"===(null===(a=null==e?void 0:e.headers)||void 0===a?void 0:a.get(r)),f=(null===(c=null==e?void 0:e.headers)||void 0===c?void 0:c.get(o))?Number(null===(l=null==e?void 0:e.headers)||void 0===l?void 0:l.get(o)):0),h&&u&&this.objectHelper.includes(h,"t")&&f>0){const{t:e}=h,t=await this.encryptedApi.handleDecryption(e,f);(null==t?void 0:t.payload)&&(delete t.payload.exp,delete t.payload.iat,h=t.payload)}return{isOk:!0,val:h,isErr:!1}}createURL(e){const t=e&&"/"!==e[0]?`/${e}`:e;return`${this.baseUrl}/api${t}`}}class ji extends qi{constructor(e,t){super({authenticated:!1,apiKey:e,token:"",env:t})}static getInstance(e,t){return Fn.getInstance("AuthService",(()=>new ji(e,t)))}async initialize(){const{isOk:e,isErr:t,val:n}=await this.get("/auth",{headers:{[s.apiHeader]:this.authInfo.apiKey}});if(t)throw new Error(`There was an error during authentication: (${null==t?void 0:t.errorMessage})`);if(!e||!(null==n?void 0:n.data.token))throw new Error("Auth response was not successful");return this.authInfo.token=n.data.token,this.authInfo.authenticated=!0,this.authInfo}}const $i="spot-element";function Wi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e,secondaryImage:t})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n background-color: #FFFFFF;\n gap: 0.5cqw;\n text-decoration: none;\n color: inherit;\n }\n .big-image {\n width: 65%;\n height: 100%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .main {\n width: 35%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 0.5cqw;\n }\n .small-image {\n width: 100%;\n height: 50%;\n background-image: url("${t}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .text {\n background: #E8E6DE;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 50%;\n width: 100%;\n padding: 5% 10%;\n box-sizing: border-box;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 2.2cqw;\n color: #000000;\n font-style: normal;\n font-weight: 400;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 1.2cqw;\n color: #000000;\n font-style: normal;\n font-weight: 400;\n margin: 1cqh 0;\n }\n .button {\n font-size: 1cqw;\n color: #000000;\n background-color: transparent;\n font-style: normal;\n font-weight: 700;\n text-decoration: underline;\n text-transform: uppercase;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: opacity 0.3s ease;\n }\n .content:hover .button {\n opacity: 0.7;\n }\n @container (max-width: 600px) {\n .header {\n font-size: 3cqw;\n }\n .description {\n font-size: 1.6cqw;\n margin: 0;\n }\n .button {\n font-size: 1.4cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="big-image"></div>\n <div class="main">\n <div class="small-image"></div>\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="button">${e.ctaText}</span>\n </div>\n </div>\n </a>\n `}function Ki(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n font-family: "Source Sans 3", sans-serif;\n background-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%), url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n padding: 3%;\n box-sizing: border-box;\n text-decoration: none;\n color: #FFF;\n }\n .text-container {\n max-width: 50%;\n }\n .header {\n font-size: clamp(1.8cqw, 2.4cqw, 2.8cqw);\n font-style: normal;\n font-weight: 700;\n font-family: "Cormorant", serif;\n line-height: 1.2;\n margin: 0 0 0.8cqh 0;\n }\n .description {\n font-size: clamp(1.2cqw, 1.4cqw, 1.6cqw);\n font-style: normal;\n font-weight: 400;\n line-height: 1.4;\n margin: 0 0 1.2cqh 0;\n }\n .cta-button {\n font-size: clamp(1cqw, 1.1cqw, 1.4cqw);\n border-radius: 0.4cqh;\n border: 0.1cqh solid #FFF;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(2px);\n display: inline-block;\n padding: 0.8cqh 1.6cqw;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .cta-button {\n background-color: #FFF;\n color: #000;\n }\n @container (max-width: 600px) {\n .text-container {\n max-width: 100%;\n }\n .header {\n font-size: clamp(1.6cqw, 4vw, 2.4cqw);\n margin: 0 0 0.4cqh 0;\n }\n .description {\n font-size: clamp(1cqw, 2.5vw, 1.4cqw);\n margin: 0 0 .3cqh 0;\n }\n .cta-button {\n font-size: clamp(0.9cqw, 2vw, 1.2cqw);\n padding: 0.4cqh 0.8cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text-container">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Ji(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n text-decoration: none;\n color: inherit;\n }\n .text {\n width: 40%;\n padding: 4cqh 5cqw;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n gap: 0.7cqh;\n font-family: "Source Sans 3", sans-serif;\n background-color: #F9F7F5;\n }\n .header {\n font-size: clamp(18px, 4cqw, 36px);\n color: #000000;\n font-style: normal;\n font-weight: 300;\n font-family: "Cormorant", serif;\n margin: 0;\n line-height: 1.2;\n }\n .description {\n font-size: clamp(12px, 2cqw, 16px);\n color: #000000;\n font-style: normal;\n font-weight: 400;\n margin: 0;\n line-height: 1.5;\n }\n .button {\n font-size: clamp(10px, 1.5cqw, 14px);\n border: 1px solid #000000;\n border-radius: 5px;\n display: inline-block;\n padding: 0.7cqh 1.5cqw;\n color: #000000;\n font-weight: 600;\n text-transform: uppercase;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .button {\n background-color: #000000;\n color: #FFFFFF;\n }\n .image {\n width: 60%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n @container (max-width: 600px) {\n .text {\n padding: 1cqh 4cqw;\n width: 60%;\n }\n .image {\n width: 40%;\n }\n .header {\n font-size: clamp(12px, 3cqw, 24px);\n line-height: 0.5;\n }\n .description {\n font-size: clamp(10px, 2.5cqw, 14px);\n line-height: 1;\n }\n .button {\n font-size: clamp(6px, 2cqw, 12px);\n padding: 0.4cqh 1cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="button">${e.ctaText}</span>\n </div>\n <div class="image"></div>\n </a>\n `}function Yi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n <style>\n .content {\n display: inline-block;\n text-decoration: none;\n max-width: 100%;\n padding: 0.5em;\n background-color: #fff;\n }\n .header {\n display: block;\n font-size: 1.1em;\n font-weight: 500;\n color: #333;\n font-family: "Cormorant", serif;\n line-height: 1.2;\n margin-bottom: 0.2em;\n }\n .description {\n display: block;\n font-size: 0.9em;\n color: #4d4d4d;\n font-family: "Source Sans 3", sans-serif;\n line-height: 1.3;\n }\n </style>\n\n <a href="${e.clickUrl}" class="content">\n <span class="header">${e.header}</span>\n <span class="description">${e.description}</span>\n </a>\n `}function Vi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: inherit;\n }\n .text {\n width: 50%;\n padding-left: 3%;\n display: flex;\n flex-direction: column;\n gap: 0.3cqh;\n }\n .header {\n font-size: clamp(1.8cqh, 2.2cqw, 3cqh);\n font-weight: 300;\n color: #333;\n font-family: "Cormorant", serif;\n line-height: 1.1;\n margin: 0;\n }\n .description {\n font-size: clamp(1.2cqh, 1.3cqw, 2cqh);\n color: #4d4d4d;\n line-height: 1.2;\n margin: 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .cta-button {\n font-size: clamp(1cqh, 1.1cqw, 1.5cqh);\n font-weight: 600;\n color: #98773c;\n text-transform: uppercase;\n margin-top: 0.3cqh;\n display: inline-block;\n position: relative;\n width: fit-content;\n }\n .cta-button::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -0.2cqh;\n width: 100%;\n height: 1px;\n background-color: #98773c;\n transition: opacity 0.3s ease;\n }\n .content:hover .cta-button::after {\n opacity: 0.7;\n }\n\n @container (max-height: 100px) {\n .text {\n gap: 0.1cqh;\n }\n .description {\n -webkit-line-clamp: 1;\n }\n .cta-button::after {\n bottom: -0.1cqh;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Gi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n width: 50%;\n padding-right: 3%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 0.3cqh;\n }\n .header {\n font-size: clamp(1.8cqh, 2.2cqw, 3cqh);\n font-weight: 300;\n font-family: "Cormorant", serif;\n line-height: 1.1;\n margin: 0;\n text-align: left;\n }\n .description {\n font-size: clamp(1.2cqh, 1.3cqw, 2cqh);\n line-height: 1.2;\n margin: 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-align: left;\n }\n .cta-button {\n font-size: clamp(1cqh, 1.1cqw, 1.5cqh);\n font-weight: 600;\n color: #FFF;\n text-transform: uppercase;\n margin-top: 0.3cqh;\n display: inline-block;\n padding: 0.5cqh 1cqw;\n border: 1px solid #FFF;\n border-radius: 4px;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background-color: rgba(255, 255, 255, 0.2);\n }\n\n @container (max-height: 100px) {\n .text {\n gap: 0.1cqh;\n }\n .description {\n -webkit-line-clamp: 1;\n }\n .cta-button {\n padding: 0.3cqh 0.8cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Xi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-color: #fff;\n text-decoration: none;\n display: flex;\n flex-direction: column;\n }\n .image {\n width: 100%;\n height: 80%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n .text {\n text-align: left;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: auto;\n width: 100%;\n position: relative;\n overflow: hidden;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 5.5cqw;\n font-weight: 400;\n color: black;\n padding: 10px 10px 0 10px;\n font-family: "Cormorant", serif;\n }\n .description {\n font-size: 4cqw;\n color: rgb(77, 77, 77);\n padding: 0 10px 10px 10px;\n }\n </style>\n`)(e)}\n <a class="content" href="${e.clickUrl}">\n <div class="image"></div>\n <div class="text">\n <span class="header">${e.header}</span>\n <span class="description">${e.description}</span>\n </div>\n </a>\n `}function Zi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 2%;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 5%;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-family: "Cormorant", serif;\n font-size: 7cqw;\n font-weight: 300;\n line-height: 1.2;\n margin: 0 0 0.5cqw 0;\n }\n .description {\n font-size: 4cqw;\n line-height: 1.4;\n margin: 0 0 2cqw 0;\n }\n .cta-button {\n display: inline-block;\n padding: 1.5cqw 3cqw;\n border: 0.3cqw solid rgba(255, 255, 255, 0.5);\n border-radius: 1cqw;\n background: rgba(255, 255, 255, 0.2);\n color: #FFF;\n font-size: 3.5cqw;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background: rgba(255, 255, 255, 0.3);\n }\n\n @container (max-width: 380px) {\n .header {\n font-size: 8cqw;\n }\n .description {\n font-size: 4.5cqw;\n }\n .cta-button {\n font-size: 4cqw;\n padding: 2cqw 4cqw;\n }\n }\n\n @container (min-width: 381px) and (max-width: 480px) {\n .header {\n font-size: 7.5cqw;\n }\n .description {\n font-size: 4.2cqw;\n }\n .cta-button {\n font-size: 3.8cqw;\n }\n }\n\n @container (min-width: 481px) {\n .header {\n font-size: 6.5cqw;\n }\n .description {\n font-size: 3.8cqw;\n }\n .cta-button {\n font-size: 3.2cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function Qi(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-color: #fff;\n text-decoration: none;\n display: flex;\n justify-content: flex-start;\n align-items: flex-end;\n border-radius: 1cqw;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 52.1%, #000 100%), url("${e}") lightgray 50% / cover no-repeat;\n overflow: hidden;\n }\n .header {\n font-size: 7cqw;\n color: #FFF;\n font-style: normal;\n font-weight: 400;\n line-height: 1.2;\n font-family: "Cormorant", serif;\n padding: 0 5cqw 5cqw 5cqw;\n }\n\n @container (min-width: 400px) {\n .header {\n font-size: 6cqw;\n padding: 0 4cqw 4cqw 4cqw;\n }\n }\n\n @container (min-width: 800px) {\n .header {\n font-size: 5cqw;\n padding: 0 3cqw 3cqw 3cqw;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <span class="header">${e.header}</span>\n </a>\n `}function es(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n background-color: #000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n font-family: "Source Sans 3", sans-serif;\n text-decoration: none;\n color: inherit;\n }\n .text {\n padding: 5%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: left;\n gap: 1.5cqw;\n background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 30%);\n }\n .header {\n font-size: 7cqw;\n color: #FFF;\n font-weight: 300;\n line-height: 1.2;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 4cqw;\n color: #CCC;\n font-weight: 400;\n line-height: 1.3;\n margin: 0.5cqw 0 1.5cqw 0;\n }\n .cta-button {\n font-size: 3.5cqw;\n font-weight: 600;\n color: #B59048;\n text-transform: uppercase;\n letter-spacing: 0.1em;\n }\n .content:hover .cta-button {\n opacity: 0.8;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function ts(e){return`\n ${(({primaryImage:e})=>`\n <style>\n .content {\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n display: block;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content"></a>\n `}function ns(e){return`\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 223px;\n }\n .content {\n display: block;\n width: 100%;\n height: 100%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content"></a>\n `}function rs(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 388px;\n }\n .content {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n font-family: "Source Sans 3", sans-serif;\n background-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%), url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n padding: 3%;\n box-sizing: border-box;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: fit-content;\n gap: 5px;\n }\n .header {\n font-size: 18px;\n font-style: normal;\n font-weight: 300;\n font-family: "Cormorant", serif;\n line-height: normal;\n margin: 0;\n }\n .description {\n font-size: 10px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n margin: 0;\n }\n .cta-button {\n font-size: 8px;\n border-radius: 5px;\n border: 0.5px solid #FFF;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(2px);\n display: inline-block;\n padding: 7px 20px;\n transition: background-color 0.3s, color 0.3s;\n }\n .content:hover .cta-button {\n background-color: #FFF;\n color: #000;\n }\n @media (min-width: 768px) {\n .primary-image {\n width: 66.66666%;\n height: 100%;\n }\n .main {\n flex-direction: column;\n height: 100%;\n width: 33.33333%;\n }\n .secondary-image {\n width: 100%;\n height: 50%;\n }\n .header {\n font-size: 22px;\n }\n .description {\n font-size: 12px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n`}function os(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e,secondaryImage:t})=>`\n <style>\n :host {\n min-width: 360px;\n min-height: 388px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column; \n background-color: #FFFFFF;\n gap: 5px;\n text-decoration: none;\n color: inherit;\n }\n .primary-image {\n width: 100%;\n height: 60%;\n background-image: url("${e}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .main {\n width: 100%;\n height: 40%;\n display: flex;\n flex-direction: row;\n gap: 5px;\n }\n .secondary-image {\n width: 50%;\n height: 100%;\n background-image: url("${t}");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n }\n .text {\n background: #E8E6DE;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 50%;\n height: 100%;\n gap: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n font-family: "Source Sans 3", sans-serif;\n }\n .header {\n font-size: 18px;\n color: #212121;\n font-style: normal;\n font-weight: 400;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n .description {\n font-size: 10px;\n color: #212121;\n font-style: normal;\n font-weight: 400;\n margin: 0;\n }\n .cta-button {\n font-size: 8px;\n color: #212121;\n background-color: transparent;\n font-style: normal;\n font-weight: 700;\n text-decoration: underline;\n text-transform: uppercase;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: opacity 0.3s ease;\n }\n .content:hover .cta-button {\n opacity: 0.7;\n }\n @media (min-width: 768px) {\n .content {\n flex-direction: row;\n }\n .primary-image {\n width: 66.66666%;\n height: 100%;\n }\n .main {\n flex-direction: column;\n height: 100%;\n width: 33.33333%;\n }\n .secondary-image {\n width: 100%;\n height: 50%;\n }\n .text {\n width: 100%;\n height: 50%;\n }\n .header {\n font-size: 22px;\n }\n .description {\n font-size: 12px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="primary-image"></div>\n <div class="main">\n <div class="secondary-image"></div>\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </div>\n </a>\n `}function is(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 340px;\n min-height: 334px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 20px;\n width: 70%;\n font-family: "Source Sans 3", sans-serif;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n }\n .header {\n font-family: "Cormorant", serif;\n font-size: 20px;\n font-weight: 300;\n line-height: normal;\n margin: 0;\n }\n .description {\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n margin: 0;\n }\n .cta-button {\n width: fit-content;\n display: inline-block;\n padding: 7px 20px;\n border: 0.5px solid rgba(255, 255, 255, 0.5);\n border-radius: 5px;\n color: #fff;\n font-size: 8px;\n transition: background-color 0.3s ease;\n }\n .content:hover .cta-button {\n background: rgba(255, 255, 255, 0.15);\n }\n @media (min-width: 768px) {\n .text {\n padding: 25px;\n }\n .header {\n font-size: 24px;\n }\n .description {\n font-size: 13px;\n line-height: 18px;\n }\n .cta-button {\n font-size: 12px;\n }\n }\n @media (min-width: 1024px) {\n .text {\n padding: 30px;\n }\n .header {\n font-size: 28px;\n }\n .description {\n font-size: 14px;\n }\n .cta-button {\n font-size: 13px;\n }\n }\n @media (min-width: 1280px) {\n .cta-button {\n font-size: 14px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n <p class="description">${e.description}</p>\n <span class="cta-button">${e.ctaText}</span>\n </div>\n </a>\n `}function ss(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 340px;\n min-height: 150px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n background-image: url("${e}"), linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(128,128,128,0.7), rgba(0,0,0,0.7));\n background-size: cover;\n background-position: center;\n background-blend-mode: overlay;\n }\n .text {\n padding: 15px 10%;\n width: fit-content;\n }\n .header {\n font-size: 16px;\n font-weight: 400;\n color: #fff;\n line-height: 20px;\n font-family: "Cormorant", serif;\n margin: 0;\n }\n @media (min-width: 768px) {\n .header {\n font-size: 22px;\n }\n }\n @media (min-width: 1024px) {\n .header {\n font-size: 24px;\n }\n }\n @media (min-width: 1280px) {\n .header {\n font-size: 28px;\n }\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n </div>\n </a>\n `}function as(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 165px;\n min-height: 334px;\n }\n .content {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.6) 100%), url("${e}") center/cover no-repeat;\n border-radius: 5px;\n overflow: hidden;\n text-decoration: none;\n color: #FFF;\n }\n .text {\n padding: 10px;\n width: 70%;\n }\n .header {\n font-size: 12px;\n font-weight: 400;\n color: #000;\n line-height: 16px;\n font-family: "Cormorant", serif;\n }\n </style>\n`)(e)}\n <a href="${e.clickUrl}" class="content">\n <div class="text">\n <h2 class="header">${e.header}</h2>\n </div>\n </a>\n `}function cs(e){return`\n \n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n\n \n<link \nhref="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" \nrel="stylesheet">\n\n ${(({primaryImage:e})=>`\n <style>\n :host {\n min-width: 165px;\n min-height: 300px;\n }\n .content {\n width: 100%;\n height: 100%;\n background-color: transparent;\n text-decoration: none;\n display: flex;\n flex-direction: column;\n }\n .image {\n width: 100%;\n height: 85%;\n background-image: url("${e}");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n }\n .text {\n text-align: left;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n width: 100%;\n height: 15%;\n position: relative;\n overflow: hidden;\n }\n .header {\n font-size: 12px;\n font-weight: 400;\n color: #000;\n padding-top: 5px;\n line-height: 16px;\n font-family: "Cormorant", serif;\n }\n </style>\n`)(e)}\n <a class="content" href="${e.clickUrl}">\n <div class="image"></div>\n <div class="text">\n <span class="header">${e.header}</span>\n </div>\n </a>\n `}var ls;!function(e){e.SPOT="spot",e.VARIANT="variant",e.WIDTH="width",e.HEIGHT="height",e.FLUID="fluid",e.PRE_HEADER="preHeader",e.HEADER="header",e.DESCRIPTION="description",e.PRIMARY_IMAGE="primaryImage",e.SECONDARY_IMAGE="secondaryImage",e.MOBILE_PRIMARY_IMAGE="mobilePrimaryImage",e.MOBILE_SECONDARY_IMAGE="mobileSecondaryImage",e.CTA_TEXT="ctaText",e.CLICK_URL="clickUrl"}(ls||(ls={}));let hs;if("undefined"!=typeof window&&void 0!==window.customElements){class e extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}render(){const e={spot:String(this.getAttribute(ls.SPOT)),variant:String(this.getAttribute(ls.VARIANT)),width:Number(this.getAttribute(ls.WIDTH)),height:Number(this.getAttribute(ls.HEIGHT)),fluid:String(this.getAttribute(ls.FLUID)),preHeader:this.getAttribute(ls.PRE_HEADER)||"",header:this.getAttribute(ls.HEADER)||"",description:this.getAttribute(ls.DESCRIPTION)||"",primaryImage:this.getAttribute(ls.PRIMARY_IMAGE)||"",secondaryImage:this.getAttribute(ls.SECONDARY_IMAGE)||"",mobilePrimaryImage:this.getAttribute(ls.MOBILE_PRIMARY_IMAGE)||"",mobileSecondaryImage:this.getAttribute(ls.MOBILE_SECONDARY_IMAGE)||"",ctaText:this.getAttribute(ls.CTA_TEXT)||"",clickUrl:this.getAttribute(ls.CLICK_URL)||""};if(this.shadowRoot){const t=((e,t)=>{const n=document.createElement("style");n.textContent=`\n :host {\n display: block;\n position: relative;\n container-type: inline-size;\n }\n :host([fluid="true"]) {\n width: 100%;\n height: 100%;\n }\n :host([fluid="false"]) {\n width: ${e}px;\n height: ${t}px;\n }\n .wrapper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n`;const r=document.createElement("div");return r.className="wrapper",{style:n,wrapper:r}})(e.width,e.height);t.wrapper.innerHTML=(e=>{const t={[exports.RMN_SPOT_TYPE.RB_HOMEPAGE_HERO_THREE_TILE]:{rbHomepageHeroThreeTile:os},[exports.RMN_SPOT_TYPE.RB_HOMEPAGE_HERO_FULL_IMAGE]:{rbHomepageHeroFullImage:rs},[exports.RMN_SPOT_TYPE.RB_LARGE_CATEGORY_IMAGE_TOUT]:{rbLargeCategoryImageTout:is},[exports.RMN_SPOT_TYPE.RB_SMALL_DISCOVER_TOUT]:{rbSmallDiscoverTout:cs},[exports.RMN_SPOT_TYPE.RB_SMALL_CATEGORY_IMAGE_TOUT]:{rbSmallCategoryImageTout:as},[exports.RMN_SPOT_TYPE.RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK]:{rbCollectionBannerWithoutTextBlock:ns},[exports.RMN_SPOT_TYPE.RB_NAVIGATION_BANNER]:{rbNavigationBanner:ss},[exports.RMN_SPOT_TYPE.RB_PRODUCT_UPCS]:{rbProductUpcs:()=>""},[exports.RMN_SPOT_TYPE.BILLBOARD]:{billboardV1:Wi,billboardV2:Ki,billboardV3:Ji},[exports.RMN_SPOT_TYPE.LARGE_RECTANGLE]:{largeRectangleV1:Xi},[exports.RMN_SPOT_TYPE.VERTICAL_RECTANGLE]:{verticalRectangleV1:es},[exports.RMN_SPOT_TYPE.SQUARE]:{squareV1:Zi,squareV2:Qi},[exports.RMN_SPOT_TYPE.LARGE_LEADERBOARD]:{largeLeaderboardV1:Vi,largeLeaderboardV2:Gi},[exports.RMN_SPOT_TYPE.WIDE_SKYSCRAPER]:{wideSkyscraperV1:ts},[exports.RMN_SPOT_TYPE.IN_TEXT]:{inTextV1:Yi}}[e.spot];if(!t)return"";const n=t[e.variant];return n?n(e):""})(e),this.shadowRoot.innerHTML="",this.shadowRoot.appendChild(t.style),this.shadowRoot.appendChild(t.wrapper)}}}e.observedAttributes=Object.values(ls),hs=e}class us{static getInstance(){return Fn.getInstance("SpotHtmlService",(()=>new us))}createSpotHtmlElement(e,t){if(!this.ensureBrowserEnvironmentAndDefineElement())return null;const n=document.createElement($i),r=this.onlySpotAttributes(e,t);for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&void 0!==r[e]&&""!==r[e]&&n.setAttribute(e,String(r[e]));return n}ensureBrowserEnvironmentAndDefineElement(){return"undefined"==typeof window||"undefined"==typeof document?(console.warn("LiquidCommerce Rmn Sdk: createSpotElement is only available in browser environments!!!"),!1):(customElements.get($i)||customElements.define($i,hs),!0)}onlySpotAttributes(e,t){const n=e,r=Object.values(ls);for(const e in n)r.includes(e)||delete n[e];return n.fluid=String(t),n}}class fs extends qi{constructor(e){super(e)}static getInstance(e){return Fn.getInstance("SpotSelectionService",(()=>new fs(e)))}async spotSelection(e){const{isOk:t,val:n,isErr:r}=await this.post("/spots/selection",e,{});if(r)throw new Error(`There was an error during spot selection: (${null==r?void 0:r.errorMessage})`);if(t&&n&&n.data&&(null==n?void 0:n.refresh.token))return this.authInfo.authenticated=!0,this.authInfo.token=n.refresh.token,n.data.spots;throw new Error("Spot selection response was not successful")}}class ds{constructor(e){this.spotSelectionService=fs.getInstance(e),this.spotHtmlService=us.getInstance()}async spotSelection(e){return this.spotSelectionService.spotSelection(e)}createSpotElement(e,t){return this.spotHtmlService.createSpotHtmlElement(e,null!=t&&t)}}exports.LiquidCommerceRmnClient=ds,exports.RmnClient=async function(e,t){const n=ji.getInstance(e,t.env),r=await n.initialize();return new ds(r)},exports.RmnCreateSpotElement=function(e,t){return us.getInstance().createSpotHtmlElement(e,null!=t&&t)};
19
19
  //# sourceMappingURL=index.js.map