Build 545032stable
Module 407781
938 characters · in f08fed5b39d8e5b5.jsDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>u});var l=n(627968),i=n(64700),s=n(735438),r=n(104142),a=n(194486),o=n(628202);let c=async e=>{let{animationType:t,animationId:n,url:l,shouldResize:i}=e,o=r.Bf[t]??r.Bf[a.B.BASIC],c=JSON.parse(JSON.stringify(null!=n&&n<o.length?o[n]:(0,s.sample)(o)));return c.assets[0].p=i?await (0,r.tm)(l):l,c};function u(e){let{containerDimensions:t,effect:s,onComplete:r}=e,u=i.useRef(null);return i.useEffect(()=>{let e;return!async function(){if(null!=u.current){let t=await c(s),{default:l}=await n.e("96382").then(n.t.bind(n,883885,23));null!=u.current&&(e=l.loadAnimation({container:u.current,renderer:"svg",loop:!1,autoplay:!0,animationData:t,rendererSettings:{preserveAspectRatio:"xMidYMax slice"}}),s.animationType===a.B.PREMIUM&&e.setSpeed(.8),e.addEventListener("complete",()=>r?.(s.id)))}}(),()=>{e?.destroy()}},[r,s]),(0,l.jsx)("div",{className:o.Q,style:{height:t.height,width:t.width},ref:u})}}