import"./modulepreload-polyfill-CkedBBHh.js";import{n as e}from"./giftHighlightPresets-CnCwen0h.js";import{a as t,c as n,d as r,n as i,o as a,r as o,s,t as c,u as l}from"./giftHighlightCommon-kT7woe4f.js";var u=t();a();var d=70,f=2*Math.PI*d,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}
.gg-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}
.gg-card::before{content:"";position:absolute;inset:-14px;border-radius:inherit;z-index:-1;
  background:radial-gradient(circle,rgba(var(--oi-glow,255,216,107),.32),transparent 70%);
  filter:blur(6px);animation:gg-aura 3.4s ease-in-out infinite}
@keyframes gg-aura{0%,100%{opacity:.5;transform:scale(.98)}50%{opacity:.95;transform:scale(1.04)}}
.gg-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:gg-shim 3.2s linear infinite}
@keyframes gg-shim{to{background-position:200% center}}
.gg-dial{position:relative;width:200px;height:200px;display:flex;align-items:center;justify-content:center}
.gg-svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.gg-track{fill:none;stroke:rgba(255,255,255,.14);stroke-width:11}
.gg-prog{fill:none;stroke:url(#gg-grad);stroke-width:11;stroke-linecap:round;
  stroke-dasharray:${f.toFixed(1)};stroke-dashoffset:${f.toFixed(1)};
  transition:stroke-dashoffset .85s cubic-bezier(.3,1,.4,1);filter:drop-shadow(0 0 6px rgba(var(--oi-glow,255,216,107),.8))}
.gg-shine{position:absolute;inset:6px;border-radius:50%;
  background:conic-gradient(from 0deg,transparent,rgba(255,255,255,.4),transparent 26%);
  -webkit-mask:radial-gradient(circle,transparent 66%,#000 68%);mask:radial-gradient(circle,transparent 66%,#000 68%);
  animation:gg-spin 5s linear infinite}
@keyframes gg-spin{to{transform:rotate(360deg)}}
.gg-gift{position:relative;width:118px;height:118px;filter:drop-shadow(0 6px 14px rgba(0,0,0,.5)) drop-shadow(0 0 20px rgba(var(--oi-glow,255,216,107),.75));
  animation:gg-float 3.2s ease-in-out infinite}
.gg-gift img,.gg-gift svg{width:100%;height:100%;object-fit:contain}
@keyframes gg-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(2deg)}}
.gg-count{display:flex;align-items:baseline;gap:2px;font-weight:900}
.gg-cur{font-size:40px;line-height:1;background:linear-gradient(180deg,var(--oi-c1,#fff7da),var(--oi-c2,#ffd86b) 55%,var(--oi-c3,#d4881f));
  -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))}
