vendor: 1,154 bytes, line 1
1var Ls=Object.defineProperty;var nr=e=>{throw TypeError(e)};var Ns=(e,t,i)=>t in e?Ls(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var z=(e,t,i)=>Ns(e,typeof t!="symbol"?t+"":t,i),nn=(e,t,i)=>t.has(e)||nr("Cannot "+i);var h=(e,t,i)=>(nn(e,t,"read from private field"),i?i.call(e):t.get(e)),A=(e,t,i)=>t.has(e)?nr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),q=(e,t,i,n)=>(nn(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),R=(e,t,i)=>(nn(e,t,"access private method"),i);import{r as F,j as l,R as Re,g as Wi}from"./react-vendor-n58YcWca.js";import"./polyfills-BpQhZgId.js";import{P as v,u as K,z as Ms,a as lt,e as ee,m as ht,c as fn,q as Os,y as $s}from"./useMixpanelEvent-CwzNdz1P.js";import{q as y,X as Di,A as N,L as Vs}from"./styled-components.browser.esm-bLCX9LcF.js";import{s as zs,S as rr}from"./StickyNav-V5f7FXt4.js";import{P as Vr}from"./PageGrid-DAoirn_6.js";import{P as sr}from"./PageFooter-DUg-dAcn.js";import{w as O,a as Hs}from"./breakpoints-CT9Skc-A.js";import{F as zr,r as Bs}from"./magnifyingGlass-B4_Z6-oS.js";import{d as Hr,b as Pn,j as Ws,f as Ds,u as Xt}
1from"./baseApi-BDNw6R0N.js";import{S as Gs}from"./SmallButton-H3HXFYNz.js";import{u as Ks}from"./useDebouncedCallback-BxNVw8Zr.js";import{D as pn}from"./DropdownList-D3mrplhA.js";import{u as Br}from"./useEntities-7PsFTbxz.js";import{h as Qs,i as Xs,a as Js}from"./index-DchkhONC.js";import{I as Ys}from"./InfiniteScrollSentinel-BGsxZb2G.js";import{P as Un,b as Zs,s as eo,U as or}from"./DfpAd-DGVpB482.js";import{F as Wr}from"./eye-LDeowZHD.js";import{F as Dr}from"./rightArrow-GavhflY3.js";import{A as Gr}from"./ArtistBadge-DiC9RCnj.js";import{L as Kr}from"./LabelWithIcon-BF_TVvOj.js";import{A as ar,k as to,c as lr,l as io}from"./client-CVIjrVQr.js";import{S as qi}from"./SelectInput-CayI5ibb.js";import{A as no,C as ro,F as Qr,b as so,a as oo}from"./useAnnotationTracking-DrBXe9JK.js";import{d as ao}from"./debounce-NvnnSDeq.js";import{c as lo}from"./ReactSelect.components-ByguWPR0.js";import{B as pe}from"./Button-CQMKrMe5.js";import{u as co}from"./discographyApi-BIFP9s8j.js";import{u as Jt}from"./useCurrentUser-BB1IhaAC.js";import{S as Xr}from"./entityCommentsSlice-CV5A085w.js";import{F as uo}from"./sgnarly-CtGADNsj.js";import{a as Fe,A as ho,c as fo,F as et,d as qe}from"./Field-7_89C2Bv.js";import{T as ti}from"./TextInput-BPNF0Jdn.js";import{u as Jr}from"./useEntityForm-CZvCg1IC.js";import{r as po,u as mo}from"./useIsMobile-llXUX10l.js";import{p as Ii,r as go,T as yo,B as bo}from"./debounce-CrJCUxZS.js";import{r as wo}from"./isSymbol-DNMVoPbK.js";import{n as _o}from"./index-DCiIQBrF.js";import{R as vo}from"./RadioButtons-DdRpNTpW.js";import{L as xo,T as So}from"./Link-Cslb3XxZ.js";import{T as Co}from"./Trans-BA--klS5.js";import{F as Ao}from"./alert-Dqnn9D3u.js";import{F as cr}from"./circleCheckmark-BwjuUJWA.js";import{F as dr}from"./clock-eFkemLrC.js";import{u as Ro,p as Fo}from"./redux-toolkit.modern-Dys8uo0y.js";import{a as ko,c as jo}from"./index-BWPzVF8h.js";import{c as Io}from"./index-DbCv2KXb.js";import"./mergeWith-DMPvSX07.js";import"./useOnClickOutside-BUbyHiRG.js";import"./usePusher-2MEvS-FP.js";import"./onsiteBridge-JUt4QTBF.js";import"./kebabCase-C8T4FWu4.js";import"./useAssistant-0cPLzLb8.js";import"./assistantSlice-BjGk1lkC.js";import"./debounce-DiHyN88W.js";import"./js.cookie-Cw0-Cwe_.js";import"./useDistanceAbove-BNK9m3AL.js";import"./useTheme-DuhDx1lY.js";import"./useMixpanelLinkEvent-Nl60lPoX.js";import"./pick-BB541D_O.js";import"./return-Dxgzougu.js";import"./leftArrow-CKGhO-Ow.js";import"./Spinner-DCgVZOzs.js";import"./Dropdown-DRj0Eqi2.js";import"./downArrowFilled-NgvGA8uB.js";import"./useOnIntersecting-BMgGK1Dp.js";import"./tslib.es6-BLgAfX01.js";import"./RoleIcon-Dpm9s0Ws.js";import"./roleIconContributor-BI3kd_KU.js";import"./VerifiedBadge-FPZAwb-9.js";import"./extends-CF3RwP-h.js";import"./objectWithoutProperties-BpXHxfwH.js";import"./index-CJBMXzZm.js";import"./use-isomorphic-layout-effect.browser.esm-DkZidJBn.js";import"./info-87IE4pu3.js";import"./toNumber-ds0JWpuE.js";import"./InlineSvg-BK8Oa2eC.js";import"./StyledLink-CQMD-CeS.js";import"./datadog-BG0bSuI3.js";import"./safeLocalStorage-CLxJQp6x.js";const Eo=(e,t)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 19",ref:t,...e},F.createElement("path",{fillRule:"evenodd",d:"M3.214 11.671h.643a1.287 1.287 0 0 1 1.286 1.286v1.286a1.287 1.287 0 0 1-1.286 1.286h-.643V18.1H1.93v-2.57h-.643A1.287 1.287 0 0 1 0 14.243v-1.286a1.287 1.287 0 0 1 1.286-1.286h.643V.101h1.285v11.57Zm-1.928 2.572h2.571v-1.286H1.286v1.286Zm9-11.571h-.643V.1H8.357v2.572h-.643A1.287 1.287 0 0 0 6.43 3.957v1.286a1.287 1.287 0 0 0 1.285 1.286h.643V18.1h1.286V6.53h.643a1.287 1.287 0 0 0 1.285-1.286V3.957a1.287 1.287 0 0 0-1.285-1.285Zm0 2.571H7.714V3.957h2.572v1.286Zm6.428 2.571h-.643V.1h-1.285v7.714h-.643A1.287 1.287 0 0 0 12.857 9.1v1.286a1.287 1.287 0 0 0 1.286 1.286h.643V18.1h1.285v-6.429h.643A1.287 1.287 0 0 0 18 10.386V9.1a1.287 1.287 0 0 0-1.286-1.286Zm0 2.572h-2.571V9.1h2.571v1.286Z",clipRule:"evenodd"})),ur=F.forwardRef(Eo),It=e=>e.split(" (")[0],Gi=({regions:e,genres:t,region:i,genre:n,onRegionChange:r,onGenreChange:s})=>{const{t:o}=K(),a=F.useMemo(()=>[l.jsx("button",{onClick:()=>r(null),children:It(o("artist_verification.toolbar.filter_all_regions"))},"all"),...e.map(u=>l.jsx("button",{onClick:()=>r(u),children:It(o(`artist_verification_request.regions.${u}`,{defaultValue:u}))},u))],[e,r,o]),c=F.useMemo(()=>[l.jsx("button",{onClick:()=>s(null),children:It(o("artist_verification.toolbar.filter_all_genres"))},"all"),...t.map(u=>l.jsx("button",{onClick:()=>s(u),children:It(o(`artist_verification_request.genres.${u}`,{defaultValue:u}))},u))],[t,s,o]);return l.jsxs(Gi.Container,{children:[l.jsx(pn,{small:!0,align:"left",portal:!0,icon:l.jsx(ur,{}),label:i?It(o(`artist_verification_request.regions.${i}`,{defaultValue:i})):o("artist_verification.toolbar.filter_region"),items:a}),l.jsx(pn,{small:!0,align:"left",portal:!0,icon:l.jsx(ur,{}),label:n?It(o(`artist_verification_request.genres.${n}`,{defaultValue:n})):o("artist_verification.toolbar.filter_genre"),items:c})]})};Gi.propTypes={regions:v.arrayOf(v.string).isRequired,genres:v.arrayOf(v.string).isRequired,region:v.string,genre:v.string,onRegionChange:v.func.isRequired,onGenreChange:v.func.isRequired};const Yr=Re.memo(Gi);Gi.Container=y.div.withConfig({displayName:"ArtistVerificationFilters__Container",componentId:"sc-de8cbaea-0"})(["display:flex;align-items:center;gap:",";"],e=>e.theme.space.half);const se=({status:e,query:t,region:i,genre:n,regions:r,genres:s,tabStatuses:o,onStatusChange:a,onQueryChange:c,onRegionChange:u,onGenreChange:d})=>{const{t:f}=K(),p=Ks({callback:b=>c(b.target.value),delay:300,dependencies:[]});return l.jsx(se.Container,{children:l.jsxs(se.Inner,{children:[l.jsx(se.Tabs,{children:o.map(b=>l.jsx(Gs,{inverted:e===b,onClick:()=>a(b),children:f(`artist_verification.tabs.${b}`)},b))}),l.jsxs(se.Actions,{children:[l.jsx(Yr,{region:i,genre:n,regions:r,genres:s,onRegionChange:u,onGenreChange:d}),l.jsxs(se.SearchBar,{children:[l.jsx(se.SearchInput,{placeholder:f("artist_verification.toolbar.search_placeholder"),defaultValue:t,onChange:p}),l.jsx(se.SearchIcon,{children:l.jsx(zr,{})})]})]})]})})};
1se.propTypes={status:v.string,query:v.string,region:v.string,genre:v.string,regions:v.arrayOf(v.string).isRequired,genres:v.arrayOf(v.string).isRequired,tabStatuses:v.arrayOf(v.string).isRequired,onStatusChange:v.func.isRequired,onQueryChange:v.func.isRequired,onRegionChange:v.func.isRequired,onGenreChange:v.func.isRequired};const To=Re.memo(se);se.Container=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__Container",componentId:"sc-d05fdcca-0"})(["position:sticky;top:",";",";display:flex;justify-content:center;background-color:",";border-bottom:"," solid ",";padding:"," 0;"],e=>e.theme.stickyNav.height.desktop,Ms("artistVerificationToolbar"),e=>e.theme.color.background.main,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.space.full);se.Inner=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__Inner",componentId:"sc-d05fdcca-1"})(["display:flex;align-items:center;justify-content:space-between;width:100%;max-width:",";padding:0 ",";"],e=>e.theme.grid.mediumContainer,e=>e.theme.grid.gap);se.Tabs=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__Tabs",componentId:"sc-d05fdcca-2"})(["display:flex;gap:",";"],e=>e.theme.space.half);se.Actions=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__Actions",componentId:"sc-d05fdcca-3"})(["display:flex;align-items:center;gap:",";"],e=>e.theme.space.full);se.SearchBar=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__SearchBar",componentId:"sc-d05fdcca-4"})(["position:relative;display:flex;align-items:center;width:calc("," * 2 + ",");height:",";background-color:",";"],e=>e.theme.grid.columnWidth,e=>e.theme.grid.gap,e=>e.theme.space.xLarge,e=>e.theme.color.background.variant);se.SearchInput=y.input.withConfig({displayName:"ArtistVerificationToolbar.desktop__SearchInput",componentId:"sc-d05fdcca-5"})(["width:100%;height:100%;padding:0 ",";padding-right:",";border:none;background:transparent;font-family:",";font-size:",";font-weight:",";line-height:",";color:",";&::placeholder{color:",";}&:focus{outline:none;}"],e=>e.theme.space.xSmall,e=>e.theme.space.xLarge,e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.smallReading,e=>e.theme.color.background.on,e=>e.theme.color.background.onSecondary);se.SearchIcon=y.div.withConfig({displayName:"ArtistVerificationToolbar.desktop__SearchIcon",componentId:"sc-d05fdcca-6"})(["position:absolute;right:",";display:flex;align-items:center;pointer-events:none;svg{width:",";height:",";fill:",";}"],e=>e.theme.space.xSmall,e=>e.theme.space.small,e=>e.theme.space.small,e=>e.theme.color.background.on);
1const ft=({status:e,region:t,genre:i,regions:n,genres:r,tabStatuses:s,onStatusChange:o,onRegionChange:a,onGenreChange:c})=>{const{t:u}=K(),d=F.useMemo(()=>s.map(f=>l.jsx("button",{onClick:()=>o(f),children:u(`artist_verification.tab_options.${f}`)},f)),[s,o,u]);return l.jsx(ft.Container,{children:l.jsx(ft.ScrollWrapper,{children:l.jsxs(ft.Row,{children:[l.jsx(pn,{small:!0,align:"left",portal:!0,label:u(`artist_verification.tab_options.${e||"pending"}`),items:d}),l.jsx(Yr,{region:t,genre:i,regions:n,genres:r,onRegionChange:a,onGenreChange:c})]})})})};ft.propTypes={status:v.string,region:v.string,genre:v.string,regions:v.arrayOf(v.string).isRequired,genres:v.arrayOf(v.string).isRequired,tabStatuses:v.arrayOf(v.string).isRequired,onStatusChange:v.func.isRequired,onRegionChange:v.func.isRequired,onGenreChange:v.func.isRequired};const Po=Re.memo(ft);ft.Container=y.div.withConfig({displayName:"ArtistVerificationToolbar.mobile__Container",componentId:"sc-57c0b50e-0"})(["display:flex;justify-content:center;padding:"," "," ",";"],e=>e.theme.space.small,e=>e.theme.grid.gap,e=>e.theme.space.full);ft.ScrollWrapper=y.div.withConfig({displayName:"ArtistVerificationToolbar.mobile__ScrollWrapper",componentId:"sc-57c0b50e-1"})(["position:relative;width:100%;&::after{content:'';position:absolute;top:0;right:0;bottom:0;width:",";pointer-events:none;background:linear-gradient(to right,transparent,",");}"],e=>e.theme.space.large,e=>e.theme.color.background.main);ft.Row=y.div.withConfig({displayName:"ArtistVerificationToolbar.mobile__Row",componentId:"sc-57c0b50e-2"})(["display:flex;flex-wrap:nowrap;align-items:center;gap:",";overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;&::-webkit-scrollbar{display:none;}& > *{flex-shrink:0;}"],e=>e.theme.space.half);const Uo=Hr({desktop:To,mobile:Po}),qo=Pn.injectEndpoints({endpoints:e=>({getArtistVerificationRequests:Ws({schema:{artistVerificationRequests:[Qs]},buildBasePath:()=>"/artist_verification_requests"})(e)})}),{useGetArtistVerificationRequestsInfiniteQuery:Lo}=qo,he=({request:e})=>{const{t}=K(),i=Di(),{artist:n}=e;return l.jsxs(he.Container,{href:`/artist_verification_requests/${e.id}`,children:[l.jsx(he.Artist,{children:l.jsx(Gr,{artistId:n.id,avatarSize:54,gap:"small",showVerifiedCheck:!0,link:!1})}),l.jsxs(he.Fields,{children:[l.jsx(he.Field,{children:e.submitDate}),l.jsx(he.Field,{$wide:!0,children:e.region?t(`artist_verification_request.regions.${e.region}`,{defaultValue:e.region}):null}),l.jsx(he.Field,{$wide:!0,children:e.genre?t(`artist_verification_request.genres.${e.genre}`,{defaultValue:e.genre}):null}),l.jsx(he.Field,{children:l.jsx(Kr,{gap:"xSmall",height:i.space.small,icon:l.jsx(Wr,{"aria-label":t("artist_verification.table.views")}),label:e.artistPageviews,underline:!1,labelSize:"mediumReading"})}),l.jsx(he.Cta,{children:l.jsx(Dr,{})})]})]})};he.propTypes={request:v.shape({id:v.number.isRequired,submitDate:v.string,region:v.string,genre:v.string,artistPageviews:v.number,artist:v.shape({id:v.number.isRequired,name:v.string.isRequired,imageUrl:v.string,isVerified:v.bool,iq:v.number}).isRequired}).isRequired};const No=Re.memo(he);he.Container=y.a.withConfig({displayName:"ArtistVerificationListItem.desktop__Container",componentId:"sc-b9fbc43e-0"})(["display:flex;align-items:center;gap:",";padding:"," 1px;border-bottom:"," solid ",";border-left:"," solid ",";border-right:"," solid ",";cursor:pointer;text-decoration:none;color:",";&:hover{background-color:",";}"],e=>e.theme.grid.gap,e=>e.theme.space.small,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.color.background.on,e=>e.theme.color.background.variant);he.Artist=y.div.withConfig({displayName:"ArtistVerificationListItem.desktop__Artist",componentId:"sc-b9fbc43e-1"})(["flex:0 0 41%;min-width:0;display:flex;align-items:center;padding-left:",";"],e=>e.theme.space.small);he.Fields=y.div.withConfig({displayName:"ArtistVerificationListItem.desktop__Fields",componentId:"sc-b9fbc43e-2"})(["flex:1 0 0;min-width:0;display:flex;align-items:center;gap:",";"],e=>e.theme.grid.gap);he.Field=y.span.withConfig({displayName:"ArtistVerificationListItem.desktop__Field",componentId:"sc-b9fbc43e-3"})(["flex:"," 0 0;min-width:0;font-family:",";font-size:",";font-weight:",";line-height:",";color:",";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.$wide?2:1,e=>e.theme.font.reading,e=>e.theme.fontSize.mediumReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.mediumReading,e=>e.theme.color.background.on);he.Cta=y.div.withConfig({displayName:"ArtistVerificationListItem.desktop__Cta",componentId:"sc-b9fbc43e-4"})(["flex:0 0 auto;display:flex;align-items:center;justify-content:center;padding:0 ",";color:",";svg{width:",";height:",";}"],e=>e.theme.space.xLarge,e=>e.theme.color.background.on,e=>e.theme.space.medium,e=>e.theme.space.medium);const He=({label:e,children:t})=>l.jsxs(He.Container,{children:[l.jsx(He.Label,{children:e}),l.jsx(He.Value,{children:t})]});He.propTypes={label:v.string.isRequired,children:v.node.isRequired};He.Container=y.div.withConfig({displayName:"ArtistVerificationListColumn__Container",componentId:"sc-6abd6e4d-0"})(["display:flex;flex-direction:column;gap:",";"],e=>e.theme.space.quarter);He.Label=y.span.withConfig({displayName:"ArtistVerificationListColumn__Label",componentId:"sc-6abd6e4d-1"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.smallReading,e=>e.theme.color.background.onSecondary);He.Value=y.div.withConfig({displayName:"ArtistVerificationListColumn__Value",componentId:"sc-6abd6e4d-2"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.theme.font.reading,e=>e.theme.fontSize.mediumReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.mediumReading,e=>e.theme.color.background.on);const Ie=({request:e})=>{const{t}=K(),i=Di(),{artist:n}=e;return l.jsxs(Ie.Container,{href:`/artist_verification_requests/${e.id}
1`,children:[l.jsxs(Ie.ArtistRow,{children:[l.jsx(Ie.Artist,{children:l.jsx(Gr,{artistId:n.id,avatarSize:48,gap:"small",showVerifiedCheck:!0,link:!1})}),l.jsx(Ie.Cta,{children:l.jsx(Dr,{})})]}),l.jsxs(Ie.Columns,{children:[l.jsx(He,{label:t("artist_verification.table.date"),children:e.submitDate}),l.jsx(He,{label:t("artist_verification.table.views"),children:l.jsx(Kr,{gap:"xSmall",height:i.space.small,icon:l.jsx(Wr,{"aria-label":t("artist_verification.table.views")}),label:e.artistPageviews,underline:!1,labelSize:"mediumReading"})}),l.jsx(He,{label:t("artist_verification.table.region_language"),children:e.region?t(`artist_verification_request.regions.${e.region}`,{defaultValue:e.region}):null}),l.jsx(He,{label:t("artist_verification.table.genre"),children:e.genre?t(`artist_verification_request.genres.${e.genre}`,{defaultValue:e.genre}):null})]})]})};Ie.propTypes={request:v.shape({id:v.number.isRequired,submitDate:v.string,region:v.string,genre:v.string,artistPageviews:v.number,artist:v.shape({id:v.number.isRequired,name:v.string.isRequired,imageUrl:v.string,isVerified:v.bool,iq:v.number}).isRequired}).isRequired};const Mo=Re.memo(Ie);Ie.Container=y.a.withConfig({displayName:"ArtistVerificationListItem.mobile__Container",componentId:"sc-90bc65b-0"})(["display:flex;flex-direction:column;gap:",";padding:",";border-bottom:"," solid ",";border-left:"," solid ",";border-right:"," solid ",";cursor:pointer;text-decoration:none;color:",";"],e=>e.theme.grid.gap,e=>e.theme.space.full,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.color.background.on);Ie.ArtistRow=y.div.withConfig({displayName:"ArtistVerificationListItem.mobile__ArtistRow",componentId:"sc-90bc65b-1"})(["display:flex;align-items:center;gap:",";"],e=>e.theme.space.small);Ie.Artist=y.div.withConfig({displayName:"ArtistVerificationListItem.mobile__Artist",componentId:"sc-90bc65b-2"})(["flex:1 0 0;min-width:0;"]);Ie.Cta=y.div.withConfig({displayName:"ArtistVerificationListItem.mobile__Cta",componentId:"sc-90bc65b-3"})(["flex:0 0 auto;display:flex;align-items:center;color:",";svg{width:",";height:",";}"],e=>e.theme.color.background.on,e=>e.theme.space.medium,e=>e.theme.space.medium);Ie.Columns=y.div.withConfig({displayName:"ArtistVerificationListItem.mobile__Columns",componentId:"sc-90bc65b-4"})(["display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:"," ",";"],e=>e.theme.space.small,e=>e.theme.space.large);const Oo=Hr({desktop:No,mobile:Mo}),$o=[{key:"submit_date",sortColumn:"created_at"},{key:"region_language",sortColumn:"region",wide:!0},{key:"genre",sortColumn:"genre",wide:!0},{key:"views",sortColumn:"views"}],hr=e=>e?.replace(/_(asc|desc)$/,""),fr=e=>e?.endsWith("_asc")?"asc":"desc",Y=({status:e,query:t,sort:i,region:n,genre:r,onSortChange:s})=>{const{t:o}=K(),{currentData:a,fetchNextPage:c,hasNextPage:u,isFetching:d}=Lo({status:e,query:t,sort:i,region:n,genre:r}),f=a?.pages?.flatMap(g=>g.artistVerificationRequests)||[],p=Br("artistVerificationRequests",f,{include:["artist"]}),b=F.useCallback(async()=>{u&&!d&&await c()},[c,u,d]),m=F.useCallback(g=>{const _=hr(i),w=fr(i);s(_===g?`${g}_${w==="desc"?"asc":"desc"}`:`${g}_desc`)},[s,i]);return d&&p.length===0?l.jsx(Y.SpinnerContainer,{children:l.jsx(Un,{})}):!d&&p.length===0?l.jsx(Y.Empty,{children:o("artist_verification.table.no_requests")}):l.jsxs(Y.Container,{children:[l.jsxs(Y.Header,{children:[l.jsx(Y.HeaderTitle,{children:o("artist_verification.table.artists")}),l.jsxs(Y.HeaderColumns,{children:[$o.map(({key:g,sortColumn:_,wide:w})=>{const x=hr(i)===_,C=x&&fr(i)==="asc";return l.jsxs(Y.HeaderColumn,{onClick:()=>m(_),$active:x,$wide:w,children:[o(`artist_verification.table.${g}`),l.jsx(Y.SortIcon,{$active:x,$ascending:C,children:l.jsx(Zs,{})})]},g)}),l.jsx(Y.Spacer,{})]})]}),p.map(g=>l.jsx(Oo,{request:g},g.id)),l.jsx(Ys,{nextPage:u,onLoadMore:b})]})};Y.propTypes={status:v.string,query:v.string,sort:v.string,region:v.string,genre:v.string,onSortChange:v.func};const Vo=Re.memo(Y);Y.Container=y.div.withConfig({displayName:"ArtistVerificationList__Container",componentId:"sc-b6e5a37a-0"})(["display:flex;flex-direction:column;width:100%;border-top:"," solid ",";",""],e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,O(N(["border-top:none;padding:"," 0;"],e=>e.theme.space.xxxLarge)));Y.Header=y.div.withConfig({displayName:"ArtistVerificationList__Header",componentId:"sc-b6e5a37a-1"})(["display:none;",""],O(N(["display:flex;align-items:center;gap:",";padding-bottom:",";border-bottom:"," solid ",";"],e=>e.theme.grid.gap,e=>e.theme.space.xSmall,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary)));Y.HeaderTitle=y.span.withConfig({displayName:"ArtistVerificationList__HeaderTitle",componentId:"sc-b6e5a37a-2"})(["flex:0 0 41%;font-family:",";font-size:",";font-weight:",";color:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.smallHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.color.background.on);Y.HeaderColumns=y.div.withConfig({displayName:"ArtistVerificationList__HeaderColumns",componentId:"sc-b6e5a37a-3"})(["flex:1 0 0;display:flex;align-items:center;gap:",";"],e=>e.theme.grid.gap);Y.HeaderColumn=y.button.withConfig({displayName:"ArtistVerificationList__HeaderColumn",componentId:"sc-b6e5a37a-4"})(["flex:"," 0 0;display:flex;align-items:center;gap:",";font-family:",";font-size:",";font-weight:",";line-height:",";color:",";white-space:nowrap;background:none;border:none;padding:0;cursor:pointer;"],e=>e.$wide?2:1,e=>e.theme.space.quarter,e=>e.theme.font.reading,e=>e.theme.fontSize.mediumReading,e=>e.$active?e.theme.fontWeight.normal:e.theme.fontWeight.light,e=>e.theme.lineHeight.mediumReading,e=>e.theme.color.background.on);
1Y.SortIcon=y.span.withConfig({displayName:"ArtistVerificationList__SortIcon",componentId:"sc-b6e5a37a-5"})(["display:inline-flex;opacity:",";transform:",";transition:opacity 0.15s,transform 0.15s;svg{width:",";height:",";fill:",";}",":hover &{opacity:1;}"],e=>e.$active?1:0,e=>e.$ascending?"rotate(180deg)":"none",e=>e.theme.space.half,e=>e.theme.space.half,e=>e.theme.color.background.on,Y.HeaderColumn);Y.Spacer=y.div.withConfig({displayName:"ArtistVerificationList__Spacer",componentId:"sc-b6e5a37a-6"})(["flex:0 0 calc("," * 2 + ",");"],e=>e.theme.space.xLarge,e=>e.theme.space.medium);Y.SpinnerContainer=y.div.withConfig({displayName:"ArtistVerificationList__SpinnerContainer",componentId:"sc-b6e5a37a-7"})(["display:flex;align-items:center;justify-content:center;min-height:50vh;"]);Y.Empty=y.div.withConfig({displayName:"ArtistVerificationList__Empty",componentId:"sc-b6e5a37a-8"})(["min-height:50vh;display:flex;align-items:center;justify-content:center;font-family:",";font-size:",";font-weight:",";color:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.mediumReading,e=>e.theme.fontWeight.light,e=>e.theme.color.background.onSecondary);const zo=["status","query","sort","region","genre"],Ei="pending";function je(){const{t:e}=K(),t=lt(),i=ee(w=>w.artistVerificationRequest.regions),n=ee(w=>w.artistVerificationRequest.genres),r=ee(w=>w.artistVerificationRequest.tabStatuses),s=ee(w=>w.artistVerificationRequest.filters)||{},[o,a]=F.useState(s.status||Ei),[c,u]=F.useState(s.query||""),[d,f]=F.useState(s.sort||null),[p,b]=F.useState(s.region||null),[m,g]=F.useState(s.genre||null),_=()=>{a(Ei),u(""),f(null),b(null),g(null)};return F.useEffect(()=>{t(ht("artist_claim_review:load",{counts_as_page_load:!0}))},[t]),F.useEffect(()=>{const w=new URLSearchParams(window.location.search);zo.forEach(U=>w.delete(U)),Object.entries({status:o,query:c,sort:d,region:p,genre:m}).forEach(([U,L])=>{L&&!(U==="status"&&L===Ei)&&w.set(U,L)});const C=w.toString(),T=`${window.location.pathname}${C?`?${C}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",T)},[o,c,d,p,m]),F.useEffect(()=>{const w=r.filter(S=>S!==o).map(S=>({id:`avr-status-${S}`,sectionId:"page_actions",children:e("artist_verification.commands.set_status",{label:e(`artist_verification.tab_options.${S}`)}),onClick:()=>a(S)})),x=p?[{id:"avr-region-all",sectionId:"page_actions",children:e("artist_verification.commands.set_region",{label:e("artist_verification.toolbar.filter_all_regions")}),onClick:()=>b(null)}]:[],C=i.filter(S=>S!==p).map(S=>({id:`avr-region-${S}`,sectionId:"page_actions",children:e("artist_verification.commands.set_region",{label:e(`artist_verification_request.regions.${S}`,{defaultValue:S})}),onClick:()=>b(S)})),T=m?[{id:"avr-genre-all",sectionId:"page_actions",children:e("artist_verification.commands.set_genre",{label:e("artist_verification.toolbar.filter_all_genres")}),onClick:()=>g(null)}]:[],U=n.filter(S=>S!==m).map(S=>({id:`avr-genre-${S}`,sectionId:"page_actions",children:e("artist_verification.commands.set_genre",{label:e(`artist_verification_request.genres.${S}`,{defaultValue:S})}),onClick:()=>g(S)})),k=o!==Ei||c||d||p||m?[{id:"avr-clear-filters",sectionId:"page_actions",children:e("artist_verification.commands.clear_filters"),onClick:_}]:[];return Bs([...w,...x,...C,...T,...U,...k])},[e,o,c,d,p,m,i,n,r]),l.jsxs(je.Container,{children:[l.jsx(je.Header,{children:l.jsx(je.GridContainer,{children:l.jsx(je.Title,{children:e("artist_verification.title")})})}),l.jsx(Uo,{status:o,query:c,region:p,genre:m,regions:i,genres:n,tabStatuses:r,onStatusChange:a,onQueryChange:u,onRegionChange:b,onGenreChange:g}),l.jsx(je.Body,{children:l.jsx(je.GridContainer,{children:l.jsx(Vo,{status:o,query:c,sort:d,region:p,genre:m,onSortChange:f})})})]})}je.Container=y.main.withConfig({displayName:"IndexPage__Container",componentId:"sc-b55233e5-0"})(["grid-column:page-start / page-end;"]);je.Header=y.header.withConfig({displayName:"IndexPage__Header",componentId:"sc-b55233e5-1"})(["display:flex;flex-direction:column;align-items:center;padding-top:",";",""],e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xxxxLarge)));je.GridContainer=y.div.withConfig({displayName:"IndexPage__GridContainer",componentId:"sc-b55233e5-2"})(["width:100%;max-width:",";margin:0 auto;padding:0 "," ",";",""],e=>e.theme.grid.mediumContainer,e=>e.theme.grid.gap,e=>e.theme.grid.gap,O(N(["padding-bottom:0;"])));je.Title=y.h1.withConfig({displayName:"IndexPage__Title",componentId:"sc-b55233e5-3"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";",""],e=>e.theme.font.reading,e=>e.theme.fontSize.medium,e=>e.theme.fontWeight.normal,e=>e.theme.lineHeight.short,e=>e.theme.color.background.on,O(N(["font-size:",";"],e=>e.theme.fontSize.largeHeadline)));je.Body=y.div.withConfig({displayName:"IndexPage__Body",componentId:"sc-b55233e5-4"})(["display:flex;flex-direction:column;align-items:center;"]);const qn="artistVerificationRequestPage/STEP_UPDATED",Qt=(e,{artist:t}={})=>({type:qn,step:e,artist:t}),Ho=y(zr).withConfig({displayName:"SearchArtists__SearchIcon",componentId:"sc-371da2ea-0"})(["&&{height:1rem;width:auto;}"]),Bo=e=>l.jsx(lo.DropdownIndicator,{...e,children:l.jsx(Ho,{})}),Wo=ao((e,t)=>{no(e,{eligible_for_verification:!0}
1).then(i=>{const n=i.result.map(r=>{const s=i.entities.artists[r];return{value:r,label:s.name,slug:s.slug,verifiedStatus:s.isVerified?"claimed":"unclaimed"}});t(n)})},150);function Ce(){const{t:e}=K(),t=lt(),[i,n]=F.useState([]),r=fn("artist_claim:result_click"),s=fn("artist_claim:create_artist_click"),o=F.useCallback(d=>{d&&(r({verified_status:d.verifiedStatus}),t(Qt("confirm_artist",{artist:{id:d.value,slug:d.slug}})))},[t,r]),a=F.useCallback(d=>{if(!d){n([]);return}Wo(d,n)},[]),c=F.useCallback(()=>e("artist_verification_page.new.search_empty"),[e]),u=F.useMemo(()=>({onInputChange:a,filterOption:null,noOptionsMessage:c,components:{DropdownIndicator:Bo}}),[a,c]);return l.jsxs(Ce.Wrapper,{children:[l.jsxs(Ce.Prompt,{children:[l.jsx(Ce.Title,{children:e("artist_verification_page.new.title")}),l.jsx(Ce.Subtitle,{children:e("artist_verification_page.new.subtitle")})]}),l.jsx(qi,{options:i,onChange:o,placeholder:e("artist_verification_page.new.search_placeholder"),selectProps:u}),ar.artistVerificationCreateArtistHelpUrl&&l.jsxs(Ce.HelperCopy,{children:[e("artist_verification_page.new.cant_find_prefix"),"Â ",l.jsx(Ce.CreateLink,{href:ar.artistVerificationCreateArtistHelpUrl,target:"_blank",rel:"noopener",onClick:s,children:e("artist_verification_page.new.create_new_artist")})]})]})}Ce.Wrapper=y.div.withConfig({displayName:"SearchArtists__Wrapper",componentId:"sc-371da2ea-1"})(["display:flex;flex-direction:column;"]);Ce.Prompt=y.div.withConfig({displayName:"SearchArtists__Prompt",componentId:"sc-371da2ea-2"})(["display:flex;flex-direction:column;gap:",";padding-bottom:",";",""],e=>e.theme.space.half,e=>e.theme.space.large,O(N(["padding-bottom:",";"],e=>e.theme.space.xLarge)));Ce.Title=y.h1.withConfig({displayName:"SearchArtists__Title",componentId:"sc-371da2ea-3"})(["font-family:",";font-size:",";font-weight:",";line-height:",";text-align:center;margin:0;color:",";",""],e=>e.theme.font.reading,e=>e.theme.fontSize.largeHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.lineHeight.xShort,e=>e.theme.color.accentFont,O(N(["font-size:",";line-height:",";"],e=>e.theme.fontSize.xLargeHeadline,e=>e.theme.lineHeight.normal)));Ce.Subtitle=y.p.withConfig({displayName:"SearchArtists__Subtitle",componentId:"sc-371da2ea-4"})(["font-family:",";font-size:",";font-weight:",";text-align:center;margin:0;"],e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light);Ce.HelperCopy=y.p.withConfig({displayName:"SearchArtists__HelperCopy",componentId:"sc-371da2ea-5"})(["font-family:",";font-size:",";font-weight:",";color:",";text-align:center;margin:0;padding-top:",";",""],e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.color.background.onSecondary,e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xLarge)));Ce.CreateLink=y.a.withConfig({displayName:"SearchArtists__CreateLink",componentId:"sc-371da2ea-6"})(["font-family:",";font-weight:",";text-decoration:underline;color:inherit;"],e=>e.theme.font.reading,e=>e.theme.fontWeight.light);const Do=Pn.injectEndpoints({endpoints:e=>({getArtist:e.query({queryFn:Ds(t=>({url:`/artists/${t}`}),{artist:Xs},{transformNormalizedResult:({artist:t})=>t})})})}),{useGetArtistQuery:Go}=Do,Zt=(e="")=>`/artist_verification_requests${e}`,Ko=Pn.injectEndpoints({endpoints:e=>({verificationEligibility:e.query({query:t=>Zt(`/eligibility?artist_id=${t}`),transformResponse:t=>to(t)}),verifyArtistAccount:e.mutation({query:({signedIntent:t,artistId:i}={})=>({url:Zt("/verify"),method:"POST",body:{signed_intent:t,artist_id:i}})}),createArtistVerificationRequest:e.mutation({query:t=>({url:Zt(),method:"POST",body:{artist_verification_request:t}}),onQueryStarted:async(t,{dispatch:i,queryFulfilled:n})=>{try{await n,i(ht("artist_claim:manual_success"))}catch(r){i(ht("artist_claim:manual_error",{error:r?.error?.data?.meta?.message||"Unknown error"}))}}}),moderateArtistVerificationRequest:e.mutation({query:({id:t,...i})=>({url:Zt(`/${t}/moderate`),method:"PUT",body:{artist_verification_request:i}}),onQueryStarted:async({id:t,verification_action:i,rejection_reason_type:n},{dispatch:r,queryFulfilled:s,getState:o})=>{try{await s}catch{return}const a=o().artistVerificationRequest?.request?.artist?.id;i==="approve"?r(ht("artist_claim_review:accept",{request_id:t,artist_id:a})):i==="reject"&&r(ht("artist_claim_review:reject",{request_id:t,artist_id:a,rejection_reason:n}))}}),proofUploadUrl:e.mutation({query:({filename:t,contentType:i})=>({url:Zt("/proof_upload_url"),method:"POST",body:{filename:t,content_type:i}})})})}),{useVerificationEligibilityQuery:Qo,useModerateArtistVerificationRequestMutation:Xo,useVerifyArtistAccountMutation:Jo,useProofUploadUrlMutation:Yo,useCreateArtistVerificationRequestMutation:Zo}=Ko;function ea(e){return Object.prototype.toString.call(e)==="[object Object]"}function pr(e){return ea(e)||Array.isArray(e)}function ta(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ln(e,t){const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:i.every(o=>{const a=e[o],c=t[o];return typeof a=="function"?`${a}`==`${c}`:!pr(a)||!pr(c)?a===c:Ln(a,c)})}function mr(e){return e.concat().sort((t,i)=>t.name>i.name?1:-1).map(t=>t.options)}function ia(e,t){if(e.length!==t.length)return!1;const i=mr(e),n=mr(t);return i.every((r,s)=>{const o=n[s];return Ln(r,o)})}function Nn(e){return typeof e=="number"}function mn(e){return typeof e=="string"}function Ki(e){return typeof e=="boolean"}function gr(e){return Object.prototype.toString.call(e)==="[object Object]"}function G(e){return Math.abs(e)}function Mn(e){return Math.sign(e)}function oi(e,t){return G(e-t)}function na(e,t){if(e===0||t===0||G(e)<=G(t))return 0;const i=oi(G(e),G(t));return G(i/e)}function ra(e){return Math.round(e*100)/100}function ai(e){return li(e).map(Number)}function Be(e){return e[Fi(e)]}function Fi(e){return Math.max(0,e.length-1)}function On(e,t){return t===Fi(e)}function yr(e,t=0){return Array.from(Array(e),(i,n)=>t+n)}function li(e){return Object.keys(e)}function Zr(e,t){return[e,t].reduce((i,n)=>
vendor: 17,906 bytes, line 1
1(li(n).forEach(r=>{const s=i[r],o=n[r],a=gr(s)&&gr(o);i[r]=a?Zr(s,o):o}),i),{})}function gn(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function sa(e,t){const i={start:n,center:r,end:s};function n(){return 0}function r(c){return s(c)/2}function s(c){return t-c}function o(c,u){return mn(e)?i[e](c):e(t,c,u)}return{measure:o}}function ci(){let e=[];function t(r,s,o,a={passive:!0}){let c;if("addEventListener"in r)r.addEventListener(s,o,a),c=()=>r.removeEventListener(s,o,a);else{const u=r;u.addListener(o),c=()=>u.removeListener(o)}return e.push(c),n}function i(){e=e.filter(r=>r())}const n={add:t,clear:i};return n}function oa(e,t,i,n){const r=ci(),s=1e3/60;let o=null,a=0,c=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function d(){b(),r.clear()}function f(_){if(!c)return;o||(o=_,i(),i());const w=_-o;for(o=_,a+=w;a>=s;)i(),a-=s;const x=a/s;n(x),c&&(c=t.requestAnimationFrame(f))}function p(){c||(c=t.requestAnimationFrame(f))}function b(){t.cancelAnimationFrame(c),o=null,a=0,c=0}function m(){o=null,a=0}return{init:u,destroy:d,start:p,stop:b,update:i,render:n}}function aa(e,t){const i=t==="rtl",n=e==="y",r=n?"y":"x",s=n?"x":"y",o=!n&&i?-1:1,a=d(),c=f();function u(m){const{height:g,width:_}=m;return n?g:_}function d(){return n?"top":i?"right":"left"}function f(){return n?"bottom":i?"left":"right"}function p(m){return m*o}return{scroll:r,cross:s,startEdge:a,endEdge:c,measureSize:u,direction:p}}function Ft(e=0,t=0){const i=G(e-t);function n(u){return u<e}function r(u){return u>t}function s(u){return n(u)||r(u)}function o(u){return s(u)?n(u)?e:t:u}function a(u){return i?u-i*Math.ceil((u-t)/i):u}return{length:i,max:t,min:e,constrain:o,reachedAny:s,reachedMax:r,reachedMin:n,removeOffset:a}}function es(e,t,i){const{constrain:n}=Ft(0,e),r=e+1;let s=o(t);function o(p){return i?G((r+p)%r):n(p)}function a(){return s}function c(p){return s=o(p),f}function u(p){return d().set(a()+p)}function d(){return es(e,a(),i)}const f={get:a,set:c,add:u,clone:d};return f}function la(e,t,i,n,r,s,o,a,c,u,d,f,p,b,m,g,_,w,x){const{cross:C,direction:T}=e,U=["INPUT","SELECT","TEXTAREA"],L={passive:!1},k=ci(),S=ci(),I=Ft(50,225).constrain(b.measure(20)),$={mouse:300,touch:400},V={mouse:500,touch:600},D=m?43:25;let Q=!1,X=0,H=0,te=!1,ne=!1,_e=!1,ve=!1;function Pe(j){if(!x)return;function B(de){(Ki(x)||x(j,de))&&ye(de)}const Z=t;k.add(Z,"dragstart",de=>de.preventDefault(),L).add(Z,"touchmove",()=>{},L).add(Z,"touchend",()=>{}).add(Z,"touchstart",B).add(Z,"mousedown",B).add(Z,"touchcancel",J).add(Z,"contextmenu",J).add(Z,"click",Se,!0)}function me(){k.clear(),S.clear()}function ge(){const j=ve?i:t;S.add(j,"touchmove",M,L).add(j,"touchend",J).add(j,"mousemove",M,L).add(j,"mouseup",J)}function xe(j){const B=j.nodeName||"";return U.includes(B)}function le(){return(m?V:$)[ve?"mouse":"touch"]}function Ue(j,B){const Z=f.add(Mn(j)*-1),de=d.byDistance(j,!m).distance;return m||G(j)<I?de:_&&B?de*.5:d.byIndex(Z.get(),0).distance}function ye(j){const B=gn(j,n);ve=B,_e=m&&B&&!j.buttons&&Q,Q=oi(r.get(),o.get())>=2,!(B&&j.button!==0)&&(xe(j.target)||(te=!0,s.pointerDown(j),u.useFriction(0).useDuration(0),r.set(o),ge(),X=s.readPoint(j),H=s.readPoint(j,C),p.emit("pointerDown")))}function M(j){if(!gn(j,n)&&j.touches.length>=2)return J(j);const Z=s.readPoint(j),de=s.readPoint(j,C),De=oi(Z,X),Ze=oi(de,H);if(!ne&&!ve&&(!j.cancelable||(ne=De>Ze,!ne)))return J(j);const gt=s.pointerMove(j);De>g&&(_e=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(T(gt)),j.preventDefault()}function J(j){const Z=d.byDistance(0,!1).index!==f.get(),de=s.pointerUp(j)*le(),De=Ue(T(de),Z),Ze=na(de,De),gt=D-10*Ze,ct=w+Ze/50;ne=!1,te=!1,S.clear(),u.useDuration(gt).useFriction(ct),c.distance(De,!m),ve=!1,p.emit("pointerUp")}function Se(j){_e&&(j.stopPropagation(),j.preventDefault(),_e=!1)}function ce(){return te}return{init:Pe,destroy:me,pointerDown:ce}}function ca(e,t){let n,r;function s(f){return f.timeStamp}function o(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(gn(f,t)?f:f.touches[0])[m]}function a(f){return n=f,r=f,o(f)}function c(f){const p=o(f)-o(r),b=s(f)-s(n)>170;return r=f,b&&(n=f),p}function u(f){if(!n||!r)return 0;const p=o(r)-o(n),b=s(f)-s(n),m=s(f)-s(r)>170,g=p/b;return b&&!m&&G(g)>.1?g:0}return{pointerDown:a,pointerMove:c,pointerUp:u,readPoint:o}}function da(){function e(i){const{offsetTop:n,offsetLeft:r,offsetWidth:s,offsetHeight:o}=i;return{top:n,right:r+s,bottom:n+o,left:r,width:s,height:o}}return{measure:e}}function ua(e){function t(n){return e*(n/100)}return{measure:t}}function ha(e,t,i,n,r,s,o){const a=[e].concat(n);let c,u,d=[],f=!1;function p(_){return r.measureSize(o.measure(_))}function b(_){if(!s)return;u=p(e),d=n.map(p);function w(x){for(const C of x){if(f)return;const T=C.target===e,U=n.indexOf(C.target),L=T?u:d[U],k=p(T?e:n[U]);if(G(k-L)>=.5){_.reInit(),t.emit("resize");break}}}c=new ResizeObserver(x=>{(Ki(s)||s(_,x))&&w(x)}),i.requestAnimationFrame(()=>{a.forEach(x=>c.observe(x))})}function m(){f=!0,c&&c.disconnect()}return{init:b,destroy:m}}function fa(e,t,i,n,r,s){let o=0,a=0,c=r,u=s,d=e.get(),f=0;function p(){const L=n.get()-e.get(),k=!c;let S=0;return k?(o=0,i.set(n),e.set(n),S=L):(i.set(e),o+=L/c,o*=u,d+=o,e.add(o),S=d-f),a=Mn(S),f=d,U}function b(){const L=n.get()-t.get();return G(L)<.001}function m(){return c}function g(){return a}function _(){return o}function w(){return C(r)}function x(){return T(s)}function C(L){return c=L,U}function T(L){return u=L,U}const U={direction:g,duration:m,velocity:_,seek:p,settled:b,useBaseFriction:x,useBaseDuration:w,useFriction:T,useDuration:C};return U}function pa(e,t,i,n,r){const s=r.measure(10),o=r.measure(50),a=Ft(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(i.get())||!e.reachedAny(t.get()))}function d(b){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=G(e[m]-t.get()),_=i.get()-t.get(),w=a.constrain(g/o);i.subtract(_*w),!b&&G(_)<s&&(i.set(e.constrain(i.get())),n.useDuration(25).useBaseFriction())}function f(b){c=!b}return{shouldConstrain:u,constrain:d,toggleActive:f}}function ma(e,t,i,n,r){const s=Ft(-t+e,0),o=f(),a=d(),c=p();function u(m,g){return oi(m,g)<=1}function d(){const m=o[0],g=Be(o),_=o.lastIndexOf(m),w=o.indexOf(g)+1;return Ft(_,w)}function f(){return i.map((m,g)=>{const{min:_,max:w}=s,x=s.constrain(m),C=!g,T=On(i,g);return C?w:T||u(_,x)?_:u(w,x)?w:x}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(n==="keepSnaps")return o;const{min:m,max:g}=a;return o.slice(m,g)}return{snapsContained:c,scrollContainLimit:a}}function ga(e,t,i){const n=t[0],r=i?n-e:Be(t);return{limit:Ft(r,n)}}function ya(e,t,i,n){const s=t.min+.1,o=t.max+.1,{reachedMin:a,reachedMax:c}=Ft(s,o);function u(p){return p===1?c(i.get()):p===-1?a(i.get()):!1}function d(p){if(!u(p))return;const b=e*(p*-1);n.forEach(m=>m.add(b))}return{loop:d}}function ba(e){const{max:t,length:i}=e;function n(s){const o=s-t;return i?o/-i:0}return{get:n}}function wa(e,t,i,n,r){const{startEdge:s,endEdge:o}=e,{groupSlides:a}=r,c=f().map(t.measure),u=p(),d=b();function f(){return a(n).map(g=>Be(g)[o]-g[0][s]).map(G)}function p(){return n.map(g=>i[s]-g[s]).map(g=>-G(g))}function b(){return a(u).map(g=>g[0]).map((g,_)=>g+c[_])}return{snaps:u,snapsAligned:d}}function _a(e,t,i,n,r,s){const{groupSlides:o}=r,{min:a,max:c}=n,u=d();function d(){const p=o(s),b=!e||t==="keepSnaps";return i.length===1?[s]:b?p:p.slice(a,c).map((m,g,_)=>{const w=!g,x=On(_,g);if(w){const C=Be(_[0])+1;return yr(C)}if(x){const C=Fi(s)-Be(_)[0]+1;return yr(C,Be(_)[0])}return m})}return{slideRegistry:u}}function va(e,t,i,n,r){const{reachedAny:s,removeOffset:o,constrain:a}=n;function c(m){return m.concat().sort((g,_)=>G(g)-G(_))[0]}function u(m){const g=e?o(m):a(m),_=t.map((x,C)=>({diff:d(x-g,0),index:C})).sort((x,C)=>G(x.diff)-G(C.diff)),{index:w}=_[0];return{index:w,distance:g}}function d(m,g){const _=[m,m+i,m-i];if(!e)return m;if(!g)return c(_);const w=_.filter(x=>Mn(x)===g);return w.length?c(w):Be(_)-i}function f(m,g){const _=t[m]-r.get(),w=d(_,g);return{index:m,distance:w}}function p(m,g){const _=r.get()+m,{index:w,distance:x}=u(_),C=!e&&s(_);if(!g||C)return{index:w,distance:m};const T=t[w]-x,U=m+d(T,0);return{index:w,distance:U}}return{byDistance:p,byIndex:f,shortcut:d}}function xa(e,t,i,n,r,s,o){function a(f){const p=f.distance,b=f.index!==t.get();s.add(p),p&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),b&&(i.set(t.get()),t.set(f.index),o.emit("select"))}function c(f,p){const b=r.byDistance(f,p);a(b)}function u(f,p){const b=t.clone().set(f),m=r.byIndex(b.get(),p);a(m)}return{distance:c,index:u}}function Sa(e,t,i,n,r,s,o,a){const c={passive:!0,capture:!0};let u=0;function d(b){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const x=i.findIndex(C=>C.includes(g));Nn(x)&&(r.useDuration(0),n.index(x,0),o.emit("slideFocus"))}s.add(document,"keydown",f,!1),t.forEach((g,_)=>{s.add(g,"focus",w=>{(Ki(a)||a(b,w))&&m(_)},c)})}function f(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function ii(e){let t=e;function i(){return t}function n(c){t=o(c)}function r(c){t+=o(c)}function s(c){t-=o(c)}function o(c){return Nn(c)?c:c.get()}return{get:i,set:n,add:r,subtract:s}}function ts(e,t){const i=e.scroll==="x"?o:a,n=t.style;let r=null,s=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function c(p){if(s)return;const b=ra(e.direction(p));b!==r&&(n.transform=i(b),r=b)}function u(p){s=!p}function d(){s||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function Ca(e,t,i,n,r,s,o,a,c){const d=ai(r),f=ai(r).reverse(),p=w().concat(x());function b(k,S){return k.reduce((I,$)=>I-r[$],S)}function m(k,S){return k.reduce((I,$)=>b(I,S)>0?I.concat([$]):I,[])}function g(k){return s.map((S,I)=>({start:S-n[I]+.5+k,end:S+t-.5+k}))}function _(k,S,I){const $=g(S);return k.map(V=>{const D=I?0:-i,Q=I?i:0,X=I?"end":"start",H=$[V][X];return{index:V,loopPoint:H,slideLocation:ii(-1),translate:ts(e,c[V]),target:()=>a.get()>H?D:Q}})}function w(){const k=o[0],S=m(f,k);return _(S,i,!1)}function x(){const k=t-o[0]-1,S=m(d,k);return _(S,-i,!0)}function C(){return p.every(({index:k})=>{const S=d.filter(I=>I!==k);return b(S,t)<=.1})}function T(){p.forEach(k=>{const{target:S,translate:I,slideLocation:$}=k,V=S();V!==$.get()&&(I.to(V),$.set(V))})}function U(){p.forEach(k=>k.translate.clear())}return{canLoop:C,clear:U,loop:T,loopPoints:p}}function Aa(e,t,i){let n,r=!1;function s(c){if(!i)return;function u(d){for(const f of d)if(f.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{r||(Ki(i)||i(c,d))&&u(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:s,destroy:o}}function Ra(e,t,i,n){const r={};let s=null,o=null,a,c=!1;function u(){a=new IntersectionObserver(m=>{c||(m.forEach(g=>{const _=t.indexOf(g.target);r[_]=g}),s=null,o=null,i.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(m=>a.observe(m))}function d(){a&&a.disconnect(),c=!0}function f(m){return li(r).reduce((g,_)=>{const w=parseInt(_),{isIntersecting:x}=r[w];return(m&&x||!m&&!x)&&g.push(w),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&o)return o;const g=f(m);return m&&(s=g),m||(o=g),g}return{init:u,destroy:d,get:p}}function Fa(e,t,i,n,r,s){const{measureSize:o,startEdge:a,endEdge:c}=e,u=i[0]&&r,d=m(),f=g(),p=i.map(o),b=_();function m(){if(!u)return 0;const x=i[0];return G(t[a]-x[a])}function g(){if(!u)return 0;const x=s.getComputedStyle(Be(n));return parseFloat(x.getPropertyValue(`margin-${c}`))}function _(){return i.map((x,C,T)=>{const U=!C,L=On(T,C);return U?p[C]+d:L?p[C]+f:T[C+1][a]-x[a]}).map(G)}return{slideSizes:p,slideSizesWithGaps:b,startGap:d,endGap:f}}function ka(e,t,i,n,r,s,o,a,c){const{startEdge:u,endEdge:d,direction:f}=e,p=Nn(i);function b(w,x){return ai(w).filter(C=>C%x===0).map(C=>w.slice(C,C+x))}function m(w){return w.length?ai(w).reduce((x,C,T)=>{const U=Be(x)||0,L=U===0,k=C===Fi(w),S=r[u]-s[U][u],I=r[u]-s[C][d],$=!n&&L?f(o):0,V=!n&&k?f(a):0,D=G(I-V-(S+$));return T&&D>t+c&&x.push(C),k&&x.push(w.length),x},[]).map((x,C,T)=>{const U=Math.max(T[C-1]||0);return w.slice(U,x)}):[]}function g(w){return p?b(w,i):m(w)}return{groupSlides:g}}function ja(e,t,i,n,r,s,o){const{align:a,axis:c,direction:u,startIndex:d,loop:f,duration:p,dragFree:b,dragThreshold:m,inViewThreshold:g,slidesToScroll:_,skipSnaps:w,containScroll:x,watchResize:C,watchSlides:T,watchDrag:U,watchFocus:L}=s,k=2,S=da(),I=S.measure(t),$=i.map(S.measure),V=aa(c,u),D=V.measureSize(I),Q=ua(D),X=sa(a,D),H=!f&&!!x,te=f||!!x,{slideSizes:ne,slideSizesWithGaps:_e,startGap:ve,endGap:Pe}=Fa(V,I,$,i,te,r),me=ka(V,D,_,f,I,$,ve,Pe,k),{snaps:ge,snapsAligned:xe}=wa(V,X,I,$,me),le=-Be(ge)+Be(_e),{snapsContained:Ue,scrollContainLimit:ye}=ma(D,le,xe,x,k),M=H?Ue:xe,{limit:J}=ga(le,M,f),Se=es(Fi(M),d,f),ce=Se.clone(),W=ai(i),j=({dragHandler:jt,scrollBody:en,scrollBounds:tn,options:{loop:ji}})=>{ji||tn.constrain(jt.pointerDown()),en.seek()},B=({scrollBody:jt,translate:en,location:tn,offsetLocation:ji,previousLocation:ks,scrollLooper:js,slideLooper:Is,dragHandler:Es,animation:Ts,eventHandler:Jn,scrollBounds:Ps,options:{loop:Yn}},Zn)=>{const er=jt.settled(),Us=!Ps.shouldConstrain(),tr=Yn?er:er&&Us,ir=tr&&!Es.pointerDown();ir&&Ts.stop();const qs=tn.get()*Zn+ks.get()*(1-Zn);ji.set(qs),Yn&&(js.loop(jt.direction()),Is.loop()),en.to(ji.get()),ir&&Jn.emit("settle"),tr||Jn.emit("scroll")},Z=oa(n,r,()=>j(Zi),jt=>B(Zi,jt)),de=.68,De=M[Se.get()],Ze=ii(De),gt=ii(De),ct=ii(De),yt=ii(De),Yt=fa(Ze,ct,gt,yt,p,de),Ji=va(f,M,le,J,yt),Yi=xa(Z,Se,ce,Yt,Ji,yt,o),Kn=ba(J),Qn=ci(),Rs=Ra(t,i,o,g),{slideRegistry:Xn}=_a(H,x,M,ye,me,W),Fs=Sa(e,i,Xn,Yi,Yt,Qn,o,L),Zi={ownerDocument:n,ownerWindow:r,eventHandler:o,containerRect:I,slideRects:$,animation:Z,axis:V,dragHandler:la(V,e,n,r,yt,ca(V,r),Ze,Z,Yi,Yt,Ji,Se,o,Q,b,m,w,de,U),eventStore:Qn,percentOfView:Q,index:Se,indexPrevious:ce,limit:J,location:Ze,offsetLocation:ct,previousLocation:gt,options:s,resizeHandler:ha(t,o,r,i,V,C,S),scrollBody:Yt,scrollBounds:pa(J,ct,yt,Yt,Q),scrollLooper:ya(le,J,ct,[Ze,ct,gt,yt]),scrollProgress:Kn,scrollSnapList:M.map(Kn.get),scrollSnaps:M,scrollTarget:Ji,scrollTo:Yi,slideLooper:Ca(V,D,le,ne,_e,ge,M,ct,i),slideFocus:Fs,slidesHandler:Aa(t,o,T),slidesInView:Rs,slideIndexes:W,slideRegistry:Xn,slidesToScroll:me,target:yt,translate:ts(V,t)};return Zi}function Ia(){let e={},t;function i(u){t=u}function n(u){return e[u]||[]}function r(u){return n(u).forEach(d=>d(t,u)),c}function s(u,d){return e[u]=n(u).concat([d]),c}function o(u,d){return e[u]=n(u).filter(f=>f!==d),c}function a(){e={}}const c={init:i,emit:r,off:o,on:s,clear:a};return c}const Ea={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Ta(e){function t(s,o){return Zr(s,o||{})}function i(s){const o=s.breakpoints||{},a=li(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,u)=>t(c,u),{});return t(s,a)}function n(s){return s.map(o=>li(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:i,optionsMediaQueries:n}}function Pa(e){let t=[];function i(s,o){return t=o.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),o.reduce((a,c)=>Object.assign(a,{[c.name]:c}),{})}function n(){t=t.filter(s=>s.destroy())}return{init:i,destroy:n}}function Li(e,t,i){const n=e.ownerDocument,r=n.defaultView,s=Ta(r),o=Pa(s),a=ci(),c=Ia(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:p,off:b,emit:m}=c,g=V;let _=!1,w,x=u(Ea,Li.globalOptions),C=u(x),T=[],U,L,k;function S(){const{container:W,slides:j}=C;L=(mn(W)?e.querySelector(W):W)||e.children[0];const Z=mn(j)?L.querySelectorAll(j):j;k=[].slice.call(Z||L.children)}function I(W){const j=ja(e,L,k,n,r,W,c);if(W.loop&&!j.slideLooper.canLoop()){const B=Object.assign({},W,{loop:!1});return I(B)}return j}function $(W,j){_||(x=u(x,W),C=d(x),T=j||T,S(),w=I(C),f([x,...T.map(({options:B})=>B)]).forEach(B=>a.add(B,"change",V)),C.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(ce),w.eventHandler.init(ce),w.resizeHandler.init(ce),w.slidesHandler.init(ce),w.options.loop&&w.slideLooper.loop(),L.offsetParent&&k.length&&w.dragHandler.init(ce),U=o.init(ce,T)))}function V(W,j){const B=me();D(),$(u({startIndex:B},W),j),c.emit("reInit")}function D(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),o.destroy(),a.clear()}function Q(){_||(_=!0,a.clear(),D(),c.emit("destroy"),c.clear())}function X(W,j,B){!C.active||_||(w.scrollBody.useBaseFriction().useDuration(j===!0?0:C.duration),w.scrollTo.index(W,B||0))}function H(W){const j=w.index.add(1).get();X(j,W,-1)}function te(W){const j=w.index.add(-1).get();X(j,W,1)}function ne(){return w.index.add(1).get()!==me()}function _e(){return w.index.add(-1).get()!==me()}function ve(){return w.scrollSnapList}function Pe(){return w.scrollProgress.get(w.offsetLocation.get())}function me(){return w.index.get()}function ge(){return w.indexPrevious.get()}function xe(){return w.slidesInView.get()}function le(){return w.slidesInView.get(!1)}function Ue(){return U}function ye(){return w}function M(){return e}function J(){return L}function Se(){return k}const ce={canScrollNext:ne,canScrollPrev:_e,containerNode:J,internalEngine:ye,destroy:Q,off:b,on:p,emit:m,plugins:Ue,previousScrollSnap:ge,reInit:g,rootNode:M,scrollNext:H,scrollPrev:te,scrollProgress:Pe,scrollSnapList:ve,scrollTo:X,selectedScrollSnap:me,slideNodes:Se,slidesInView:xe,slidesNotInView:le};return $(t,i),setTimeout(()=>
1c.emit("init"),0),ce}Li.globalOptions=void 0;function $n(e={},t=[]){const i=F.useRef(e),n=F.useRef(t),[r,s]=F.useState(),[o,a]=F.useState(),c=F.useCallback(()=>{r&&r.reInit(i.current,n.current)},[r]);return F.useEffect(()=>{Ln(i.current,e)||(i.current=e,c())},[e,c]),F.useEffect(()=>{ia(n.current,t)||(n.current=t,c())},[t,c]),F.useEffect(()=>{if(ta()&&o){Li.globalOptions=$n.globalOptions;const u=Li(o,i.current,n.current);return s(u),()=>u.destroy()}else s(void 0)},[o,s]),[a,r]}$n.globalOptions=void 0;const Ua={direction:"forward",speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null};function qa(e,t){const i=e.rootNode();return t&&t(i)||i}function Vn(e={}){let t,i,n,r,s=0,o=!1,a=!1,c;function u(I,$){i=I;const{mergeOptions:V,optionsAtMedia:D}=$,Q=V(Ua,Vn.globalOptions),X=V(Q,e);if(t=D(X),i.scrollSnapList().length<=1)return;r=t.startDelay,n=!1,c=i.internalEngine().scrollBody;const{eventStore:H}=i.internalEngine(),te=!!i.internalEngine().options.watchDrag,ne=qa(i,t.rootNode);te&&i.on("pointerDown",m),te&&!t.stopOnInteraction&&i.on("pointerUp",g),t.stopOnMouseEnter&&H.add(ne,"mouseenter",_),t.stopOnMouseEnter&&!t.stopOnInteraction&&H.add(ne,"mouseleave",w),t.stopOnFocusIn&&i.on("slideFocusStart",p),t.stopOnFocusIn&&!t.stopOnInteraction&&H.add(i.containerNode(),"focusout",f),t.playOnInit&&f()}function d(){i.off("pointerDown",m).off("pointerUp",g).off("slideFocusStart",p).off("settle",x),p(),n=!0,o=!1}function f(){if(n||o)return;i.emit("autoScroll:play");const I=i.internalEngine(),{ownerWindow:$}=I;s=$.setTimeout(()=>{I.scrollBody=b(I),I.animation.start()},r),o=!0}function p(){if(n||!o)return;i.emit("autoScroll:stop");const I=i.internalEngine(),{ownerWindow:$}=I;I.scrollBody=c,$.clearTimeout(s),s=0,o=!1}function b(I){const{location:$,previousLocation:V,offsetLocation:D,target:Q,scrollTarget:X,index:H,indexPrevious:te,limit:{reachedMin:ne,reachedMax:_e,constrain:ve},options:{loop:Pe}}=I,me=t.direction==="forward"?-1:1,ge=()=>Se;let xe=0,le=0,Ue=$.get(),ye=0,M=!1;function J(){let ce=0;V.set($),xe=me*t.speed,Ue+=xe,$.add(xe),Q.set($),ce=Ue-ye,le=Math.sign(ce),ye=Ue;const W=X.byDistance(0,!1).index;H.get()!==W&&(te.set(H.get()),H.set(W),i.emit("select"));const j=t.direction==="forward"?ne(D.get()):_e(D.get());if(!Pe&&j){M=!0;const B=ve($.get());$.set(B),Q.set($),p()}return Se}const Se={direction:()=>le,duration:()=>-1,velocity:()=>xe,settled:()=>M,seek:J,useBaseFriction:ge,useBaseDuration:ge,useFriction:ge,useDuration:ge};return Se}function m(){a||p()}function g(){a||C()}function _(){a=!0,p()}function w(){a=!1,f()}function x(){i.off("settle",x),f()}function C(){i.on("settle",x)}function T(I){typeof I<"u"&&(r=I),f()}function U(){o&&p()}function L(){o&&(p(),C())}function k(){return o}return{name:"autoScroll",options:e,init:u,destroy:d,play:T,stop:U,reset:L,isPlaying:k}}Vn.globalOptions=void 0;const st=({id:e})=>{const t=Xt("songs",e);return t?l.jsxs(st.Slide,{children:[l.jsx(st.Cover,{src:t.songArtImageThumbnailUrl,alt:t.title}),l.jsx(st.Title,{children:t.title}),l.jsx(st.Artists,{children:t.primaryArtistNames})]}):null};st.Slide=y.div.withConfig({displayName:"SongsCarouselItem__Slide",componentId:"sc-ec90e3f1-0"})(["flex:0 0 11rem;min-width:0;padding-left:",";display:flex;flex-direction:column;font-family:",";font-weight:",";"],e=>e.theme.space.small,e=>e.theme.font.reading,e=>e.theme.fontWeight.light);st.Cover=y.img.withConfig({displayName:"SongsCarouselItem__Cover",componentId:"sc-ec90e3f1-1"})(["width:11rem;aspect-ratio:1 / 1;object-fit:cover;display:block;margin-bottom:",";"],e=>e.theme.space.half);st.Title=y.div.withConfig({displayName:"SongsCarouselItem__Title",componentId:"sc-ec90e3f1-2"})(["font-size:",";line-height:",";margin-bottom:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],e=>e.theme.fontSize.reading,e=>e.theme.lineHeight.hug,e=>e.theme.space.hair);st.Artists=y.div.withConfig({displayName:"SongsCarouselItem__Artists",componentId:"sc-ec90e3f1-3"})(["font-size:",";line-height:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],e=>e.theme.fontSize.smallReading,e=>e.theme.lineHeight.xxSmallReading);const La=4,pt=Re.memo(({songIds:e})=>{const i=Br("songs",e).length>=La,[n]=$n({loop:!0,active:i,dragFree:!0},i?[Vn({playOnInit:!0,speed:.5,stopOnInteraction:!1,stopOnMouseEnter:!0,stopOnFocusIn:!1,rootNode:r=>r.parentElement})]:[]);return l.jsx(pt.Root,{children:l.jsx(pt.Viewport,{ref:n,$faded:i,children:l.jsx(pt.Container,{$centered:!i,children:e.map(r=>l.jsx(st,{id:r},r))})})})},Js);pt.displayName="memo(SongsCarousel)";const br=N(["linear-gradient(to right,transparent,black 8%,black 92%,transparent)"]);pt.Root=y.div.withConfig({displayName:"SongsCarousel__Root",componentId:"sc-a97237dc-0"})(["width:100vw;min-width:0;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);overflow:hidden;"," ",""],O(N(["width:calc("," * 7 + "," * 7);max-width:none;margin-left:calc("," * -0.5 - ",");margin-right:calc("," * -0.5 - ",");"],e=>e.theme.grid.columnWidth,e=>e.theme.grid.gap,e=>e.theme.grid.columnWidth,e=>e.theme.grid.gap,e=>e.theme.grid.columnWidth,e=>e.theme.grid.gap)),Hs(N(["width:calc("," * 7 + "," * 7);max-width:none;margin-left:calc("," * -0.5 - ",");margin-right:calc("," * -0.5 - ",");"],e=>e.theme.grid.largeColumnWidth,e=>e.theme.grid.gap,e=>e.theme.grid.largeColumnWidth,e=>e.theme.grid.gap,e=>e.theme.grid.largeColumnWidth,e=>e.theme.grid.gap)));pt.Viewport=y.div.withConfig({displayName:"SongsCarousel__Viewport",componentId:"sc-a97237dc-1"})(["overflow:hidden;",""],O(N(["",""],e=>e.$faded&&N(["mask-image:",";-webkit-mask-image:",";"],br,br))));pt.Container=y.div.withConfig({displayName:"SongsCarousel__Container",componentId:"sc-a97237dc-2"})(["display:flex;margin-left:-",";touch-action:pan-y pinch-zoom;",""],e=>e.theme.space.small,e=>e.$centered&&N(["justify-content:center;margin-left:0;& > :first-child{padding-left:0;}"]));const Ae=({title:e,message:t,buttonLabel:i,buttonHref:n,secondaryButtonLabel:r,secondaryButtonHref:s})=>l.jsxs(Ae.Container,{children:[l.jsxs(Ae.Copy,{children:[l.jsx(Ae.Title,{children:e}),l.jsx(Ae.Message,{children:t})]}),l.jsxs(Ae.Actions,{children:[l.jsx(pe,{as:"a",href:n,children:i}),r&&s&&l.jsx(pe,{secondary:!0,as:"a",href:s,children:r})]})]});Ae.propTypes={title:v.string.isRequired,message:v.string.isRequired,buttonLabel:v.string.isRequired,buttonHref:v.string.isRequired,secondaryButtonLabel:v.string,secondaryButtonHref:v.string};Ae.Container=y.div.withConfig({displayName:"VerificationResult__Container",componentId:"sc-b46e628f-0"})(["display:flex;flex-direction:column;text-align:center;max-width:33rem;margin:0 auto;"]);Ae.Copy=y.div.withConfig({displayName:"VerificationResult__Copy",componentId:"sc-b46e628f-1"})(["display:flex;flex-direction:column;gap:",";"],e=>e.theme.space.half);Ae.Title=y.h1.withConfig({displayName:"VerificationResult__Title",componentId:"sc-b46e628f-2"})(["font-size:",";line-height:",";color:",";",""],e=>e.theme.fontSize.largeHeadline,e=>e.theme.lineHeight.short,e=>e.theme.color.accentFont,O(N(["font-size:",";line-height:",";"],e=>e.theme.fontSize.xLargeHeadline,e=>e.theme.lineHeight.normal)));Ae.Message=y.p.withConfig({displayName:"VerificationResult__Message",componentId:"sc-b46e628f-3"})(["font-size:",";font-weight:",";line-height:",";"],e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.reading);Ae.Actions=y.div.withConfig({displayName:"VerificationResult__Actions",componentId:"sc-b46e628f-4"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-top:",";",""],e=>e.theme.space.half,e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xLarge)));const ki=({code:e})=>{const{t,i18n:i}=K(),r=e&&i.exists(`artist_verification_page.claim_error.messages.${e}
1`)?e:"default",o=r==="default"?{buttonLabel:t("artist_verification_page.claim_error.go_home"),buttonHref:"/"}:{buttonLabel:t("artist_verification_page.claim_error.contact_support"),buttonHref:"/feedback/new",secondaryButtonLabel:t("artist_verification_page.claim_error.go_home"),secondaryButtonHref:"/"};return l.jsx(Ae,{title:t("artist_verification_page.claim_error.title"),message:t(`artist_verification_page.claim_error.messages.${r}`),...o})};ki.propTypes={code:v.string};const wr=96,_r=144;function fe(){const{t:e}=K(),t=lt(),i=ee(m=>m.artistVerificationRequest.selectedArtist);Go(i,{skip:!i});const{data:n}=co({artistId:i,perPage:10},{skip:!i}),r=Xt("artists",i),s=n?.songs.map(m=>m.id)||[],[o,a]=F.useState(!1),[c,u]=F.useState(null),d=Jt(),{data:f}=Qo(i,{skip:!i}),p=F.useCallback(()=>{if(f?.claimBlocker){u(f.claimBlocker);return}d&&(f?.canUpgradeSelf||f?.canClaimAsCreator)?(a(!0),window.location.href=`/artist_verification_requests/verify?artist=${encodeURIComponent(r.slug)}`):t(Qt("manual_application"))},[t,d,f,r]),b=F.useCallback(()=>t(Qt()),[t]);return c?l.jsx(ki,{code:c}):!r||!n?l.jsx(Un,{}):l.jsxs(fe.Wrapper,{children:[l.jsxs(fe.ArtistSection,{children:[l.jsx(fe.Avatar,{src:r.imageUrl,alt:r.name}),l.jsxs(fe.Copy,{children:[l.jsx(fe.Name,{children:r.name}),l.jsx(fe.Subtitle,{children:e("artist_verification_page.new.confirm_subtitle")})]})]}),l.jsx(pt,{songIds:s}),l.jsxs(fe.Actions,{children:[l.jsx(pe,{onClick:p,loading:o,disabled:o,children:e("artist_verification_page.new.confirm")}),l.jsx(pe,{secondary:!0,onClick:b,children:e("artist_verification_page.new.back")})]})]})}fe.Wrapper=y.div.withConfig({displayName:"ConfirmArtist__Wrapper",componentId:"sc-80d52747-0"})(["display:flex;flex-direction:column;align-items:center;width:100%;min-width:0;"]);fe.ArtistSection=y.div.withConfig({displayName:"ConfirmArtist__ArtistSection",componentId:"sc-80d52747-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-bottom:",";",""],e=>e.theme.space.small,e=>e.theme.space.large,O(N(["padding-bottom:",";"],e=>e.theme.space.xxLarge)));fe.Avatar=y.img.withConfig({displayName:"ConfirmArtist__Avatar",componentId:"sc-80d52747-2"})(["width:","px;height:","px;border-radius:100%;object-fit:cover;",""],wr,wr,O(N(["width:","px;height:","px;"],_r,_r)));fe.Copy=y.div.withConfig({displayName:"ConfirmArtist__Copy",componentId:"sc-80d52747-3"})(["display:flex;flex-direction:column;align-items:center;gap:",";text-align:center;"],e=>e.theme.space.half);fe.Name=y.h1.withConfig({displayName:"ConfirmArtist__Name",componentId:"sc-80d52747-4"})(["font-family:",";font-size:",";font-weight:",";line-height:",";margin:0;color:",";",""],e=>e.theme.font.reading,e=>e.theme.fontSize.largeHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.lineHeight.xShort,e=>e.theme.color.accentFont,O(N(["font-size:",";line-height:",";"],e=>e.theme.fontSize.xLargeHeadline,e=>e.theme.lineHeight.normal)));fe.Subtitle=y.p.withConfig({displayName:"ConfirmArtist__Subtitle",componentId:"sc-80d52747-5"})(["font-family:",";font-size:",";font-weight:",";margin:0;"],e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light);fe.Actions=y.div.withConfig({displayName:"ConfirmArtist__Actions",componentId:"sc-80d52747-6"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-top:",";",""],e=>e.theme.space.half,e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xxLarge)));const Qi=({src:e})=>l.jsx(Qi.Container,{children:l.jsx(Xr,{src:e,aspectRatio:1})});Qi.propTypes={src:v.string.isRequired};const is=Re.memo(Qi);Qi.Container=y.div.withConfig({displayName:"VerificationArtistPhoto__Container",componentId:"sc-7569825b-0"})(["width:6rem;height:6rem;border-radius:50%;overflow:hidden;",""],O(N(["width:8rem;height:8rem;"])));const Je=({imageUrl:e,title:t,caption:i})=>l.jsxs(Je.Container,{children:[l.jsx(is,{src:e}),l.jsxs(Je.Body,{children:[l.jsx(Je.Title,{children:t}),i&&l.jsx(Je.Caption,{children:i})]})]});Je.propTypes={imageUrl:v.string.isRequired,title:v.string.isRequired,caption:v.string};const zn=Re.memo(Je);Je.Container=y.div.withConfig({displayName:"ArtistVerificationHeader__Container",componentId:"sc-30e3f27d-0"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-bottom:",";width:100%;",""],e=>e.theme.space.small,e=>e.theme.space.large,O(N(["padding-bottom:",";"],e=>e.theme.space.xLarge)));Je.Body=y.div.withConfig({displayName:"ArtistVerificationHeader__Body",componentId:"sc-30e3f27d-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";text-align:center;"],e=>e.theme.space.half);Je.Title=y.h1.withConfig({displayName:"ArtistVerificationHeader__Title",componentId:"sc-30e3f27d-2"})(["font-size:",";line-height:",";color:",";",""],e=>e.theme.fontSize.largeHeadline,e=>e.theme.lineHeight.xShort,e=>e.theme.color.accentFont,O(N(["font-size:",";line-height:",";"],e=>e.theme.fontSize.xLargeHeadline,e=>e.theme.lineHeight.normal)));Je.Caption=y.p.withConfig({displayName:"ArtistVerificationHeader__Caption",componentId:"sc-30e3f27d-3"})(["font-size:",";font-weight:",";line-height:",";max-width:26rem;"],e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.medium);const Ye=({icon:e,label:t,buttonText:i,onClick:n})=>l.jsxs(Ye.Container,{children:[l.jsxs(Ye.Body,{children:[l.jsx(Ye.Icon,{children:e}),l.jsx(Ye.Label,{children:t})]}),l.jsx(pe,{onClick:n,children:i})]});Ye.propTypes={icon:v.node.isRequired,label:v.string.isRequired,buttonText:v.string.isRequired,onClick:v.func.isRequired};const Na=Re.memo(Ye);Ye.Container=y.div.withConfig({displayName:"VerificationMethodCard__C
1ontainer",componentId:"sc-4fc478e4-0"})(["display:flex;flex-direction:column;align-items:center;flex:1;min-width:19.5rem;gap:",";border:1px solid ",";padding:"," ",";"],e=>e.theme.space.full,e=>e.theme.color.border.adaptive,e=>e.theme.space.xLarge,e=>e.theme.space.small);Ye.Body=y.div.withConfig({displayName:"VerificationMethodCard__Body",componentId:"sc-4fc478e4-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";"],e=>e.theme.space.half);Ye.Icon=y.div.withConfig({displayName:"VerificationMethodCard__Icon",componentId:"sc-4fc478e4-2"})(["height:",";width:auto;svg{height:100%;}"],e=>e.theme.space.large);Ye.Label=y.span.withConfig({displayName:"VerificationMethodCard__Label",componentId:"sc-4fc478e4-3"})(["font-weight:",";line-height:",";"],e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.medium);const ot=()=>{const e=Jt(),t=lt(),{t:i}=K(),n=ee(a=>a.artistVerificationRequest.selectedArtist),r=Xt("artists",n),s=F.useCallback(()=>t(Qt("manual_application")),[t]),o=F.useCallback(()=>{window.location.href="/login?gfa_theme=1"},[]);return r?l.jsxs(ot.Form,{children:[l.jsx(zn,{imageUrl:r.imageUrl,title:r.name,caption:i("artist_verification_page.verification_method.subtitle")}),l.jsx(ot.CardsGrid,{children:l.jsx(Na,{icon:l.jsx(uo,{}),label:i("artist_verification_page.verification_method.manual_verification"),buttonText:i("artist_verification_page.verification_method.get_started"),onClick:s})}),l.jsx(ot.HelperText,{children:e?i("artist_verification_page.verification_method.login_helper_not_eligible"):l.jsxs(l.Fragment,{children:[i("artist_verification_page.verification_method.login_helper_prefix",{artist_name:r.name}),l.jsx(ot.SignInLink,{onClick:o,children:i("artist_verification_page.verification_method.login_helper_link")})]})})]}):l.jsx("div",{children:"This page is under maintenance"})};ot.Form=y.div.withConfig({displayName:"VerificationMethodSelectionPage__Form",componentId:"sc-dacbc26-0"})(["display:flex;flex-direction:column;align-items:center;padding:"," 0;",""],e=>e.theme.space.xxLarge,O(N(["padding:"," 0;"],e=>e.theme.space.xxxLarge)));ot.CardsGrid=y.div.withConfig({displayName:"VerificationMethodSelectionPage__CardsGrid",componentId:"sc-dacbc26-1"})(["display:flex;flex-wrap:wrap;justify-content:center;width:100%;gap:",";"],e=>e.theme.grid.gap);ot.HelperText=y.div.withConfig({displayName:"VerificationMethodSelectionPage__HelperText",componentId:"sc-dacbc26-2"})(["font-size:",";font-weight:",";line-height:",";color:",";padding:"," "," 0;",""],e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.smallReading,e=>e.theme.color.background.onSecondary,e=>e.theme.space.large,e=>e.theme.space.small,O(N(["padding:"," "," 0;"],e=>e.theme.space.xLarge,e=>e.theme.space.small)));ot.SignInLink=y.button.withConfig({displayName:"VerificationMethodSelectionPage__SignInLink",componentId:"sc-dacbc26-3"})(["font:inherit;color:inherit;text-decoration:underline;text-decoration-skip-ink:none;cursor:pointer;display:block;margin:0 auto;",""],O(N(["display:inline;margin-left:",";"],e=>e.theme.space.xSmall)));function ns(e,t){return Object.hasOwn(e,t)}const{AbortController:rn}=globalThis,rs=(e="Aborted",t)=>{const i=new DOMException(e,"AbortError");return t!=null&&ns(t,"cause")&&Object.defineProperty(i,"cause",{__proto__:null,configurable:!0,writable:!0,value:t.cause}),i};class Ma extends Error{constructor(i,n){super(i);z(this,"isNetworkError");z(this,"cause");this.cause=n?.cause,this.cause&&ns(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}class Oa extends Error{constructor(i,n=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.");z(this,"cause");z(this,"isNetworkError");z(this,"request");this.cause=i,this.isNetworkError=!0,this.request=n}}function $a(...e){return fetch(...e).catch(t=>{throw t.name==="AbortError"?t:new Oa(t)})}const Va=e=>"error"in e&&!!e.error,za=e=>e.progress.uploadComplete;function Ha(e){return e.filter(t=>!Va(t)&&!za(t))}function Ba(e){return e.filter(t=>!t.progress?.uploadStarted||!t.isRestored)}function ss(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}const vr={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function os(e){if(e.type)return e.type;const t=e.name?ss(e.name).extension?.toLowerCase():null;return t&&t in vr?vr[t]:"application/octet-stream"}function Wa(e){return e.charCodeAt(0).toString(32)}function xr(e){let t="";return e.replace(/[^A-Z0-9]/gi,i=>(t+=`-${Wa(i)}`,"/"))+t}function Da(e,t){let i=t||"uppy";return typeof e.name=="string"&&(i+=`-${xr(e.name.toLowerCase())}`),e.type!==void 0&&(i+=`-${e.type}`),e.meta&&typeof e.meta.relativePath=="string"&&(i+=`-${xr(e.meta.relativePath.toLowerCase())}`),e.data?.size!==void 0&&(i+=`-${e.data.size}`),e.data.lastModified!==void 0&&(i+=`-${e.data.lastModified}`),i}function Ga(e){return!e.isRemote||!e.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}function Ka(e,t){if(Ga(e))return e.id;const i=os(e);return Da({...e,type:i},t)}function Sr(e,t){return e===!0?Object.keys(t):Array.isArray(e)?e:[]}function Qa(e){const i=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?([^\n]+)/i.exec(e)?.[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${i}`}function sn(e){return e<10?`0${e}`:e.toString()}function Pi(){const e=new Date,t=sn(e.getHours()),i=sn(e.getMinutes()),n=sn(e.getSeconds());return`${t}:${i}:${n}`}function Xa(e){return new Error("Cancelled",{cause:e})}function Cr(e){if(e!=null){const t=()=>this.abort(e.reason);e.addEventListener("abort",t,{once:!0});const i=()=>{e.removeEventListener("abort",t)};this.then?.(i,i)}return this}var tt,Ge,it,Tt,Ke,Pt,wt,ae,yn,ni,as,ls,cs,Mi,Ut;class Ja{constructor(t){A(this,ae);A(this,tt,0);A(this,Ge,[]);A(this,it,!1);A(this,Tt);A(this,Ke,1);A(this,Pt);A(this,wt);z(this,"limit");A(this,Mi,()=>this.resume());A(this,Ut,()=>
1{if(h(this,it)){q(this,wt,setTimeout(h(this,Ut),0));return}q(this,Ke,this.limit),this.limit=Math.ceil((h(this,Pt)+h(this,Ke))/2);for(let t=h(this,Ke);t<=this.limit;t++)R(this,ae,ni).call(this);h(this,Pt)-h(this,Ke)>3?q(this,wt,setTimeout(h(this,Ut),2e3)):q(this,Ke,Math.floor(h(this,Ke)/2))});typeof t!="number"||t===0?this.limit=1/0:this.limit=t}run(t,i){return!h(this,it)&&h(this,tt)<this.limit?R(this,ae,yn).call(this,t):R(this,ae,ls).call(this,t,i)}wrapSyncFunction(t,i){return(...n)=>{const r=this.run(()=>(t(...n),queueMicrotask(()=>r.done()),()=>{}),i);return{abortOn:Cr,abort(){r.abort()}}}}wrapPromiseFunction(t,i){return(...n)=>{let r;const s=new Promise((o,a)=>{r=this.run(()=>{let c,u;try{u=Promise.resolve(t(...n))}catch(d){u=Promise.reject(d)}return u.then(d=>{c?a(c):(r.done(),o(d))},d=>{c?a(c):(r.done(),a(d))}),d=>{c=Xa(d)}},i)});return s.abort=o=>{r.abort(o)},s.abortOn=Cr,s}}resume(){q(this,it,!1),clearTimeout(h(this,Tt));for(let t=0;t<this.limit;t++)R(this,ae,ni).call(this)}pause(t=null){q(this,it,!0),clearTimeout(h(this,Tt)),t!=null&&q(this,Tt,setTimeout(h(this,Mi),t))}rateLimit(t){clearTimeout(h(this,wt)),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(q(this,Pt,this.limit-1),this.limit=h(this,Ke),q(this,wt,setTimeout(h(this,Ut),t)))}get isPaused(){return h(this,it)}}tt=new WeakMap,Ge=new WeakMap,it=new WeakMap,Tt=new WeakMap,Ke=new WeakMap,Pt=new WeakMap,wt=new WeakMap,ae=new WeakSet,yn=function(t){q(this,tt,h(this,tt)+1);let i=!1,n;try{n=t()}catch(r){throw q(this,tt,h(this,tt)-1),r}return{abort:r=>{i||(i=!0,q(this,tt,h(this,tt)-1),n?.(r),R(this,ae,ni).call(this))},done:()=>{i||(i=!0,q(this,tt,h(this,tt)-1),R(this,ae,ni).call(this))}}},ni=function(){queueMicrotask(()=>R(this,ae,as).call(this))},as=function(){if(h(this,it)||h(this,tt)>=this.limit||h(this,Ge).length===0)return;const t=h(this,Ge).shift();if(t==null)throw new Error("Invariant violation: next is null");const i=R(this,ae,yn).call(this,t.fn);t.abort=i.abort,t.done=i.done},ls=function(t,i){const n={fn:t,priority:i?.priority||0,abort:()=>{R(this,ae,cs).call(this,n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=h(this,Ge).findIndex(s=>n.priority>s.priority);return r===-1?h(this,Ge).push(n):h(this,Ge).splice(r,0,n),n},cs=function(t){const i=h(this,Ge).indexOf(t);i!==-1&&h(this,Ge).splice(i,1)},Mi=new WeakMap,Ut=new WeakMap;class Ya extends Error{constructor(){super(...arguments);z(this,"name","UserFacingApiError")}}var Qe,ui;class Za{constructor(t){A(this,Qe);A(this,ui,[]);q(this,Qe,t)}on(t,i){return h(this,ui).push([t,i]),h(this,Qe).on(t,i)}remove(){for(const[t,i]of h(this,ui).splice(0))h(this,Qe).off(t,i)}onFilePause(t,i){this.on("upload-pause",(n,r)=>{t===n?.id&&i(r)})}onFileRemove(t,i){this.on("file-removed",n=>{t===n.id&&i(n.id)})}onPause(t,i){this.on("upload-pause",(n,r)=>{t===n?.id&&i(r)})}onRetry(t,i){this.on("upload-retry",n=>{t===n?.id&&i()})}onRetryAll(t,i){this.on("retry-all",()=>{h(this,Qe).getFile(t)&&i()})}onPauseAll(t,i){this.on("pause-all",()=>{h(this,Qe).getFile(t)&&i()})}onCancelAll(t,i){this.on("cancel-all",(...n)=>{h(this,Qe).getFile(t)&&i(...n)})}onResumeAll(t,i){this.on("resume-all",()=>{h(this,Qe).getFile(t)&&i()})}}Qe=new WeakMap,ui=new WeakMap;const el={debug:()=>{},warn:()=>{},error:(...e)=>console.error(`[Uppy] [${Pi()}]`,...e)},tl={debug:(...e)=>console.debug(`[Uppy] [${Pi()}]`,...e),warn:(...e)=>console.warn(`[Uppy] [${Pi()}]`,...e),error:(...e)=>console.error(`[Uppy] [${Pi()}]`,...e)};var on,Ar;function il(){if(Ar)return on;Ar=1;function e(t,i){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=i,this.parts=t.split(i)}return e.prototype.match=function(t){var i=!0,n=this.parts,r,s=n.length,o;if(typeof t=="string"||t instanceof String)if(!this.hasWild&&this.text!=t)i=!1;else{for(o=(t||"").split(this.separator),r=0;i&&r<s;r++)n[r]!=="*"&&(r<o.length?i=n[r]===o[r]:i=!1);i=i&&o}else if(typeof t.splice=="function")for(i=[],r=t.length;r--;)this.match(t[r])&&(i[i.length]=t[r]);else if(typeof t=="object"){i={};for(var a in t)this.match(a)&&(i[a]=t[a])}return i},on=function(t,i,n){var r=new e(t,n||/[\/\.]/);return typeof i<"u"?r.match(i):r},on}var an,Rr;function nl(){if(Rr)return an;Rr=1;var e=il(),t=/[\/\+\.]/;return an=function(i,n){function r(s){var o=e(s,i,t);return o&&o.length>=2}return n?r(n.split(";")[0]):r},an}var rl=nl();const sl=Wi(rl),ol={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};
1class ze extends Error{constructor(i,n){super(i);z(this,"isUserFacing");z(this,"file");z(this,"isRestriction",!0);this.isUserFacing=n?.isUserFacing??!0,n?.file&&(this.file=n.file)}}class al{constructor(t,i){z(this,"getI18n");z(this,"getOpts");this.getI18n=i,this.getOpts=()=>{const n=t();if(n.restrictions?.allowedFileTypes!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validateAggregateRestrictions(t,i){const{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r&&t.filter(o=>!o.isGhost).length+i.length>r)throw new ze(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`);if(n){const s=[...t,...i].reduce((o,a)=>o+(a.size??0),0);if(s>n)throw new ze(this.getI18n()("aggregateExceedsSize",{sizeAllowed:Ii(n),size:Ii(s)}))}}validateSingleFile(t){const{maxFileSize:i,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r&&!r.some(o=>o.includes("/")?t.type?sl(t.type.replace(/;.*?$/,""),o):!1:o[0]==="."&&t.extension?t.extension.toLowerCase()===o.slice(1).toLowerCase():!1)){const o=r.join(", ");throw new ze(this.getI18n()("youCanOnlyUploadFileTypes",{types:o}),{file:t})}if(i&&t.size!=null&&t.size>i)throw new ze(this.getI18n()("exceedsSize",{size:Ii(i),file:t.name??this.getI18n()("unnamed")}),{file:t});if(n&&t.size!=null&&t.size<n)throw new ze(this.getI18n()("inferiorSize",{size:Ii(n)}),{file:t})}validate(t,i){i.forEach(n=>{this.validateSingleFile(n)}),this.validateAggregateRestrictions(t,i)}validateMinNumberOfFiles(t){const{minNumberOfFiles:i}=this.getOpts().restrictions;if(i&&Object.keys(t).length<i)throw new ze(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:i}))}getMissingRequiredMetaFields(t){const i=new ze(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:t.name??this.getI18n()("unnamed")})),{requiredMetaFields:n}=this.getOpts().restrictions,r=[];for(const s of n)(!Object.hasOwn(t.meta,s)||t.meta[s]==="")&&r.push(s);return{missingFields:r,error:i}}}const ll="5.0.0",cl={version:ll};var qt,Oi,us;class ds{constructor(){A(this,Oi);z(this,"state",{});A(this,qt,new Set)}getState(){return this.state}setState(t){const i={...this.state},n={...this.state,...t};this.state=n,R(this,Oi,us).call(this,i,n,t)}subscribe(t){return h(this,qt).add(t),()=>{h(this,qt).delete(t)}}}qt=new WeakMap,Oi=new WeakSet,us=function(...t){h(this,qt).forEach(i=>{i(...t)})},z(ds,"VERSION",cl.version);var ln,Fr;function dl(){if(Fr)return ln;Fr=1;var e=go(),t=wo(),i="Expected a function";function n(r,s,o){var a=!0,c=!0;if(typeof r!="function")throw new TypeError(i);return t(o)&&(a="leading"in o?!!o.leading:a,c="trailing"in o?!!o.trailing:c),e(r,s,{leading:a,maxWait:s,trailing:c})}return ln=n,ln}var ul=dl();const hl=Wi(ul);var cn,kr;function fl(){return kr||(kr=1,cn=function(){var t={},i=t._fns={};t.emit=function(o,a,c,u,d,f,p){var b=n(o);b.length&&r(o,b,[a,c,u,d,f,p])},t.on=function(o,a){i[o]||(i[o]=[]),i[o].push(a)},t.once=function(o,a){function c(){a.apply(this,arguments),t.off(o,c)}this.on(o,c)},t.off=function(o,a){var c=[];if(o&&a){var u=this._fns[o],d=0,f=u?u.length:0;for(d;d<f;d++)u[d]!==a&&c.push(u[d])}c.length?this._fns[o]=c:delete this._fns[o]};function n(s){var o=i[s]?i[s]:[],a=s.indexOf(":"),c=a===-1?[s]:[s.substring(0,a),s.substring(a+1)],u=Object.keys(i),d=0,f=u.length;for(d;d<f;d++){var p=u[d];if(p==="*"&&(o=o.concat(i[p])),c.length===2&&c[0]===p){o=o.concat(i[p]);break}}return o}function r(s,o,a){var c=0,u=o.length;for(c;c<u&&o[c];
1c++)o[c].event=s,o[c].apply(o[c],a)}return t}),cn}var pl=fl();const ml=Wi(pl),gl="5.2.0",yl={version:gl};function bl(e,t){return t.name?t.name:e.split("/")[0]==="image"?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}const wl={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function _l(e){if(e==null&&typeof navigator<"u"&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1].split(".",2),r=parseInt(n[0],10),s=parseInt(n[1],10);return r<15||r===15&&s<15063||r>18||r===18&&s>=18218}const Ti={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var Le,Ne,hi,_t,Lt,Nt,vt,E,bt,wn,hs,fs,ps,_n,vn,xn,Sn,$i,Cn,xt,ms,gs,ut,fi,ri,ys,An,si;const Vi=class Vi{constructor(t){A(this,E);A(this,Le,Object.create(null));A(this,Ne);A(this,hi);A(this,_t,ml());A(this,Lt,new Set);A(this,Nt,new Set);A(this,vt,new Set);z(this,"defaultLocale");z(this,"locale");z(this,"opts");z(this,"store");z(this,"i18n");z(this,"i18nArray");z(this,"scheduledAutoProceed",null);z(this,"wasOffline",!1);A(this,$i,(t,i)=>{const n=t?this.getFile(t.id):void 0;if(t==null||!n){this.log(`Not setting progress for a file that has been removed: ${t?.id}`);return}if(n.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${t.id}`);return}const r={bytesTotal:i.bytesTotal,percentage:i.bytesTotal!=null&&Number.isFinite(i.bytesTotal)&&i.bytesTotal>0?Math.round(i.bytesUploaded/i.bytesTotal*100):void 0};n.progress.uploadStarted!=null?this.setFileState(t.id,{progress:{...n.progress,...r,bytesUploaded:i.bytesUploaded}}):this.setFileState(t.id,{progress:{...n.progress,...r}}),h(this,xt).call(this)});A(this,xt,hl(()=>R(this,E,Cn).call(this),500,{leading:!0,trailing:!0}));A(this,ut,this.updateOnlineStatus.bind(this));A(this,fi,new Map);this.defaultLocale=wl;const i={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:ol,meta:{},onBeforeFileAdded:(r,s)=>!Object.hasOwn(s,r.id),onBeforeUpload:r=>r,store:new ds,logger:el,infoTimeout:5e3},n={...i,...t};this.opts={...n,restrictions:{...i.restrictions,...t?.restrictions}},t?.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t?.debug&&(this.opts.logger=tl),this.log(`Using Core v${Vi.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...Ti,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:_l(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),q(this,Ne,new al(()=>this.opts,()=>this.i18n)),q(this,hi,this.store.subscribe((r,s,o)=>
1{this.emit("state-update",r,s,o),this.updateAll(s)})),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),R(this,E,gs).call(this)}emit(t,...i){h(this,_t).emit(t,...i)}on(t,i){return h(this,_t).on(t,i),this}once(t,i){return h(this,_t).once(t,i),this}off(t,i){return h(this,_t).off(t,i),this}updateAll(t){this.iteratePlugins(i=>{i.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}patchFilesState(t){const i=this.getState().files;this.setState({files:{...i,...Object.fromEntries(Object.entries(t).map(([n,r])=>[n,{...i[n],...r}]))}})}setFileState(t,i){if(!this.getState().files[t])throw new Error(`Canât set state for ${t} (the file could have been removed)`);this.patchFilesState({[t]:i})}i18nInit(){const t=n=>this.log(`Missing i18n string: ${n}`,"error"),i=new yo([this.defaultLocale,this.opts.locale],{onMissingKey:t});this.i18n=i.translate.bind(i),this.i18nArray=i.translateArray.bind(i),this.locale=i.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t?.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(i=>{i.setOptions(t)}),this.setState(void 0)}resetProgress(){const t={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},i={...this.getState().files},n=Object.create(null);
1Object.keys(i).forEach(r=>{n[r]={...i[r],progress:{...i[r].progress,...t},tus:void 0,transloadit:void 0}}),this.setState({files:n,...Ti})}clear(){const{capabilities:t,currentUploads:i}=this.getState();if(Object.keys(i).length>0&&!t.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...Ti,files:{}})}addPreProcessor(t){h(this,Lt).add(t)}removePreProcessor(t){return h(this,Lt).delete(t)}addPostProcessor(t){h(this,vt).add(t)}removePostProcessor(t){return h(this,vt).delete(t)}addUploader(t){h(this,Nt).add(t)}removeUploader(t){return h(this,Nt).delete(t)}setMeta(t){const i={...this.getState().meta,...t},n={...this.getState().files};Object.keys(n).forEach(r=>{n[r]={...n[r],meta:{...n[r].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:i,files:n})}setFileMeta(t,i){const n={...this.getState().files};if(!n[t]){this.log(`Was trying to set metadata for a file that has been removed: ${t}`);return}const r={...n[t].meta,...i};n[t]={...n[t],meta:r},this.setState({files:n})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getFilesByIds(t){return t.map(i=>this.getFile(i))}getObjectOfFilesPerState(){const{files:t,totalProgress:i,error:n}=this.getState(),r=Object.values(t),s=[],o=[],a=[],c=[],u=[],d=[],f=[],p=[],b=[];for(const m of r){const{progress:g}=m;!g.uploadComplete&&g.uploadStarted&&(s.push(m),m.isPaused||p.push(m)),g.uploadStarted||o.push(m),(g.uploadStarted||g.preprocess||g.postprocess)&&a.push(m),g.uploadStarted&&c.push(m),m.isPaused&&u.push(m),g.uploadComplete&&d.push(m),m.error&&f.push(m),(g.preprocess||g.postprocess)&&b.push(m)}return{newFiles:o,startedFiles:a,uploadStartedFiles:c,pausedFiles:u,completeFiles:d,erroredFiles:f,inProgressFiles:s,inProgressNotPausedFiles:p,processingFiles:b,isUploadStarted:c.length>0,isAllComplete:i===100&&d.length===r.length&&b.length===0,isAllErrored:!!n&&f.length===r.length,isAllPaused:s.length!==0&&u.length===s.length,isUploadInProgress:s.length>0,isSomeGhost:r.some(m=>m.isGhost)}}validateRestrictions(t,i=this.getFiles()){try{h(this,Ne).validate(i,[t])}catch(n){return n}return null}validateSingleFile(t){try{h(this,Ne).validateSingleFile(t)}catch(i){return i.message}return null}validateAggregateRestrictions(t){const i=this.getFiles();try{h(this,Ne).validateAggregateRestrictions(i,t)}catch(n){return n.message}return null}checkIfFileAlreadyExists(t){const{files:i}=this.getState();return!!(i[t]&&!i[t].isGhost)}addFile(t){const{nextFilesState:i,validFilesToAdd:n,errors:r}=R(this,E,vn).call(this,[t]),s=r.filter(a=>a.isRestriction);if(R(this,E,bt).call(this,s),r.length>0)throw r[0];this.setState({files:i});const[o]=n;return this.emit("file-added",o),this.emit("files-added",n),this.log(`Added file: ${o.name}, ${o.id}, mime type: ${o.type}`),R(this,E,_n).call(this),o.id}addFiles(t){const{nextFilesState:i,validFilesToAdd:n,errors:r}=R(this,E,vn).call(this,t),s=r.filter(a=>a.isRestriction);R(this,E,bt).call(this,s);const o=r.filter(a=>!a.isRestriction);if(o.length>0){let a=`Multiple errors occurred while adding files: 2`;if(o.forEach(c=>{a+=` 3 * ${c.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:a},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(o,a);{const c=new Error(a);throw c.errors=o,c}}this.setState({files:i}),n.forEach(a=>{this.emit("file-added",a)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(a=>{this.log(`Added file: ${a.name} 4 id: ${a.id} 5 type: ${a.type}`)}),n.length>0&&R(this,E,_n).call(this)}removeFiles(t){const{files:i,currentUploads:n}=this.getState(),r={...i},s={...n},o=Object.create(null);t.forEach(d=>{i[d]&&(o[d]=i[d],delete r[d])});function a(d){return o[d]===void 0}Object.keys(s).forEach(d=>{const f=n[d].fileIDs.filter(a);if(f.length===0){delete s[d];return}const{capabilities:p}=this.getState();if(f.length!==n[d].fileIDs.length&&!p.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");s[d]={...n[d],fileIDs:f}});const c={currentUploads:s,files:r};Object.keys(r).length===0&&(c.allowNewUpload=!0,c.error=null,c.recoveredState=null),this.setState(c),h(this,xt).call(this);const u=Object.keys(o);u.forEach(d=>
5{this.emit("file-removed",o[d])}),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(t){this.removeFiles([t])}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).progress.uploadComplete)return;const i=this.getFile(t),r=!(i.isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",i,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const r={...t[n],isPaused:!0};t[n]=r}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const r={...t[n],isPaused:!1,error:null};t[n]=r}),this.setState({files:t}),this.emit("resume-all")}async retryAll(){const t=await R(this,E,Sn).call(this);return this.emit("complete",t),t}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),i=Object.keys(t);i.length&&this.removeFiles(i),this.setState(Ti)}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(t));const i=R(this,E,ri).call(this,[t],{forceAllowNewUpload:!0});return R(this,E,si).call(this,i)}logout(){this.iteratePlugins(t=>{t.provider?.logout?.()})}[Symbol.for("uppy test: updateTotalProgress")](){return R(this,E,Cn).call(this)}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit("is-online"),this.wasOffline&&(this.emit
5("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,...i){if(typeof t!="function"){const o=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(o)}const n=new t(this,...i),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const s=this.getPlugin(r);if(s){const o=`Already found a plugin named '${s.id}'. Tried to use: '${r}'. 6Uppy plugins must have unique \`id\` options.`;throw new Error(o)}return t.VERSION&&this.log(`Using ${r} v${t.VERSION}`),n.type in h(this,Le)?h(this,Le)[n.type].push(n):h(this,Le)[n.type]=[n],n.install(),this.emit("plugin-added",n),this}getPlugin(t){for(const i of Object.values(h(this,Le))){const n=i.find(r=>r.id===t);if(n!=null)return n}}[Symbol.for("uppy test: getPlugins")](t){return h(this,Le)[t]}iteratePlugins(t){Object.values(h(this,Le)).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const i=h(this,Le)[t.type],n=i.findIndex(o=>o.id===t.id);n!==-1&&i.splice(n,1);const s={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(s)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),h(this,hi).call(this),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",h(this,ut)),window.removeEventListener("offline",h(this,ut)))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,i="info",n=3e3){const r=typeof t=="object";this.setState({info:[...this.getState().info,{type:i,message:r?t.message:t,details:r?t.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(t,i){const{logger:n}=this.opts;switch(i){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t);break}}registerRequestClient(t,i){h(this,fi).set(t,i)}
6getRequestClientForFile(t){if(!("remote"in t&&t.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${t.id}`);const i=h(this,fi).get(t.remote.requestClientId);if(i==null)throw new Error(`requestClientId "${t.remote.requestClientId}" not registered for file "${t.id}"`);return i}async restore(t){this.log(`Core: Running restored upload "${t}"`);const i=await R(this,E,si).call(this,t);return this.emit("complete",i),i}[Symbol.for("uppy test: createUpload")](...t){return R(this,E,ri).call(this,...t)}addResultData(t,i){if(!R(this,E,ys).call(this,t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:n}=this.getState(),r={...n[t],result:{...n[t].result,...i}};this.setState({currentUploads:{...n,[t]:r}})}async upload(){h(this,Le).uploader?.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();if(R(this,E,xn).call(this).length>0){const r=await R(this,E,Sn).call(this);if(!(this.getFiles().filter(o=>o.progress.uploadStarted==null).length>0))return this.emit("complete",r),r;({files:t}=this.getState())}const n=this.opts.onBeforeUpload(t);if(n===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");n&&typeof n=="object"&&(t=n,this.setState({files:t}));try{if(h(this,Ne).validateMinNumberOfFiles(t),!R(this,E,hs).call(this,t))throw new ze(this.i18n("missingRequiredMetaField"));const{currentUploads:r}=this.getState(),s=Object.values(r).flatMap(u=>u.fileIDs),o=Object.keys(t).filter(u=>{const d=this.getFile(u);return d&&!d.progress.uploadStarted&&!s.includes(u)}),a=R(this,E,ri).call(this,o),c=await R(this,E,si).call(this,a);return this.emit("complete",c),c}catch(r){throw R(this,E,bt).call(this,[r]),r}}};Le=new WeakMap,Ne=new WeakMap,hi=new WeakMap,_t=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,vt=new WeakMap,E=new WeakSet,bt=function(t){for(const o of t)o.isRestriction?this.emit("restriction-failed",o.file,o):this.emit("error",o,o.file),this.log(o,"warning");const i=t.filter(o=>o.isUserFacing),n=4,r=i.slice(0,n),s=i.slice(n);r.forEach(({message:o,details:a=""})=>{this.info({message:o,details:a},"error",this.opts.infoTimeout)}),s.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:s.length})})},wn=function(t){const{missingFields:i,error:n}=h(this,Ne).getMissingRequiredMetaFields(t);return i.length>0?(this.setFileState(t.id,{missingRequiredMetaFields:i,error:n.message}),this.log(n.message),this.emit("restriction-failed",t,n),!1):(i.length===0&&t.missingRequiredMetaFields&&this.setFileState(t.id,{missingRequiredMetaFields:[]}),!0)},hs=function(t){let i=!0;for(const n of Object.values(t))R(this,E,wn).call(this,n)||(i=!1);return i},fs=function(t){const{allowNewUpload:i}=this.getState();if(i===!1){const n=new ze(this.i18n("noMoreFilesAllowed"),{file:t});throw R(this,E,bt).call(this,[n]),n}},ps=function(t){const i=t instanceof File?{name:t.name,type:t.type,size:t.size,data:t,meta:{},isRemote:!1,source:void 0,preview:void 0}:t,n=os(i),r=bl(n,i),s=ss(r).extension,o=Ka(i,this.getID()),a={...i.meta,name:r,type:n},c=Number.isFinite(i.data.size)?i.data.size:null;return{source:i.source||"",id:o,name:r,extension:s||"",meta:{...this.getState().meta,...a},type:n,progress:{percentage:0,bytesUploaded:!1,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isGhost:!1,...i.isRemote?{isRemote:!0,remote:i.remote,data:i.data}:{isRemote:!1,data:i.data},preview:i.preview}},_n=function(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(t=>{t.isRestriction||this.log(t.stack||t.message||t)})},4))},vn=function(t){let{files:i}=this.getState(),n={...i};const r=[],s=[];for(const o of t)try{let a=R(this,E,ps).call(this,o);R(this,E,fs).call(this,a);const c=i[a.id],u=c?.isGhost;if(u&&!a.isRemote){if(a.data==null)throw new Error("File data is missing");a={...c,isGhost:!1,data:a.data},this.log(`Replaced the blob in the restored ghost file: ${a.name}, ${a.id}`)}const d=this.opts.onBeforeFileAdded(a,n);if(i=this.getState().files,n={...i,...n},!d&&this.checkIfFileAlreadyExists(a.id))throw new ze(this.i18n("noDuplicates",{fileName:a.name??this.i18n("unnamed")}),{file:a});if(d===!1&&!u)throw new ze("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:a});typeof d=="object"&&d!==null&&(a=d),h(this,Ne).validateSingleFile(a),n[a.id]=a,r.push(a)}catch(a){s.push(a)}try{h(this,Ne).validateAggregateRestrictions(Object.values(i),r)}catch(o){return s.push(o),{nextFilesState:i,validFilesToAdd:[],errors:s}}return{nextFilesState:n,validFilesToAdd:r,errors:s}},xn=function(){const{files:t}=this.getState();return Object.keys(t).filter(i=>{const n=t[i];return n.error&&(!n.missingRequiredMetaFields||n.missingRequiredMetaFields.length===0)})},Sn=async function(){const t=R(this,E,xn).call(this),i={...this.get
6State().files};if(t.forEach(r=>{i[r]={...i[r],isPaused:!1,error:null}}),this.setState({files:i,error:null}),this.emit("retry-all",this.getFilesByIds(t)),t.length===0)return{successful:[],failed:[]};const n=R(this,E,ri).call(this,t,{forceAllowNewUpload:!0});return R(this,E,si).call(this,n)},$i=new WeakMap,Cn=function(){const t=R(this,E,ms).call(this);let i=null;t!=null&&(i=Math.round(t*100),i>100?i=100:i<0&&(i=0)),this.emit("progress",i??0),this.setState({totalProgress:i??0})},xt=new WeakMap,ms=function(){const i=this.getFiles().filter(c=>c.progress.uploadStarted||c.progress.preprocess||c.progress.postprocess);if(i.length===0)return 0;if(i.every(c=>c.progress.uploadComplete))return 1;const n=c=>c.progress.bytesTotal!=null&&c.progress.bytesTotal!==0,r=i.filter(n),s=i.filter(c=>!n(c));if(r.every(c=>c.progress.uploadComplete)&&s.length>0&&!s.every(c=>c.progress.uploadComplete))return null;const o=r.reduce((c,u)=>c+(u.progress.bytesTotal??0),0),a=r.reduce((c,u)=>c+(u.progress.bytesUploaded||0),0);return o===0?0:a/o},gs=function(){const t=(r,s,o)=>{let a=r.message||"Unknown error";r.details&&(a+=` ${r.details}`),this.setState({error:a}),s!=null&&s.id in this.getState().files&&this.setFileState(s.id,{error:a,response:o})};this.on("error",t),this.on("upload-error",(r,s,o)=>{if(t(s,r,o),typeof s=="object"&&s.message){this.log(s.message,"error");const a=new Error(this.i18n("failedToUpload",{file:r?.name??""}));a.isUserFacing=!0,a.details=s.message,s.details&&(a.details+=` ${s.details}`),R(this,E,bt).call(this,[a])}else R(this,E,bt).call(this,[s])});let i=null;this.on("upload-stalled",(r,s)=>{const{message:o}=r,a=s.map(c=>c.meta.name).join(", ");i||(this.info({message:o,details:a},"warning",this.opts.infoTimeout),i=setTimeout(()=>{i=null},this.opts.infoTimeout)),this.log(`${o} ${a}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const n=r=>{const s=r.filter(a=>{const c=a!=null&&this.getFile(a.id);return c||this.log(`Not setting progress for a file that has been removed: ${a?.id}`),c}),o=Object.fromEntries(s.map(a=>[a.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:a.size}}]));this.patchFilesState(o)};this.on("upload-start",n),this.on("upload-progress",h(this,$i)),this.on("upload-success",(r,s)=>{if(r==null||!this.getFile(r.id)){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}const o=this.getFile(r.id).progress,a=h(this,vt).size>0;this.setFileState(r.id,{progress:{...o,postprocess:a?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!a&&{complete:!0},percentage:100,bytesUploaded:o.bytesTotal},response:s,uploadURL:s.uploadURL,isPaused:!1}),r.size==null&&this.setFileState(r.id,{size:s.bytesUploaded||o.bytesTotal}),h(this,xt).call(this)}),this.on("preprocess-progress",(r,s)=>{if(r==null||!this.getFile(r.id)){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}this.setFileState(r.id,{progress:{...this.getFile(r.id).progress,preprocess:s}})}),this.on("preprocess-complete",r=>{if(r==null||!this.getFile(r.id)){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}const s={...this.getState().files};s[r.id]={...s[r.id],progress:{...s[r.id].progress}},delete s[r.id].progress.preprocess,this.setState({files:s})}),this.on("postprocess-progress",(r,s)=>{if(r==null||!this.getFile(r.id)){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}this.setFileState(r.id,{progress:{...this.getState().files[r.id].progress,postprocess:s}})}),this.on("postprocess-complete",r=>{const s=r&&this.getFile(r.id);if(s==null){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}const{postprocess:o,...a}=s.progress;this.patchFilesState({[s.id]:{progress:{...a,complete:!0}}})}),this.on("restored",()=>{h(this,xt).call(this)}),this.on("dashboard:file-edit-complete",r=>{r&&R(this,E,wn).call(this,r)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",h(this,ut)),window.addEventListener("offline",h(this,ut)),setTimeout(h(this,ut),3e3))},ut=new WeakMap,fi=new WeakMap,ri=function(t,i={}){const{forceAllowNewUpload:n=!1}=i,{allowNewUpload:r,currentUploads:s}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=_o();
6return this.emit("upload",o,this.getFilesByIds(t)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...s,[o]:{fileIDs:t,step:0,result:{}}}}),o},ys=function(t){const{currentUploads:i}=this.getState();return i[t]},An=function(t){const{[t]:i,...n}=this.getState().currentUploads;this.setState({currentUploads:n})},si=async function(t){const i=()=>{const{currentUploads:o}=this.getState();return o[t]};let n=i();if(!n)throw new Error("Nonexistent upload");const r=[...h(this,Lt),...h(this,Nt),...h(this,vt)];try{for(let o=n.step||0;o<r.length;o++){const a=r[o];this.setState({currentUploads:{...this.getState().currentUploads,[t]:{...n,step:o}}});const{fileIDs:c}=n;if(await a(c,t),n=i(),!n)break}}catch(o){throw R(this,E,An).call(this,t),o}if(n){n.fileIDs.forEach(u=>{const d=this.getFile(u);d?.progress.postprocess&&this.emit("postprocess-complete",d)});const o=n.fileIDs.map(u=>this.getFile(u)),a=o.filter(u=>!u.error),c=o.filter(u=>u.error);this.addResultData(t,{successful:a,failed:c,uploadID:t}),n=i()}let s;return n&&(s=n.result,R(this,E,An).call(this,t)),s==null&&(this.log(`Not setting result for an upload that has been removed: ${t}`),s={successful:[],failed:[],uploadID:t}),s},z(Vi,"VERSION",yl.version);let bn=Vi;var dn={},un,jr;function vl(){if(jr)return un;jr=1;function e(t,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return un=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var i=new Date().getTime();if(t&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,i){this._fn=t,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},i=null,n=0,r=0;r<this._errors.length;r++){var s=this._errors[r],o=s.message,a=(t[o]||0)+1;t[o]=a,a>=n&&(i=s,n=a)}return i},un}var Ir;function xl(){return Ir||(Ir=1,(function(e){var t=vl();e.operation=function(i){var n=e.timeouts(i);return new t(n,{forever:i&&(i.forever||i.retries===1/0),unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})},e.timeouts=function(i){if(i instanceof Array)return[].concat(i);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in i)n[r]=i[r];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<n.retries;o++)s.push(this.createTimeout(o,n));return i&&i.forever&&!s.length&&s.push(this.createTimeout(o,n)),s.sort(function(a,c){return a-c}),s},e.createTimeout=function(i,n){var r=n.randomize?Math.random()+1:1,s=Math.round(r*Math.max(n.minTimeout,1)*Math.pow(n.factor,i));return s=Math.min(s,n.maxTimeout),s},e.wrap=function(i,n,r){if(n instanceof Array&&(r=n,n=null),!r){r=[];for(var s in i)typeof i[s]=="function"&&r.push(s)}for(var o=0;o<r.length;o++){var a=r[o],c=i[a];i[a]=(function(d){var f=e.operation(n),p=Array.prototype.slice.call(arguments,1
6),b=p.pop();p.push(function(m){f.retry(m)||(m&&(arguments[0]=f.mainError()),b.apply(this,arguments))}),f.attempt(function(){d.apply(i,p)})}).bind(i,c),i[a].options=n}}})(dn)),dn}var hn,Er;function Sl(){return Er||(Er=1,hn=xl()),hn}var Cl=Sl();const Al=Wi(Cl),Rl=Object.prototype.toString,Fl=e=>Rl.call(e)==="[object Error]",kl=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function jl(e){return e&&Fl(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:kl.has(e.message):!1}class Rn extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Tr=(e,t,i)=>{const n=i.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=n,e};async function Pr(e,t){return new Promise((i,n)=>{t={...t},t.onFailedAttempt??(t.onFailedAttempt=()=>{}),t.shouldRetry??(t.shouldRetry=()=>!0),t.retries??(t.retries=10);const r=Al.operation(t),s=()=>{r.stop(),n(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});const o=()=>{t.signal?.removeEventListener("abort",s),r.stop()};r.attempt(async a=>{try{const c=await e(a);o(),i(c)}catch(c){try{if(!(c instanceof Error))throw new TypeError(`Non-error was thrown: "${c}". You should only throw errors.`);if(c instanceof Rn)throw c.originalError;if(c instanceof TypeError&&!jl(c))throw c;if(Tr(c,a,t),await t.shouldRetry(c)||(r.stop(),n(c)),await t.onFailedAttempt(c),!r.retry(c))throw r.mainError()}catch(u){Tr(u,a,t),o(),n(u)}}})})}const Il="5.1.1",El={version:Il};class Tl extends Error{constructor(){super("Authorization required");z(this,"isAuthError");this.name="AuthError",this.isAuthError=!0}}function Pl(e){return e.replace(/\/$/,"")}const Ur=10,Ul=300*1e3,ql=401;class Ll extends Error{constructor({statusCode:i,message:n}){super(n);z(this,"statusCode");this.name="HttpError",this.statusCode=i}}async function Nl(e){if(e.status===ql)throw new Tl;if(e.ok)return e.json();let t=`Failed request with status: ${e.status}. ${e.statusText}`,i;try{i=await e.json(),i.message&&(t=`${t} message: ${i.message}`),i.requestId&&(t=`${t} request-Id: ${i.requestId}`)}catch(n){throw new Error(t,{cause:n})}throw e.status>=400&&e.status<=499&&i.message?new Ya(i.message):new Ll({statusCode:e.status,message:t})}function Ml(e,t,i){const{progress:n,bytesUploaded:r,bytesTotal:s}=t;n&&(e.uppy.log(`Upload progress: ${n}`),e.uppy.emit("upload-progress",i,{uploadStarted:i.progress.uploadStarted??0,bytesUploaded:r,bytesTotal:s}))}var St,mt,Fn,zi,kn;class bs{constructor(t,i){A(this,mt);A(this,St);z(this,"uppy");z(this,"opts");A(this,zi,async({file:t,postBody:i,signal:n})=>{if(t.remote?.url==null)throw new Error("Cannot connect to an undefined URL");return(await this.post(t.remote.url,{...t.remote.body,...i},{signal:n})).token});this.uppy=t,this.opts=i,this.onReceiveResponse=this.onReceiveResponse.bind(this),q(this,St,i.companionHeaders)}setCompanionHeaders(t){q(this,St,t)}[Symbol.for("uppy test: getCompanionHeaders")](){return h(this,St)}get hostname(){const{companion:t}=this.uppy.getState(),i=this.opts.companionUrl;return Pl(t?.[i]?t[i]:i)}async headers(t=!1){return{...{Accept:"application/json",...t?void 0:{"Content-Type":"application/json"}},...h(this,St)}}onReceiveResponse(t){const{headers:i}=t,r=this.uppy.getState().companion||{},s=this.opts.companionUrl;i.has("i-am")&&i.get("i-am")!==r[s]&&this.uppy.setState({companion:{...r,[s]:i.get("i-am")}})}async request({path:t,method:i="GET",data:n,skipPostResponse:r,signal:s}){try{const o=await this.headers(!n),a=await $a(R(this,mt,Fn).call(this,t),{method:i,signal:s,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null});return r||this.onReceiveResponse(a),await Nl(a)}catch(o){throw o.isAuthError||o.name==="UserFacingApiError"||o.name==="AbortError"?o:new Ma(`Could not ${i} ${R(this,mt,Fn).call(this,t)}`,{cause:o})}}async get(t,i){return this.request({...i,path:t})}async post(t,i,n){return this.request({...n,path:t,method:"POST",data:i})}async delete(t,i,n){return this.request({...n,path:t,method:"DELETE",data:i})}async uploadRemoteFile(t,i,n){try{const{signal:r,getQueue:s}=n||{};return await Pr(async()=>{const o=this.uppy.getFile(t.id)?.serverToken;
6if(o!=null)return this.uppy.log(`Connecting to exiting websocket ${o}`),R(this,mt,kn).call(this,{file:t,queue:s(),signal:r});const c=await s().wrapPromiseFunction(async(...u)=>{try{return await h(this,zi).call(this,...u)}catch(d){if(d.isAuthError)throw new Rn(d);if(d.cause==null)throw d;const f=d.cause,p=()=>[408,409,429,418,423].includes(f.statusCode)||f.statusCode>=500&&f.statusCode<=599&&![501,505].includes(f.statusCode);throw f.name==="HttpError"&&!p()?new Rn(f):f}},{priority:-1})({file:t,postBody:i,signal:r}).abortOn(r);if(this.uppy.getFile(t.id))return this.uppy.setFileState(t.id,{serverToken:c}),R(this,mt,kn).call(this,{file:this.uppy.getFile(t.id),queue:s(),signal:r})},{retries:Ur,signal:r,onFailedAttempt:o=>this.uppy.log(`Retrying upload due to: ${o.message}`,"warning")})}catch(r){if(r.name==="AbortError")return;throw this.uppy.emit("upload-error",t,r),r}}}St=new WeakMap,mt=new WeakSet,Fn=function(t){return/^(https?:|)\/\//.test(t)?t:`${this.hostname}/${t}`},zi=new WeakMap,kn=async function({file:t,queue:i,signal:n}){let r;const{capabilities:s}=this.uppy.getState();try{return await new Promise((o,a)=>{const c=t.serverToken,u=Qa(t.remote.companionUrl);let d,f,p,{isPaused:b}=t;const m=(k,S)=>{if(d==null||d.readyState!==d.OPEN){this.uppy.log(`Cannot send "${k}" to socket ${t.id} because the socket state was ${String(d?.readyState)}`,"warning");return}d.send(JSON.stringify({action:k,payload:S??{}}))};function g(){s.resumableUploads&&m(b?"pause":"resume")}const _=async()=>{f&&f.abort(),f=new AbortController;const k=I=>{this.uppy.setFileState(t.id,{serverToken:null}),f?.abort?.(),a(I)};function S(){clearTimeout(p),!b&&(p=setTimeout(()=>k(new Error("Timeout waiting for message from Companion socket")),Ul))}try{await i.wrapPromiseFunction(async()=>{await Pr(async()=>new Promise(($,V)=>{d=new WebSocket(`${u}/api/${c}`),S(),d.addEventListener("close",()=>{d=void 0,V(new Error("Socket closed unexpectedly"))}),d.addEventListener("error",Q=>{this.uppy.log(`Companion socket error ${JSON.stringify(Q)}, closing socket`,"warning"),d?.close()}),d.addEventListener("open",()=>{g()}),d.addEventListener("message",Q=>{S();try{const{action:X,payload:H}=JSON.parse(Q.data);switch(X){case"progress":{Ml(this,H,this.uppy.getFile(t.id));break}case"success":{const te=H.response?.responseText;this.uppy.emit("upload-success",this.uppy.getFile(t.id),{uploadURL:H.url,status:H.response?.status??200,body:te?JSON.parse(te):void 0}),f?.abort?.(),o();break}case"error":{const{message:te}=H.error;throw Object.assign(new Error(te),{cause:H.error})}default:this.uppy.log(`Companion socket unknown action ${X}`,"warning")}}catch(X){k(X)}});const D=()=>{this.uppy.log(`Closing socket ${t.id}`),clearTimeout(p),d&&d.close(),d=void 0};f.signal.addEventListener("abort",()=>{D()})}),{retries:Ur,signal:f.signal,onFailedAttempt:()=>{f.signal.aborted||this.uppy.log(`Retrying websocket ${t.id}`)}})})().abortOn(f.signal)}catch(I){if(f.signal.aborted)return;k(I)}},w=k=>{s.resumableUploads&&(b=k,d&&g())},x=k=>{s.individualCancellation&&k.id===t.id&&(m("cancel"),f?.abort?.(),this.uppy.log(`upload ${t.id} was removed`),o())},C=()=>{m("cancel"),f?.abort?.(),this.uppy.log(`upload ${t.id} was canceled`),o()},T=(k,S)=>{k?.id===t.id&&w(S)},U=()=>w(!0),L=()=>w(!1);this.uppy.on("file-removed",x),this.uppy.on("cancel-all",C),this.uppy.on("upload-pause",T),this.uppy.on("pause-all",U),this.uppy.on("resume-all",L),r=()=>{this.uppy.off("file-removed",x),this.uppy.off("cancel-all",C),this.uppy.off("upload-pause",T),this.uppy.off("pause-all",U),this.uppy.off("resume-all",L)},n.addEventListener("abort",()=>{f?.abort()}),_()})}finally{r?.()}},z(bs,"VERSION",El.version);const Ol="5.1.0",$l={version:Ol};function Vl({method:e="PUT",CanonicalUri:t="/",CanonicalQueryString:i="",SignedHeaders:n,HashedPayload:r}){const s=Object.keys(n).map(o=>o.toLowerCase()).sort();return[e,t,i,...s.map(o=>`${o}:${n[o]}`),"",s.join(";"),r].join(` 7`)}const Hn=new TextEncoder,Bn={name:"HMAC",hash:"SHA-256"};async function zl(e){const{subtle:t}=globalThis.crypto;return t.digest(Bn.hash,Hn.encode(e))}async function Hl(e){const{subtle:t}=globalThis.crypto;return t.importKey("raw",typeof e=="string"?Hn.encode(e):e,Bn,!1,["sign"])}function qr(e){const t=new Uint8Array(e);let i="";for(let n=0;n<t.length;n++)i+=t[n].toString(16).padStart(2,"0");return i}async function ei(e,t){const{subtle:i}=globalThis.crypto;return i.sign(Bn,await Hl(e),Hn.encode(t))}async function Bl({accountKey:e,accountSecret:t,sessionToken:i,bucketN
7ame:n,Key:r,Region:s,expires:o,uploadId:a,partNumber:c}){const d=`s3.${s}.amazonaws.com`,f=`/${n}/${encodeURI(r).replace(/[;?:@&=+$,#!'()*]/g,I=>`%${I.charCodeAt(0).toString(16).toUpperCase()}`)}`,p="UNSIGNED-PAYLOAD",b=new Date().toISOString().replace(/[-:]|\.\d+/g,""),m=b.slice(0,8),g=`${m}/${s}/s3/aws4_request`,_=new URL(`https://${d}${f}`);_.searchParams.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),_.searchParams.set("X-Amz-Content-Sha256",p),_.searchParams.set("X-Amz-Credential",`${e}/${g}`),_.searchParams.set("X-Amz-Date",b),_.searchParams.set("X-Amz-Expires",o),_.searchParams.set("X-Amz-Security-Token",i),_.searchParams.set("X-Amz-SignedHeaders","host"),c&&_.searchParams.set("partNumber",c),a&&_.searchParams.set("uploadId",a),_.searchParams.set("x-id",c&&a?"UploadPart":"PutObject");const w=Vl({CanonicalUri:f,CanonicalQueryString:_.search.slice(1),SignedHeaders:{host:d},HashedPayload:p}),x=qr(await zl(w)),C=["AWS4-HMAC-SHA256",b,g,x].join(` 8`),T=await ei(`AWS4${t}`,m),U=await ei(T,s),L=await ei(U,"s3"),k=await ei(L,"aws4_request"),S=qr(await ei(k,C));return _.searchParams.set("X-Amz-Signature",S),_}const Wl=1024*1024,Lr={getChunkSize(e){return Math.ceil(e.size/1e4)},onProgress(){},onPartComplete(){},onSuccess(){},onError(e){throw e}};function Dl(e){if(typeof e=="string")return parseInt(e,10);if(typeof e=="number")return e;throw new TypeError("Expected a number")}const Ui=Symbol("pausing upload, not an actual error");var Me,ke,Xe,nt,rt,pi,mi,Mt,Ct,Ot,gi,$t,yi,We,ws,_s,jn,bi,wi,vs;class Gl{constructor(t,i){A(this,We);z(this,"options");A(this,Me,new rn);A(this,ke,[]);A(this,Xe,[]);A(this,nt);A(this,rt);A(this,pi,!1);A(this,mi);A(this,Mt);A(this,Ct);A(this,Ot);A(this,gi,t=>t?.cause===Ui?null:h(this,mi).call(this,t));A(this,$t,1e4);A(this,yi,5*Wl);A(this,bi,t=>i=>{if(!i.lengthComputable)return;h(this,Xe)[t].uploaded=Dl(i.loaded);const n=h(this,Xe).reduce((r,s)=>r+s.uploaded,0);this.options.onProgress(n,h(this,nt).size)});A(this,wi,t=>i=>{h(this,ke)[t]=null,h(this,Xe)[t].etag=i,h(this,Xe)[t].done=!0;const n={PartNumber:t+1,ETag:i};this.options.onPartComplete(n)});var n;this.options={...Lr,...i},(n=this.options).getChunkSize??(n.getChunkSize=Lr.getChunkSize),q(this,nt,t),q(this,rt,i.file),q(this,Mt,this.options.onSuccess),q(this,mi,this.options.onError),q(this,Ct,this.options.shouldUseMultipart),q(this,Ot,i.uploadId&&i.key),R(this,We,ws).call(this)}start(){h(this,pi)?(h(this,Me).signal.aborted||h(this,Me).abort(Ui),q(this,Me,new rn),R(this,We,jn).call(this)):h(this,Ot)?(this.options.companionComm.restoreUploadFile(h(this,rt),{uploadId:this.options.uploadId,key:this.options.key}),R(this,We,jn).call(this)):R(this,We,_s).call(this)}pause(){h(this,Me).abort(Ui),q(this,Me,new rn)}abort(t){t?.really?R(this,We,vs).call(this):this.pause()}[Symbol.for("uppy test: getChunkState")](){return h(this,Xe)}}Me=new WeakMap,ke=new WeakMap,Xe=new WeakMap,nt=new WeakMap,rt=new WeakMap,pi=new WeakMap,mi=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,Ot=new WeakMap,gi=new WeakMap,$t=new WeakMap,yi=new WeakMap,We=new WeakSet,ws=function(){const t=h(this,nt).size,i=typeof h(this,Ct)=="function"?h(this,Ct).call(this,h(this,rt)):!!h(this,Ct);if(i&&t>h(this,yi)){let n=Math.max(this.options.getChunkSize(h(this,nt)),h(this,yi)),r=Math.floor(t/n);r>h(this,$t)&&(r=h(this,$t),n=t/h(this,$t)),q(this,ke,Array(r));for(let s=0,o=0;s<t;s+=n,o++){const a=Math.min(t,s+n),c=()=>{const u=s;return h(this,nt).slice(u,a)};if(h(this,ke)[o]={getData:c,onProgress:h(this,bi).call(this,o),onComplete:h(this,wi).call(this,o),shouldUseMultipart:i},h(this,Ot)){const u=s+n>t?t-s:n;h(this,ke)[o].setAsUploaded=()=>{h(this,ke)[o]=null,h(this,Xe)[o].uploaded=u}}}}else q(this,ke,[{getData:()=>h(this,nt),onProgress:h(this,bi).call(this,0),onComplete:h(this,wi).call(this,0),shouldUseMultipart:i}]);q(this,Xe,h(this,ke).map(()=>({uploaded:0})))},_s=function(){this.options.companionComm.uploadFile(h(this,rt),h(this,ke),h(this,Me).signal).then(h(this,Mt),h(this,gi)),q(this,pi,!0)},jn=function(){this.options.companionComm.resumeUploadFile(h(this,rt),h(this,ke),h(this,Me).signal).then(h(this,Mt),h(this,gi))},bi=new WeakMap,wi=new WeakMap,vs=function(){h(this,Me).abort(),this.options.companionComm.abortFileUpload(h(this,rt)).catch(t=>this.options.log(t))};function re(e){if(e?.aborted)throw rs("The operation was aborted",{cause:e.reason})}function Kl(e){const t=new URL(e);return t.search="",t.hash="",t.href}var _i,Oe,vi,xi,Si,Ci,Vt,zt,Ht,Bt,At,Wt,$e,kt,xs,In;class Ql{constructor(t,i,n,r){A(this,kt);A(this,_i);A(this,Oe,new WeakMap);A(this,vi);A(this,xi);A(this,Si);A(this,Ci);A(this,Vt);A(this,zt);A(this,Ht);A(this,Bt);A(this,At);A(this,Wt);A(this,$e);q(this,zt,t),q(this,At,n),q(this,$e,r),this.setOptions(i)}setOptions(t){const i=h(this,zt);"abortMultipartUpload"in t&&q(this,_i,i.wrapPromiseFunction(t.abortMultipartUpload,{priority:1})),"createMultipartUpload"in t&&q(this,vi,i.wrapPromiseFunction(t.createMultipartUpload,{priority:-1})),"signPart"in t&&q(this,xi,i.wrapPromiseFunction(t.signPart)),"listParts"in t&&q(this,Ci,i.wrapPromiseFunction(t.listParts)),"completeMultipartUpload"in t&&q(this,Bt,i.wrapPromiseFunction(t.completeMultipartUpload,{priority:1})),"retryDelays"in t&&q(this,Ht,t.retryDelays??[]),"uploadPartBytes"in t&&q(this,Wt,i.wrapPromiseFunction(t.uploadPartBytes,{priority:1/0})),"getUploadParameters"in t&&q(this,Si,i.wrapPromiseFunction(t.getUploadParameters))}async getUploadId(t,i){let n;for(;;){if(t.data==null)throw new Error("File data is empty");if(n=h(this,Oe).get(t.data),n==null)break;try{return await n}catch{}}const r=h(this,vi).call(this,h(this,$e).call(this,t),i),s=()=>
8{if(t.data==null)throw new Error("File data is empty");r.abort(i.reason),h(this,Oe).delete(t.data)};return i.addEventListener("abort",s,{once:!0}),h(this,Oe).set(t.data,r),r.then(async o=>{if(i.removeEventListener("abort",s),h(this,At).call(this,t,o),t.data==null)throw new Error("File data is empty");h(this,Oe).set(t.data,o)},()=>{if(i.removeEventListener("abort",s),t.data==null)throw new Error("File data is empty");h(this,Oe).delete(t.data)}),r}async abortFileUpload(t){if(t.data==null)throw new Error("File data is empty");const i=h(this,Oe).get(t.data);if(i==null)return;h(this,Oe).delete(t.data),h(this,At).call(this,t,Object.create(null));let n;try{n=await i}catch{return}await h(this,_i).call(this,h(this,$e).call(this,t),n)}async uploadFile(t,i,n){if(re(n),i.length===1&&!i[0].shouldUseMultipart)return R(this,kt,In).call(this,t,i[0],n);const{uploadId:r,key:s}=await this.getUploadId(t,n);re(n);try{const o=await Promise.all(i.map((a,c)=>this.uploadChunk(t,c+1,a,n)));return re(n),await h(this,Bt).call(this,h(this,$e).call(this,t),{key:s,uploadId:r,parts:o,signal:n},n).abortOn(n)}catch(o){throw o?.cause!==Ui&&o?.name!=="AbortError"&&this.abortFileUpload(t),o}}restoreUploadFile(t,i){if(t.data==null)throw new Error("File data is empty");h(this,Oe).set(t.data,i)}async resumeUploadFile(t,i,n){if(re(n),i.length===1&&i[0]!=null&&!i[0].shouldUseMultipart)return R(this,kt,In).call(this,t,i[0],n);const{uploadId:r,key:s}=await this.getUploadId(t,n);re(n);const o=await h(this,Ci).call(this,h(this,$e).call(this,t),{uploadId:r,key:s,signal:n},n).abortOn(n);re(n);const a=await Promise.all(i.map((c,u)=>{const d=u+1,f=o.find(({PartNumber:p})=>p===d);return f==null?this.uploadChunk(t,d,c,n):(c?.setAsUploaded?.(),{PartNumber:d,ETag:f.ETag})}));return re(n),h(this,Bt).call(this,h(this,$e).call(this,t),{key:s,uploadId:r,parts:a,signal:n},n).abortOn(n)}async uploadChunk(t,i,n,r){re(r);const{uploadId:s,key:o}=await this.getUploadId(t,r),a=h(this,Ht).values(),c=h(this,Ht).values(),u=()=>{const d=a.next();return d==null||d.done?null:d.value};for(;;){re(r);const d=n.getData(),{onProgress:f,onComplete:p}=n;let b;try{b=await h(this,xi).call(this,h(this,$e).call(this,t),{uploadId:s,key:o,partNumber:i,body:d,signal:r}).abortOn(r)}catch(m){const g=u();if(g==null||r.aborted)throw m;await new Promise(_=>setTimeout(_,g));continue}re(r);try{return{PartNumber:i,...await h(this,Wt).call(this,{signature:b,body:d,size:d.size,onProgress:f,onComplete:p,signal:r}).abortOn(r)}}catch(m){if(!await R(this,kt,xs).call(this,m,c))throw m}}}}_i=new WeakMap,Oe=new WeakMap,vi=new WeakMap,xi=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Vt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Bt=new WeakMap,At=new WeakMap,Wt=new WeakMap,$e=new WeakMap,kt=new WeakSet,xs=async function(t,i){const n=h(this,zt),r=t?.source?.status;if(r==null)return!1;if(r===403&&t.message==="Request has expired"){if(!n.isPaused){if(n.limit===1||h(this,Vt)==null){const s=i.next();if(s==null||s.done)return!1;q(this,Vt,s.value)}n.rateLimit(0),await new Promise(s=>setTimeout(s,h(this,Vt)))}}else if(r===429){if(!n.isPaused){const s=i.next();if(s==null||s.done)return!1;n.rateLimit(s.value)}}else{if(r>400&&r<500&&r!==409)return!1;if(typeof navigator<"u"&&navigator.onLine===!1)n.isPaused||(n.pause(),window.addEventListener("online",()=>{n.resume()},{once:!0}));else{const s=i.next();if(s==null||s.done)return!1;await new Promise(o=>setTimeout(o,s.value))}}return!0},In=async function(t,i,n){const{method:r="POST",url:s,fields:o,headers:a}=await h(this,Si).call(this,h(this,$e).call(this,t),{signal:n}).abortOn(n);let c;const u=i.getData();if(r.toUpperCase()==="POST"){const m=new FormData;Object.entries(o).forEach(([g,_])=>m.set(g,_)),m.set("file",u),c=m}else c=u;const{onProgress:d,onComplete:f}=i,p=await h(this,Wt).call(this,{signature:{url:s,headers:a,method:r},body:c,size:u.size,onProgress:d,onComplete:f,signal:n}).abortOn(n),b=o?.key;return h(this,At).call(this,t,{key:b}),{...p,location:p.location??Kl(s),bucket:o?.bucket,key:b}};function Et(e){if(e?.error){const t=new Error(e.message);throw Object.assign(t,e.error),t}return e}function Nr(e){const t=e.Expiration;if(t){const i=Math.floor((new Date(t)-Date.now())/1e3);if(i>9)return i}}function Mr({meta:e,allowedMetaFields:t,querify:i=!1}){const n=t??Object.keys(e);return e?Object.fromEntries(n.filter(r=>e[r]!=null).map(r=>{const s=i?`metadata[${r}]`:r,o=String(e[r]);return[s,o]})):{}}const Xl={allowedMetaFields:!0,limit:6,getTemporarySecurityCredentials:!1,shouldUseMultipart:e=>(e.size||0)>100*1024*1024,retryDelays:[0,1e3,3e3,5e3]};var Dt,ue,ie,Tn,dt,Ve,Ss,Hi,Gt,Cs,As,Ai,Kt,Rt,Ri;const Bi=class Bi extends bo{constructor(i,n){super(i,{...Xl,uploadPartBytes:Bi.uploadPartBytes,createMultipartUpload:null,listParts:null,abortMultipartUpload:null,completeMultipartUpload:null,
8signPart:null,getUploadParameters:null,...n});A(this,ie);A(this,Dt);A(this,ue);z(this,"requests");z(this,"uploaderEvents");z(this,"uploaders");A(this,Ve);A(this,Hi,(i,{key:n,uploadId:r})=>{const s=this.uppy.getFile(i.id);s!=null&&this.uppy.setFileState(i.id,{s3Multipart:{...s.s3Multipart,key:n,uploadId:r}})});A(this,Gt,i=>this.uppy.getFile(i.id)||i);A(this,Ai,async i=>{if(i.length===0)return;const n=this.uppy.getFilesByIds(i),r=Ha(n),s=Ba(r);this.uppy.emit("upload-start",s);const o=r.map(c=>{if(c.isRemote){const u=()=>this.requests;h(this,Rt).call(this,!1);const d=new AbortController,f=b=>{b.id===c.id&&d.abort()};this.uppy.on("file-removed",f);const p=this.uppy.getRequestClientForFile(c).uploadRemoteFile(c,R(this,ie,As).call(this,c),{signal:d.signal,getQueue:u});return this.requests.wrapSyncFunction(()=>{this.uppy.off("file-removed",f)},{priority:-1})(),p}return R(this,ie,Cs).call(this,c)}),a=await Promise.allSettled(o);return h(this,Rt).call(this,!0),a});A(this,Kt,()=>{h(this,ue)?.setCompanionHeaders(this.opts.headers)});A(this,Rt,i=>{const{capabilities:n}=this.uppy.getState();this.uppy.setState({capabilities:{...n,resumableUploads:i}})});A(this,Ri,()=>{h(this,Rt).call(this,!0)});this.type="uploader",this.id=this.opts.id||"AwsS3Multipart",R(this,ie,Tn).call(this,n);const r={createMultipartUpload:this.createMultipartUpload,listParts:this.listParts,abortMultipartUpload:this.abortMultipartUpload,completeMultipartUpload:this.completeMultipartUpload,signPart:n?.getTemporarySecurityCredentials?this.createSignedURL:this.signPart,getUploadParameters:n?.getTemporarySecurityCredentials?this.createSignedURL:this.getUploadParameters};for(const s of Object.keys(r))this.opts[s]==null&&(this.opts[s]=r[s].bind(this));this.requests=this.opts.rateLimitedQueue??new Ja(this.opts.limit),q(this,Dt,new Ql(this.requests,this.opts,h(this,Hi),h(this,Gt))),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null)}[Symbol.for("uppy test: getClient")](){return h(this,ue)}setOptions(i){h(this,Dt).setOptions(i),super.setOptions(i),R(this,ie,Tn).call(this,i)}resetUploaderReferences(i,n){this.uploaders[i]&&(this.uploaders[i].abort({really:n?.abort||!1}),this.uploaders[i]=null),this.uploaderEvents[i]&&(this.uploaderEvents[i].remove(),this.uploaderEvents[i]=null)}createMultipartUpload(i,n){R(this,ie,dt).call(this,"createMultipartUpload"),re(n);const r=Sr(this.opts.allowedMetaFields,i.meta),s=Mr({meta:i.meta,allowedMetaFields:r});return h(this,ue).post("s3/multipart",{filename:i.name,type:i.type,metadata:s},{signal:n}).then(Et)}listParts(i,{key:n,uploadId:r,signal:s},o){s??(s=o),R(this,ie,dt).call(this,"listParts"),re(s);const a=encodeURIComponent(n);return h(this,ue).get(`s3/multipart/${encodeURIComponent(r)}?key=${a}`,{signal:s}).then(Et)}completeMultipartUpload(i,{key:n,uploadId:r,parts:s,signal:o},a){o??(o=a),R(this,ie,dt).call(this,"completeMultipartUpload"),re(o);const c=encodeURIComponent(n),u=encodeURIComponent(r);return h(this,ue).post(`s3/multipart/${u}/complete?key=${c}`,{parts:s.map(({ETag:d,PartNumber:f})=>({ETag:d,PartNumber:f}))},{signal:o}).then(Et)}async createSignedURL(i,n){const r=await R(this,ie,Ss).call(this,n),s=Nr(r.credentials)||604800,{uploadId:o,key:a,partNumber:c}=n;return{method:"PUT",expires:s,fields:{},url:`${await Bl({accountKey:r.credentials.AccessKeyId,accountSecret:r.credentials.SecretAccessKey,sessionToken:r.credentials.SessionToken,expires:s,bucketName:r.bucket,Region:r.region,Key:a??`${crypto.randomUUID()}-${i.name}`,uploadId:o,partNumber:c})}`,headers:{"Content-Type":i.type}}}signPart(i,{uploadId:n,key:r,partNumber:s,signal:o}){if(R(this,ie,dt).call(this,"signPart"),re(o),n==null||r==null||s==null)throw new Error("Cannot sign without a key, an uploadId, and a partNumber");const a=encodeURIComponent(r);return h(this,ue).get(`s3/multipart/${encodeURIComponent(n)}/${s}?key=${a}`,{signal:o}).then(Et)}abortMultipartUpload(i,{key:n,uploadId:r,signal:s}){R(this,ie,dt).call(this,"abortMultipartUpload");const o=encodeURIComponent(n),a=encodeURIComponent(r);return h(this,ue).delete(`s3/multipart/${a}?key=${o}`,void 0,{signal:s}).then(Et)}getUploadParameters(i,n){R(this,ie,dt).call(this,"getUploadParameters");const{meta:r}=i,{type:s,name:o}
8=r,a=Sr(this.opts.allowedMetaFields,i.meta),c=Mr({meta:r,allowedMetaFields:a,querify:!0}),u=new URLSearchParams({filename:o,type:s,...c});return h(this,ue).get(`s3/params?${u}`,n)}static async uploadPartBytes({signature:{url:i,expires:n,headers:r,method:s="PUT"},body:o,size:a=o.size,onProgress:c,onComplete:u,signal:d}){if(re(d),i==null)throw new Error("Cannot upload to an undefined URL");return new Promise((f,p)=>{const b=new XMLHttpRequest;b.open(s,i,!0),r&&Object.keys(r).forEach(_=>{b.setRequestHeader(_,r[_])}),b.responseType="text",typeof n=="number"&&(b.timeout=n*1e3);function m(){b.abort()}function g(){d?.removeEventListener("abort",m)}d?.addEventListener("abort",m),b.upload.addEventListener("progress",_=>{c(_)}),b.addEventListener("abort",()=>{g(),p(rs())}),b.addEventListener("timeout",()=>{g();const _=new Error("Request has expired");_.source={status:403},p(_)}),b.addEventListener("load",()=>{if(g(),b.status===403&&b.responseText.includes("<Message>Request has expired</Message>")){const T=new Error("Request has expired");T.source=b,p(T);return}if(b.status<200||b.status>=300){const T=new Error("Non 2xx");T.source=b,p(T);return}c?.({loaded:a,lengthComputable:!0});const _=b.getAllResponseHeaders().trim().split(/[\r\n]+/),w={__proto__:null};for(const T of _){const U=T.split(": "),L=U.shift(),k=U.join(": ");w[L]=k}const{etag:x,location:C}=w;if(s.toUpperCase()==="POST"&&C==null&&console.error("@uppy/aws-s3: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket"),x==null){console.error("@uppy/aws-s3: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket");return}u?.(x),f({...w,ETag:x})}),b.addEventListener("error",_=>{g();const w=new Error("Unknown error");w.source=_.target,p(w)}),b.send(o)})}install(){h(this,Rt).call(this,!0),this.uppy.addPreProcessor(h(this,Kt)),this.uppy.addUploader(h(this,Ai)),this.uppy.on("cancel-all",h(this,Ri))}uninstall(){this.uppy.removePreProcessor(h(this,Kt)),this.uppy.removeUploader(h(this,Ai)),this.uppy.off("cancel-all",h(this,Ri))}};Dt=new WeakMap,ue=new WeakMap,ie=new WeakSet,Tn=function(i){i==null||!("endpoint"in i||"companionUrl"in i||"headers"in i||"companionHeaders"in i||"cookiesRule"in i||"companionCookiesRule"in i)||("companionUrl"in i&&!("endpoint"in i)&&this.uppy.log("`companionUrl` option has been removed in @uppy/aws-s3, use `endpoint` instead.","warning"),"companionHeaders"in i&&!("headers"in i)&&this.uppy.log("`companionHeaders` option has been removed in @uppy/aws-s3, use `headers` instead.","warning"),"companionCookiesRule"in i&&!("cookiesRule"in i)&&this.uppy.log("`companionCookiesRule` option has been removed in @uppy/aws-s3, use `cookiesRule` instead.","warning"),"endpoint"in i?q(this,ue,new bs(this.uppy,{pluginId:this.id,provider:"AWS",companionUrl:this.opts.endpoint,companionHeaders:this.opts.headers,companionCookiesRule:this.opts.cookiesRule})):("headers"in i&&h(this,Kt).call(this),"cookiesRule"in i&&(h(this,ue).opts.companionCookiesRule=i.cookiesRule)))},dt=function(i){if(!h(this,ue))throw new Error(`Expected a \`endpoint\` option containing a URL, or if you are not using Companion, a custom \`${i}\` implementation.`)},Ve=new WeakMap,Ss=async function(i){if(re(i?.signal),h(this,Ve)==null){const{getTemporarySecurityCredentials:n}=this.opts;n===!0?(R(this,ie,dt).call(this,"getTemporarySecurityCredentials"),q(this,Ve,h(this,ue).get("s3/sts",i).then(Et))):q(this,Ve,n(i)),q(this,Ve,await h(this,Ve)),setTimeout(()=>{q(this,Ve,null)},(Nr(h(this,Ve).credentials)||0)*500)}return h(this,Ve)},Hi=new WeakMap,Gt=new WeakMap,Cs=function(i){return new Promise((n,r)=>{const s=(d,f)=>{const p=this.uppy.getFile(i.id);this.uppy.emit("upload-progress",p,{uploadStarted:p.progress.uploadStarted??0,bytesUploaded:d,bytesTotal:f})},o=d=>{this.uppy.log(d),this.uppy.emit("upload-error",i,d),this.resetUploaderReferences(i.id),r(d)},a=d=>{const f={body:{...d},status:200,uploadURL:d.location};this.resetUploaderReferences(i.id),this.uppy.emit("upload-success",h(this,Gt).call(this,i),f),d.location&&this.uppy.log(`Download ${i.name} from ${d.location}`),n(void 0)};if(i.data==null)throw new Error("File data is empty");
8const c=new Gl(i.data,{companionComm:h(this,Dt),log:(...d)=>this.uppy.log(...d),getChunkSize:this.opts.getChunkSize?this.opts.getChunkSize.bind(this):void 0,onProgress:s,onError:o,onSuccess:a,onPartComplete:d=>{this.uppy.emit("s3-multipart:part-uploaded",h(this,Gt).call(this,i),d)},file:i,shouldUseMultipart:this.opts.shouldUseMultipart,...i.s3Multipart});this.uploaders[i.id]=c;const u=new Za(this.uppy);this.uploaderEvents[i.id]=u,u.onFileRemove(i.id,d=>{c.abort(),this.resetUploaderReferences(i.id,{abort:!0}),n(`upload ${d} was removed`)}),u.onCancelAll(i.id,()=>{c.abort(),this.resetUploaderReferences(i.id,{abort:!0}),n(`upload ${i.id} was canceled`)}),u.onFilePause(i.id,d=>{d?c.pause():c.start()}),u.onPauseAll(i.id,()=>{c.pause()}),u.onResumeAll(i.id,()=>{c.start()}),c.start()})},As=function(i){return{..."remote"in i&&i.remote?.body,protocol:"s3-multipart",size:i.data.size,metadata:i.meta}},Ai=new WeakMap,Kt=new WeakMap,Rt=new WeakMap,Ri=new WeakMap,z(Bi,"VERSION",$l.version);let En=Bi;function Or(e,t,i){const[n,r]=F.useState([]),s=()=>r([]);return F.useEffect(()=>{const o=(...a)=>{r(a),i?.(...a)};return e.on(t,o),function(){e.off(t,o)}},[e,t,i]),[n,s]}const Jl=(e,t)=>
8F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13.5 15.75",fill:"none",ref:t,...e},F.createElement("path",{d:"M1.125 9L1.91812 9.79312L6.1875 5.52937V15.75H7.3125V5.52937L11.5819 9.79312L12.375 9L6.75 3.375L1.125 9Z",fill:"currentColor"}),F.createElement("path",{d:"M1.125 3.375V1.125H12.375V3.375H13.5V1.125C13.5 0.826631 13.3815 0.540483 13.1705 0.329505C12.9595 0.118526 12.6734 0 12.375 0H1.125C0.826631 0 0.540483 0.118526 0.329505 0.329505C0.118526 0.540483 0 0.826631 0 1.125V3.375H1.125Z",fill:"currentColor"})),Yl=F.forwardRef(Jl),Zl=F.lazy(()=>po("./UppyDashboardModal-olU1_v6D.js",["/javascripts/compiled/UppyDashboardModal-BGxBWBoV.css"])),Wn=({name:e="proof_s3_key"})=>{const{t}=K();return l.jsx(ro,{name:e,defaultValue:"",rules:{required:t("artist_verification_request.form.required")},render:({field:i,fieldState:n})=>l.jsx(oe,{field:i,fieldState:n})})};Wn.propTypes={name:v.string};Wn.displayName="ProofField";const oe=({field:{value:e,onChange:t},fieldState:{error:i}})=>{const{t:n}=K(),[r,s]=F.useState(null),[o,a]=F.useState(!1),[c]=Yo(),u=ee(p=>p.artistVerificationRequest.proofAllowedContentTypes),d=ee(p=>p.artistVerificationRequest.proofMaxUploadSize),[f]=F.useState(()=>new bn({autoProceed:!0,restrictions:{allowedFileTypes:u,maxFileSize:d,maxNumberOfFiles:1}}).use(En,{async getUploadParameters(p){const{data:b,error:m}=await c({filename:p.name,contentType:p.type});if(m)throw new Error(m.data?.meta?.message);return{method:"POST",url:b.url,fields:b.fields}}}));return Or(f,"upload-success",(p,b)=>{t(b.body.key),p.data&&s(URL.createObjectURL(p.data))}),Or(f,"upload-error",()=>t("")),F.useEffect(()=>()=>f.destroy(),[f]),F.useEffect(()=>{e||s(p=>(p&&URL.revokeObjectURL(p),null))},[e]),l.jsxs(oe.Wrapper,{children:[l.jsxs(Fe,{children:[n("artist_verification_request.form.proof_label"),"Â ",l.jsx(ho,{children:"*"})]}),l.jsx(F.Suspense,{fallback:null,children:l.jsx(Zl,{uppy:f,open:o,onRequestClose:()=>a(!1),hideUploadButton:!0,note:n("artist_verification_request.form.proof_help")})}),e&&r?l.jsx(oe.PreviewContainer,{onClick:()=>a(!0),children:l.jsx(oe.PreviewImage,{src:r,alt:n("artist_verification_request.form.proof_preview_alt")})}):l.jsx(oe.UploadButton,{type:"button",onClick:()=>a(!0),children:l.jsxs(oe.UploadContent,{children:[l.jsx(oe.UploadIconWrapper,{children:l.jsx(Yl,{})}),n("artist_verification_request.form.proof_upload")]})}),i&&l.jsx(fo,{role:"alert",children:i.message}),l.jsx(oe.Subtext,{children:n("artist_verification_request.form.proof_help")})]})};oe.propTypes={field:v.shape({value:v.string,onChange:v.func.isRequired}).isRequired,fieldState:v.shape({error:v.shape({message:v.string})}).isRequired};oe.Wrapper=y.div.withConfig({displayName:"ProofField__Wrapper",componentId:"sc-443690c7-0"})(["display:flex;flex-direction:column;gap:",";"],e=>e.theme.space.xSmall);oe.UploadButton=y.button.withConfig({displayName:"ProofField__UploadButton",componentId:"sc-443690c7-1"})(["display:flex;align-items:center;justify-content:center;width:100%;height:",";padding:",";border:"," dashed ",";background:none;cursor:pointer;color:",";font-family:",";font-size:",";font-weight:",";&:disabled{opacity:0.5;cursor:default;}"],e=>e.theme.space.xxxLarge,e=>e.theme.space.small,e=>e.theme.border.thinWidth,e=>e.theme.color.border.adaptive,e=>e.theme.color.background.on,e=>e.theme.font.reading,e=>e.theme.fontSize.mediumReading,e=>e.theme.fontWeight.light);oe.UploadContent=y.div.withConfig({displayName:"ProofField__UploadContent",componentId:"sc-443690c7-2"})(["display:flex;align-items:center;gap:",";"],e=>e.theme.space.xSmall);oe.UploadIconWrapper=y.div.withConfig({displayName:"ProofField__UploadIconWrapper",componentId:"sc-443690c7-3"})(["display:flex;align-items:center;justify-content:center;width:",";height:",";svg{width:100%;height:100%;}"],e=>e.theme.space.medium,e=>e.theme.space.medium);oe.PreviewContainer=y.div.withConfig({displayName:"ProofField__PreviewContainer",componentId:"sc-443690c7-4"})(["display:flex;align-items:center;justify-content:center;width:100%;padding:",";background-color:",";border:"," solid ",";overflow:hidden;cursor:pointer;"],e=>e.theme.space.small,e=>e.theme.color.background.variant,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary);oe.PreviewImage=y.img.withConfig({displayName:"ProofField__PreviewImage",componentId:"sc-443690c7-5"})(["max-width:14rem;max-height:31rem;object-fit:contain;border:"," solid ",";"],e=>e.theme.border.thinWidth,e=>e.theme.color.border.primary);oe.Subtext=y.p.withConfig({displayName:"ProofField__Subtext",componentId:"sc-443690c7-6"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";margin:0;padding-top:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.smallReading,e=>e.theme.color.background.onVariant,e=>e.theme.space.hair);const ec={email:"",social_handle:"",streaming_url:"",region:null,genre:null,request_reason:"",proof_s3_key:""},Ee=({artistId:e,createRequest:t,onSuccess:i,regionSlugs:n,genreSlugs:r})=>{const{t:s}=K(),o=lt(),a=F.useCallback(()=>o(Qt("confirm_artist")),[o]),c=F.useMemo(()=>({required:{value:!0,message:s("artist_verification_request.form.required")}}),[s]),u=F.useMemo(()=>n.map(g=>({value:g,label:s(`artist_verification_request.regions.${g}`)})),[s,n]),d=F.useMemo(()=>r.map(g=>({value:g,label:s(`artist_verification_request.genres.${g}`)})),[s,r]),{methods:f,onSubmit:p,isSubmitting:b}=Jr({submitAction:t,isMutation:!0,extraValues:{artist_id:e},useFormOptions:{defaultValues:ec},onSuccess:i}),{formState:{errors:m}}=f;return l.jsx(Qr,{...f,children:l.jsxs(Ee.Form,{onSubmit:p,children:[l.jsxs(Ee.Fields,{children:[l.jsx(et,{name:"email",label:s("artist_verification_request.form.email_label"),helpText:s("artist_verification_request.form.email_help"),rules:c,children:l.jsx(ti,{type:"email",placeholder:s("artist_verification_request.form.email_placeholder"),fullWidth:!0,paddingKey:"half"})}),l.jsx(et,{name:"social_handle",label:s("artist_verification_request.form.social_handle_label"),rules:c,children:l.jsx(ti,{placeholder:s("artist_verification_request.form.social_handle_placeholder"),fullWidth:!0,paddingKey:"half"})}),l.jsx(Wn,{}),l.jsx(et,{name:"streaming_url",label:s("artist_verification_request.form.streaming_url_label"),rules:c,children:l.jsx(ti,{type:"url",placeholder:s("artist_verification_request.form.streaming_url_placeholder"),fullWidth:!0,paddingKey:"half"})}),l.jsx(et,{name:"region",label:s("artist_verification_request.form.regi
8on_label"),rules:c,transformForForm:g=>g?.value??null,transformForInput:g=>u.find(_=>_.value===g)||null,isInputControlled:!0,children:l.jsx(qi,{options:u,placeholder:s("artist_verification_request.form.region_placeholder")})}),l.jsx(et,{name:"genre",label:s("artist_verification_request.form.genre_label"),rules:c,transformForForm:g=>g?.value??null,transformForInput:g=>d.find(_=>_.value===g)||null,isInputControlled:!0,children:l.jsx(qi,{options:d,placeholder:s("artist_verification_request.form.genre_placeholder")})}),l.jsx(et,{name:"request_reason",label:s("artist_verification_request.form.request_reason_label"),children:l.jsx(ti,{fullWidth:!0,paddingKey:"half"})})]}),m?.root?.message&&l.jsx(Ee.ErrorMessage,{role:"alert",children:m.root.message}),l.jsxs(Ee.Actions,{children:[l.jsx(pe,{type:"submit",loading:b,children:s(b?"artist_verification_request.form.submitting":"artist_verification_request.form.submit")}),l.jsx(Ee.BackButton,{secondary:!0,type:"button",onClick:a,children:s("artist_verification_request.form.back")})]})]})})};Ee.propTypes={artistId:v.number.isRequired,createRequest:v.func.isRequired,onSuccess:v.func.isRequired,regionSlugs:v.arrayOf(v.string).isRequired,genreSlugs:v.arrayOf(v.string).isRequired};const tc=Re.memo(Ee);Ee.Form=y.form.withConfig({displayName:"ManualApplicationForm__Form",componentId:"sc-2fa8b29b-0"})(["display:flex;flex-direction:column;gap:",";width:100%;"],e=>e.theme.space.full);Ee.Fields=y.div.withConfig({displayName:"ManualApplicationForm__Fields",componentId:"sc-2fa8b29b-1"})(["display:flex;flex-direction:column;gap:",";.react-select__control{padding:",";}.react-select__value-container{padding:0;}"],e=>e.theme.space.full,e=>e.theme.space.small);Ee.Actions=y.div.withConfig({displayName:"ManualApplicationForm__Actions",componentId:"sc-2fa8b29b-2"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-top:",";",""],e=>e.theme.space.half,e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xLarge)));Ee.BackButton=y(pe).withConfig({displayName:"ManualApplicationForm__BackButton",componentId:"sc-2fa8b29b-3"})(["text-decoration:underline;"]);Ee.ErrorMessage=y.div.withConfig({displayName:"ManualApplicationForm__ErrorMessage",componentId:"sc-2fa8b29b-4"})(["color:",";font-size:",";"],e=>e.theme.color.error.main,e=>e.theme.fontSize.reading);const Dn=()=>{const{t:e}=K(),t=lt(),i=Jt(),n=ee(f=>f.artistVerificationRequest.selectedArtist)??i?.artistId,r=Xt("artists",n),s=ee(f=>f.artistVerificationRequest.regions),o=ee(f=>f.artistVerificationRequest.genres),[a,{isError:c,error:u}]=Zo(),d=F.useCallback(()=>t(Qt("success")),[t]);if(c){const f=u?.status===429?"not_in_good_standing":u?.data?.response?.error_code;return l.jsx(ki,{code:f})}return l.jsxs(Dn.Wrapper,{children:[r&&l.jsx(zn,{imageUrl:r.imageUrl,title:r.name,caption:e("artist_verification_request.form.subtitle")}),l.jsx(tc,{artistId:n,createRequest:a,onSuccess:d,regionSlugs:s,genreSlugs:o})]})};Dn.Wrapper=y.div.withConfig({displayName:"ArtistVerificationRequestForm__Wrapper",componentId:"sc-c81e7b85-0"})(["display:flex;flex-direction:column;align-items:center;width:100%;max-width:33rem;margin:0 auto;padding:"," ",";",""],e=>e.theme.space.xxLarge,e=>e.theme.space.hair,O(N(["padding:"," ",";"],e=>e.theme.space.xxxLarge,e=>e.theme.space.medium)));function Ni(){const e=lt(),{t}=K(),i=ee(r=>r.artistVerificationRequest.step),n=ee(r=>r.artistVerificationRequest.selectedArtist);if(F.useEffect(()=>{e(ht("artist_claim:load",{counts_as_page_load:!0}))},[e]),i==="success")return l.jsx(Ae,{title:t("artist_verification_request.success.title"),message:t("artist_verification_request.success.message"),buttonLabel:t("artist_verification_request.success.go_home"),buttonHref:"/"});if(n){if(i==="confirm_artist")return l.jsx(Ni.Wrapper,{children:l.jsx(fe,{})});if(i==="verification_method")return l.jsx(ot,{});if(i==="manual_application")return l.jsx(Dn,{})}return l.jsx(Ni.Wrapper,{children:l.jsx(Ce,{})})}Ni.Wrapper=y.div.withConfig({displayName:"NewPage__Wrapper",componentId:"sc-95fd7847-0"})(["margin:0 auto;padding:"," 0;",""],e=>e.theme.space.xxLarge,O(N(["max-width:33rem;padding:"," 0 ",";"],e=>e.theme.space.xxxxLarge,e=>e.theme.space.xxxLarge)));const ic=["pending","staff_pending"],at=()=>{const{t:e}=K(),t=ee(r=>r.artistVerificationRequest.request),i=Jt(),n=ic.includes(t?.status);return l.jsxs(at.Container,{children:[i&&l.jsxs(l.Fragment,{children:[t?.artist?.imageUrl&&l.jsx(is,{src:t.artist.imageUrl}),t?.artist?.name&&l.jsx(at.ArtistName,{children:t.artist.name})]}),l.jsx(at.Message,{children:e(n?"artist_verification_request.status_page.processing.message":"artist_verification_request.status_page.processed.message")}),l.jsx(at.Actions,{children:n?l.jsx(pe,{as:"a",href:"/",children:e("artist_verification_request.status_page.processing.go_home")}):l.jsx(pe,{as:"a",href:"/feedback/new",children:e("artist_verification_request.status_page.processed.contact_support")})})]})};at.Container=y.div.withConfig({displayName:"VerificationStatusPage__Container",componentId:"sc-b562c731-0"})(["display:flex;flex-direction:column;align-items:center;text-align:center;gap:",";width:100%;max-width:594px;box-sizing:border-box;padding:"," ",";margin:0 auto;",""],e=>e.theme.space.half,e=>e.theme.space.xxxLarge,e=>e.theme.grid.gap,O(N(["padding:"," 0;"],e=>e.theme.space.xxxLarge)));at.ArtistName=y.h1.withConfig({displayName:"VerificationStatusPage__ArtistName",componentId:"sc-b562c731-1"})(["font-family:",";font-size:",";font-weight:",";line-height:1;color:",";word-break:break-word;",""],e=>e.theme.font.alternate,e=>e.theme.fontSize.largeHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.color.accentFont,O(N(["font-size:",";"],e=>e.theme.fontSize.xLargeHeadline)));at.Message=y.p.withConfig({displayName:"VerificationStatusPage__Message",componentId:"sc-b562c731-2"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.reading,e=>e.theme.color.background.on);at.Actions=y.div.withConfig({displayName:"VerificationStatusPage__Actions",componentId:"sc-b562c731-3"})(["padding-top:",";"],e=>e.theme.space.xLarge);const $r="artist_verification_request.manual_review",nc=["staff_pending","approved","artist_accepted","rejected"],Xi=({status:e,reviewer:t=null,reviewedAt:i=null})=>{const{t:n,i18n:r}=K();if(!nc.includes(e))return null;const s=new Date(i*1e3);return l.jsx(Xi.Line,{children:l.jsx(Co,{i18nKey:`${$r}.${e==="staff_pending"?"sent_to_staff_by":"reviewed_by"}`,values:{name:t?.name||n(`${$r}.unknown_reviewer`),date:s.toLocaleDateString(r.language,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})},components:{reviewerLink:t?l.jsx(xo,{href:t.url,newTab:!0}):l.jsx("span",{}),reviewedOn:l.jsx("time",{dateTime:s.toISOString()})}})})};Xi.propTypes={status:v.string.isRequired,reviewer:v.shape({name:v.string,url:v.string}),reviewedAt:v.number};Xi.Line=y.p.withConfig({displayName:"ReviewedBy__Line",componentId:"sc-d6e0c0ee-0"})(["font-size:",";font-weight:",";"],e=>e.theme.fontSize.mediumReading,e=>e.theme.fontWeight.light);const rc={pending:{variant:"outlined",Icon:dr,labelKey:"pending"},staff_pending:{variant:"outlined",Icon:dr,labelKey:"staff_pending"},approved:{variant:"approved",Icon:cr,labelKey:"approved"},artist_accepted:{variant:"approved",Icon:cr,labelKey:"approved"},rejected:{variant:"rejected",Icon:Ao,labelKey:"rejected"}},sc=["approve","reject","send_to_staff"],oc=({isApprovalGated:e,isEscalatedReadOnly:t})=>e?"approval":t?"escalated":null,ac=({isEscalatedReadOnly:e,canApprove:t,isPendingStaffReview:i})=>sc.filter(n=>n==="approve"?t||e:n==="send_to_staff"?!i:!0),P=()=>{const{t:e}=K(),t=Di(),i=mo(),n=ee(M=>M.artistVerificationRequest.request),r=ee(M=>M.artistVerificationRequest.staffApprovalPageviewThreshold),{id:s,status:o,artist:a,email:c,submitter:u,socialHandle:d,streamingUrl:f,region:p,genre:b,requestReason:m,proofUrl:g,presignedProofUrl:_,automatedNotes:w,reviewerNotes:x,reviewer:C,reviewedAt:T}=n,U=lr("moderate",n),L=lr("approve",n),k=o==="staff_pending",S=!U&&k,I=U&&!L,$=U||S,V=oc({isApprovalGated:I,isEscalatedReadOnly:S}),D=F.useMemo(()=>
8{if(!V)return;const M=`artist_verification_request.manual_review.staff_approval.${V}`;return{label:e(`${M}.label`),content:e(`${M}.tooltip`,{threshold:r})}},[e,V,r]),[Q]=Xo(),X=F.useMemo(()=>ac({isEscalatedReadOnly:S,canApprove:L,isPendingStaffReview:k}).map(M=>({key:M,value:M,label:e(`artist_verification_request.verification_actions.${M}`)})),[e,L,k,S]),H=F.useMemo(()=>[{value:"insufficient_proof",label:e("artist_verification_request.rejection_reasons.insufficient_proof")},{value:"already_verified",label:e("artist_verification_request.rejection_reasons.already_verified")},{value:"breaking_guidelines",label:e("artist_verification_request.rejection_reasons.breaking_guidelines")},{value:"unrelated_music",label:e("artist_verification_request.rejection_reasons.unrelated_music")},{value:"copyright_fraud",label:e("artist_verification_request.rejection_reasons.copyright_fraud")},{value:"other",label:e("artist_verification_request.rejection_reasons.other")}],[e]),te=F.useMemo(()=>({placeholder:M=>({...M,color:io(t.color.background.on,.5),padding:`0 ${t.space.quarter}`,fontSize:i?t.fontSize.mediumReading:void 0})}),[t,i]),ne=F.useMemo(()=>({required:{value:!0,message:e("artist_verification_request.manual_review.required")}}),[e]),_e=F.useMemo(()=>({reviewer_notes:x||"",verification_action:null,rejection_reason_type:null}),[x]),ve=F.useCallback(()=>{zs("notice",e("artist_verification_request.manual_review.success.message"));const M=document.referrer&&new URL(document.referrer),J=M&&M.origin===window.location.origin&&M.pathname.startsWith("/artist_verification_requests");window.location.href=J?M.href:"/artist_verification_requests"},[e]),{methods:Pe,onSubmit:me,isSubmitting:ge}=Jr({submitAction:Q,isMutation:!0,extraValues:{id:s},transformPayload:M=>({...M,rejection_reason_type:M.verification_action==="reject"?M.rejection_reason_type:null}),useFormOptions:{defaultValues:_e},onSuccess:ve,onError:()=>{Pe.setError("root",{type:"server",message:e("artist_verification_request.manual_review.error")})}}),{control:xe,formState:{errors:le}}=Pe,Ue=so({control:xe,name:"verification_action"}),ye=rc[o];return l.jsxs(P.Container,{children:[l.jsxs(P.ArtistHeader,{children:[l.jsxs(P.ArtistLink,{href:a?.url,target:"_blank",rel:"noopener noreferrer",children:[a?.imageUrl&&l.jsx(P.ArtistImage,{src:a.imageUrl,alt:a?.name||""}),a?.name&&l.jsx(P.ArtistName,{children:a.name})]}),ye?.variant==="outlined"&&l.jsx(P.ArtistSubtitle,{children:e("artist_verification_request.manual_review.subtitle")}),ye&&l.jsxs(P.StatusPill,{$variant:ye.variant,children:[l.jsx(ye.Icon,{}),e(`artist_verification_request.manual_review.status_pill.${ye.labelKey}`)]}),l.jsx(Xi,{status:o,reviewer:C,reviewedAt:T})]}),l.jsx(Qr,{...Pe,children:l.jsxs(P.Form,{onSubmit:me,children:[l.jsxs(P.Section,{children:[l.jsxs(P.Row,{children:[l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.genius_profile")}),l.jsx(P.ReadOnlyInput,{value:a?.url||"",disabled:!0,readOnly:!0})]}),c&&l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.email")}),l.jsx(P.ReadOnlyInput,{value:c,disabled:!0,readOnly:!0})]}),u&&l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.submitter")}),l.jsx(P.ReadOnlyLink,{href:u.url,target:"_blank",rel:"noopener noreferrer",children:u.name})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.social_handle")}),l.jsx(P.ReadOnlyInput,{value:d||"",disabled:!0,readOnly:!0})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.region")}),l.jsx(P.ReadOnlyInput,{value:p?e(`artist_verification_request.regions.${p}`,{defaultValue:p}):"",disabled:!0,readOnly:!0})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.genre")}),l.jsx(P.ReadOnlyInput,{value:b?e(`artist_verification_request.genres.${b}`,{defaultValue:b}):"",disabled:!0,readOnly:!0})]})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.streaming_url")}),l.jsx(P.ReadOnlyLink,{href:f||"",target:"_blank",rel:"noopener noreferrer",children:f||""})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.request_reason")}),l.jsx(P.ReadOnlyBlock,{children:m||""})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.social_proof")}),g&&l.jsx(P.ReadOnlyLink,{href:g,target:"_blank",rel:"noopener noreferrer",children:e("artist_verification_request.manual_review.fields.social_proof_link")}),_&&l.jsx(P.ProofContainer,{children:l.jsx(P.ProofLink,{href:_,target:"_blank",rel:"noopener noreferrer",children:l.jsx(P.ProofImage,{src:_,alt:e("artist_verification_request.manual_review.fields.social_proof_alt")})})})]}),l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.automated_notes")}),l.jsx(P.ReadOnlyBlock,{children:w||""})]}),!U&&l.jsxs(qe,{children:[l.jsx(Fe,{as:"div",children:e("artist_verification_request.manual_review.fields.reviewer_notes")}),l.jsx(P.ReadOnlyBlock,{children:x||""})]})]}),$&&l.jsxs(P.Section,{children:[U&&l.jsx(et,{name:"reviewer_notes",label:e("artist_verification_request.manual_review.fields.reviewer_notes"),children:l.jsx(P.FullTextarea,{placeholder:e("artist_verification_request.manual_review.placeholders.reviewer_notes")})}),l.jsx(et,{name:"verification_action",asFieldset:!0,label:e("artist_verification_request.manual_review.fields.verification_action"),infoTooltip:D,rules:S?void 0:ne,disabled:S,children:l.jsx(P.RadioButtons,{name:"verification_action",options:X})}),U&&Ue==="reject"&&l.jsx(et,{name:"rejection_reason_type",label:e("artist_verification_request.manual_review.fields.rejection_reason"),rules:ne,transformForForm:M=>M?.value??null,transformForInput:M=>H.find(J=>J.value===M)||null,isInputControlled:!0,children:l.jsx(qi,{options:H,placeholder:e("artist_verification_request.manual_review.placeholders.rejection_reason"),customStyles:te})})]}),le?.root?.message&&l.jsx(P.Error,{role:"alert",children:le.root.message}),l.jsxs(P.Actions,{children:[$&&l.jsx(pe,{type:"submit",loading:ge,disabled:S,children:e(ge?"artist_verification_request.manual_review.actions.submitting":"artist_verification_request.manual_review.actions.submit")}),l.jsx(pe,{as:"a",href:"/artist_verification_requests",secondary:!0,children:e("artist_verification_request.manual_review.actions.back")})]})]})})]})};P.Container=y.div.withConfig({displayName:"ManualReviewForm__Container",componentId:"sc-f9e1b174-0"})(["display:flex;flex-direction:column;align-items:center;width:100%;max-width:594px;box-sizing:border-box;padding:"," ",";margin:0 auto;",""],e=>e.theme.space.xxxLarge,e=>e.theme.grid.gap,O(N(["padding:"," 0;"],e=>e.theme.space.xxxLarge)));P.ArtistHeader=y.header.withConfig({displayName:"ManualReviewForm__ArtistHeader",componentId:"sc-f9e1b174-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-bottom:",";width:100%;"],e=>e.theme.space.small,e=>e.theme.space.xxLarge);P.ArtistLink=y.a.withConfig({displayName:"ManualReviewForm__ArtistLink",componentId:"sc-f9e1b174-2"})(["display:flex;flex-direction:column;align-items:center;gap:",";text-decoration:none;"],e=>e.theme.space.small);P.ArtistImage=y.img.withConfig({displayName:"ManualReviewForm__ArtistImage",componentId:"sc-f9e1b174-3"})(["width:144px;height:144px;border-radius:1000px;object-fit:cover;"]);P.ArtistName=y.h1.withConfig({displayName:"ManualReviewForm__ArtistName",componentId:"sc-f9e1b174-4"})(["font-family:",";font-size:",";font-weight:",";line-height:1;color:",";text-align:center;word-break:break-word;",""],e=>e.theme.font.alternate,e=>e.theme.fontSize.largeHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.color.background.on,O(N(["font-size:",";"],e=>e.theme.fontSize.xLargeHeadline)));P.ArtistSubtitle=y.p.withConfig({displayName:"ManualReviewForm__ArtistSubtitle",componentId:"sc-f9e1b174-5"})(["font-family:",";font-size:",";font-weight:",";line-height:",";color:",";text-align:center;"],e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.normal,e=>e.theme.lineHeight.reading,e=>e.theme.color.background.on);P.Form=y.form.withConfig({displayName:"ManualReviewForm__Form",componentId:"sc-f9e1b174-6"})(["display:flex;flex-direction:column;width:100%;"]);P.Section=y.div.withConfig({displayName:"ManualReviewForm__Section",componentId:"sc-f9e1b174-7"})(["display:flex;flex-direction:column;gap:",";&:not(:last-child){padding-bottom:",";}"],e=>e.theme.space.full,e=>e.theme.space.xxLarge);P.Row=y.div.withConfig({displayName:"ManualReviewForm__Row",componentId:"sc-f9e1b174-8"})(["display:flex;flex-direction:column;gap:",";",""],e=>e.theme.space.full,O(N(["display:grid;grid-template-columns:1fr 1fr;"])));
8P.ReadOnlyInput=y(ti).withConfig({displayName:"ManualReviewForm__ReadOnlyInput",componentId:"sc-f9e1b174-9"})(["width:100%;box-sizing:border-box;&:disabled{opacity:1;background-color:",";border:"," solid ",";background-image:none;padding-right:",";color:",";}"],e=>e.theme.color.background.fillOnFill,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.space.small,e=>e.theme.color.background.on);P.ReadOnlyBlock=y.div.withConfig({displayName:"ManualReviewForm__ReadOnlyBlock",componentId:"sc-f9e1b174-10"})(["width:100%;box-sizing:border-box;min-height:",";padding:",";background-color:",";border:"," solid ",";color:",";font-family:",";font-size:",";line-height:",";white-space:pre-wrap;word-break:break-word;"],e=>e.theme.space.xLarge,e=>e.theme.space.small,e=>e.theme.color.background.fillOnFill,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.color.background.on,e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.lineHeight.reading);P.StatusPill=y.span.withConfig({displayName:"ManualReviewForm__StatusPill",componentId:"sc-f9e1b174-11"})(["display:inline-flex;align-items:center;gap:",";border-radius:9999px;padding:"," ",";border:"," solid ",";font-family:",";font-size:",";font-weight:",";line-height:1;color:",";svg{width:",";height:",";fill:currentColor;flex:0 0 auto;}"," "," ",""],e=>e.theme.space.quarter,e=>e.theme.space.xSmall,e=>e.theme.space.small,e=>e.theme.border.thinWidth,e=>e.theme.color.background.on,e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.fontWeight.light,e=>e.theme.color.background.on,e=>e.theme.fontSize.smallReading,e=>e.theme.fontSize.smallReading,e=>e.$variant==="outlined"&&N(["background-color:transparent;"]),e=>e.$variant==="approved"&&N(["background-color:",";color:",";"],e.theme.color.navigation.main,e.theme.color.navigation.on),e=>e.$variant==="rejected"&&N(["background-color:",";border-color:",";color:",";"],e.theme.color.accent.main,e.theme.color.accent.main,e.theme.color.accent.on));P.ReadOnlyLink=y.a.withConfig({displayName:"ManualReviewForm__ReadOnlyLink",componentId:"sc-f9e1b174-12"})(["display:block;width:100%;box-sizing:border-box;padding:",";background-color:",";border:"," solid ",";color:",";font-family:",";font-size:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:underline;"],e=>e.theme.space.small,e=>e.theme.color.background.fillOnFill,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.color.background.on,e=>e.theme.font.reading,e=>e.theme.fontSize.reading);P.FullTextarea=y(So).withConfig({displayName:"ManualReviewForm__FullTextarea",componentId:"sc-f9e1b174-13"})(["width:100%;min-height:100px;box-sizing:border-box;"]);P.ProofContainer=y.div.withConfig({displayName:"ManualReviewForm__ProofContainer",componentId:"sc-f9e1b174-14"})(["background-color:",";border:"," solid ",";padding:",";display:flex;justify-content:center;min-height:240px;align-items:center;"],e=>e.theme.color.background.fillOnFill,e=>e.theme.border.thinWidth,e=>e.theme.color.border.secondary,e=>e.theme.space.small);P.ProofLink=y.a.withConfig({displayName:"ManualReviewForm__ProofLink",componentId:"sc-f9e1b174-15"})(["display:flex;align-items:center;justify-content:center;"]);P.ProofImage=y.img.withConfig({displayName:"ManualReviewForm__ProofImage",componentId:"sc-f9e1b174-16"})(["max-width:14rem;max-height:31rem;object-fit:contain;"]);P.Error=y.p.withConfig({displayName:"ManualReviewForm__Error",componentId:"sc-f9e1b174-17"})(["font-family:",";font-size:",";color:",";"],e=>e.theme.font.reading,e=>e.theme.fontSize.smallReading,e=>e.theme.color.accent.main);P.Actions=y.div.withConfig({displayName:"ManualReviewForm__Actions",componentId:"sc-f9e1b174-18"})(["display:flex;flex-direction:column;align-items:center;gap:",";"],e=>e.theme.space.small);P.RadioButtons=y(vo).withConfig({displayName:"ManualReviewForm__RadioButtons",componentId:"sc-f9e1b174-19"})(["border:solid ",";padding:",";& :last-child{margin-bottom:0;}"],e=>e.theme.border.thinWidthPixels,e=>e.theme.space.small);const Gn=()=>l.jsx(Gn.Main,{children:l.jsx(P,{})});Gn.Main=y.main.withConfig({displayName:"ReviewPage__Main",componentId:"sc-728a314b-0"}
8)(["grid-column:grid-start / grid-end;min-width:0;"]);function di(){const e=ee(r=>r.artistVerificationRequest.selectedArtist),t=Xt("artists",e),{t:i}=K(),n=F.useCallback(()=>{const r=new URL(window.location.href);r.searchParams.set("auto_confirm","1"),eo(r.toString()),window.location.href="/signup?gfa_theme=1"},[]);return t?l.jsxs(di.Form,{children:[l.jsx(zn,{imageUrl:t.imageUrl,title:t.name,caption:`${i("artist_verification_page.verified.title")} ${i("artist_verification_page.verified.subtitle")}`}),l.jsxs(di.Actions,{children:[l.jsx(pe,{onClick:n,children:i("artist_verification_page.verified.create_account")}),l.jsx(pe,{secondary:!0,as:"a",href:"/login?gfa_theme=1",children:i("artist_verification_page.verified.sign_in")})]})]}):null}di.Form=y.div.withConfig({displayName:"ClaimLandingPage__Form",componentId:"sc-f27bf223-0"})(["display:flex;flex-direction:column;align-items:center;padding:"," 0;",""],e=>e.theme.space.xxLarge,O(N(["padding:"," 0;"],e=>e.theme.space.xxxLarge)));di.Actions=y.div.withConfig({displayName:"ClaimLandingPage__Actions",componentId:"sc-f27bf223-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";"],e=>e.theme.space.half);const lc={mobile:6,desktop:7},be=({userId:e,artistUserId:t,artistImageUrl:i})=>{const n=Ro(lc);return l.jsxs(be.Container,{children:[l.jsx(be.UserImage,{children:l.jsx(or,{id:e,size:n,sizeUnit:"rem"})}),l.jsxs(be.ArtistImage,{children:[l.jsx(be.ArtistBorder,{children:i?l.jsx(Xr,{src:i,width:n,height:n,sizeUnit:"rem"}):l.jsx(or,{id:t,size:n,sizeUnit:"rem"})}),l.jsx(be.VerifiedBadge,{children:l.jsx(be.CheckmarkIcon,{children:l.jsx(oo,{})})})]})]})};be.propTypes={userId:v.number.isRequired,artistUserId:v.number,artistImageUrl:v.string};const cc=Re.memo(be);be.Container=y.div.withConfig({displayName:"UserArtistAvatarStack__Container",componentId:"sc-c26476a9-0"})(["display:flex;align-items:center;padding-right:",";",""],e=>e.theme.space.xLarge,O(N(["padding-right:",";"],e=>e.theme.space.xxLarge)));be.UserImage=y.div.withConfig({displayName:"UserArtistAvatarStack__UserImage",componentId:"sc-c26476a9-1"})(["border-radius:100%;overflow:hidden;margin-right:-",";z-index:0;",""],e=>e.theme.space.xLarge,O(N(["margin-right:-",";"],e=>e.theme.space.xxLarge)));be.ArtistImage=y.div.withConfig({displayName:"UserArtistAvatarStack__ArtistImage",componentId:"sc-c26476a9-2"})(["position:relative;display:flex;flex-direction:column;align-items:center;gap:",";margin-right:-",";z-index:1;",""],e=>e.theme.space.half,e=>e.theme.space.xLarge,O(N(["margin-right:-",";"],e=>e.theme.space.xxLarge)));be.ArtistBorder=y.div.withConfig({displayName:"UserArtistAvatarStack__ArtistBorder",componentId:"sc-c26476a9-3"})(["border-radius:100%;overflow:hidden;border:"," solid ",";"],e=>e.theme.space.quarter,e=>e.theme.color.primary.main);be.VerifiedBadge=y.div.withConfig({displayName:"UserArtistAvatarStack__VerifiedBadge",componentId:"sc-c26476a9-4"})(["position:absolute;bottom:0;right:0;width:",";height:",";border-radius:100px;background-color:",";display:flex;align-items:center;justify-content:center;"],e=>e.theme.space.xxLarge,e=>e.theme.space.xxLarge,e=>e.theme.color.primary.main);be.CheckmarkIcon=y.div.withConfig({displayName:"UserArtistAvatarStack__CheckmarkIcon",componentId:"sc-c26476a9-5"})(["width:",";height:",";display:flex;align-items:center;justify-content:center;svg{width:100%;height:100%;fill:",";}"],e=>e.theme.space.small,e=>e.theme.space.small,e=>e.theme.isLight?e.theme.color.background.on:e.theme.color.background.off);const dc={upgrade:"artist_upgrade:confirm",merge:"artist_claim:complete"},uc={upgrade:"artist_upgrade:load",merge:"artist_claim:merge_review"};function we({variant:e,signedIntent:t}){const[i,{isLoading:n,isError:r,error:s}]=Jo(),o=Jt(),a=ee(x=>x.artistVerificationRequest.selectedArtist),c=Xt("artists",a),u=lt(),{t:d}=K(),[f,p]=F.useState(!1),b=F.useRef(!1);F.useEffect(()=>{const x={counts_as_page_load:!0};e==="merge"&&(x.step=t?"approval":"creator"),u(ht(uc[e],x))},[u,e,t]);const g=e==="merge"?{method:"claim"}:void 0,_=fn(dc[e],g),w=F.useCallback(async()=>{const x=await i({signedIntent:t,artistId:a});x.error||(_(),window.location.href=x.data.landing_url)},[i,t,a,_]);if(F.useEffect(()=>{if(b.current)return;new URLSearchParams(window.location.search).get("auto_confirm")==="1"&&(b.current=!0,p(!0),w())},[w]),f&&!r)return l.jsx(Un,{});if(r){const x=s?.status===429?"not_in_good_standing":s?.data?.response?.error_code;return l.jsx(ki,{code:x})}return l.jsxs(we.Container,{children:[l.jsxs(we.ArtistSection,{children:[l.jsx(cc,{userId:o.id,artistUserId:o.id,artistImageUrl:c?.imageUrl}),l.jsxs(we.Copy,{children:[l.jsx(we.Title,{children:d(`artist_verification_page.confirm_claim.${e}.title`)}),l.jsx(we.Subtitle,{children:d(`artist_verification_page.confirm_claim.${e}.subtitle`)})]})]}),l.jsxs(we.Actions,{children:[l.jsx(pe,{onClick:w,loading:n,disabled:n,children:d(`artist_verification_page.confirm_claim.${e}.button`)}),l.jsx(pe,{secondary:!0,as:"a",href:o.url,children:d("artist_verification_page.confirm_claim.cancel")})]})]})}we.propTypes={variant:v.oneOf(["upgrade","merge"]).isRequired,signedIntent:v.string};we.Container=y.div.withConfig({displayName:"AccountConfirmationPage__Container",componentId:"sc-a51198e8-0"})(["display:flex;flex-direction:column;align-items:center;padding:"," 0;"],e=>e.theme.space.xxxLarge);we.ArtistSection=y.div.withConfig({displayName:"AccountConfirmationPage__ArtistSection",componentId:"sc-a51198e8-1"})(["display:flex;flex-direction:column;align-items:center;gap:",";"],e=>e.theme.space.full);we.Copy=y.div.withConfig({displayName:"AccountConfirmationPage__Copy",componentId:"sc-a51198e8-2"})(["display:flex;flex-direction:column;align-items:center;gap:",";text-align:center;color:",";"],e=>e.theme.space.half,e=>e.theme.color.background.on);we.Title=y.h1.withConfig({displayName:"AccountConfirmationPage__Title",componentId:"sc-a51198e8-3"})(["font-family:",";font-size:",";font-weight:",";line-height:",";margin:0;color:",";",""],e=>e.theme.font.reading,e=>e.theme.fontSize.largeHeadline,e=>e.theme.fontWeight.normal,e=>e.theme.lineHeight.xShort,e=>e.theme.color.accentFont,O(N(["font-size:",";line-height:",";"],e=>e.theme.fontSize.xLargeHeadline,e=>e.theme.lineHeight.normal)));we.Subtitle=y.p.withConfig({displayName:"AccountConfirmationPage__Subtitle",componentId:"sc-a51198e8-4"})(["font-family:",";font-size:",";font-weight:",";line-height:",";margin:0;"],e=>e.theme.font.reading,e=>e.theme.fontSize.reading,e=>e.theme.fontWeight.light,e=>e.theme.lineHeight.medium);we.Actions=y.div.withConfig({displayName:"AccountConfirmationPage__Actions",componentId:"sc-a51198e8-5"})(["display:flex;flex-direction:column;align-items:center;gap:",";padding-top:",";",""],e=>e.theme.space.half,e=>e.theme.space.large,O(N(["padding-top:",";"],e=>e.theme.space.xLarge)));const hc=()=>{const{claimError:e,claimVariant:t,signedIntent:i}=ee(r=>r.artistVerificationRequest),n=Jt();return e?l.jsx(ki,{code:e}):n?l.jsx(we,{variant:t,signedIntent:i}):l.jsx(di,{})},fc={index:je,show:at,new:Ni,verify:hc,review:Gn},Te=()=>{const e=lt(),{t}=K(),{isLight:i}=Di(),n=F.useMemo(()=>({onClick:()=>{window.location.href="/signup?gfa_theme=1"},children:t("sign_up")}),[t]);F.useEffect(()=>{e(ht("artist_verification_requests:load",{counts_as_page_load:!0}))},[e]);const r=ee(o=>o.artistVerificationRequest.view),s=fc[r];return r==="index"||r==="review"?l.jsxs(Vs,{theme:o=>({...Os,deviceType:o.deviceType}),children:[l.jsx(rr,{}),l.jsx(Te.LightPageGrid,{$tall:r==="review",children:l.jsx(s,{})}),l.jsx(sr,{})]}):l.jsxs(l.Fragment,{children:[l.jsx(rr,{authButtonProps:n,theme:i?void 0:$s}),l.jsx(Te.PageGrid,{children:l.jsx(Te.Main,{children:l.jsx(Te.CenterGrid,{children:l.jsx(Te.Content,{children:l.jsx(s,{})})})})}),l.jsx(sr,{})]})};Te.propTypes={};const pc=Re.memo(Te);Te.LightPageGrid=y(Vr).withConfig({displayName:"ArtistVerificationRequestPage__LightPageGrid",componentId:"sc-48236ccb-0"})(["background-color:",";background-image:linear-gradient(180deg,"," 0%,"," ",");color:",";min-height:100vh;align-content:start;",""],e=>e.theme.color.background.main,e=>e.theme.color.navigation.main,e=>e.theme.color.background.main,e=>e.$tall?"26%":"4rem",e=>e.theme.color.background.on,O(N(["background-image:linear-gradient(180deg,"," 0%,"," ",");"],e=>e.theme.color.navigation.main,e=>e.theme.color.background.main,e=>e.$tall?"26%":"8rem")));Te.PageGrid=y(Vr).withConfig({displayName:"ArtistVerificationRequestPage__PageGrid",componentId:"sc-48236ccb-1"})(["background-color:",";background-image:linear-gradient( 180deg,"," 0%,"," "," );min-height:calc(100vh - ",");min-height:calc(100svh - ",");"," align-items:center;"],e=>e.theme.color.background.main,e=>e.theme.color.navigation.main,e=>e.theme.color.background.main,e=>e.theme.isLight?"26%":"100%",e=>e.theme.stickyNav.height.mobile,e=>e.theme.stickyNav.height.mobile,O(N(["min-height:calc(100vh - ",");"],e=>e.theme.stickyNav.height.desktop)));Te.Main=y.main.withConfig({displayName:"ArtistVerificationRequestPage__Main",componentId:"sc-48236ccb-2"}
8)(["grid-column:grid-start / grid-end;min-width:0;"]);Te.CenterGrid=y.div.withConfig({displayName:"ArtistVerificationRequestPage__CenterGrid",componentId:"sc-48236ccb-3"})(["display:grid;grid-template-columns:[page-start] minmax(0,1fr) [page-end];"," grid-gap:",";"],O(N(["grid-template-columns:repeat(3,minmax(0,1fr)) [page-start] repeat(6,minmax(0,1fr)) [page-end] repeat(3,minmax(0,1fr));"])),e=>e.theme.grid.gap);Te.Content=y.div.withConfig({displayName:"ArtistVerificationRequestPage__Content",componentId:"sc-48236ccb-4"})(["grid-column:page-start / page-end;min-width:0;"]);const mc=["confirm_artist","verification_method","manual_application","success"],gc=({step:e,artist:t})=>{const i=new URL(window.location.href);e?(i.searchParams.set("step",e),t?.slug&&i.searchParams.set("artist",t.slug)):(i.searchParams.delete("step"),i.searchParams.delete("artist")),window.history.replaceState({},"",i)},yc=ko({type:qn,validate:({action:e},t,i)=>{e.step==null||mc.includes(e.step)?t(e):i()},process:({action:e},t,i)=>{typeof window<"u"&&(gc(e),window.scrollTo({top:0,behavior:"smooth"})),i()}}),bc=[yc],wc=Fo((e={},t)=>{if(t.type===qn)e.step=t.step??null,t.artist?e.selectedArtist=t.artist.id:t.step||(e.selectedArtist=null);else return e}),_c=Io({artistVerificationRequest:wc}),vc=e=>!!e.artistVerificationRequest.isDarkTheme;jo("artistVerificationRequest",l.jsx(pc,{}),_c,{pageLogics:bc,computeRenderOptions:e=>({isDarkTheme:vc(e)})}); 9//# sourceMappingURL=reactArtistVerificationRequestClient-QVSbs2vA.js.map
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.