PageSourceSearch

https://assets.genius.com/javascripts/compiled/useGoogleReCaptcha-DAD0as4h.js

js genius.com collected 2026-09-24 06:48:34 UTC 3,793 bytes, 2 lines download raw bytes

1import{A as q,i as A}from"./useAnnotationTracking-BMJkZXz3.js";import{b,w as y,U as P,k as I,d,D as v,A as x}from"./client-D9htv5mt.js";import{n as p,c as w,S as E,t as C,a as S}from"./index-WhLf9o4c.js";import"./js.cookie-Cw0-Cwe_.js";import{n as k}from"./songsClient-yP4NVqph.js";import{d as i}from"./debounce-DiHyN88W.js";import{j as R,R as T,r as l}from"./react-vendor-n58YcWca.js";import{e as j,A as M,P as h,u as V}from"./useMixpanelEvent-DAJ4K_rU.js";import{q as $}from"./styled-components.browser.esm-bLCX9LcF.js";import{s as B}from"./sum-DMVE0Njq.js";const N=async e=>(await b("/albums/autocomplete",{q:e})).albums,K=async e=>await P(`/albums/${e}`),ee=async(e,a)=>{const s=await y(`/albums/${e}/change_lock_state`,{state_event:a});return p(s.album,w)},te=async(e,a)=>{const s=await y(`/albums/${e}`,a);return{...p(s,{album:w}),...s}},O=async(e,a=20,s="performance")=>{const t=await b("/custom_performance_roles/autocomplete",{q:e,limit:a,type:s});return p(t.custom_performance_roles,E)},U=async e=>{const a=await b("/tags/autocomplete",{q:e});return p(a.tags,C)},f=I(globalThis.__IQ_BY_EVENT_TYPE__),G=((e,a)=>{const s=j(t=>d(t.entities.users,[t.session.currentUser,"virtualIqEventTypeMap"],{}),S);if(a){const t=Object.values(d(a,["currentUserMetadata","iqByAction",e],{})).filter(o=>o.applicable).map(o=>o.base*o.multiplier);return B(t)}else{if(Reflect.apply(Object.prototype.hasOwnProperty,f,[e]))return f[e];if(Reflect.apply(Object.prototype.hasOwnProperty,s,[e])){const t=M(s[e]);return f[t]}else return 0}}),ae=({loadEntities:e,excludedId:a,inputValue:s,callback:t})=>e(s,o=>t(o.filter(({value:n})=>n!==a))),se=i((e,a)=>{q(e).then(s=>{const t=s.result.map(o=>{const n=s.entities.artists[o];return{label:{primary:n.name,secondary:n.matchMetadata?.alternateName,secondaryPrefix:A.t("controls.autocomplete.aka_prefix")},value:o,exactMatch:n.matchMetadata?.exactMatch}});a(t)})},150),oe=i((e,a)=>{N(e).then(s=>{const t=s.map(o=>({label:{primary:o.name,secondary:o.primary_artist_names},value:o.id}));a(t)})},150),ne=i((e,a,{onResultsLoaded:s}={})=>{k(e).then(t=>{s&&s(t);const o=t.map(({result:n})=>({label:{primary:n.title_with_featured,secondary:n.artist_names},value:n.id}));a(o)})},150),re=i((e,a,s)=>{O(e).then(t=>{const o=t.result.map(n=>({label:t.entities.customPerformanceRoles[n].label,value:n}));a(o)}).catch(t=>s(t))},150),ce=i((e,a)=>{U(e).then(s=>{const t=s.result.map(o=>({label:s.entities.tags[o].name,value:o}));a(t)})},150),m=({action:e,points:a,color:s})=>{const{t}=V(),o=G(e),n=a||o,u=n===0?"background.neutralPoints":"background.iqPoints",c=`${v(n)} IQ`;return R.jsx(m.Container,{color:s||u,"data-iq-label":!0,"aria-label":t("controls.iq_points.iq_reward",{points:c}),children:c})};m.propTypes={action:h.string,points:h.number,color:h.string};const le=T.memo(m);m.Container=$.span.withConfig({displayName:"IqPoints__Container",componentId:"sc-f9c0c06e-0"})(["margin-left:",";color:",";"],e=>e.theme.space.quarter,e=>d(e.theme.color,e.color));const ie=(({siteKey:e=x.recaptchaV3SiteKey,scriptProps:{defer:a=!0,async:s=!0,id:t="google-recaptcha-v3"}={},initializeOnLoad:o=!0}={})=>{const[n,u]=l.useState(),c=l.useCallback(()=>{!window||!window.grecaptcha||window.grecaptcha.ready(()=>{u(window.grecaptcha)})},[]),g=l.useCallback(()=>{if(document.getElementById(t)){c();return}const r=document.createElement("script");r.id=t,r.src=`https://www.google.com/recaptcha/api.js?render=${e}`,r.async=s,r.defer=a,r.onload=c,document.body.appendChild(r)},[s,a,t,c,e]),_=l.useCallback(async r=>n?await n.execute(e,{action:r}):null,[n,e]);return l.useEffect(()=>{o&&g()},[g,o]),{initRecaptcha:g,executeRecaptcha:_}});export{le as I,oe as a,ce as b,ie as c,ae as d,te as e,re as f,K as g,ee as h,ne as i,se as l,G as u};
2//# sourceMappingURL=useGoogleReCaptcha-DAD0as4h.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.