import"./modulepreload-polyfill-CkedBBHh.js";import{n as e}from"./giftHighlightPresets-CnCwen0h.js";import{a as t,c as n,d as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./giftHighlightCommon-kT7woe4f.js";var d=t();o();var f=document.createElement(`style`);f.textContent=`
#hl-root{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;
  font-family:var(--oi-font,'Trebuchet MS','Segoe UI',system-ui,sans-serif)}
#hl-fx{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.bs-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:22px 32px 20px;border-radius:var(--oi-panel-radius,22px);
  background:var(--oi-panel-bg,rgba(26,17,4,.6));border:var(--oi-panel-border,1px solid rgba(255,216,107,.32));
  box-shadow:0 10px 40px rgba(0,0,0,.45),inset 0 0 30px rgba(var(--oi-glow,255,216,107),.08);
  backdrop-filter:blur(2px);transition:opacity .5s ease}
.bs-card::before{content:"";position:absolute;inset:-14px;border-radius:inherit;z-index:-1;
  background:radial-gradient(circle at 50% 70%,rgba(var(--oi-glow,255,216,107),.4),transparent 70%);
  filter:blur(6px);animation:bs-aura 2.2s ease-in-out infinite}
@keyframes bs-aura{0%,100%{opacity:.6;transform:scale(.98)}50%{opacity:1;transform:scale(1.05)}}
.bs-label{font-size:15px;font-weight:800;letter-spacing:3px;text-transform:uppercase;
  background:linear-gradient(100deg,var(--oi-label,#ffe9ad) 20%,#fff 50%,var(--oi-label,#ffe9ad) 80%);
  background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.6));animation:bs-shim 3.2s linear infinite}
@keyframes bs-shim{to{background-position:200% center}}
.bs-giftwrap{position:relative;width:158px;height:158px;display:flex;align-items:center;justify-content:center}
.bs-gift{position:relative;width:142px;height:142px;filter:drop-shadow(0 6px 15px rgba(0,0,0,.5)) drop-shadow(0 0 22px rgba(var(--oi-glow,255,216,107),.78));
  animation:bs-float 3s ease-in-out infinite}
