PageSourceSearch

https://volumo.com/_next/static/chunks/1463-14545fe1480c9765.js

js volumo.com collected 2026-09-25 18:42:45 UTC 65,956 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1463],{7570:(t,e,i)=>{"use strict";i.d(e,{CH:()=>a,DX:()=>n,SJ:()=>r,UR:()=>s,Yv:()=>h,cZ:()=>l,wi:()=>g,xF:()=>o});let l="popup",a="playlist_id",r="my_contributor_id",o="show_wizard",h="download",n="scene",s="ratio",g="template"},9826:(t,e,i)=>{"use strict";i.d(e,{kC:()=>w,fJ:()=>m,Tn:()=>v,Ee:()=>k,cH:()=>A,Gm:()=>T,x:()=>I});var l=i(70719),a=i(6750),r=i(18456),o=i(76923),h=i(43138),n=i(30454),s=i(96417),g=i(73133);let u={height:680,width:680},d={height:680,width:680},c={height:800,width:800},f={height:120,width:120},w={height:32,width:138.6},m=w,v={height:440,width:440},p=a.kg/10;a._L;let y=[{time:0,value:0},{time:p,value:360*Math.PI/180}],b=t=>{let{fullDuration:e,showOutro:i,tick:l}=t;return i?(0,r.Xz)([{time:e-4100,value:0},{time:e-4e3,value:1}],l):0},x=4*a._L,C=[{time:0,value:.9},{time:x/2,value:1,easing:"cubic-in-out"},{time:x,value:.9,easing:"cubic-in-out"}],k={animationType:"circle",aspectRatio:"9:16",showTitle:!0,bgColor:"#222429",fgColor:"#f5f7fa"},T=t=>{let{animationType:e,aspectRatio:i,size:l}=t;return"square"===e?u:"9:16"===(null!=i?i:l?(0,s.CY)(l):"9:16")?c:d},A=t=>{var e;let{animationType:i,ctx:l,size:a,tick:h,artistText:n,artwork:g,bgColor:u,duration:d,fgColor:c,logo:f,plate:A,qrCode:I,showOutro:S=!0,titleText:M}=t;null==(e=l.reset)||e.call(l),(t=>{let{bgColor:e,ctx:i,size:l}=t;i.fillStyle=null!=e?e:"#000000",i.fillRect(0,0,l.width,l.height)})({bgColor:u,ctx:l,size:a}),(t=>{let{animationType:e,artwork:i,ctx:l,fullDuration:a,showOutro:h,size:n,tick:g}=t;if(i){l.save();try{let t=1-b({fullDuration:a,showOutro:h,tick:g}),u=T({animationType:e,size:n});if(t){if("circle"===e){let t=(0,o.Ie)((0,r.Xz)(y,g%p),4);(0,s.NW)(l,n.width/2,n.height/2,t,1),l.beginPath(),l.arc(0,0,u.height/2,0,2*Math.PI,!0),l.clip()}else if("square"===e){let t=(0,r.Xz)(C,g%x);(0,s.NW)(l,n.width/2,n.height/2,0,t)}l.globalAlpha=t,(0,s.TO)({coords:{x:-u.width/2,y:-u.height/2},ctx:l,image:i,size:u}),l.globalAlpha=1}}finally{l.restore()}}})({animationType:i,artwork:g,ctx:l,fullDuration:d,showOutro:S,size:a,tick:h}),(t=>{let{ctx:e,fullDuration:i,qrCode:l,showOutro:a,size:r,tick:o}=t;if(l){let t=b({fullDuration:i,showOutro:a,tick:o});t&&(e.globalAlpha=t,e.drawImage(l,(r.width-v.width)/2,(r.height-v.height)/2,v.width,v.height),e.globalAlpha=1)}})({ctx:l,fullDuration:d,qrCode:I,showOutro:S,size:a,tick:h}),(t=>{let{animationType:e,ctx:i,fgColor:l,size:a,artistText:r}=t;if(r){let t=T({animationType:e,size:a});i.font='600 64px "Inter Semibold"',i.fillStyle=null!=l?l:k.fgColor,i.textAlign="center",i.textBaseline="top",(0,s.HT)({ctx:i,text:r,coords:{x:a.width/2,y:(a.height-t.height)/4+8},maxWidth:a.width-48,lineHeight:64,ellipsis:2,vCenter:!0})}})({animationType:i,artistText:n,ctx:l,fgColor:c,size:a}),(t=>{let{animationType:e,ctx:i,fgColor:l,size:a,titleText:r}=t;if(r){let t=T({animationType:e,size:a});i.font='600 32px "Inter Semibold"',i.fillStyle=null!=l?l:k.fgColor,i.textAlign="center",i.textBaseline="top",(0,s.HT)({ctx:i,text:r,coords:{x:a.width/2,y:(a.height+t.height)/2+(a.height-t.height)/4-32},maxWidth:a.width-48,lineHeight:32,ellipsis:2,vCenter:!0})}})({animationType:i,ctx:l,fgColor:c,size:a,titleText:M}),(t=>{let{ctx:e,fullDuration:i,logo:l,position:a,showOutro:r,size:o,tick:h}=t;if(l){let t=b({fullDuration:i,showOutro:r,tick:h}),n=1-t,s=o.height-w.height-24-24*t;n&&(e.globalAlpha=n,e.drawImage(l,"left"===a?o.width/2-w.width-2:(o.width-w.width)/2,s,w.width,w.height),e.globalAlpha=1)}})({ctx:l,fullDuration:d,logo:f,position:A?"left":"center",showOutro:S,size:a,tick:h}),(t=>{let{ctx:e,fullDuration:i,plate:l,position:a,showOutro:r,size:o,tick:h}=t;if(l){let t=b({fullDuration:i,showOutro:r,tick:h}),n=1-t,s=o.height-m.height-24-24*t;n&&(e.globalAlpha=n,e.drawImage(l,"right"===a?o.width/2+2:(o.width-m.width)/2,s,m.width,m.height),e.globalAlpha=1)}})({ctx:l,fullDuration:d,plate:A,position:"right",showOutro:S,size:a,tick:h}),(t=>{let{ctx:e,fgColor:i,fullDuration:l,showOutro:a,size:r,tick:o}=t,h=b({fullDuration:l,showOutro:a,tick:o}),n=r.height-w.height-28*h;h&&(e.globalAlpha=h,e.font='900 38px "Roboto Black"',e.fillStyle=null!=i?i:k.fgColor,e.textAlign="center",e.textBaseline="top",(0,s.HT)({ctx:e,text:"DOWNLOAD ON VOLUMO.COM",coords:{x:r.width/2,y:n},maxWidth:r.width,lineHeight:76}),e.globalAlpha=1)})({ctx:l,fgColor:c,fullDuration:d,showOutro:S,size:a,tick:h})},I=async t=>{let{cache:e=new n.d,accountId:i,animationType:a,aspectRatio:r,fgColor:o,bgColor:u,roundedQr:c,shareUrlBase:v,albumId:p,trackId:y,imageApi:b,storeApi:x,sysApi:C}=t,A=T({aspectRatio:r,animationType:a}),{bgColor:I,fgColor:S}=(0,s.lt)({bgColor:u,fgColor:o}),M=e.getParent(p);if(M||(M=await x.getAlbumById(p),e.setParent(p,M),M.tracks.forEach(t=>e.setTrack(t.id,t))),void 0!==y&&!e.getShare(y)){let t=e.getTrack(y);if(t){let a=v+(0,l.$O)(t);e.setShare(y,await (0,g.H)({accountId:i,baseUrl:a,source:"promo-video-preview",storeApi:x,sysApi:C}))}}return await Promise.all([(async()=>
1{if(o){let t=e.getLogo(o);return t||(t=await (0,s.Ms)({currentColor:null!=o?o:k.fgColor,url:v+"/static/svg/logo.svg",size:w}),e.setLogo(o,t)),t}})(),(async()=>{if(o&&u){let t=e.getCompactLogo(o,u);return t||(t=await (0,s.Ms)({currentColor:null!=S?S:k.fgColor,url:v+"/static/svg/logo-icon-adaptive.svg",size:f}),e.setCompactLogo(o,u,t)),t}})(),(async()=>{if(o&&y){let t=e.getPlate(y,o);if(!t&&e.getTrack(y)){let i=(0,g.a)(M);i&&(t=await (0,s.Ms)({currentColor:null!=o?o:k.fgColor,url:v+`/static/svg/plates/${i}.svg`,size:m}),e.setPlate(y,o,t))}return t}})(),(async()=>{if(y){let t=e.getArtwork(y,A.width);if(!t){let i=e.getTrack(y);if(i){let l=b.getImageUrl(i.album.artwork_uuid,{...d,format:"jpg"});l&&(t=await (0,s.TZ)(l),e.setArtwork(y,A.width,t))}}return t}})()]),await Promise.all([(async()=>{if(y&&o&&u){let t=e.getQrCode(y,o,u,!!c);if(!t){let i=e.getTrack(y),a=e.getShare(y),r=e.getCompactLogo(o,u);if(i&&a&&r){let n=v+(0,l.$O)(i);t=await (0,s.qm)({bgColor:I,fgColor:S,logo:r,rounded:c,value:(0,h.Y9)(n,"si",a.id)}),e.setQrCode(y,o,u,!!c,t)}}return t}})()]),e}},15407:(t,e,i)=>{"use strict";i.d(e,{Tn:()=>c,V1:()=>w,Xl:()=>s,aC:()=>v,fJ:()=>d,kC:()=>g,wN:()=>m});var l=i(34210),a=i(70719),r=i(43138),o=i(30454),h=i(96417),n=i(73133);let s={height:680,width:680},g={height:32,width:138.6},u={height:120,width:120},d=g,c={height:120,width:120},f={width:s.width+48,height:s.height+48+150},w=async t=>{let{cache:e=new o.d,accountId:i,bgColor:c,fgColor:f,playlistId:w,shareUrlBase:v,imageApi:p,storeApi:y,sysApi:b}=t,{bgColor:x,fgColor:C}=(0,h.lt)({bgColor:c,fgColor:f}),k=e.getParent(w);if(!k){let[t,i]=await Promise.all([y.getPlaylist(w),y.getPlaylistTracks(w,{limit:l.Rf})]);k={...t,tracks:i.items},e.setParent(w,k)}if(!e.getShare(w)){let t=v+(0,a.C$)(k);e.setShare(w,await (0,n.H)({accountId:i,baseUrl:t,source:"promo-image-preview",storeApi:y,sysApi:b}))}return await Promise.all([(async()=>{c&&!e.getLogo(c)&&e.setLogo(c,await (0,h.Ms)({currentColor:null!=c?c:m.bgColor,url:v+"/static/svg/logo.svg",size:g}))})(),(async()=>{f&&c&&!e.getCompactLogo(f,c)&&e.setCompactLogo(f,c,await (0,h.Ms)({currentColor:null!=C?C:m.fgColor,url:v+"/static/svg/logo-icon-adaptive.svg",size:u}))})(),(async()=>{if(w&&c&&!e.getPlate(w,c)){let t=(0,n.a)(k);t&&e.setPlate(w,c,await (0,h.Ms)({currentColor:null!=c?c:m.bgColor,url:v+`/static/svg/plates/${t}.svg`,size:d}))}})(),(async()=>{if(!e.getArtwork(w,s.width)){let t=p.getImageUrl(k.artwork_uuid,{...s,format:"jpg"});t&&e.setArtwork(w,s.width,await (0,h.TZ)(t))}})()]),await Promise.all([(async()=>{if(f&&c){let t=e.getShare(w),i=e.getCompactLogo(f,c);if(t&&i&&!e.getQrCode(w,f,c,!1)){let l=v+(0,a.C$)(k);e.setQrCode(w,f,c,!1,await (0,h.qm)({bgColor:x,fgColor:C,logo:i,value:(0,r.Y9)(l,"si",t.id)}))}}})()]),e},m={aspectRatio:"1:1",bgColor:"#222429",fgColor:"#f5f7fa"},v=t=>{let{artwork:e,bgColor:i,ctx:l,fgColor:a,logo:r,plate:o,qrCode:n,size:u,subtext:w,text:v}=t;(t=>{let{artwork:e,bgColor:i,ctx:l,size:a}=t;if(e){l.save();try{let t=Math.max(a.width,a.height)+160,r={width:t,height:t};l.fillStyle=null!=i?i:m.bgColor,l.fillRect(0,0,a.width,a.height),l.filter="blur(40px)",(0,h.TO)({coords:{x:(a.width-r.width)/2,y:(a.height-r.height)/2},ctx:l,image:e,size:r}),l.filter=""}finally{l.restore()}}})({artwork:e,bgColor:i,ctx:l,size:u}),(t=>{let{bgColor:e,ctx:i,size:l}=t;i.fillStyle=null!=e?e:m.bgColor,i.fillRect((l.width-f.width)/2,(l.height-f.height)/2,f.width,f.height)})({bgColor:i,ctx:l,size:u}),(t=>{let{artwork:e,ctx:i,size:l}=t;e&&(0,h.TO)({image:e,coords:{x:(l.width-f.width)/2+24,y:(l.height-f.height)/2+24},ctx:i,size:s})})({artwork:e,ctx:l,size:u}),(t=>{let{ctx:e,fgColor:i,size:l,text:a}=t;a&&(e.font='600 40px "Inter Semibold"',e.fillStyle=null!=i?i:m.fgColor,e.textAlign="start",e.textBaseline="top",(0,h.HT)({ctx:e,text:a,coords:{x:(l.width-f.width)/2+24,y:(l.height+f.height)/2-c.height-24},maxWidth:f.width-c.width-72,lineHeight:44,ellipsis:2}))})({ctx:l,fgColor:a,size:u,text:v}),(t=>{let{ctx:e,fgColor:i,size:l,subtext:a}=t;a&&(e.font='600 20px "Inter Semibold"',e.fillStyle=null!=i?i:m.fgColor,e.textAlign="start",e.textBaseline="top",(0,h.co)(e,a,{x:(l.width-f.width)/2+24,y:(l.height+f.height)/2-24-20},f.width-c.width-24-48))})({ctx:l,fgColor:a,size:u,subtext:w}),(t=>{let{ctx:e,qrCode:i,size:l}=t;i&&e.drawImage(i,(l.width+f.width)/2-c.width-24,(l.height+f.height)/2-c.height-24,c.width,c.height)})({ctx:l,qrCode:n,size:u}),(t=>{let{ctx:e,logo:i,position:l,size:a}=t;i&&e.drawImage(i,"left"===l?a.width/2-g.width-2:(a.width-g.width)/2,a.height-(a.height-f.height)/4-g.height/2,g.width,g.height)})({ctx:l,logo:r,position:o?"left":"center",size:u}),(t=>{let{ctx:e,plate:i,position:l,size:a}=t;i&&e.drawImage(i,"right"===l?a.width/2+2:(a.width-d.width)/2,a.height-(a.height-f.height)/4-d.height/2,d.width,d.height)})({ctx:l,plate:o,position:"right",size:u})}},15443:(t,e,i)=>{"use strict";i.d(e,{M:()=>m});var l=i(80263),a=i(90244),r=i(96417),o=i(23107),h=i(10330),n=i(43481),s=i(3638),g=i(53239),u=i(93340),d=i(22894),c=i(75922),f=i(79697),w=i.n(f);let m=t=>{let{mediaCache:e,settings:i,className:f,style:m}=t,v=(0,c._B)(),p=(0,g.useRef)(null),y=(0,g.useMemo)(()=>(0,r.QA)(i?.aspectRatio??"1:1"),[i?.aspectRatio]),b=(0,g.useRef)(),[x,C]=(0,g.useState)(),k=(0,g.useMemo)(()=>i.fragments?.reduce((t,e)=>t+(e.duration??0),0),[i.fragments]);(0,d.n)();let T=(0,g.useCallback)(async()=>{b.current&&b.current.abort(),b.current=n.g6.newWithSignal(async(t,l,r)=>{try{let n;if(i.playlistId&&i.fgColor&&i.bgColor){let t=e.getParent(i.playlistId),l=(await Promise.all(i.fragments.map(async t=>{if(t.trackId){let i=e.getTrack(t.trackId),l=e.getArtwork(t.trackId,o.Xl.width);if(l)return{artwork:await (0,u.uu)(l,o.Xl),duration:t.duration??0,text1:(0,a.j0)(i),text2:(0,a.vl)(i),artists:(0,a.j0)(i),label:i?.recordlabel?.name??void 0}}}))).filter(h.TL),r="focus"===i.template?o.Ly:"onRotation"===i.template?o.Zj:void 0,s="focus"===i.template?o.qN:o.GH,[g,d,c,f,w,m,v,p,b]=await Promise.all([e.getArtwork(i.playlistId,o.CI.width),e.getLogo(i.fgColor),e.getLogo(i.bgColor),e.getPlate(i.playlistId,i.fgColor),e.getPlate(i.playlistId,i.bgColor),e.getQrCode(i.playlistId,i.fgColor,
1i.bgColor,!1),e.getFigure("left",i.fgColor),e.getFigure("right",i.fgColor),r?e.getFigure(r,i.fgColor):void 0]);n={size:y,fragments:l,template:i.template,bgColor:i.bgColor,fgColor:i.fgColor,playlistArtwork:g?await (0,u.uu)(g,o.CI):void 0,logo:d?await (0,u.uu)(d,o.kC):void 0,logoInverted:c?await (0,u.uu)(c,o.kC):void 0,plate:f?await (0,u.uu)(f,o.fJ):void 0,plateInverted:w?await (0,u.uu)(w,o.fJ):void 0,qrCode:m?await (0,u.uu)(m,o.Tn):void 0,figureLeft:v?await (0,u.uu)(v,o.fn):void 0,figureRight:p?await (0,u.uu)(p,o.sF):void 0,icons:b?await (0,u.uu)(b,s):void 0,genreName:e.getGenre(i.playlistId)?.name,duration:k??0,subtext:t?.name,text:t?.owner?.name??"Unknown",outroText1:`Find top
2tracks of the month at Volumo ${t?.type==="playlist"?"playlists":"charts"}`.toLocaleUpperCase(),outroText2:`volumo.com/${t?.type==="playlist"?"playlists":"charts"}`,chartLabel:o.du(t),chartPeriod:o.O4(t)}}r.aborted?l("Aborted"):t(n??{duration:0,fragments:[],size:y})}catch(t){l(t)}});try{let t=await b.current;C(t)}catch(t){if(!(t instanceof n.lc))throw t}},[e,i,y,k]);return(0,g.useEffect)(()=>(e.subscribe(T),()=>{e.unsubscribe(T)}),[e,T]),(0,g.useEffect)(()=>{let t,e=p.current?.getContext("2d");if(!e)return;let i=()=>{l=requestAnimationFrame(i);let a=v.getTime();x&&a!==t&&(o.cH({...x,ctx:e,tick:a}),t=a)},l=requestAnimationFrame(i);return()=>{cancelAnimationFrame(l)}},[x]),(0,l.jsx)("canvas",{className:(0,s.A)(w().canvas,f),height:y.height,ref:p,style:m,width:y.width})}},22894:(t,e,i)=>{"use strict";i.d(e,{n:()=>r});var l=i(53239);let a=[{family:"Roboto Black",url:"/static/fonts/Roboto/Roboto-Black.ttf"},{family:"Inter Semibold",url:"/static/fonts/Inter/Inter-SemiBold.ttf"}],r=()=>{(0,l.useEffect)(()=>{for(let{family:t,url:e}of a){if([...document.fonts].some(e=>e.family===t))continue;let i=new FontFace(t,`url(${e})`);i.load().then(()=>document.fonts.add(i))}},[])}},23107:(t,e,i)=>{"use strict";i.d(e,{Xl:()=>U,BK:()=>F,fn:()=>q,sF:()=>V,Ly:()=>Y,qN:()=>j,b$:()=>G,kC:()=>E,b:()=>J,Zj:()=>Z,GH:()=>Q,fJ:()=>N,CI:()=>X,Tn:()=>$,Ee:()=>D,G5:()=>td,wn:()=>tl,BH:()=>tu,cH:()=>tf,rX:()=>ta,gE:()=>tr,G9:()=>te,E:()=>ti,du:()=>K,O4:()=>tt,x:()=>tc});var l=i(34210),a=i(70719),r=i(18456),o=i(37247),h=i(10330),n=i(43138),s=i(30454),g=i(96417),u=i(73133);let d=t=>{let{ctx:e,size:i,fragmentPrev:l,fragment:a,fragmentNext:o,time:h}=t;if(a.artwork){e.save();try{let t,n,s,g=(0,r.Xz)((t=l.duration,n=a.duration,s=o.duration,(0,r.qA)([{time:0,value:1.5},{time:250,value:1.15,easing:"cubic-in-out"},{time:t-250,value:1.15},{time:t+250,value:.5,easing:"cubic-in-out"},{time:t+n-250,value:.5},{time:t+n+250,value:-.15,easing:"cubic-in-out"},{time:t+n+s-250,value:-.15},{time:t+n+s,value:-.5,easing:"cubic-in-out"}],-t)),h),u=g*i.width,d=i.height/2,c=U.width*J,f=U.height,w=Math.min(Math.abs(g-.5)/.15,1),m=g<.5;for(let t=0;t<32;t++){let i=(t+.5)/32,l=m?1-i:i,r=J+(1-J)*l*w,o=t/32*U.width,h=U.width/32,n=u-c/2+t/32*c,s=c/32,g=f*r;e.drawImage(a.artwork,o,0,h,U.height,n,d-g/2,s,g)}}finally{e.restore()}}},c=function(t,e,i,l){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(!(l<=0)){t.save();try{t.filter="blur(80px)",t.globalAlpha=l;let o=1.5*Math.max(e.width/i.width,e.height/i.height),h=i.width*o,n=i.height*o,s=(h-e.width)/2,g=(n-e.height)/2,u=Math.sin(a/(15e3+1100*r)*Math.PI*2+1.7*r)*s,d=Math.cos(a/(10500+700*r)*Math.PI*2+(2.3*r+1))*g;t.drawImage(i,(e.width-h)/2+u,(e.height-n)/2+d,h,n)}finally{t.filter="none",t.restore()}}},f=new WeakMap,w=(t,e,i,l)=>{(0,g.HT)({ctx:t,text:`${e.top.toLocaleUpperCase()}
3${e.bottom.toLocaleUpperCase()}`,coords:i,maxWidth:l,lineHeight:32})},m="#ffffff",v="#000000",p=(t,e,i)=>t+(e-t)*i,y=(t,e,i)=>(0,r.Xz)([{time:t,value:0},{time:e,value:1,easing:"cubic-in-out"}],i),b=(t,e,i,l,a)=>{t.font=i(l);let r=t.measureText(e).width;return r<=a||r<=0?l:Math.max(8,Math.floor(l*a/r))},x=t=>{let{ctx:e,size:i,fgColor:l,qrCode:a,fadeAlpha:r,progressB:o,urlSize:h,urlY:n,margin:s,centerWord:g,headlineMid:u}=t;if(r<=0&&o<=0)return;let d=h*(1-o);e.save();try{e.fillStyle=l,e.textBaseline="top",e.save(),e.globalAlpha=r,e.font='600 28px "Inter Semibold"';let t=.11*i.height;e.textAlign="left",e.fillText("CHARTS",s,t),e.textAlign="center",e.fillText(g,i.width/2,t),e.textAlign="right",e.fillText("CHARTS",i.width-s,t),e.restore(
3),e.textAlign="center",e.save(),e.globalAlpha=r;let c=i.width-2*s,f=["FIND MUST-LISTEN",u,"CHARTS"],w=b(e,u,t=>`600 ${t}px "Inter Semibold"`,80,c);e.font=`600 ${w}px "Inter Semibold"`;let m=Math.round(1.05*w),v=.2*i.height+d;if(f.forEach((t,l)=>{e.fillText(t,i.width/2,v+l*m)}),e.restore(),a&&(e.save(),e.globalAlpha=r,e.drawImage(a,(i.width-$.width)/2,.42*i.height+d,$.width,$.height),e.restore()),o>0){e.save(),e.globalAlpha=o,e.font=`900 ${h}px "Roboto Black"`;let t=h*o;e.beginPath(),e.rect(0,n+h-t,i.width,t),e.clip(),e.fillText("VOLUMO.COM/CHARTS",i.width/2,n),e.restore()}}finally{e.restore()}},C=(t,e,i,l)=>{let{topY:a,midY:r,botY:o,enterY:h,exitY:n}=l;return[{time:-t-350,value:h},{time:-t+350,value:o,easing:"expo-out"},{time:-350,value:o},{time:350,value:r,easing:"expo-out"},{time:e-350,value:r},{time:e+350,value:a,easing:"expo-out"},{time:e+i-350,value:a},{time:e+i+350,value:n,easing:"cubic-in-out"}]},k=(t,e,i,l)=>{var a,r,o;let{textX:h,textWidth:n,midY:s,coverSize:u}=e;t.textAlign="left",t.textBaseline="top";let d=null!=(r=null!=(a=i.artists)?a:i.text1)?r:"",c=Math.round(49.68000000000001);t.font='600 46px "Inter Semibold"';let f=(0,g.h_)({ctx:t,text:d,maxWidth:n,lineHeight:c,ellipsis:2}).height;(0,g.HT)({ctx:t,text:d,coords:{x:h,y:s+l},maxWidth:n,lineHeight:c,ellipsis:2}),t.font='600 30px "Inter Semibold"',(0,g.HT)({ctx:t,text:null!=(o=i.text2)?o:"",coords:{x:h,y:s+l+f+14},maxWidth:n,lineHeight:Math.round(33),ellipsis:2}),i.label&&(t.font='600 26px "Inter Semibold"',(0,g.co)(t,`[ ${i.label} ]`,{x:h,y:s+u-26+l},n))},T=[{time:0,value:0},{time:1,value:1,easing:"cubic-in-out"}],A=Math.PI,I=(t,e,i,l)=>{let a=l*A,r=e.width/2,o=e.height/2,h=U.width,n=U.height,s=1.12*U.width,g=1.12*U.height,u=s/.5118587773447351,d=Math.min(Math.abs(l)/.28,1);t.save();try{for(let e=0;e<56;e+=1){let l=e/56,c=(e+1)/56,f=a+(l-.5)*.9,w=a+(c-.5)*.9,m=(f+w)/2;if(.02>=Math.cos(m))continue;let v=r+Math.sin(f)/(2.6-Math.cos(f))*u,p=r+Math.sin(w)/(2.6-Math.cos(w))*u,y=r+(l-.5)*s,b=r+(c-.5)*s,x=y+(v-y)*d,C=b+(p-b)*d,k=Math.min(x,C),T=Math.abs(C-x)+1,A=1/(2.6-Math.cos(m))/.625,I=g*(1+(A-1)*d);t.drawImage(i,l*h,0,h/56,n,k,o-I/2,T,I);let S=.55*Math.min(Math.max(1-Math.cos(m),0),1)*d;S>.01&&(t.save(),t.globalAlpha=S,t.fillStyle="#000000",t.fillRect(k,o-I/2,T,I),t.restore())}}finally{t.restore()}},S=t=>{let e,i,l,{ctx:a,size:o,fragmentPrev:h,fragment:n,fragmentNext:s,time:g}=t;if(!n.artwork)return;let u=(0,r.Xz)((e=h.duration,i=n.duration,l=s.duration,(0,r.qA)([{time:0,value:1},{time:500,value:1,easing:"cubic-in-out"},{time:e-500,value:1},{time:e+500,value:0,easing:"cubic-in-out"},{time:e+i-500,value:0},{time:e+i+500,value:-1,easing:"cubic-in-out"},{time:e+i+l-500,value:-1},{time:e+i+l,value:-1,easing:"cubic-in-out"}],-e)),g);I(a,o,n.artwork,u)},M=[{time:0,value:1},{time:500,value:0,easing:"cubic-in-out"}],P=[{time:0,value:0},{time:500,value:1,easing:"cubic-in-out"}],R=[{time:0,value:0},{time:500,value:-20,easing:"cubic-in-out"}],z=[{time:0,value:20},{time:500,value:0,easing:"cubic-in-out"}],H=(t,e,i,l)=>{var a,r;t.font='600 24px "Inter Semibold"',t.textAlign="center",t.textBaseline="top",(0,g.co)(t,null!=(a=i.text1)?a:"",{x:e.width/2,y:l},e.width-48),(0,g.co)(t,null!=(r=i.text2)?r:"",{x:e.width/2,y:l+24},e.width-48)},W=(t,e,i,l,a,r,o)=>{if(e&&!(o.height<=0)){t.save();try{t.beginPath(),t.rect(i,o.y,l,o.height),t.clip(),t.drawImage(e,i,r,l,a)}finally{t.restore()}}},O=t=>{let{ctx:e,size:i,fragmentPrev:l,fragment:a,fragmentNext:o,time:h}=t;if(a.artwork){e.save();try{let t,n,s,u,d,c,f=(0,r.Xz)((t=l.duration,n=a.duration,s=o.duration,(0,r.qA)([{time:0,value:J},{time:t+500,value:J},{time:t+1e3,value:1,easing:"cubic-in-out"},{time:t+n-1e3,value:1},{time:t+n-500,value:J,easing:"cubic-in-out"},{time:t+n+s,value:J}],-t)),h),w=(0,r.Xz)((u=l.duration,d=a.duration,c=o.duration,(0,r.qA)([{time:0,value:1.5},{time:500,value:1.15,easing:"cubic-in-out"},{time:u-500,value:1.15},{time:u+500,value:.5,easing:"cubic-in-out"},{time:u+d-500,value:.5},{time:u+d+500,value:-.15,easing:"cubic-in-out"},{time:u+d+c-500,value:-.15},{time:u+d+c,value:-.5,easing:"cubic-in-out"}],-u)),h);(0,g.NW)(e,w*i.width,i.height/2,0,f),(0,g.TO)({ctx:e,coords:{x:-U.width/2,y:-U.height/2},image:a.artwork,size:U})}
3finally{e.restore()}}},B=[{time:0,value:-230},{time:2e3,value:0,easing:"expo-out"},{time:4e3,value:230,easing:"expo-in"}],L=[{time:0,value:-50},{time:4500,value:50}],X={height:1080,width:1080},U={height:640,width:640},_={height:120,width:120},E={height:32,width:138.6},N=E,$={height:360,width:360},F=1100,q={height:1100,width:Math.round(531.418918918919)},V={height:1100,width:Math.round(538.8513513513514)},j={height:96,width:312},Q={height:144,width:396},Y="focusIcons",Z="onRotationIcons",J=.875,G={},D={aspectRatio:"9:16",bgColor:"#222429",fgColor:"#f5f7fa"},K=t=>{if(t)return t.volumo?{top:"Volumo",bottom:"Charts"}:t.featured?{top:"DJ Featured",bottom:"Charts"}:t.curated?{top:"DJ Curated",bottom:"Charts"}:{top:"DJ",bottom:"Charts"}},tt=t=>{if(!(null==t?void 0:t.published_at))return;let[e="",i=""]=new Date(t.published_at).toLocaleDateString("en-US",{month:"long",year:"numeric"}).split(/\s+/);return{top:e,bottom:i}},te=(t,e)=>{var i;if(t){if(e<0)return{fragment:t[0],time:0};let l=0;for(let a=0;a<t.length;a+=1){let r=t[a],o=l+(null!=(i=r.duration)?i:0);if(o>e)return{fragment:r,index:a,time:e-l};l=o}return{fragment:t[t.length-1],index:t.length-1,time:l}}},ti=(t,e)=>{var i;let l=0;if(t)for(let a=0;a<t.length;a+=1){let r=t[a];if(e===r)break;if(a===t.length-1)return 0;l+=null!=(i=r.duration)?i:0}return l},tl=t=>{let{bgColor:e,ctx:i,size:l}=t;i.fillStyle=null!=e?e:"#000000",i.fillRect(0,0,l.width,l.height)},ta=t=>{let{ctx:e,logo:i,plate:l,size:a}=t;if(i){let t=(0,g.CY)(a);e.drawImage(i,l?a.width/2-E.width-2:(a.width-E.width)/2,"9:16"===t?.85*a.height:a.height-E.height-24,E.width,E.height),l&&e.drawImage(l,a.width/2+2,"9:16"===t?.85*a.height:a.height-E.height-24,N.width,N.height)}},tr=t=>{let{ctx:e,size:i,tick:l,duration:a,bgColor:o,fgColor:h,logo:n,plate:s,qrCode:u,text1:d,text2:c}=t;if(l>=a-4500){e.save();try{let t=[{time:a-4500,value:0},{time:a-3500,value:i.height,easing:"expo-out"}],f=(0,r.Xz)(t,l);e.beginPath(),e.rect(0,0,i.width,f),e.clip();let w=[{time:a-4500,value:-(.5*i.height)},{time:a-3500,value:0,easing:"expo-out"}],m=(0,r.Xz)(w,l);(0,g.NW)(e,0,m,0,1);let v=(0,g.CY)(i);e.fillStyle=null!=h?h:D.fgColor,e.fillRect(0,0,i.width,i.height),d&&(e.font='900 64px "Roboto Black"',e.fillStyle=null!=o?o:D.bgColor,e.textAlign="center",e.textBaseline="top",(0,g.HT)({ctx:e,text:d.toLocaleUpperCase(),coords:{x:i.width/2,y:.2*i.height},maxWidth:i.width-48,lineHeight:56,vCenter:!0})),u&&e.drawImage(u,(i.width-$.width)/2,.34*i.height,$.width,$.height),c&&(e.font='900 48px "Roboto Black"',(0,g.HT)({ctx:e,text:c.toLocaleUpperCase(),coords:{x:i.width/2,y:"9:16"===v?.63*i.height:"4:5"===v||"3:4"===v?i.height-E.height-24-300:i.height-E.height-24-150},maxWidth:i.width-48,lineHeight:56,vCenter:!0})),n&&e.drawImage(n,s?i.width/2-E.width-2:(i.width-E.width)/2,"9:16"===v?.74*i.height:i.height-E.height-24,E.width,E.height),s&&e.drawImage(s,i.width/2+2,"9:16"===v?.74*i.height:i.height-E.height-24,N.width,N.height)}finally{e.restore()}}},to=(t,e,i)=>{var l,a;t.font='600 24px "Inter Semibold"',t.textBaseline="top",t.textAlign="center",(0,g.co)(t,null!=(l=i.text1)?l:"",{x:e.width/2,y:(e.height+U.height)/2+30},e.width-48),(0,g.co)(t,null!=(a=i.text2)?a:"",{x:e.width/2,y:(e.height+U.height)/2+54},e.width-48)},th=[{time:500,value:1},{time:1e3,value:0,easing:"cubic-in-out"}],tn=[{time:500,value:0},{time:1e3,value:1,easing:"cubic-in-out"}],ts=[{time:500,value:0},{time:1e3,value:-20,easing:"cubic-in-out"}],tg=[{time:500,value:20},{time:1e3,value:0,easing:"cubic-in-out"}],tu=t=>{var e;let{ctx:i,size:l,tick:a,fgColor:h,fragments:n}=t,{fragment:s,time:u}=null!=(e=te(n,a))?e:{};if(!s||void 0===u)return;i.save(),i.fillStyle=null!=h?h:D.fgColor;let d=(0,o.VW)(n,n.indexOf(s)-1);d&&(i.globalAlpha=(0,r.Xz)(th,u),(0,g.NW)(i,0,(0,r.Xz)(ts,u),0,1),to(i,l,d)),i.globalAlpha=(0,r.Xz)(tn,u),(0,g.NW)(i,0,(0,r.Xz)(tg,u),0,1),to(i,l,s),i.restore()},td=t=>{var e;let{ctx:i,fragments:l,size:a,tick:r,drawArtwork:h}=t;i.save();try{let{fragment:t,time:n}=null!=(e=te(l,r))?e:{};if(t&&void 0!==n){let e=l.indexOf(t),r=(0,o.VW)(l,e-1),s=(0,o.VW)(l,e-2),g=(0,o.VW)(l,e+1),u=(0,o.VW)(l,e+2);h({ctx:i,size:a,fragmentPrev:s,fragment:r,fragmentNext:t,time:n+r.duration}),h({ctx:i,size:a,fragmentPrev:r,fragment:t,fragmentNext:g,time:n}),h({ctx:i,size:a,fragmentPrev:t,fragment:g,fragmentNext:u,time:n-t.duration})}}
3finally{i.restore()}},tc=async t=>{let{cache:e=new s.d,accountId:i,bgColor:r,fgColor:o,fragments:d,playlistId:c,roundedQr:f,shareUrlBase:w,template:m,imageApi:v,storeApi:p,sysApi:y}=t,{bgColor:b,fgColor:x}=(0,g.lt)({bgColor:r,fgColor:o}),C=e.getParent(c);if(!C){let[t,i]=await Promise.all([p.getPlaylist(c),p.getPlaylistTracks(c,{limit:l.Rf})]);C={...t,tracks:i.items},e.setParent(c,C),C.tracks.forEach(t=>e.setTrack(t.id,t))}let k=e.getArtwork(c,X.width);if(!k){let t=v.getImageUrl(C.artwork_uuid,{...X,format:"jpg"});t&&(k=await (0,g.TZ)(t),e.setArtwork(c,X.width,k))}if(d){let t=d.map(t=>t.trackId).filter(h.vN).filter(t=>!e.getTrack(t));t.length&&(await p.getTracksByIds(t)).forEach(t=>{e.setTrack(t.id,t)})}return await Promise.all([(async()=>{let t=e.getShare(c);if(!t){let t=w+(0,a.C$)(C);e.setShare(c,await (0,u.H)({accountId:i,baseUrl:t,source:"promo-video-preview",storeApi:p,sysApi:y}))}return t})()]),await Promise.all([(async()=>{if(o){let t=e.getLogo(o);return t||(t=await (0,g.Ms)({currentColor:null!=o?o:D.fgColor,url:w+"/static/svg/logo.svg",size:E}),e.setLogo(o,t)),t}})(),(async()=>{if(r){let t=e.getLogo(r);return t||(t=await (0,g.Ms)({currentColor:null!=r?r:D.bgColor,url:w+"/static/svg/logo.svg",size:E}),e.setLogo(r,t)),t}})(),(async()=>{if(r&&o){let t=e.getCompactLogo(o,r);return t||(t=await (0,g.Ms)({currentColor:null!=x?x:D.bgColor,url:w+"/static/svg/logo-icon-adaptive.svg",size:_}),e.setCompactLogo(o,r,t)),t}})(),(async()=>{if(o){let t=e.getPlate(c,o);if(!t){let i=(0,u.a)(C);i&&(t=await (0,g.Ms)({currentColor:null!=o?o:D.fgColor,url:w+`/static/svg/plates/${i}.svg`,size:N}),e.setPlate(c,o,t))}return t}})(),(async()=>{if(r){let t=e.getPlate(c,r);if(!t){let i=(0,u.a)(C);i&&(t=await (0,g.Ms)({currentColor:null!=r?r:D.bgColor,url:w+`/static/svg/plates/${i}.svg`,size:N}),e.setPlate(c,r,t))}return t}})(),(async()=>{if("onRotation"===m||"focus"===m){if(!e.getGenre(c)){let t=(await p.getGenres()).find(t=>{var e;return null==(e=null==C?void 0:C.genres_ids)?void 0:e.includes(t.id)});e.setGenre(c,t)}if(o){let t=async(t,i,l)=>{if(!e.getFigure(t,o))try{e.setFigure(t,o,await (0,g.Ms)({currentColor:o,url:w+i,size:l}))}catch(t){console.warn(`Failed to load clip figure (${i}):`,t)}};await Promise.all([t("focus"===m?Y:Z,"focus"===m?"/static/svg/clips/focus-icons.svg":"/static/svg/clips/on-rotation-icons.svg","focus"===m?j:Q),..."onRotation"===m?[t("left","/static/svg/onrotation-banner/left.svg",q),t("right","/static/svg/onrotation-banner/right.svg",V)]:[]])}}})(),...d.map(async t=>{if(t.trackId){let i=e.getArtwork(t.trackId,U.width);if(!i){let l=e.getTrack(t.trackId);if(l){let a=v.getImageUrl(l.album.artwork_uuid,{...U,format:"jpg"});a&&(i=await (0,g.TZ)(a),e.setArtwork(t.trackId,U.width,i))}}return i}})]),await Promise.all([(async()=>{if(r&&o){let t=e.getQrCode(c,o,r,!!f);if(!t){let i=e.getShare(c),l=e.getCompactLogo(o,r);if(i&&l){let h=w+(0,a.C$)(C);t=await (0,g.qm)({bgColor:b,fgColor:x,logo:l,rounded:f,value:(0,n.Y9)(h,"si",i.id)}),e.setQrCode(c,o,r,!!f,t)}}return t}})()]),e},tf=t=>{"chartVideo"===t.template?(t=>{var e;let{ctx:i,size:l,tick:a,duration:o,bgColor:h,fgColor:n,playlistArtwork:s,logo:u,plate:m,qrCode:v,subtext:p,text:y,outroText1:b,outroText2:x,chartLabel:C,chartPeriod:k,fragments:T}=t;null==(e=i.reset)||e.call(i),(t=>{let e,{bgColor:i,ctx:l,size:a,tick:r,fragments:o}=t;l.fillStyle=null!=i?i:"#000000",l.fillRect(0,0,a.width,a.height);let h=((e=f.get(o))||(e=[...new Set(o.map(t=>t.artwork).filter(t=>!!t))],f.set(o,e)),e);if(h.length>0){let t=Math.floor(r/2e3)%h.length,e=(t+1)%h.length,i=r%2e3;if(i>=1e3){let o=(i-1e3)/1e3;c(l,a,h[t],1-o,r,t),c(l,a,h[e],o,r,e)}else c(l,a,h[t],1,r,t)}l.save();try{l.fillStyle=null!=i?i:"#000000",l.globalAlpha=.8,l.fillRect(0,0,a.width,a.height)}finally{l.restore()}})({bgColor:h,ctx:i,size:l,tick:a,fragments:T});let A=a<1e3;if(A){i.save();let t=(0,r.Xz)([{time:0,value:0},{time:1e3,value:l.height,easing:"expo-out"}],a);i.beginPath(),i.rect(0,0,l.width,t),i.clip()}(()=>{if((t=>{let{ctx:e,size:i,fgColor:l,chartLabel:a,chartPeriod:r,subtext:o,text:h}=t;e.fillStyle=null!=l?l:D.fgColor,e.textBaseline="top",e.font='600 28px "Inter Semibold"';let n=i.width/3-60;a&&(e.textAlign="left",w(e,a,{x:60,y:60},n)),e.textAlign="center",(0,g.co)(e,"CHARTS",{x:i.width/2,y:60},i.width/3),r&&(e.textAlign="right",w(e,r,{x:i.width-60,y:60},n));e.font='600 64px "Inter Semibold"';let s=(0,g.h_)({ctx:e,text:null!=o?o:"",maxWidth:i.width-48,lineHeight:74,ellipsis:2}).height,u=Math.round((124+(i.height/2-U.height/2))/2-(s+16+28)/2);e.textAlign="center",o&&(0,g.HT)({ctx:e,text:o,coords:{x:i.width/2,y:u},maxWidth:i.width-48,lineHeight:74,ellipsis:2}),h&&(e.font='600 28px "Inter Semibold"',e.textAlign="center",(0,g.co)(e,`Chart by ${h}`,{x:i.width/2,y:u+s+16},i.width-48))}
3)({ctx:i,size:l,fgColor:n,chartLabel:C,chartPeriod:k,subtext:p,text:y}),a<4e3){let t=(0,r.Xz)([{time:3500,value:1},{time:4e3,value:0,easing:"cubic-in-out"}],a);i.save(),i.globalAlpha=t,(t=>{let{ctx:e,size:i,fgColor:l}=t,a=(i.height+U.height)/2+30+48;e.fillStyle=null!=l?l:D.fgColor,e.font='600 48px "Inter Semibold"',e.textAlign="center",e.textBaseline="top",(0,g.co)(e,"CURATED GEMS ONLY",{x:i.width/2,y:a},i.width-48)})({ctx:i,size:l,fgColor:n}),i.restore()}if(a>=3500){let t=(0,r.Xz)([{time:3500,value:l.width},{time:4e3,value:0,easing:"cubic-in-out"}],a),e=(0,r.Xz)([{time:3500,value:0},{time:4e3,value:1,easing:"cubic-in-out"}],a);i.save(),i.globalAlpha=e,i.translate(t,0),td({ctx:i,fragments:T,size:l,tick:a,drawArtwork:d}),a>=4e3&&tu({ctx:i,tick:a,size:l,fgColor:n,fragments:T}),i.restore()}ta({ctx:i,logo:u,plate:m,size:l}),(t=>{let{ctx:e,size:i,tick:l,artwork:a}=t;if(a&&!(l>=4e3)){e.save();try{let t=(0,r.Xz)([{time:3500,value:0},{time:4e3,value:-i.width,easing:"cubic-in-out"}],l);e.translate(t,0),(0,g.TO)({ctx:e,coords:{x:(i.width-U.width)/2,y:i.height/2-U.height/2},image:a,size:U})}finally{e.restore()}}})({ctx:i,size:l,tick:a,artwork:s})})(),A&&i.restore(),tr({ctx:i,size:l,tick:a,duration:o,bgColor:n,fgColor:h,logo:u,plate:m,qrCode:v,text1:b,text2:x})})(t):"onRotation"===t.template?(t=>{var e,i;let{ctx:l,size:a,tick:h,duration:n,bgColor:s,fgColor:u,logo:d,plate:c,qrCode:f,genreName:w,figureLeft:C,figureRight:k,icons:T,fragments:A}=t;null==(e=l.reset)||e.call(l);let O=u||v;tl({bgColor:s||m,ctx:l,size:a});let B=n-4500,L=B+1e3,X=n>4500?(0,r.Xz)([{time:B,value:0},{time:B+1e3,value:1,easing:"cubic-in-out"}],h):0,_=n>4500?(0,r.Xz)([{time:L,value:0},{time:L+800,value:1,easing:"cubic-in-out"}],h):0,$=1-X,j=b(l,"VOLUMO.COM/CHARTS",t=>`900 ${t}px "Roboto Black"`,92,a.width-48),Q=a.height/2+1.12*U.height/2,Y=(a.height-Q-48-E.height)/3,Z=Q+Y,J=Z+48+Y;if($>0&&h>=1766.6666666666667){let t=2366.666666666667;if(h<2366.666666666667&&(null==(i=A[0])?void 0:i.artwork)){let e=(0,r.Xz)([{time:1766.6666666666667,value:1},{time:t,value:0,easing:"cubic-in-out"}],h);l.save(),l.globalAlpha=$,I(l,a,A[0].artwork,e),l.restore()}else l.save(),l.globalAlpha=$,td({ctx:l,fragments:A,size:a,tick:h,drawArtwork:S}),l.restore();(t=>{let{ctx:e,size:i,tick:l,fgColor:a,fragments:h,topY:n,alpha:s}=t;if(s<=0)return;let g=te(h,l),u=null==g?void 0:g.fragment,d=null==g?void 0:g.time;if(u&&void 0!==d){e.save();try{e.fillStyle=a;let t=(0,o.VW)(h,h.indexOf(u)-1);t&&(e.globalAlpha=s*(0,r.Xz)(M,d),H(e,i,t,n+(0,r.Xz)(R,d))),e.globalAlpha=s*(0,r.Xz)(P,d),H(e,i,u,n+(0,r.Xz)(z,d))}finally{e.restore()}}})({ctx:l,size:a,tick:h,fgColor:O,fragments:A,topY:Z,alpha:$})}(t=>{let{ctx:e,size:i,fgColor:l,genreName:a,alpha:r,dy:o}=t;if(!(r<=0)){e.save();try{e.globalAlpha=r,e.translate(0,o),e.fillStyle=l,e.textAlign="center",e.textBaseline="top";let t=.135*i.height;e.font='900 104px "Roboto Black"',(0,g.co)(e,"ON ROTATION",{x:i.width/2,y:t},i.width-120),a&&(e.font='600 44px "Inter Semibold"',(0,g.co)(e,a.toLocaleUpperCase(),{x:i.width/2,y:t+104+18},i.width-120))}finally{e.restore()}}})({ctx:l,size:a,fgColor:O,genreName:w,alpha:y(0,400,h)*(1-X),dy:-(60*X)}),(t=>{let{ctx:e,size:i,fgColor:l,logo:a,plate:r,icons:o,logoTopY:h,introAlpha:n,moveProgress:s,settleProgress:g,lift:u}=t,d=E.width+(r?8+N.width:0),c=p(60,(i.width-d)/2,s),f=h-u*g;if(a){e.save();try{e.globalAlpha=n,e.drawImage(a,c,f,E.width,E.height),r&&e.drawImage(r,c+E.width+8,f,N.width,N.height)}finally{e.restore()}}let w=n*(1-s);if(w>0){e.save();try{e.globalAlpha=w,e.translate(s*i.width,0);let t=o?36*o.width/o.height:0;o&&e.drawImage(o,i.width-60-t,h+(E.height-36)/2,t,36),e.fillStyle=l,e.font='600 30px "Inter Semibold"',e.textAlign="right",e.textBaseline="top",e.fillText("[ DJ TRACKLIST ]",i.width-60-(o?t+24:0),h+2)}finally{e.restore()}}})({ctx:l,size:a,fgColor:O,logo:d,plate:c,icons:T,logoTopY:J,introAlpha:y(0,400,h),moveProgress:X,settleProgress:_,lift:j}),(t=>{let e,i,{ctx:l,size:a,tick:r,figureLeft:o,figureRight:h}=t;if(r>=2300)return;let n=(a.width-160-20)/(q.width+V.width),s=F*n,g=q.width*n,u=V.width*n,d=(a.height-s)/2,c=a.width-80-u;if(r<900){let t=y(0,900,r);e={y:d,height:t*s},i={y:d+(1-t)*s,height:t*s}}else if(r<1500)e={y:d,height:s},i={y:d,height:s};else{let t=y(1500,2300,r);e={y:d+t*s,height:(1-t)*s},i={y:d,height:(1-t)*s}}W(l,o,80,g,s,d,e),W(l,h,c,u,s,d,i)})({ctx:l,size:a,tick:h,figureLeft:C,figureRight:k}),x({ctx:l,size:a,fgColor:O,qrCode:f,fadeAlpha:X,progressB:_,urlSize:j,urlY:J,margin:60,centerWord:"ON ROTATION",headlineMid:"TRACKS ON VOLUMO ROTATION"})})(t):"focus"===t.template?(t=>{var e;let i,l,a,h,n,s,u,d,c,f,w,A,{ctx:I,size:S,tick:M,duration:P,bgColor:R,fgColor:z,logo:H,plate:W,qrCode:O,genreName:B,icons:L,fragments:X}=t;null==(e=I.reset)||e.call(I);let U=z||v;tl({bgColor:R||m,ctx:I,size:S});let _=(i=Math.round(.11*S.height),l=S.height-Math.round(.09*S.height),a=S.width-96,n=(h=Math.floor((l-i-60)/3))+30,d=(u
3=(s=i+n)+n)+Math.round(.22*h),c=48+h+40,w=b(I,"FOCUS",t=>`900 ${t}px "Roboto Black"`,170,f=S.width-48-c),A=l-E.height,{contentTop:i,contentBottom:l,columnX:48,coverSize:h,slotGap:n,topY:i,midY:s,botY:u,enterY:d,exitY:i-n,fullRectW:a,halfRectW:h,rectH:h,textX:c,textWidth:f,focusSize:w,logoTopY:A}),$=P-4500,F=P>4500,q=F?(0,r.Xz)([{time:$,value:0},{time:$+1e3,value:1,easing:"cubic-in-out"}],M):0,V=$+1e3,j=F?(0,r.Xz)([{time:V,value:0},{time:V+800,value:1,easing:"cubic-in-out"}],M):0,Q=b(I,"VOLUMO.COM/CHARTS",t=>`900 ${t}px "Roboto Black"`,92,S.width-48);((t,e,i,l)=>{if(l>=2300)return;let{columnX:a,topY:o,midY:h,botY:n,fullRectW:s,halfRectW:g,rectH:u}=e,d=(e,i,o)=>{let h,n=a;if(l<900)h=i*(0,r.Xz)([{time:0,value:0},{time:900,value:1,easing:o}],l);else if(l<1500)h=i;else{let t=(0,r.Xz)([{time:1500,value:0},{time:2300,value:1,easing:o}],l);n=a+i*t,h=i*(1-t)}h>.5&&t.fillRect(n,e,h,u)};t.save();try{t.fillStyle=i,d(o,s,"cubic-in-out"),d(h,s,void 0),d(n,g,"cubic-in-out")}finally{t.restore()}})(I,_,U,M),I.save(),I.beginPath(),I.rect(0,_.topY,S.width,_.botY+_.coverSize-_.topY),I.clip(),M>=1500&&M<2400?((t,e,i,l)=>{var a;let{columnX:h,coverSize:n,topY:s,midY:g,botY:u}=e;for(let e of[{y:s,fragment:(0,o.VW)(i,-1),start:1500},{y:g,fragment:(0,o.VW)(i,0),start:1800},{y:u,fragment:(0,o.VW)(i,1),start:2100}]){let i=null==(a=e.fragment)?void 0:a.artwork;if(!i)continue;
3let o=p(-n,h,(0,r.Xz)([{time:e.start,value:0},{time:2400,value:1,easing:"cubic-in-out"}],l));t.drawImage(i,o,e.y,n,n)}})(I,_,X,M):M>=2400&&((t,e,i,l,a,h)=>{var n,s,g,u,d,c,f,w;let m=te(i,a);if(!m||void 0===m.index)return;let{index:v,time:p}=m,{columnX:y,coverSize:b,midY:x}=e,k=t=>isFinite(h)?-(0,r.Xz)([{time:h,value:0},{time:h+1e3,value:1,easing:t<=-1?"expo-out":t>=1?"quad-out":"cubic-in-out"}],a)*(48+b+60):0,T=[];for(let t=-2;t<=2;t+=1){let a=(0,o.VW)(i,v+t),h=null==a?void 0:a.artwork;if(!a||!h)continue;let m=null!=(d=null==(n=(0,o.VW)(i,v+t-1))?void 0:n.duration)?d:0,y=a.duration,x=null!=(c=null==(s=(0,o.VW)(i,v+t+1))?void 0:s.duration)?c:0,k=0;if(t>0)for(let e=0;e<t;e+=1)k+=null!=(f=null==(g=(0,o.VW)(i,v+e))?void 0:g.duration)?f:0;if(t<0)for(let e=t;e<0;e+=1)k-=null!=(w=null==(u=(0,o.VW)(i,v+e))?void 0:u.duration)?w:0;let A=(0,r.Xz)(C(m,y,x,e),p-k);A>=l.height||A+b<=0||T.push({y:A,artwork:h,d:t})}for(let e of(T.sort((t,e)=>Math.abs(e.y-x)-Math.abs(t.y-x)||e.d-t.d),T))t.drawImage(e.artwork,y+k(e.d),e.y,b,b)})(I,_,X,S,M,F?$:1/0),I.restore(),((t,e,i,l,a,o)=>{let h=y(0,600,a)*(1-o);if(h<=0)return;let{textX:n,botY:s,topY:u,focusSize:d}=e,c=(0,r.Xz)([{time:2400,value:s},{time:3e3,value:u,easing:"cubic-in-out"}],a)+(0,r.Xz)([{time:0,value:18},{time:600,value:0,easing:"cubic-in-out"}],a);t.save();try{t.globalAlpha=h,t.fillStyle=i,t.textAlign="left",t.textBaseline="top",t.font=`900 ${d}px "Roboto Black"`,t.fillText("FOCUS",n,c),l&&(t.font='600 40px "Inter Semibold"',(0,g.HT)({ctx:t,text:l.toLocaleUpperCase(),coords:{x:n,y:c+Math.round(.82*d)+4},maxWidth:e.textWidth,lineHeight:Math.round(44),ellipsis:2}))}finally{t.restore()}})(I,_,U,B,M,q),((t,e,i,l,a,h)=>{var n;let s,g=y(2500,3e3,a)*(1-h);if(g<=0)return;let u=te(l,a);if(!(null==u?void 0:u.fragment)||void 0===u.time||void 0===u.index)return;let{fragment:d,time:c,index:f}=u,w=d,m=1;c<350?(s=(0,o.VW)(l,f-1),m=(c+350)/700):c>d.duration-350&&(s=d,w=null!=(n=(0,o.VW)(l,f+1))?n:d,m=(c-(d.duration-350))/700);let v=(0,r.Xz)(T,m);t.save();try{t.fillStyle=i,s&&v<1&&(t.globalAlpha=g*(1-v),k(t,e,s,-20*v)),t.globalAlpha=g*v,k(t,e,w,20*(1-v))}finally{t.restore()}})(I,_,U,X,M,q),(t=>{let{ctx:e,size:i,logo:l,plate:a,liveX:r,liveY:o,finalY:h,introAlpha:n,moveProgress:s,settleProgress:g,lift:u}=t;if(!l||n<=0)return;let d=E.width+(a?8+N.width:0),c=p(r,(i.width-d)/2,s),f=p(o,h,s)-u*g;e.save();try{e.globalAlpha=n,e.drawImage(l,c,f,E.width,E.height),a&&e.drawImage(a,c+E.width+8,f,N.width,N.height)}finally{e.restore()}})({ctx:I,size:S,logo:H,plate:W,liveX:_.textX,liveY:_.botY+_.coverSize-E.height,finalY:_.logoTopY,introAlpha:y(0,400,M),moveProgress:q,settleProgress:j,lift:Q});let Y=y(0,400,M)*(1-q);if(L&&Y>0){let t=E.height,e=t*L.width/L.height,i=_.botY+_.coverSize-E.height;I.save(),I.globalAlpha=Y,I.drawImage(L,S.width-48-e,i,e,t),I.restore()}x({ctx:I,size:S,fgColor:U,qrCode:O,fadeAlpha:q,progressB:j,urlSize:Q,urlY:_.logoTopY,margin:48,centerWord:"FOCUS",headlineMid:"TRACKS ON VOLUMO FOCUS"})})(t):(t=>{var e;let{ctx:i,size:l,tick:a,duration:o,bgColor:h,fgColor:n,playlistArtwork:s,logo:u,logoInverted:d,plate:c,plateInverted:f,qrCode:w,subtext:m,text:v,outroText1:p,outroText2:y,fragments:b}=t;null==(e=i.reset)||e.call(i),tl({bgColor:h,ctx:i,size:l}),(t=>{let{ctx:e,size:i,fgColor:l,subtext:a,text:r}=t;if(!r||!a)return;let o=(0,g.CY)(i);e.fillStyle=null!=l?l:D.fgColor,e.font='600 64px "Inter Semibold"',e.textAlign="center",e.textBaseline="top",(0,g.co)(e,r,{x:i.width/2,y:"9:16"===o?250:"3:4"===o?150:48},i.width-48),e.font='600 32px "Inter Semibold"',e.textAlign="center",e.textBaseline="top",(0,g.HT)({ctx:e,text:a,coords:{x:i.width/2,y:"9:16"===o?326:"3:4"===o?226:124},maxWidth:i.width-48,lineHeight:36,ellipsis:2})})({ctx:i,size:l,fgColor:n,subtext:m,text:v}),td({ctx:i,fragments:b,size:l,tick:a,drawArtwork:O}),tu({ctx:i,tick:a,size:l,fgColor:n,fragments:b}),ta({ctx:i,logo:u,plate:c,size:l}),(t=>{var e;let{ctx:i,size:l,tick:a,bgColor:o,fgColor:h,artwork:n,logo:s,plate:u,text:d,subtext:c}=t;if(!(a>4500)){i.save();try{let t=null!=(e=(0,g.CY)(l))?e:"1:1",f=[{time:3500,value:l.height},{time:4500,value:0,easing:"expo-out"}],w=(0,r.Xz)(f,a);i.beginPath(),i.rect(0,0,l.width,w),i.clip();let m=[{time:3500,value:0},{time:4500,value:-(.5*l.height),easing:"expo-out"}],v=(0,r.Xz)(m,a);
3if((0,g.NW)(i,0,v,0,1),i.fillStyle=null!=h?h:D.fgColor,i.fillRect(0,0,l.width,l.height),d&&c){let e=(0,r.Xz)(B,a),h=(0,r.Xz)(L,a);i.font='600 64px "Inter Semibold"',i.fillStyle=null!=o?o:D.bgColor,i.textAlign="center",i.textBaseline="top";let n=(0,g.h_)({ctx:i,ellipsis:2,lineHeight:56,maxWidth:l.width-48,text:d}),s="9:16"===t?250:"3:4"===t?96:48;(0,g.HT)({coords:{x:l.width/2+e+h,y:s},ctx:i,ellipsis:2,maxWidth:l.width-48,lineHeight:56,text:d}),i.font='600 32px "Inter Semibold"',i.fillStyle=null!=o?o:D.bgColor,i.textAlign="center",i.textBaseline="top",(0,g.HT)({ctx:i,text:c,coords:{x:l.width/2-e-h,y:s+n.height+16},maxWidth:l.width-48,lineHeight:36,ellipsis:2})}if(s&&i.drawImage(s,u?l.width/2-E.width-2:(l.width-E.width)/2,"9:16"===t?.24*l.height:"3:4"===t?240:204,E.width,E.height),u&&i.drawImage(u,l.width/2+2,"9:16"===t?.24*l.height:"3:4"===t?240:204,N.width,N.height),n){let e=["9:16","4:5","3:4"].includes(t);(0,g.TO)({ctx:i,coords:{x:180*!e,y:e?l.height-l.width:280},image:n,size:{height:e?l.width:l.height-360,width:e?l.width:l.width-360}})}}finally{i.restore()}}})({ctx:i,size:l,artwork:s,tick:a,bgColor:h,fgColor:n,logo:d,plate:f,subtext:m,text:v}),tr({ctx:i,size:l,tick:a,duration:o,bgColor:h,fgColor:n,logo:d,plate:f,qrCode:w,text1:p,text2:y})})(t)}},24422:(t,e,i)=>{"use strict";i.d(e,{O:()=>A});var l=i(80263),a=i(33894),r=i(96776),o=i(34131),h=i(92839),n=i(91840),s=i(13463),g=i(27129),u=i(37247),d=i(61469),c=i(53239),f=i(12556),w=i(59447),m=i(37560);let v=(0,i(61545).b)(async()=>(await Promise.all([i.e(3515),i.e(5727)]).then(i.bind(i,15727))).ProgressModal),p=(0,m.C)(async()=>(await Promise.all([i.e(3515),i.e(9298)]).then(i.bind(i,89298))).ProgressBottomSheet),y=t=>{let e=(0,w.t)(t.open),{isBelowSm:i}=(0,f.yU)();return e?i?(0,l.jsx)(p,{...t}):(0,l.jsx)(v,{...t}):null};var b=i(89654),x=i(7570),C=i(51143),k=i(48006),T=i(75922);let A=t=>{let{className:e,sceneType:i,settings:f,coverImageUuid:w,progressModalOpenStateHash:m,isSettingsLoading:v,onDownloadStart:p,onMissingSettings:A}=t,{api:I,urls:S}=(0,b.gf)(),{t:M}=(0,s.c3)(),{rerender:P}=(0,o.v)(),{ensureLoggedIn:R}=(0,C.JP)(),z=(0,k.CQ)(),H=(0,k.yH)(),W=(0,k.Nn)(),O=(0,c.useRef)(),B=(0,d.useRouter)(),{getIsPlaying:L,setIsPlaying:X}=(0,T._B)(),U=(0,c.useCallback)(()=>{let t=O.current;t&&((0,u.EK)(t.state,["processing","queued"])?H.mutate(t.id,{onSuccess:()=>{O.current=void 0,P()}}):(O.current=void 0,P()))},[]),_=(0,c.useCallback)(async()=>{f?await R(async()=>{try{O.current=await z.mutateAsync({payload:{sceneType:i,...f}}),P()}catch(t){a.vF.error(t)}}):A?.()},[i,f]);(0,r.I)(()=>{let t=O.current;t&&(0,u.EK)(t.state,["processing","queued"])&&H.mutate(t.id),O.current=void 0,P()},[f]);let E=(0,c.useCallback)(()=>{let t=O.current;t?.state==="complete"&&((0,g.Xx)(S.getPromoMediaDownloadUrl(t.id)),O.current=void 0,P(),p?.())},[p]),N=(0,c.useCallback)(()=>{let t=O.current;t&&W.mutate(t.id,{onSuccess:()=>{O.current=void 0,P()}})},[]);return(0,c.useEffect)(()=>{let t=O.current;if(t)if(L()&&X(!1,"download"),"complete"===t.state);else if("cancelled"===t.state)U();else if("failed"===t.state);else{let e=setTimeout(async()=>{let e=await I.getPromoMediaTask(t.id);O.current&&(O.current=e),P()},1e3);return()=>{clearTimeout(e)}}},[O.current]),(0,c.useEffect)(()=>{if(B.query[x.Yv]&&f){_();let{query:t}=B,e=new URLSearchParams(t);e.delete(x.Yv),B.replace({query:e.toString()},void 0,{shallow:!0})}},[f]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.K,{className:e,fullWidth:!0,iconComponent:h.Yqb,loading:z.isPending||v,onClick:_,children:M((0,u.EK)(i,["playlistVideo","trackVideo","albumVideo"])?"Generate video":"Generate image")}),(0,l.jsx)(y,{coverImageUuid:w,open:!!O.current,openStateHash:m,task:O.current,onCloseAttempt:U,onDelete:N,onDownload:E})]})}},30454:(t,e,i)=>{"use strict";i.d(e,{d:()=>C});var l,a,r,o,h,n,s,g,u,d,c,f,w=function(t,e,i,l){if("a"===i&&!l)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!l:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?l:"a"===i?l.call(t):l?l.value:e.get(t)}
3,m=function(t,e,i,l,a){if("m"===l)throw TypeError("Private method is not writable");if("a"===l&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===l?a.call(t,i):a?a.value=i:e.set(t,i),i};let v=(t,e,i,l)=>`${t}_${e}_${i}_${l}`,p=(t,e)=>`${t}_${e}`,y=(t,e)=>`${t}_${e}`,b=(t,e)=>`${t}_${e}`,x=(t,e)=>`${t}_${e}`;class C{constructor(){l.set(this,{}),a.set(this,{}),r.set(this,{}),o.set(this,{}),h.set(this,{}),n.set(this,{}),s.set(this,{}),g.set(this,{}),u.set(this,{}),d.set(this,{}),this.getArtwork=(t,e)=>w(this,l,"f")[b(t,e)],this.setArtwork=(t,e,i)=>{let a=b(t,e);w(this,l,"f")[a]!==i&&(w(this,l,"f")[a]=i)},this.getFigure=(t,e)=>w(this,r,"f")[x(t,e)],this.setFigure=(t,e,i)=>{let l=x(t,e);w(this,r,"f")[l]!==i&&(w(this,r,"f")[l]=i)},this.getGenre=t=>w(this,o,"f")[t],this.setGenre=(t,e)=>{w(this,o,"f")[t]!==e&&(w(this,o,"f")[t]=e)},this.getLogo=t=>w(this,h,"f")[t],this.setLogo=(t,e)=>{w(this,h,"f")[t]!==e&&(w(this,h,"f")[t]=e)},this.getCompactLogo=(t,e)=>w(this,a,"f")[p(t,e)],this.setCompactLogo=(t,e,i)=>{w(this,a,"f")[p(t,e)]!==i&&(w(this,a,"f")[p(t,e)]=i)},this.getPlate=(t,e)=>w(this,s,"f")[y(t,e)],this.setPlate=(t,e,i)=>{let l=y(t,e);w(this,s,"f")[l]!==i&&(w(this,s,"f")[l]=i)},this.getQrCode=(t,e,i,l)=>w(this,g,"f")[v(t,e,i,l)],this.setQrCode=(t,e,i,l,a)=>{let r=v(t,e,i,l);w(this,g,"f")[r]!==a&&(w(this,g,"f")[r]=a)},this.getShare=t=>w(this,u,"f")[t],this.setShare=(t,e)=>{w(this,u,"f")[t]!==e&&(w(this,u,"f")[t]=e)},this.getTrack=t=>w(this,d,"f")[t],this.setTrack=(t,e)=>{w(this,d,"f")[t]!==e&&(w(this,d,"f")[t]=e)},this.getParent=t=>w(this,n,"f")[t],this.setParent=(t,e)=>{w(this,n,"f")[t]!==e&&(w(this,n,"f")[t]=e)},c.set(this,[]),f.set(this,void 0),this.subscribe=t=>{w(this,c,"f").push(t)},this.unsubscribe=t=>{let e=w(this,c,"f").indexOf(t);e>-1&&w(this,c,"f").splice(e,1)},this.emitOnChange=()=>{w(this,f,"f")&&clearTimeout(w(this,f,"f")),m(this,f,setTimeout(async()=>{await Promise.all(w(this,c,"f").map(async t=>await t())),m(this,f,void 0,"f")},50),"f")}}}l=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakMap,s=new WeakMap,g=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap},42900:(t,e,i)=>{"use strict";i.d(e,{Tn:()=>d,V1:()=>f,Xl:()=>n,aC:()=>m,fJ:()=>u,kC:()=>s,wN:()=>w});var l=i(70719),a=i(43138),r=i(30454),o=i(96417),h=i(73133);let n={height:680,width:680},s={height:32,width:138.6},g={height:120,width:120},u=s,d={height:120,width:120},c={width:n.width+48,height:n.height+48+150},f=async t=>{var e;let{cache:i=new r.d,accountId:d,bgColor:c,fgColor:f,albumId:m,trackId:v,shareUrlBase:p,imageApi:y,storeApi:b,sysApi:x}=t,C=i.getParent(m),{bgColor:k,fgColor:T}=(0,o.lt)({bgColor:c,fgColor:f});if(C||(C=await b.getAlbumById(m),i.setParent(m,C)),v&&!i.getTrack(v)&&i.setTrack(v,null==(e=await b.getTracksByIds([v]))?void 0:e[0]),v&&!i.getShare(v)){let t=i.getTrack(v);if(t){let e=p+(0,l.$O)(t);i.setShare(v,await (0,h.H)({accountId:d,baseUrl:e,source:"promo-image-preview",storeApi:b,sysApi:x}))}}return await Promise.all([(async()=>{c&&!i.getLogo(c)&&i.setLogo(c,await (0,o.Ms)({currentColor:null!=c?c:w.bgColor,url:p+"/static/svg/logo.svg",size:s}))})(),(async()=>{f&&c&&!i.getCompactLogo(f,c)&&i.setCompactLogo(f,c,await (0,o.Ms)({currentColor:null!=T?T:w.fgColor,url:p+"/static/svg/logo-icon-adaptive.svg",size:g}))})(),(async()=>{if(v&&c&&!i.getPlate(v,c)){let t=(0,h.a)(C);t&&i.setPlate(v,c,await (0,o.Ms)({currentColor:null!=c?c:w.bgColor,url:p+`/static/svg/plates/${t}.svg`,size:u}))}})(),(async()=>{if(v&&!i.getArtwork(v,n.width)){let t=i.getTrack(v);if(t){let e=y.getImageUrl(t.album.artwork_uuid,{...n,format:"jpg"});e&&i.setArtwork(v,n.width,await (0,o.TZ)(e))}}})()]),await Promise.all([(async()=>{if(v&&f&&c){let t=i.getTrack(v),e=i.getShare(v),r=i.getCompactLogo(f,c);if(t&&e&&r&&!i.getQrCode(v,f,c,!1)){let h=p+(0,l.$O)(t);i.setQrCode(v,f,c,!1,await (0,o.qm)({bgColor:k,fgColor:T,logo:r,value:(0,a.Y9)(h,"si",e.id)}))}}})()]),i},w={aspectRatio:"1:1",bgColor:"#222429",fgColor:"#f5f7fa"},m=t=>{let{artwork:e,bgColor:i,ctx:l,fgColor:a,logo:r,plate:h,qrCode:g,size:f,subtext:m,text:v}=t;(t=>{let{artwork:e,bgColor:i,ctx:l,size:a}=t;if(e){l.save();try{let t=Math.max(a.width,a.height)+160,r={width:t,height:t};l.fillStyle=null!=i?i:w.bgColor,l.fillRect(0,0,a.width,a.height),l.filter="blur(40px)",(0,o.TO)({co
3ords:{x:(a.width-r.width)/2,y:(a.height-r.height)/2},ctx:l,image:e,size:r})}finally{l.restore()}}})({artwork:e,bgColor:i,ctx:l,size:f}),(t=>{let{bgColor:e,ctx:i,size:l}=t;i.fillStyle=null!=e?e:w.bgColor,i.fillRect((l.width-c.width)/2,(l.height-c.height)/2,c.width,c.height)})({bgColor:i,ctx:l,size:f}),(t=>{let{artwork:e,ctx:i,size:l}=t;e&&(0,o.TO)({coords:{x:(l.width-c.width)/2+24,y:(l.height-c.height)/2+24},ctx:i,image:e,size:n})})({artwork:e,ctx:l,size:f}),(t=>{let{ctx:e,fgColor:i,size:l,text:a}=t;a&&(e.font='600 40px "Inter Semibold"',e.fillStyle=null!=i?i:w.fgColor,e.textAlign="start",e.textBaseline="top",(0,o.HT)({ctx:e,text:a,coords:{x:(l.width-c.width)/2+24,y:(l.height+c.height)/2-d.height-24},maxWidth:c.width-d.width-72,lineHeight:44,ellipsis:2}))})({ctx:l,fgColor:a,size:f,text:v}),(t=>{let{ctx:e,fgColor:i,size:l,subtext:a}=t;a&&(e.font='600 20px "Inter Semibold"',e.fillStyle=null!=i?i:w.fgColor,e.textAlign="start",e.textBaseline="top",(0,o.co)(e,a,{x:(l.width-c.width)/2+24,y:(l.height+c.height)/2-24-20},c.width-d.width-24-48))})({ctx:l,fgColor:a,size:f,subtext:m}),(t=>{let{ctx:e,qrCode:i,size:l}=t;i&&e.drawImage(i,(l.width+c.width)/2-d.width-24,(l.height+c.height)/2-d.height-24,d.width,d.height)})({ctx:l,qrCode:g,size:f}),(t=>{let{ctx:e,logo:i,position:l,size:a}=t;i&&e.drawImage(i,"left"===l?a.width/2-s.width-2:(a.width-s.width)/2,a.height-(a.height-c.height)/4-s.height/2,s.width,s.height)})({ctx:l,logo:r,position:h?"left":"center",size:f}),(t=>{let{ctx:e,plate:i,position:l,size:a}=t;i&&e.drawImage(i,"right"===l?a.width/2+2:(a.width-u.width)/2,a.height-(a.height-c.height)/4-u.height/2,u.width,u.height)})({ctx:l,plate:h,position:"right",size:f})}},48006:(t,e,i)=>{"use strict";i.d(e,{CQ:()=>f,Nn:()=>w,h6:()=>c,yH:()=>m});var l=i(98720),a=i(19009),r=i(24575),o=i(33894),h=i(13463),n=i(40377),s=i(89654),g=i(35951);let u=t=>(0,n.xC)({scope:g.B.PromoMediaTasks,fetchParams:t}),d=t=>(0,n.xC)({scope:g.B.PromoMediaTask,taskId:t}),c=function(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{api:i}=(0,s.gf)();return(0,l.I)({queryKey:[u(t)],queryFn:()=>i.getPromoMediaTasks(t),enabled:e})},f=()=>{let{api:t}=(0,s.gf)(),e=(0,a.jE)();return(0,r.n)({mutationFn:e=>t.createPromoMediaTask(e),onSuccess(){e.invalidateQueries({queryKey:[u()]})}})},w=()=>{let{api:t}=(0,s.gf)(),{t:e}=(0,h.c3)(),i=(0,a.jE)();return(0,r.n)({mutationFn:e=>t.deletePromoMediaTask(e),onSuccess(t,l){o.vF.success(e("Generated media has been removed")),i.invalidateQueries({queryKey:[u()]}),i.invalidateQueries({queryKey:[d(l)]})}})},m=()=>{let{api:t}=(0,s.gf)(),e=(0,a.jE)();return(0,r.n)({mutationFn:e=>t.cancelPromoMediaTask(e),onSuccess(t,i){e.invalidateQueries({queryKey:[u()]}),e.invalidateQueries({queryKey:[d(i)]})}})}},55103:t=>{t.exports={canvas:"AlbumVideoCanvas_canvas__N62BM"}},62991:t=>{t.exports={canvas:"TrackVideoCanvas_canvas__o__Z4"}},65813:(t,e,i)=>{"use strict";i.d(e,{r:()=>w});var l=i(80263),a=i(90244),r=i(9826),o=i(96417),h=i(43481),n=i(3638),s=i(53239),g=i(93340),u=i(22894),d=i(75922),c=i(62991),f=i.n(c);let w=t=>{let{mediaCache:e,settings:i,paused:c,className:w,style:m}=t,v=(0,d._B)(),p=r.Gm(i),y=(0,s.useRef)(null),b=(0,s.useMemo)(()=>(0,o.QA)(i?.aspectRatio??"1:1"),[i?.aspectRatio]),x=(0,s.useRef)(),[C,k]=(0,s.useState)();(0,u.n)();let T=(0,s.useCallback)(async()=>{x.current&&x.current.abort(),x.current=h.g6.newWithSignal(async(t,l,o)=>{let h;try{if(i.trackId&&i.fgColor&&i.bgColor){let[t,l,o,n]=await Promise.all([e.getArtwork(i.trackId,p.width),e.getLogo(i.fgColor),e.getPlate(i.trackId,i.fgColor),e.getQrCode(i.trackId,i.fgColor,i.bgColor,"circle"===i.animationType)]);h={animationType:i.animationType,size:b,duration:i.duration??0,bgColor:i.bgColor,fgColor:i.fgColor,titleText:i.showTitle?(0,a.vl)(e.getTrack(i.trackId)):void 0,artistText:i.showTitle?(0,a.j0)(e.getTrack(i.trackId)):void 0,artwork:t?await (0,g.uu)(t,p):void 0,logo:l?await (0,g.uu)(l,r.kC):void 0,plate:o?await (0,g.uu)(o,r.fJ):void 0,qrCode:n?await (0,g.uu)(n,r.Tn):void 0}}o.aborted?l("Aborted"):t(h??{animationType:i.animationType,size:b,duration:0})}catch(t){l(t)}});try{let t=await x.current;k(t)}catch(t){if(!(t instanceof h.lc))throw t}},[i]);return(0,s.useEffect)(()=>(e.subscribe(T),()=>{e.unsubscribe(T)}),[T,e]),(0,s.useEffect)(()=>{let t,e=y.current?.getContext("2d");if(e){let i=()=>{l=requestAnimationFrame(i);let a=v.getTime();!C||t===a||c&&t||(r.cH({...C,ctx:e,tick:a}),t=a)},l=requestAnimationFrame(i);return()=>{cancelAnimationFrame(l)}}},[C,c]),(0,l.jsx)("canvas",{className:(0,n.A)(f().canvas,w),height:b.height,ref:y,style:m,width:b.
3width},i.trackId)}},73133:(t,e,i)=>{"use strict";i.d(e,{H:()=>r,a:()=>a});var l=i(27394);let a=t=>(0,l.HJ)(t)?t.exclusive?"exclusive":t.featured?"featured":t.volumo_direct?"direct":void 0:t.featured?"featured":void 0,r=async t=>{let{accountId:e,baseUrl:i,source:l,storeApi:a,sysApi:r}=t;return await a.createShare({original_url:i,source:l})}},75234:(t,e,i)=>{"use strict";i.d(e,{m:()=>b});var l=i(80263),a=i(27394),r=i(46947),o=i(30454),h=i(37247);let n=t=>"circle"===t||"square"===t;var s=i(9826),g=i(23107),u=i(53239),d=i(89316),c=i(75922),f=i(15443),w=i(65813),m=i(89654),v=i(33064),p=i(93340);let y=t=>{let{animationType:e,aspectRatio:i="9:16",className:y,item:b,paused:x,onVideoSettingsUpdated:C}=t,{api:k}=(0,m.gf)(),T=(0,c._B)(),A=(0,u.useRef)(Promise.resolve()),[I]=(0,u.useState)(new o.d),[S,M]=(0,u.useState)(),[P,R]=(0,u.useState)(),[z,H]=(0,u.useState)();(0,u.useEffect)(()=>{let t=z??P??S;if(t){if(C?.(t),x)return void T.setTime(1e3,"renderer");let e=performance.now(),i=S?.duration??(z??P)?.fragments?.reduce((t,e)=>t+(e.duration??0),0)??1,l=setInterval(()=>{T.setTime((performance.now()-e)%i,"renderer")},16);return()=>{clearInterval(l)}}},[S,P,z,x]),(0,u.useEffect)(()=>{let t=async()=>{try{if((0,a.HJ)(b)&&b.tracks.length>1){let t=b.tracks[0].id,l=n(e)?e:"circle";await s.x({...s.Ee,cache:I,imageApi:r.C,roundedQr:"circle"===l,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl,albumId:b.id,trackId:t,animationType:l,aspectRatio:i});let a=await (0,p.ZI)(I,b.id,i??"9:16",l);await s.x({...a,cache:I,imageApi:r.C,roundedQr:"circle"===l,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl,albumId:b.id,trackId:t}),H(a)}else if((0,a.VZ)(b)&&1!==b.tracks.length){await g.x({...g.Ee,cache:I,imageApi:r.C,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl,playlistId:b.id,fragments:[]});let t=(0,h.EK)(e,["standard","chartVideo","onRotation","focus"])?e:"standard";("onRotation"===t||"focus"===t)&&"9:16"!==i&&(t="standard");let l=await (0,p.E4)(I,b.id);await g.x({...l,cache:I,imageApi:r.C,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl,template:t}),R({...l,aspectRatio:i,template:t})}else{let t=(0,a.g1)(b)?b.album.id:(0,a.ob)(b)?b.id:b.tracks[0].album.id,l=(0,a.g1)(b)?b.id:b.tracks[0].id,o=n(e)?e:"circle";await s.x({...s.Ee,cache:I,imageApi:r.C,roundedQr:"circle"===o,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl,albumId:t,trackId:l,animationType:o,aspectRatio:i});let h=await (0,p.F4)(I,t,l,i,o);await s.x({...h,cache:I,imageApi:r.C,roundedQr:"circle"===o,storeApi:k,shareUrlBase:v.Z4.volumoShareUrl||v.Z4.volumoStoreUrl}),M(h)}}finally{I.emitOnChange()}};(0,a.HJ)(b)&&b.tracks.length>1?H(void 0):(0,a.VZ)(b)&&b.tracks.length>1?R(void 0):M(void 0),A.current=A.current.then(t)},[b,i,e]);let W={aspectRatio:(i??"9:16").replace(":","/")};return(0,a.HJ)(b)&&b.tracks.length>1?z?(0,l.jsx)(d.r,{className:y,mediaCache:I,settings:z,style:{aspectRatio:i?.replace(":","/")}}):(0,l.jsx)("div",{className:y,style:W}):(0,a.VZ)(b)&&1!==b.tracks.length?P?(0,l.jsx)(f.M,{className:y,mediaCache:I,settings:P}):(0,l.jsx)("div",{className:y,style:W}):S?(0,l.jsx)(w.r,{className:y,mediaCache:I,paused:x,settings:S,style:{aspectRatio:i?.replace(":","/")}}):(0,l.jsx)("div",{className:y,style:W})},b=t=>(0,l.jsx)(c.oQ,{children:(0,l.jsx)(y,{...t})})},75922:(t,e,i)=>{"use strict";i.d(e,{_B:()=>h,oQ:()=>o});var l=i(80263),a=i(53239);let r=a.createContext({getTime:()=>0,setTime:()=>{},getIsPlaying:()=>!1,setIsPlaying:()=>{},subscribe:()=>{},unsubscribe:()=>{}});r.displayName="PlaybackSyncContext";let o=t=>{let{children:e,defaultIsPlaying:i=!1,defaultTime:o=0}=t,h=(0,a.useRef)([]),n=(0,a.useRef)(o),s=(0,a.useRef)(i),g=(0,a.useCallback)(()=>n.current,[]),u=(0,a.useCallback)((t,e)=>{let i=n.current;t!==i&&(n.current=t,h.current.forEach(l=>{l({time:i,isPlaying:s.current,source:e},{time:t,isPlaying:s.current,source:e})}))},[]),d=(0,a.useCallback)(()=>s.current,[]),c=(0,a.useCallback)((t,e)=>{let i=s.current;t!==i&&(s.current=t,h.current.forEach(l=>{l({time:n.current,isPlaying:i,source:e},{time:n.current,isPlaying:t,source:e})}))},[]),f=(0,a.useCallback)(t=>{h.current.includes(t)||h.current.push(t)},[]),w=(0,a.useCallback)(t=>{h.current.includes(t)&&h.current.splice(h.current.indexOf(t),1)},[]),m=(0,a.useMemo)(()=>({getTime:g,setTime:u,getIsPlaying:d,setIsPlaying:c,subscribe:f,unsubscribe:w}),[g,u,d,c,f,w]);return(0,l.jsx)(r.Provider,{value:m,children:e})},h=()=>(0,a.useContext)(r)},79697:t=>{t.exports={canvas:"PlaylistVideoCanvas_canvas__84kS5"}},79809:(t,e,i)=>{"use strict";i.d(e,{J1:()=>a});var l=i(65963);let a=t=>{let e,[i,a,r]=(e=(0,l.y$)(t.trim(),"#")).length<6?[parseInt(e[0],16),parseInt(e[1],16),parseInt(e[2],16)]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];return Math.sqrt(.299*i**2+.587*a**2+.114*r**2)}},89316:(t,e,i)=>{"use strict";i.d(e,{r:()=>m});var l=i(80263),a=i(90244),r=i(96417),o=i(9826),h=i(23107);o.x;var n=i(43481),s=i(3638),g=i(53239),u=i(93340),d=i(22894),c=i(75922),f=i(55103),w=i.n(f);let m=t=>{let{mediaCache:e,settings:i,className:f,style:m}=t,v=(0,c._B)(),p=(0,g.useRef)(null),y=(0,g.useMemo)(()=>(0,r.QA)(i?.aspectRatio??"1:1"),[i?.aspectRatio]),b=o.Gm(i),x=(0,g.useRef)(),[C,k]=(0,g.useState)();(0,d.n)();let T=(0,g.useCallback)(async()=>{x.current&&x.current.abort(),x.current=n.g6.newWithSignal(async(t,l,r)=>{try{let h,n=i.fragments[0]?.trackId;if(n&&i.fgColor&&i.bgColor&&i.animationType){let[t,l,r,s]=await Promise.all([e.getArtwork(n,b.width),e.getLogo(i.fgColor),e.getPlate(n,i.fgColor),e.getQrCode(n,i.fgColor,
3i.bgColor,"circle"===i.animationType)]),g=e.getParent(i.albumId),d=g?.artists??[],c=g?.title,f=d.length>0?1===d.length?d[0].name:`${d[0].name} + ${d.length-1} more`:void 0,w=i.fragments.map(t=>{let l=t.trackId?e.getTrack(t.trackId):void 0;return{duration:t.duration??0,titleText:!1!==i.showTitle&&l?(0,a.vl)(l):void 0}}),m=i.fragments.reduce((t,e)=>t+(e.duration??0),0);h={base:{animationType:i.animationType,size:y,duration:m,bgColor:i.bgColor,fgColor:i.fgColor,albumName:c,albumArtistText:f,artwork:t?await (0,u.uu)(t,b):void 0,logo:l?await (0,u.uu)(l,o.kC):void 0,plate:r?await (0,u.uu)(r,o.fJ):void 0,qrCode:s?await (0,u.uu)(s,o.Tn):void 0},fragments:w}}r.aborted?l("Aborted"):t(h)}catch(t){l(t)}});try{let t=await x.current;k(t)}catch(t){if(!(t instanceof n.lc))throw t}},[i,y,b]);return(0,g.useEffect)(()=>(e.subscribe(T),()=>{e.unsubscribe(T)}),[e,T]),(0,g.useEffect)(()=>{let t,e=p.current?.getContext("2d");if(!e||!C)return;let i=()=>{l=requestAnimationFrame(i);let a=v.getTime();a!==t&&((t=>{let{fragments:e,tick:i,albumName:l,albumArtistText:a,...n}=t,s=(0,h.G9)(e,i);o.cH({...n,tick:i,artistText:void 0,titleText:null==s?void 0:s.fragment.titleText}),(t=>{let{ctx:e,size:i,fgColor:l,albumName:a,albumArtistText:o}=t;if(!a)return;let h=(0,r.CY)(i);e.fillStyle=null!=l?l:"#f5f7fa",e.font='600 64px "Inter Semibold"',e.textAlign="center",e.textBaseline="top",(0,r.co)(e,a,{x:i.width/2,y:"9:16"===h?250:"3:4"===h?150:48},i.width-48),o&&(e.font='600 32px "Inter Semibold"',e.textAlign="center",e.textBaseline="top",(0,r.HT)({ctx:e,text:o,coords:{x:i.width/2,y:"9:16"===h?326:"3:4"===h?226:124},maxWidth:i.width-48,lineHeight:36,ellipsis:2}))})({ctx:n.ctx,size:n.size,fgColor:n.fgColor,albumName:l,albumArtistText:a})})({...C.base,ctx:e,tick:a,fragments:C.fragments}),t=a)},l=requestAnimationFrame(i);return()=>{cancelAnimationFrame(l)}},[C]),(0,l.jsx)("canvas",{className:(0,s.A)(w().canvas,f),height:y.height,ref:p,style:m,width:y.width})}},93340:(t,e,i)=>{"use strict";i.d(e,{E4:()=>y,F4:()=>T,Sf:()=>m,XW:()=>M,ZI:()=>I,ig:()=>C,p7:()=>b,uu:()=>f});var l=i(61167),a=i(23107),r=i(15407),o=i(9826),h=i(42900),n=i(37247),s=i(79809),g=i(6750),u=i(7230).Buffer;let d={},c=async(t,e)=>{if(t){let i=JSON.stringify({src:t,size:e}),l=d[i];return l||(l=new Promise((e,i)=>{let l=new Image;l.crossOrigin="Anonymous",l.onload=()=>e(l),l.onerror=t=>i(`Error loading image: ${JSON.stringify(t)}`),l.src=t}),d[i]=l),l}},f=async(t,e)=>await c(URL.createObjectURL(new Blob([u.from(t)],{type:"text/plain"})),e),w=new Map,m=async t=>{let e=w.get(t);if(!e){let{getPalette:l}=await i.e(3698).then(i.bind(i,11317)),a=await l(t,{colorCount:5,quality:5});a&&(e=(0,n.Ul)(a.map(t=>t.hex()),t=>(0,s.J1)(t)),w.set(t,e))}return e},v=async(t,e)=>{let i=t.getArtwork(e,a.CI.width);if(i){let t=await f(i,{height:200,width:200});if(t)return await m(t)}},p=t=>t.map((e,i)=>{let r=(0,l.OY)({duration:e.duration,access:(0,g.GJ)(e.release_start_at)?"limited":"standard"});return{...a.b$,duration:0===i||i===t.length-1?8e3:5e3,start:r.defaultRange.from,trackId:e.id}}),y=async(t,e)=>{let i=await v(t,e),l=t.getParent(e),r=l?p(l.tracks.slice(0,10)):[];return{...a.Ee,bgColor:i?.at(0),fgColor:i?.at(-1),fragments:r,playlistId:e}},b=t=>({...t,bgColor:t.fgColor,fgColor:t.bgColor}),x=async(t,e)=>{let i=t.getArtwork(e,r.Xl.width);if(i){let t=await f(i,{height:200,width:200});if(t)return await m(t)}},C=async(t,e)=>{let i=await x(t,e);return{...r.wN,bgColor:i?.at(0),fgColor:i?.at(-1),playlistId:e}},k=async(t,e,i)=>{let l=t.getArtwork(e,o.Gm({animationType:i,aspectRatio:o.Ee.aspectRatio}).width);if(l){let t=await f(l,{height:200,width:200});if(t)return await m(t)}},T=async(t,e,i,a,r)=>{let h=await k(t,i,r),n=t.getTrack(i),s=(0,l.OY)({duration:n?.duration??0,access:!n||(0,g.GJ)(n.release_start_at)?"limited":"standard"});return{...o.Ee,bgColor:h?.at(0),fgColor:h?.at(-1),aspectRatio:a,animationType:r,albumId:e,start:s.defaultRange.from,duration:s.defaultRange.to-s.defaultRange.from,trackId:i}},A=async(t,e,i)=>{let l=t.getArtwork(e,o.Gm({animationType:i,aspectRatio:o.Ee.aspectRatio}).width);if(l){let t=await f(l,{height:200,width:200});if(t)return await m(t)}},I=async(t,e,i,l)=>{let a=t.getParent(e),r=a?.tracks??[],h=r[0],n=h?await A(t,h.id,l):void 0,s=p(r);return{...o.Ee,bgColor:n?.at(0),fgColor:n?.at(-1),aspectRatio:i,animationType:l,albumId:e,fragments:s,showTitle:!0}},S=async(t,e)=>{let i=t.getArtwork(e,h.Xl.width);if(i){let t=await f(i,{height:200,width:200});if(t)return await m(t)}},M=async(t,e,i)=>{let l=await S(t,e);return{...h.wN,bgColor:l?.at(0),fgColor:l?.at(-1),albumId:i,trackId:e}}},96417:(t,e,i)=>{"use strict";i.d(e,{CY:()=>w,HT:()=>v,Ms:()=>s,NW:()=>c,QA:()=>f,TO:()=>x,TZ:()=>g,co:()=>b,h_:()=>p,lt:()=>u,qm:()=>d});var l=i(48303),a=i(79809),r=i(42266);let o=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,l=new Image;l.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await new Promise((t,e)=>{l.onload=t,l.onerror=e});let a=document.createElement("canvas");[a.width,a.height]=[e,i];let r=a.getContext("2d");if(r)return r.drawImage(l,0,0,e,i),new Promise(t=>{a.toBlob(async e=>t(await (null==e?void 0:e.arrayBuffer())))})},h=async t=>{let{currentColor:e,svgString:i,size:l}=t;return e&&(i=null==i?void 0:i.replaceAll("currentColor",e)),await o(i,l.width,l.height)},n={},s=async t=>{let{currentColor:e,size:i,url:a}=t;if(a){let t=n[a];if(!t){let e=new l.Q;t=(await e.get(a)).body,n[a]=t}return await h({currentColor:e,svgString:t,size:i})}},g=async t=>{if(t){let e=new l.Q;return(await e.get(t,{expectedResponseType:"buffer"})).body.buffer}},u=t=>{let{bgColor:e,fgColor:i}=t,l=e?(0,a.J1)(e):0;return(i?(0,a.J1)(i):0)>l?{bgColor:i,fgColor:e}:{bgColor:e,fgColor:i}},d=async t=>{let{bgColor:e,fgColor:i,logo:l,rounded:a,value:o}=t;return(await (0,r.e)(o,{bgColor:e,color:i,logo:l,logoWidth:20,logoHeight:20,borderRadius:10*!!a,size:20,margin:1})).buffer}
3,c=(t,e,i,l,a)=>{let r=Math.cos(l)*a,o=Math.sin(l)*a;t.setTransform(r,o,-o,r,e,i)},f=t=>{switch(t){case"1:1":return{width:1080,height:1080};case"3:4":return{width:1080,height:1440};case"4:5":return{width:1080,height:1350};case"9:16":return{width:1080,height:1920};case"3:2":return{width:1620,height:1080}}},w=t=>t.width/t.height==1?"1:1":t.width/t.height==1.5?"3:2":t.width/t.height==3/4?"3:4":t.width/t.height==.8?"4:5":t.width/t.height==9/16?"9:16":void 0,m=t=>{let{ctx:e,maxWidth:i,text:l,ellipsis:a}=t,r=[],o=0;for(;o<l.length&&(!a||"number"==typeof a&&r.length<=a||a&&!r.length);)if("number"==typeof a&&r.length===a-1||!0===a)r.push(y(e,l.slice(o),i)),o=l.length;else{let t=o;for(;;){let a=l.indexOf(" ",t+1),r=l.indexOf("\n",t+1),h=r<0?a:a<0?r:a<r?a:r,n=r>=0&&r===h;if(-1===h&&(h=l.length),e.measureText(l.slice(o,h)).width<=i){if((t=h)>=l.length-1||n)break}else break}r.push(l.slice(o,t)),o=t+1}return r},v=t=>{let{coords:e,ctx:i,ellipsis:l,lineHeight:a,maxWidth:r,text:o,vCenter:h}=t,n=m({ctx:i,ellipsis:l,maxWidth:r,text:o});for(let t=0;t<n.length;t+=1){let l=n[t],r=e.y+t*a;i.fillText(l,e.x,h?r-n.length*a/2:r)}},p=t=>{let{ctx:e,ellipsis:i,lineHeight:l,maxWidth:a,text:r}=t,o=m({ctx:e,ellipsis:i,maxWidth:a,text:r});return o.length?1===o.length?{height:l,width:e.measureText(o[0]).width}:{height:o.length*l,width:a}:{height:0,width:0}},y=(t,e,i)=>{let l=t.measureText(e).width,a=t.measureText("…").width;if(l<=i||l<=a)return e;let r=((t,e)=>{let i=0;for(;i<=t;){let l=Math.floor((i+t)/2),a=e(l);if(0===a)return l;-1===a?i=l+1:t=l-1}return t})(e.length,l=>{let r=i-a,o=t.measureText(e.substring(0,l)).width;return o<r?-1:+(o>r)});return e.substring(0,r)+"…"},b=(t,e,i,l)=>{let a=y(t,e,l);t.fillText(a,i.x,i.y)},x=t=>{let{coords:e,ctx:i,image:l,size:a}=t;if(l){i.save();try{i.beginPath(),i.rect(e.x,e.y,a.width,a.height),i.clip();let t=Math.max(a.width/l.width,a.height/l.height),r={height:l.height*t,width:l.width*t};i.drawImage(l,e.x+(a.width-r.width)/2,e.y+(a.height-r.height)/2,r.width,r.height)}finally{i.restore()}}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.