1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9921],{11350:()=>{},12134:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(54631),r=s(38959);let n=e=>{let{ref:t,className:s="",children:n}=e;function l(){t.current.classList.contains("openDropDown")?t.current.classList.remove("openDropDown"):t.current.classList.add("openDropDown")}return(0,r.useEffect)(()=>{if(t)return t?.current&&t.current.addEventListener("click",l),()=>{t?.current&&t.current?.removeEventListener("click",l)}},[t]),(0,a.jsx)("div",{className:`AccordionItem ${s}`,children:n})}},15661:(e,t,s)=>{"use strict";s.d(t,{l:()=>r});var a=s(38959);let r=()=>{let[e,t]=(0,a.useState)({width:0,height:0});return(0,a.useEffect)(()=>{if(!window)return;t({width:window.innerWidth,height:window.innerHeight});let e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e}},18041:()=>{},31243:(e,t,s)=>{"use strict";s.d(t,{E:()=>o});var a=s(54631),r=s(38959),n=s(70970),l=s(50267),i=s(26678);let o=e=>{let{show:t,closeModal:s,callback:o,data:c,header:d,message:u,btnText:m}=e,h=(0,i.useToast)(),p="no"===c.private?"private":"public";if(!t)return null;async function g(){let e="no"===c.private?"yes":"no";if(null!==await (0,l.Nq)({music_id:c.id,isPrivate:e,type:c.type})){h.info((0,a.jsxs)("p",{children:["You made\xa0",(0,a.jsx)("b",{className:"orange bold",children:c.title}),"\xa0",p]}),{autoClose:1e4,variant:"small"}),o?.(),s();return}s(),h.info((0,a.jsx)("p",{children:" Something went wrong please try again later "}),{autoClose:1e4,variant:"small"})}return(0,r.useCallback)(()=>{},[c]),(0,a.jsx)(n.A,{className:"MakePublic-modal",show:t,onClose:s,children:(0,a.jsxs)("div",{className:"MakePublic",children:[(0,a.jsxs)("p",{className:"MakePublic-h",children:[" ",d||`make ${p}`," "]}),(0,a.jsx)("p",{className:"MakePublic-p",children:u||`Are you sure you want to make this ${c.type} ${p}?`}),(0,a.jsx)("button",{className:"MakePublic-confirm",onClick:g,children:m||"Confirm"}),(0,a.jsx)("button",{className:"MakePublic-cancel",onClick:s,children:"Cancel"})]})})}},41230:(e,t,s)=>{"use strict";s.d(t,{z:()=>u});var a=s(54631),r=s(38959),n=s(70970),l=s(55329),i=s(92301),o=s(26678),c=s(50267),d=s(31224);let u=e=>{let{onClose:t,link:s,data:u}=e,{formSubmitHandler:m,deleteLink:h,onInputChange:p,errMsg:g,promoLinks:y}=(e=>{let{data:t}=e,[s,n]=(0,r.useState)(""),[l,i]=(0,r.useState)(!0),[d,u]=(0,r.useState)(),m=(0,o.useToast)();async function h(e){e.preventDefault(),e.stopPropagation();let s=new FormData(e.target).get("promo_link");d?.find(e=>e.key===s.replace(/[\W_]/gim,""))&&m.info((0,a.jsxs)("p",{children:["Link\xa0",(0,a.jsx)("b",{className:"orange bold",children:s}),"\xa0 already exists."]}),{autoClose:1e4,variant:"small"});let r=await (0,c.HP)({music_id:t.id,key:s,type:t.type});r?.results&&(m.info((0,a.jsxs)("p",{children:["Promo link\xa0",(0,a.jsx)("b",{className:"orange bold",children:s}),"\xa0 for ",t.title," successfully created."]}),{autoClose:1e4,variant:"small"}),u(r.results))}async function p(){let e=await (0,c.d9)({music_id:t.id,type:t.type});e?.results&&u(e?.results)}async function g(e){let s=await (0,c.VG)({music_id:t.id,type:t.type,key:e});if(p(),!s)return void m.error((0,a.jsxs)("p",{children:["Something went wrong.\xa0",(0,a.jsx)("b",{className:"orange bold",children:e}),"\xa0 was not deleted."]}),{autoClose:1e4,variant:"small"});m.info((0,a.jsxs)("p",{children:["Link\xa0",(0,a.jsx)("b",{className:"orange bold",children:e}),"\xa0 was deleted."]}),{autoClose:1e4,variant:"small"})}return(0,r.useEffect)(()=>{t&&p()},[t]),{formSubmitHandler:h,deleteLink:g,onInputChange:function(e){let{target:t}=e,{value:a}=t;a&&l&&(i(!1),s&&n("")),l||a||n("The Key Field is required"),s&&a&&n("")},errMsg:s,promoLinks:d}})({data:u});return(0,a.jsx)(n.A,{className:"CreatePromotionalLink-modal",show:!0,onClose:t,children:(0,a.jsxs)("div",{className:"CreatePromotionalLink",children:[(0,a.jsx)("p",{className:"CreatePromotionalLink-h",children:"Create Promotional Link"}),(0,a.jsx)("p",{className:"CreatePromotionalLink-p",children:"If your upload is set to private, you can allow select people to listen to your music by creating and sending them a promotional link."}),(0,a.jsx)("p",{className:"CreatePromotionalLink-p",children:"You can also use promotional link to track plays and views across different marketing channels or see which recipients (i.e. blogs, labels) have listened to your music. Read more here."}),(0,a.jsxs)("form",{className:"CreatePromotionalLink-form",onSubmit:m,children:[(0,a.jsx)(l.F,{label:"Promotional Link",labelRequiredSign:"*",inputProps:{type:"text",name:"promo_link",placeholder:"Enter a keyword and we will create a promotional link below",required:!0,onChange:p},errorMsg:g}),(0,a.jsx)("button",{type:"submit",className:"CreatePromotionalLink-form-btn",children:"Generate Link"})]}),Array.isArray(y)&&!!y.length&&(0,a.jsx)("div",{className:"CreatePromotionalLink-table-container",children:(0,a.jsxs)("table",{className:"CreatePromotionalLink-table",children:[(0,a.jsx)("thead",{className:"CreatePromotionalLink-table-head",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"Name"}),(0,a.jsx)("th",{children:"Link"}),(0,a.jsx)("th",{children:"Plays"}),(0,a.jsx)("th",{children:"Views"}),(0,a.jsx)("th",{children:"Action"})]})}),(0,a.jsx)("tbody",{className:"CreatePromotionalLink-table-body",children:y.map(e=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"CreatePromotionalLink-table-key",children:e.key}),(0,a.jsx)("td",{className:"CreatePromotionalLink-table-link",children:(0,a.jsx)(i.default,{href:`${s}?key=${e.key}`,children:`${s}?key=${e.key}`})}),(0,a.jsx)("td",{children:e.plays}),(0,a.jsx)("td",{children:e.views}),(0,a.jsx)("td",{children:(0,a.jsx)("button",{className:"CreatePromotionalLink-table-btn",onClick:()=>h(e.key),children:"Delete"})})]},e.key))})]})}),Array.isArray(y)&&!y.length&&(0,a.jsxs)("div",{className:"CreatePromotionalLink-empty",children:[(0,a.jsx)(d.I,{name:"amMark",width:50}),(0,a.jsx)("p",{children:"No promotional links created yet"})]})]})})}},41240:(e,t,s)=>{"use strict";s.d(t,{FlexibleStateProvider:()=>l,P:()=>i});
1var a=s(54631),r=s(38959);let n=(0,r.createContext)({}),l=e=>{let{children:t}=e,[s,l]=(0,r.useState)({});return(0,a.jsx)(n.Provider,{value:{flexible:s,setFlexible:l},children:t})},i=()=>(0,r.useContext)(n)},53358:(e,t,s)=>{"use strict";s.d(t,{W:()=>r});var a=s(38959);function r(e,t){let s=(0,a.useRef)(t),r=(0,a.useRef)(null);(0,a.useEffect)(()=>{s.current=t},[t]),(0,a.useEffect)(()=>{let t=t=>{!e.current||e.current.contains(t.target)||(r.current&&(clearTimeout(r.current),r.current=null),r.current=setTimeout(()=>{t instanceof MouseEvent?s.current(t):console.warn("TouchEvent handling is not implemented in the provided handler")},0),t.stopPropagation())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t),r.current&&(clearTimeout(r.current),r.current=null)}},[e])}},55329:(e,t,s)=>{"use strict";s.d(t,{F:()=>o});var a=s(54631),r=s(38959),n=s(66092),l=s(31224),i=s(80562);s(72944);let o=e=>{let{label:t,errorMsg:s,inputProps:o,labelRequiredSign:c,clearable:d}=e,{className:u="",type:m,onChange:h,value:p,defaultValue:g,ref:y,...x}=o,[v,j]=(0,r.useState)(m),f=(0,r.useRef)(null),b=(0,r.useCallback)(e=>{f.current=e,"function"==typeof y?y(e):y&&(y.current=e)},[y]),k=!!(d&&void 0!==p&&String(p).length>0),N="password"===m,C=`InputField-input ${u}`.trim(),w={...x,ref:b,className:C,type:v,onChange:h,...void 0!==p?{value:p}:void 0!==g?{defaultValue:g}:{}},S=k?(0,a.jsx)(n.$,{_type:{type:"IconButton",_size:"small",_variant:"plain"},type:"button","aria-label":"Clear",onClick:e=>{e.preventDefault();let t={value:""};h?.({target:t,currentTarget:t}),f.current?.focus()},className:"InputField-clearBtn",children:(0,a.jsx)(l.I,{name:"close",size:16,color:"var(--color-gray-30)"})}):null;return(0,a.jsxs)(i.L,{label:t,labelRequiredSign:c,errorMsg:s,children:[!N&&!d&&(0,a.jsx)("input",{autoComplete:v,...w}),!N&&d&&(0,a.jsxs)("div",{className:"InputField-inputContainer",children:[(0,a.jsx)("input",{autoComplete:v,...w}),S]}),N&&(0,a.jsxs)("div",{className:"InputField-inputContainer",children:[(0,a.jsx)("input",{autoComplete:"new-password",...w}),S,(0,a.jsx)(n.$,{_type:{type:"IconButton",_size:"small",_variant:"plain"},type:"button","aria-label":"show password",onClick:()=>j(e=>"password"===e?"text":"password"),className:`InputField-changeTypeBtn ${"password"===v?"":"show"}`,children:(0,a.jsx)(l.I,{name:"eye",width:24,color:"var(--color-gray-25)"})})]})]})}},59189:(e,t,s)=>{"use strict";s.d(t,{N:()=>n});var a=s(87768),r=s(90420);let n=()=>{let e=e=>{let t=e.replace(/\/+$/,"")||"/";for(let e of r.A.locales){if(t===`/${e}`){t="/";break}if(t.startsWith(`/${e}/`)){t=t.replace(`/${e}`,"");break}}return t},t=e((0,a.usePathname)());return{isChildActive:s=>s?.some(s=>t===e(s.href)),isActiveParent:s=>{let a=e(s.href);return t===a||t.startsWith(`${a}/`)},normalizePath:e,cleanPath:t}}},72944:()=>{},75697:()=>{},76478:(e,t,s)=>{"use strict";s.d(t,{x:()=>n});var a=s(75835),r=s(18831);function n(e,t){let s=(0,r.a)(e,t?.in);if(isNaN(+s))throw RangeError("Invalid time value");let n=t?.format??"extended",l=t?.representation??"complete",i="",o="",c="extended"===n?"-":"";if("time"!==l){let e=(0,a.F)(s.getDate(),2),t=(0,a.F)(s.getMonth()+1,2),r=(0,a.F)(s.getFullYear(),4);i=`${r}${c}${t}${c}${e}`}if("date"!==l){let e=s.getTimezoneOffset();if(0!==e){let t=Math.abs(e),s=(0,a.F)(Math.trunc(t/60),2),r=(0,a.F)(t%60,2);o=`${e<0?"+":"-"}${s}:${r}`}else o="Z";let t=(0,a.F)(s.getHours(),2),r=(0,a.F)(s.getMinutes(),2),l=(0,a.F)(s.getSeconds(),2),c=""===i?"":"T",d=[t,r,l].join("extended"===n?":":"");i=`${i}${c}${d}${o}`}return i}},78213:()=>{},80562:(e,t,s)=>{"use strict";s.d(t,{L:()=>r});var a=s(54631);s(38959),s(75697);let r=e=>{let{children:t,className:s="",label:r,errorMsg:n,labelRequiredSign:l}=e;return(0,a.jsxs)("div",{className:`InputWrap ${s}`,children:[r&&(0,a.jsxs)("label",{className:"InputWrap-label",children:[r," ",l&&(0,a.jsx)("span",{className:"InputWrap-labelRequiredSign",children:l})]}),t,n&&(0,a.jsx)("p",{className:"InputWrap-errorMsg",children:n})]})}},89935:(e,t,s)=>{"use strict";s.d(t,{Q:()=>p});
1var a=s(54631),r=s(38959),n=s(30579),l=s(31224),i=s(26815),o=s(37901),c=s(27971),d=s(59120),u=s(66984),m=s(4774),h=s(58573);s(11350);let p=e=>{let{labelOnly:t,music:s,className:p="",setAdminModal:g,iconOnly:y,isOutlined:x}=e,{user:v}=(0,n.u)(),[j,f]=r.useState(!1),b=(0,r.useRef)(null),k=m.b.useSlide();return v?.is_admin?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:`AdminButton ${p}`,onClick:()=>{f(!0),g?.(!0)},children:[!t&&(0,a.jsx)(l.I,{name:"artistAdminIcon",size:x?14:24,color:"var(--color-white)"}),!y&&(0,a.jsx)("span",{className:t?"AdminButton-text":"MusicActions-text",children:t?"Admin Controls":"Admin"})]}),(0,a.jsx)(i.a,{in:!!j,onClose:()=>{f(!1),g?.(!1)},ref:b,size:"xlg",children:(0,a.jsx)(o.N,{mode:"sync",children:(0,a.jsx)(c.F,{features:d.l,children:(0,a.jsx)(u.Uu,{...k({y:40}),children:(0,a.jsx)(h.X,{musicItem:s})},"Admin_controls_modal")})})})]}):null}},95038:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var a=s(54631),r=s(38959),n=s(1822),l=s(4014),i=s(71112),o=s(42803),c=s(53358);let d=e=>
1{let{targetRef:t,children:s,placement:d="auto",action:u="click",className:m="",blockClosePopover:h=!1,zIndex:p=1e3}=e,[g,y]=(0,r.useState)(!1),x=(0,r.useRef)(),{refs:v,x:j,y:f,strategy:b}=(0,l.we)({open:g,onOpenChange:y,strategy:"fixed",placement:"auto"===d?"bottom":d,middleware:[(0,i.cY)(10),"auto"===d?(0,i.RK)({allowedPlacements:["top","bottom","right","left"]}):(0,i.UU)({fallbackPlacements:["bottom","right","left","top"]}),(0,i.BN)({padding:8})],whileElementsMounted:o.ll});return((0,r.useEffect)(()=>{t?.current&&v.setReference(t.current)},[t,v]),(0,c.W)({current:v.floating.current},()=>{h||y(!1)}),(0,r.useEffect)(()=>{let e=t?.current;if(!e)return;let s=()=>y(e=>!e),a=()=>{x.current&&clearTimeout(x.current),x.current=void 0,y(!0)},r=()=>{x.current=setTimeout(()=>y(!1),300)};return"click"===u?e.addEventListener("click",s):(e.addEventListener("mouseover",a),e.addEventListener("mouseleave",r)),()=>{"click"===u?e.removeEventListener("click",s):(e.removeEventListener("mouseover",a),e.removeEventListener("mouseleave",r)),x.current&&clearTimeout(x.current)}},[u,t]),g)?(0,n.createPortal)((0,a.jsx)("div",{ref:v.setFloating,style:{position:b,top:f??0,left:j??0,zIndex:p},onMouseOver:()=>"hover"===u&&void(x.current&&clearTimeout(x.current),x.current=void 0,y(!0)),onMouseLeave:()=>"hover"===u&&void(x.current=setTimeout(()=>y(!1),300)),className:`Popover ${m}`,role:"hover"===u?"tooltip":"dialog","aria-hidden":!g,"data-placement":d,children:s}),document.body):null}},96732:(e,t,s)=>{"use strict";s.d(t,{MusicActions:()=>eo});var a=s(54631),r=s(38959),n=s(31224),l=s(49013),i=s(69494);let o=e=>{let{data:t,labelOnly:s,onModalOpenCallback:r,isOutlined:n}=e;if("song"!==t.type)return null;let l={...t,id:t?.id??t?.song_id??t?.parent?.id};return(0,a.jsx)(i.yZ,{labelOnly:s,noLabel:s,music:l,modalStateCallback:r,className:"MusicActions-btn playlist",isOutlined:n})};var c=s(26815),d=s(27971),u=s(59120),m=s(37901),h=s(66984),p=s(25414),g=s(4774),y=s(95038),x=s(49244),v=s(64885),j=s(30579);let f=e=>{let{data:t,onEmbedModalShow:s,onModalOpenCallback:r,type:n,hideButtons:i}=e,c=(0,l.y)(t),{user:d}=(0,j.u)(),{queueController:u,shuffleQueueAlbum:m,setSimilarSongsToQueue:h}=(0,x.K)();return console.log("%c - -","color: lime; font-size: 20px;",c.inFavorites,c.user,t),(0,a.jsxs)("div",{className:"MoreActionsList",children:["full"===n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:c.manageLike,children:c.inFavorites?"Unlike":"Like"}),"song"===t.type&&(0,a.jsx)(o,{data:t,labelOnly:!0,onModalOpenCallback:r}),"playlist"!==t.type&&(0,a.jsx)("button",{disabled:!(0,v.j)({user:c.user,music:t}),className:"MoreActionsList-popover-item",onClick:c.manageReUp,children:c.inReups?"Remove Re-Up":"Re-Up"})]}),!i?.includes("embed")&&(0,a.jsx)("button",{className:"MoreActionsList-popover-item",disabled:t?.isSponsored,"aria-label":"Embed this song in your website",onClick:()=>{c.handleSendAnalyticsAction({shareMethod:"Embed",event:"share"}),s()},children:"Embed"}),(0,a.jsxs)("button",{className:`MoreActionsList-popover-item ${c?.inHighlights?"highlighted":""}`,onClick:c?.manageHighlight,children:[c?.inHighlights?"Remove ":"","Highlight"]}),"album"===t.type&&(0,a.jsxs)("button",{className:"MoreActionsList-popover-item",onClick:()=>m?.(t),children:["Shuffle ",t.type]}),"playlist"===t.type&&(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>m?.(t),children:"Shuffle Playlist"}),d&&("playlist"===t.type||"album"===t.type)&&(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>h?.(t),children:"Similar Songs"}),(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>u?.("next",t),children:"Queue Next"}),(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>u?.("last",t),children:"Queue Last"}),(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:c?.copyURL,children:"Copy Music URL"})]})};var b=s(20088);let k=e=>{let{data:t,type:s,hideButtons:l,moreBtnWithLabel:i,popupPosition:o="top",isOutlined:x=!1,isCharts:v}=e,j=(0,b.U)("md","greaterThan"),[k,N]=(0,r.useState)(!1),C=(0,r.useCallback)(()=>N(!1),[]),w=(0,r.useRef)(null),S=(0,r.useRef)(null),L=g.b.useSlide(),[A,M]=(0,r.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:`MusicActions-btn ${j&&v?"mobileBtn vertical":""}
1`,ref:S,children:[(0,a.jsx)(n.I,{name:"more",size:x&&!v?16:21}),i&&(0,a.jsx)("span",{className:"MusicActions-text",children:"More"})]}),(0,a.jsx)(y.A,{placement:o,targetRef:S,action:"click",blockClosePopover:A,className:"MusicActions-popover",children:(0,a.jsx)(f,{type:s,data:t,onEmbedModalShow:()=>N(!0),onModalOpenCallback:function(e){M(e)},hideButtons:l})}),(0,a.jsx)(c.a,{in:k,fluid:!0,onClose:C,maxHeight:!0,ref:w,size:"xlg",children:(0,a.jsx)(d.F,{features:u.l,children:(0,a.jsx)(m.N,{mode:"sync",children:(0,a.jsx)(h.Uu,{...L({y:40}),children:(0,a.jsx)(p.f,{music:t})},"embed-modal")})})})]})};var N=s(92301),C=s(3130),w=s(98242);let S=e=>{let{url:t,urlSlug:s,title:n,className:l=""}=e,i=s.replace(/[^a-zA-Z0-9-_]/g,"-"),o=`linktree-button-${i}`,c=(0,w.Ay)("https://assets.production.linktr.ee/sdk/js/AddThisButton.js",{removeOnUnmount:!0});return(0,r.useEffect)(()=>{"ready"===c&&window?.linktree?.AddThisButton?.render({style:{size:"small",color:"white",shape:"rectangle"},link:{url:t,title:n,utm_channel:"audiomack"}},`#${CSS.escape(o)}`)},[c,t,o,n]),(0,a.jsx)("div",{className:`AddToLinkTree ${l}`,id:o})};var L=s(31243),A=s(41230),M=s(41240),T=s(87768),$=s(46329),_=s(91693);let P=e=>{let{data:t,moreBtnWithLabel:s,popupPosition:l="top",isCharts:i}=e,{user:o}=(0,j.u)(),c=(0,b.U)("md","greaterThan"),d=(0,r.useRef)(null),[u,m]=(0,r.useState)(!1),[h,p]=(0,r.useState)(!1),{flexible:g}=(0,M.P)(),x=(0,T.useRouter)(),v="object"==typeof t?.artist?t?.artist?.url_slug:t?.uploader?.url_slug,f=v===o?.url_slug;if(!o||!o?.is_admin&&!f)return null;let k=`/${v}/${t.type}/${t.url_slug}`,w=String("https://audiomack.com").replace(/\/$/,"")+k,P="playlist"!==t.type?(0,C.fd)(`/edit/${t.type}/${t.id}`):`${(0,$.HK)(t)}/edit`;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:`MusicActions-btn ${c&&i?"mobileBtn vertical":""}`,ref:d,children:[(0,a.jsx)(n.I,{name:"cog",size:c&&i?23:14}),s&&(0,a.jsx)("span",{className:"MusicActions-text",children:"Settings"})]}),(0,a.jsx)(y.A,{placement:l,targetRef:d,action:"click",className:"MusicActions-popover",children:(0,a.jsxs)("div",{className:"MoreActionsList",children:[t?.type!=="playlist"&&(0,a.jsxs)(N.default,{className:"MoreActionsList-popover-item",href:(0,C.fd)(`/stats/music/${t.id}`),target:"_blank",onClick:()=>_.Ay.trackToApi({event:"creator_app_open",button:"Settings - Stats"}),children:[(0,a.jsx)("span",{children:"Advanced Stats"}),(0,a.jsx)(n.I,{name:"externalLink",size:12})]}),(0,a.jsxs)(N.default,{href:P,..."playlist"!==t.type?{target:"_blank"}:{},className:"MoreActionsList-popover-item",onClick:()=>_.Ay.trackToApi({event:"creator_app_open",button:"Settings - Edit Music"}),children:[(0,a.jsxs)("span",{children:["Edit / Delete ",t.type]}),"playlist"!==t.type&&(0,a.jsx)(n.I,{name:"externalLink",size:12})]}),(0,a.jsx)(S,{url:w,title:t.title,urlSlug:t.url_slug,className:"MoreActionsList-popover-item"}),(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>m(!0),children:"yes"===t.private?"Make Public":"Make Private"}),(0,a.jsx)("button",{className:"MoreActionsList-popover-item",onClick:()=>p(!0),children:"Create Promotional Link"})]})}),(0,a.jsx)(L.E,{show:u,callback:function(){if(!g||!g.updatePrivate)return void x.refresh();g.updatePrivate({targetId:t.id,value:"no"===t.private?"yes":"no"})},closeModal:()=>m(!1),data:t}),h&&(0,a.jsx)(A.z,{data:t,link:w,onClose:function(){p(!1)}})]})};var E=s(66092),F=s(97765);let I=e=>{let{data:t}=e,{playing:s,onPlay:r}=(0,F.b)({musicItem:t});return(0,a.jsxs)(E.$,{onClick:r,_type:{type:"IconButton"},className:"MusicActions-btn",children:[(0,a.jsx)(n.I,{name:s?"pause":"play",className:`${s?"active":""}`,size:21}),(0,a.jsx)("span",{className:"MusicActions-text",children:"Play"})]})};var z=s(70970),K=s(10914),R=s(75639),D=s(50267),O=s(25925),U=s(55329);s(78213);let B=e=>{let{isChecked:t,onChange:s,isDisabled:r=!1,label:n,className:l="",size:i="sm"}=e;return(0,a.jsxs)("label",{className:`TagCheckbox ${l} ${"sm"===i?"TagCheckbox--sm":""} ${r?"TagCheckbox--disabled":""}`,children:[(0,a.jsxs)("div",{className:"TagCheckbox-box",children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:s,disabled:r,className:"TagCheckbox-input"}),(0,a.jsx)("span",{className:"TagCheckbox-checkmark"})]}),(0,a.jsx)("span",{className:"TagCheckbox-label",children:n})]})};var G=s(26678);let W=e=>{let{playlistData:t}=e,[s,n]=(0,r.useState)({}),[l,i]=(0,r.useState)(""),[o,c]=(0,r.useState)(!0),[d,u]=(0,r.useState)(new Set),m=(0,G.useToast)();(0,r.useEffect)(()=>{(async()=>{c(!0);try{let e=await (0,O.uG)(t.id);n(e||{})}catch(e){console.error("Error fetching playlist tags:",e),n({})}finally{c(!1)}})()},[t.id]);let h=(0,r.useMemo)(()=>{let e=Object.keys(s);return l?e.filter(e=>e.toLowerCase().includes(l.toLowerCase())):e},[s,l]),p=async(e,a)=>{if(d.has(e))return;u(t=>new Set(t).add(e));let r={...s,[e]:a};n(r);try{let s=Object.entries(r).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t});await (0,O.Zz)({playlistId:t.id,tags:s}),m.info(`Category tag "${e}" ${a?"added":"removed"} successfully`,{autoClose:5e3,variant:"small"})}
1catch(t){console.error(`Error ${a?"adding":"removing"} category tag:`,t),n(t=>({...t,[e]:!a})),m.error(`Failed to ${a?"add":"remove"} category tag "${e}"`,{autoClose:1e4,variant:"small"})}finally{u(t=>{let s=new Set(t);return s.delete(e),s})}};return o?(0,a.jsx)("div",{className:"CategoryTags-loading",children:"Loading category tags..."}):(0,a.jsxs)("div",{className:"CategoryTags",children:[(0,a.jsx)("div",{className:"CategoryTags-search",children:(0,a.jsx)(U.F,{label:"",inputProps:{type:"text",name:"search",placeholder:"Search in Category Tags",required:!0,onChange:e=>i(e.target.value)}})}),Object.values(s).some(Boolean)&&(0,a.jsxs)("div",{className:"CategoryTags-current",children:[(0,a.jsx)("div",{className:"CategoryTags-currentLabel",children:"Current Tags:"}),(0,a.jsx)("div",{className:"CategoryTags-currentTags",children:Object.entries(s).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return(0,a.jsxs)("span",{className:"CategoryTags-currentTag",children:["#",t]},t)})})]}),(0,a.jsx)("div",{className:"CategoryTags-list",children:h.map(e=>(0,a.jsx)(B,{isChecked:s[e]||!1,onChange:t=>p(e,t.target.checked),isDisabled:d.has(e),label:e,className:"CategoryTags-item",size:"sm"},e))})]})};var q=s(18808);let H=e=>{let{playlistData:t,musicData:s,musicType:n="playlist"}=e,[l,i]=(0,r.useState)([]),[o,c]=(0,r.useState)(!0),d="playlist"===n?t:s,[u,m]=(0,r.useState)(d?.usertags||""),[h,p]=(0,r.useState)(new Set),[g,y]=(0,r.useState)([]),x=(0,G.useToast)(),v=(0,r.useMemo)(()=>({...d,usertags:u||"",tagdisplay:u||""}),[d,u]);(0,r.useEffect)(()=>{(async()=>{c(!0);try{let e=await (0,O.TI)();e&&(i(e),y(e))}catch(e){console.error("Error fetching music tags:",e)}finally{c(!1)}})()},[]),(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{d?.usertags!==void 0&&m(d.usertags)},[d?.usertags]);let j=(0,r.useMemo)(()=>g.length>
10?g:l,[l,g]),f=async(e,t,s)=>{if(h.has(e))return;p(t=>new Set(t).add(e));let a=u?u.split(",").filter(e=>e.trim()):[];m((t?a.includes(e)?a:[...a,e]:a.filter(t=>t.trim().normalize("NFKD")!==e.normalize("NFKD")&&(!s||t.trim().normalize("NFKD")!==s.normalize("NFKD")))).filter(e=>e.trim()).join(","));try{await (0,O.Sp)({type:"playlist"===n?"playlist":"music",id:d.id,tags:[e],action:t?"add":"remove"}),x.info(`Music tag "${s||e}" ${t?"added":"removed"} successfully`,{autoClose:5e3,variant:"small"})}catch{m(u),x.error(`Failed to ${t?"add":"remove"} music tag "${s||e}"`,{autoClose:1e4,variant:"small"})}finally{p(t=>{let s=new Set(t);return s.delete(e),s})}};return o||!l?.length?(0,a.jsx)("div",{className:"TagsControl-loading",children:"Loading tags..."}):(0,a.jsxs)("div",{className:"TagsControl",children:[(0,a.jsx)("div",{className:"TagsControl-search",children:(0,a.jsx)(U.F,{label:"",inputProps:{type:"text",name:"search",placeholder:"Search in Tags",required:!0,onChange:e=>{let t=e.target.value.toLowerCase().normalize("NFKD");if(!t)return void y(l);let s=[];l?.forEach(e=>{let a=e?.display?.toLowerCase().normalize("NFKD");a?.includes(t)&&s.push(e)}),y(s)}}})}),(0,a.jsxs)("div",{className:"TagsControl-current",children:[(0,a.jsx)("div",{className:"TagsControl-currentLabel",children:"Current Tags:"}),(0,a.jsx)("div",{className:"TagsControl-currentTags",children:(0,a.jsx)(q.A,{item:v,disabled:!0})})]}),(0,a.jsx)("div",{className:"TagsControl-list",children:j?.map(e=>(0,a.jsx)(B,{isChecked:(()=>
1{if(!u)return!1;let t=u.split(",").map(e=>e.trim().normalize("NFKD")),s=e?.tag?.normalize("NFKD"),a=e?.display?.normalize("NFKD");return t.some(e=>e===a||e===s)})(),onChange:t=>f(e?.tag,t.target.checked,e?.display),isDisabled:h.has(e?.tag),label:e?.display,className:"TagsControl-item",size:"sm"},`${e?.addedon}${e.display}`))})]})},Y=e=>{let{playlistData:t}=e,[s,n]=(0,r.useState)([]),[l,i]=(0,r.useState)([]),[o,c]=(0,r.useState)(!0),[d,u]=(0,r.useState)(!1),m=(0,G.useToast)();(0,r.useEffect)(()=>{(async()=>{c(!0);try{let e=await (0,O.ze)(t.type);n(e||[])}catch(e){console.error("Error fetching search keywords:",e),n([])}finally{c(!1)}})()},[t.type]);let h=t.id.toString(),p=(0,r.useMemo)(()=>s?.find(e=>e.id.toString()===h)?.keywords||"",[s,h]);(0,r.useEffect)(()=>{p&&i(p.split(",").filter(Boolean))},[p]);let g=async(e,s,a)=>{if(!d){u(!0);try{let r=e.join(",");await (0,O.Ss)({type:t.type,id:t.id,term:r,value:r}),"add"===s&&a?m.info(`Keyword "${a}" added successfully`,{autoClose:5e3,variant:"small"}):"remove"===s&&a&&m.info(`Keyword "${a}" removed successfully`,{autoClose:5e3,variant:"small"})}catch(e){console.error("Error updating search keywords:",e),a&&m.error(`Failed to ${s} keyword "${a}"`,{autoClose:1e4,variant:"small"})}finally{u(!1)}}};return o?(0,a.jsx)("div",{className:"SearchKeywords-loading",children:"Loading search keywords..."}):(0,a.jsxs)("div",{className:"SearchKeywords",children:[(0,a.jsx)("div",{className:"SearchKeywords-description",children:(0,a.jsxs)("p",{children:["Update keyword(s) on a ",t.type??"playlist"," object."]})}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=e.target.elements.namedItem("keyword"),s=t.value.trim();if(s&&!l.includes(s)){let e=[...l,s];i(e),t.value="",g(e,"add",s)}},className:"SearchKeywords-form",children:[(0,a.jsxs)("div",{className:"SearchKeywords-inputGroup",children:[(0,a.jsx)("label",{htmlFor:"keyword",className:"SearchKeywords-label",children:"Keyword"}),(0,a.jsx)(U.F,{label:"",inputProps:{type:"text",name:"keyword",placeholder:"Enter keyword",required:!0}})]}),(0,a.jsx)("div",{className:"SearchKeywords-submitGroup",children:(0,a.jsx)(E.$,{type:"submit",disabled:d,_type:{type:"Button",_variant:"filledLight",_size:"medium"},children:d?"Adding...":"Add Keyword"})})]}),l&&l.length>0&&(0,a.jsxs)("div",{className:"SearchKeywords-current",children:[(0,a.jsx)("div",{className:"SearchKeywords-currentLabel",children:"Current Keywords:"}),(0,a.jsx)("div",{className:"SearchKeywords-currentTags",children:l.map(e=>(0,a.jsxs)("div",{className:"SearchKeywords-tag",children:[(0,a.jsx)("span",{className:"SearchKeywords-tagText",children:e}),(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=l.filter(t=>t!==e);i(t),g(t,"remove",e)})(e),className:"SearchKeywords-tagRemove",disabled:d,children:"\xd7"})]},e))})]})]})};var Q=s(6993),Z=s(40983);async function V(e){let{musicId:t,genre:s,trend:a}=e;try{await (0,Z.H2)({endpoint:"trending/set",fetchOptions:{method:"POST"},bodyParams:{id:t,trending:a?"yes":"no",genre:s},noResponse:!0})}catch(e){throw(0,Z._Y)("trending/set",e,{musicId:t,genre:s,trend:a}),e}}let X=e=>{let{musicData:t}=e,[s,n]=(0,r.useState)(""),[l,i]=(0,r.useState)(new Set),o=(0,G.useToast)(),c=(0,r.useMemo)(()=>t.featured_genres?Object.entries(t.featured_genres).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t}):t.genre?[t.genre]:[],[t.featured_genres,t.genre]),[d,u]=(0,r.useState)(c),m=(0,r.useMemo)(()=>[{key:"global",title:"Global"},...Object.entries(Q._v).filter(e=>{let[t]=e;return""!==t}).map(e=>{let[t,s]=e;return{key:t,title:s}})],[]),h=(0,r.useMemo)(()=>s?m.filter(e=>e.title.toLowerCase().includes(s.toLowerCase())):m,[m,s]),p=async(e,s)=>
1{if(!l.has(e)){i(t=>new Set(t).add(e)),u(s?[...d,e]:d.filter(t=>t!==e));try{await V({musicId:Number(t.id),genre:e,trend:s});let a="global"===e?"Global":Q._v[e];o.info(`${a} trending ${s?"enabled":"disabled"} successfully`,{autoClose:5e3,variant:"small"})}catch{u(d);let t="global"===e?"Global":Q._v[e];o.error(`Failed to ${s?"enable":"disable"} ${t} trending`,{autoClose:1e4,variant:"small"})}finally{i(t=>{let s=new Set(t);return s.delete(e),s})}}};return(0,a.jsxs)("div",{className:"TrendingGenres",children:[(0,a.jsx)("div",{className:"TrendingGenres-search",children:(0,a.jsx)(U.F,{label:"",inputProps:{type:"text",name:"search",placeholder:"Search Trending Genres",required:!0,onChange:e=>n(e.target.value)}})}),d.length>0&&(0,a.jsxs)("div",{className:"TrendingGenres-current",children:[(0,a.jsx)("div",{className:"TrendingGenres-currentLabel",children:"Selected Genres:"}),(0,a.jsx)("div",{className:"TrendingGenres-currentTags",children:d.map(e=>{let t="global"===e?"Global":Q._v[e];return(0,a.jsxs)("span",{className:"TrendingGenres-currentTag",children:["#",t]},e)})})]}),(0,a.jsx)("div",{className:"TrendingGenres-list",children:h.map(e=>(0,a.jsx)(B,{isChecked:d.includes(e.key),onChange:t=>p(e.key,t.target.checked),isDisabled:l.has(e.key),label:e.title,className:"TrendingGenres-item",size:"sm"},e.key))})]})};s(18041);let J=e=>{let{show:t,onClose:s,initialData:n,musicType:l="playlist"}=e,[i,o]=(0,r.useState)("tags-control"),[c,d]=(0,r.useState)(n),[u,m]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{!1!==t&&(async()=>{m(!0);try{if("playlist"===l){let e=await (0,R.lS)({artist:n.artist.url_slug,playlist:n.url_slug});e?.results?d(e.results):d(n)}else{let e;"song"===n.type?e=await (0,D.I4)({artist:n.uploader.url_slug,song:n.url_slug}):"album"===n.type&&(e=await (0,D.ce)({artist_slug:n.uploader.url_slug,album_slug:n.url_slug,requestAction:"tag_modal_fetch_fresh_data"})),e?.results?d(e.results):d(n)}}catch(e){console.debug("Failed to fetch fresh data:",e),d(n)}finally{m(!1)}})()},[t,n,l]),t)?(0,a.jsx)(z.A,{show:t,onClose:s,className:"TagModal",children:(0,a.jsx)("div",{className:"TagModal-content",children:u?(0,a.jsx)("div",{className:"TagModal-loading",children:"Loading admin tags..."}):(0,a.jsxs)(K.tU,{defaultTab:"tags-control",selectedKey:i,onChangeTab:o,centered:!0,children:[(0,a.jsx)(K.tU.Tab,{dataKey:"tags-control",title:"Tags Control",children:(0,a.jsx)(H,{playlistData:"playlist"===l?c:void 0,musicData:"playlist"!==l?c:void 0,musicType:l})}),"playlist"!==l&&(0,a.jsx)(K.tU.Tab,{dataKey:"trending-genres",title:"Trending Genres",children:(0,a.jsx)(X,{musicData:c})}),"playlist"===l&&(0,a.jsx)(K.tU.Tab,{dataKey:"category-tags",title:"Category Tags",children:(0,a.jsx)(W,{playlistData:c})}),"playlist"===l&&(0,a.jsx)(K.tU.Tab,{dataKey:"search-keywords",title:"Search Keywords",children:(0,a.jsx)(Y,{playlistData:c})})]})})}):null},ee=e=>{let{data:t,className:s="",musicType:l="playlist",isOutlined:i}=e,[o,c]=(0,r.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:s,onClick:()=>{c(!0)},children:[(0,a.jsx)(n.I,{name:"tag",size:i?12:21}),(0,a.jsx)("span",{className:"MusicActions-text",children:"Tag"})]}),(0,a.jsx)(J,{show:o,onClose:()=>{c(!1)},initialData:t,musicType:l})]})};var et=s(29641),es=s.n(et),ea=s(89935),er=s(12134);let en=e=>{let{data:t,type:s}=e,i=(0,r.useRef)(null),o=(0,l.y)(t),{twitterLink:c,facebookLink:d}=ei(t,o);return"list-item"===s?(0,a.jsx)(el,{data:t,actions:o}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:"MusicActions-btn share",ref:i,children:[(0,a.jsx)(n.I,{className:`${o?.inReups?"active":""}`,name:"share",size:11}),(0,a.jsx)("span",{className:"MusicActions-text",children:"Share"})]}),(0,a.jsx)(y.A,{targetRef:i,placement:"top",action:"click",children:(0,a.jsxs)("div",{className:"MusicActions-btn-popover",children:[(0,a.jsxs)(N.default,{onClick:()=>{o.handleSendAnalyticsAction({event:"share",shareMethod:"Twitter"}),o.handleSendAnalyticsAction({event:"share",shareMethod:"Copy Link"})},target:"_blank",href:c||"",className:"MusicActions-btn-popover-item",children:[(0,a.jsx)("span",{children:"Share On X"}),(0,a.jsx)(n.I,{name:"externalLink",size:12})]}),(0,a.jsxs)(N.default,{target:"_blank",href:d||"",onClick:()=>{o.handleSendAnalyticsAction({event:"share",shareMethod:"Facebook"}),o.handleSendAnalyticsAction({event:"share",shareMethod:"Copy Link"})},className:"MusicActions-btn-popover-item",children:[(0,a.jsx)("span",{children:"Share On Facebook"}),(0,a.jsx)(n.I,{name:"externalLink",size:12})]})]})})]})},el=e=>{let{data:t,actions:s}=e,l=(0,r.useRef)(null),{twitterLink:i,facebookLink:o}=ei(t,s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"MoreActionsList-popover-item",ref:l,children:"Share"}),(0,a.jsxs)(er.A,{className:"MoreActionsList-dropdown",ref:l,children:[(0,a.jsxs)(N.default,{onClick:()=>{s.handleSendAnalyticsAction({event:"share",shareMethod:"Twitter"}),s.handleSendAnalyticsAction({event:"share",shareMethod:"Copy Link"})},target:"_blank",href:i||"",className:"MoreActionsList-dropdown-item",children:[(0,a.jsx)("span",{children:"Share On X"}),(0,a.jsx)(n.I,{name:"externalLink",size:12})]}),(0,a.jsxs)(N.default,{target:"_blank",href:o||"",onClick:()=>{s.handleSendAnalyticsAction({event:"share",shareMethod:"Facebook"}),s.handleSendAnalyticsAction({event:"share",shareMethod:"Copy Link"})},className:"MoreActionsList-dropdown-item",children:[(0,a.jsx)("span",{children:"Share On Facebook"}),(0,a.jsx)(n.I,{name:"externalLink",size:12})]})]})]})};function ei(e,t){let s="playlist"===e.type?"artist":"uploader";return{twitterLink:t?.generateShareLink({link:window.location.origin+`/${e[s]?.url_slug}/${e?.type}/${e?.url_slug}`,artist:e[s]?.url_slug||"",title:e?.title||"",social:"twitter",image:e?.image||"",uploader:e?.uploader?.name||""}),facebookLink:t?.generateShareLink({link:window.location.origin+`/${e[s]?.url_slug}/${e?.type}/${e?.url_slug}`,artist:e[s]?.name||"",title:e?.title||"",social:"facebook",image:e?.image||"",uploader:e?.uploader?.name||""})}}let eo=e=>{let{data:t,renderType:s,className:r="",moreBtnWithLabel:i,popupPosition:c="top",showPlayButton:d,showSettings:u,hideButtons:m,hideGeoRestricted:h,showAdminSettings:p,isCharts:g}=e,{user:y}=(0,j.u)(),x=(0,l.y)(t);
1if(!h||y?.is_admin)return(0,a.jsxs)("div",{className:es()("MusicActions",y?.is_admin&&g?"isAdminPadding":"",r),children:["with_icons"===s&&(0,a.jsxs)(a.Fragment,{children:[d&&(0,a.jsx)(I,{data:t}),(0,a.jsxs)("button",{className:"MusicActions-btn like",onClick:x.manageLike,children:[(0,a.jsx)(n.I,{name:"like",className:`${x?.inFavorites?"active":""}`,height:13,width:14}),(0,a.jsx)("span",{className:"MusicActions-text",children:"Like"})]}),"song"===t.type&&(0,a.jsx)(o,{data:t,labelOnly:!1,isOutlined:!0}),(0,a.jsx)(en,{type:"btn",data:t}),"playlist"!==t.type&&(0,a.jsxs)("button",{disabled:!(0,v.j)({user:x.user,music:t}),onClick:x?.manageReUp,className:"MusicActions-btn",children:[(0,a.jsx)(n.I,{className:`${x?.inReups?"active":""}`,name:"reup",height:12,width:11}),(0,a.jsx)("span",{className:"MusicActions-text",children:"Re-Up"})]}),t.type&&y?.is_admin&&(0,a.jsx)(ee,{data:(t.type,t),className:"MusicActions-btn",musicType:t.type,isOutlined:!0})]}),(0,a.jsx)(k,{popupPosition:c,moreBtnWithLabel:!1,type:"with_icons"===s?"short":"full",data:t,hideButtons:m,isOutlined:!0,isCharts:g}),u&&function(e,t){return!!t?.is_admin||(t&&e?String("playlist"!==e.type?e.uploader.id:e.artist.id)===String(t.id):null)}(t,y)&&(0,a.jsx)(P,{popupPosition:c,moreBtnWithLabel:i,data:t,isCharts:g}),y?.is_admin&&p&&(0,a.jsx)(ea.Q,{music:t,className:"MusicActions-btn",isOutlined:!0})]})}},97765:(e,t,s)=>{"use strict";s.d(t,{b:()=>o});var a=s(49244),r=s(45688),n=s(59189),l=s(38959),i=s(34012);let o=e=>{let{musicItem:t}=e,{isPlaying:s,shuffleMusicCollection:o,togglePlay:c,setSong:d,currentSong:u,loadingId:m}=(0,a.K)(),{cleanPath:h}=(0,n.N)(),[p,g]=l.useState(!1),y=(0,l.useMemo)(()=>(0,r.x)([t]),[t,h]),x=(0,l.useMemo)(()=>({...t,tracks:y?.tracks}),[t,y]),v=(0,l.useMemo)(()=>{let e=e=>/^\d+$/.test(e)?+e:e;return e(u?.id)===e(x?.id)||e(u?.parentDetails?.id)===e(x?.id)||e(u?._album_id)===e(x?.id)},[u,x]),j=async()=>{if(v&&u?.streaming_url)return c?.();let e=x?.tracks||[];for(let t=0;t<e.length&&!await d?.(e[t],{tracks:e,sectionName:h,from:"singlePage"});t++)t===e.length-1&&console.error("Failed to play any track in the list")};return{playing:!!v&&s,isLoading:m===x?.id||m===x?.song_id,onPlay:j,onShuffle:()=>{let e=x.tracks||[];o?.(x,!p,p?e:void 0),g(!p)},isShuffled:p,setIsShuffled:g,isCurrentSong:v,userCanPlay:!(0,i.VB)(u),updatedMusic:x}}},98242:(e,t,s)=>{"use strict";s.d(t,{Ay:()=>n});var a=s(38959);let r={},n=function(e,t){let[s,n]=(0,a.useState)(()=>!e||t?.shouldPreventLoad?"idle":r[e]??"loading");return(0,a.useEffect)(()=>{if(!e||t?.shouldPreventLoad)return;let s=r[e];if("ready"===s||"error"===s)return void n(s);let a=function(e){let t=document.querySelector(`script[src="${e}"]`),s=t?.getAttribute("data-status");return{node:t,status:s}}(e),l=a.node;if(l)n(a.status??s??"loading");else{(l=document.createElement("script")).src=e,l.async=!0,l.setAttribute("data-status","loading"),document.body.appendChild(l);let t=e=>{let t="load"===e.type?"ready":"error";l?.setAttribute("data-status",t)};l.addEventListener("load",t),l.addEventListener("error",t)}let i=t=>{let s="load"===t.type?"ready":"error";n(s),r[e]=s};return l.addEventListener("load",i),l.addEventListener("error",i),()=>{l&&(l.removeEventListener("load",i),l.removeEventListener("error",i)),l&&t?.removeOnUnmount&&l.remove()}},[e,t?.shouldPreventLoad,t?.removeOnUnmount]),s}}}]);
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.