.bs-gift img,.bs-gift svg{width:100%;height:100%;object-fit:contain}
@keyframes bs-float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-7px) rotate(3deg)}}
/* Combo grande con LLAMA detrás (capas de gradiente que parpadean → transform/opacity). */
.bs-combo{position:relative;display:flex;align-items:baseline;justify-content:center;margin-top:2px;padding:2px 8px}
.bs-flame{position:absolute;left:50%;bottom:-8px;width:130%;height:150%;transform:translateX(-50%);z-index:-1;pointer-events:none;
  background:radial-gradient(50% 60% at 50% 100%,rgba(var(--oi-glow,255,216,107),.85),rgba(var(--oi-glow,255,216,107),.25) 45%,transparent 72%);
  -webkit-mask:radial-gradient(60% 80% at 50% 100%,#000 40%,transparent 75%);mask:radial-gradient(60% 80% at 50% 100%,#000 40%,transparent 75%);
  animation:bs-flame .5s ease-in-out infinite alternate}
@keyframes bs-flame{0%{transform:translateX(-50%) scaleY(1) scaleX(1);opacity:.85}100%{transform:translateX(-51%) scaleY(1.12) scaleX(.94);opacity:1}}
.bs-x{font-size:26px;font-weight:900;color:var(--oi-c2,#ffd86b);align-self:center;margin-right:2px;
  filter:drop-shadow(1px 1px 0 rgba(0,0,0,.85)) drop-shadow(0 0 10px rgba(var(--oi-glow,255,216,107),.7))}
.bs-num{font-size:58px;font-weight:900;line-height:.9;
  background:linear-gradient(180deg,#fff 0%,var(--oi-c1,#fff7da) 35%,var(--oi-c2,#ffd86b) 65%,var(--oi-c3,#d4881f) 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(1.5px 1.5px 0 rgba(0,0,0,.9)) drop-shadow(-1.5px -1.5px 0 rgba(0,0,0,.9)) drop-shadow(0 3px 6px rgba(0,0,0,.6));
  animation:bs-beat 1.6s ease-in-out infinite}
@keyframes bs-beat{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}
.bs-who{display:flex;align-items:center;gap:8px;max-width:80vw;margin-top:2px}
.bs-avatar{width:30px;height:30px;border-radius:50%;flex:none;overflow:hidden;display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:800;color:#1a1407;background:linear-gradient(180deg,var(--oi-c1,#fff7da),var(--oi-c2,#ffd86b));
  box-shadow:0 0 0 2px rgba(var(--oi-glow,255,216,107),.6),0 2px 6px rgba(0,0,0,.5)}
.bs-avatar img{width:100%;height:100%;object-fit:cover}
.bs-name{font-size:20px;font-weight:800;color:var(--oi-name,#fff);
  text-shadow:-1.2px -1.2px 0 rgba(0,0,0,.85),1.2px -1.2px 0 rgba(0,0,0,.85),-1.2px 1.2px 0 rgba(0,0,0,.85),1.2px 1.2px 0 rgba(0,0,0,.85),0 2px 7px rgba(0,0,0,.7);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70vw}
.bs-gname{font-size:13px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--oi-label,#ffe9ad);opacity:.9;
  text-shadow:0 1px 3px rgba(0,0,0,.7)}
.bs-empty .bs-gift{opacity:.4;filter:grayscale(.5) drop-shadow(0 4px 10px rgba(0,0,0,.4))}
.bs-empty .bs-flame{opacity:.25}
.bs-empty .bs-num,.bs-empty .bs-name,.bs-empty .bs-gname{opacity:.5}
@media (prefers-reduced-motion:reduce){
  .bs-card::before,.bs-label,.bs-gift,.bs-flame,.bs-num{animation:none!important}
}
`,document.head.appendChild(f);var p=document.getElementById(`hl-root`);p.innerHTML=`
  <canvas id="hl-fx"></canvas>
  <div class="bs-card bs-empty" id="bs-card">
    <div class="bs-label" id="bs-label">MEJOR RACHA</div>
    <div class="bs-giftwrap"><div class="bs-gift" id="bs-gift"></div></div>
    <div class="bs-combo"><span class="bs-flame"></span><span class="bs-x">×</span><span class="bs-num" id="bs-num">0</span></div>
    <div class="bs-gname" id="bs-gname">Regalo</div>
    <div class="bs-who"><div class="bs-avatar" id="bs-avatar">?</div><div class="bs-name" id="bs-name">Usuario</div></div>
  </div>
`;var m=document.getElementById(`bs-card`),h=document.getElementById(`bs-label`),g=document.getElementById(`bs-gift`),_=document.getElementById(`bs-num`),v=document.getElementById(`bs-gname`),y=document.getElementById(`bs-avatar`),b=document.getElementById(`bs-name`),x=new l(document.getElementById(`hl-fx`),p),S=0,C=null;function w(e,t){if(!e||e.count<=1){m.classList.add(`bs-empty`),_.textContent=`0`,v.textContent=e?.giftName||`—`,b.textContent=e?e.username:`Sin rachas aún`,u(g,e?.giftImage||null,p),y.textContent=`?`,S=e?.count??0;return}m.classList.remove(`bs-empty`),u(g,e.giftImage||null,p),i(y,e.avatar||null,e.username),b.textContent=e.username,v.textContent=e.giftName;let n=e.count>S;C?.(),C=s(_,t?S:e.count,e.count,t?800:0,e=>{_.textContent=String(Math.round(e))}),S=e.count,t&&n&&(c(_.parentElement,1.22),x.burst(m.querySelector(`.bs-combo`),1.1))}function T(e){let t=typeof e.preset==`string`?e.preset:void 0,n=e.vars&&typeof e.vars==`object`?e.vars:void 0;(t||n)&&a(p,t,n),typeof e.title==`string`&&e.title.trim()&&(h.textContent=e.title)}if(a(p,d.isDemo?d.presetParam??`gold`:e,d.isDemo?d.varsParam:void 0),d.title&&(h.textContent=d.title),d.isDemo){let e=n(`cheap`),t={username:`ElDiegoGG`,avatar:``,giftName:e.name,giftImage:e.image,value:500,count:99,ts:0};w(t,!1),setTimeout(()=>{S=0,w(t,!0)},700),setInterval(()=>{S=0,w(t,!0)},6500)}else r(d,{settingsKey:`bestStreak`,onSettings:T,onState:e=>w(e[d.scope].bestStreak,!0),onTest:e=>{e.platform&&e.platform!==d.platform||e.kind&&e.kind!==`bestStreak`||(S=0,w({username:String(e.username??`Tester`),avatar:String(e.avatar??``),giftName:String(e.giftName??`Regalo`),giftImage:String(e.giftImage??``),value:Number(e.value??0)||0,count:Number(e.count??2)||2,ts:0},!0))}});