import{m as h,k as o,U as z,o as g,t as $,X as b,i as u,a as d,p as v,H as P,b as y,dp as q,n as x,J as A}from"./index-6Jqoo2rk.js";const w=$("<div>"),C=a=>{const e=h({size:100},a);let t;const n=(()=>{const i=w();return i.$$click=()=>{e.restartOnClick&&t?.then(s=>{s.playOrRestart()})},o(s=>{const k={[e.class]:!!e.class},_=e.size+"px";return s._v$=z(i,k,s._v$),_!==s._v$2&&((s._v$2=_)!=null?i.style.setProperty("--size",_):i.style.removeProperty("--size")),s},{_v$:void 0,_v$2:void 0}),i})();let c=!1;function r(){if(e.needRaf&&!n.isConnected&&!c){requestAnimationFrame(r);return}t=e.lottieLoader.loadAnimationAsAsset({container:n,loop:!1,autoplay:!0,width:e.size,height:e.size,group:"none",...e.rlottieOptions},e.name),e.onPromise?.(t)}return o(r),g(()=>{c=!0,t?.then(i=>{i.remove()})}),n};b(["click"]);const H="_title_1vq66_1",L="_subtitle_1vq66_8",M="_secondary_1vq66_13",R="_sticker_1vq66_19",S="_lottie_1vq66_30",l={title:H,subtitle:L,secondary:M,sticker:R,lottie:S},m=$("<div>");function f(a){return(()=>{const e=m();return u(e,()=>a.children),o(()=>d(e,v(l.container,a.class))),e})()}f.Sticker=function(e){const t=()=>e.size||130;return e.element&&e.onReady?.(),(()=>{const n=m(),c=e.ref;return typeof c=="function"?P(c,n):e.ref=n,u(n,y(A,{get when(){return e.name},get fallback(){return x(()=>typeof e.element=="function")()?e.element():e.element},get children(){return y(C,{get class(){return l.lottie},get size(){return t()},lottieLoader:q,restartOnClick:!0,get name(){return e.name},onPromise:r=>{r.then(e.onReady)}})}})),o(r=>{const i=v(l.sticker,e.class),s=t()+"px";return i!==r._v$&&d(n,r._v$=i),s!==r._v$2&&((r._v$2=s)!=null?n.style.setProperty("--sticker-size",s):n.style.removeProperty("--sticker-size")),r},{_v$:void 0,_v$2:void 0}),n})()};f.Title=function(e){return(()=>{const t=m();return u(t,()=>e.children),o(()=>d(t,v(l.title,"text-center text-overflow-wrap",e.class))),t})()};f.Subtitle=function(e){return(()=>{const t=m();return u(t,()=>e.children),o(()=>d(t,v(l.subtitle,e.secondary&&l.secondary,"text-center",e.class))),t})()};export{C as L,f as M};
//# sourceMappingURL=mediaHeader-B5k-4_FU.js.map
