import"./modulepreload-polyfill-CkedBBHh.js";import{n as e}from"./giftHighlightPresets-CnCwen0h.js";import{a as t,c as n,d as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./giftHighlightCommon-kT7woe4f.js";var f=t();s();var p=document.createElement(`style`);p.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}
.tg-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;
  padding:22px 30px 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}
/* Aura que respira detrás de la tarjeta (opacity/scale → barato). */
.tg-card::before{content:"";position:absolute;inset:-14px;border-radius:inherit;z-index:-1;
  background:radial-gradient(circle,rgba(var(--oi-glow,255,216,107),.35),transparent 70%);
  filter:blur(6px);animation:tg-aura 3.4s ease-in-out infinite}
@keyframes tg-aura{0%,100%{opacity:.55;transform:scale(.98)}50%{opacity:1;transform:scale(1.04)}}
.tg-label{font-size:14px;font-weight:800;letter-spacing:3px;text-transform:uppercase;opacity:.92;
  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:tg-shim 3.2s linear infinite}
@keyframes tg-shim{to{background-position:200% center}}
.tg-giftwrap{position:relative;width:190px;height:190px;display:flex;align-items:center;justify-content:center;margin:2px 0}
.tg-halo{position:absolute;inset:-16px;border-radius:50%;
  background:radial-gradient(circle,rgba(var(--oi-glow,255,216,107),.5) 0%,rgba(var(--oi-glow,255,216,107),.12) 45%,transparent 70%);
  animation:tg-halo 2.6s ease-in-out infinite}