.gg-sep{font-size:26px;color:var(--oi-name,#fff);opacity:.7;text-shadow:0 1px 3px rgba(0,0,0,.7)}
.gg-tgt{font-size:26px;color:var(--oi-name,#fff);opacity:.88;text-shadow:-1px -1px 0 rgba(0,0,0,.7),1px 1px 0 rgba(0,0,0,.7),0 2px 6px rgba(0,0,0,.6)}
.gg-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);margin-top:-2px}
.gg-done .gg-prog{animation:gg-donepulse 1.3s ease-in-out infinite}
@keyframes gg-donepulse{0%,100%{filter:drop-shadow(0 0 6px rgba(var(--oi-glow,255,216,107),.8))}50%{filter:drop-shadow(0 0 16px rgba(var(--oi-glow,255,216,107),1))}}
.gg-done .gg-cur,.gg-done .gg-sep,.gg-done .gg-tgt{animation:gg-beat 1.1s ease-in-out infinite}
@keyframes gg-beat{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
.gg-badge{position:absolute;top:-6px;left:50%;transform:translate(-50%,-50%) scale(0);
  padding:4px 14px;border-radius:999px;font-size:13px;font-weight:900;letter-spacing:1px;color:#2a1a05;white-space:nowrap;
  background:linear-gradient(180deg,var(--oi-c1,#fff7da),var(--oi-c2,#ffd86b));box-shadow:0 6px 20px rgba(var(--oi-glow,255,216,107),.6);
  opacity:0;transition:transform .5s cubic-bezier(.2,1.6,.4,1),opacity .4s}
.gg-done .gg-badge{transform:translate(-50%,-50%) scale(1);opacity:1}
.gg-empty .gg-gift{opacity:.4;filter:grayscale(.5) drop-shadow(0 4px 10px rgba(0,0,0,.4))}
.gg-empty .gg-cur,.gg-empty .gg-tgt,.gg-empty .gg-sep,.gg-empty .gg-gname{opacity:.5}
@media (prefers-reduced-motion:reduce){
  .gg-card::before,.gg-label,.gg-shine,.gg-gift,.gg-prog{animation:none!important;transition:none!important}
}
`,document.head.appendChild(p);var m=document.getElementById(`hl-root`);m.innerHTML=`
  <canvas id="hl-fx"></canvas>
  <div class="gg-card gg-empty" id="gg-card">
    <div class="gg-badge" id="gg-badge">¡COMPLETADO!</div>
    <div class="gg-label" id="gg-label">META DE REGALO</div>
    <div class="gg-dial">
      <svg class="gg-svg" viewBox="0 0 160 160">
        <defs><linearGradient id="gg-grad" x1="0" y1="0" x2="1" y2="1">
          <stop offset="0" stop-color="var(--oi-c1,#fff7da)"/><stop offset=".5" stop-color="var(--oi-c2,#ffd86b)"/><stop offset="1" stop-color="var(--oi-c3,#d4881f)"/>
        </linearGradient></defs>
        <circle class="gg-track" cx="80" cy="80" r="${d}"/>
        <circle class="gg-prog" id="gg-prog" cx="80" cy="80" r="${d}"/>
      </svg>
      <div class="gg-shine"></div>
      <div class="gg-gift" id="gg-gift"></div>
    </div>
    <div class="gg-gname" id="gg-gname">Regalo</div>
    <div class="gg-count"><span class="gg-cur" id="gg-cur">0</span><span class="gg-sep">/</span><span class="gg-tgt" id="gg-tgt">100</span></div>
  </div>
`;var h=document.getElementById(`gg-card`),g=document.getElementById(`gg-label`),_=document.getElementById(`gg-gift`),v=document.getElementById(`gg-gname`),y=document.getElementById(`gg-prog`),b=document.getElementById(`gg-cur`),x=document.getElementById(`gg-tgt`),S=new c(document.getElementById(`hl-fx`),m),C=0,w=!1,T=null;function E(e){let t=Math.max(0,Math.min(1,e));y.style.strokeDashoffset=String(f*(1-t))}function D(e,t,n,r,i){let a=t>0&&!!(n||r||e>0);h.classList.toggle(`gg-empty`,!a),x.textContent=String(t>0?t:100),v.textContent=n||`Sin meta configurada`,l(_,r||null,m);let c=t>0?t:100,u=e>=c&&a;E(e/c),T?.(),T=o(b,i?C:e,e,i?800:0,e=>{b.textContent=String(Math.round(e))});let d=e>C;if(C=e,h.classList.toggle(`gg-done`,u),i&&d&&s(h.querySelector(`.gg-dial`),1.08),i&&u&&!w){let e=h.querySelector(`.gg-dial`);S.burst(e,1.4),setTimeout(()=>S.burst(e,1.1),260)}w=u}function O(e){let t=typeof e.preset==`string`?e.preset:void 0,n=e.vars&&typeof e.vars==`object`?e.vars:void 0;(t||n)&&i(m,t,n),typeof e.title==`string`&&e.title.trim()&&(g.textContent=e.title)}function k(e){D(e[u.scope].goalCount,e.goal.target,e.goal.giftName,e.goal.giftImage,!0)}if(i(m,u.isDemo?u.presetParam??`gold`:e,u.isDemo?u.varsParam:void 0),u.title&&(g.textContent=u.title),u.isDemo){let e=new URLSearchParams(location.search),t=n(`cheap`),r=e.get(`img`)||t.image,i=e.get(`gname`)||t.name,a=Math.max(1,parseInt(e.get(`target`)||`100`,10)||100),o=0,s=()=>{o=o>=a?0:Math.min(a,o+Math.ceil(a/5*Math.random())),C=o===0?0:C,D(o,a,i,r,!0)};D(0,a,i,r,!1),setTimeout(s,700),setInterval(s,2200)}else r(u,{settingsKey:`giftGoal`,onSettings:O,onState:k,onTest:e=>{e.platform&&e.platform!==u.platform||e.kind&&e.kind!==`giftGoal`||(C=0,w=!1,D(Number(e.goalCount??0)||0,Number(e.target??100)||100,String(e.giftName??`Regalo`),String(e.giftImage??``),!0))}});