@keyframes tg-halo{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(1.14);opacity:1}}
.tg-ring{position:absolute;inset:-4px;border-radius:50%;
  background:conic-gradient(from 0deg,transparent,rgba(255,255,255,.55),transparent 28%);
  -webkit-mask:radial-gradient(circle,transparent 60%,#000 62%);mask:radial-gradient(circle,transparent 60%,#000 62%);
  animation:tg-spin 4.5s linear infinite}
@keyframes tg-spin{to{transform:rotate(360deg)}}
.tg-gift{position:relative;width:162px;height:162px;display:flex;align-items:center;justify-content:center;
  filter:drop-shadow(0 7px 16px rgba(0,0,0,.5)) drop-shadow(0 0 22px rgba(var(--oi-glow,255,216,107),.75));
  animation:tg-float 3.2s ease-in-out infinite}
.tg-gift img,.tg-gift svg{width:100%;height:100%;object-fit:contain}
@keyframes tg-float{0%,100%{transform:translateY(0) rotate(-2.5deg)}50%{transform:translateY(-9px) rotate(2.5deg)}}
.tg-who{display:flex;align-items:center;gap:8px;max-width:80vw;margin-top:1px}
.tg-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)}
.tg-avatar img{width:100%;height:100%;object-fit:cover}
.tg-name{font-size:22px;font-weight:800;line-height:1.05;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:74vw}
.tg-value{display:flex;align-items:center;gap:6px;font-size:34px;font-weight:900;line-height:1;
  background:linear-gradient(180deg,var(--oi-c1,#fff7da) 0%,var(--oi-c2,#ffd86b) 50%,var(--oi-c3,#d4881f) 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(1.4px 1.4px 0 rgba(0,0,0,.9)) drop-shadow(-1.4px -1.4px 0 rgba(0,0,0,.9)) drop-shadow(0 2px 5px rgba(0,0,0,.6))}
.tg-coin{width:26px;height:26px;flex:none;filter:drop-shadow(0 0 6px rgba(var(--oi-glow,255,216,107),.7))}
.tg-empty .tg-gift{opacity:.4;filter:grayscale(.5) drop-shadow(0 4px 10px rgba(0,0,0,.4))}
.tg-empty .tg-name,.tg-empty .tg-value{opacity:.55}
.tg-flash{position:absolute;inset:0;border-radius:inherit;background:radial-gradient(circle,rgba(255,250,235,.9),transparent 65%);opacity:0;pointer-events:none}
@media (prefers-reduced-motion:reduce){
  .tg-card::before,.tg-label,.tg-halo,.tg-ring,.tg-gift{animation:none!important}
}
`,document.head.appendChild(p);var m=document.getElementById(`hl-root`);m.innerHTML=`
  <canvas id="hl-fx"></canvas>
  <div class="tg-card tg-empty" id="tg-card">
    <div class="tg-flash" id="tg-flash"></div>
    <div class="tg-label" id="tg-label">MEJOR REGALO</div>
    <div class="tg-giftwrap">
      <div class="tg-halo"></div><div class="tg-ring"></div>
      <div class="tg-gift" id="tg-gift"></div>
    </div>
    <div class="tg-who"><div class="tg-avatar" id="tg-avatar">?</div><div class="tg-name" id="tg-name">Usuario</div></div>
    <div class="tg-value"><span class="tg-coin" id="tg-coin"></span><span id="tg-num">0</span></div>
  </div>
`;var h=document.getElementById(`tg-card`),g=document.getElementById(`tg-flash`),_=document.getElementById(`tg-label`),v=document.getElementById(`tg-gift`),y=document.getElementById(`tg-avatar`),b=document.getElementById(`tg-name`),x=document.getElementById(`tg-num`),S=document.getElementById(`tg-coin`),C=new u(document.getElementById(`hl-fx`),m),w=(e,t,n)=>`<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><defs><radialGradient id="cg" cx=".4" cy=".35" r=".8"><stop offset="0" stop-color="${e}"/><stop offset=".6" stop-color="${t}"/><stop offset="1" stop-color="${n}"/></radialGradient></defs><circle cx="16" cy="16" r="14" fill="url(#cg)" stroke="${n}" stroke-width="1.5"/><circle cx="16" cy="16" r="9.5" fill="none" stroke="rgba(0,0,0,.18)" stroke-width="1.5"/><text x="16" y="21.5" font-size="14" font-weight="900" text-anchor="middle" fill="rgba(0,0,0,.35)" font-family="Arial">$</text></svg>`;function T(){let e=getComputedStyle(m);S.innerHTML=w(e.getPropertyValue(`--oi-c1`).trim()||`#fff7da`,e.getPropertyValue(`--oi-c2`).trim()||`#ffd86b`,e.getPropertyValue(`--oi-c3`).trim()||`#d4881f`)}var E=0,D=null;function O(e,t){if(!e||e.value<=0){h.classList.add(`tg-empty`),b.textContent=`Esperando regalos…`,d(v,null,m),y.textContent=`?`,x.textContent=`0`,E=0;return}h.classList.remove(`tg-empty`),d(v,e.giftImage||null,m),a(y,e.avatar||null,e.username),b.textContent=e.username;let n=e.value>E;D?.(),D=c(x,t?E:e.value,e.value,t?900:0,e=>{x.textContent=i(e)}),E=e.value,t&&n&&(l(h.querySelector(`.tg-giftwrap`),1.16),g.animate([{opacity:0},{opacity:1,offset:.15},{opacity:0}],{duration:700,easing:`ease-out`}),C.burst(h.querySelector(`.tg-giftwrap`),1))}function k(e){let t=typeof e.preset==`string`?e.preset:void 0,n=e.vars&&typeof e.vars==`object`?e.vars:void 0;(t||n)&&o(m,t,n),typeof e.title==`string`&&e.title.trim()&&(_.textContent=e.title),T()}if(o(m,f.isDemo?f.presetParam??`gold`:e,f.isDemo?f.varsParam:void 0),T(),f.title&&(_.textContent=f.title),f.isDemo){let e=n(`expensive`),t={username:`CarlaStream`,avatar:``,giftName:e.name,giftImage:e.image,value:34999,count:1,ts:0};O(t,!1),setTimeout(()=>{E=0,O(t,!0)},700),setInterval(()=>{E=0,O(t,!0)},6500)}else r(f,{settingsKey:`topGift`,onSettings:k,onState:e=>O(e[f.scope].bestGift,!0),onTest:e=>{e.platform&&e.platform!==f.platform||e.kind&&e.kind!==`topGift`||(E=0,O({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??1)||1,ts:0},!0))}});