1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5b73342b-31a5-5d1e-8c12-4dabf8d1f7c6")}catch(e){}}(); 3var fv=Object.defineProperty;var gv=(e,a,r)=>a in e?fv(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r;var et=(e,a,r)=>gv(e,typeof a!="symbol"?a+"":a,r);import{bl as Mm,bm as yv,bn as _v,c as ut,f as Le,j as n,a as d,bo as ld,F as ve,b as qn,P as nn,bp as i0,q as Ro,H as xv,n as bv}from"./query-client-Db26lpf9.js";import{D as Sv,P as wv,h as vv,i as Cv,j as Tv,k as Pv,l as kv,B as Iv}from"./BaseModal-C2XGLlf2.js";import{N as c0,Q as Mv,T as Av,D as Fv,R as sd,m as dd,i as ud,A as l0,j as s0,l as d0,O as u0,B as p0,G as Ev,C as Rv,V as Am,S as Bo,g as pd,W as Ov,_ as md,X as Lv,Y as Vv,Z as Fm,$ as Em,a0 as m0,a1 as Bv,a2 as Dv,a3 as jv,a4 as fc,a5 as zv,a6 as Wv,a7 as Nv,a8 as Uv,w as Er,a9 as qv,c as hd,aa as Hv,u as h0,h as $v,n as Zv,ab as Gv,M as Yv,ac as Rm,v as f0}from"./useSubscriptions-DYGep2_W.js";import{r as m,L as Kv,c as Ho,g as fd,R as ye,u as on,b as Qv,m as So,d as Ps,h as Jv}from"./chunk-62JRHF6Z-DtXrgJCW.js";import{T as $,S as Oo}from"./Text-B5tWIFWr.js";import{c as _e}from"./emotion-styled-base.browser.esm-C7KoQ4_8.js";import{k as Xv,c as ca,j as g0}from"./emotion-react.browser.esm-B9gA70-s.js";import{C as Dt}from"./CircleLoader-Ds8Osl6b.js";import{I as Xe}from"./Icon-OSyI58Ak.js";import{V as Me}from"./v-stack-Bzatc5jq.js";import{B as me,I as vt,a as gd}from"./icon-CI_sFJfH.js";import{c as e4,u as t4,e as a4,d as Gr,B as ne,T as S,a as Pc,S as Ft}from"./button-BMs0znqD.js";import{F as G,L as tn}from"./link-Co5YQs_9.js";import{H as Fe}from"./h-stack-mI2egpfG.js";import{N as ic,L as Hn,a as wo}from"./Link-BooD87bq.js";import{am as r4,a3 as n4,k as o4,C as i4,bT as c4,b9 as cn,G as ur,f as ja,bB as y0,bu as l4,bU as s4,aK as d4,W as u4,aJ as _0,aS as Om,r as Ar,bL as x0,i as vo,v as Lm,a as Et,I as Vm}from"./stores-DPZvQfR-.js";import{T as p4}from"./Tooltip-BAuQCGFL.js";import{F as he}from"./Cell-BkeovoGr.js";import{l as Qr,a as Jr}from"./logger-DcaoYym_.js";import{r as Bt,a as m4,b as h4}from"./route-AmP_6kEa.js";import{u as Fr}from"./useMountEffect-DzkJp5Da.js";import{C as b0}from"./index-CoIOmlle.js";import{p as S0}from"./primaryTheme-IIX2KJ3Y.js";import{M as $o,C as f4}from"./index-DZcQfIsB.js";import{H as aa}from"./Hr-D9V1c_ev.js";import{u as Rr}from"./usePosthogAnalytics-BXOftGwB.js";import{S as V}from"./stack-DnyKiET0.js";import{T as Ln,s as g4,r as y4,c as _4,S as x4,a as b4,b as S4,g as w4,d as v4}from"./utils-BkoecnXH.js";import{u as La}from"./index-Cm-LocbN.js";import{b as C4,c as T4,u as pt,a as Je}from"./useQuery-C6kw4oxN.js";import{C as Bm,h as Dm,i as ks,j as P4,k as jm}from"./constants-CeDaKWne.js";import{c as it}from"./currency.es-VTAJ9MNI.js";import{M as k4}from"./react-tooltip.min-B9mGqclP.js";import{D as Is}from"./DropdownSelect-CX6pe0g_.js";import{B as yd}from"./badge-CrZk1_S8.js";import{p as $t,L as w0}from"./Layout-z59725uG.js";import{u as Oa,i as I4}from"./useSubscriptionOnsiteStore-mU52970i.js";import{G as pr}from"./grid-B0pvYg9l.js";import{S as gt}from"./separator-Bd8edKFI.js";import{O as v0,g as M4,Q as dr,m as A4,a_ as F4,a0 as _d,t as C0,a2 as T0,br as kc,x as za,y as ka,c as Ic,bE as E4,z as R4,a as xd,a1 as O4,bF as L4,bG as V4,S as Ne,C as P0,j as Or,by as k0,bA as Do,bC as jo,bB as zo,bH as B4,bI as D4,A as j4,B as z4,D as W4,E as N4,bJ as U4}from"./index.es5-CLo5NeoE.js";import{d as q4,b as I0}from"./differenceInCalendarDays-DJD5kLXm.js";import{t as mr}from"./toDate-qOSwr3PX.js";import{C as Va}from"./center-BDLcVGLh.js";import{u as mt}from"./useMutation-BJFzjqUk.js";import{c as M0,o as H4,h as $4,p as Z4,b as G4,q as Y4,s as K4,t as Q4,i as A0}from"./subscriptions-DTBe23en.js";import{u as ht,e as J4}from"./setPrototypeOf-BrNA50qD.js";import{R as Ms,i as X4,f as eC,a as tC}from"./countries-D3pQy7lI.js";import{s as aC,t as Ct}from"./toaster-CdA7_hq6.js";import{s as bt}from"./queries-GZ-REnyo.js";import{u as bd}from"./index-BA0qPAxh.js";import{B as Ta}from"./Button-TCKgIt9p.js";import{C as Wo}from"./Checkbox-CfBUwseT.js";import{I as $n}from"./image-BLphFuVI.js";import{c as ta}from"./factory-B_cS-oen.js";import{u as F0,T as E0}
3from"./featureTogglesEnum-Bgj10DqD.js";import{F as rC,b as nC,a as R0}from"./colorMode-Cxdri96c.js";import{C as oC}from"./client-only-C3iWjm9J.js";import{G as Ye}from"./grid-item-zMIy_ZgJ.js";import{S as Sd}from"./simple-grid-CwHa0mMG.js";import{c as iC,d as cC,f as lC,a as sC,p as dC,e as uC}from"./downloadSong-CpuMTuhY.js";import{c as Ya}from"./Title-BArmR_P0.js";import{u as O0,T as L0,b as V0,P as pC}from"./ProjectDetailsForm-C2wMPIPw.js";import{u as mC,o as hr,a as ua,b as As,c as Da,F as je,e as wd,f as Ka,I as hC,g as vd,C as fC,h as gC,i as yC,j as _C,k as xC,l as bC,m as SC,S as B0,n as D0,p as j0,q as z0,r as W0,s as N0,t as U0,v as q0,w as H0,x as $0,y as Z0,z as wC,A as vC,d as CC}from"./yup-_1TQ-wDB.js";import{c as la,a as dt,b as TC,e as PC,f as kC}from"./index.esm-CxNnGNJk.js";import{u as IC}from"./use-onclickoutside.browser.esm-C-VTwYpV.js";import{u as Zo}from"./useMedia-DRThV70n.js";import{u as It,C as Ae,a as ss}from"./index.esm-CZWuJGu3.js";import{q as Za}from"./index-DzvwBC74.js";import{I as Ht}from"./Input-BGT6vC_V.js";import"./Textarea-P2h8A5Pb.js";import{S as Cd}from"./SuccessView-zjq7jI8K.js";import{b as G0}from"./baseForm-DkFqeBCw.js";import"./StyledText-Cv9bHOKS.js";import{h as zm,a as On}from"./has-Btv4EUxq.js";import{t as MC,a as AC,u as Y0,n as Td,o as Go}from"./chatWidgetStore-C88ujecW.js";import{a as FC,n as EC,e as RC}from"./X.es-D9OlAykS.js";import{L as sa,a as Qa}from"./list-D5tZrLiH.js";import{o as OC}from"./icons-CdAzQTg2.js";import{a as gc,u as K0,M as LC,v as Q0,E as VC,l as BC}from"./EnterpriseRequestForm-DHsk8a4w.js";import{c as J0}from"./react-CQBmK_kb.js";import{T as DC}from"./theme-C2hShv6i.js";import{c as Pd}from"./create-slot-recipe-context-Cq2nnnE6.js";import{A as jC}from"./index-BsJYqPsY.js";import{m as zC}from"./proxy-DQPedaGf.js";import{M as WC}from"./musicbed-ui-CZI_lkFH.js";import{i as X0}from"./googleIdentity-BtNyI9NC.js";import{a as NC}from"./oAuthRedirect-CUYOFF9-.js";import{L as UC}
3from"./ConnectedLoginForm-BGJm6J2_.js";import{R as qC}from"./ConnectedRegisterForm-Bbq-YzhT.js";import{l as Mc,w as ef}from"./RecurlyGate-GJ04cF0G.js";import{S as tf}from"./Square-UDqYrKNt.js";import{u as HC}from"./index-BplJSIrj.js";import{_ as $C}from"./_baseMap-oJ7CtKAA.js";import{S as ZC}from"./index-D0-0DoBE.js";import{S as Wm}from"./Select-VqKkv0kw.js";import{c as GC}from"./StyledResponsiveTitle-BrLQnpi4.js";var YC=class extends C4{constructor(e,a){super(e,a)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Mm()})}getOptimisticResult(e){return e.behavior=Mm(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,a){var C,T;const{state:r}=e,i=super.createResult(e,a),{isFetching:c,isRefetching:s,isError:u,isRefetchError:h}=i,f=(T=(C=r.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:T.direction,g=u&&f==="forward",_=c&&f==="forward",w=u&&f==="backward",b=c&&f==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:_v(a,r.data),hasPreviousPage:yv(a,r.data),isFetchNextPageError:g,isFetchingNextPage:_,isFetchPreviousPageError:w,isFetchingPreviousPage:b,isRefetchError:h&&!g&&!w,isRefetching:s&&!_&&!b}}};function KC(e,a){return T4(e,YC,a)}const{withContext:QC}=e4({key:"heading"}),yc=QC("h2");yc.displayName="Heading";var JC=v0("clipboard").parts("root","control","trigger","indicator","input","label"),In=JC.build(),XC=e=>{var a;return((a=e.ids)==null?void 0:a.root)??`clip:${e.id}`},Fs=e=>{var a;return((a=e.ids)==null?void 0:a.input)??`clip:${e.id}:input`},e8=e=>{var a;return((a=e.ids)==null?void 0:a.label)??`clip:${e.id}:label`},t8=e=>e.getById(Fs(e)),a8=(e,a)=>o8(e.getDoc(),a);function r8(e,a){const r=e.createElement("pre");return Object.assign(r.style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),r.textContent=a,r}function n8(e){const r=M4(e).getSelection();if(r==null)return Promise.reject(new Error);r.removeAllRanges();const i=e.ownerDocument,c=i.createRange();return c.selectNodeContents(e),r.addRange(c),i.execCommand("copy"),r.removeAllRanges(),Promise.resolve()}function o8(e,a){var c;const r=e.defaultView||window;if(((c=r.navigator.clipboard)==null?void 0:c.writeText)!==void 0)return r.navigator.clipboard.writeText(a);if(!e.body)return Promise.reject(new Error);const i=r8(e,a);return e.body.appendChild(i),n8(i),e.body.removeChild(i),Promise.resolve()}function i8(e,a){const{state:r,send:i,context:c,scope:s}=e,u=r.matches("copied");return{copied:u,value:c.get("value"),setValue(h){i({type:"VALUE.SET",value:h})},copy(){i({type:"COPY"})},getRootProps(){return a.element({...In.root.attrs,"data-copied":dr(u),id:XC(s)})},getLabelProps(){return a.label({...In.label.attrs,htmlFor:Fs(s),"data-copied":dr(u),id:e8(s)})},getControlProps(){return a.element({...In.control.attrs,"data-copied":dr(u)})},getInputProps(){return a.input({...In.input.attrs,defaultValue:c.get("value"),"data-copied":dr(u),readOnly:!0,"data-readonly":"true",id:Fs(s),onFocus(h){h.currentTarget.select()},onCopy(){i({type:"INPUT.COPY"})}})},getTriggerProps(){return a.button({...In.trigger.attrs,type:"button","aria-label":u?"Copied to clipboard":"Copy to clipboard","data-copied":dr(u),onClick(){i({type:"COPY"})}})},getIndicatorProps(h){return a.element({...In.indicator.attrs,hidden:h.copied!==u})}}}var c8=A4({props({props:e}){return{timeout:3e3,defaultValue:"",...e}},initialState(){return"idle"},context({prop:e,bindable:a}){return{value:a(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(r){var i;(i=e("onValueChange"))==null||i({value:r})}}))}},watch({track:e,context:a,action:r}){e([()=>a.get("value")],()=>{r(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout({prop:e,send:a}){return aC(()=>{a({type:"COPY.DONE"})},e("timeout"))}},actions:{setValue({context:e,event:a}){e.set("value",a.value)},copyToClipboard({context:e,scope:a}){a8(a,e.get("value"))},invokeOnCopy({prop:e}){var a;(a=e("onStatusChange"))==null||a({copied:!0})},syncInputElement({context:e,scope:a}){const r=t8(a);r&&F4(r,e.get("value"))}}}});const l8=e=>{const a=m.useId(),{getRootNode:r}=_d(),i={id:a,getRootNode:r,...e},c=C0(c8,i);return i8(c,T0)},af=m.forwardRef((e,a)=>{const r=kc(),i=za(r.getErrorTextProps(),e);return r.invalid?ut.jsx(ka.span,{...i,ref:a}):null});af.displayName="FieldsetErrorText";const rf=m.forwardRef((e,a)=>{const r=kc(),i=za(r.getHelperTextProps(),e);return ut.jsx(ka.span,{...i,ref:a})});rf.displayName="FieldsetHelperText";const nf=m.forwardRef((e,a)=>{const r=kc(),i=za(r.getLegendProps(),e);return ut.jsx(ka.legend,{...i,ref:a})});nf.displayName="FieldsetLegend";const s8=v0("fieldset").parts("root","errorText","helperText","legend"),Ki=s8.build(),d8=(e={})=>{const{disabled:a=!1,invalid:r=!1}=e,i=_d(),[c,s]=m.useState({hasErrorText:!1,hasHelperText:!1}),u=m.useId(),h=e.id??u,f=m.useRef(null),g=`fieldset::${h}::legend`,_=`fieldset::${h}::error-text`,w=`fieldset::${h}
3::helper-text`;mC(()=>{const D=f.current;if(!D)return;const A=()=>{const k=i.getRootNode(),z=!!k.getElementById(_),Q=!!k.getElementById(w);s({hasErrorText:z,hasHelperText:Q})};A();const E=i.getWindow(),R=new E.MutationObserver(A);return R.observe(D,{childList:!0,subtree:!0}),()=>R.disconnect()},[i,_,w]);const b=[];c.hasErrorText&&r&&b.push(_),c.hasHelperText&&b.push(w);const v=b.length>0?b.join(" "):void 0;return{refs:{rootRef:f},ids:{legend:g,errorText:_,helperText:w},disabled:a,invalid:r,getRootProps:()=>({...Ki.root.attrs,ref:f,disabled:a,"data-disabled":dr(a),"data-invalid":dr(r),"aria-labelledby":g,"aria-describedby":v}),getLegendProps:()=>({id:g,...Ki.legend.attrs,"data-disabled":dr(a),"data-invalid":dr(r)}),getHelperTextProps:()=>({id:w,...Ki.helperText.attrs}),getErrorTextProps:()=>({id:_,...Ki.errorText.attrs,"aria-live":"polite"})}},u8=Ic(),of=m.forwardRef((e,a)=>{const[r,i]=u8(e,["id","disabled","invalid"]),c=d8(r),s=za(c.getRootProps(),i);return ut.jsx(E4,{value:c,children:ut.jsx(ka.fieldset,{...s,ref:R4(a,c.refs.rootRef)})})});of.displayName="FieldsetRoot";const[cf,Yo]=xd({name:"RadioGroupContext",hookName:"useRadioGroupContext",providerName:"<RadioGroupProvider />"}),[p8,kd]=xd({name:"RadioGroupItemContext",hookName:"useRadioGroupItemContext",providerName:"<RadioGroupItemProvider />"}),[m8,Id]=xd({name:"RadioGroupItemPropsContext",hookName:"useRadioGroupItemPropsContext",providerName:"<RadioGroupItemPropsProvider />"}),h8=Ic(),Md=m.forwardRef((e,a)=>{const[r,i]=h8(e,["value","disabled","invalid"]),c=Yo(),s=za(c.getItemProps(r),i),u=c.getItemState(r);return ut.jsx(p8,{value:u,children:ut.jsx(m8,{value:r,children:ut.jsx(ka.label,{...s,ref:a})})})});Md.displayName="RadioGroupItem";const f8=e=>e.children(kd()),Ad=m.forwardRef((e,a)=>{const r=Yo(),i=Id(),c=za(r.getItemControlProps(i),e);return ut.jsx(ka.div,{...c,ref:a})});Ad.displayName="RadioGroupItemControl";const Fd=m.forwardRef((e,a)=>{const r=Yo(),i=Id(),c=za(r.getItemHiddenInputProps(i),e);return ut.jsx(ka.input,{...c,ref:a})});Fd.displayName="RadioGroupItemHiddenInput";const Ed=m.forwardRef((e,a)=>{const r=Yo(),i=Id(),c=za(r.getItemTextProps(i),e);return ut.jsx(ka.span,{...c,ref:a})});Ed.displayName="RadioGroupItemText";const Rd=m.forwardRef((e,a)=>{const r=Yo(),i=za(r.getLabelProps(),e);return ut.jsx(ka.span,{...i,ref:a})});Rd.displayName="RadioGroupLabel";const g8=e=>{var h;const a=kc(),r=m.useId(),{getRootNode:i}=_d(),{dir:c}=O4(),s={id:r,ids:{label:(h=a==null?void 0:a.ids)==null?void 0:h.legend},dir:c,disabled:a==null?void 0:a.disabled,invalid:a==null?void 0:a.invalid,getRootNode:i,...e},u=C0(L4,s);return V4(u,T0)},y8=Ic(),Od=m.forwardRef((e,a)=>{const[r,i]=y8(e,["defaultValue","disabled","form","id","ids","invalid","name","onValueChange","orientation","readOnly","required","value"]),c=g8(r),s=za(c.getRootProps(),i);return ut.jsx(cf,{value:c,children:ut.jsx(ka.div,{...s,ref:a})})});Od.displayName="RadioGroupRoot";const _8=Ic(),Ld=m.forwardRef((e,a)=>{const[{value:r},i]=_8(e,["value"]),c=za(r.getRootProps(),i);return ut.jsx(cf,{value:r,children:ut.jsx(ka.div,{...c,ref:a})})});Ld.displayName="RadioGroupRootProvider";const{withProvider:x8,withContext:Ac}=Pd({key:"fieldset"}),b8=x8(of,"root");Ac(af,"errorText");Ac(rf,"helperText");Ac(nf,"legend");const S8=Ac(ka.div,"content"),Vd=m.forwardRef(function(a,r){const i=t4({key:"radiomark",recipe:a.recipe}),[c,s]=i.splitVariantProps(a),{checked:u,disabled:h,unstyled:f,children:g,..._}=s,w=f?a4:i(c),b={ref:r,"data-checked":Gr(u),"data-disabled":Gr(h),..._,css:[w,a.css]};return ut.jsx(ta.span,{...b,children:u&&ut.jsx("span",{className:"dot"})})});Vd.displayName="Radiomark";const{withProvider:lf,withContext:Zn,useStyles:sf}=Pd({key:"radioCard"});lf(Ld,"root",{forwardAsChild:!0});const Es=lf(Od,"root",{forwardAsChild:!0}),Rs=Zn(Rd,"label",{forwardAsChild:!0}),w8=Zn(Md,"item",{forwardAsChild:!0}),v8=Zn(Ed,"itemText",{forwardAsChild:!0});Zn("div","itemDescription",{forwardAsChild:!0});const C8=m.forwardRef(function(a,r){const i=kd(),c=sf();return ut.jsx(ta.div,{ref:r,"data-focus":Gr(i.focused),"data-disabled":Gr(i.disabled),"data-state":i.checked?"checked":"unchecked","data-hover":Gr(i.hovered),"data-active":Gr(i.active),"data-invalid":Gr(i.invalid),...a,css:[c.itemControl,a.css]})});Zn("div","itemContent");Zn("div","itemAddon");const T8=m.forwardRef(function(a,r){const{checked:i,...c}=a,s=sf(),u=kd();return i&&u.checked?ut.jsx(ta.span,{ref:r,asChild:!0,...c,"aria-hidden":"true",css:[s.itemIndicator,a.css],children:i}):ut.jsx(Vd,{ref:r,unstyled:!0,...a,"aria-hidden":"true",checked:u.checked,disabled:u.disabled,css:[s.itemIndicator,a.css]})}),P8=Fd,{withProvider:df,withContext:Fc,useStyles:k8}=Pd({key:"radioGroup"});df(Ld,"root",{forwardAsChild:!0});const I8=df(Od,"root",{forwardAsChild:!0});Fc(Rd,"label",{forwardAsChild:!0});
3const M8=Fc(Md,"item",{forwardAsChild:!0}),A8=Fc(Ed,"itemText",{forwardAsChild:!0});Fc(Ad,"itemControl",{forwardAsChild:!0});const F8=m.forwardRef(function(a,r){const i=k8();return ut.jsx(f8,{children:c=>ut.jsx(Ad,{asChild:!0,children:ut.jsx(Vd,{ref:r,unstyled:!0,...a,checked:c.checked,disabled:c.disabled,css:[i.itemControl,a.css]})})})}),E8=Fd,ln=m.forwardRef((e,a)=>{const{alt:r,color:i="currentColor",size:c="1em",weight:s="regular",mirrored:u=!1,children:h,weights:f,...g}=e;return m.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:c,height:c,fill:i,viewBox:"0 0 256 256",transform:u?"scale(-1, 1)":void 0,...g},!!r&&m.createElement("title",null,r),h,f.get(s))});ln.displayName="SSRBase";const R8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,144l-72,72L56,144Z",opacity:"0.2"}),m.createElement("path",{d:"M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"}))]]),O8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),m.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),L8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),m.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),uf=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:MC}));
3uf.displayName="CaretDownIcon";const pf=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:AC}));pf.displayName="CheckIcon";const mf=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),m.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),hf=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:mf}));hf.displayName="CheckCircleIcon";const V8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M80,108a12,12,0,0,1-12,12H28a12,12,0,0,1,0-24H68A12,12,0,0,1,80,108ZM68,136H28a12,12,0,0,0,0,24H68a12,12,0,0,0,0-24Zm0,40H28a12,12,0,0,0,0,24H68a12,12,0,0,0,0-24Zm80-40H108a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm0,40H108a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm40-96h40a12,12,0,0,0,0-24H188a12,12,0,0,0,0,24Zm40,16H188a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm0,40H188a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Zm0,40H188a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232,64V192H24V80A16,16,0,0,1,40,64Z",opacity:"0.2"}),m.createElement("path",{d:"M80,96a8,8,0,0,1-8,8H24a8,8,0,0,1,0-16H72A8,8,0,0,1,80,96Zm-8,24H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm0,32H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm0,32H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm80-64H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm80-96H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16ZM184,72h48a8,8,0,0,0,0-16H184a8,8,0,0,0,0,16Zm48,48H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M80,96a8,8,0,0,1-8,8H24a8,8,0,0,1,0-16H72A8,8,0,0,1,80,96Zm72,24H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm32-48h48a8,8,0,0,0,0-16H184a8,8,0,0,0,0,16ZM72,120H24a8,8,0,0,0-8,8v64a8,8,0,0,0,8,8H72a8,8,0,0,0,8-8V128A8,8,0,0,0,72,120ZM232,88H184a8,8,0,0,0-8,8v96a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V96A8,8,0,0,0,232,88Zm-80,64H104a8,8,0,0,0-8,8v32a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V160A8,8,0,0,0,152,152Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M78,96a6,6,0,0,1-6,6H24a6,6,0,0,1,0-12H72A6,6,0,0,1,78,96Zm-6,26H24a6,6,0,0,0,0,12H72a6,6,0,0,0,0-12Zm0,32H24a6,6,0,0,0,0,12H72a6,6,0,0,0,0-12Zm0,32H24a6,6,0,0,0,0,12H72a6,6,0,0,0,0-12Zm80-64H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm0,32H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm0,32H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm80-96H184a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12ZM184,70h48a6,6,0,0,0,0-12H184a6,6,0,0,0,0,12Zm48,52H184a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm0,32H184a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm0,32H184a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M80,96a8,8,0,0,1-8,8H24a8,8,0,0,1,0-16H72A8,8,0,0,1,80,96Zm-8,24H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm0,32H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm0,32H24a8,8,0,0,0,0,16H72a8,8,0,0,0,0-16Zm80-64H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm80-96H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16ZM184,72h48a8,8,0,0,0,0-16H184a8,8,0,0,0,0,16Zm48,48H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm0,32H184a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M76,96a4,4,0,0,1-4,4H24a4,4,0,0,1,0-8H72A4,4,0,0,1,76,96Zm-4,28H24a4,4,0,0,0,0,8H
372a4,4,0,0,0,0-8Zm0,32H24a4,4,0,0,0,0,8H72a4,4,0,0,0,0-8Zm0,32H24a4,4,0,0,0,0,8H72a4,4,0,0,0,0-8Zm80-64H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm0,32H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm0,32H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm80-96H184a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8ZM184,68h48a4,4,0,0,0,0-8H184a4,4,0,0,0,0,8Zm48,56H184a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm0,32H184a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm0,32H184a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Z"}))]]),ff=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M148,200a20,20,0,1,1-20-20A20,20,0,0,1,148,200Zm-20-40a12,12,0,0,0,12-12V48a12,12,0,0,0-24,0V148A12,12,0,0,0,128,160Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,40V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24H200A16,16,0,0,1,216,40Z",opacity:"0.2"}),m.createElement("path",{d:"M144,200a16,16,0,1,1-16-16A16,16,0,0,1,144,200Zm-16-40a8,8,0,0,0,8-8V48a8,8,0,0,0-16,0V152A8,8,0,0,0,128,160Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM128,160a12,12,0,1,1-12,12A12,12,0,0,1,128,160Zm-8-24V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M142,200a14,14,0,1,1-14-14A14,14,0,0,1,142,200Zm-14-42a6,6,0,0,0,6-6V48a6,6,0,0,0-12,0V152A6,6,0,0,0,128,158Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M144,200a16,16,0,1,1-16-16A16,16,0,0,1,144,200Zm-16-40a8,8,0,0,0,8-8V48a8,8,0,0,0-16,0V152A8,8,0,0,0,128,160Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M140,200a12,12,0,1,1-12-12A12,12,0,0,1,140,200Zm-12-44a4,4,0,0,0,4-4V48a4,4,0,0,0-8,0V152A4,4,0,0,0,128,156Z"}))]]),gf=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:ff}));gf.displayName="ExclamationMarkIcon";const B8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),m.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24
3-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),D8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),m.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.
311,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),yf=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),m.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),_f=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:yf}));_f.displayName="MagnifyingGlassIcon";const j8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z",opacity:"0.2"}),m.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,
3106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z"}))]]),z8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),m.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),W8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,
3177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),N8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M230.86,109.25,169.18,86.82,146.75,25.14a19.95,19.95,0,0,0-37.5,0L86.82,86.82,25.14,109.25a19.95,19.95,0,0,0,0,37.5l61.68,22.43,22.43,61.68a19.95,19.95,0,0,0,37.5,0l22.43-61.68,61.68-22.43a19.95,19.95,0,0,0,0-37.5Zm-75.14,39.29a12,12,0,0,0-7.18,7.18L128,212.21l-20.54-56.49a12,12,0,0,0-7.18-7.18L43.79,128l56.49-20.54a12,12,0,0,0,7.18-7.18L128,43.79l20.54,56.49a12,12,0,0,0,7.18,7.18L212.21,128Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M226.76,135.48l-66.94,24.34-24.34,66.94a8,8,0,0,1-15,0L96.18,159.82,29.24,135.48a8,8,0,0,1,0-15L96.18,96.18l24.34-66.94a8,8,0,0,1,15,0l24.34,66.94,66.94,24.34A8,8,0,0,1,226.76,135.48Z",opacity:"0.2"}),m.createElement("path",{d:"M229.5,113,166.06,89.94,143,26.5a16,16,0,0,0-30,0L89.94,89.94,26.5,113a16,16,0,0,0,0,30l63.44,23.07L113,229.5a16,16,0,0,0,30,0l23.07-63.44L229.5,143a16,16,0,0,0,0-30ZM157.08,152.3a8,8,0,0,0-4.78,4.78L128,223.9l-24.3-66.82a8,8,0,0,0-4.78-4.78L32.1,128l66.82-24.3a8,8,0,0,0,4.78-4.78L128,32.1l24.3,66.82a8,8,0,0,0,4.78,4.78L223.9,128Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M240,128a15.79,15.79,0,0,1-10.5,15l-63.44,23.07L143,229.5a16,16,0,0,1-30,0L89.94,166.06,26.5,143a16,16,0,0,1,0-30L89.94,89.94,113,26.5a16,16,0,0,1,30,0l23.07,63.44L229.5,113A15.79,15.79,0,0,1,240,128Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228.81,114.89,164.5,91.5,141.11,27.19a13.95,13.95,0,0,0-26.22,0L91.5,91.5,27.19,114.89a13.95,13.95,0,0,0,0,26.22L91.5,164.5l23.39,64.31a13.95,13.95,0,0,0,26.22,0L164.5,164.5l64.31-23.39a13.95,13.95,0,0,0,0-26.22Zm-4.1,15-66.94,24.34a6,6,0,0,0-3.59,3.59l-24.34,66.94a2,2,0,0,1-3.68,0l-24.34-66.94a6,6,0,0,0-3.59-3.59L31.29,129.84a2,2,0,0,1,0-3.68l66.94-24.34a6,6,0,0,0,3.59-3.59l24.34-66.94a2,2,0,0,1,3.68,0l24.34,66.94a6,6,0,0,0,3.59,3.59l66.94,24.34a2,2,0,0,1,0,3.68Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M229.5,113,166.06,89.94,143,26.5a16,16,0,0,0-30,0L89.94,89.94,26.5,113a16,16,0,0,0,0,30l63.44,23.07L113,229.5a16,16,0,0,0,30,0l23.07-63.44L229.5,143a16,16,0,0,0,0-30ZM157.08,152.3a8,8,0,0,0-4.78,4.78L128,223.9l-24.3-66.82a8,8,0,0,0-4.78-4.78L32.1,128l66.82-24.3a8,8,0,0,0,4.78-4.78L128,32.1l24.3,66.82a8,8,0,0,0,4.78,4.78L223.9,128Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228.13,116.77,162.94,93.06,139.23,27.87a11.95,11.95,0,0,0-22.46,0L93.06,93.06,27.87,116.77a11.95,11.95,0,0,0,0,22.46l65.19,23.71,23.71,65.19a11.95,11.95,0,0,0,22.46,0l23.71-65.19,65.19-23.71a11.95,11.95,0,0,0,0-22.46Zm-2.73,15-67,24.34a4,4,0,0,0-2.39,2.39l-24.34,67a4,4,0,0,1-7.44,0l-24.34-67a4,4,0,0,0-2.39-2.39L30.6,131.72a4,4,0,0,1,0-7.44L97.55,99.94a4,4,0,0,0,2.39-2.39L124.28,30.6a4,4,0,0,1,7.44,0l24.34,66.95a4,4,0,0,0,2.39,2.39l67,24.34a4,4,0,0,1,0,7.44Z"}))]]),U8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),m.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),q8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.3
36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),m.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),xf=m.forwardRef((e,a)=>m.createElement(ln,{ref:a,...e,weights:FC}));xf.displayName="XIcon";const bf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:R8}));bf.displayName="ArrowDownIcon";const H8=bf,Sf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:O8}));Sf.displayName="ArrowLeftIcon";const Ja=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:L8}));Ja.displayName="ArrowRightIcon";const Lo=Ja,Ec=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:mf}));Ec.displayName="CheckCircleIcon";const Nm=Ec,wf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:V8}));wf.displayName="EqualizerIcon";const Bd=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:ff}));Bd.displayName="ExclamationMarkIcon";const $8=Bd,vf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:B8}));vf.displayName="EyeIcon";const Z8=vf,Cf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:D8}));Cf.displayName="EyeSlashIcon";const G8=Cf,Dd=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:yf}));Dd.displayName="MagnifyingGlassIcon";const eO=Dd,Tf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:j8}));Tf.displayName="MoonIcon";const Y8=Tf,jd=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:z8}));jd.displayName="PlusIcon";const Pf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:W8}));Pf.displayName="SpinnerIcon";const _c=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:N8}));_c.displayName="StarFourIcon";const Um=_c,kf=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:U8}));kf.displayName="SunIcon";const K8=kf,If=m.forwardRef((e,a)=>m.createElement($t,{ref:a,...e,weights:q8}));If.displayName="UserIcon";const Q8=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:i=>{const{theme:c}=i;return Le(rC,{method:"POST",data:JSON.stringify({theme:c})})},onMutate(i){const c=e.getQueryData(["user-theme"]);return e.setQueryData(["user-theme"],{...c,theme:i.theme}),{previousData:c}},onError:(i,c,s)=>{s!=null&&s.previousData&&e.setQueryData(["user-theme"],s==null?void 0:s.previousData)}});return{updateUserTheme:a,...r}},zd=()=>{const{colorMode:e,toggleColorMode:a,setColorMode:r}=nC(),i=F0(E0.ENABLE_DARK_MODE_TOGGLE);return{theme:e,toggleColorMode:a,setColorMode:r,darkModeEnabled:i}},tO=e=>{const{theme:a,setColorMode:r,darkModeEnabled:i}=zd(),{updateUserTheme:c}=Q8();return i?n(oC,{fallback:n(Ne,{boxSize:"8","data-cy":"_ColorModeButton_Skeleton"}),"data-cy":"_ColorModeButton_ClientOnly",children:d(Me,{w:"100%",gap:16,...e,"data-cy":"_ColorModeButton_VStack",children:[n(gt,{w:"100%",margin:{base:"3px 0px",md:"3px 16px"},color:"border.default","data-cy":"_ColorModeButton_Separator"}),d(Fe,{w:"100%","data-cy":"_ColorModeButton_HStack",children:[n(ne,{onClick:()=>{c({theme:"light"}),r("light")},w:"100%",size:"md",flex:1,variant:"textOnly",bg:a==="light"?"{colors.blackAlpha.5}":void 0,color:a==="light"?"amber.500":"icon.primary",borderColor:a==="light"?"{colors.blackAlpha.5}":"transparent",borderWidth:"1px","data-cy":"_ColorModeButton_Button",children:n(K8,{width:20,height:20,weight:a==="light"?"fill":"regular","data-cy":"_ColorModeButton_Sun"})}),n(ne,{onClick:()=>{c({theme:"dark"}),r("dark")},w:"100%",size:"md",flex:1,variant:"textOnly",bg:a==="dark"?"whiteAlpha.5":void 0,color:a==="dark"?"blue.500":"icon.primary",borderColor:a==="dark"?"border.default":"transparent",borderWidth:"1px","data-cy":"_ColorModeButton_Button",children:n(Y8,{width:20,height:20,weight:a==="dark"?"fill":"regular","data-cy":"_ColorModeButton_Moon"})})]})]})}):null},Mf=m.createContext([{view:null,props:null,modalProps:null},()=>{}]),Qe=(e,a={})=>{const[,r]=m.useContext(Mf);return{show:(u={})=>{e&&r({view:e,props:u,modalProps:a})},hide:()=>{r({view:null,props:null,modalProps:null})},set:(u={})=>{r(h=>({view:h.view,props:{...h.props,...u},modalProps:a}))}}},J8=e=>{const[a,r]=m.useState(void 0);return m.useEffect(()=>{e?(async()=>{r(void 0);const c=await c0(e);r(c)})():r(void 0)},[e]),{license:a}},Ko=_e("div",{target:"e4p0kpj21"})(({theme:e,maxWidth:a})=>({width:"100%",padding:"30px 20px 60px",textAlign:"left",[e.media.md]:{width:a||542,maxWidth:"100%",padding:"40px 40px 48px"}})),X8=_e("div",{target:"e4p0kpj20"})(({theme:e})=>({width:"100%",padding:"10px 20px 40px",textAlign:"left",display:"flex",[e.media.md]:{width:"100%",padding:"10px 40px 30px"}})),e6=Xv` 4 0% { 5 transform: rotate(0deg) 6 } 7 99% { 8 transform: rotate(360deg); 9 } 10 100% { 11 transform: rotate(0deg); 12 } 13`,t6=_e("div",{target:"e4p0kpj10"}
13)({height:"15px",width:"15px",borderRadius:"8px",animation:`${e6} 0.5s infinite`,border:"3px solid",margin:"0 10px 0 0"},e=>({borderColor:e.theme.color.icon.light,borderTopColor:e.theme.color.base.g6})),Af=_e(Kv,{target:"e4p0kpj6"}),a6=_e("div",{target:"e4p0kpj5"})(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",width:80,border:"none",borderRight:`1px solid ${e.color.border.medium}`})),r6=_e("div",{target:"e4p0kpj4"})("padding:1px 3px;border-radius:2px;font-size:8px;line-height:9px;margin-top:8px;font-weight:700;",({theme:e})=>({backgroundColor:e.color.base.red,color:e.color.text.overlay})),n6=_e("img",{target:"e4p0kpj3"})({name:"1rl340z",styles:"width:80px;margin:0"}),o6=_e("div",{target:"e4p0kpj2"})({name:"33ucms",styles:"display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding-left:16px;box-sizing:border-box"}),i6=Af(({theme:e})=>({fontWeight:"600",textDecoration:"none",fontSize:16,lineHeight:"20px",textAlign:"left",boxSizing:"border-box",margin:0,padding:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200,color:e.color.text.primary,fontFamily:e.font.sans,[e.media.md]:{maxWidth:320}})),c6=Af({display:"block",fontWeight:"700",textDecoration:"none",textAlign:"left",fontSize:9,lineHeight:"12px",textTransform:"uppercase"},({theme:e})=>({color:e.mode==="dark"?e.color.base["text-color-secondary"]:e.color.text.dark,fontFamily:e.font.sans})),l6=_e("div",{target:"e4p0kpj1"})(({theme:e})=>({padding:"0 20px",[e.media.md]:{padding:"0 40px"}})),s6=({options:e,onSelectOption:a})=>d(Ko,{children:[n($,{size:"28px",weight:"700",lineHeight:"28px","data-cy":"_EntityPathQuestion_Text",children:"Select your coverage"}),n(me,{mt:"30px","data-cy":"_EntityPathQuestion_Box",children:e?n(Me,{gap:"12px",align:"stretch","data-cy":"_EntityPathQuestion_VStack",children:e.map(r=>d(me,{height:"104px",borderWidth:"1px",borderColor:"border.default",borderRadius:"4px",p:"16px",display:"flex",gap:"20px",alignItems:"center",cursor:"pointer",transition:"all 0.2s",_hover:{borderColor:"border.active"},onClick:()=>a(r),"data-cy":"_EntityPathQuestion_Box",children:[d(Me,{flex:"1",align:"start",gap:"4px",minW:"0","data-cy":"_EntityPathQuestion_VStack",children:[n(S,{textStyle:"heading.16.semi",color:"text.primary",lineHeight:"1.2","data-cy":"_EntityPathQuestion_ChakraText",children:r.name}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",lineHeight:"1.2","data-cy":"_EntityPathQuestion_ChakraText_6",children:r.label})]}),n(me,{flexShrink:"0",w:"24px",h:"24px","data-cy":"_EntityPathQuestion_Box",children:n(Xe,{fill:"currentColor",name:"arrowRightThick",width:"24px","data-cy":"_EntityPathQuestion_Icon"})})]},r.name))}):n(G,{justifyContent:"center",alignItems:"center",w:"100%",h:"180px","data-cy":"_EntityPathQuestion_Flex",children:n(Dt,{"data-cy":"_EntityPathQuestion_CircleLoader"})})})]}),d6=({question:e,onSelectOption:a})=>d(Ko,{children:[n(S,{textStyle:"heading.16.semi",mb:"16px","data-cy":"_EntityTypeQuestion_Text",children:e.question}),n(Me,{w:"full",gap:"12px",alignItems:"stretch","data-cy":"_EntityTypeQuestion_VStack",children:e.options.map(r=>n(me,{onClick:()=>a(r),"aria-label":r.name.toLowerCase(),borderWidth:"1px",borderColor:"border.default",borderRadius:"4px",p:"16px",display:"flex",gap:"20px",alignItems:"center",cursor:"pointer",transition:"all 0.2s",_hover:{borderColor:"border.active"},"data-cy":"_EntityTypeQuestion_Box",children:d(Fe,{w:"full",align:"center",justify:"space-between","data-cy":"_EntityTypeQuestion_HStack",children:[n(S,{textStyle:"heading.16.semi",color:"text.primary",lineHeight:"1.2","data-cy":"_EntityTypeQuestion_Text",children:r.name}),n(Xe,{fill:"currentColor",name:"arrowRightThick",width:"24px","data-cy":"_EntityTypeQuestion_Icon"})]})},r.name))})]}),ds=({id:e,onClick:a,isSelected:r,error:i=!1,children:c})=>n(me,{id:e,onClick:a,position:"relative",boxSizing:"border-box",border:r?"2px solid":"1px solid",borderColor:r?i?"text.danger":"border.active":"border.default",cursor:"pointer",background:r?"background.panel":void 0,_hover:{borderColor:i?"text.danger":"border.active"},borderRadius:"2px",minH:{base:"92px",md:"110px"},maxH:{base:"none",md:"110px"},w:"full",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",p:r?{base:"15px",md:"39px 24px 39px 15px"}:{base:"16px",md:"40px 25px 40px 16px"},"data-cy":"_PaymentOption_Box",children:c}),u6=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:i=>Le("organizations/billing",{method:ld,data:i}),onSuccess:()=>
13{e.invalidateQueries({queryKey:Mv.organizationBilling.queryKey})}});return{updateBilling:a,...r}},p6=_e("div",{target:"ebmd0gm5"})("display:flex;justify-content:flex-start;flex-direction:column;overflow-y:auto;",({theme:e,isPlayerOpen:a})=>({height:`calc(100vh - ${e.sizes.unifiedHeaderHeight.px})`,[e.media.lg]:{justifyContent:"space-between",flexDirection:"row",padding:"0 0 0 30px"},maxHeight:a?`calc(100vh - ${e.sizes.unifiedHeaderHeight.px} - 72px)`:"100vh"})),m6=_e("div",{target:"ebmd0gm4"})("display:flex;flex-shrink:0;width:100%;justify-content:flex-start;padding:34px 0 40px;position:relative;z-index:1;",({theme:e})=>({[e.media.lg]:{top:0,width:"50%",justifyContent:"flex-end",padding:"52px 50px 0 0"}})),h6=_e("div",{target:"ebmd0gm3"})({name:"1f6sins",styles:"display:flex;flex-shrink:0;width:100%;justify-content:center;padding:34px 0 40px;position:relative"}),Ff=_e("div",{target:"ebmd0gm2"})("display:flex;flex-shrink:0;width:100%;justify-content:flex-start;position:relative;flex-direction:column;max-width:100%;align-self:flex-start;gap:44px;",({theme:e})=>({[e.media.lg]:{top:0,justifyContent:"flex-end",maxWidth:440}})),Ef=_e(tf,{target:"ebmd0gm1"})("display:flex;width:100%;position:relative;flex-direction:column;padding:40px 24px 56px 24px;box-shadow:none;z-index:10;gap:32px;",({theme:e})=>({[e.media.sm]:{borderWidth:0},[e.media.lg]:{borderWidth:1,boxShadow:"0 3px 4px 0 rgba(0,0,0,0.08)"}})),Rf=_e("div",{target:"ebmd0gm0"})("width:100%;height:100vh;position:absolute;padding:42px 20px 10px;z-index:1;top:55px;",({theme:e})=>({background:e.color.surface.surface1,[e.media.lg]:{width:"456px",justifyContent:"flex-end",padding:"42px 40px 10px",height:`calc(100vh - ${e.sizes.unifiedHeaderHeight.px})`,position:"fixed",right:0}})),f6={show:e=>({queryKey:["custom-subscription-cart",e],queryFn:()=>Le(Av,{params:{invoice_id:e}})})},g6=({invoice_id:e})=>{const{data:a,isLoading:r,error:i,refetch:c}=Je({...f6.show(e),enabled:!!e});return{customCart:{data:a,isLoading:r,error:i,refetch:c}}},y6=_e("input",{target:"e1a1h47y0"})({position:"absolute",marginLeft:-9999,visibility:"hidden","& + label":{display:"block",position:"relative",cursor:"pointer",outline:"none",userSelect:"none",padding:2,width:44,height:23,borderRadius:13},"& + label:before, + label:after":{display:"block",position:"absolute",top:0,left:0,bottom:0,content:'""'},"& + label:before":{right:0,borderRadius:2,width:19,height:19,marginLeft:22,textAlign:"center",fontSize:25,lineHeight:"26px",fontWeight:600,transform:"none"},"& + label:after":{top:2,bottom:2,left:2,width:19,borderRadius:"50%",transition:"margin 0.1s"},":checked":{"& + label:after":{marginLeft:21}}},({theme:e,isDisabled:a})=>({"& + label":{backgroundColor:e.color.base.contrast4},"& + label:before":{color:e.color.text.overlay,marginLeft:a?6:36,fontSize:a?58:25,fontWeight:a?200:600,marginTop:a?-4:0},"& + label:after":{backgroundColor:e.color.base.primary,opacity:a?.3:1,marginLeft:a?31:0},":checked":{"& + label":{backgroundColor:e.color.base.teal},"& + label:before":{fontSize:a?58:15,lineHeight:a?"25px":"22px",marginLeft:6,transform:a?"none":"scale(-1,1) rotate(-45deg)"}}})),_6=e=>d("div",{"data-cy":"_Switch_div",children:[n(y6,{...e}),n("label",{...e,htmlFor:e.name,"data-cy":"_Switch_label"})]}),x6=({allowedPaymentMethods:e=["automatic"],paymentCollectionMethod:a,onAutoPayToggle:r})=>{const i=e.length<=1,s=i?e[0]==="automatic":a==="automatic",[u,h]=HC(s);La(()=>{r==null||r(s)});const f=m.useCallback(()=>{r==null||r(!u),h()},[u,h,r]);return i?null:d(ve,{children:[n(aa,{color:"dividerColor",style:{width:"100%"},"data-cy":"_AutoPayToggle_Hr"}),d(G,{w:"100%",align:"center",justify:"space-between","data-cy":"_AutoPayToggle_Flex",children:[d(G,{direction:"column",gap:"4px",flex:2,"data-cy":"_AutoPayToggle_Flex_2",children:[n(S,{textStyle:"UI.14.semi","data-cy":"_AutoPayToggle_Text",children:"Auto-pay"}),n(S,{textStyle:"paragraph.12.reg","data-cy":"_AutoPayToggle_Text_4",children:"Turn on auto-pay to avoid service disruption."})]}),d(G,{gap:"8px",align:"center",justify:"flex-end",flex:1,"data-cy":"_AutoPayToggle_Flex",children:[n(S,{textStyle:"UI.14.semi","data-cy":"_AutoPayToggle_Text",children:u?"On":"Off"}),n(_6,{checked:!!u,id:"auto-pay",name:"auto-pay",type:"checkbox",onClick:f,disabled:!0,"data-cy":"_AutoPayToggle_Switch"})]})]})]})};var b6={name:"1d3w5wq",styles:"width:100%"},S6={name:"1d3w5wq",styles:"width:100%"};const w6=({cart:e,onAutoPayToggle:a})=>{const{matches:r}=Zo();return n(m6,{children:d(Ff,{children:[n($,{size:"20px",weight:"600",lineHeight:"20",style:{marginLeft:!r.lg&&"24px"},"data-cy":"_SubscriptionCustomDetails_Text",children:"Checkout"}),d(Ef,{children:[d(he,{style:{alignItems:"center",justifyContent:"space-between"},"data-cy":"_SubscriptionCustomDetails_Flex",children:[n($,{size:"20px",weight:"600",lineHeight:"20","data-cy":"_SubscriptionCustomDetails_Text",children:"Your Subscription"}),(e==null?void 0:e.download_invoice_url)&&n(Fv,{isCustomCart:!0,url:"",variation:"simple",title:"Invoice",width:"20px",height:"20px","data-cy":"_SubscriptionCustomDetails_DownloadInvoiceButton"})]}),n(aa,{color:"dividerColor",css:b6,"data-cy":"_SubscriptionCustomDetails_Hr"}),d(he,{direction:"column",style:{gap:"16px",width:"100%"},"data-cy":"_SubscriptionCustomDetails_Flex",children:[n(Co,{title:"Subtotal",value:it(e.term_sub_total,{formatWithSymbol:!0}).format(),"data-cy":"_SubscriptionCustomDetails_CheckoutValue"}),n(Co,{title:"Tax",value:it(e.term_tax_total,{formatWithSymbol:!0}).format(),"data-cy":"_SubscriptionCustomDetails_CheckoutValue_7"}),n(Co,{title:"Subscription Total",value:it(e.term_total,{formatWithSymbol:!0}).format(),"data-cy":"_SubscriptionCustomDetails_CheckoutValue_8"}),e!=null&&e.term_payment_description?n(Co,{title:"Term",value:e==null?void 0:e.term_payment_description,"data-cy":"_SubscriptionCustomDetails_CheckoutValue_9"}):n(Co,{title:"Term",value:"Pay in full","data-cy":"_SubscriptionCustomDetails_CheckoutValue_10"})]}),n(x6,{onAutoPayToggle:a,paymentCollectionMethod:e==null?void 0:e.payment_collection_method,allowedPaymentMethods:e==null?void 0:e.allowed_payment_methods,"data-cy":"_SubscriptionCustomDetails_AutoPayToggle"}),n(aa,{color:"dividerColor",css:S6,"data-cy":"_SubscriptionCustomDetails_Hr"}),d(he,{style:{width:"100%",alignItems:"flex-end",justifyContent:"space-between"},"data-cy":"_SubscriptionCustomDetails_Flex",children:[d(he,{direction:"column",style:{gap:"4px"},"data-cy":"_SubscriptionCustomDetails_Flex_14",children:[(e==null?void 0:e.invoice_sequence_number)&&d($,{size:"14px",weight:"400",color:"contrast1",lineHeight:"18","data-cy":"_SubscriptionCustomDetails_Text",children:[e==null?void 0:e.invoice_sequence_number," of ",e==null?void 0:e.expected_invoice_count," installments"]}),n($,{size:"20px",weight:"600",lineHeight:"18","data-cy":"_SubscriptionCustomDetails_Text_16",children:"Due Today"})]}),(e==null?void 0:e.invoice_total)&&n($,{size:"20px",weight:"400",lineHeight:"18","data-cy":"_SubscriptionCustomDetails_Text_17",children:it(e.invoice_total,{formatWithSymbol:!0}).format()})]})]})]})})},Co=({title:e,value:a})=>
13d(he,{style:{width:"100%",alignItems:"center",justifyContent:"space-between"},"data-cy":"_SubscriptionCustomDetails_Flex",children:[n($,{size:"14px",weight:"400",color:"contrast1","data-cy":"_SubscriptionCustomDetails_Text",children:e}),n($,{size:"14px",weight:"400","data-cy":"_SubscriptionCustomDetails_Text_20",children:a})]}),v6=S0.sizes.unifiedHeaderHeight.px;var C6={name:"1d3w5wq",styles:"width:100%"},T6={name:"iqoq9n",styles:"margin-top:20px"},P6={name:"4bd2r9",styles:"margin-right:6px"};const k6=({isLoggedIn:e,onAuthSuccess:a})=>{const[r,i]=m.useState("register"),{matches:c}=Zo(),s=(c.sm||c.md)&&!c.lg;return d(ve,{children:[n(h6,{style:{...!e&&{top:0,width:"50%",justifyContent:"flex-end",padding:"52px 50px 0 0"}},children:!s&&d(Ff,{children:[n($,{size:"20px",weight:"600",lineHeight:"20",style:{marginLeft:!c.lg&&"24px"},"data-cy":"_EmptyDetails_Text",children:"Checkout"}),d(Ef,{children:[n(he,{style:{alignItems:"center",justifyContent:"space-between"},"data-cy":"_EmptyDetails_Flex",children:n($,{size:"20px",weight:"600",lineHeight:"20","data-cy":"_EmptyDetails_Text",children:"Your Subscription"})}),n(aa,{color:"dividerColor",css:C6,"data-cy":"_EmptyDetails_Hr"}),d(he,{direction:"column",alignItems:"center",justifyContent:"center",style:{marginTop:"40px",gap:"12px"},"data-cy":"_EmptyDetails_Flex",children:[n(Xe,{type:"light",name:"emptyCart",width:"45px",height:"45px","data-cy":"_EmptyDetails_Icon"}),n($,{color:"light","data-cy":"_EmptyDetails_Text",children:"Your cart is empty"}),d(he,{alignItems:"center",css:T6,"data-cy":"_EmptyDetails_Flex",children:[n(ic,{to:Bt("songs"),size:"12",css:P6,"data-cy":"_EmptyDetails_NavLink",children:"Continue Browsing"}),n(Xe,{type:"teal",name:"caretRight",width:"4px",height:"10px","data-cy":"_EmptyDetails_Icon"})]})]})]})]})}),!e&&n(Rf,{children:d("div",{style:{marginTop:50,paddingBottom:c.lg?0:180,overflowY:c.lg?"hidden":"scroll",height:`calc(100vh - ${v6})`,paddingLeft:36,paddingRight:36},"data-cy":"_EmptyDetails_div",children:[r==="register"&&n(sd,{onSwitchView:()=>i("login"),onSuccess:a,"data-cy":"_EmptyDetails_RegisterView"}),r==="login"&&n(dd,{onSwitchView:()=>i("register"),onSuccess:a,"data-cy":"_EmptyDetails_LoginView"})]})})]})},I6=({user:e})=>{const{matches:a}=Zo(),r=(a.sm||a.md)&&!a.lg,i=!a.sm&&!a.md||a.lg,[c,s]=m.useState("initial"),[u,h]=m.useState(!1),[f,g]=m.useState(!1),{search:_}=Ho(),w=new URLSearchParams(_),b=w.get("invoice_id")||"",{customCart:v}=g6({invoice_id:b});return v.isLoading?n(he,{justifyContent:"center",alignItems:"center",direction:"column",style:{width:"100%",height:"70vh"},"data-cy":"_SubscriptionCustom_Flex",children:n(Dt,{"data-cy":"_SubscriptionCustom_CircleLoader"})}):v.data?n(p0,{"data-cy":"_SubscriptionCustom_BlockUiWrapper",children:n(ud,{tag:"div",blocking:c==="processing",loader:n(Dt,{"data-cy":"_SubscriptionCustom_CircleLoader"}),message:"Processing Payment","data-cy":"_SubscriptionCustom_BlockUi",children:d(p6,{children:[n(w6,{onAutoPayToggle:h,cart:v.data,"data-cy":"_SubscriptionCustom_SubscriptionCustomDetails"}),(f||i)&&n(Rf,{children:n(l0,{abilities:["purchase_subscription"],noPermissionComponent:n(d0,{bottomSheetOnMobile:!0,isBottomSheetOpen:f,onToggleCartForm:g,"data-cy":"_SubscriptionCustom_CartNoPermissionsView"}),"data-cy":"_SubscriptionCustom_AbilityDisplay",children:n(s0,{customSubscriptionCart:v.data,loggerData:{cartType:"custom_subscription",cartActionData:"custom_subscription",source:w.get("source")||""},customCartHash:b,isCartEmpty:!v.data&&!v.isLoading,isCartFormOpen:f,onToggleCartForm:C=>g(C),user:e,autoPayOn:u,onViewChange:s,"data-cy":"_SubscriptionCustom_CartFormSection"})})}),!f&&r&&n(u0,{setIsCartFormOpen:g,"data-cy":"_SubscriptionCustom_OpenMobileCartFormButton"})]})})}):n(k6,{isLoggedIn:!!e.username,onAuthSuccess:()=>v.refetch(),"data-cy":"_SubscriptionCustom_EmptyDetails"})};var M6=r4,A6=n4,F6=$C,E6=o4;function R6(e,a){var r=E6(e)?M6:F6;return r(e,A6(a))}var O6=R6;const L6=fd(O6);async function V6(e,a={}){return(await qn.post("https://novus-api.musicbed.com/api/subscription/plans/details",e,{withCredentials:!0,...a})).data}const qm={project:null,songs:[],licenseId:null};class Rc extends i4{constructor(){super(...arguments);et(this,"state",{...qm});et(this,"setDownloadSongs",r=>{this.setState(i=>({...i,...r}))});et(this,"resetDownloadSongs",()=>{this.setState({...qm})})}}const Mo=_e("div",{target:"e4wduli13"})(({theme:e,noPadding:a})=>({padding:a?"0px":"30px 0 0px",position:"relative",[e.media.md]:{padding:"30px 0 0px"}})),Hm=_e("div",{target:"e4wduli12"})(({theme:e,customMargin:a})=>({margin:"0 20px 25px",[e.media.md]:{margin:a||"0 60px 50px"}})),B6=_e("div",{target:"e4wduli11"})(({theme:e})=>({padding:"0 20px 0",marginBottom:25,[e.media.md]:{padding:"0 60px 0"}})),D6=_e("div",{target:"e4wduli10"})({name:"4at550",styles:"text-align:left;padding:24px;display:flex;justify-content:space-between"}),j6=_e("div",{target:"e4wduli9"})(({theme:e})=>({maxHeight:405,overflowY:"scroll",padding:"0 20px 50px",[e.media.md]:{padding:"0 60px 50px"}})),z6=_e("div",{target:"e4wduli8"})(({theme:e})=>({background:e.mode==="dark"?"linear-gradient(rgba(39, 42, 42, 0), rgba(39, 42, 42, 1))":"linear-gradient(rgba(244, 245, 245, 0), rgba(244, 245, 245, 1))",position:"absolute",bottom:0,top:"auto",right:0,left:0,height:50})),W6=_e("div",{target:"e4wduli7"})(({theme:e})=>({height:50,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"transparent",borderRadius:2,marginBottom:10,[e.media.md]:{height:70}})),Of=_e("div",{target:"e4wduli6"})(({theme:e,src:a})=>({height:46,width:46,minWidth:46,margin:"12px 12px 12px 0",backgroundImage:`url(${a})`,backgroundPosition:"center",backgroundSize:"cover",backgroundColor:e.color.base.g1,[e.media.md]:{margin:12}})),Os=_e("p",{target:"e4wduli5"})(({theme:e})=>({color:e.color.text.primary,fontFamily:e.font.sans,display:"block",fontWeight:600,textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,lineHeight:"20px",maxWidth:"100%",margin:0})),Lf=_e("p",{target:"e4wduli4"})(({theme:e})=>({color:e.color.text.dark,fontFamily:e.font.sans,display:"block",fontWeight:700,textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:9,lineHeight:"11px",textTransform:"uppercase",maxWidth:"100%",margin:0})),N6=_e("div",{target:"e4wduli3"})(({theme:e,added:a,disabled:r})=>({backgroundColor:e.color.base[a?"contrast":"primary"],border:`1px solid ${e.color.base.divi
13derColor}`,width:40,height:40,borderRadius:2,display:"flex",justifyContent:"center",alignItems:"center",cursor:r?"not-allowed":"pointer",transitionDuration:"0.3s",fontSize:14,lineHeight:"14px",fontWeight:400,margin:"0 0 0 12px",pointerEvents:r?"none":"auto",color:e.color.base[a?"primary":r?"g3":"contrast"],path:{fill:e.color.base[a?"primary":r?"g3":"contrast"]},"&:hover":{color:e.color.base.primary,backgroundColor:e.color.base.contrast,path:{fill:e.color.base.primary}},[e.media.md]:{width:96,margin:"0 12px",border:`1px solid ${e.color.base[r?"g3":"contrast"]}`}})),U6=_e("div",{target:"e4wduli2"})("display:flex;flex-direction:column;width:100%;position:relative;margin:2px 0;border-radius:2px;cursor:pointer;transition:background-color .1s ease;",({theme:e,nopad:a,color:r})=>({padding:a?0:"15px 20px",backgroundColor:e.color.base[r||"g3"],p:{color:e.color.text[r||"primary"]},":hover":{backgroundColor:e.color.base.contrast,"& p":{color:e.color.text.overlay}}})),q6=_e("div",{target:"e4wduli1"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:e.color.base.g1})),H6=_e("div",{target:"e4wduli0"})(({theme:e})=>({width:80,height:80,borderRadius:40,border:`4px solid ${e.color.base.dividerColor}`,borderBottomColor:e.color.base.contrast,borderLeftColor:e.color.base.contrast,transformOrigin:"center",animation:"loadingSpinner 5s infinite linear","@keyframes loadingSpinner":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(1800deg)"}}})),$6=_e("div",{target:"e59td351"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center","& div:not(:last-child)":{marginRight:30}})),Z6=_e("div",{target:"e59td350"})(({theme:e,active:a,uppercase:r})=>({display:"flex",alignItems:"center",justifyContent:"center",color:a?e.color.text.primary:e.color.text.dark,fontSize:14,fontWeight:600,lineHeight:"24px",padding:"0 15px",height:36,...r&&{textTransform:"uppercase"},borderBottom:a?`2px solid ${e.color.base.contrast}`:"2px solid transparent",transition:"all 0.2s ease",cursor:"pointer"})),G6=({tabs:e,borderTop:a,borderBottom:r,transparent:i})=>{var f;const[c,s]=ye.useState(e?e[0].label:""),u=g=>{s(g)},h=(f=e.find(g=>g.label===c))==null?void 0:f.Component;return n(ve,{children:d("div",{role:"tablist","data-cy":"_Tabs_div",children:[e&&d(ve,{children:[a&&n(gt,{"data-cy":"_Tabs_Separator"}),n(me,{bg:"background.surface.1","data-cy":"_Tabs_Box",children:n($6,{children:e.map(g=>{const _=c===g.label;return n(Z6,{active:_,uppercase:g.uppercase,onClick:()=>u(g.label),children:g.label},g.label)})})}),r&&n(gt,{"data-cy":"_Tabs_Separator"})]}),h&&n("div",{role:"tabpanel","data-cy":"_Tabs_div",children:h})]})})};var Y6={name:"qhxz92",styles:"max-width:100%"},K6={name:"1soh0gv",styles:"margin-top:4px"},Q6={name:"4bd2r9",styles:"margin-right:6px"},J6={name:"4bd2r9",styles:"margin-right:6px"},X6={name:"1ci6ipt",styles:"height:90px"},e3={name:"7np7ww",styles:"min-width:100%;min-height:300px"};const us=({hasInfiniteLoading:e=!1,songs:a,setLicenseSong:r,licenseSongs:i,meta:c,fetchSongs:s,disableAdd:u})=>{const h=()=>c?c.current_page!==c.last_page:!0,[f,{rootRef:g}]=O0({isLoading:e?h():!1,hasNextPage:e?h():!1,onLoadMore:s}),_=C=>{var D,A,E,R,k,z;const T=(A=(D=C==null?void 0:C.album)==null?void 0:D.image)==null?void 0:A.url,I=(R=(E=C==null?void 0:C.album)==null?void 0:E.image)==null?void 0:R.cloudinary_public_id,O=(z=(k=C==null?void 0:C.album)==null?void 0:k.image)==null?void 0:z.cloudinary_version_number;return I?window.cloudinaryUrl(I,{height:92,width:92,version:O,quality:"auto:eco"}):T},w=C=>{r({songs:[...i,C]})},b=C=>{let T=[...i];T.splice(C,1),r({songs:T})};return n($o,{queries:{sm:{maxWidth:569}},"data-cy":"_AddMoreSongsList_Media",children:({matches:C})=>n("div",{"data-cy":"_AddMoreSongsList_div",children:a?d("div",{style:{position:"relative"},"data-cy":"_AddMoreSongsList_div_2",children:[d(j6,{ref:g,children:[a.map((T,I)=>{var A,E,R;const O=c4(i,k=>k.id===T.id),D=O>-1;return I>0&&((A=a[0])==null?void 0:A.id)===T.id?null:n(me,{bg:"background.controls.popover",boxShadow:"soft.2",borderRadius:"4px","data-cy":"_AddMoreSongsList_Box",children:n(W6,{children:d(he,{alignItems:"center",grow:1,css:Y6,"data-cy":"_AddMoreSongsList_Flex",children:[n(Of,{src:_(T)}),d("div",{style:{flexGrow:1,textAlign:"left",maxWidth:C.sm?"calc(100% - 110px)":"calc(100% - 190px)"},"data-cy":"_AddMoreSongsList_div",children:[n(Os,{children:n("span",{"data-cy":"_AddMoreSongsList_span",children:T.name})}),d(he,{alignItems:"center",css:K6,"data-cy":"_AddMoreSongsList_Flex",children:[T.explicit&&!T.instrumental&&n(Xe,{type:"danger",name:"explicit",width:"10px",danger:!0,"data-tooltip-content":"Explicit","data-tooltip-id":"explicit",css:Q6,"data-cy":"_AddMoreSongsList_Icon"}),T.instrumental&&n(Xe,{type:"light",name:"instrumental",width:"10px","data-tooltip-content":"Instrumental","data-tooltip-id":"instrumental",className:"songRowIcon",css:J6,"data-cy":"_AddMoreSongsList_Icon_9"}),n(Lf,{children:(R=(E=T.album)==null?void 0:E.artist)==null?void 0:R.name})]})]}),n(N6,{added:D,disabled:!D&&u,onClick:D?()=>b(O):()=>w(T),children:D?n(Xe,{type:"overlay",name:"check",width:"11px","data-cy":"_AddMoreSongsList_Icon_10"}):n(m.Fragment,{children:C.sm?n(Xe,{type:"contrast",name:"fatPlus",width:"11px","data-cy":"_AddMoreSongsList_Icon_11"}):"Add"})})]})})},T.id)}),c&&c.current_page!==c.last_page&&n("div",{ref:f,"data-cy":"_AddMoreSongsList_div",children:n(he,{alignItems:"center",justifyContent:"center",css:X6,grow:1,"data-cy":"_AddMoreSongsList_Flex",children:n(Dt,{"data-cy":"_AddMoreSongsList_CircleLoader"})})})]}),n(z6,{})]}):n(he,{alignItems:"center",justifyContent:"center",css:e3,"data-cy":"_AddMoreSongsList_Flex",children:n(Dt,{"data-cy":"_AddMoreSongsList_CircleLoader"})})})})},t3=_e("div",{target:"e1y870sc1"})(({theme:e})=>({height:8,width:"100%",backgroundColor:e.color.base.g3,borderRadius:4,position:"relative",overflow:"hidden"})),a3=_e("div",{target:"e1y870sc0"})(({theme:e,progress:a})=>({height:8,width:`${a}%`,backgroundColor:e.color.base.contrast,borderRadius:4,position:"absolute",top:0,left:0,transition:"width 0.3s ease"})),Vf=({freeSongsAvailable:e,trialSongLimit:a})=>d(ve,{children:[n("div",{style:{marginBottom:16},"data-cy":"_TrialLimitCounter_div",children:n($,{align:"left",size:"15px",weight:"600",lineHeight:"18px","data-cy":"_TrialLimitCounter_Text",children:`${e}/${a} Songs Remaining`})}),n(t3,{children:n(a3,{progress:e===a?0:(a-e)/a*100})})]});async function aO(e,a){return(await qn.get(`https://novus-api.musicbed.com/api/subscription/subscriptions/${e}/license_projects`,{params:{...a},withCredentials:!0})).data}async function Wd({song_ids:e,name:a,client_name:r,client_website:i,wishlist_name:c,order_item_id:s,wishlist_id:u,subscription_license_id:h}){return(await qn.post(h?`https://novus-api.musicbed.com/api/subscription-licenses/${h}/license-projects`:`https://novus-api.musicbed.com/api/order-items/${s}/license-projects`,{name:a,wishlist_id:u,client_name:r,client_website:i,wishlist_name:c,...e&&{song_ids:e}},{withCredentials:!0})).data.data}async function rO(e,a={}){return(await qn.get(`https://novus-api.musicbed.com/api/wishlists/${e}/license_projects`,{params:{limit:a.limit,order:a.order,...a.page&&{page:a.page}},withCredentials:!0})).data}const Qo={list:e=>({queryKey:["organization/subscription-licenses",{subscriptionId:e}],queryFn:()=>Le("organization/subscription-licenses",{params:{...e&&{subscription_id:e}}})}),fetchLicense:e=>({queryKey:[`subscription-licenses/${e}`],queryFn:()=>Le(`subscription-licenses/${e}`,{params:{}})})},Bf=({enabled:e,subscriptionId:a}={enabled:!0})=>{const{data:r,isLoading:i,error:c}=Je({...Qo.list(a),refetchOnWindowFocus:!1});return{subscriptionLicenses:{data:r||[],isLoading:i,error:c,enabled:e}}};var r3={name:"5bhc30",styles:"margin-bottom:8px"},n3={name:"1flfnuh",styles:"text-align:center;margin:30px auto;max-width:300px"};
13const o3=({projectId:e,licenseId:a,licenseSongs:r,licenseVideoEpisodeTitle:i,showVerifyLicenseAfterAddMoreSongsModal:c,licensingFrom:s,showOnlyRecentlyDownloadedSongsOnAddMoreSongsModal:u,orderItemId:h,shareableId:f,subscription:g,subscriptionLicense:_,setDownloadSongs:w,setLicenseSong:b,setGlobalModal:v,onBack:C,hideBack:T})=>{var ee;const{user:{refetchUser:I}}=ht(),[O,D]=ye.useState(null),[A,E]=ye.useState(null),[R,k]=ye.useState(null),[z,Q]=ye.useState(null),[N,W]=ye.useState(!1),[Y,oe]=ye.useState(!1),[Se,ce]=ye.useState(void 0),[we,le]=ye.useState(void 0),{subscriptionLicenses:K}=Bf({enabled:!_,subscriptionId:g==null?void 0:g.id}),se=(ee=K.data)==null?void 0:ee[0],ae=r.length>Se?0:Se-r.length,q=Ho(),xe=on(),Ce=!["project","license"].includes(s);Fr(()=>{(async()=>{const pe=await M0(g==null?void 0:g.id);oe(pe.trial_active),pe.trial_active&&(ce(pe.trial_limit_counter.remaining_license_project_song_count),le(pe.trial_limit_counter.total_license_project_song_limit))})()});const ge=async()=>{if(Ce){const ue=await y0(e);D(ue)}},Be=async()=>{let ue=[];if(a){const{data:Ke}=await l4(e,a,{includes:"songs"});ue=Ke.songs}const{data:pe,meta:de}=await s4(e,{song_limit:10,page:R?R.current_page+1:1,membership:!0,...f&&{shareable_id:f},exclude_covers:!0});E(R?Ke=>[...Ke,...ue,...pe]:[r[0],...ue,...pe]),k(de)},ie=async()=>{const{data:ue}=await iC({exclude_covers:!0});ue&&ue.length>0?Q([r[0],...ue]):Q([r[0]])},J=()=>{Ce||v({isOpen:!0,view:()=>g!=null&&g.plan.custom||!c?n(Lc,{"data-cy":"_AddMoreSongsView_CompleteProjectDetailsView"}):n(Jo,{"data-cy":"_AddMoreSongsView_VerifyCoverageView"})})},re=async ue=>{if(ue.preventDefault(),!N)try{if(Ce&&O){W(!0);const pe=await Wd({song_ids:r.map(de=>de.id),name:i,client_name:O.endClient,wishlist_name:O.name,wishlist_id:O.id,order_item_id:h,subscription_license_id:(_==null?void 0:_.id)||(se==null?void 0:se.id)});await w({songs:r,project:O,licenseId:pe.id}),I(),q.pathname.includes("/projects")||xe(`/projects/${O.slug}/${O.id}?newLicenseId=${pe.id}`),v({isOpen:!0,onBack:null,view:()=>n(Nd,{songs:r,project:O,licenseId:pe.id,"data-cy":"_AddMoreSongsView_DownloadSongView"})})}else J()}catch(pe){console.error(pe),W(!1)}},fe=()=>d(B6,{children:[n($,{align:"left",size:"12px",weight:"400",lineHeight:"14px",css:r3,"data-cy":"_AddMoreSongsView_Text",children:"Trial Song Usage"}),n(Vf,{freeSongsAvailable:ae,trialSongLimit:we,"data-cy":"_AddMoreSongsView_TrialLimitCounter"})]}),ke=ue=>{const pe=ue.use_limit_counter.remaining_uses||0,de=r.length>=pe?0:pe-r.length;return d(D6,{children:[d("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},"data-cy":"_AddMoreSongsView_div",children:[n($,{size:"18px",weight:"600",lineHeight:"120%",style:{marginBottom:4},"data-cy":"_AddMoreSongsView_Text",children:ue.name}),n($,{size:"12px",lineHeight:"120%",truncate:!0,"data-cy":"_AddMoreSongsView_Text_7",children:ue.description})]}),ue.version!==1&&n($,{size:"12px",weight:"700",lineHeight:"120%",style:{marginLeft:24,flexShrink:0},"data-cy":"_AddMoreSongsView_Text_8",children:ue.use_type==="unlimited"?"Unlimited uses":`${de} uses remaining`})]})},$e=ye.useMemo(()=>N?"Creating License":Ce?"Confirm & Download":"Next: Confirm Details",[N,Ce]),X=ye.useMemo(()=>{const ue=(r==null?void 0:r.length)===0||!A;return r.length>Se?!0:Ce?ue||!O||N:ue||N},[r,A,Ce,O,N,Se]);return Fr(()=>{ge(),Be(),ie(),v({onBack:T?null:C||null})}),d(me,{bg:"background.controls.popover",borderRadius:{base:"0",md:"8px"},py:{base:"20px",md:"40px"},"data-cy":"_AddMoreSongsView_Box",children:[n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:n3,"data-cy":"_AddMoreSongsView_ResponsiveH2",children:"Add other songs to this license"}),u?d(ve,{children:[_&&_.custom&&_.version===2?d(ve,{children:[n(gt,{"data-cy":"_AddMoreSongsView_Separator"}),ke(_)]}):null,n(gt,{"data-cy":"_AddMoreSongsView_Separator_12"}),d(Mo,{children:[Y?fe():null,n(Hm,{customMargin:"0 60px 25px",children:n($,{color:"primary",align:"left",size:14,lineHeight:"19",weight:600,"data-cy":"_AddMoreSongsView_Text",children:"Recently Downloaded"})}),n(us,{disableAdd:Y&&ae===0,songs:z,setLicenseSong:b,licenseSongs:r,meta:R,fetchSongs:ie,"data-cy":"_AddMoreSongsView_AddMoreSongsList"})]})]}
13):d(ve,{children:[_&&_.custom&&_.version===2&&d(ve,{children:[n(aa,{color:"dividerColor","data-cy":"_AddMoreSongsView_Hr"}),ke(_)]}),n(G6,{borderTop:!0,tabs:[{label:"Songs in this project",Component:d(Mo,{children:[Y&&fe(),n(us,{disableAdd:Y&&ae===0,songs:A,setLicenseSong:b,licenseSongs:r,meta:R,fetchSongs:Be,hasInfiniteLoading:!0,"data-cy":"_AddMoreSongsView_AddMoreSongsList"})]})},{label:"Recently downloaded",Component:d(Mo,{children:[Y&&fe(),n(us,{disableAdd:Y&&ae===0,songs:z,setLicenseSong:b,licenseSongs:r,fetchSongs:ie,"data-cy":"_AddMoreSongsView_AddMoreSongsList_18"})]})}],"data-cy":"_AddMoreSongsView_Tabs"})]}),n(Mo,{noPadding:!0,children:n(Hm,{children:n(Ta,{buttonType:"dark",type:"button",size:"large",full:!0,fontSize:14,isDisabled:X,onClick:re,"data-cy":"_AddMoreSongsView_Button",children:$e})})})]})},Oc=e=>n(ja,{to:[cn,Rc,ur],"data-cy":"_AddMoreSongsView_Subscribe",children:(a,r,i)=>n(o3,{...e,projectId:a.state.projectId,licenseId:a.state.licenseId,subscription:a.state.subscription,subscriptionLicense:a.state.subscriptionLicense,licenseSongs:a.state.songs,licenseVideoEpisodeTitle:a.state.licenseVideoEpisodeTitle,showOnlyRecentlyDownloadedSongsOnAddMoreSongsModal:a.state.showOnlyRecentlyDownloadedSongsOnAddMoreSongsModal,showVerifyLicenseAfterAddMoreSongsModal:a.state.showVerifyLicenseAfterAddMoreSongsModal,licensingFrom:a.state.licensingFrom,orderItemId:a.state.orderItemId,setDownloadSongs:r.setDownloadSongs,setLicenseSong:a.setLicenseSong,setGlobalModal:i.setGlobalModal,"data-cy":"_AddMoreSongsView_AddMoreSongsView"})}),i3=_e("div",{target:"e1kezjay4"})(({theme:e})=>({backgroundColor:e.color.surface.surface2,borderTop:`1px solid ${e.color.border.primary}`,borderRadius:"0 0 8px 8px"})),c3=_e("div",{target:"e1kezjay3"})(({theme:e})=>({padding:"35px 20px 50px",[e.media.md]:{padding:"35px 60px 50px"}})),ps=_e("input",{target:"e1kezjay2"})(({theme:e,highlight:a,preventEdit:r})=>({backgroundColor:a?e.color.base.primary:"transparent",border:"1px solid transparent",borderRadius:2,padding:"9px 25px 9px 152px",fontSize:12,lineHeight:"12px",fontFamily:e.font.sans,fontWeight:400,width:"100%",transitionDuration:"0.3s",cursor:"pointer",textOverflow:"ellipsis",zIndex:1,...r&&{pointerEvents:"none",userSelect:"none"},"+ p":{position:"absolute",top:10,left:15,"+ span":{opacity:0,transitionDuration:"0.3s",position:"absolute",right:5,top:9,[e.media.mobile]:{opacity:1}}},"&:hover":{backgroundColor:e.color.base.primary,border:`1px solid ${e.color.base.dividerColor}`,"+ p":{"+ span":{opacity:1}}},"&::placeholder":{color:e.color.base.g5,fontStyle:"italic"},"&:focus":{backgroundColor:e.color.base.primary,border:`1px solid ${e.color.base.g2}`,padding:"15px 15px 15px 152px",boxShadow:e.mode==="dark"?"none":"0px 1px 2px rgba(161, 183, 199, 0.13), 0px 4px 12px rgba(206, 221, 238, 0.6)",cursor:"auto",outline:"none","+ p":{top:16,"+ span":{display:"none"}}}})),l3=async e=>u4({name:e.name,description:e.description,...e.orderItemId&&{order_item_id:e.orderItemId},...e.subscriptionLicenseId&&{subscription_license_id:e.subscriptionLicenseId},...e.selectedEndClientId?{wishlist_end_client_id:e.selectedEndClientId}:{end_client:e.selectedEndClientName}}),Df=async e=>d4(e.id,{name:e.name,description:e.description,...e.selectedEndClientId?{wishlist_end_client_id:e.selectedEndClientId}:{end_client:e.selectedEndClientName}});var s3={name:"d7i4zu",styles:"text-align:center;margin:30px 50px 0px;max-width:300px"},d3={name:"z5krz9",styles:"margin:10px 50px 30px;max-width:350px"},u3={name:"6gjmdu",styles:"min-width:100%;min-height:200px"},p3={name:"je8g23",styles:"pointer-events:none"},m3={name:"je8g23",styles:"pointer-events:none"},h3={name:"je8g23",styles:"pointer-events:none"},f3={name:"1kfc69n",styles:"margin-top:20px;width:100%"},g3={name:"lutbjm",styles:"margin-top:50px"};const y3=({projectId:e,subscription:a,orderItemId:r,preferredRate:i,subscriptionLicense:c,licenseSongs:s,showVerifyLicenseAfterAddMoreSongsModal:u,setGlobalModal:h,fieldValues:f,onInputChange:g,setFieldValues:_,hideBack:w,setDownloadSongs:b,onSuccess:v})=>{var Ce;const{user:{refetchUser:C}}=ht(),[T,I]=ye.useState(null),[O,D]=ye.useState({projectName:!1,endClient:!1}),[A,E]=ye.useState(null),[R,k]=ye.useState(null),[z,Q]=ye.useState(!1),N=ye.useRef(),W=ye.useRef(),Y=ye.useRef(),oe=ye.useRef(!1),Se=Ho(),ce=pt(),we=((Ce=c==null?void 0:c.license_data)==null?void 0:Ce.end_client_name)||(c==null?void 0:c.end_client_name)||(i==null?void 0:i.end_client_name),le=on(),K=(ge,Be,ie,J=!1)=>{_({videoTitle:Be,projectName:Be,endClient:ie}),I(ge),D({projectName:!!Be,endClient:!!(J||ie)})},se=async()=>{const ge=await y0(e),{name:Be,end_client:ie}=ge;K(ge,Be,we||ie,!!we)},ae=async()=>{const ge=await _0();E(ge)};Fr(()=>{se(),ae(),h({onBack:w?null:()=>h({view:()=>a.plan.custom||!u?n(Oc,{"data-cy":"_CompleteProjectDetailsView_AddMoreSongsView"}):n(Jo,{"data-cy":"_CompleteProjectDetailsView_VerifyCoverageView"})})})}),ye.useEffect(()=>{!oe.current&&T&&(oe.current=!0,N.current.focus())},[T]);const q=ge=>{ge&&ge.current.select()};return d("form",{onSubmit:async ge=>{var ie;if(ge.preventDefault(),z)return;Q(!0),k(null);let Be=null;
13(A||[]).forEach(J=>{var re;J.name.toLowerCase()===((re=f.endClient)==null?void 0:re.toLowerCase())&&(Be=J)});try{T.end_client||await Df({id:T.id,name:T.name,description:T.description,selectedEndClientId:Be==null?void 0:Be.id,selectedEndClientName:f.endClient});const J=await Wd({song_ids:s.map(re=>re.id),name:f.videoTitle,wishlist_name:f.projectName,wishlist_id:T.id,client_name:we||f.endClient,...r&&{order_item_id:r},...c&&{subscription_license_id:c.id}});ce.invalidateQueries({queryKey:Qo.list.queryKey}),C(),v&&v(),await b({songs:s,project:T,licenseId:J.id}),Se.pathname.includes("/projects")||le(`/projects/${T.slug}/${T.id}?newLicenseId=${J.id}`),h({onBack:null,view:()=>n(Nd,{songs:s,project:T,licenseId:J.id,"data-cy":"_CompleteProjectDetailsView_DownloadSongView"})})}catch(J){k(((ie=J==null?void 0:J.data)==null?void 0:ie.message)||"There was an error creating your license"),Q(!1)}},"data-cy":"_CompleteProjectDetailsView_form",children:[d(he,{alignItems:"center",justifyContent:"center",direction:"column","data-cy":"_CompleteProjectDetailsView_Flex",children:[n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:s3,"data-cy":"_CompleteProjectDetailsView_ResponsiveH2",children:"Complete project details"}),n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:d3,"data-cy":"_CompleteProjectDetailsView_Text",children:"Please make sure the details below are filled out and correct. These will be used on your final license."})]}),n(i3,{children:n(c3,{children:T?d(m.Fragment,{children:[d("div",{style:{position:"relative",margin:"1px 0"},"data-cy":"_CompleteProjectDetailsView_div",children:[n(ps,{highlight:!f.videoTitle,name:"videoTitle",type:"text",ref:N,onFocus:()=>q(N),onChange:g,value:f.videoTitle,placeholder:"Add a title"}),n($,{color:"primary",size:12,lineHeight:"14px",weight:600,css:p3,"data-cy":"_CompleteProjectDetailsView_Text",children:"Video/Episode Title"}),n("span",{style:{pointerEvents:"none"},"data-cy":"_CompleteProjectDetailsView_span",children:n(Xe,{name:"editPencil",width:12,height:12,"data-cy":"_CompleteProjectDetailsView_Icon"})})]}),d("div",{style:{position:"relative",margin:"1px 0"},"data-cy":"_CompleteProjectDetailsView_div",children:[n(ps,{tabindex:"-1",preventEdit:O.projectName,highlight:!f.projectName,ref:W,name:"projectName",type:"text",onFocus:()=>q(W),onChange:g,value:f.projectName,placeholder:"Add a project name"}),n($,{color:"primary",size:12,lineHeight:"14px",weight:600,css:m3,"data-cy":"_CompleteProjectDetailsView_Text",children:"Project Name"}),!O.projectName&&n("span",{style:{pointerEvents:"none"},"data-cy":"_CompleteProjectDetailsView_span",children:n(Xe,{name:"editPencil",width:12,height:12,"data-cy":"_CompleteProjectDetailsView_Icon"})})]}),d("div",{style:{position:"relative",margin:"1px 0"},"data-cy":"_CompleteProjectDetailsView_div",children:[n(ps,{tabindex:"-1",preventEdit:O.endClient,highlight:!f.endClient,ref:Y,name:"endClient",type:"text",onFocus:()=>{q(Y)},onChange:ge=>{g(ge)},value:f.endClient,placeholder:a!=null&&a.is_social?"Add your Youtube channel":"Add an end client"}),n($,{color:"primary",size:12,lineHeight:"14px",weight:600,css:h3,"data-cy":"_CompleteProjectDetailsView_Text",children:a!=null&&a.is_social?"Youtube Channel":"End Client"}),!O.endClient&&n("span",{style:{pointerEvents:"none"},"data-cy":"_CompleteProjectDetailsView_span",children:n(Xe,{name:"editPencil",width:12,height:12,"data-cy":"_CompleteProjectDetailsView_Icon"})})]}),R&&n($,{color:"danger",align:"left",size:12,lineHeight:"14px",weight:600,css:f3,"data-cy":"_CompleteProjectDetailsView_Text",children:R}),n(Ta,{buttonType:"dark",type:"submit",size:"large",full:!0,fontSize:14,css:g3,isDisabled:!f.videoTitle||!f.projectName||!f.endClient||z,"data-cy":"_CompleteProjectDetailsView_Button",children:z?"Creating License":"Submit & Download"})]}):n(he,{alignItems:"center",justifyContent:"center",css:u3,"data-cy":"_CompleteProjectDetailsView_Flex",children:n(Dt,{"data-cy":"_CompleteProjectDetailsView_CircleLoader"})})})})]})},jf=e=>n(ja,{to:[cn,Rc,ur],"data-cy":"_CompleteProjectDetailsView_Subscribe",children:(a,r,i)=>n(y3,{...e,projectId:a.state.projectId,licenseSongs:a.state.songs,showVerifyLicenseAfterAddMoreSongs
13Modal:a.state.showVerifyLicenseAfterAddMoreSongsModal,subscription:a.state.subscription,orderItemId:a.state.orderItemId,preferredRate:a.state.preferredRate,subscriptionLicense:a.state.subscriptionLicense,onSuccess:a.state.onSuccess,setDownloadSongs:r.setDownloadSongs,setGlobalModal:i.setGlobalModal,"data-cy":"_CompleteProjectDetailsView_CompleteProjectDetailsView"})});jf.defaultProps={inputNames:{videoTitle:null,projectName:null,endClient:null}};const Lc=G0(jf);var _3={name:"5ewqcr",styles:"min-width:32px;min-height:32px;border-radius:50%;background:#16A34A;svg{path{fill:white;}}"},x3={name:"1siegsx",styles:"margin-left:18px"};const b3=({songCount:e})=>n("div",{style:{maxWidth:260},"data-cy":"_SongDownloadComplete_div",children:d(he,{alignItems:"center","data-cy":"_SongDownloadComplete_Flex",children:[n(he,{justifyContent:"center",alignItems:"center",css:_3,"data-cy":"_SongDownloadComplete_Flex_2",children:n(Xe,{name:"check",width:13,height:13,"data-cy":"_SongDownloadComplete_Icon"})}),n($,{size:"14px",weight:"600",lineHeight:"18px",css:x3,"data-cy":"_SongDownloadComplete_Text",children:`Your ${e>1?"songs have":"song has"} downloaded`})]})});var S3={name:"17y2kki",styles:"text-align:center;margin:0 auto"},w3={name:"1folo3n",styles:"margin:10px auto 0;max-width:300px"},v3={name:"bwqgwl",styles:"text-align:center;margin:16px auto 0"},C3={name:"1e9vy8n",styles:"margin:10px auto 0;max-width:350px"},T3={name:"qhxz92",styles:"max-width:100%"},P3={name:"1xncya7",styles:"margin-left:0 !important"},k3={name:"1soh0gv",styles:"margin-top:4px"},I3={name:"4bd2r9",styles:"margin-right:6px"},M3={name:"4bd2r9",styles:"margin-right:6px"},A3={name:"88taqb",styles:"width:100%;padding:20px 0"},F3={name:"1j33wmt",styles:"min-height:220px"},E3={name:"ir9klp",styles:"margin:0 auto 25px;max-width:350px"},R3={name:"1q4socm",styles:"width:100%;padding:10px 0 30px"};const O3=({songs:e,heading:a,licenseId:r,project:i,setGlobalModal:c,setGlobalNotification:s,resetDownloadSongs:u,subscriptionId:h})=>{const{user:{refetchUser:f}}=ht(),[g,_]=ye.useState(null),[w,b]=ye.useState(!1),[v,C]=ye.useState(null),T=ye.useRef(!1);Fr(()=>f),ye.useEffect(()=>{const A=async()=>{var R;let E;try{if(i)E=await cC({licenseId:r,projectId:i==null?void 0:i.id,...e.length===1&&{songId:e[0].id}}),_(E.data.formats);
13else{r?E=await lC({songId:e[0].id,subscriptionId:h,licenseProjectId:r}):E=await sC({song:e[0]});const k=Object.entries(E.data.urls).map(([z,Q])=>({name:z.toUpperCase(),redirect_url:Q}));_(k)}}catch(k){_([]),C(((R=k==null?void 0:k.data)==null?void 0:R.message)||"Your license was created, but we couldn't load the download formats. Please try again.")}};e[0]&&!T.current&&(A(),T.current=!0)},[r,i,h,e]);const I=A=>{var Q,N,W,Y,oe,Se;const E=(N=(Q=A==null?void 0:A.album)==null?void 0:Q.image)==null?void 0:N.url,R=(Y=(W=A==null?void 0:A.album)==null?void 0:W.image)==null?void 0:Y.cloudinary_public_id,k=(Se=(oe=A==null?void 0:A.album)==null?void 0:oe.image)==null?void 0:Se.cloudinary_version_number;return R?window.cloudinaryUrl(R,{height:92,width:92,version:k,quality:"auto:eco"}):E},O=async({prefetch_url:A,redirect_url:E})=>{var R;b(!0);try{let k=E;if(A){const{prepare_download_url:z}=await dC(A),{redirect_url:Q}=await uC(z);k=Q}if(!k)throw new Error("We couldn't start your download. Please try again.");window.location.assign(k),c({isOpen:!1,view:null}),u&&u(),s({isOpen:!0,flash:!0,view:()=>n(b3,{songCount:e.length,"data-cy":"_DownloadSongView_SongDownloadedNotification"})})}catch(k){b(!1),C(((R=k==null?void 0:k.data)==null?void 0:R.message)||(k==null?void 0:k.message)||"We couldn't start your download. Please try again.")}};return n($o,{queries:{sm:{maxWidth:569}},"data-cy":"_DownloadSongView_Media",children:({matches:A})=>{var E,R;return d("div",{"data-cy":"_DownloadSongView_div",children:[w?d("div",{style:{padding:30},"data-cy":"_DownloadSongView_div_3",children:[n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:S3,"data-cy":"_DownloadSongView_ResponsiveH2",children:"Your songs are downloading"}),n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:w3,"data-cy":"_DownloadSongView_Text",children:"Please do not close this tab or navigate away while your songs are downloading."})]}):d("div",{style:{padding:30},"data-cy":"_DownloadSongView_div",children:[n(Xe,{name:"checkmarkCircle",width:38,"data-cy":"_DownloadSongView_Icon"}),n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:v3,"data-cy":"_DownloadSongView_ResponsiveH2",children:a||"Your new license has been completed"}),n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:C3,"data-cy":"_DownloadSongView_Text",children:"Select a format to download your song."})]}),d(Mo,{children:[e[0]&&d("div",{style:{padding:A.sm?"0 30px":"0 60px",...(!i||!i.name)&&{paddingBottom:30}},"data-cy":"_DownloadSongView_div",children:[d(he,{alignItems:"center",grow:1,css:T3,"data-cy":"_DownloadSongView_Flex",children:[n(Of,{src:I(e[0]),css:P3}),d("div",{style:{flexGrow:1,textAlign:"left",maxWidth:"calc(100% - 60px)"},"data-cy":"_DownloadSongView_div",children:[n(Os,{children:e[0].name}),e.length>1&&d(Os,{children:["& ",e.length-1," more"]}),e.length===1&&d(he,{alignItems:"center",css:k3,"data-cy":"_DownloadSongView_Flex",children:[e[0].explicit&&!e[0].instrumental&&n(Xe,{type:"danger",name:"explicit",width:"10px",danger:!0,"data-tooltip-content":"Explicit","data-tooltip-id":"explicit",css:I3,"data-cy":"_DownloadSongView_Icon"}),e[0].instrumental&&n(Xe,{type:"light",name:"instrumental",width:"10px","data-tooltip-content":"Instrumental","data-tooltip-id":"instrumental",className:"songRowIcon",css:M3,"data-cy":"_DownloadSongView_Icon_15"}),n(Lf,{children:(R=(E=e[0].album)==null?void 0:E.artist)==null?void 0:R.name})]})]})]}),g?n(he,{direction:"column",alignItems:"center",css:A3,"data-cy":"_DownloadSongView_Flex",children:g.map((k,z)=>n("div",{onClick:()=>O({prefetch_url:k.prefetch_url,redirect_url:k.redirect_url}),style:{width:"100%",textAlign:"center"},"data-cy":"_DownloadSongView_div",children:n(U6,{children:n($,{size:"14",color:"primary","data-cy":"_DownloadSongView_Text",children:k.name})})},z))}):n(he,{alignItems:"center",justifyContent:"center",css:F3,"data-cy":"_DownloadSongView_Flex",children:n(Dt,{"data-cy":"_DownloadSongView_CircleLoader"})})]}),v&&n($,{color:"danger",align:"center",size:14,lineHeight:"18px",weight:600,css:E3,"data-cy":"_DownloadSongView_Text",children:v}),(i==null?void 0:i.name)&&n(he,{justifyContent:"center",css:R3,"data-cy":"_DownloadSongView_Flex",children:d($,{size:10,lineHeight:"12",weight:400,"data-cy":"_DownloadSongView_Text",children:["All these licensed songs can be downloaded ",n("br",{"data-cy":"_DownloadSongView_br"})," in the project",d(Hn,{size:10,href:`/projects/${i.slug}/${i.id}`,"data-cy":"_DownloadSongView_Link",children:[" ",i.name]})]})}),w&&n(q6,{children:n(H6,{})})]})]})}})},Nd=e=>n(ja,{to:[Rc,ur,Ev],"data-cy":"_DownloadSongView_Subscribe",children:(a,r,i)=>n(O3,{...e,songs:e.songs||a.state.songs,project:e.project||a.state.project,licenseId:e.licenseId||a.state.licenseId,resetDownloadSongs:a.resetDownloadSongs,setGlobalModal:r.setGlobalModal,setGlobalNotification:i.setGlobalNotification,"data-cy":"_DownloadSongView_DownloadSongView"})}),L3=hr(la().shape({project:la().nullable().required("Please choose a project"),title:dt().required("Video/episode title is required"),end_client:la().nullable().required("An end client is required"),selected_end_client:la().nullable().required("An end client is required"),description:dt().nullable()})),V3=({setGlobalModal:e,setLicenseSong:a,setDownloadSongs:r,licensingFrom
13:i,licenseSongs:c,orderItemId:s,preferredRate:u,subscription:h,subscriptionLicense:f,hideBack:g,onBack:_,isPersonalLicense:w})=>{var fe,ke,$e;const{user:{refetchUser:b}}=ht(),[v,C]=ye.useState([]),[T,I]=ye.useState([]),[O,D]=ye.useState(!0),{control:A,handleSubmit:E,watch:R,setValue:k,formState:{isSubmitting:z,errors:Q}}=It({resolver:L3,defaultValues:{project:null,title:"",end_client:null,selected_end_client:null,description:""}}),N=R("project"),W=R("selected_end_client"),Y=m.useRef(),oe=pt(),Se=Ho(),ce=on(),we=ye.useRef(),le=!!s||i==="single-song",K=((fe=f==null?void 0:f.license_data)==null?void 0:fe.end_client_name)||(f==null?void 0:f.end_client_name)||(u==null?void 0:u.end_client_name),se=ye.useMemo(()=>K?T.find(ee=>{var ue;return((ue=ee.name)==null?void 0:ue.toLowerCase())===K.toLowerCase()})||{label:K,name:K,end_client:K,value:K}:null,[T,K]);Fr(()=>{(async()=>{const ee=await _0(),ue=ee==null?void 0:ee.map(de=>({label:de.name,name:de.name,end_client:de.name,wishlist_end_client_id:de.id,value:String(de.id),id:de.id}));I(ue);const{data:pe}=await Om({wishlist_limit:15,song_limit:0});C(pe),D(!1)})(),e({onBack:g?null:_||(f!=null&&f.custom?null:()=>e({view:()=>n(Jo,{"data-cy":"_AddProjectDetailsView_VerifyCoverageView"})}))})}),ye.useEffect(()=>{const X=(W==null?void 0:W.id)??(W==null?void 0:W.wishlist_end_client_id)??(W==null?void 0:W.value),ee=(se==null?void 0:se.id)??(se==null?void 0:se.wishlist_end_client_id)??(se==null?void 0:se.value);!se||(W==null?void 0:W.name)===se.name&&X===ee||(k("end_client",se),k("selected_end_client",se))},[W,k,se]);const ae=v==null?void 0:v.map(X=>({label:X.name,name:X.name,end_client:T.filter(ee=>ee.id===X.wishlist_end_client_id)[0]||null,wishlist_end_client_id:X.wishlist_end_client_id,value:String(X.id),id:X.id,description:X.description})),q=X=>{if(!X)return;const ee=X.label||X.name;k("project",X),k("title",ee),X.newOption||(k("description",X.description||""),k("end_client",X.end_client),k("selected_end_client",X.end_client)),setTimeout(()=>{we.current.focus(),we.current.setSelectionRange(ee.length,ee.length)},200)},xe=X=>{if(!X){k("end_client",null),k("selected_end_client",null);return}const ee=X.newOption?{...X,name:X.label,end_client:X.label}:X;k("end_client",ee),k("selected_end_client",ee)},Ce=X=>{var ue;const ee=(ue=X.end_client)==null?void 0:ue.name;return d(me,{"data-cy":"_AddProjectDetailsView_Box",children:[n(S,{textStyle:"UI.14.semi",color:"text.primary","data-cy":"_AddProjectDetailsView_Text",children:X.name}),ee&&n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_AddProjectDetailsView_Text_3",children:ee})]})},ge=X=>d(Fe,{gap:"8px","data-cy":"_AddProjectDetailsView_HStack",children:[n(Xe,{name:"save",type:"contrast",width:14,"data-cy":"_AddProjectDetailsView_Icon"}),n(S,{textStyle:"UI.14.semi","data-cy":"_AddProjectDetailsView_Text",children:`Create new: ${X}`})]}),Be=async X=>{const{data:ee}=await Om({wishlist_limit:20,song_limit:0,name:X});C(ee)},ie=async X=>{var ue,pe,de,Ke;const ee=((ue=X.project)==null?void 0:ue.label)||((pe=X.project)==null?void 0:pe.name);return l3({name:ee,description:X.description,orderItemId:s,subscriptionLicenseId:f==null?void 0:f.id,selectedEndClientId:(de=X.selected_end_client)==null?void 0:de.id,selectedEndClientName:(Ke=X.selected_end_client)==null?void 0:Ke.name})},J=async(X,ee)=>{var ue,pe;if(le){const de=await Wd({song_ids:c.map(Ke=>Ke.id),name:X.title||X.project.name,wishlist_name:ee.name,wishlist_id:ee.id,client_name:K||ee.endClient||((ue=ee.end_client)==null?void 0:ue.name)||ee.end_client||((pe=X.selected_end_client)==null?void 0:pe.name),order_item_id:s});oe.invalidateQueries({queryKey:Qo.list.queryKey}),await r({songs:c,project:ee,licenseId:de.id}),Y.current=de,b(),Se.pathname.includes("/projects")||ce(`/projects/${ee.slug}/${ee.id}?newLicenseId=${de.id}`)}};return d(me,{className:"chakra-root",bg:"background.controls.popover",borderRadius:{base:"8px 8px 0px 0px",md:"8px"},"data-cy":"_AddProjectDetailsView_Box",children:[d(V,{gap:"10px",p:"30px",align:"center",textAlign:"center","data-cy":"_AddProjectDetailsView_Stack",children:[n(yc,{size:"lg","data-cy":"_AddProjectDetailsView_Heading",children:"Add Project Details"}),n(S,{textStyle:"UI.14.reg",color:"text.secondary",maxW:"300px","data-cy":"_AddProjectDetailsView_Text",children:"Your final license will be added to your project and made available for download."})]}),n(gt,{"data-cy":"_AddProjectDetailsView_Separator"}),d(me,{position:"relative",borderRadius:{base:"0",md:"0 0 8px 8px"},"data-cy":"_AddProjectDetailsView_Box",children:[d(V,{as:"form",gap:"16px",p:"30px",textAlign:"left",onSubmit:E(async X=>{var ee,ue,pe;try{let de=X.project;X.project.newOption?de=await ie(X):!X.project.wishlist_end_client_id||X.selected_end_client.id&&X.project.wishlist_end_client_id===X.selected_end_client.id?de=await Df({id:X.project.id,name:X.project.name,description:X.description,selectedEndClientId:(ee=X.selected_end_client)==null?void 0:ee.id,selectedEndClientName:(ue=X.end_client)==null?void 0:ue.name}):de=await ie(X);const Ke=(de==null?void 0:de.id)||X.project.id;
13a({projectId:Ke,licenseVideoEpisodeTitle:X.title||X.project.name,showOnlyRecentlyDownloadedSongsOnAddMoreSongsModal:X.project.newOption}),await J(X,de||X.project),b(),e({onBack:null,view:()=>le?n(Nd,{songs:c,project:de,licenseId:Y.current.id,"data-cy":"_AddProjectDetailsView_DownloadSongView"}):n(Oc,{hideBack:!0,"data-cy":"_AddProjectDetailsView_AddMoreSongsView"})})}catch(de){Ct.create({title:"Couldnât complete your license",description:((pe=de==null?void 0:de.getFirstErrorMessage)==null?void 0:pe.call(de))||"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}}),"data-cy":"_AddProjectDetailsView_Stack",children:[d(ua,{invalid:!!Q.project,children:[n(As,{items:ae??[],label:"Project Name",creatable:!0,onSearch:Be,searchDebounceMs:400,renderItem:Ce,createLabel:ge,emptyText:"No projects found",inputProps:{h:"42px",placeholder:"Name your Musicbed project","data-cy":"add-project-name"},rootProps:{openOnClick:!0,onValueChange:({items:X})=>q(X[0])},"data-cy":"_AddProjectDetailsView_FormCombobox"}),n(Da,{children:(ke=Q.project)==null?void 0:ke.message})]}),n(Ae,{name:"title",control:A,render:({field:X})=>{var ee;return n(je,{ref:we,label:"Video/Episode Title",errorText:(ee=Q.title)==null?void 0:ee.message,inputProps:{...X,"data-cy":"add-project-title",h:"42px",placeholder:"The video title for your license"},"data-cy":"_AddProjectDetailsView_FormInput"})},"data-cy":"_AddProjectDetailsView_Controller"}),d(ua,{invalid:!!Q.selected_end_client,children:[n(As,{items:T??[],label:h!=null&&h.is_social||w?"Personal Social Channel":"End Client",creatable:!0,renderItem:Ce,createLabel:ge,emptyText:"No end clients found",inputProps:{h:"42px","data-cy":"add-project-end-client",placeholder:h!=null&&h.is_social||w?"YouTube, Social Account, or Podcast Name":void 0},rootProps:{openOnClick:!0,disabled:!!K||!!(N&&!N.newOption),defaultInputValue:(W==null?void 0:W.name)||(W==null?void 0:W.label)||"",onValueChange:({items:X})=>xe(X[0])},"data-cy":"_AddProjectDetailsView_FormCombobox"},(W==null?void 0:W.name)||(W==null?void 0:W.label)||"no-end-client"),n(Da,{children:($e=Q.selected_end_client)==null?void 0:$e.message})]}),n(Ae,{name:"description",control:A,render:({field:X})=>d(ua,{children:[n(wd,{children:"Description"}),n(L0,{h:"96px",resize:"none",variant:"outline",borderColor:"border.default","data-cy":"add-project-description",...X})]})}),n(ne,{mt:"10px",w:"full",size:"xl",variant:"filled",type:"submit",loading:z,"data-cy":"add-project-submit",children:le?"Submit & Download":"Next"})]}),O&&n(Va,{zIndex:"2",bg:"background.controls.popover",position:"absolute",top:0,left:0,right:0,bottom:0,"data-cy":"_AddProjectDetailsView_Center",children:n(Dt,{"data-cy":"_AddProjectDetailsView_CircleLoader"})})]})]})},Vc=e=>n(ja,{to:[ur,Rc,cn],"data-cy":"_AddProjectDetailsView_Subscribe",children:(a,r,i)=>n(V3,{...e,setGlobalModal:a.setGlobalModal,subscription:i.state.subscription,subscriptionLicense:i.state.subscriptionLicense,preferredRate:i.state.preferredRate,licensingFrom:i.state.licensingFrom,licenseSongs:i.state.songs,orderItemId:i.state.orderItemId,setLicenseSong:i.setLicenseSong,setDownloadSongs:r.setDownloadSongs,"data-cy":"_AddProjectDetailsView_AddProjectDetailsView"})}),B3=_e("div",{target:"e19kdhdb3"})(({theme:e})=>({borderRadius:"0 0 8px 8px"})),D3=_e("div",{target:"e19kdhdb2"})(({theme:e})=>({padding:"35px 20px 50px",[e.media.md]:{padding:40}})),j3=_e("div",{target:"e19kdhdb1"})(({height:e,theme:a})=>({height:e||1,transitionDuration:"0.3s",overflow:"hidden"})),ms=_e("div",{target:"e19kdhdb0"})(({theme:e,noHover:a})=>({padding:"16px 20px",borderRadius:2,cursor:a?"default":"pointer",transitionDuration:"0.3s",display:"flex",alignItems:"center",justifyContent:"space-between",...a&&{pointerEvents:"none"},...!a&&{"&:hover":{backgroundColor:(e==null?void 0:e.mode)==="dark"?e==null?void 0:e.color.popOver.background:e==null?void 0:e.color.base.primary}}})),z3=({heading:e,label:a,description:r,options:i,upgraded:c,onSelect:s,handleCustom:u,isDistribution:h,isCustom:f})=>{var O;const[g,_]=m.useState(!1),w=h?f.distribution:f.size,b=w&&i?i[i.length-1]:c||void 0,v=m.useRef(null),C=m.useRef(null);IC(C,()=>{_(!1)});const T=D=>{D.custom?u({...h?{distribution:!0}:{size:!0}}):u({...h?{distribution:!1}:{size:!1}}),s(D.upgrade_path),_(!1)},I=D=>!!c&&c.upgrade_path===D.upgrade_path;return d("div",{style:{textAlign:"left",marginBottom:32},"data-cy":"_CoverageSelection_div",children:[g?n($,{size:"12px",lineHeight:"14px",style:{marginBottom:8},"data-cy":"_CoverageSelection_Text",children:e}):d(he,{justifyContent:"space-between",alignItems:"center","data-cy":"_CoverageSelection_Flex",children:[d("div",{style:{maxWidth:300,marginRight:32},"data-cy":"_CoverageSelection_div",children:[n($,{size:"12px",lineHeight:"14px",style:{marginBottom:8},"data-cy":"_CoverageSelection_Text",children:e}),n($,{size:"16px",lineHeight:"18px",weight:"600",style:{marginBottom:2},"data-cy":"_CoverageSelection_Text_4",children:(b==null?void 0:b.label)||a}),((b==null?void 0:b.description)||r)&&n($,{size:"12px",lineHeight:"12px","data-cy":"_CoverageSelection_Text_5",children:(b==null?void 0:b.description)||r})]}),d(he,{alignItems:"center",onClick:()=>_(!0),"data-cy":"_CoverageSelection_Flex",children:[n(Hn,{color:c||w?"teal":"primary",fontSize:"12px",weight:"400",underline:!c&&!w,italic:!!c||w,nowrap:!0,"data-cy":"_CoverageSelection_Link",children:c||w?"Upgraded":"Increase Coverage"}),(!!c||w)&&n("div",{style:{marginLeft:7,cursor:"pointer"},"data-cy":"_CoverageSelection_div",children:n(Xe,{name:"pencil",type:"light",width:"10px",height:"10px","data-cy":"_CoverageSelection_Icon"})})]})]}),n(j3,{ref:C,height:g?(O=v.current)==null?void 0:O.offsetHeight:1,children:d(me,{bg:"background.surface.2",ref:v,p:"20px",mt:"2px",borderRadius:"4px","data-cy":"_CoverageSelection_Bo
13x",children:[d(ms,{noHover:!0,children:[d("div",{style:{marginRight:32},"data-cy":"_CoverageSelection_div",children:[n($,{size:"16px",lineHeight:"12px",weight:"600",style:{marginBottom:6},"data-cy":"_CoverageSelection_Text",children:a}),r&&n($,{size:"12px",lineHeight:"12px","data-cy":"_CoverageSelection_Text_14",children:r})]}),n($,{italic:!0,color:"dark",size:"12px",lineHeight:"12px",nowrap:!0,"data-cy":"_CoverageSelection_Text_15",children:"Currently Covered"})]}),h&&!!c&&b&&d(ms,{noHover:!0,children:[d("div",{style:{marginRight:32},"data-cy":"_CoverageSelection_div",children:[n($,{size:"16px",lineHeight:"12px",weight:"600",style:{marginBottom:6},"data-cy":"_CoverageSelection_Text",children:b==null?void 0:b.label}),(b==null?void 0:b.description)&&n($,{size:"12px",lineHeight:"12px","data-cy":"_CoverageSelection_Text_18",children:b==null?void 0:b.description})]}),n($,{italic:!0,color:"dark",size:"12px",lineHeight:"12px",nowrap:!0,"data-cy":"_CoverageSelection_Text_19",children:"Upgraded"})]}),i==null?void 0:i.map((D,A)=>d(ms,{noHover:!f&&I(D)||w&&!D.upgrade_path,onClick:()=>T(D),children:[d("div",{style:{marginRight:32},"data-cy":"_CoverageSelection_div",children:[n($,{size:"16px",lineHeight:"12px",weight:"600",style:{marginBottom:6},"data-cy":"_CoverageSelection_Text",children:D.label}),D.description&&n($,{size:"12px",lineHeight:"12px","data-cy":"_CoverageSelection_Text_22",children:D.description})]}),n($,{italic:!0,color:!w&&I(D)||w&&!D.upgrade_path?"dark":"teal",size:"12px",lineHeight:"12px",nowrap:!0,"data-cy":"_CoverageSelection_Text_23",children:!w&&I(D)||w&&!D.upgrade_path?"Upgraded":"Upgrade"})]},A))]})})]})},W3={client_size:"Client Size",company_size:"Company Size",distributions:"Distribution"},N3=e=>{const a=[],r=[];return Object.entries(e).forEach(([i,c])=>{c&&typeof c!="string"&&(a.push(W3[i]),r.push({...c.current,upgraded:c.upgraded,options:c.upgrade_options}))}),{labels:a,options:r}},U3=_e("div",{target:"e1c34v9u2"})(({error:e,theme:a})=>({position:"relative",userSelect:"none",background:a.color.surface.surface2,boxSizing:"border-box",boxShadow:"0px 1px 2px rgba(161, 183, 199, 0.13), 0px 4px 12px rgba(206, 221, 238, 0.6)",borderRadius:"2px",border:e?`1px solid ${a.color.base.red}`:`1px solid ${a.color.base.teal}`,height:124,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0 30px",marginTop:34,marginBottom:34,cursor:"pointer",":hover":{border:e?`1px solid ${a.color.base.red}`:`1px solid ${a.color.base.contrast}`},[a.media.md]:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:124,padding:"0 30px"}})),q3=_e("div",{target:"e1c34v9u1"})(({theme:e})=>({padding:6,background:e.color.base.teal,borderRadius:2,position:"absolute",top:-12,right:30,display:"flex",alignItems:"center",justifyContent:"center"})),H3=_e("div",{target:"e1c34v9u0"})(({theme:e})=>({position:"absolute",top:6,left:-2,right:8,height:2,backgroundColor:e.color.base.teal,transform:"skewY(-10deg)"}));var $3={name:"1d3w5wq",styles:"width:100%"},Z3={name:"cn3xcj",styles:"margin-bottom:12px"},G3={name:"1h6krc",styles:"margin-top:-10px"};const Y3=({license:e,paymentType:a,onSetPaymentType:r})=>{const[i,c]=ye.useState(null),s=ye.useRef(null),{matches:u}=Zo(),h=e.subscriptions[0].price.month,f=h?"month":"year",g=it(e==null?void 0:e.subscriptions[0].price[a||f]).dollars(),_=it(e==null?void 0:e.subscriptions[0].price[a||f]).value.toFixed(2).toString().split(".")[1],w=typeof(e==null?void 0:e.subscriptions[0].discount)=="object"&&(e==null?void 0:e.subscriptions[0].discount[a||f]),b=parseFloat(w==null?void 0:w.discount)>0,v={year:{id:1,label:"Pay in Full",name:"year",value:"year"},month:{id:2,label:"12 Installments",name:"month",value:"month"}};return ye.useEffect(()=>{a&&r(a)},[a,r]),Fr(()=>{var C;(C=s.current)==null||C.focus()}),d(U3,{name:"PaymentOptions",id:"subscription",onClick:()=>{a||s.current.focus(),c(null)},error:i,children:[d(he,{justifyContent:"space-between",alignItems:"center",css:$3,"data-cy":"_PaymentOption_Flex",children:[n("div",{style:{marginRight:20,...u.sm&&{marginBottom:5}},"data-cy":"_PaymentOption_div",children:n($,{size:18,weight:700,lineHeight:"18",align:"left","data-cy":"_PaymentOption_Text",children:"Upgrade Subscription"})}),d(he,{alignItems:"end",justifyContent:"end",direction:"column",css:ca({minWidth:u.md?120:0},""),"data-cy":"_PaymentOption_Flex",children:[d(he,{alignItems:"center","data-cy":"_PaymentOption_Flex_4",children:[w&&b&&d("div",{style:{position:"relative"},"data-cy":"_PaymentOption_div",children:[n($,{size:"16px",lineHeight:"16",color:"dark",weight:"600",css:ca({marginRight:10,marginBottom:u.md?12:3},""),"data-cy":"_PaymentOption_Text",children:it(w.sub_total,{separator:",",formatWithSymbol:!0}).format()}),n(H3,{})]}),n($,{as:"div",size:28,lineHeight:21,weight:600,align:"left",css:Z3,"data-cy":"_PaymentOption_Text_7",children:d(he,{grow:1,"data-cy":"_PaymentOption_Flex",children:[n(Oo,{size:28,lineHeight:"21",weight:600,"data-cy":"_PaymentOption_Span",children:"$"}),it(g,{separator:",",precision:0}).format(),d(he,{direction:"column","data-cy":"_PaymentOption_Flex",children:[d(Oo,{size:12,lineHeight:"10",weight:600,color:"g6","data-cy":"_PaymentOption_Span",children:[".",_]}),d(Oo,{size:12,lineHeight:"10",weight:600,color:"g6","data-cy":"_PaymentOption_Span_12",children:["/",a||f]})]})]})})]}),h?n(Is,{ref:s,variant:"secondary",noBorderEffect:!0,placeholder:"Billing Option",options:Object.keys(e.subscriptions[0].price).map(C=>v[C]),onChange:C=>r(C.value),onBlur:()=>{a||c("Select a billing option")},isSearchable:!1,css:ca({display:u.md?"block":"none"},""),"data-cy":"_PaymentOption_DropdownSelect"}):n($,{css:G3,italic:!0,size:"12px",lineHeight:"14",align:"right","data-cy":"_PaymentOption_Text",children:"pay in full"})]})]}),h&&u.sm&&n("div",{style:{width:"100%",padding:"10px 20px 0"},"data-cy":"_PaymentOption_div",children:n(Is,{ref:s,variant:"secondary",noBorderEffect:!0,placeholder:"Billing Option",options:Object.keys(e.subscriptions[0].price).map(C=>v[C]),onChange:C=>r(C.value),onBlur:()=>{a||c("Select a billing option")},isSearchable:!1,"data-cy":"_PaymentOption_DropdownSelect"})}),w&&b&&n(q3,{children:n($,{size:"10px",lineHeight:"12",color:"overlay","data-cy":"_PaymentOption_Text",children:"LIMITED TIME ONLY"})})]})},nO=_e("img",{target:"e1gk3atk2"})(({theme:e})=>({width:"100%",height:350,backgroundImage:"url(https://res.cloudinary.com/stills-website/image/upload/images/TrialLimitImages/Uzuhan-2023-1_1.jpg)",backgroundSize:"cover",backgroundPosition:"top right",borderRadius:"2px 2px 0 0",[e.media.md]:{borderRadius:"2px 0 0 2px",height:385,width:284,backgroundPosition:"center"}})),K3=_e("div",{target:"e1gk3atk1"})(({theme:e})=>({backgroundColor:e.color.surface.surface2,borderTop:`1px solid ${e.color.border.primary}`,borderRadius:"0 0 8px 8px"})),Q3=_e("div",{target:"e1gk3atk0"})(({theme:e})=>({padding:"35px 20px 50px",[e.media.md]:{padding:"0 20px 25px"}}));var J3={name:"5bhc30",styles:"margin-bottom:8px"},X3={name:"17y2kki",styles:"text-align:center;margin:0 auto"},eT={name:"12kwq9a",styles:"margin:10px auto 0;max-width:226px"},tT={name:"vqx3x2",styles:"margin-bottom:5px"},aT={name:"1fgdcyd",styles:"margin-bottom:24px"};const rT=({subscription:e,handleRetry:a})=>d(m.Fragment,{children:[d("div",{style:{padding:30},"data-cy":"_TrialPaymentCard_div",children:[n(Xe,{name:"redXCircle",width:38,css:J3,"data-cy":"_TrialPaymentCard_Icon"}),n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:X3,"data-cy":"_TrialPaymentCard_ResponsiveH2",children:"Payment c
13ould not be processed"}),d($,{color:"primary",align:"center",size:12,lineHeight:"14px",weight:400,css:eT,"data-cy":"_TrialPaymentCard_Text",children:["Please update your credit card information. If you continue to experience issues please contact"," ",n(Hn,{underline:!0,color:"primary",href:"mailto:[email protected]",css:tT,"data-cy":"_TrialPaymentCard_Link",children:"[email protected]"})]})]}),n(K3,{children:n(Q3,{children:n(Rv,{onSuccess:a,hideHeader:!0,hidePaypal:!0,noBackground:!0,subscription:e,buttonText:"Activate Subscription",header:n($,{align:"left",size:"16px",weight:"600",lineHeight:"18px",css:aT,"data-cy":"_TrialPaymentCard_Text",children:"Add a new card"}),"data-cy":"_TrialPaymentCard_NewSubscriptionPaymentMethodForm"})})})]}),$m=e=>`subscription/subscriptions/${e}/end-trial/preview`,Zm=e=>`subscription/subscriptions/${e}/end-trial`,zf=e=>({preview:{queryKey:[$m(e),e],queryFn:()=>Le($m(e))},endTrial:{queryKey:[Zm(e),e],queryFn:()=>Le(Zm(e),{method:nn})}}),Wf=e=>{const{mutateAsync:a,...r}=mt({mutationFn:i=>zf(i).endTrial.queryFn(),...e||{}});return{endSubscriptionTrial:a,...r}};var nT={name:"17y2kki",styles:"text-align:center;margin:0 auto"},oT={name:"wa6ckm",styles:"margin:10px auto 0;max-width:320px"},iT={name:"5bhc30",styles:"margin-bottom:8px"},cT={name:"zhi4ni",styles:"margin:32px 0"},lT={name:"g46w8s",styles:"margin-bottom:30px"},sT={name:"1q4vxyr",styles:"margin-left:8px"};const dT=({subscription:e,title:a,noSubtitle:r,hideBack:i,onBack:c,songs:s,setGlobalModal:u,closeGlobalModal:h,resetLicenseSong:f,projectId:g,upgradeOnly:_,onConfirm:w})=>{const{user:{data:b}}=ht(),v=Qe("subscription-on-site-modal"),C=Qe("start-subscription-now-modal"),[T,I]=m.useState(!1),[O,D]=m.useState(null),[A,E]=m.useState(!0),[R,k]=m.useState(null),[z,Q]=m.useState(!1),[N,W]=m.useState(null),[Y,oe]=m.useState({size:!1,distribution:!1}),[Se,ce]=m.useState(null),[we,le]=m.useState(!1),[K,se]=m.useState(0),[ae,q]=m.useState(0),xe=()=>u({isOpen:!0,view:()=>n(Jo,{upgradeOnly:_,title:a,noSubtitle:r,hideBack:i,onConfirm:w,subscription:e,"data-cy":"_VerifyCoverageView_VerifyCoverageView"})}),Ce=()=>u==null?void 0:u({isOpen:!0,view:()=>n(rT,{subscription:e,handleRetry:()=>{ge(e.id)},"data-cy":"_VerifyCoverageView_TrialPaymentCardView"})}),{endSubscriptionTrial:ge}=Wf({onMutate:()=>{Ct.create({title:"Activating subscription...",description:"You'll be able to finish your license soon.",type:"loading",meta:{closable:!1,duration:6e4}})},onSuccess:()=>{Ct.dismiss(),u({isOpen:!1,view:()=>null}),C.show({subscription:e,isSuccess:!0,onCancel:()=>{xe(),C.hide()}})},onError:()=>{Ct.dismiss(),Ct.create({title:"Error activating subscription",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}}),Be=async ee=>{const ue=await H4({subscription_id:e.id,upgrade_path:ee}),{labels:pe,options:de}=N3(ue);if(k(pe),D(de),E(!1),ue.standard_license){const Ke=await c0(ue.standard_license);W(Ke),oe(Wa=>({...Wa,distribution:!1}))}},ie=ee=>{oe({...Y,...ee})};La(()=>{Be()}),La(()=>{u({onBack:i?null:c||(g?()=>u({view:()=>n(Oc,{"data-cy":"_VerifyCoverageView_AddMoreSongsView"})}):null)})}),La(()=>{(async()=>{const ue=await M0(e.id);le(ue.trial_active),ue.trial_active&&(se(ue.trial_limit_counter.remaining_license_project_song_count-(i?0:s.length)),q(ue.trial_limit_counter.total_license_project_song_limit))})()});const J=({subscription:ee})=>{f(),u({isOpen:!0,view:()=>n(Nf,{subscription:ee,"data-cy":"_VerifyCoverageView_UpgradeSuccessView"})}),v.hide(),Ar(`${Bt("projects")}`)},re=ee=>{u({modalProps:{size:"auto"},view:()=>n("div",{style:{minWidth:520,maxWidth:520},"data-cy":"_VerifyCoverageView_div",children:n(Am,{songs:s,user:b,onBack:fe,coverages:ee==null?void 0:ee.coverages,isCelebrity:ee==null?void 0:ee.isCelebrity,exclusivityInterested:ee==null?void 0:ee.exclusivityInterested,"data-cy":"_VerifyCoverageView_SubscriptionCustomQuoteForm"})})})},fe=()=>{var ee;if(N&&Se)localStorage.setItem("subscription-upgrade-data",JSON.stringify({projectId:g,songs:s})),h(),v.show({user:b,license:N,selectedPlanType:Se,source:Bo.SUBSCRIPTION_UPGRADE_MODAL,upgradeSubscriptionId:e.id,planId:(ee=e.plan)==null?void 0:ee.id,onSubscriptionCheckout:J,onSubscriptionCustomQuote:re});else{if(_)return w&&w();u({view:g?()=>n(Lc,{"data-cy":"_VerifyCoverageView_CompleteProjectDetailsView"}):()=>n(Vc,{"data-cy":"_VerifyCoverageView_AddProjectDetailsView"})})}},ke=()=>{I(!0)},$e=async()=>{C.show({subscription:e,onCancel:()=>{xe(),C.hide()},onClose:()=>xe(),onError:()=>{C.hide(),Ce()}}),u({isOpen:!1,view:()=>null})},X=Y.distribution||Y.size;return n("div",{"data-cy":"_VerifyCoverageView_div",children:X&&!T?n(Am,{user:b,songs:s,onSuccess:ke,coverages:Y.size?[{value:"enterprise",label:"Enterprise"}]:void 0,showExtendedCoverages:Y.distribution,onBack:()=>oe({distribution:!1,size:!1}),showCompletedView:!1,"data-cy":"_VerifyCoverageView_SubscriptionCustomQuoteForm"}):n(ve,{children:T?n(Cd,{title:"We've received your request.",text:"Thank y
13ou for submitting your custom license request. We have received your request and one of our Licensing Team members will contact you shortly. If you have any questions please feel free to contact us.",onButtonClick:()=>{u({isOpen:!1,view:null}),window.open("https://support.musicbed.com","_blank")},minHeight:"100%",buttonText:"CONTACT US",iconColor:"teal",buttonType:"dark",fullWidthButton:!0,"data-cy":"_VerifyCoverageView_SuccessView"}):d(me,{bg:"background.controls.popover",borderRadius:{base:"8px 8px 0px 0px",md:"8px"},"data-cy":"_VerifyCoverageView_Box",children:[d("div",{style:{padding:30},"data-cy":"_VerifyCoverageView_div",children:[n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:nT,"data-cy":"_VerifyCoverageView_ResponsiveH2",children:a||"Verify license details"}),!r&&n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:oT,"data-cy":"_VerifyCoverageView_Text",children:"Please make sure the details below are correct. These will be used on your final license."})]}),n(gt,{"data-cy":"_VerifyCoverageView_Separator"}),n(me,{bg:"background.surface.1","data-cy":"_VerifyCoverageView_Box",children:n(B3,{children:n(D3,{children:A?n(he,{justifyContent:"center",alignItems:"center",style:{width:"100%",height:300},"data-cy":"_VerifyCoverageView_Flex",children:n(Dt,{"data-cy":"_VerifyCoverageView_CircleLoader"})}):d(m.Fragment,{children:[we&&d(ve,{children:[d(he,{justifyContent:"space-between",alignItems:"center",css:iT,"data-cy":"_VerifyCoverageView_Flex",children:[n($,{align:"left",size:"12px",weight:"400",lineHeight:"14px","data-cy":"_VerifyCoverageView_Text",children:"Free Trial"}),n(Hn,{color:"primary",fontSize:"12px",weight:"400",underline:!0,onClick:$e,"data-cy":"_VerifyCoverageView_Link",children:"Start subscription now"})]}),n(Vf,{freeSongsAvailable:K,trialSongLimit:ae,"data-cy":"_VerifyCoverageView_TrialLimitCounter"}),n(aa,{color:"dividerColor",css:cT,"data-cy":"_VerifyCoverageView_Hr"})]}),O==null?void 0:O.map((ee,ue)=>n(z3,{heading:R==null?void 0:R[ue],label:ee.label,description:ee.description,options:ee.options,onSelect:Be,upgraded:ee.upgraded,handleCustom:ie,isCustom:Y,isDistribution:ue===1,"data-cy":"_VerifyCoverageView_CoverageSelection"},ue)),!X&&d(m.Fragment,{children:[N?n(Y3,{license:N,paymentType:Se,onSetPaymentType:ce,"data-cy":"_VerifyCoverageView_PaymentOption"}):!N&&!_&&d(he,{alignItems:"center",css:lT,"data-cy":"_VerifyCoverageView_Flex",children:[n(Wo,{id:"annualTerms",name:"annualTerms",type:"checkbox",checked:z,onClick:()=>Q(!z),"data-cy":"_VerifyCoverageView_Checkbox"}),n($,{align:"left",size:"12",lineHeight:"14",color:"primary",css:sT,"data-cy":"_VerifyCoverageView_Text",children:"I verify this covers my client and distribution needs"})]}),n(ne,{variant:"filled",type:"submit",size:"xl",w:"full",disabled:!N&&!z||!!N&&!Se,onClick:fe,"data-cy":"_VerifyCoverageView_Button",children:"Confirm"})]})]})})})})]})})})},Jo=e=>n(ja,{to:[cn,ur],"data-cy":"_VerifyCoverageView_Subscribe",children:(a,r)=>n(dT,{...e,subscription:e.subscription||a.state.subscription,songs:a.state.songs,setGlobalModal:r.setGlobalModal,closeGlobalModal:r.closeGlobalModal,resetLicenseSong:a.resetLicenseSong,projectId:a.state.projectId,"data-cy":"_VerifyCoverageView_VerifyCoverage"})});var uT={name:"bwqgwl",styles:"text-align:center;margin:16px auto 0"},pT={name:"18qpcn2",styles:"margin:20px auto 0;max-width:350px"};const mT=({closeGlobalModal:e,setGlobalModal:a,setLicenseSong:r,subscription:i})=>{const[c,s]=ye.useState(null),[u,h]=ye.useState(null),f=on();Fr(()=>{if(localStorage.getItem("subscription-upgrade-data")){const _=JSON.parse(localStorage.getItem("subscription-upgrade-data"));s(_.songs),h(_.projectId)}return()=>{localStorage.removeItem("subscription-upgrade-data")}});const g=()=>{i&&(c==null?void 0:c.length)>0?(r({subscription:i,songs:c,projectId:u}),a({modalProps:{size:"md"},view:()=>u?n(Lc,{hideBack:!0,"data-cy":"_UpgradeSuccessView_CompleteProjectDetailsView"}):n(Vc,{hideBack:!0,"data-cy":"_UpgradeSuccessView_AddProjectDetailsView"})})):(e(),f(Bt("accountSubscriptions")))};return d("div",{style:{padding:"72px 50px 60px"},"data-cy":"_UpgradeSuccessView_div",children:[d(he,{direction:"column",alignItems:"center",justifyContent:"center","data-cy":"_UpgradeSuccessView_Flex",children:[n(Xe,{name:"checkmarkCircle",width:38,"data-cy":"_UpgradeSuccessView_Icon"}),d(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:uT,"data-cy":"_UpgradeSuccessView_ResponsiveH2",children:["Your subscription has ",n("br",{"data-cy":"_UpgradeSuccessView_br"})," been upgraded successfully"]}),(c==null?void 0:c.length)>0&&n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:pT,"data-cy":"_UpgradeSuccessView_Text",children:"Continue to complete your license"})]}),n("div",{style:{marginTop:65},"data-cy":"_UpgradeSuccessView_div",children:n(Ta,{buttonType:"dark",type:"submit",size:"large",full:!0,fontSize:14,onClick:g,"data-cy":"_UpgradeSuccessView_Button",children:(c==null?void 0:c.length)>0?"Next: Project Details":"View Subscription"})})]})},Nf=e=>n(ja,{to:[ur,cn],"data-cy":"_UpgradeSuccessView_Subscribe",children:(a,r)=>n(mT,{...e,setGlobalModal:a.setGlobalModal,closeGlobalModal:a.closeGlobalModal,setLicenseSong:r.setLicenseSong,"data-cy":"_UpgradeSuccessView_UpgradeSuccessView"})}),hs="paypal",Qi="card",To="saved_card";var hT={name:"bmwqir",styles:"margin:0 0 20px"},fT={name:"1n8z0oz",styles:"margin:10px 0 20px;width:100%"},gT={name:"11u0ymx",styles:"height:45px;margin-top:20px"},yT={name:"11u0ymx",styles:"height:45px;margin-top:20px"},_T={name:"1a2afmv",styles:"margin-left:10px"},xT={name:"fhwcsu",styles:"margin:0 5px 0 10px"},bT={name:"1ab8s7t",styles:"margin:30px 0"},ST={name:"1a2afmv",styles:"margin-left:10px"},wT={name:"1a2afmv",styles:"margin-left:10px"},vT={name:"1ab8s7t",styles:"margin:30px 0"},CT={name:"1a2afmv",styles:"margin-left:10px"},TT={name:"1r0yqr6",styles:"margin-top:10px"};class PT extends ye.Component{constructor(){super(...arguments);et(this,"state",{isAddPONopen:!1,isAddVATNopen:!1,isEinOpen:!1,isAddCouponCodeOpen:!1,terms:!1,annualTerms:this.props.customHash||!1,newCard:{},errorMessage:"",disableSubmit:!1,isCardComplete:!1,selectedCountryRegions:null,recurlyActionTokenId:"",recurlyAccountId:"",recurlyToken:"",payWith:Qi,showSavedCard:!1,address:null});et(this,"handleAddressChange",r=>{const{setFieldValues:i}=this.props;this.setState({address:r}),i({address:this.inputRef.value})});et(this,"handleAddressSelect",async r=>{const{countries:i,setFieldValues:c,fieldValues:s}=this.props;this.inputRef.blur();const u={};
13i.forEach(b=>{u[b.code]=b.id});let h={};const f=await pd(r);f[0]&&f[0].address_components.forEach(b=>{const{short_name:v,long_name:C}=b;b.types.forEach(T=>{h[T]={short_name:v,long_name:C}})});let g=null;h.political&&(g=Object.keys(i).map(b=>i[b]).filter(b=>b.id===u[h.political.short_name])[0].regions),g&&this.setState({selectedCountryRegions:g});let _=null;g&&h.administrative_area_level_1&&h.administrative_area_level_1.long_name&&g.forEach(b=>{b.name.toLowerCase()===h.administrative_area_level_1.long_name.toLowerCase()&&(_=b.id)});const w=`${h.street_number?h.street_number.long_name+" ":""}${h.route?h.route.long_name:""}`;this.setState({address:w}),this.inputRef.value=w,c({country_id:h.political&&u[h.political.short_name]||s.country_id,postal_code:h.postal_code&&h.postal_code.long_name||s.postal_code,region:h.administrative_area_level_1&&h.administrative_area_level_1.long_name||s.region,region_id:_,city:h.locality&&h.locality.long_name||s.city,address:w})});et(this,"componentDidMount",async()=>{const{countryRegions:r}=this.props;this.setState({selectedCountryRegions:r||null})});et(this,"componentDidUpdate",r=>{const{planDetails:i}=this.props,{ein_number_required:c,upgrade_details:s}=i;r.countryRegions!==this.props.countryRegions&&this.setState({selectedCountryRegions:this.props.countryRegions}),this.props.fieldValues.address&&this.inputRef&&this.props.fieldValues.address!==r.fieldValues.address&&(this.inputRef.value=this.props.fieldValues.address),c&&this.state.isEinOpen!==c&&this.setState({isEinOpen:c}),r.planDetails.upgrade_details!==s&&this.setState({payWith:To,showSavedCard:!0,isCardComplete:!0})});et(this,"handleOpenAddPON",()=>{this.setState({isAddPONopen:!0})});et(this,"handleOpenAddVAT",()=>{this.setState({isAddVATNopen:!0})});et(this,"handleOpenAddEIN",()=>{this.setState({isEinOpen:!0})});et(this,"handleOpenAddCoupon",()=>{this.setState({isAddCouponCodeOpen:!0})});et(this,"handleSelectCountry",async r=>{const{onFetchPlanDetails:i,onInputChange:c,countries:s,setFieldValues:u}=this.props,h=r.currentTarget.value;await c(r);const f=Object.keys(s).map(g=>s[g]).filter(g=>parseInt(g.id)===parseInt(h))[0].regions;f&&await u({region:null,region_id:null}),await this.setState({selectedCountryRegions:f}),i()});et(this,"handleSelectRegion",async r=>{const{selectedCountryRegions:i}=this.state,{onFetchPlanDetails:c,onInputChange:s,setFieldValues:u}=this.props;let h=null;i.forEach(f=>{parseInt(f.id)===parseInt(r.target.value)&&(h=f.name)}),await s(r),await u({region:h}),c()});et(this,"isSubmitDisabled",()=>{const{terms:r,annualTerms:i,isCardComplete:c,disableSubmit:s}=this.state,{fieldValues:{address:u,city:h,email:f,first_name:g,last_name:_,postal_code:w,region:b,region_id:v,country_id:C},fieldErrors:T,fieldDirties:I}=this.props,O=this.props.customHash,E=Object.keys(T).filter(z=>T[z]&&!I[z]).length>0,k=!s&&r&&c&&!E&&u&&h&&f&&g&&_&&w&&(b||v)&&C;return O?!k:!(k&&i)});et(this,"handle3DError",r=>{const{setFormState:i}=this.props;i("initial"),this.setState({errorMessage:r.message,disableSubmit:!1,recurlyActionTokenId:null,recurlyToken:null,recurlyAccountId:null})});et(this,"handle3DToken",async({id:r})=>{await this.handleCreateSubscription({recurly_3d_account_id:this.state.recurlyAccountId,recurly_token:this.state.recurlyToken,recurly_3d_result_token:r})});et(this,"getPaymentError",(r,i)=>r.data&&r.data.message?r.data.message:r.data&&r.data.errors&&r.data.errors[i]?r.data.errors[i][0]:r.error&&r.error.message?r.error.message:"Oops, something went wrong. Please double check your payment and/or billing information or contact us for help.");et(this,"handleSubmit",async r=>{r.preventDefault();const{baseFormErrorCallback:i,baseFormSubmissionCallback:c,setFormState:s}=this.props;if(await i({}),!(this.props.formState==="processing"||this.state.disableSubmit)){if(await c(),this.setState({errorMessage:null,disableSubmit:!0}),this.state.payWith===To){await this.handleCreateSubscription().catch(u=>{s("initial"),this.setState({errorMessage:u.data.message,disableSubmit:!1})});return}if(this.state.payWith===hs){this.props.payWithPayPal.start(),this.props.payWithPayPal.on("error",u=>{this.setState({errorMessage:u.message})}),this.props.payWithPayPal.on("cancel",()=>{this.setState({disableSubmit:!1}),s("initial")}),this.props.payWithPayPal.on("token",async({id:u})=>{await this.handleCreateSubscription({recurly_token:u}).catch(h=>{s("initial"),this.setState({errorMessage:h.data.message,disableSubmit:!1})})});return}if(this.props.isRecurlyEnabled){this.setState({errorMessage:null}),this.props.recurly.token(this.props.recurlyFormRef.current,async(u,h)=>
13{if(u){this.setState({errorMessage:u.message,disableSubmit:!1}),s("initial");return}await this.handleCreateSubscription({recurly_token:h.id}).catch(f=>{if(f.data.errors.recurly_token)this.setState({recurlyActionTokenId:f.data.errors.recurly_token[0].action_token_id,recurlyToken:h.id,recurlyAccountId:f.data.errors.recurly_token[0].account_id});else if(Array.isArray(f.data.errors)){let g=this.getPaymentError(f);this.setState({errorMessage:typeof g=="string"?g:g.message,disableSubmit:!1}),s("initial")}else i(f.data.errors),s("initial")})});return}}});et(this,"handleCreateSubscription",async(r,i)=>{const{payWIth:c}=this.state,{customHash:s,fieldValues:u,onSetUser:h,paymentInterval:f,planDetails:g,couponErrors:_,isSubscriptionUpgrade:w,upgradeSubscriptionId:b,setGlobalModal:v,referralCode:C,standard_license:T}=this.props,I=await grecaptcha.execute("6Lf4n8cUAAAAAM7xaiXqhtsU4gE1gsMnq1kTP4wu",{action:"subscriptionPaymentForm"});let O={};window.mbsy_campaign_uid&&window.mbsy_short_code&&(O={campaign_uid:window.mbsy_campaign_uid,short_code:window.mbsy_short_code});const D=g.referral_code_errors?null:C;let A,E={standard_license:T,terms:s&&this.state.terms||!s&&this.state.terms&&this.state.annualTerms,email:u.email,country_id:u.country_id,postal_code:u.postal_code,region:u.region_id?null:u.region,region_id:u.region_id,city:u.city,address:u.address,ein_number:u.ein_number,name:this.props.isRecurlyEnabled?`${u.first_name} ${u.last_name}`:u.name,payment_interval:f,vat_number:s?g.subscription_plan_quote.billing_details.vat_number:u.vat_number,purchase_order:u.purchase_order,organization_name:u.organization_name,organization_url:u.organization_url,license_ids:this.props.license_ids,custom_hash:s,source:this.props.source,referral:O,coupon_code:_?"":u.coupon_code,referral_code:D,"g-recaptcha-response":I,...c!==To&&r};w?A=await $4(b,E):A=await Z4(E,i);const R=new b0,k=new Date;await R.set("musicbed.referralCode",null,{expires:k,path:"/"}),await R.set("musicbed.referralCode.social",null,{expires:k,path:"/"});const z=await m4();h(z);const Q=s&&g.price_per_interval,N=s&&g.subscription_plan_quote.total_price,W=g.due_today&&g.due_today,Y=W&&g.due_today[f],oe=W&&(f==="month"?g.due_today[f]*12:g.due_today[f]),Se=W&&(f==="month"?g.vat[f]*12:g.vat[f]);window.dataLayer.push({event:"checkoutCompleteSubscription",membershipType:s?"custom":A.plan.type,membershipPaymentInterval:f,membershipCartValue:s?Q:Y,membershipContractValue:s?N:oe}),Ov({transaction_id:A.id.toString(),value:Y,tax:Se,coupon:u.coupon_code,purchase_type:"subscription",payment_interval:f==="month"?"monthly":"annually",custom:!!s}),w?(v({isOpen:!0,view:()=>n(Nf,{subscription:A,"data-cy":"_SubscriptionCartBillingForm_UpgradeSuccessView"})}),Ar(`${Bt("projects")}`)):s?Ar(`${Bt("subscriptionCartSuccess")}?customSubscription=${s}`):Ar(`${Bt("subscriptionCartSuccess")}?subscriptionId=${A.id}`)})}UNSAFE_componentWillReceiveProps(r){const{purchase_order:i,vat_number:c,ein_number:s}=r.fieldValues;this.setState({isAddPONopen:!!i,isAddVATNopen:!!c,isEinOpen:!!s})}render(){var Y,oe,Se;const{isAddPONopen:r,isAddVATNopen:i,isEinOpen:c,isAddCouponCodeOpen:s,terms:u,annualTerms:h,errorMessage:f,selectedCountryRegions:g,showSavedCard:_}=this.state,{fieldDirties:w,fieldErrors:b,fieldValues:v,onInputChange:C,planDetails:T,paymentInterval:I,couponErrors:O,onAddCouponCode:D,countries:A,onFetchPlanDetails:E,formState:R,injectThreeDSecureAction:k,isSubscriptionUpgrade:z}=this.props,Q=this.props.customHash,N=T.organisation_fields_required!==void 0&&T.organisation_fields_required;let W;if(z&&((oe=(Y=T.upgrade_details)==null?void 0:Y.card)!=null&&oe.brand)){const ce=(Se=T.upgrade_details)==null?void 0:Se.card,we=new Date,le=new Date(ce.exp_year,parseInt(ce.exp_month)-1),K=we>=le;W={label:ce.last4?`${ce.brand.toUpperCase()} ending in ${ce.last4}`:"Linked to Paypal account",brand:ce.brand||"paypal",expiration_month:ce.exp_month,expiration_year:ce.exp_year,is_expired:K}}return d("form",{onSubmit:this.handleSubmit,ref:this.props.recurlyFormRef,"data-cy":"_SubscriptionCartBillingForm_form",children:[this.state.recurlyActionTokenId&&k(this.state.recurlyActionTokenId,this.handle3DToken,this.handle3DError),n(Ya,{breakpoint:"820",max:"26",min:"20",style:{marginBottom:5},"data-cy":"_SubscriptionCartBillingForm_ResponsiveH2",children:"1. Add Billing Info"}),n($,{size:"12",color:"dark",style:{marginBottom:20},"data-cy":"_SubscriptionCartBillingForm_Text",children:"Please fill out the form below to add your billing information."}),n(Fm,{"data-cy":"_SubscriptionCartBillingForm_CartFormSectionWrapper",children:n(he,{direction:"column","data-cy":"_SubscriptionCartBillingForm_Flex",children:n(f4,{tag:"div",queries:{fullWidth:{minWidth:368}},"data-cy":"_SubscriptionCartBillingForm_Container",children:({matches:ce})=>{var we,le,K,se,ae;return d(m.Fragment,{children:[d(he,{css:ca({width:"100%",flexDirection:ce.fullWidth?"row":"column"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[this.props.isRecurlyEnabled?d(ye.Fragment,{children:[n("div",{style:{width:ce.fullWidth?"50%":"100%"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.first_name,error:b.first_name,isDirty:!0,label:"First Name *",name:"first_name",dataRecurly:"first_name",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),n("div",{style:{width:ce.fullWidth?"50%":"100%",marginLeft:ce.fullWidth?8:0},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.last_name,error:b.last_name,isDirty:!0,label:"Last Name *",name:"last_name",dataRecurly:"last_name",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})})]}):n("div",{style:{width:ce.fullWidth?"50%":"100%"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.name,error:b.name,isDirty:!0,label:"Full Name *",name:"name",dataRecurly:"first_name",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),!this.props.isRecurlyEnabled&&n("div",{style:{width:ce.fullWidth?"50%":"100%",marginLeft:ce.fullWidth?8:0},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.email,error:b.email,isDirty:!0,label:"Email *",
13name:"email",dataRecurly:"email",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})})]}),this.props.isRecurlyEnabled&&n("div",{"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.email,error:b.email,isDirty:!0,label:"Email *",name:"email",dataRecurly:"email",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),n("div",{"data-cy":"_SubscriptionCartBillingForm_div",children:((we=window.google)==null?void 0:we.maps)&&n(md,{debounce:300,value:this.state.address,onChange:this.handleAddressChange,onSelect:this.handleAddressSelect,searchOptions:{types:["address"]},"data-cy":"_SubscriptionCartBillingForm_PlacesAutocomplete",children:({getInputProps:q,suggestions:xe,getSuggestionItemProps:Ce})=>d("div",{"data-cy":"_SubscriptionCartBillingForm_div",children:[n(Ht,{defaultValue:v.address,error:b.address,isDirty:!0,label:"Billing Address *",name:"address",dataRecurly:"address1",onChange:C,placeholderText:"",type:"text",forwardRef:ge=>this.inputRef=ge,...q({className:"location-search-input"}),"data-cy":"_SubscriptionCartBillingForm_Input"}),n(Lv,{show:xe.length>0,className:"autocomplete-dropdown-container","data-cy":"_SubscriptionCartBillingForm_SuggestionContainer",children:xe.map((ge,Be)=>{const ie=ge.active?"suggestion-item--active":"suggestion-item";return n(Vv,{active:ge.active,...Ce(ge,{className:ie}),"data-cy":"_SubscriptionCartBillingForm_Suggestion",children:ge.description},Be)})})]})})}),d(he,{css:ca({width:"100%",flexDirection:ce.fullWidth?"row":"column"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n("div",{style:{width:ce.fullWidth?"50%":"100%"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.city,error:b.city,isDirty:!0,label:"City *",name:"city",dataRecurly:"city",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),n("div",{style:{width:ce.fullWidth?"50%":"100%",marginLeft:ce.fullWidth?8:0},"data-cy":"_SubscriptionCartBillingForm_div",children:g?n(Wm,{classes:{w100:!0},defaultValue:v.region_id,error:b.region_id,isDirty:!0,label:"Region *",dataRecurly:"state",name:"region_id",onChange:this.handleSelectRegion,"data-cy":"_SubscriptionCartBillingForm_Select",children:Object.keys(g).map(q=>n("option",{value:g[q].id,"data-cy":"_SubscriptionCartBillingForm_option",children:g[q].name},q))}):n(Ht,{defaultValue:v.region,error:b.region,isDirty:!0,label:"State/Region *",name:"region",dataRecurly:"state",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})})]}),d(he,{css:ca({width:"100%",flexDirection:ce.fullWidth?"row":"column"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n("div",{style:{width:ce.fullWidth?"50%":"100%"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.postal_code,error:b.postal_code,isDirty:!0,label:"Zip/Postal Code *",name:"postal_code",dataRecurly:"postal_code",onChange:C,placeholderText:"",type:"text",value:v.postal_code,"data-cy":"_SubscriptionCartBillingForm_Input"})}),n("div",{style:{width:ce.fullWidth?"50%":"100%",marginLeft:ce.fullWidth?8:0},"data-cy":"_SubscriptionCartBillingForm_div",children:A&&d(ye.Fragment,{children:[n(Wm,{classes:{w100:!0},defaultValue:v.country_id,error:b.country_id,isDirty:!0,label:"Country *",name:"country_id",onChange:this.handleSelectCountry,"data-cy":"_SubscriptionCartBillingForm_Select",children:Object.keys(A).map(q=>n("option",{value:A[q].id,"data-cy":"_SubscriptionCartBillingForm_option",children:A[q].name},q))}),n("input",{type:"hidden",name:"recurly-country","data-recurly":"country",value:Object.keys(A).length&&A.find(q=>Number(q.id)===Number(v.country_id))&&A.find(q=>Number(q.id)===Number(v.country_id)).code,"data-cy":"_SubscriptionCartBillingForm_input"})]})})]}),N&&d(he,{css:ca({width:"100%",flexDirection:ce.fullWidth?"row":"column"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n("div",{style:{width:ce.fullWidth?"50%":"100%"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.organization_name,error:b.organization_name,isDirty:!0,label:"Organization Name",name:"organization_name",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),n("div",{style:{width:ce.fullWidth?"50%":"100%",marginLeft:ce.fullWidth?8:0},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.organization_url,error:b.organization_url,isDirty:!0,label:"Organization Url",name:"organization_url",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})})]}),n($,{size:12,color:"dark",css:hT,"data-cy":"_SubscriptionCartBillingForm_Text",children:"* Denotes Required Field"}),n(aa,{color:"dividerColor",css:fT,"data-cy":"_SubscriptionCartBillingForm_Hr"}),n(wo,{style:{width:"100%",paddingBottom:r?0:8},onClick:this.handleOpenAddPON,size:"12",color:"primary",textAlign:"left","data-cy":"_SubscriptionCartBillingForm_LinkText",children:r?"Purchase Order Number":"Add Purchase Order Number +"}),r&&n("div",{style:{width:"100%",marginTop:-10},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.purchase_order,error:b.purchase_order,isDirty:!0,name:"purchase_order",onChange:C,type:"text",placeholderText:"","data-cy":"_SubscriptionCartBillingForm_Input"})}),!i&&!Q&&n(wo,{style:{width:"100%",paddingBottom:8},onClick:this.handleOpenAddVAT,size:"12",color:"primary",textAlign:"left","data-cy":"_SubscriptionCartBillingForm_LinkText",children:"Add VAT Number +"}),i&&d(m.Fragment,{children:[n($,{size:"12",lineHeight:"12",weight:"600",color:"primary","data-cy":"_SubscriptionCartBillingForm_Text",children:"Add VAT Number"}),d(he,{alignItems:"start",css:ca({margin:0,marginTop:-10,width:"100%"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n("div",{style:{width:"100%",marginRight:8},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.vat_number,error:b.vat_number,isDirty:w.vat_number,name:"vat_number",onChange:C,placeholderText:"",type:"text",dataRecurly:"vat_number","data-cy":"_SubscriptionCartBillingForm_Input"})}),n(Ta,{buttonType:"dark",css:gT,onClick:()=>E(),size:"medium",type:"button",uppercase:!0,"data-cy":"_SubscriptionCartBillingForm_Button",children:"Apply"})]})]}),!c&&!Q&&/non_profit/.test(this.props.planId)&&n(wo,{style:{width:"100%",paddingBottom:8},onClick:this.handleOpenAddEIN,size:"12",color:"primary",textAlign:"left","data-cy":"_SubscriptionCartBillingForm_LinkText",children:"Add EIN Number +"}),c&&d(m.Fragment,{children:[n($,{size:"12",lineHeight:"12",weight:"600",color:"primary","data-cy":"_SubscriptionCartBillingForm_Text",children:"Add EIN Number"}),n(he,{alignItems:"start",css:ca({margin:0,marginTop:-10,width:"100%"},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:n("div",{style:{width:"100%",marginRight:8},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.ein_number,error:b.ein_number,isDirty:w.ein_number,name:"ein_number",onChange:C,placeholderText:"",type:"text",dataRecurly:"ein_number","data-cy":"_SubscriptionCartBillingForm_Input"})})})]}),!Q&&d(m.Fragment,{children:[!s&&((le=T.coupon_discount)==null?void 0:le.length)===0&&!((K=T==null?void 0:T.upgrade_details)!=null&&K.referral_credits_coupon_code)&&n(wo,{style:{width:"100%",paddingBottom:8},onClick:this.handleOpenAddCoupon,size:"12",color:"primary",textAlign:"left","data-cy":"_SubscriptionCartBillingForm_LinkText",children:"Have a coupon code? +"}
13),s&&((se=T.coupon_discount)==null?void 0:se.length)===0&&!((ae=T==null?void 0:T.upgrade_details)!=null&&ae.referral_credits_coupon_code)&&d(m.Fragment,{children:[n($,{size:"12",weight:"600",color:"primary","data-cy":"_SubscriptionCartBillingForm_Text",children:"Add Coupon Code"}),d(he,{alignItems:"start",css:ca({width:"100%",marginTop:-10},""),"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n("div",{style:{width:"100%",marginRight:8},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Ht,{defaultValue:v.coupon_code,inputType:"Search",label:"Enter Coupon Code",name:"coupon_code",dataRecurly:"coupon",onChange:C,placeholderText:"",type:"text","data-cy":"_SubscriptionCartBillingForm_Input"})}),n(Ta,{type:"button",buttonType:"dark",css:yT,onClick:()=>D(),size:"medium",uppercase:!0,"data-cy":"_SubscriptionCartBillingForm_Button",children:"Add Coupon"})]}),O&&n($,{size:"14",color:"danger","data-cy":"_SubscriptionCartBillingForm_Text",children:O[Object.keys(O)[0]]})]})]})]})}})})}),n(Ya,{breakpoint:"820",max:"26",min:"20",style:{marginBottom:5},"data-cy":"_SubscriptionCartBillingForm_ResponsiveH2",children:"2. Add Payment Method"}),n($,{size:"12",color:"dark",style:{marginBottom:20},"data-cy":"_SubscriptionCartBillingForm_Text",children:"Please fill out the form below to add your card information."}),d(Fm,{"data-cy":"_SubscriptionCartBillingForm_CartFormSectionWrapper",children:[this.props.isRecurlyEnabled&&d(Em,{onClick:()=>this.setState({payWith:_?To:Qi}),"data-cy":"_SubscriptionCartBillingForm_BorderWrapper",children:[d(he,{alignItems:"center","data-cy":"_SubscriptionCartBillingForm_Flex",children:[n(Ms,{id:"add-new-card",name:"payment_method",type:"radio",checked:this.state.payWith===(_?To:Qi),"data-cy":"_SubscriptionCartBillingForm_RadioButton"}),n($,{size:"14",weight:"700",color:"primary",css:_T,"data-cy":"_SubscriptionCartBillingForm_Text",children:_?"Credit Card":"Use a new card"})]}),_&&W?n("div",{style:{marginTop:20},"data-cy":"_SubscriptionCartBillingForm_div",children:n(m0,{width:"100%",paymentMethod:W,paymentType:"subscription",onChangePayment:()=>{this.setState({showSavedCard:!1,isCardComplete:!1}),setTimeout(()=>{this.setState({payWith:Qi})},200)},"data-cy":"_SubscriptionCartBillingForm_PaymentCard"})}):n("div",{style:{marginTop:20,maxHeight:50,overflow:"hidden"},"data-cy":"_SubscriptionCartBillingForm_div",children:n(Mc.CardElement,{onChange:ce=>{this.setState({isCardComplete:ce.valid})},"data-cy":"_SubscriptionCartBillingForm_CardElement"})})]}),this.props.isRecurlyEnabled&&n(Em,{onClick:()=>{this.setState({isCardComplete:!0,payWith:hs})},"data-cy":"_SubscriptionCartBillingForm_BorderWrapper",children:d(he,{alignItems:"center","data-cy":"_SubscriptionCartBillingForm_Flex",children:[n(Ms,{id:"paypal",name:"payment_method",type:"radio",checked:this.state.payWith===hs,"data-cy":"_SubscriptionCartBillingForm_RadioButton"}),n($,{size:"14",weight:"700",color:"primary",css:xT,"data-cy":"_SubscriptionCartBillingForm_Text",children:"Pay with"}),n("img",{src:"https://cdn.musicbed.com/image/upload/static/account/paypalLogo.svg",style:{marginLeft:4},alt:"PayPal Logo","data-cy":"_SubscriptionCartBillingForm_img"})]})})]}),d(Bv,{"data-cy":"_SubscriptionCartBillingForm_ActionsWrapper",children:[d(he,{css:bT,"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n(Wo,{id:"terms",name:"terms",type:"checkbox",checked:u,onClick:()=>this.setState({terms:!this.state.terms}),"data-cy":"_SubscriptionCartBillingForm_Checkbox"}),Q?d($,{size:"14",lineHeight:"20",color:"dark",css:ST,"data-cy":"_SubscriptionCartBillingForm_Text",children:["I have the authority to make this commitment on behalf of my organization, and I have read and agree to the"," ",n(ic,{to:Bt("termsAndConditions"),size:"11",lineHeight:"20",color:"primary","data-cy":"_SubscriptionCartBillingForm_NavLink",children:"Subscription Terms"}),"."]}):d($,{size:"14",lineHeight:"20",color:"primary",css:wT,"data-cy":"_SubscriptionCartBillingForm_Text",children:[I==="no-contract"?"I have read and acknowledge this subscription lasts 1 month ":"I have read and acknowledge that subscription plans last 12 months ","and automatically renew unless cancelled. I agree to the"," ",n(ic,{to:Bt("termsAndConditions")+"?view=subscription",target:"_blank",size:"14",lineHeight:"20",color:"teal","data-cy":"_SubscriptionCartBillingForm_NavLink",children:"Subscription Terms"}),"."]})]}),!Q&&d(he,{css:vT,"data-cy":"_SubscriptionCartBillingForm_Flex",children:[n(Wo,{id:"annualTerms",name:"annualTerms",type:"checkbox",checked:h,onClick:()=>this.setState({annualTerms:!this.state.annualTerms}),"data-cy":"_SubscriptionCartBillingForm_Checkbox"}),d($,{size:"14",lineHeight:"20",color:"primary",css:CT,"data-cy":"_SubscriptionCartBillingForm_Text",children:["I have read and acknowledge the ",I==="no-contract"?" ":"Annual ","Subscription Auto-Renewal Policy and Cancellation Policy"," ",n(ic,{to:Bt("termsAndConditions")+"?view=subscription",target:"_blank",size:"14",lineHeight:"20",color:"teal","data-cy":"_SubscriptionCartBillingForm_NavLink",children:"Subscription Terms"}),"."]})]}),f&&n($,{size:"14",lineHeight:"15px",color:"danger",css:TT,"data-cy":"_SubscriptionCartBillingForm_Text",children:f}),n(Ta,{size:"large",full:!0,isDisabled:this.isSubmitDisabled(),buttonType:T.trial_applied?"teal":"dark",uppercase:!0,onClick:this.handleSubmit,type:"submit",style:{margin:"20px 0"},"data-cy":"_SubscriptionCartBillingForm_Button",children:R==="processing"?d(m.Fragment,{children:[n(Dv,{"data-cy":"_SubscriptionCartBillingForm_Spinner"}),"Processing..."]}):T.trial_applied?"Start Free Trial":"Pay Now"}),n(wo,{style:{width:"100%",paddingBottom:60,textAlign:"center"},size:"12",color:"dark",onClick:()=>Ar(`${Bt("pricing")}`),"data-cy":"_SubscriptionCartBillingForm_LinkText",children:"CANCEL"}),R==="processing"&&d(m.Fragment,{children:[n("div",{style:{position:"fixed",top:0,right:0,left:0,bottom:0,background:"rgba(255,255,255,0.45)"},"data-cy":"_SubscriptionCartBillingForm_div"}),n(ZC,{"data-cy":"_SubscriptionCartBillingForm_Scrolllock"})]})]})]})}}const kT=_e("div",{target:"eyfehmw8"})("display:flex;justify-content:flex-start;flex-direction:column;overflow-y:auto;padding:0 30px 30px;",({theme:e,isPlayerOpen:a})=>({[e.media.lg]:{justifyContent:"space-between",flexDirection:"row"},maxHeight:a?"calc(100vh - 127px)":"100vh"})),IT=_e("div",{target:"eyfehmw7"})("display:flex;flex-shrink:0;width:100%;justify-content:flex-start;padding:34px 0 40px;position:relative;",({theme:e})=>({[e.media.lg]:{position:"sticky",top:0,width:"50%",justifyContent:"flex-end",padding:"94px 50px 0 0"}})),Gm=_e("div",{target:"eyfehmw6"})("width:100%;padding:0 0 30px;",({theme:e})=>({[e.media.lg]:{width:"50%",justifyContent:"flex-end",padding:"91px 0 0 50px"}})),MT={sm:{minWidth:320},md:{minWidth:570},lg:{minWidth:820},xlg:{minWidth:1040}},Ym=()=>{var e,a;return(e=Za.parse(window.location.search).planId)!=null&&e.includes("n_personal")||(a=Za.parse(window.location.search).planId)!=null&&a.includes("n_individual")?"year":Za.parse(window.location.search).paymentInterval||"month"};var AT={name:"zxhizw",styles:"background:#EDF2F5"};class FT extends ye.Component{constructor(){super(...arguments);et(this,"state",{view:"billingInfo",errors:null,guestView:this.props.guestView,planDetails:{},standard_license:"",paymentInterval:Ym(),source:Za.parse(window.location.search).source,referralCode:Za.parse(window.location.search).referral_code,countries:{},countryRegions:null,recurlyPlanDetailsFetched:!1,upgradeSubscriptionId:null});et(this,"componentDidMount",async()=>{await this.handlefetchCountriesWithRegions(),this.setDefaultFieldValues(),this.setState({upgradeSubscriptionId:Z
13a.parse(window.location.search).subscriptionId})});et(this,"setDefaultFieldValues",async()=>{const{setFieldValues:r}=this.props,{countries:i}=this.state,c=this.props.computedMatch.params.hash,s=f=>J4(f)?Object.keys(i).map(g=>i[g]).filter(g=>g.code===f):Object.keys(i).map(g=>i[g]).filter(g=>g.id===251),u=zm(this.props.user,"country")?s(this.props.user.country):s();let h=null;u[0]&&u[0].regions&&(await this.setState({countryRegions:u[0].regions}),this.props.user.region&&u[0].regions.map(f=>(this.props.user.region.toLowerCase()===f.name.toLowerCase()&&(h=f),null))),await r({first_name:this.props.user.first_name,last_name:this.props.user.last_name,email:this.props.user.email,address:this.props.user.address,city:this.props.user.city,region_id:h?h.id:null,region:h?h.name:this.props.user.region||null,country_id:u[0]?u[0].id:251,postal_code:this.props.user.postal_code,source:this.state.source,address_country:this.props.user.country?this.props.user.country:"US",ein_number:Za.parse(window.location.search).ein}),c?this.handleFetchCustomPlanDetails(c):this.handleFetchPlanDetails()});et(this,"componentDidUpdate",async(r,i)=>{r.user!==this.props.user&&this.setDefaultFieldValues();const c=Ym();i.paymentInterval!==c&&(this.handleFetchPlanDetails(),this.setState({paymentInterval:c}))});et(this,"buildQueryString",({paymentInterval:r=this.state.paymentInterval,source:i=this.state.source,referralCode:c=this.state.referralCode,ein:s=this.state.ein})=>(this.setState({paymentInterval:r,source:i,referralCode:c,ein:s},()=>this.handleFetchPlanDetails()),Za.stringify({paymentInterval:r,source:i,referralCode:c,ein:s})));et(this,"handlefetchCountriesWithRegions",async()=>{const r=await eC();this.setState({countries:r})});et(this,"handleSwitchGuestView",r=>{this.setState({guestView:r})});et(this,"handleFetchPlanDetails",async()=>{const{referralCode:r}=this.state,{fieldValues:i,baseFormErrorCallback:c,isRecurlyEnabled:s}=this.props,u=this.props.computedMatch.params.hash;if(u)this.handleFetchCustomPlanDetails(u);else try{this.setState({recurlyPlanDetailsFetched:!1});const h=localStorage.getItem("mb-pricing-standard-license"),f=JSON.parse(h),g=Za.parse(window.location.search).subscriptionId,{upgrade_details:_,...w}=await V6({standard_license:f,coupon_code:i.coupon_code,country_id:i.country_id,region_id:i.region_id,vat_number:i.vat_number,ein_number:i.ein_number,referral_code:r,...g&&{upgrade_from_subscription_id:g}});s&&(await this.props.postDetailsRecurly({params:{payment_interval:this.state.paymentInterval,coupon_code:i.coupon_code,ein_number:i.ein_number,referral_code:r,standard_license:f,...(_==null?void 0:_.referral_credits_coupon_code)&&{recurly_coupon_code:_==null?void 0:_.referral_credits_coupon_code}},vat_number:i.vat_number,planDetails:{...w,upgrade_details:_}}),this.setState({recurlyPlanDetailsFetched:!0})),w.errors&&w.errors.vat_number&&c({vat_number:w.errors.vat_number[0]}),this.setState({standard_license:f,planDetails:{...w==null?void 0:w.data,upgrade_details:_}})}catch(h){console.log(h)}});et(this,"handleAddCouponCode",async()=>{try{this.handleFetchPlanDetails()}catch(r){console.log(r)}});et(this,"handleRemoveCouponCode",async()=>{const{setFieldValues:r}=this.props;await r({coupon_code:null}),this.handleFetchPlanDetails()});et(this,"handleSetPaymentInterval",r=>{const i=Za.stringify({paymentInterval:r,source:this.state.source,...this.state.upgradeSubscriptionId&&{subscriptionId:this.state.upgradeSubscriptionId}}),c=`${Bt("subscriptionCart")}?${i}`;Ar(c)})}async handleFetchCustomPlanDetails(r){const i=await G4(r);this.props.isRecurlyEnabled&&await this.props.postDetailsRecurly({params:{custom_hash:r},vat_number:this.props.fieldValues.vat_number,planDetails:i}),this.setState({planDetails:i})}render(){const{isLoggedIn:r,isPlayerOpen:i,onSetUser:c,setGlobalModal:s}=this.props,{view:u,errors:h,guestView:f,source:g,planDetails:_,paymentInterval:w,countries:b,countryRegions:v,standard_license:C,recurlyPlanDetailsFetched:T,upgradeSubscriptionId:I,referralCode:O}=this.state,D=this.props.computedMatch.params.hash;return zm(this.props.computedMatch.params,"hash"),n(w0,{...this.props,footer:!1,css:AT,"data-cy":"_SubscriptionCartDeprecatedV1_Layout",children:n($o,{queries:MT,"data-cy":"_SubscriptionCartDeprecatedV1_Media",children:({resolve:A})=>{var E;return n(p0,{"data-cy":"_SubscriptionCartDeprecatedV1_BlockUiWrapper",children:n(ud,{tag:"div",blocking:u==="processing",loader:n("div",{"data-cy":"_SubscriptionCartDeprecatedV1_div"}),"data-cy":"_SubscriptionCartDeprecatedV1_BlockUi",children:d(kT,{isPlayerOpen:i,children:[n(IT,{children:n(tf,{css:ca({display:"flex",flexDirection:"column",padding:25,width:"100%",maxWidth:A({sm:"100%",lg:400}),alignSelf:"flex-start"},""),"data-cy":"_SubscriptionCartDeprecatedV1_Square",children:n(HT,{planDetails:{...this.state.planDetails,subscription:this.props.recurlyPrice},isRecurlyEnabled:this.props.isRecurlyEnabled,"data-cy":"_SubscriptionCartDeprecatedV1_CustomSubscriptionDetail
13sBlock"})})}),r?n(Gm,{children:n(PT,{...this.props,isSubscriptionUpgrade:!!I,upgradeSubscriptionId:I,source:g,standard_license:C,customHash:D,paymentInterval:w,onSetUser:c,planDetails:{..._,subscription:this.props.recurlyPrice},onAddCouponCode:this.handleAddCouponCode,couponErrors:((E=_==null?void 0:_.errors)==null?void 0:E.coupon)||[],onFetchPlanDetails:this.handleFetchPlanDetails,countries:b,countryRegions:v,setGlobalModal:s,referralCode:O,"data-cy":"_SubscriptionCartDeprecatedV1_SubscriptionCartBillingForm"})}):n(Gm,{children:d("div",{style:{width:"100%",maxWidth:A({sm:"100%",lg:400})},"data-cy":"_SubscriptionCartDeprecatedV1_div",children:[h&&n("div",{className:"mv2","data-cy":"_SubscriptionCartDeprecatedV1_div_9",children:L6(h,(R,k)=>n("div",{className:"Alert Alert--danger mb2","data-cy":"_SubscriptionCartDeprecatedV1_div_10",children:R},k))}),f==="register"&&n(sd,{onSuccess:this.handleClose,onSwitchView:this.handleSwitchGuestView,"data-cy":"_SubscriptionCartDeprecatedV1_RegisterView"}),f==="login"&&n(dd,{onSwitchView:this.handleSwitchGuestView,onSuccess:()=>window.location.reload(),"data-cy":"_SubscriptionCartDeprecatedV1_LoginView"}),f==="success"&&n(Cd,{title:"Thanks for creating an account!",text:"Please check your email to complete the process and access full length preguestViews.",buttonText:"Ok, I'll check my email",onButtonClick:this.handleClose,iconColor:"primary","data-cy":"_SubscriptionCartDeprecatedV1_SuccessView"})]})})]})})})}})})}}var ET={name:"1d3w5wq",styles:"width:100%"},RT={name:"1d3w5wq",styles:"width:100%"},OT={name:"1d3w5wq",styles:"width:100%"},LT={name:"uy4qy4",styles:"width:100%;margin:20px 0"},VT={name:"1d3w5wq",styles:"width:100%"},BT={name:"1d3w5wq",styles:"width:100%"}
13,DT={name:"uy4qy4",styles:"width:100%;margin:20px 0"},jT={name:"1d3w5wq",styles:"width:100%"},zT={name:"1gammwy",styles:"margin-top:5px"},WT={name:"2bhlo8",styles:"margin-right:2px"},NT={name:"1a5i5l0",styles:"padding-left:3px;margin-top:3px"},UT={name:"1kfc69n",styles:"margin-top:20px;width:100%"},qT={name:"s25mvc",styles:"text-align:center;font-style:italic"};const HT=({planDetails:e})=>{var r;const a=(r=e.due_today)==null?void 0:r.split(".");return d(m.Fragment,{children:[n(he,{justifyContent:"space-between",css:ET,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:n(GC,{breakpoint:"820",max:"26",min:"20",style:{maxWidth:200,marginBottom:30},"data-cy":"_SubscriptionCartDeprecatedV1_ResponsiveH1",children:"Your Subscription"})}),(e==null?void 0:e.subscription_plan_quote)&&d(he,{justifyContent:"space-between",css:RT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[n($,{size:"18",lineHeight:"18",color:"primary",weight:"400","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:e.subscription_plan_quote.quote_name}),n($,{size:"16",lineHeight:"16",color:"primary",weight:"700","data-cy":"_SubscriptionCartDeprecatedV1_Text_18",children:`$${e.price_per_interval}`})]}),d(he,{justifyContent:"space-between",css:OT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[(e==null?void 0:e.subscription_plan_quote)&&n($,{size:"12",lineHeight:"20",color:"dark",weight:"400","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:e.subscription_plan_quote.membership_term_count?`${e.subscription_plan_quote.membership_term_count} ${e.subscription_plan_quote.membership_term_interval} plan`:""}),(e==null?void 0:e.formatted_payment_interval)&&n($,{size:"12",lineHeight:"20",color:"dark",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text_21",children:e.formatted_payment_interval})]}),n(aa,{color:"dividerColor",css:LT,"data-cy":"_SubscriptionCartDeprecatedV1_Hr"}),d(he,{justifyContent:"space-between",css:VT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[n($,{size:"12",lineHeight:"20",color:"primary",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:"Subtotal:"}),(e==null?void 0:e.price_per_interval)&&d($,{size:"12",lineHeight:"20",color:"primary",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text_25",children:["$",e.price_per_interval]})]}),(e==null?void 0:e.vat)!=="0.00"&&d(he,{justifyContent:"space-between",css:BT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[n($,{size:"12",lineHeight:"20",color:"primary",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:"Tax:"}),d($,{size:"12",lineHeight:"20",color:"primary",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text_28",children:["$",e.vat]})]}),n(aa,{color:"dividerColor",css:DT,"data-cy":"_SubscriptionCartDeprecatedV1_Hr"}),d(he,{justifyContent:"space-between",css:jT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[n($,{size:"12",lineHeight:"20",color:"primary",weight:"600","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:"Total Due Today:"}),(e==null?void 0:e.due_today)&&d(he,{css:zT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:[n($,{weight:"600",color:"primary",size:"12",lineHeight:"12",css:WT,"data-cy":"_SubscriptionCartDeprecatedV1_Text",children:"$"}),n($,{weight:"600",color:"primary",size:"42",lineHeight:"31","data-cy":"_SubscriptionCartDeprecatedV1_Text_34",children:(a==null?void 0:a[0])||""}),n(he,{direction:"column",css:NT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:n($,{weight:"600",color:"primary",size:"12",lineHeight:"14","data-cy":"_SubscriptionCartDeprecatedV1_Text",children:a!=null&&a[1]?`.${a[1]}`:""})})]})]}),(e==null?void 0:e.payment_interval)&&n(he,{justifyContent:"center",css:UT,"data-cy":"_SubscriptionCartDeprecatedV1_Flex",children:d($,{size:"12",lineHeight:"20",color:"dark",weight:"400",css:qT,"data-cy":"_SubscriptionCartDeprecatedV1_Text",children:["Your rate is based on a"," ",e.subscription_plan_quote.membership_term_count?`${e.subscription_plan_quote.membership_term_count} ${e.subscription_plan_quote.membership_term_interval}`:""," ","agreement and will be charged to your card every"," ",n(Oo,{size:"12",weight:"400",lineHeight:"24",color:"dark","data-cy":"_SubscriptionCartDeprecatedV1_Span",children:e.payment_interval})]})})]})},Uf=e=>n(ja,{to:[ur],"data-cy":"_SubscriptionCartDeprecatedV1_Subscribe",children:a=>n(FT,{...e,setGlobalModal:a.setGlobalModal,"data-cy":"_SubscriptionCartDeprecatedV1_SubscriptionCartDeprecatedV1"})});Uf.defaultProps={guestView:"login",inputNames:{terms:null,email:null,country_id:null,postal_code:null,region:null,region_id:null,city:null,address:null,name:null,first_name:null,last_name:null,payment_interval:null,custom_hash:null,vat_number:null,ein_number:null,purchase_order:null,organization_url:null,organization_name:null,referral:null,source:null,coupon_code:null}};const $T=G0(X4(Uf)),Ls={year:{id:1,label:"Annual, Pay in Full",name:"year",value:"year"}
13,month:{id:2,label:"Annual, 12 Installments",name:"month",value:"month"}},ZT=e=>{const{user:{data:a}}=ht(),{matches:r}=Zo();return!!(Qv().hash||"")?n($T,{user:a,...e,"data-cy":"_SubscriptionCart_SubscriptionCartDeprecatedV1"}):n(w0,{footer:!1,style:{position:r.lg?"fixed":"initial"},"data-cy":"_SubscriptionCart_Layout",children:n(I6,{user:a,"data-cy":"_SubscriptionCart_SubscriptionCustom"})})},oO=Object.freeze(Object.defineProperty({__proto__:null,default:ZT,planTypeOptions:Ls},Symbol.toStringTag,{value:"Module"})),Ao=m.forwardRef(({priceKeys:e,onValueChange:a,placeholder:r="Billing Options",displayStyle:i,isMobile:c=!1},s)=>{const u=e.map(h=>({label:Ls[h].label,value:Ls[h].value}));return n(Ka,{ref:s,size:{base:"md",md:"sm"},clearable:!1,items:u,placeholder:r,display:i,flexGrow:"1",maxW:c?"100%":"190px",positioning:c?{sameWidth:!0}:{placement:"bottom-end",sameWidth:!0},onValueChange:({value:h})=>a(h[0]),onClick:h=>h.stopPropagation(),selectItemProps:{p:{base:"16px 8px",md:"8px"}},"data-cy":"_PlanTypeDropdown_FormSelect"})});Ao.displayName="PlanTypeDropdown";const GT={mobile:{maxWidth:569},sm:{minWidth:320},md:{minWidth:570},lg:{minWidth:820}},qf=({user:e,song:a,sizes:r,selectedSize:i,license:c,isTrialAllowed:s,isFreeTrialFlow:u,source:h,selectedOptions:f,onSubscriptionCheckout:g,setCart:_,licenseId:w,showSoundsPricing:b})=>{const v=pt(),C=m.useRef(null),T=m.useRef(null),I=Oa(pe=>pe.setIsSFXAdded),O=Qe("subscription-on-site-modal"),D=Qe(),{trackLicenseBuilderAction:A}=Rr(),[E,R]=m.useState(null),[k,z]=m.useState(null),[Q,N]=m.useState(null),[W,Y]=m.useState(!1),[oe,Se]=m.useState(null),[ce,we]=m.useState(!1),le=(c==null?void 0:c.subscriptions[0].price.month)!==null,K=le?"month":"year",se=({planInterval:pe,includeSounds:de})=>{let Ke;return de?Ke=c==null?void 0:c.subscriptions[0].combined_prices["sound-effects"][pe||K]:Ke=c==null?void 0:c.subscriptions[0].price[pe||K],Ke},ae=({planInterval:pe,includeSounds:de})=>it(se({planInterval:pe,includeSounds:de})||0).dollars(),q=({planInterval:pe,includeSounds:de})=>it(se({planInterval:pe,includeSounds:de})||0).value.toFixed(2).toString().split(".")[1],xe=it((c==null?void 0:c.license.price)||0).dollars(),Ce="."+it((c==null?void 0:c.license.price)||0).value.toFixed(2).toString().split(".")[1],ge=pe=>typeof(c==null?void 0:c.subscriptions[0].discount)=="object"?c==null?void 0:c.subscriptions[0].discount[pe||K]:{discount:"0",sub_total:"0"},Be=pe=>{var de;return parseFloat((de=ge(pe))==null?void 0:de.discount)>0},ie=a?a.membership:!0,J=!c||!E||E==="subscription"&&(!W&&!k||W&&!Q);Fr(()=>{Qr({event:Jr,actionType:"Display Price",optionSelected:i==null?void 0:i.description,loggedIn:e!=null&&e.id?"Logged In":"Logged Out"})});const re=pe=>{Se(null),E!=="subscription"&&A("Purchase Option",{selection:"subscription"}),R("subscription"),Y(pe)},fe=()=>{Se(null),A("Purchase Option",{selection:"single-song"}),R("single-song")},ke=()=>{D.hide(),Ar(Bt("songs"))},$e=(pe,de)=>{A("Billing Term",{selection:pe}),de?N(pe):z(pe),re(de)},X=()=>{const pe=new b0,de=pe.get("musicbed.referralCode.social")||pe.get("musicbed.referralCode.business")||pe.get("musicbed.referralCode");W&&I(!0),O.show({song:a,user:e,license:c,referralCode:de,selectedPlanType:W?Q:k,source:h,onSubscriptionCheckout:Ke=>{g(Ke),O.hide()},isTrialAllowed:s,isFreeTrialFlow:u,selectedOptions:f})},ee=async()=>{var pe;if(!ce)if(A("Proceed to Cart",{cart_type:E}),we(!0),c&&((pe=c==null?void 0:c.subscriptions)==null?void 0:pe.length)>0&&E==="subscription"){c.standard_license&&localStorage.setItem("mb-pricing-standard-license",JSON.stringify(c.standard_license)),X(),Qr({event:Jr,actionType:"Completed",optionSelected:"Subscription",loggedIn:e!=null&&e.id?"Logged In":"Logged Out"});return}else try{const de=await jv({standard_license:w,song_ids:a?[a.id]:null});v.setQueryData([Bm,void 0,void 0],de),_(de),v.invalidateQueries({queryKey:[Bm]}),Qr({event:Jr,actionType:"Completed",optionSelected:"Single Song",loggedIn:e!=null&&e.id?"Logged In":"Logged Out"}),D.hide();const Ke=`${Bt("cart")}`;Ar(Ke)}catch{we(!1)}},ue=s||ge(k)&&Be(k);return n($o,{queries:GT,"data-cy":"_PricingSelection_Media",children:({matches:pe})=>d(ve,{children:[n(S,{textStyle:"heading.16.semi",fontWeight:!r&&!i?700:600,mb:"16px","data-cy":"_PricingSelection_ChakraText",children:a?"Purchase Options":"Subscription Pricing"}),c?d(m.Fragment,{children:[d(Me,{gap:ue?"24px":"12px","data-cy":"_PricingSelection_VStack",children:[ie&&d(ve,{children:[d(ds,{id:"subscription",onClick:()=>{var de;k===null&&((de=C==null?void 0:C.current)==null||de.click()),re(!1)},isSelected:E==="subscription"&&!W,error:!!oe,"data-cy":"_PricingSelection_PaymentOption",children:[d(Fe,{justifyContent:"space-between",w:"full",alignItems:"center",pt:{base:"10px",md:"0",lg:"0"},"data-cy":"_PricingSelection_HStack",children:[d(Me,{gap:"4px","data-cy":"_PricingSelection_VStack",children:[n(S,{textStyle:"heading.18.semi","data-cy":"_PricingSelection_ChakraText",children:"Unlimited Songs"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_PricingSelection_ChakraText_7",children:"Annual Subscription"})]}),d(Fe,{alignItems:"flex-end",minW:"30%",flexGrow:"1",flexFlow:"row-reverse",justifyContent:"end",gap:"20px","data-cy":"_PricingSelection_HStack",children:[n(Fe,{alignItems:"center","data-cy":"_PricingSelection_HStack_9",children:d(Fe,{alignItems:"center",gap:"2px","data-cy":"_PricingSelection_HStack_10",children:[n(S,{textStyle:"heading.32.reg","data-cy":"_PricingSelection_ChakraText",children:it(ae({planInterval:k}),{separator:",",precision:0,symbol:"$",formatWithSymbol:!0}).format()}
13),d(Me,{alignItems:"start",gap:"0","data-cy":"_PricingSelection_VStack",children:[d(S,{textStyle:"UI.14.reg","data-cy":"_PricingSelection_ChakraText",children:[".",q({planInterval:k})]}),d(S,{textStyle:"UI.14.reg","data-cy":"_PricingSelection_ChakraText_14",children:["/",k||K]})]})]})}),le&&n(Ao,{ref:C,priceKeys:Object.keys(c.subscriptions[0].price),onValueChange:de=>$e(de,!1),displayStyle:pe.md?"block":"none","data-cy":"_PricingSelection_PlanTypeDropdown"})]})]}),le&&pe.sm&&!pe.md?n(me,{w:"full",p:{base:"12px 0px 0px",md:"21px 0px 0px"},"data-cy":"_PricingSelection_Box",children:n(Ao,{ref:C,priceKeys:Object.keys(c.subscriptions[0].price),onValueChange:de=>$e(de,!1),isMobile:!0,"data-cy":"_PricingSelection_PlanTypeDropdown"})}):null,ue&&n(Va,{bg:"background.colored.teal",px:"8px",py:"6px",borderRadius:"2px",position:"absolute",top:"-12px",right:"30px","data-cy":"_PricingSelection_Center",children:n(S,{textStyle:"UI.smallcaps.semi",fontSize:"12",color:"text.primary.onColor","data-cy":"_PricingSelection_ChakraText",children:s?"14 DAY FREE TRIAL":"LIMITED TIME ONLY"})})]}),b&&d(ds,{id:"subscription-sounds",onClick:()=>{var de;Q===null&&((de=T==null?void 0:T.current)==null||de.click()),re(!0)},isSelected:E==="subscription"&&W,error:!!oe,"data-cy":"_PricingSelection_PaymentOption",children:[d(Fe,{justifyContent:"space-between",w:"full",alignItems:"center",pt:{base:"10px",md:"0",lg:"0"},"data-cy":"_PricingSelection_HStack",children:[d(Me,{alignItems:"start",gap:"4px","data-cy":"_PricingSelection_VStack",children:[d(S,{textStyle:"heading.18.semi","data-cy":"_PricingSelection_ChakraText",children:["Unlimited Songs &",n(ta.br,{hideFrom:"md"})," Sound Effects"]}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_PricingSelection_ChakraText_24",children:"Annual Subscription"})]}),d(Fe,{alignItems:"flex-end",minW:"30%",flexGrow:"1",flexFlow:"row-reverse",justifyContent:"end",gap:"20px","data-cy":"_PricingSelection_HStack",children:[n(Fe,{alignItems:"center","data-cy":"_PricingSelection_HStack_26",children:d(Fe,{alignItems:"center",gap:"2px","data-cy":"_PricingSelection_HStack_27",children:[n(S,{textStyle:"heading.32.reg","data-cy":"_PricingSelection_ChakraText",children:it(ae({planInterval:Q,includeSounds:!0}),{separator:",",precision:0,symbol:"$",formatWithSymbol:!0}).format()}),d(Me,{alignItems:"start",gap:"0","data-cy":"_PricingSelection_VStack",children:[d(S,{textStyle:"UI.14.reg","data-cy":"_PricingSelection_ChakraText",children:[".",q({planInterval:Q,includeSounds:!0})]}),d(S,{textStyle:"UI.14.reg","data-cy":"_PricingSelection_ChakraText_31",children:["/",Q||K]})]})]})}),le&&n(Ao,{ref:T,priceKeys:Object.keys(c.subscriptions[0].price),onValueChange:de=>$e(de,!0),displayStyle:pe.md?"block":"none","data-cy":"_PricingSelection_PlanTypeDropdown"})]})]}),le&&pe.sm&&!pe.md?n(me,{w:"full",p:{base:"12px 0px 0px",md:"21px 0px 0px"},"data-cy":"_PricingSelection_Box",children:n(Ao,{ref:T,priceKeys:Object.keys(c.subscriptions[0].price),onValueChange:de=>{N(de),re(!0)},isMobile:!0,"data-cy":"_PricingSelection_PlanTypeDropdown"})}):null,(s||ge(Q)&&Be(Q))&&n(Va,{bg:"background.colored.teal",px:"8px",py:"6px",borderRadius:"2px",position:"absolute",top:"-12px",right:"30px","data-cy":"_PricingSelection_Center",children:n(S,{textStyle:"UI.smallcaps.semi",fontSize:"12",color:"text.primary.onColor","data-cy":"_PricingSelection_ChakraText",children:s?"14 DAY FREE TRIAL":"LIMITED TIME ONLY"})})]})]}),oe&&n(S,{textStyle:"paragraph.12.reg",color:"text.colored.warning",my:"5px","data-cy":"_PricingSelection_ChakraText_37",children:oe}),!s&&!b&&n(ds,{id:"single-song",onClick:fe,isSelected:E==="single-song",mb:"10px","data-cy":"_PricingSelection_PaymentOption",children:d(Fe,{justifyContent:"space-between",w:"full",alignItems:"center",pt:{base:"10px",md:"0",lg:"0"},"data-cy":"_PricingSelection_HStack",children:[d(Me,{alignItems:"start",gap:"4px","data-cy":"_PricingSelection_VStack",children:[n(S,{textStyle:"heading.18.semi","data-cy":"_PricingSelection_ChakraText",children:"Single Song"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_PricingSelection_ChakraText_42",children:"One-Time Use"})]}
13),d(me,{"data-cy":"_PricingSelection_Box",children:[n(S,{textStyle:"heading.14.reg",color:"text.secondary",fontStyle:"italic","data-cy":"_PricingSelection_ChakraText",children:"Starting at"}),d(Fe,{alignItems:"start",gap:"2px","data-cy":"_PricingSelection_HStack",children:[d(S,{textStyle:"heading.32.reg","data-cy":"_PricingSelection_ChakraText",children:["$",it(xe,{separator:",",precision:0}).dollars()]}),n(S,{mt:"6px",textStyle:"UI.14.reg","data-cy":"_PricingSelection_ChakraText_47",children:Ce||".00"})]})]})]})})]}),!c.license.custom&&!ce&&E!==null&&n(ne,{variant:"filled",w:"full",mt:"48px",size:"xl",disabled:ce||J&&E!=="single-song",onClick:E==="single-song"&&!a?ke:ee,"data-cy":"_PricingSelection_Button",children:ce?d(ve,{children:[n(t6,{}),n(Oo,{size:16,lineHeight:"16px",color:"contrast",weight:600,"data-cy":"_PricingSelection_Span",children:"Adding to Cart..."})]}):s?"Start Free Trial":E==="subscription"?d(ve,{children:["Add To Cart",n(P0,{as:"span",h:"4px",w:"4px",bg:"text.primary.inverse",mx:"2px","data-cy":"_PricingSelection_Circle"}),"Annual Subscription"]}):E==="single-song"&&!a?"Start Browsing":"Add To Cart"}),ce&&n(ne,{variant:"filled",w:"full",mt:"48px",size:"xl",disabled:!0,"data-cy":"_PricingSelection_Button",children:"Adding to Cart..."})]}):n(he,{justifyContent:"center",align:"center",style:{width:"100%",height:278},"data-cy":"_PricingSelection_Flex",children:n(Dt,{"data-cy":"_PricingSelection_CircleLoader"})})]})})},Vs=({name:e,description:a,value:r})=>d(w8,{value:r.toString(),position:"relative",h:"104px",p:"16px",justifyContent:"center",children:[n(P8,{}),d(C8,{alignItems:"center",children:[n(v8,{asChild:!0,children:d(Me,{align:"start",gap:"4px","data-cy":"_Option_VStack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_Option_Text",children:e}),a&&n(S,{textStyle:{base:"paragraph.12.reg",md:"paragraph.14.reg"},color:"text.secondary","data-cy":"_Option_Text_2",children:a})]})}),n(T8,{hideBelow:"md",position:"absolute",top:"0",right:"0",boxSize:"20px"})]})]},e),YT=({license:e,song:a,isTrialAllowed:r,isFreeTrialFlow:i,licenseId:c,user:s,setCart:u,sizes:h,selectedSize:f,onSizeChange:g,selectedOptions:_,source:w,onSubscriptionCheckout:b,onCelebrityClick:v,showSoundsPricing:C})=>{var A,E,R;const{trackLicenseBuilderAction:T}=Rr(),I=k=>{T("Client Type",{selection:{"wedding-filmmaker":"wedding-only","wedding-filmmaker-client-work":"wedding-and-commercial","youtube-creator-podcaster":"personal-only","youtube-creator-podcaster-client-work":"client-work"}[k.standard_license]})};La(()=>{f&&I(f)});const O=k=>{I(k),fc(k),g(k)},D=k=>{var z;if(k&&((z=h==null?void 0:h.nested)!=null&&z.options)){const Q=h.nested.options[parseInt(k)];O(Q)}};return d(Ko,{maxWidth:730,children:[h&&d(Me,{align:"stretch",gap:"16px",mb:"40px","data-cy":"_IndividualPricingSelection_VStack",children:[d(Es,{w:"full",defaultValue:(()=>{var z;if(!f||!((z=h.nested)!=null&&z.options))return;const k=h.nested.options.findIndex(Q=>Q.name===f.name);return k>=0?k.toString():void 0})(),onValueChange:({value:k})=>D(k),children:[n(Rs,{asChild:!0,children:n(S,{textStyle:"heading.16.semi",mb:"16px","data-cy":"_IndividualPricingSelection_Text",children:(A=h.nested)==null?void 0:A.question})}),n(Fe,{align:"stretch",gap:"12px","data-cy":"_IndividualPricingSelection_HStack",children:(E=h.nested)==null?void 0:E.options.map((k,z)=>n(Vs,{name:k.name,description:k.description,value:z,"data-cy":"_IndividualPricingSelection_Option"},k.name))})]}),((R=f==null?void 0:f.standard_license)==null?void 0:R.includes("youtube"))&&d(m.Fragment,{children:[n(p4,{id:"permissions",effect:"solid",place:"bottom","data-cy":"_IndividualPricingSelection_Tooltip"}),d(S,{textStyle:"paragraph.12.reg","data-cy":"_IndividualPricingSelection_Text",children:["Personal coverage does not include celebrity accounts."," ",n(Hn,{"data-html":!0,"data-multiline":!0,"data-class":"permissions","data-tooltip-html":`<div style='max-width: 215px; padding-bottom: 10px; text-align: left; font-family: Aktiv Grotesk, aktiv-grotesk, sans-serif; margin: -5px 5px'> 14 <p style='font-size: 12px; font-weight: bold; margin-bottom: 0; margin-top: 10px;'>Celebrity Accounts</p> 15 <ul style='margin: 0; padding: 0; text-align: left; font-size: 10px; line-height: 12px; font-weight: 400;'> 16 <li style='margin: 0;'>Web/Social accounts over 1M followers</li> 17 <li style='margin: 0;'>Podcast subscribers over 10k downloads/mo</li> 18 </ul> 19 </div>`,"data-tooltip-id":"permissions","data-offset":"{'top': -12, 'left': -5}",className:"underline",color:"primary",weight:"600",underline:!0,onClick:v,"data-cy":"_IndividualPricingSelection_Link",children:"Request Celebrity Coverage"})]})]})]}),n(qf,{user:s,song:a,sizes:h,selectedSize:f,license:e,isTrialAllowed:r,isFreeTrialFlow:i,source:w,selectedOptions:_,onSubscriptionCheckout:b,setCart:u,licenseId:c,showSoundsPricing:C,"data-cy":"_IndividualPricingSelection_PricingSelection"})]})},KT=e=>n(ja,{to:[x0],"data-cy":"_IndividualPricingSelection_Subscribe",children:a=>n(YT,{...e,setCart:a.setCart,"data-cy":"_IndividualPricingSelection_ConnectedIndividualPricingSelection"})}),Hf=e=>{const{view:a,submit:r,error:i}=zv({user:e.user,selectedOptions:e.selectedOptions,coverages:e.coverages,exclusivityInterested:e.exclusivityInterested,isFreeTrialFlow:e.isFreeTrialFlow}),{trackCustomSubscriptionRequest:c}=Rr();return n(Wv,{...e,view:a,error:i,onQuote:async(u,h)=>{var g;(await r(u,h)).success&&(c(),(g=e.onSuccess)==null||g.call(e))},showCompletedView:e.showCompletedView,"data-cy":"_PricingBuilderCustomForm_CustomQuoteView"})},QT=({song:e,source:a,user:r,selectedOptions:i,isCelebrity:c,isFreeTrialFlow:s,onBack:u})=>n(Ko,{children:n(Hf,{songs:e&&[e],user:r,source:a,selectedOptions:i,isCelebrity:c,isFreeTrialFlow:s,onBack:u,noPadding:!0,"data-cy":"_CustomQuoteView_PricingBuilderCustomQuoteForm"})}),JT=({selectedSize:e,onEdit:a})=>d(Fe,{onClick:a,"aria-label":"Edit coverage",as:"button",align:"center",justify:"space-between",width:"100%",minH:"104px",maxH:"120px",padding:"16px",border:"1px solid",borderColor:"border.default",borderRadius:"4px",textAlign:"left",cursor:"pointer",mb:"32px",_hover:{borderColor:"border.active"},"data-cy":"_EditCoverageButton_HStack",children:[d(Me,{gap:"4px",flexGrow:"1","data-cy":"_EditCoverageButton_VStack",children:[d(Fe,{align:"start",ga
19p:"8px",w:"full","data-cy":"_EditCoverageButton_HStack",children:[n(S,{textStyle:"heading.14.semi",w:"80px",flexShrink:"0","data-cy":"_EditCoverageButton_Text",children:"Coverage"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary",flexGrow:"1","data-cy":"_EditCoverageButton_Text_4",children:"Standard (Web/Social, Podcast, Internal, Industrial)"})]}),d(Fe,{align:"start",gap:"8px",w:"full","data-cy":"_EditCoverageButton_HStack",children:[n(S,{textStyle:"heading.14.semi",w:"80px",flexShrink:"0","data-cy":"_EditCoverageButton_Text",children:"Client Size"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary",flexGrow:"1","data-cy":"_EditCoverageButton_Text_7",children:e==null?void 0:e.description})]})]}),n(S,{textStyle:"UI.12.reg",textDecor:"underline","data-cy":"_EditCoverageButton_Text_8",children:"EDIT"})]}),XT=({onEdit:e,...a})=>d(ve,{children:[n(S,{textStyle:"heading.16.semi",mb:"16px","data-cy":"_BusinessPaymentOptionsStep_Text",children:"Summary"}),n(JT,{selectedSize:a.selectedSize,onEdit:e,"data-cy":"_BusinessPaymentOptionsStep_EditCoverageButton"}),n(qf,{...a,"data-cy":"_BusinessPaymentOptionsStep_PricingSelection"})]}),$f=e=>{var a;return(a=e==null?void 0:e.nested)!=null&&a.coverage_question?e.nested.options:[]},Km=e=>{var r;const a=Ud(e);return(r=$f(a))==null?void 0:r[0]},Ud=e=>e.find(a=>{var r;return!!((r=a==null?void 0:a.nested)!=null&&r.coverage_question)}),eP=e=>!!Ud(e),tP=({selectedOptions:e,selectedCoverage:a,selectedSize:r,onSelectCoverage:i,onSelectSize:c,source:s,song:u,user:h,onContinue:f,isFreeTrialFlow:g})=>{var D,A;const _=Ud(e),w=$f(_),b=m.useMemo(()=>{var E;return a.custom?[]:((E=a==null?void 0:a.nested)==null?void 0:E.options)||[]},[a]),v=!!(a!=null&&a.custom)||!!(r!=null&&r.custom),C=m.useMemo(()=>{if(!a)return;const E=w.findIndex(R=>R.name===a.name);return E>=0?E.toString():void 0},[a,w]),T=m.useMemo(()=>{if(!r)return;const E=b.findIndex(R=>R.name===r.name);return E>=0?E.toString():void 0},[r,b]),I=E=>{if(E){const R=w[parseInt(E)];i==null||i(R)}},O=E=>{if(E){const R=b[parseInt(E)];c==null||c(R)}};return d(Me,{gap:"32px","data-cy":"_SelectCoverageStep_VStack",children:[!!w.length&&w.length>0&&d(Es,{w:"full",defaultValue:C,onValueChange:({value:E})=>I(E),children:[n(Rs,{asChild:!0,children:n(S,{textStyle:"heading.18.semi",mb:"16px","data-cy":"_SelectCoverageStep_Text",children:(D=_==null?void 0:_.nested)==null?void 0:D.question})}),n(Fe,{align:"stretch",gap:"12px","data-cy":"_SelectCoverageStep_HStack",children:w.map((E,R)=>n(Vs,{name:E.name,description:E.description,value:R,"data-cy":"_SelectCoverageStep_Option"},E.name))})]}),!!b.length&&b.length>0&&d(Es,{w:"full",onValueChange:({value:E})=>O(E),defaultValue:T,children:[n(Rs,{asChild:!0,children:n(S,{textStyle:"heading.18.semi",mb:"16px","data-cy":"_SelectCoverageStep_Text",children:(A=a.nested)==null?void 0:A.question})}),n(Fe,{align:"stretch",gap:"12px","data-cy":"_SelectCoverageStep_HStack",children:b.map((E,R)=>n(Vs,{name:E.name,description:E.description,value:R,"data-cy":"_SelectCoverageStep_Option"},E.name))})]}),v&&h&&n(Hf,{songs:u&&[u],user:h,source:s,coverages:r!=null&&r.custom?[{value:"enterprise",label:"Enterprise"}]:void 0,selectedOptions:e,noPadding:!0,showExtendedCoverages:!!(a!=null&&a.custom),showCompletedView:!0,isFreeTrialFlow:g,"data-cy":"_SelectCoverageStep_PricingBuilderCustomQuoteForm"}),!v&&n(ne,{size:"xl",variant:"filled",mt:"16px",w:"full",onClick:f,disabled:!r||!a,"data-cy":"_SelectCoverageStep_Button",children:"Continue"})]})},aP=({selectedOptions:e,onSelectOption:a,...r})=>{const[i,c]=m.useState("coverage"),{trackLicenseBuilderAction:s}=Rr();La(()=>{var T;s("Coverage",{selection:((T=Km(e))==null?void 0:T.name.toLowerCase())==="standard"?"standard":"extended"})});const[u,h]=m.useState(Km(e)),[f,g]=m.useState(),_=()=>{c("coverage")},w=T=>{h(T),s("Coverage",{selection:T.name.toLowerCase()==="standard"?"standard":"extended"}),f&&T.name.toLowerCase()==="standard"&&s("Client Size",{selection:f.name.toLowerCase()})},b=T=>{fc(T),g(T),s("Client Size",{selection:T.name.toLowerCase()})},v=m.useCallback(()=>{c("payment"),f&&a(f),s("Continue to Pricing")},[a,f]),C=m.useMemo(()=>({coverage:n(tP,{selectedOptions:e,selectedCoverage:u,selectedSize:f,source:r.source,song:r.song,user:r.user,onSelectCoverage:w,onSelectSize:b,onContinue:v,isFreeTrialFlow:r.isFreeTrialFlow,"data-cy":"_BusinessPricingSelection_SelectCoverageStep"}),payment:n(XT,{selectedSize:f,selectedOptions:e,onEdit:_,...r,"data-cy":"_BusinessPricingSelection_BusinessPaymentOptionsStep"})})[i],[e,u,f,i,r,v]);return n(Ko,{maxWidth:730,children:C})},rP=e=>n(ja,{to:[x0],"data-cy":"_BusinessPricingSelection_Subscribe",children:a=>n(aP,{...e,setCart:a.setCart,"data-cy":"_BusinessPricingSelection_ConnectedBusinessPricingSelection"})}),nP="cart/v4/licenses/schema",oP={schema:({songId:e}={})=>({queryKey:["licenseSchema",e],queryFn:()=>Le(nP,{params:{...e&&{song_id:e}}})})},iP=({songId:e}={})=>{const{data:a,isLoading:r,error:i,...c}=Je({...oP.schema({songId:e})});return{licenseSchema:a??null,loadingSchema:r,error:i,...c}};var cP={name:"s079uh",styles:"margin-top:2px"},lP={name:"qamjgr",styles:"margin-right:4px"};const Zf=({song:e})=>
19{if(!e)return null;const a=Lm(e,"album.image.cloudinary_public_id"),r=Lm(e,"album.image.cloudinary_version_number"),i=window.cloudinaryUrl(a,{height:600,width:600,version:r});return d(ve,{children:[d(X8,{children:[n(a6,{children:n(n6,{src:i,alt:`${e.name} Music Licensing`})}),d(o6,{children:[n(i6,{to:Bt("song",{id:e.id,slug:e.slug}),className:"songName",children:e.name}),d(he,{alignItems:"center",css:cP,"data-cy":"_SongHeader_Flex",children:[n(Xe,{name:"instrumental",type:"text-color",width:10,css:lP,"data-cy":"_SongHeader_Icon"}),n(c6,{to:Bt("artist",{id:e.album.artist.id,slug:e.album.artist.slug}),className:"artistName",children:e.album.artist.name})]}),e.explicit&&n(r6,{children:"EXPLICIT"})]})]}),n(l6,{children:n(gt,{"data-cy":"_SongHeader_Separator"})})]})};Zf.propTypes={currentTime:vo.string,isInARestrictedRole:vo.bool,isPlaying:vo.bool,song:vo.object,showTimes:vo.bool};const sP=({song:e,source:a,initialSelection:r,isFromSubscriptionPlansModal:i,onCheckoutComplete:c,isFreeTrialFlow:s,showSoundsPricing:u})=>{const[h,f]=m.useState(null),[g,_]=m.useState(!1),[w,b]=m.useState(!0),[v,C]=m.useState([]),T=Ho(),I=Y0(),O=Qe("license-builder-modal"),{trackLicenseBuilderAction:D}=Rr(),{user:{data:A,refetchUser:E}}=ht(),{licenseSchema:R,loadingSchema:k}=iP(),{license:z}=J8(h);La(()=>{i||(D("Displayed"),Qr({event:Jr,actionType:"Displayed",optionSelected:T.pathname,loggedIn:A!=null&&A.id?"Logged In":"Logged Out"}))}),bd(()=>{const ae=v.slice(-1)[0],q=ae==null?void 0:ae.name;Qr({event:Jr,actionType:"Closed",optionSelected:q,loggedIn:A!=null&&A.id?"Logged In":"Logged Out"})});const Q=()=>{E(),c==null||c()};m.useEffect(()=>{if(R&&(A||r)){const{selectedObjects:ae,isCustom:q,standardLicense:xe}=Nv({user:A,initialSelection:r,licenseSchema:R});if(r)if(r==="custom")D("Entity Type",{selection:"enterprise"}),Qr({event:Jr,actionType:"Entity Type - Enterprise Card",optionSelected:"Enterpirse",loggedIn:A!=null&&A.id?"Logged In":"Logged Out"});else{const ge=R.find(Be=>Be.entity_type_value===r);D("Entity Type",{selection:ge==null?void 0:ge.entity_type_value}),fc(ge,{selectedCard:!!ge})}q||xe&&f(xe);const Ce=ae.slice(-1)[0];if(Ce!=null&&Ce.nested&&(Ce!=null&&Ce.entity_value)){const ge=Ce.nested.options[0];f(ge.standard_license),C([...ae,ge])}else C(ae);b(!1)}else R&&b(!1)},[R,r]);const N=ae=>{if(fc(ae),D(ae.license_stage_key==="entity"?"Entity":"Entity Type",{selection:ae.entity_value||ae.entity_type_value}),ae.standard_license?f(ae.standard_license):f(null),ae.nested&&ae.entity_value){const q=ae.nested.options[0];f(q.standard_license),C(xe=>[...xe,ae,q])}else C(q=>[...q,ae])},W=ae=>{const q=v.slice(0,-1);C([...q,ae]),ae.standard_license?f(ae.standard_license):f(null)},Y=()=>{const ae=v.slice(0,-1),q=ae[ae.length-1].nested.options[0];f(q.standard_license),C([...ae,q])},oe=v.slice(-1)[0],Se=r==="custom"||(oe==null?void 0:oe.custom),ce=v.find(ae=>["company_size","client_size"].includes(ae.license_stage_key)),we=v.find(ae=>{var q;return["company_size","client_size"].includes(((q=ae.nested)==null?void 0:q.options[0].license_stage_key)||"")}),le=()=>{var xe;const ae=!!A.id,q=!!((xe=A.active_organization)!=null&&xe.subscription_trial_allowed);return s&&!ae||s&&ae&&q?!0:ae?q&&T.pathname==="/free-trial":T.pathname==="/free-trial"},K=()=>{O.hide(),I.open()},se=()=>{var ae;if(Se||g)return n(QT,{song:e,source:a,user:A,selectedOptions:v,isCelebrity:g,isFreeTrialFlow:s,onBack:ce!=null&&ce.custom?Y:void 0,"data-cy":"_LicenseBuilder_CustomQuoteView"});if(oe){if(oe!=null&&oe.entity_type_value&&!((ae=oe==null?void 0:oe.nested)!=null&&ae.coverage_question))return n(d6,{question:oe.nested,onSelectOption:N,"data-cy":"_LicenseBuilder_EntityTypeQuestion"});{const q=eP(v);return d(ve,{children:[q?n(rP,{song:e,isTrialAllowed:le(),isFreeTrialFlow:s,user:A,license:z,licenseId:h,sizes:we,source:a,selectedOptions:v,onSelectOption:N,onSubscriptionCheckout:Q,showSoundsPricing:u,"data-cy":"_LicenseBuilder_BusinessPricingSelection"}):n(KT,{song:e,isTrialAllowed:le(),isFreeTrialFlow:s,user:A,license:z,licenseId:h,sizes:we,selectedSize:ce,onSizeChange:W,source:a,selectedOptions:v,onSubscriptionCheckout:Q,onCelebrityClick:()=>_(!0),showSoundsPricing:u,"data-cy":"_LicenseBuilder_IndividualPricingSelection"}),d(Fe,{justifyContent:"space-between",alignItems:"center",w:"full",p:{base:"24px 10px 24px 20px",md:"40px 34px 40px 48px"},bg:"background.panel",borderRadius:"0px 0px 8px 8px","data-cy":"_LicenseBuilder_HStack",children:[d(S,{textAlign:"left",textStyle:{base
19:"UI.12.reg",md:"UI.14.reg"},flexShrink:"0","data-cy":"_LicenseBuilder_Text",children:["Need assistance?"," ",n(ta.span,{onClick:K,textDecor:"underline",cursor:"pointer",children:"Contact Support"})]}),n(me,{transform:"scale(0.85)","data-cy":"_LicenseBuilder_Box",children:n(Ln,{"data-cy":"_LicenseBuilder_TrustPilotWidget"})})]})]})}}else return n(s6,{options:R,onSelectOption:N,"data-cy":"_LicenseBuilder_EntityPathQuestion"})};return k||w?n(he,{justifyContent:"center",alignItems:"center",css:ae=>({maxWidth:"100%",width:542,height:350,background:ae.color.surface.surface2}),"data-cy":"_LicenseBuilder_Flex",children:n(Dt,{"data-cy":"_LicenseBuilder_CircleLoader"})}):n(me,{bg:"background.controls.modal",borderRadius:{base:"8px 8px 0 0",lg:"8px"},"data-cy":"_LicenseBuilder_Box",children:d(me,{pt:{base:20,lg:30},"data-cy":"_LicenseBuilder_Box_12",children:[n(Zf,{song:e,"data-cy":"_LicenseBuilder_SongHeader"}),se()]})})},dP=_e("div",{target:"eqb471u10"})(({theme:e})=>({padding:"40px 20px 60px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center","p, h1, h2, h3":{textAlign:"left"},[e.media.md]:{padding:"60px 30px 46px",width:"calc(100vw - 60px)"},[e.media.lg]:{padding:"60px 30px 46px 35px",flexDirection:"row",justifyContent:"space-between"},[e.media.xlg]:{width:1e3}})),uP=_e("h1",{target:"eqb471u9"})(({theme:e})=>({margin:0,color:e.color.base.contrast,fontSize:"48px",fontWeight:700,lineHeight:"45px",fontFamily:e.font.heading,letterSpacing:-1.97,[e.media.md]:{fontSize:"58px",lineHeight:"55px",letterSpacing:-2.33}})),pP=_e("h3",{target:"eqb471u8"})(({theme:e})=>({margin:0,color:e.color.base.contrast,fontSize:"16px",fontWeight:400,lineHeight:"20px",fontFamily:e.font.heading,letterSpacing:-.64,marginTop:20})),iO=_e("button",{target:"eqb471u0"})(({theme:e})=>({fontFamily:"Aktiv Grotesk, aktiv-grotesk, sans-serif",fontWeight:400,lineHeight:"100%",background:e.color.base.contrast,borderColor:e.color.base.contrast,color:e.color.base.primary,border:`1px solid ${e.color.base.contrast}`,borderRadius:4,padding:10,width:"100%",cursor:"pointer",transition:"all .2s ease",display:"flex",alignItems:"center",justifyContent:"center",[e.media.sm]:{margin:"0px 0px 24px 0",height:40,fontSize:14},[e.media.md]:{margin:"0px 0px 32px 0",height:40,fontSize:14},[e.media.xlg]:{margin:"8px 0px 48px 0",height:48,fontSize:16}})),Qm={business:["Access to the largest curated collection of music and sounds","Monetization on YouTube","Copyright clearance through our SyncID⢠system","Coverage for all your client projects"],individual:["Access to the largest curated collection of music and sounds","Monetization on YouTube","Copyright clearance through our SyncID⢠system"]},mP=({source:e,buttonCta:a,stacked:r,onSelectPlanType:i,onLicenseBuilderClose:c,allowFreeTrial:s=!1,fullWidth:u=!1,showSoundsPricing:h})=>{const f=Qe("license-builder-modal",{useDrawer:!0}),{trackButtonClick:g}=Rr(),_=w=>{g({buttonName:`subscription-plans-modal-${w}`}),f.show({source:e,isFromSubscriptionPlansModal:!0,initialSelection:w,onClose:c,isFreeTrialFlow:s,showSoundsPricing:h}),i==null||i(w)};return d(G,{flexDirection:{base:"column-reverse",xl:"row"},alignItems:"start",gap:16,mt:30,"data-cy":"_PlanCards_Flex",children:[d(V,{gap:20,w:{xl:u?"100%":286,base:"100%"},p:{md:"40px 20px 20px",base:20},position:"relative",outline:"1px solid",outlineColor:"border.colored.black",outlineOffset:-1,bgColor:"background","data-cy":"_PlanCards_Stack",children:[d(V,{gap:12,h:{base:164,md:170,xl:190},w:"100%","data-cy":"_PlanCards_Stack_2",children:[d(V,{gap:4,justifyContent:"space-between",w:"100%","data-cy":"_PlanCards_Stack_3",children:[d(G,{alignItems:"center",gap:4,w:"100%","data-cy":"_PlanCards_Flex",children:[n(S,{textStyle:"paragraph.16.reg","data-cy":"_PlanCards_Text",children:"From"}),n(S,{textStyle:"paragraph.16.reg",fontWeight:700,"data-cy":"_PlanCards_Text_6",children:"$29/mo"})]}),n(S,{textStyle:"heading.36.bold",fontWeight:"semibold","data-cy":"_PlanCards_Text_7",children:"Individual"})]}),d(S,{textStyle:"paragraph.14.reg","data-cy":"_PlanCards_Text_8",children:["Captivate your audience with music curated specifically for your projects. Perfect for"," ",n("b",{"data-cy":"_PlanCards_b",children:" freelance filmmakers, wedding filmmakers, YouTube creators, "})," and ",n("b",{"data-cy":"_PlanCards_b_10",children:"podcasters"}),"."]})]}),n(ne,{variant:"outline",size:"lg",borderColor:"border.active",onClick:()=>_("individual"),"data-cy":"_PlanCards_Button",children:a||"Start Your Subscription"}),n(V,{gap:8,display:{base:r?"none":"flex",xl:"flex"},"data-cy":"_PlanCards_Stack",children:Qm.individual.map((w,b)=>d(G,{gap:10,alignItems:"flex-start","data-cy":"_PlanCards_Flex",children:[n("div",{style:{flexShrink:0,marginTop:5},"data-cy":"_PlanCards_div",children:n(Xe,{fill:"currentColor",width:16,name:"checkThin","data-cy":"_PlanCards_Icon"})}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_PlanCards_Text",children:w})]},b))})]}),d(V,{gap:20,w:{xl:u?"100%":286,base:"100%"}
19,p:{md:"40px 20px 20px",base:20},position:"relative",outline:"2px solid",outlineColor:"border.colored.black",outlineOffset:-2,bgColor:"background","data-cy":"_PlanCards_Stack",children:[d(V,{gap:12,h:{base:164,md:150,xl:190},"data-cy":"_PlanCards_Stack_18",children:[n(G,{alignItems:"center",position:"absolute",top:-30,right:0,left:0,h:30,bgColor:"background.inverse",p:"8px 20px","data-cy":"_PlanCards_Flex",children:n(S,{textStyle:"UI.14.semi",color:"text.primary.inverse","data-cy":"_PlanCards_Text",children:"Cover You + Your Clients"})}),d(V,{gap:4,justifyContent:"space-between",w:"100%","data-cy":"_PlanCards_Stack",children:[d(G,{alignItems:"center",gap:4,"data-cy":"_PlanCards_Flex",children:[n(S,{textStyle:"paragraph.16.reg","data-cy":"_PlanCards_Text",children:"From"}),n(S,{textStyle:"paragraph.16.reg",fontWeight:700,"data-cy":"_PlanCards_Text_24",children:"$99/mo"})]}),n(S,{textStyle:"heading.36.bold",fontWeight:"semibold","data-cy":"_PlanCards_Text_25",children:"Business"})]}),d(S,{textStyle:"paragraph.14.reg","data-cy":"_PlanCards_Text_26",children:["Keep your customers and viewers engaged with the best music curated for your projects. Perfect for"," ",n("b",{"data-cy":"_PlanCards_b",children:" production companies, agencies,"})," and",n("b",{"data-cy":"_PlanCards_b_28",children:"Â brands."})]})]}),n(ne,{variant:"filled",size:"lg",borderColor:"border.active",onClick:()=>_("business"),"data-cy":"_PlanCards_Button",children:a||"Start Your Subscription"}),n(V,{gap:8,display:{base:r?"none":"flex",xl:"flex"},"data-cy":"_PlanCards_Stack",children:Qm.business.map((w,b)=>d(G,{gap:10,alignItems:"start","data-cy":"_PlanCards_Flex",children:[n("div",{style:{flexShrink:0,marginTop:5},"data-cy":"_PlanCards_div",children:n(Xe,{fill:"currentColor",width:16,name:"checkThin","data-cy":"_PlanCards_Icon"})}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_PlanCards_Text",children:w})]},b))})]})]})},hP=({source:e,user:a,buttonCta:r,onSelectPlanType:i,onEnterpirseCoverageSelect:c,onLicenseBuilderClose:s,allowFreeTrial:u,showSoundsPricing:h})=>{const f=Qe("license-builder-modal",{useDrawer:!0}),g=_=>{c==null||c(),f.show({source:e,isFromSubscriptionPlansModal:!0,initialSelection:_,onClose:s,isFreeTrialFlow:u,showSoundsPricing:h})};return La(()=>{Qr({event:Jr,actionType:"Displayed Subscription Plans Modal",optionSelected:window.location.pathname,loggedIn:a!=null&&a.id?"Logged In":"Logged Out"})}),n($o,{queries:S0.queries,"data-cy":"_SubscriptionPlansModal_Media",children:({matches:_})=>n(me,{bg:"background","data-cy":"_SubscriptionPlansModal_Box",children:d(dP,{children:[d(he,{direction:"column",justifyContent:"space-between",style:{alignSelf:"stretch",minWidth:300},"data-cy":"_SubscriptionPlansModal_Flex",children:[d("div",{style:{marginBottom:_.lg?0:40},"data-cy":"_SubscriptionPlansModal_div",children:[d(uP,{children:["The largest ",_.lg&&n("br",{"data-cy":"_SubscriptionPlansModal_br"})," curated ",_.lg&&n("br",{"data-cy":"_SubscriptionPlansModal_br_5"})," collection ",_.lg&&n("br",{"data-cy":"_SubscriptionPlansModal_br_6"})," of music."]}),d(pP,{children:["Subscribe to the largest ",(_.sm||_.lg)&&n("br",{"data-cy":"_SubscriptionPlansModal_br_7"})," collection of music"," ",!_.sm&&!_.lg&&n("br",{"data-cy":"_SubscriptionPlansModal_br_8"})," curated for ",(_.sm||_.lg)&&n("br",{"data-cy":"_SubscriptionPlansModal_br_9"})," film, advertising, and TV."]})]}),_.lg&&n(Ln,{"data-cy":"_SubscriptionPlansModal_TrustPilotWidget"})]}),d("div",{style:{alignSelf:"stretch",width:"100%",flexGrow:1,marginLeft:_.lg?50:0},"data-cy":"_SubscriptionPlansModal_div",children:[n(mP,{source:e,buttonCta:r,onSelectPlanType:i,onLicenseBuilderClose:s,allowFreeTrial:u,showSoundsPricing:h,"data-cy":"_SubscriptionPlansModal_PlanCards"}),d(he,{direction:_.sm?"column-reverse":"row",justifyContent:_.sm?"center":_.lg?"end":"space-between",alignItems:_.sm?"center":"end",style:{marginTop:_.lg?50:30},"data-cy":"_SubscriptionPlansModal_Flex",children:[!_.lg&&n(Ln,{"data-cy":"_SubscriptionPlansModal_TrustPilotWidget"}),_.sm&&n(aa,{color:"dividerColor",style:{margin:"30px 0 16px",width:"100%"},"data-cy":"_SubscriptionPlansModal_Hr"}),n(Hn,{onClick:()=>g("custom"),color:"primary",heading:!0,size:_.sm?12:10,weight:"600",underline:!0,uppercase:!0,"data-cy":"_SubscriptionPlansModal_Link",children:"Looking for enterprise coverage?"})]})]})]})})})},fP=({defaultPlanDetails:e,standard_license:a,coupon_code:r,vat_number:i,country_id:c,region_id:s,referral_code:u,ein_number:h,trial:f,upgrade_from_subscription_id:g,account_balance_payments:_,services:w,enabled:b=!0})=>{const{data:v,isLoading:C,isFetching:T,error:I,refetch:O}=Je({queryKey:[Dm,a,r,i,c,s,u,h,f,g,_,w],queryFn:()=>Le(Dm,{method:nn,data:{standard_license:a,coupon_code:r,vat_number:i,country_id:c,region_id:s,referral_code:u,ein_number:h,trial:f,upgrade_from_subscription_id:g,account_balance_payments:_,services:w}}),enabled:!!a&&!!c&&b,placeholderData:D=>D??e});return{planDetails:{data:v,isLoading:C||T,error:I,refetch:O}}},Gf=({standard_license:e,subscription_plan_id:a,services:r,upgradeSubscriptionId:i,enabled:c=!0})=>{const{data:s,isLoading:u,error:h}=Je({queryKey:[ks,{standard_license:e,services:r,subscription_plan_id:a},i],queryFn:()=>Le(ks,{method:nn,data:{standard_license:e,subscription_plan_id:a,services:r||[]}}),enabled:c&&(!!e||!!a)&&!!(r!=null&&r.length)&&!i});return{servicePricing:{data:s||[],isLoading:u,error:h}}},cO=async({subscription_plan_id:e,standard_license:a,services:r})=>!e&&!a||!(r!=null&&r.length)?[]:Le(ks,{method:nn,data:{subscription_plan_id:e,services:r||[]}});function an(e,a){return e instanceof Date?new e.constructor(a):new Date(a)}let gP={};function Bc(){return gP}function No(e,a){var h,f,g,_;const r=Bc(),i=(a==null?void 0:a.weekStartsOn)??((f=(h=a==null?void 0:a.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((_=(g=r.locale)==null?void 0:g.options)==null?void 0:_.weekStartsOn)??0,c=mr(e),s=c.getDay(),u=(s<i?7:0)+s-i;return c.setDate(c.getDate()-u),c.setHours(0,0,0,0),c}function xc(e){return No(e,{weekStartsOn:1}
19)}function Yf(e){const a=mr(e),r=a.getFullYear(),i=an(e,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const c=xc(i),s=an(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const u=xc(s);return a.getTime()>=c.getTime()?r+1:a.getTime()>=u.getTime()?r:r-1}function yP(e){const a=Yf(e),r=an(e,0);return r.setFullYear(a,0,4),r.setHours(0,0,0,0),xc(r)}function _P(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xP(e){if(!_P(e)&&typeof e!="number")return!1;const a=mr(e);return!isNaN(Number(a))}function bP(e){const a=mr(e),r=an(e,0);return r.setFullYear(a.getFullYear(),0,1),r.setHours(0,0,0,0),r}const SP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},wP=(e,a,r)=>{let i;const c=SP[e];return typeof c=="string"?i=c:a===1?i=c.one:i=c.other.replace("{{count}}",a.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};function fs(e){return(a={})=>{const r=a.width?String(a.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const vP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},CP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},TP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},PP={date:fs({formats:vP,defaultWidth:"full"}),time:fs({formats:CP,defaultWidth:"full"}),dateTime:fs({formats:TP,defaultWidth:"full"})},kP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},IP=(e,a,r,i)=>kP[e];function Po(e){return(a,r)=>{const i=r!=null&&r.context?String(r.context):"standalone";let c;if(i==="formatting"&&e.formattingValues){const u=e.defaultFormattingWidth||e.defaultWidth,h=r!=null&&r.width?String(r.width):u;c=e.formattingValues[h]||e.formattingValues[u]}else{const u=e.defaultWidth,h=r!=null&&r.width?String(r.width):e.defaultWidth;c=e.values[h]||e.values[u]}const s=e.argumentCallback?e.argumentCallback(a):a;return c[s]}}const MP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},AP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},FP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},EP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},RP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},OP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},LP=(e,a)=>{const r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},VP={ordinalNumber:LP,era:Po({values:MP,defaultWidth:"wide"}),quarter:Po({values:AP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Po({values:FP,defaultWidth:"wide"}),day:Po({values:EP,defaultWidth:"wide"}),dayPeriod:Po({values:RP,defaultWidth:"wide",formattingValues:OP,defaultFormattingWidth:"wide"})};function ko(e){return(a,r={})=>{const i=r.width,c=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=a.match(c);if(!s)return null;const u=s[0],h=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(h)?DP(h,w=>w.test(u)):BP(h,w=>w.test(u));let g;g=e.valueCallback?e.valueCallback(f):f,g=r.valueCallback?r.valueCallback(g):g;const _=a.slice(u.length);return{value:g,rest:_}}}function BP(e,a){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&a(e[r]))return r}function DP(e,a){for(let r=0;r<e.length;r++)if(a(e[r]))return r}function jP(e){return(a,r={})=>{const i=a.match(e.matchPattern);if(!i)return null;const c=i[0],s=a.match(e.parsePattern);if(!s)return null;let u=e.valueCallback?e.valueCallback(s[0]):s[0];u=r.valueCallback?r.valueCallback(u):u;const h=a.slice(c.length);return{value:u,rest:h}}}const zP=/^(\d+)(th|st|nd|rd)?/i,WP=/\d+/i,NP={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},UP={any:[/^b/i,/^(a|c)/i]},qP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},HP={any:[/1/i,/2/i,/3/i,/4/i]}
19,$P={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ZP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},GP={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},YP={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},KP={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},QP={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JP={ordinalNumber:jP({matchPattern:zP,parsePattern:WP,valueCallback:e=>parseInt(e,10)}),era:ko({matchPatterns:NP,defaultMatchWidth:"wide",parsePatterns:UP,defaultParseWidth:"any"}),quarter:ko({matchPatterns:qP,defaultMatchWidth:"wide",parsePatterns:HP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ko({matchPatterns:$P,defaultMatchWidth:"wide",parsePatterns:ZP,defaultParseWidth:"any"}),day:ko({matchPatterns:GP,defaultMatchWidth:"wide",parsePatterns:YP,defaultParseWidth:"any"}),dayPeriod:ko({matchPatterns:KP,defaultMatchWidth:"any",parsePatterns:QP,defaultParseWidth:"any"})},XP={code:"en-US",formatDistance:wP,formatLong:PP,formatRelative:IP,localize:VP,match:JP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ek(e){const a=mr(e);return q4(a,bP(a))+1}function tk(e){const a=mr(e),r=+xc(a)-+yP(a);return Math.round(r/I0)+1}function Kf(e,a){var _,w,b,v;const r=mr(e),i=r.getFullYear(),c=Bc(),s=(a==null?void 0:a.firstWeekContainsDate)??((w=(_=a==null?void 0:a.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??c.firstWeekContainsDate??((v=(b=c.locale)==null?void 0:b.options)==null?void 0:v.firstWeekContainsDate)??1,u=an(e,0);u.setFullYear(i+1,0,s),u.setHours(0,0,0,0);const h=No(u,a),f=an(e,0);f.setFullYear(i,0,s),f.setHours(0,0,0,0);const g=No(f,a);return r.getTime()>=h.getTime()?i+1:r.getTime()>=g.getTime()?i:i-1}function ak(e,a){var h,f,g,_;const r=Bc(),i=(a==null?void 0:a.firstWeekContainsDate)??((f=(h=a==null?void 0:a.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((_=(g=r.locale)==null?void 0:g.options)==null?void 0:_.firstWeekContainsDate)??1,c=Kf(e,a),s=an(e,0);return s.setFullYear(c,0,i),s.setHours(0,0,0,0),No(s,a)}function rk(e,a){const r=mr(e),i=+No(r,a)-+ak(r,a);return Math.round(i/I0)+1}function nt(e,a){const r=e<0?"-":"",i=Math.abs(e).toString().padStart(a,"0");return r+i}const Ir={y(e,a){const r=e.getFullYear(),i=r>0?r:1-r;return nt(a==="yy"?i%100:i,a.length)},M(e,a){const r=e.getMonth();return a==="M"?String(r+1):nt(r+1,2)},d(e,a){return nt(e.getDate(),a.length)},a(e,a){const r=e.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,a){return nt(e.getHours()%12||12,a.length)},H(e,a){return nt(e.getHours(),a.length)},m(e,a){return nt(e.getMinutes(),a.length)},s(e,a){return nt(e.getSeconds(),a.length)},S(e,a){const r=a.length,i=e.getMilliseconds(),c=Math.trunc(i*Math.pow(10,r-3));return nt(c,a.length)}},Mn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jm={G:function(e,a,r){const i=e.getFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(e,a,r){if(a==="yo"){const i=e.getFullYear(),c=i>0?i:1-i;return r.ordinalNumber(c,{unit:"year"})}return Ir.y(e,a)},Y:function(e,a,r,i){const c=Kf(e,i),s=c>0?c:1-c;if(a==="YY"){const u=s%100;return nt(u,2)}return a==="Yo"?r.ordinalNumber(s,{unit:"year"}):nt(s,a.length)},R:function(e,a){const r=Yf(e);return nt(r,a.length)},u:function(e,a){const r=e.getFullYear();return nt(r,a.length)},Q:function(e,a,r){const i=Math.ceil((e.getMonth()+1)/3);switch(a){case"Q":return String(i);case"QQ":return nt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,a,r){const i=Math.ceil((e.getMonth()+1)/3);switch(a){case"q":return String(i);case"qq":return nt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,a,r){const i=e.getMonth();switch(a){case"M":case"MM":return Ir.M(e,a);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(e,a,r){const i=e.getMonth();switch(a){case"L":return String(i+1);case"LL":return nt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(e,a,r,i){const c=rk(e,i);return a==="wo"?r.ordinalNumber(c,{unit:"week"}):nt(c,a.length)},I:function(e,a,r){const i=tk(e);return a==="Io"?r.ordinalNumber(i,{unit:"week"}):nt(i,a.length)},d:function(e,a,r){return a==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ir.d(e,a)},D:function(e,a,r){const i=ek(e);return a==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):nt(i,a.length)},E:function(e,a,r){const i=e.getDay();switch(a){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(e,a,r,i){const c=e.getDay(),s=(c-i.weekStartsOn+8)%7||7;switch(a){case"e":return String(s);case"ee":return nt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(c,{width:"short",context:"formatting"});case"eeee":default:return r.day(c,{width:"wide",context:"formatting"})}},c:function(e,a,r,i){const c=e.getDay(),s=(c-i.weekStartsOn+8)%7||7;switch(a){case"c":return String(s);case"cc":return nt(s,a.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(c,{width:"narrow",context:"standalone"});case"cccccc":return r.day(c,{width:"short",context:"standalone"});case"cccc":default:return r.day(c,{width:"wide",context:"standalone"})}},i:function(e,a,r){const i=e.getDay(),c=i===0?7:i;switch(a){case"i":return String(c);case"ii":return nt(c,a.length);case"io":return r.ordinalNumber(c,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(e,a,r){const c=e.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},b:function(e,a,r){const i=e.getHours();let c;switch(i===12?c=Mn.noon:i===0?c=Mn.midnight:c=i/12>
19=1?"pm":"am",a){case"b":case"bb":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(e,a,r){const i=e.getHours();let c;switch(i>=17?c=Mn.evening:i>=12?c=Mn.afternoon:i>=4?c=Mn.morning:c=Mn.night,a){case"B":case"BB":case"BBB":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(e,a,r){if(a==="ho"){let i=e.getHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Ir.h(e,a)},H:function(e,a,r){return a==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ir.H(e,a)},K:function(e,a,r){const i=e.getHours()%12;return a==="Ko"?r.ordinalNumber(i,{unit:"hour"}):nt(i,a.length)},k:function(e,a,r){let i=e.getHours();return i===0&&(i=24),a==="ko"?r.ordinalNumber(i,{unit:"hour"}):nt(i,a.length)},m:function(e,a,r){return a==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ir.m(e,a)},s:function(e,a,r){return a==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ir.s(e,a)},S:function(e,a){return Ir.S(e,a)},X:function(e,a,r){const i=e.getTimezoneOffset();if(i===0)return"Z";switch(a){case"X":return eh(i);case"XXXX":case"XX":return $r(i);case"XXXXX":case"XXX":default:return $r(i,":")}},x:function(e,a,r){const i=e.getTimezoneOffset();switch(a){case"x":return eh(i);case"xxxx":case"xx":return $r(i);case"xxxxx":case"xxx":default:return $r(i,":")}},O:function(e,a,r){const i=e.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+Xm(i,":");case"OOOO":default:return"GMT"+$r(i,":")}},z:function(e,a,r){const i=e.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+Xm(i,":");case"zzzz":default:return"GMT"+$r(i,":")}},t:function(e,a,r){const i=Math.trunc(e.getTime()/1e3);return nt(i,a.length)},T:function(e,a,r){const i=e.getTime();return nt(i,a.length)}};function Xm(e,a=""){const r=e>0?"-":"+",i=Math.abs(e),c=Math.trunc(i/60),s=i%60;return s===0?r+String(c):r+String(c)+a+nt(s,2)}function eh(e,a){return e%60===0?(e>0?"-":"+")+nt(Math.abs(e)/60,2):$r(e,a)}function $r(e,a=""){const r=e>0?"-":"+",i=Math.abs(e),c=nt(Math.trunc(i/60),2),s=nt(i%60,2);return r+c+a+s}const th=(e,a)=>{switch(e){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},Qf=(e,a)=>{switch(e){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},nk=(e,a)=>{const r=e.match(/(P+)(p+)?/)||[],i=r[1],c=r[2];if(!c)return th(e,a);let s;switch(i){case"P":s=a.dateTime({width:"short"});break;case"PP":s=a.dateTime({width:"medium"});break;case"PPP":s=a.dateTime({width:"long"});break;case"PPPP":default:s=a.dateTime({width:"full"});break}return s.replace("{{date}}",th(i,a)).replace("{{time}}",Qf(c,a))},ok={p:Qf,P:nk},ik=/^D+$/,ck=/^Y+$/,lk=["D","DD","YY","YYYY"];function sk(e){return ik.test(e)}function dk(e){return ck.test(e)}function uk(e,a,r){const i=pk(e,a,r);if(console.warn(i),lk.includes(e))throw new RangeError(i)}function pk(e,a,r){const i=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${a}\`) for formatting ${i} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fk=/^'([^]*?)'?$/,gk=/''/g,yk=/[a-zA-Z]/;function Xo(e,a,r){var _,w,b,v;const i=Bc(),c=i.locale??XP,s=i.firstWeekContainsDate??((w=(_=i.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??1,u=i.weekStartsOn??((v=(b=i.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0,h=mr(e);if(!xP(h))throw new RangeError("Invalid time value");let f=a.match(hk).map(C=>{const T=C[0];if(T==="p"||T==="P"){const I=ok[T];return I(C,c.formatLong)}return C}).join("").match(mk).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const T=C[0];if(T==="'")return{isToken:!1,value:_k(C)};if(Jm[T])return{isToken:!0,value:C};
19if(T.match(yk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:C}});c.localize.preprocessor&&(f=c.localize.preprocessor(h,f));const g={firstWeekContainsDate:s,weekStartsOn:u,locale:c};return f.map(C=>{if(!C.isToken)return C.value;const T=C.value;(dk(T)||sk(T))&&uk(T,a,String(e));const I=Jm[T[0]];return I(h,T,c.localize,g)}).join("")}function _k(e){const a=e.match(fk);return a?a[1].replace(gk,"'"):e}const Fo=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:22,height:22,viewBox:"0 0 22 22",fill:"none",...e},m.createElement("path",{d:"M11 0.5L7.71875 7.71875L0.5 11L7.71875 14.2812L11 21.5L14.2812 14.2812L21.5 11L14.2812 7.71875",fill:"currentColor",fillOpacity:.9})),xk=({iconProps:e,textProps:a,...r})=>d(yd,{round:!0,color:"teal",size:"sm",height:16,gap:1,p:"0 5px 0 4px",...r,"data-cy":"_SoundsFeaturedBadge_Badge",children:[n(vt,{w:8,h:8,color:"text.primary",transition:"transform 0.3s ease-in-out",...e,"data-cy":"_SoundsFeaturedBadge_Icon",children:n(Fo,{"data-cy":"_SoundsFeaturedBadge_FeaturedIcon"})}),n(S,{fontSize:"10px",fontWeight:"semibold",color:"text.primary",lineHeight:"100%",...a,letterSpacing:"0.01em","data-cy":"_SoundsFeaturedBadge_Text",children:"NEW"})]}),Jf=({price:e,interval:a,onAdd:r,onRemove:i,isAdded:c=!1,...s})=>n(me,{borderRadius:"8",bg:c?"background.subtle.gray":"background.emphasized",p:{base:"16px",md:"24px"},borderColor:c?"border.default":"teal.600",borderWidth:"1px",w:"full",minW:106,...s,"data-cy":"_Sounds_Box",children:d(V,{justify:"space-between",align:"center",direction:"row",gap:{base:16,lg:0},"data-cy":"_Sounds_Stack",children:[d(me,{w:"full",maxW:{base:"200px",md:"none"},"data-cy":"_Sounds_Box",children:[d(V,{direction:{base:"column-reverse",md:"row"},align:{base:"start",md:"center"},mb:"4px",gap:"8px",justifyContent:"start",w:"full","data-cy":"_Sounds_Stack",children:[n(S,{textStyle:"paragraph.16.reg",fontWeight:"600","data-cy":"_Sounds_Text",children:"Premium Sound Effects"}),!c&&n(xk,{"data-cy":"_Sounds_SoundsFeaturedBadge"})]}),n(S,{textStyle:"UI.12.reg","data-cy":"_Sounds_Text",children:`${e}/${a} ⢠Unlimited use of 150,000+ sound effects`})]}),c?n(ne,{variant:"outline",onClick:i,alignSelf:{base:"start",lg:"center"},w:"auto","data-cy":"_Sounds_Button",children:"Remove"}):n(ne,{variant:"filledBrand",onClick:r,alignSelf:{base:"start",lg:"center"},w:"auto","data-cy":"_Sounds_Button_8",children:"Add Sounds"})]})}),ah={year:{id:1,label:"Annual, Pay in Full",name:"year",value:"year"},month:{id:2,label:"Annual, 12 Installments",name:"month",value:"month"}},bk=({subscriptionOptions:e,planType:a,defaultPlanType:r,isTrialAllowed:i,onRemoveCoupon:c,onSelectPlanType:s,isLoading:u,upgradeDetails:h,setIsCartFormOpen:f,setIsSFXAdded:g,isSFXAdded:_,services:w,soundsAdditionPreview:b,currentTermEnabledServices:v=[]})=>{var we,le;const C=Oa(K=>K.isServiceAddition),T=Oa(K=>K.isSingleSongUpsellOffer),I=m.useMemo(()=>!!C&&!(b!=null&&b.price),[C,b]),O=m.useMemo(()=>{if(C)return(b==null?void 0:b.price.due_today)||"0.00";const K=e.dueToday.month,se=e.dueToday.year;return a==="month"?K:se},[e,a,C,b]),D=m.useMemo(()=>{if(C)return(b==null?void 0:b.price.sub_total)||"0.00";const K=e.subTotal.month,se=e.subTotal.year;return a==="month"?K:se},[e,a,C,b]),A=m.useMemo(()=>{if(C)return(b==null?void 0:b.price.total)||"0.00";const K=e.total.month,se=e.total.year;return a==="month"?K:se},[e,a,C,b]),E=m.useMemo(()=>{const K=e.next_payment.month,se=e.next_payment.year;return a==="month"?K:se},[e,a]),R=m.useMemo(()=>{if(C)return(b==null?void 0:b.price.tax)||"0.00";const K=e.vat.month,se=e.vat.year;return a==="month"?K:se},[e,a]),k=m.useMemo(()=>{var ae,q;const K=(ae=e.couponDiscount)==null?void 0:ae.month,se=(q=e.couponDiscount)==null?void 0:q.year;return a==="month"?K:se},[e,a]),z=m.useMemo(()=>{if(parseFloat((h==null?void 0:h.upgrade_credits_total)||"0")>0)return h==null?void 0:h.upgrade_credits_total},[h,C,b]),Q=m.useMemo(()=>i?"14-Day Free Trial":a==="month"?"1 of 12 installments":"One payment of",[i,A]),N=()=>{g==null||g(!0)},W=()=>{g==null||g(!1)},Y=(le=(we=e.servicesPricing)==null?void 0:we.find(K=>K.type.value==="sound-effects"))==null?void 0:le.price,oe=parseFloat(A)>0&&A!==D,Se=u||I,ce=v.some(K=>K.type==="sound-effects");return d(G,{p:{base:"0 0 80px",md:"48px"},justifyContent:"center",h:"100%",maxW:"100%",backgroundColor:"background.controls.modal",w:{base:"100%",lg:606},position:"relative","data-cy":"_CartItem_Flex",children:[n(k4,{id:"standard-coverage-tooltip",place:"top",style:{zIndex:1},"data-cy":"_CartItem_Tooltip"}),d(Me,{w:"full",alignSelf:"stretch",justifyContent:"space-between","data-cy":"_CartItem_VStack",children:[d(G,{direction:"column",w:"full",h:"full",textAlign:"left",maxW:"100%","data-cy":"_CartItem_Flex",children:[n(S,{textStyle:"heading.24.semi",mb:"24px","data-cy":"_CartItem_Text",children:"Checkout"}
19),C&&d(G,{alignItems:"flex-start",gap:4,p:"12px 12px 16px",mb:8,borderRadius:4,bgColor:"background.subtle.blue",border:"1px solid",borderColor:"border.subtle.blue","data-cy":"_CartItem_Flex",children:[n(wf,{size:16,style:{marginTop:4},"data-cy":"_CartItem_EqualizerIcon"}),d(V,{gap:4,"data-cy":"_CartItem_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_CartItem_Text",children:"Added Sounds to your subscription"}),n(S,{textStyle:"UI.12.reg","data-cy":"_CartItem_Text_9",children:"A pro-rated cost is due today for the remainder of this month."})]})]}),d(Me,{gapY:"8px","data-cy":"_CartItem_VStack",children:[d(me,{borderRadius:"8",bg:"background.subtle.gray",p:{base:"16px",md:"24px"},borderColor:"border.default",borderWidth:"1px",w:"full","data-cy":"_CartItem_Box",children:[n(S,{textStyle:"paragraph.16.reg",fontWeight:"600",mb:"16px","data-cy":"_CartItem_Text",children:"Annual Subscription"}),d(pr,{templateColumns:"75px 1fr",rowGap:"8px",columnGap:"24px","data-cy":"_CartItem_Grid",children:[n(S,{textStyle:"UI.12.reg",textTransform:"capitalize","data-cy":"_CartItem_Text",children:e.entityType||"Type"}),d(Fe,{justify:"space-between","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.12.reg",textTransform:"capitalize",color:"text.secondary","data-cy":"_CartItem_Text",children:e.entity}),n(S,{textStyle:"UI.12.reg",textDecor:"underline",cursor:"default","data-html":!0,"data-multiline":!0,"data-tooltip-id":"standard-coverage-tooltip","data-tooltip-html":"<div style='font-size: 12px; padding: 12px; font-family: Aktiv Grotesk, aktiv-grotesk, sans-serif; line-height: 12px; width: 230px; text-align: left'><p style='font-size: 12px; font-weight: 600;'>Standard Coverage Includes</p> <ul style='padding: 0 0 0 22px; font-size: 10px;'><li>Web/Social Accounts (up to 1M followers) </li><li>Industrial* </li><li>Internal* </li><li>Podcast (up to 10k downloads/mo) </li></ul><p style='font-size: 10px; font-weight: 400; font-style: italic'>*These distributions are not covered in Wedding<br />and YouTube Creator / Podcast licenses<br /> without client work.</p></div>","data-cy":"_CartItem_Text_17",children:"What's Covered?"})]}),n(S,{textStyle:"UI.12.reg",textTransform:"capitalize","data-cy":"_CartItem_Text_18",children:"Distribution"}),n(S,{textStyle:"UI.12.reg",textTransform:"capitalize",color:"text.secondary","data-cy":"_CartItem_Text_19",children:"Covers all Standard Uses"}),e.clientSize&&d(ve,{children:[n(S,{textStyle:"UI.12.reg",textTransform:"capitalize","data-cy":"_CartItem_Text_20",children:"Client Size"}),n(S,{textStyle:"UI.12.reg",textTransform:"capitalize",color:"text.secondary","data-cy":"_CartItem_Text_21",children:e.clientSize})]}),(C||ce)&&d(ve,{children:[n(S,{textStyle:"UI.12.reg",textTransform:"capitalize","data-cy":"_CartItem_Text_22",children:"Sounds"}),n(S,{textStyle:"UI.12.reg",textTransform:"capitalize",color:"text.secondary","data-cy":"_CartItem_Text_23",children:"Included"})]})]})]}),!C&&(w==null?void 0:w.map((K,se)=>{if(K.type.value==="sound-effects")return n(Jf,{interval:a,price:`$${K.price[a]}`,onAdd:N,onRemove:W,isAdded:_,"data-cy":"_CartItem_SoundsServiceCard"},se)}))]}),n(gt,{color:"border.default",my:"31px",w:"full","data-cy":"_CartItem_Separator"}),i&&d(ve,{children:[d(Fe,{w:"full",align:"start",justify:"space-between","data-cy":"_CartItem_HStack",children:[d(Me,{align:"start",gap:"0","data-cy":"_CartItem_VStack",children:[n(S,{textStyle:"UI.14.semi",mb:"4px","data-cy":"_CartItem_Text",children:"Free Trial"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_CartItem_Text_29",children:"3 free songs included in your trial"})]}),n(S,{textStyle:"UI.14.semi",minW:"60px","data-cy":"_CartItem_Text_30",children:"14 days"})]}),n(gt,{color:"border.default",my:"31px",w:"full","data-cy":"_CartItem_Separator"})]}),!C&&d(ve,{children:[d(G,{w:"full",direction:{base:"column",md:"row"},align:{base:"start",md:"center"},justify:"space-between","data-cy":"_CartItem_Flex",children:[n(G,{w:"full",direction:{base:"row",md:"column"},justify:{base:"space-between",md:"start"},"data-cy":"_CartItem_Flex_33",children:n(S,{textStyle:"UI.14.semi",mb:"4px","data-cy":"_CartItem_Text",children:"Billing Options"})}),n(me,{mt:{base:"22px",md:"0px"}
19,w:"full",maxW:{base:"100%",md:160},placeSelf:"end","data-cy":"_CartItem_Box",children:n(Is,{variant:"secondary",noBorderEffect:!0,placeholder:"Billing Option",options:Object.keys(e.subTotal).map(K=>ah[K]),defaultValue:ah[r],onChange:({value:K})=>s==null?void 0:s(K),isSearchable:!1,"data-cy":"_CartItem_DropdownSelect"})})]}),n(gt,{color:"border.default",my:"31px",w:"full","data-cy":"_CartItem_Separator"})]}),Se?d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(Ne,{h:16,w:50,"data-cy":"_CartItem_Skeleton"}),n(Ne,{h:16,w:70,"data-cy":"_CartItem_Skeleton_40"})]}):n(ve,{children:d(Me,{gap:"16px",w:"full","data-cy":"_CartItem_VStack",children:[_&&Y&&d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Sounds"}),d(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_44",children:["$",it(Y[a]||"0",{separator:",",precision:2}).format()]})]}),d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:oe?"Subtotal":"Total"}),d(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_47",children:["$",it(D,{separator:",",precision:2}).format()]})]}),!!z&&d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{mr:"16px",textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Credits"}),d(S,{textStyle:"UI.14.reg",color:"text.colored.teal","data-cy":"_CartItem_Text_50",children:["-",it(parseFloat(z),{formatWithSymbol:!0,separator:",",precision:2}).format()]})]}),e.couponDiscount&&k?d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[d(G,{align:"center","data-cy":"_CartItem_Flex",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:T?"Discount":"Coupon"}),!T&&n(S,{textStyle:"UI.12.reg",color:"text.colored.teal",cursor:"pointer",ml:"10px",pt:"2px",onClick:c,"data-cy":"_CartItem_Text_54",children:"Remove Coupon"})]}),d(S,{textStyle:"UI.14.semi","data-cy":"_CartItem_Text_55",children:["$",k]})]}):e.referralDiscount&&k?d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Referral Discount"}),d(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_58",children:["$",k]})]}):null,C&&(b==null?void 0:b.price.discount)!=="0.00"&&(b==null?void 0:b.price.discount)&&d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Discount"}),d(S,{textStyle:"UI.14.reg",color:"text.colored.teal","data-cy":"_CartItem_Text_61",children:["-",it(parseFloat(b.price.discount),{formatWithSymbol:!0,separator:",",precision:2}).format()]})]}),R!=="0.00"&&d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Tax"}),d(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_64",children:["$",R]})]}),oe&&d(Fe,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_HStack",children:[n(S,{mr:"16px",textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"Total"}),n(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_67",children:it(A,{formatWithSymbol:!0,separator:",",precision:2}).format()})]})]})}),i&&a==="month"&&!Se&&n(Uv,{inline:8,mt:16,"data-cy":"_CartItem_Bleed",children:d(Fe,{w:"full",justify:"space-between",align:"center",bg:"background.panel",p:8,"data-cy":"_CartItem_HStack",children:[n(S,{mr:"16px",textStyle:"UI.14.reg","data-cy":"_CartItem_Text",children:"12 monthly installments"}),d(S,{textStyle:"UI.14.reg","data-cy":"_CartItem_Text_71",children:["$",it(parseFloat(A)/12,{separator:",",precision:2}).format()]})]})}),n(gt,{color:"border.default",my:"31px",w:"full","data-cy":"_CartItem_Separator"}),d(G,{w:"full",justify:"space-between",align:"center","data-cy":"_CartItem_Flex",children:[d(Me,{gap:4,align:"start","data-cy":"_CartItem_VStack",children:[n(S,{textStyle:{base
19:"UI.14.semi",md:"heading.16.semi"},"data-cy":"_CartItem_Text",children:"Due Today"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_CartItem_Text_76",children:Q})]}),n(G,{align:"start",justify:"end",minW:"120px","data-cy":"_CartItem_Flex",children:Se?n(Ne,{h:48,w:140,id:"due-today-amount-loading-skeleton","data-cy":"_CartItem_Skeleton"}):d(S,{textStyle:"heading.40.reg",id:"due-today-amount","data-cy":"_CartItem_Text",children:["$",it(O||"0",{separator:",",precision:2}).format()]})})]}),d(Me,{align:"center",mt:"28px","data-cy":"_CartItem_VStack",children:[n(me,{mt:"16px",w:"full",hideFrom:"md","data-cy":"_CartItem_Box",children:n(u0,{setIsCartFormOpen:f,isSusbcription:!0,"data-cy":"_CartItem_OpenMobileCartFormButton"})}),E!=="0.00"&&d(S,{textStyle:"paragraph.14.reg",color:"text.secondary",textAlign:"center",maxW:"414px","data-cy":"_CartItem_Text",children:["Your rate is based on an annual agreement and your ",i?"first":"next"," payment will be charged to your card on ",n("strong",{"data-cy":"_CartItem_strong",children:Xo(E,"PPP")})]})]})]}),n(Va,{mt:"24px",hideBelow:"md","data-cy":"_CartItem_Center",children:n(Ln,{"data-cy":"_CartItem_TrustPilotWidget"})})]})]})},Sk=(e,a,r)=>{var c,s,u,h,f,g,_,w,b,v,C,T,I,O,D,A,E,R,k,z,Q,N,W,Y,oe,Se,ce,we,le,K,se,ae,q,xe,Ce,ge,Be,ie,J,re,fe,ke,$e,X,ee,ue,pe,de,Ke,Wa,fr,M,sn,Ia,dn,Rt,un,gr,pn,Xa,ra,Lr,Ma,pa,Na,Ot,ma,yr;const i=(s=(c=r==null?void 0:r.licenses)==null?void 0:c[0])==null?void 0:s.license_data;return{servicesPricing:((u=e.data)==null?void 0:u.services)||[],entityType:((f=(h=e.data)==null?void 0:h.full_name)==null?void 0:f.entity_type)||((_=(g=a==null?void 0:a.license)==null?void 0:g.license_id)==null?void 0:_.entity_type)||(i==null?void 0:i.entity_type)||"",entity:((b=(w=e.data)==null?void 0:w.full_name)==null?void 0:b.entity)||((C=(v=a==null?void 0:a.license)==null?void 0:v.license_id)==null?void 0:C.entity)||(i==null?void 0:i.entity)||"",clientSize:((I=(T=e.data)==null?void 0:T.full_name)==null?void 0:I.company_size)||((D=(O=a==null?void 0:a.license)==null?void 0:O.license_id)==null?void 0:D.company_size)||((E=(A=e.data)==null?void 0:A.full_name)==null?void 0:E.client_size)||((k=(R=a==null?void 0:a.license)==null?void 0:R.license_id)==null?void 0:k.client_size)||((z=i==null?void 0:i.end_client_size)==null?void 0:z.name)||"",dueToday:{month:((N=(Q=e.data)==null?void 0:Q.due_today)==null?void 0:N.month)||"",year:((Y=(W=e.data)==null?void 0:W.due_today)==null?void 0:Y.year)||""},subTotal:{month:((Se=(oe=e.data)==null?void 0:oe.sub_total)==null?void 0:Se.month)||((le=(we=(ce=a.subscriptions)==null?void 0:ce[0])==null?void 0:we.price)==null?void 0:le.month)||"0.00",year:((se=(K=e.data)==null?void 0:K.sub_total)==null?void 0:se.year)||((xe=(q=(ae=a.subscriptions)==null?void 0:ae[0])==null?void 0:q.price)==null?void 0:xe.year)||"0.00"},total:{month:((ge=(Ce=e.data)==null?void 0:Ce.total)==null?void 0:ge.month)||((J=(ie=(Be=a.subscriptions)==null?void 0:Be[0])==null?void 0:ie.price)==null?void 0:J.month)||"0.00",year:((fe=(re=e.data)==null?void 0:re.total)==null?void 0:fe.year)||((X=($e=(ke=a.subscriptions)==null?void 0:ke[0])==null?void 0:$e.price)==null?void 0:X.year)||"0.00"},next_payment:{month:((ue=(ee=e.data)==null?void 0:ee.next_payment)==null?void 0:ue.month)||((Ke=(de=(pe=a.subscriptions)==null?void 0:pe[0])==null?void 0:de.next_payment)==null?void 0:Ke.month)||"0.00",year:((fr=(Wa=e.data)==null?void 0:Wa.next_payment)==null?void 0:fr.year)||((Ia=(sn=(M=a.subscriptions)==null?void 0:M[0])==null?void 0:sn.next_payment)==null?void 0:Ia.year)||"0.00"},vat:{month:((Rt=(dn=e.data)==null?void 0:dn.vat)==null?void 0:Rt.month)||"0.00",year:((gr=(un=e.data)==null?void 0:un.vat)==null?void 0:gr.year)||"0.00"},couponDiscount:(pn=e.data)!=null&&pn.coupon_applied?{month:(ra=(Xa=e.data)==null?void 0:Xa.coupon_discount)==null?void 0:ra.month,year:(Ma=(Lr=e.data)==null?void 0:Lr.coupon_discount)==null?void 0:Ma.year}:void 0,referralDiscount:(pa=e.data)!=null&&pa.referral_code_applied?{month:(Ot=(Na=e.data)==null?void 0:Na.coupon_discount)==null?void 0:Ot.month,year:(yr=(ma=e.data)==null?void 0:ma.coupon_discount)==null?void 0:yr.year}:void 0}};var bc={exports:{}};/** 20 * @license 21 * Lodash <https://lodash.com/>
vendor: 5,173 bytes, lines 22-26
22 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 23 * Released under MIT license <https://lodash.com/license> 24 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 25 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 26 */bc.exports;(function(e,a){(function(){function r(B,U,y){switch(y.length){case 0:return B.call(U);case 1:return B.call(U,y[0]);case 2:return B.call(U,y[0],y[1]);case 3:return B.call(U,y[0],y[1],y[2])}return B.apply(U,y)}function i(B,U,y,Te){for(var Oe=-1,Pe=B==null?0:B.length;++Oe<Pe;){var Zt=B[Oe];U(Te,Zt,y(Zt),B)}return Te}function c(B,U){for(var y=-1,Te=B==null?0:B.length;++y<Te&&U(B[y],y,B)!==!1;);return B}function s(B,U){for(var y=B==null?0:B.length;y--&&U(B[y],y,B)!==!1;);return B}function u(B,U){for(var y=-1,Te=B==null?0:B.length;++y<Te;)if(!U(B[y],y,B))return!1;return!0}function h(B,U){for(var y=-1,Te=B==null?0:B.length,Oe=0,Pe=[];++y<Te;){var Zt=B[y];U(Zt,y,B)&&(Pe[Oe++]=Zt)}return Pe}function f(B,U){return!!(B!=null&&B.length)&&A(B,U,0)>-1}function g(B,U,y){for(var Te=-1,Oe=B==null?0:B.length;++Te<Oe;)if(y(U,B[Te]))return!0;return!1}function _(B,U){for(var y=-1,Te=B==null?0:B.length,Oe=Array(Te);++y<Te;)Oe[y]=U(B[y],y,B);return Oe}function w(B,U){for(var y=-1,Te=U.length,Oe=B.length;++y<Te;)B[Oe+y]=U[y];return B}function b(B,U,y,Te){var Oe=-1,Pe=B==null?0:B.length;for(Te&&Pe&&(y=B[++Oe]);++Oe<Pe;)y=U(y,B[Oe],Oe,B);return y}function v(B,U,y,Te){var Oe=B==null?0:B.length;for(Te&&Oe&&(y=B[--Oe]);Oe--;)y=U(y,B[Oe],Oe,B);return y}function C(B,U){for(var y=-1,Te=B==null?0:B.length;++y<Te;)if(U(B[y],y,B))return!0;return!1}function T(B){return B.split("")}function I(B){return B.match(__)||[]}function O(B,U,y){var Te;return y(B,function(Oe,Pe,Zt){if(U(Oe,Pe,Zt))return Te=Pe,!1}),Te}function D(B,U,y,Te){for(var Oe=B.length,Pe=y+(Te?1:-1);Te?Pe--:++Pe<Oe;)if(U(B[Pe],Pe,B))return Pe;return-1}function A(B,U,y){return U===U?X(B,U,y):D(B,R,y)}function E(B,U,y,Te){for(var Oe=y-1,Pe=B.length;++Oe<Pe;)if(Te(B[Oe],U))return Oe;return-1}function R(B){return B!==B}function k(B,U){var y=B==null?0:B.length;return y?Y(B,U)/y:ii}function z(B){return function(U){return U==null?M:U[B]}}function Q(B){return function(U){return B==null?M:B[U]}}function N(B,U,y,Te,Oe){return Oe(B,function(Pe,Zt,ml){y=Te?(Te=!1,Pe):U(y,Pe,Zt,ml)}),y}function W(B,U){var y=B.length;for(B.sort(U);y--;)B[y]=B[y].value;return B}function Y(B,U){for(var y,Te=-1,Oe=B.length;++Te<Oe;){var Pe=U(B[Te]);Pe!==M&&(y=y===M?Pe:y+Pe)}return y}function oe(B,U){for(var y=-1,Te=Array(B);++y<B;)Te[y]=U(y);return Te}function Se(B,U){return _(U,function(y){return[y,B[y]]})}function ce(B){return B&&B.slice(0,de(B)+1).replace(ol,"")}function we(B){return function(U){return B(U)}}function le(B,U){return _(U,function(y){return B[y]})}function K(B,U){return B.has(U)}function se(B,U){for(var y=-1,Te=B.length;++y<Te&&A(U,B[y],0)>-1;);return y}function ae(B,U){for(var y=B.length;y--&&A(U,B[y],0)>-1;);return y}function q(B,U){for(var y=B.length,Te=0;y--;)B[y]===U&&++Te;return Te}function xe(B){return"\\"+t1[B]}function Ce(B,U){return B==null?M:B[U]}function ge(B){return G_.test(B)}function Be(B){return Y_.test(B)}function ie(B){for(var U,y=[];!(U=B.next()).done;)y.push(U.value);return y}function J(B){var U=-1,y=Array(B.size);return B.forEach(function(Te,Oe){y[++U]=[Oe,Te]}),y}function re(B,U){return function(y){return B(U(y))}}function fe(B,U){for(var y=-1,Te=B.length,Oe=0,Pe=[];++y<Te;){var Zt=B[y];Zt!==U&&Zt!==Xa||(B[y]=Xa,Pe[Oe++]=y)}return Pe}function ke(B){var U=-1,y=Array(B.size);return B.forEach(function(Te){y[++U]=Te}),y}function $e(B){var U=-1,y=Array(B.size);return B.forEach(function(Te){y[++U]=[Te,Te]}),y}function X(B,U,y){for(var Te=y-1,Oe=B.length;++Te<Oe;)if(B[Te]===U)return Te;return-1}function ee(B,U,y){for(var Te=y+1;Te--;)if(B[Te]===U)return Te;return Te}function ue(B){return ge(B)?Ke(B):o1(B)}function pe(B){return ge(B)?Wa(B):T(B)}function de(B){for(var U=B.length;U--&&h_.test(B.charAt(U)););return U}function Ke(B){for(var U=dl.lastIndex=0;dl.test(B);)++U;return U}function Wa(B){return B.match(dl)||[]}function fr(B){return B.match(Z_)||[]}var M,sn="4.17.21",Ia=200,dn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",Rt="Expected a function",un="Invalid `variable` option passed into `_.template`",gr="__lodash_hash_undefined__",pn=500,Xa="__lodash_placeholder__",ra=1,Lr=2,Ma=4,pa=1,Na=2,Ot=1,ma=2,yr=4,ha=8,_r=16,fa=32,xr=64,ga=128,Ue=256,jt=512,mn=30,oi="...",Uy=800,qy=16,iu=1,Hy=2,$y=3,Vr=1/0,br=9007199254740991,Zy=17976931348623157e292,ii=NaN,Ua=4294967295,Gy=Ua-1,Yy=Ua>>>1,Ky=[["ary",ga],["bind",Ot],["bindKey",ma],["curry",ha],["curryRight",_r],["flip",jt],["partial",fa],["partialRight",xr],["rearg",Ue]],hn="[object Arguments]",ci="[object Array]",Qy="[object AsyncFunction]",Jn="[object Boolean]",Xn="[object Date]",Jy="[object DOMException]",li="[object Error]",si="[object Function]",cu="[object GeneratorFunction]",Aa="[object Map]",eo="[object Number]",Xy="[object Null]",er="[object Object]",lu="[object Promise]",e_="[object Proxy]",to="[object RegExp]",Fa="[object Set]",ao="[object String]",di="[object Symbol]",t_="[object Undef
26ined]",ro="[object WeakMap]",a_="[object WeakSet]",no="[object ArrayBuffer]",fn="[object DataView]",Yc="[object Float32Array]",Kc="[object Float64Array]",Qc="[object Int8Array]",Jc="[object Int16Array]",Xc="[object Int32Array]",el="[object Uint8Array]",tl="[object Uint8ClampedArray]",al="[object Uint16Array]",rl="[object Uint32Array]",r_=/\b__p \+= '';/g,n_=/\b(__p \+=) '' \+/g,o_=/(__e\(.*?\)|\b__t\)) \+\n'';/g,su=/&(?:amp|lt|gt|quot|#39);/g,du=/[&<>"']/g,i_=RegExp(su.source),c_=RegExp(du.source),l_=/<%-([\s\S]+?)%>/g,s_=/<%([\s\S]+?)%>/g,uu=/<%=([\s\S]+?)%>/g,d_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u_=/^\w*$/,p_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nl=/[\\^$.*+?()[\]{}|]/g,m_=RegExp(nl.source),ol=/^\s+/,h_=/\s/,f_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,g_=/\{\n\/\* \[wrapped with (.+)\] \*/,y_=/,? & /,__=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x_=/[()=,{}\[\]\/\s]/,b_=/\\(\\)?/g,S_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pu=/\w*$/,w_=/^[-+]0x[0-9a-f]+$/i,v_=/^0b[01]+$/i,C_=/^\[object .+?Constructor\]$/,T_=/^0o[0-7]+$/i,P_=/^(?:0|[1-9]\d*)$/,k_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 4,133 bytes, line 26
267f]/g,ui=/($^)/,I_=/['\n\r\u2028\u2029\\]/g,pi="\\ud800-\\udfff",M_="\\u0300-\\u036f",A_="\\ufe20-\\ufe2f",F_="\\u20d0-\\u20ff",mu=M_+A_+F_,hu="\\u2700-\\u27bf",fu="a-z\\xdf-\\xf6\\xf8-\\xff",E_="\\xac\\xb1\\xd7\\xf7",R_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",O_="\\u2000-\\u206f",L_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gu="A-Z\\xc0-\\xd6\\xd8-\\xde",yu="\\ufe0e\\ufe0f",_u=E_+R_+O_+L_,il="['â]",V_="["+pi+"]",xu="["+_u+"]",mi="["+mu+"]",bu="\\d+",B_="["+hu+"]",Su="["+fu+"]",wu="[^"+pi+_u+bu+hu+fu+gu+"]",cl="\\ud83c[\\udffb-\\udfff]",D_="(?:"+mi+"|"+cl+")",vu="[^"+pi+"]",ll="(?:\\ud83c[\\udde6-\\uddff]){2}",sl="[\\ud800-\\udbff][\\udc00-\\udfff]",gn="["+gu+"]",Cu="\\u200d",Tu="(?:"+Su+"|"+wu+")",j_="(?:"+gn+"|"+wu+")",Pu="(?:"+il+"(?:d|ll|m|re|s|t|ve))?",ku="(?:"+il+"(?:D|LL|M|RE|S|T|VE))?",Iu=D_+"?",Mu="["+yu+"]?",z_="(?:"+Cu+"(?:"+[vu,ll,sl].join("|")+")"+Mu+Iu+")*",W_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Au=Mu+Iu+z_,U_="(?:"+[B_,ll,sl].join("|")+")"+Au,q_="(?:"+[vu+mi+"?",mi,ll,sl,V_].join("|")+")",H_=RegExp(il,"g"),$_=RegExp(mi,"g"),dl=RegExp(cl+"(?="+cl+")|"+q_+Au,"g"),Z_=RegExp([gn+"?"+Su+"+"+Pu+"(?="+[xu,gn,"$"].join("|")+")",j_+"+"+ku+"(?="+[xu,gn+Tu,"$"].join("|")+")",gn+"?"+Tu+"+"+Pu,gn+"+"+ku,N_,W_,bu,U_].join("|"),"g"),G_=RegExp("["+Cu+pi+mu+yu+"]"),Y_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,K_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Q_=-1,ct={};ct[Yc]=ct[Kc]=ct[Qc]=ct[Jc]=ct[Xc]=ct[el]=ct[tl]=ct[al]=ct[rl]=!0,ct[hn]=ct[ci]=ct[no]=ct[Jn]=ct[fn]=ct[Xn]=ct[li]=ct[si]=ct[Aa]=ct[eo]=ct[er]=ct[to]=ct[Fa]=ct[ao]=ct[ro]=!1;var ot={};ot[hn]=ot[ci]=ot[no]=ot[fn]=ot[Jn]=ot[Xn]=ot[Yc]=ot[Kc]=ot[Qc]=ot[Jc]=ot[Xc]=ot[Aa]=ot[eo]=ot[er]=ot[to]=ot[Fa]=ot[ao]=ot[di]=ot[el]=ot[tl]=ot[al]=ot[rl]=!0,ot[li]=ot[si]=ot[ro]=!1;var J_={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},X_={"&":"&","<":"<",">":">",'"':""","'":"'"},e1={"&":"&","<":"<",">":">",""":'"',"'":"'"},t1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},a1=parseFloat,r1=parseInt,Fu=typeof So=="object"&&So&&So.Object===Object&&So,n1=typeof self=="object"&&self&&self.Object===Object&&self,Lt=Fu||n1||Function("return this")(),ul=a&&!a.nodeType&&a,Br=ul&&!0&&e&&!e.nodeType&&e,Eu=Br&&Br.exports===ul,pl=Eu&&Fu.process,ya=function(){try{var B=Br&&Br.require&&Br.require("util").t
vendor: 4,746 bytes, line 26
26ypes;return B||pl&&pl.binding&&pl.binding("util")}catch{}}(),Ru=ya&&ya.isArrayBuffer,Ou=ya&&ya.isDate,Lu=ya&&ya.isMap,Vu=ya&&ya.isRegExp,Bu=ya&&ya.isSet,Du=ya&&ya.isTypedArray,o1=z("length"),i1=Q(J_),c1=Q(X_),l1=Q(e1),s1=function B(U){function y(t){if(yt(t)&&!De(t)&&!(t instanceof Pe)){if(t instanceof Oe)return t;if(rt.call(t,"__wrapped__"))return Ep(t)}return new Oe(t)}function Te(){}function Oe(t,o){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=M}function Pe(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ua,this.__views__=[]}function Zt(){var t=new Pe(this.__wrapped__);return t.__actions__=Gt(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Gt(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Gt(this.__views__),t}function ml(){if(this.__filtered__){var t=new Pe(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function d1(){var t=this.__wrapped__.value(),o=this.__dir__,l=De(t),p=o<0,x=l?t.length:0,P=xx(0,x,this.__views__),F=P.start,L=P.end,j=L-F,Z=p?L:F-1,H=this.__iteratees__,te=H.length,be=0,Ie=zt(j,this.__takeCount__);if(!l||!p&&x==j&&Ie==j)return op(t,this.__actions__);var Ee=[];e:for(;j--&&be<Ie;){Z+=o;for(var ze=-1,Re=t[Z];++ze<te;){var Ze=H[ze],Ge=Ze.iteratee,Nt=Ze.type,Jt=Ge(Re);if(Nt==Hy)Re=Jt;else if(!Jt){if(Nt==iu)continue e;break e}}Ee[be++]=Re}return Ee}function Dr(t){var o=-1,l=t==null?0:t.length;for(this.clear();++o<l;){var p=t[o];this.set(p[0],p[1])}}function u1(){this.__data__=yo?yo(null):{},this.size=0}function p1(t){var o=this.has(t)&&delete this.__data__[t];return this.size-=o?1:0,o}function m1(t){var o=this.__data__;if(yo){var l=o[t];return l===gr?M:l}return rt.call(o,t)?o[t]:M}function h1(t){var o=this.__data__;return yo?o[t]!==M:rt.call(o,t)}function f1(t,o){var l=this.__data__;return this.size+=this.has(t)?0:1,l[t]=yo&&o===M?gr:o,this}function tr(t){var o=-1,l=t==null?0:t.length;for(this.clear();++o<l;){var p=t[o];this.set(p[0],p[1])}}function g1(){this.__data__=[],this.size=0}function y1(t){var o=this.__data__,l=hi(o,t);return!(l<0)&&(l==o.length-1?o.pop():Ni.call(o,l,1),--this.size,!0)}function _1(t){var o=this.__data__,l=hi(o,t);return l<0?M:o[l][1]}function x1(t){return hi(this.__data__,t)>-1}function b1(t,o){var l=this.__data__,p=hi(l,t);return p<0?(++this.size,l.push([t,o])):l[p][1]=o,this}function ar(t){var o=-1,l=t==null?0:t.length;for(this.clear();++o<l;){var p=t[o];this.set(p[0],p[1])}}function S1(){this.size=0,this.__data__={hash:new Dr,map:new(fo||tr),string:new Dr}}function w1(t){var o=Pi(this,t).delete(t);return this.size-=o?1:0,o}function v1(t){return Pi(this,t).get(t)}function C1(t){return Pi(this,t).has(t)}function T1(t,o){var l=Pi(this,t),p=l.size;return l.set(t,o),this.size+=l.size==p?0:1,this}function jr(t){var o=-1,l=t==null?0:t.length;for(this.__data__=new ar;++o<l;)this.add(t[o])}function P1(t){return this.__data__.set(t,gr),this}function k1(t){return this.__data__.has(t)}function Ea(t){this.size=(this.__data__=new tr(t)).size}function I1(){this.__data__=new tr,this.size=0}function M1(t){var o=this.__data__,l=o.delete(t);return this.size=o.size,l}function A1(t){return this.__data__.get(t)}function F1(t){return this.__data__.has(t)}function E1(t,o){var l=this.__data__;if(l instanceof tr){var p=l.__data__;if(!fo||p.length<Ia-1)return p.push([t,o]),this.size=++l.size,this;l=this.__data__=new ar(p)}return l.set(t,o),this.size=l.size,this}function ju(t,o){var l=De(t),p=!l&&Hr(t),x=!l&&!p&&Pr(t),P=!l&&!p&&!x&&kn(t),F=l||p||x||P,L=F?oe(t.length,IS):[],j=L.length;for(var Z in t)!o&&!rt.call(t,Z)||F&&(Z=="length"||x&&(Z=="offset"||Z=="parent")||P&&(Z=="buffer"||Z=="byteLength"||Z=="byteOffset")||ir(Z,j))||L.push(Z);return L}function zu(t){var o=t.length;return o?t[vl(0,o-1)]:M}function R1(t,o){return ki(Gt(t),zr(o,0,t.length))}function O1(t){return ki(Gt(t))}function hl(t,o,l){(l===M||Ra(t[o],l))&&(l!==M||o in t)||rr(t,o,l)}function oo(t,o,l){var p=t[o];rt.call(t,o)&&Ra(p,l)&&(l!==M||o in t)||rr(t,o,l)}function hi(t,o){for(var l=t.length;l--;)if(Ra(t[l][0],o))return l;return-1}function L1(t,o,l,p){return Tr(t,function(x,P,F){o(p,x,l(x),F)}),p}function Wu(t,o){return t&&Ha(o,Mt(o),t)}function V1(t,o){return t&&Ha(o,Kt(o),t)}function rr(t,o,l){o=="__proto__"&&Ui?Ui(t,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):t[o]=l}function fl(t,o){for(var l=-1,p=o.length,x=Tt(p),P=t==null;++l<p;)x[l]=P?M:Nl(t,o[l]);return x}function zr(t,o,l){return t===t&&(l!==M&&(t=t<=l?t:l),o!==M&&(t=t>=o?t:o)),t}function _a(t,o,l,p,x,P){var F,L=o&ra,j=o&Lr,Z=o&Ma;if(l&&(F=x?l(t,p,x,P):l(t)),F!==M)return F;if(!ft(t))return t;var H=De(t);
vendor: 3,362 bytes, line 26
26if(H){if(F=Sx(t),!L)return Gt(t,F)}else{var te=Wt(t),be=te==si||te==cu;if(Pr(t))return cp(t,L);if(te==er||te==hn||be&&!x){if(F=j||be?{}:Tp(t),!L)return j?ux(t,V1(F,t)):dx(t,Wu(F,t))}else{if(!ot[te])return x?t:{};F=wx(t,te,L)}}P||(P=new Ea);var Ie=P.get(t);if(Ie)return Ie;P.set(t,F),wm(t)?t.forEach(function(Re){F.add(_a(Re,o,l,Re,t,P))}):Sm(t)&&t.forEach(function(Re,Ze){F.set(Ze,_a(Re,o,l,Ze,t,P))});var Ee=Z?j?Ol:Rl:j?Kt:Mt,ze=H?M:Ee(t);return c(ze||t,function(Re,Ze){ze&&(Ze=Re,Re=t[Ze]),oo(F,Ze,_a(Re,o,l,Ze,t,P))}),F}function B1(t){var o=Mt(t);return function(l){return Nu(l,t,o)}}function Nu(t,o,l){var p=l.length;if(t==null)return!p;for(t=lt(t);p--;){var x=l[p],P=o[x],F=t[x];if(F===M&&!(x in t)||!P(F))return!1}return!0}function Uu(t,o,l){if(typeof t!="function")throw new wa(Rt);return xo(function(){t.apply(M,l)},o)}function io(t,o,l,p){var x=-1,P=f,F=!0,L=t.length,j=[],Z=o.length;if(!L)return j;l&&(o=_(o,we(l))),p?(P=g,F=!1):o.length>=Ia&&(P=K,F=!1,o=new jr(o));e:for(;++x<L;){var H=t[x],te=l==null?H:l(H);if(H=p||H!==0?H:0,F&&te===te){for(var be=Z;be--;)if(o[be]===te)continue e;j.push(H)}else P(o,te,p)||j.push(H)}return j}function D1(t,o){var l=!0;return Tr(t,function(p,x,P){return l=!!o(p,x,P)}),l}function fi(t,o,l){for(var p=-1,x=t.length;++p<x;){var P=t[p],F=o(P);if(F!=null&&(L===M?F===F&&!oa(F):l(F,L)))var L=F,j=P}return j}function j1(t,o,l,p){var x=t.length;for(l=We(l),l<0&&(l=-l>x?0:x+l),p=p===M||p>x?x:We(p),p<0&&(p+=x),p=l>p?0:Kp(p);l<p;)t[l++]=o;return t}function qu(t,o){var l=[];return Tr(t,function(p,x,P){o(p,x,P)&&l.push(p)}),l}function Vt(t,o,l,p,x){var P=-1,F=t.length;for(l||(l=Cx),x||(x=[]);++P<F;){var L=t[P];o>0&&l(L)?o>1?Vt(L,o-1,l,p,x):w(x,L):p||(x[x.length]=L)}return x}function qa(t,o){return t&&ts(t,o,Mt)}function gl(t,o){return t&&mm(t,o,Mt)}function gi(t,o){return h(o,function(l){return cr(t[l])})}function Wr(t,o){o=wr(o,t);for(var l=0,p=o.length;t!=null&&l<p;)t=t[$a(o[l++])];return l&&l==p?t:M}function Hu(t,o,l){var p=o(t);return De(t)?p:w(p,l(t))}function Ut(t){return t==null?t===M?t_:Xy:qr&&qr in lt(t)?_x(t):Ax(t)}function yl(t,o){return t>o}function z1(t,o){return t!=null&&rt.call(t,o)}function W1(t,o){return t!=null&&o in lt(t)}function N1(t,o,l){return t>=zt(o,l)&&t<Pt(o,l)}function _l(t,o,l){for(var p=l?g:f,x=t[0].length,P=t.length,F=P,L=Tt(P),j=1/0,Z=[];F--;){var H=t[F];F&&o&&(H=_(H,we(o))),j=zt(H.length,j),L[F]=!l&&(o||x>=120&&H.length>=120)?new jr(F&&H):M}H=t[0];var te=-1,be=L[0];e:for(;++te<x&&Z.length<j;){var Ie=H[te],Ee=o?o(Ie):Ie;if(Ie=l||Ie!==0?Ie:0,!(be?K(be,Ee):p(Z,Ee,l))){for(F=P;--F;){var ze=L[F];if(!(ze?K(ze,Ee):p(t[F],Ee,l)))continue e}be&&be.push(Ee),Z.push(Ie)}}return Z}function U1(t,o,l,p){return qa(t,function(x,P,F){o(p,l(x),P,F)}),p}function co(t,o,l){o=wr(o,t),t=Mp(t,o);var p=t==null?t:t[$a(ba(o))];return p==null?M:r(p,t,l)}function $u(t){return yt(t)&&Ut(t)==hn}function q1(t){return yt(t)&&Ut(t)==no}function H1(t){return yt(t)&&Ut(t)==Xn}function lo(t,o,l,p,x){return t===o||(t==null||o==null||!yt(t)&&!yt(o)?t!==t&&o!==o:$1(t,o,l,p,lo,x))}function $1(t,o,l,p,x,P){var F=De(t),L=De(o),j=F?ci:Wt(t),Z=L?ci:Wt(o);j=j==hn?er:j,Z=Z==hn?er:Z;var H=j==er,te=Z==er,be=j==Z;if(be&&Pr(t)){if(!Pr(o))return!1;F=!0,H=!1}if(be&&!H)return P||(P=new Ea),F||kn(t)?vp(t,o,l,p,x,P):gx(t,o,j,l,p,x,P);if(!(l&pa)){var Ie=H&&rt.call(t,"__wrapped__"),Ee=te&&rt.call(o,"__wrapped__");
26if(Ie||Ee){var ze=Ie?t.value():t,Re=Ee?o.value():o;return P||(P=new Ea),x(ze,Re,l,p,P)}}return!!be&&(P||(P=new Ea),yx(t,o,l,p,x,P))}function Z1(t){return yt(t)&&Wt(t)==Aa}function xl(t,o,l,p){var x=l.length,P=x,F=!p;if(t==null)return!P;for(t=lt(t);x--;){var L=l[x];if(F&&L[2]?L[1]!==t[L[0]]:!(L[0]in t))return!1}for(;++x<P;){L=l[x];var j=L[0],Z=t[j],H=L[1];if(F&&L[2]){if(Z===M&&!(j in t))return!1}else{var te=new Ea;if(p)var be=p(Z,H,j,t,o,te);if(!(be===M?lo(H,Z,pa|Na,p,te):be))return!1}}return!0}function Zu(t){return!(!ft(t)||Px(t))&&(cr(t)?RS:C_).test(Ur(t))}function G1(t){return yt(t)&&Ut(t)==to}function Y1(t){return yt(t)&&Wt(t)==Fa}function K1(t){return yt(t)&&Ei(t.length)&&!!ct[Ut(t)]}function Gu(t){return typeof t=="function"?t:t==null?Qt:typeof t=="object"?De(t)?Qu(t[0],t[1]):Ku(t):am(t)}function bl(t){if(!po(t))return jS(t);var o=[];for(var l in lt(t))rt.call(t,l)&&l!="constructor"&&o.push(l);return o}function Q1(t){if(!ft(t))return Mx(t);var o=po(t),l=[];for(var p in t)(p!="constructor"||!o&&rt.call(t,p))&&l.push(p);return l}function Sl(t,o){return t<o}function Yu(t,o){var l=-1,p=Yt(t)?Tt(t.length):[];return Tr(t,function(x,P,F){p[++l]=o(x,P,F)}),p}function Ku(t){var o=Ll(t);return o.length==1&&o[0][2]?kp(o[0][0],o[0][1]):function(l){return l===t||xl(l,t,o)}}function Qu(t,o){return Vl(t)&&Pp(o)?kp($a(t),o):function(l){var p=Nl(l,t);return p===M&&p===o?Ul(l,t):lo(o,p,pa|Na)}}function yi(t,o,l,p,x){t!==o&&ts(o,function(P,F){if(x||(x=new Ea),ft(P))J1(t,o,F,l,yi,p,x);else{var L=p?p(Dl(t,F),P,F+"",t,o,x):M;L===M&&(L=P),hl(t,F,L)}},Kt)}function J1(t,o,l,p,x,P,F){var L=Dl(t,l),j=Dl(o,l),Z=F.get(j);if(Z)return hl(t,l,Z),M;var H=P?P(L,j,l+"",t,o,F):M,te=H===M;if(te){var be=De(j),Ie=!be&&Pr(j),Ee=!be&&!Ie&&kn(j);H=j,be||Ie||Ee?De(L)?H=L:xt(L)?H=Gt(L):Ie?(te=!1,H=cp(j,!0)):Ee?(te=!1,H=lp(j,!0)):H=[]:mo(j)||Hr(j)?(H=L,Hr(L)?H=Qp(L):ft(L)&&!cr(L)||(H=Tp(j))):te=!1}te&&(F.set(j,H),x(H,j,p,P,F),F.delete(j)),hl(t,l,H)}function Ju(t,o){var l=t.length;if(l)return o+=o<0?l:0,ir(o,l)?t[o]:M}function Xu(t,o,l){o=o.length?_(o,function(x){return De(x)?function(P){return Wr(P,x.length===1?x[0]:x)}:x}):[Qt];var p=-1;return o=_(o,we(Ve())),W(Yu(t,function(x,P,F){return{criteria:_(o,function(L){return L(x)}),index:++p,value:x}}),function(x,P){return sx(x,P,l)})}function X1(t,o){return ep(t,o,function(l,p){return Ul(t,p)})}function ep(t,o,l){for(var p=-1,x=o.length,P={};++p<x;){var F=o[p],L=Wr(t,F);l(L,F)&&so(P,wr(F,t),L)}return P}function ex(t){return function(o){return Wr(o,t)}}function wl(t,o,l,p){var x=p?E:A,P=-1,F=o.length,L=t;for(t===o&&(o=Gt(o)),l&&(L=_(t,we(l)));++P<F;)for(var j=0,Z=o[P],H=l?l(Z):Z;(j=x(L,H,j,p))>-1;)L!==t&&Ni.call(L,j,1),Ni.call(t,j,1);return t}function tp(t,o){for(var l=t?o.length:0,p=l-1;l--;){var x=o[l];if(l==p||x!==P){var P=x;ir(x)?Ni.call(t,x,1):Pl(t,x)}}return t}function vl(t,o){return t+Hi(dm()*(o-t+1))}function tx(t,o,l,p){for(var x=-1,P=Pt(qi((o-t)/(l||1)),0),F=Tt(P);P--;)F[p?P:++x]=t,t+=l;return F}function Cl(t,o){var l="";if(!t||o<1||o>br)return l;do o%2&&(l+=t),o=Hi(o/2),o&&(t+=t);while(o);return l}function He(t,o){return ns(Ip(t,o,Qt),t+"")}function ax(t){return zu(Sn(t))}function rx(t,o){var l=Sn(t);return ki(l,zr(o,0,l.length))}function so(t,o,l,p){if(!ft(t))return t;o=wr(o,t);for(var x=-1,P=o.length,F=P-1,L=t;L!=null&&++x<P;){var j=$a(o[x]),Z=l;if(j==="__proto__"||j==="constructor"||j==="prototype")return t;if(x!=F){var H=L[j];Z=p?p(H,j,L):M,Z===M&&(Z=ft(H)?H:ir(o[x+1])?[]:{})}oo(L,j,Z),L=L[j]}return t}function nx(t){return ki(Sn(t))}function xa(t,o,l){var p=-1,x=t.length;o<0&&(o=-o>x?0:x+o),l=l>x?x:l,l<0&&(l+=x),x=o>l?0:l-o>>>0,o>>>=0;for(var P=Tt(x);++p<x;)P[p]=t[p+o];return P}function ox(t,o){var l;return Tr(t,function(p,x,P){return l=o(p,x,P),!l}),!!l}function _i(t,o,l){var p=0,x=t==null?p:t.length;if(typeof o=="number"&&o===o&&x<=Yy){for(;p<x;){var P=p+x>>>1,F=t[P];F!==null&&!oa(F)&&(l?F<=o:F<o)?p=P+1:x=P}return x}return Tl(t,o,Qt,l)}function Tl(t,o,l,p){var x=0,P=t==null?0:t.length;if(P===0)return 0;o=l(o);for(var F=o!==o,L=o===null,j=oa(o),Z=o===M;x<P;){var H=Hi((x+P)/2),te=l(t[H]),be=te!==M,Ie=te===null,Ee=te===te,ze=oa(te);if(F)var Re=p||Ee;else Re=Z?Ee&&(p||be):L?Ee&&be&&(p||!Ie):j?Ee&&be&&!Ie&&(p||!ze):!Ie&&!ze&&(p?te<=o:te<o);Re?x=H+1:P=H}return zt(P,Gy)}function ap(t,o){for(var l=-1,p=t.length,x=0,P=[];++l<p;){var F=t[l],L=o?o(F):F;if(!l||!Ra(L,j)){var j=L;P[x++]=F===0?0:F}}return P}
vendor: 10,118 bytes, line 26
26function rp(t){return typeof t=="number"?t:oa(t)?ii:+t}function na(t){if(typeof t=="string")return t;if(De(t))return _(t,na)+"";if(oa(t))return um?um.call(t):"";var o=t+"";return o=="0"&&1/t==-Vr?"-0":o}function Sr(t,o,l){var p=-1,x=f,P=t.length,F=!0,L=[],j=L;if(l)F=!1,x=g;else if(P>=Ia){var Z=o?null:KS(t);if(Z)return ke(Z);F=!1,x=K,j=new jr}else j=o?[]:L;e:for(;++p<P;){var H=t[p],te=o?o(H):H;if(H=l||H!==0?H:0,F&&te===te){for(var be=j.length;be--;)if(j[be]===te)continue e;o&&j.push(te),L.push(H)}else x(j,te,l)||(j!==L&&j.push(te),L.push(H))}return L}function Pl(t,o){return o=wr(o,t),t=Mp(t,o),t==null||delete t[$a(ba(o))]}function np(t,o,l,p){return so(t,o,l(Wr(t,o)),p)}function xi(t,o,l,p){for(var x=t.length,P=p?x:-1;(p?P--:++P<x)&&o(t[P],P,t););return l?xa(t,p?0:P,p?P+1:x):xa(t,p?P+1:0,p?x:P)}function op(t,o){var l=t;return l instanceof Pe&&(l=l.value()),b(o,function(p,x){return x.func.apply(x.thisArg,w([p],x.args))},l)}function kl(t,o,l){var p=t.length;if(p<2)return p?Sr(t[0]):[];for(var x=-1,P=Tt(p);++x<p;)for(var F=t[x],L=-1;++L<p;)L!=x&&(P[x]=io(P[x]||F,t[L],o,l));return Sr(Vt(P,1),o,l)}function ip(t,o,l){for(var p=-1,x=t.length,P=o.length,F={};++p<x;)l(F,t[p],p<P?o[p]:M);return F}function Il(t){return xt(t)?t:[]}function Ml(t){return typeof t=="function"?t:Qt}function wr(t,o){return De(t)?t:Vl(t,o)?[t]:_m(tt(t))}function vr(t,o,l){var p=t.length;return l=l===M?p:l,!o&&l>=p?t:xa(t,o,l)}function cp(t,o){if(o)return t.slice();var l=t.length,p=om?om(l):new t.constructor(l);return t.copy(p),p}function Al(t){var o=new t.constructor(t.byteLength);return new zi(o).set(new zi(t)),o}function ix(t,o){return new t.constructor(o?Al(t.buffer):t.buffer,t.byteOffset,t.byteLength)}function cx(t){var o=new t.constructor(t.source,pu.exec(t));return o.lastIndex=t.lastIndex,o}function lx(t){return _o?lt(_o.call(t)):{}}function lp(t,o){return new t.constructor(o?Al(t.buffer):t.buffer,t.byteOffset,t.length)}function sp(t,o){if(t!==o){var l=t!==M,p=t===null,x=t===t,P=oa(t),F=o!==M,L=o===null,j=o===o,Z=oa(o);if(!L&&!Z&&!P&&t>o||P&&F&&j&&!L&&!Z||p&&F&&j||!l&&j||!x)return 1;if(!p&&!P&&!Z&&t<o||Z&&l&&x&&!p&&!P||L&&l&&x||!F&&x||!j)return-1}return 0}function sx(t,o,l){for(var p=-1,x=t.criteria,P=o.criteria,F=x.length,L=l.length;++p<F;){var j=sp(x[p],P[p]);if(j)return p>=L?j:j*(l[p]=="desc"?-1:1)}return t.index-o.index}function dp(t,o,l,p){for(var x=-1,P=t.length,F=l.length,L=-1,j=o.length,Z=Pt(P-F,0),H=Tt(j+Z),te=!p;++L<j;)H[L]=o[L];for(;++x<F;)(te||x<P)&&(H[l[x]]=t[x]);for(;Z--;)H[L++]=t[x++];return H}function up(t,o,l,p){for(var x=-1,P=t.length,F=-1,L=l.length,j=-1,Z=o.length,H=Pt(P-L,0),te=Tt(H+Z),be=!p;++x<H;)te[x]=t[x];for(var Ie=x;++j<Z;)te[Ie+j]=o[j];for(;++F<L;)(be||x<P)&&(te[Ie+l[F]]=t[x++]);return te}function Gt(t,o){var l=-1,p=t.length;for(o||(o=Tt(p));++l<p;)o[l]=t[l];return o}function Ha(t,o,l,p){var x=!l;l||(l={});for(var P=-1,F=o.length;++P<F;){var L=o[P],j=p?p(l[L],t[L],L,l,t):M;j===M&&(j=t[L]),x?rr(l,L,j):oo(l,L,j)}return l}function dx(t,o){return Ha(t,rs(t),o)}function ux(t,o){return Ha(t,gm(t),o)}function bi(t,o){return function(l,p){var x=De(l)?i:L1,P=o?o():{};return x(l,t,Ve(p,2),P)}}function _n(t){return He(function(o,l){var p=-1,x=l.length,P=x>1?l[x-1]:M,F=x>2?l[2]:M;for(P=t.length>3&&typeof P=="function"?(x--,P):M,F&&qt(l[0],l[1],F)&&(P=x<3?M:P,x=1),o=lt(o);++p<x;){var L=l[p];L&&t(o,L,p,P)}return o})}function pp(t,o){return function(l,p){if(l==null)return l;if(!Yt(l))return t(l,p);for(var x=l.length,P=o?x:-1,F=lt(l);(o?P--:++P<x)&&p(F[P],P,F)!==!1;);return l}}function mp(t){return function(o,l,p){for(var x=-1,P=lt(o),F=p(o),L=F.length;L--;){var j=F[t?L:++x];if(l(P[j],j,P)===!1)break}return o}}function px(t,o,l){function p(){return(this&&this!==Lt&&this instanceof p?P:t).apply(x?l:this,arguments)}var x=o&Ot,P=uo(t);return p}function hp(t){return function(o){o=tt(o);var l=ge(o)?pe(o):M,p=l?l[0]:o.charAt(0),x=l?vr(l,1).join(""):o.slice(1);return p[t]()+x}}function xn(t){return function(o){return b(tm(em(o).replace(H_,"")),t,"")}}function uo(t){return function(){var o=arguments;switch(o.length){case 0:return new t;case 1:return new t(o[0]);case 2:return new t(o[0],o[1]);case 3:return new t(o[0],o[1],o[2]);case 4:return new t(o[0],o[1],o[2],o[3]);case 5:return new t(o[0],o[1],o[2],o[3],o[4]);case 6:return new t(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new t(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var l=Pn(t.prototype),p=t.apply(l,o);return ft(p)?p:l}}function mx(t,o,l){function p(){for(var P=arguments.length,F=Tt(P),L=P,j=bn(p);L--;)F[L]=arguments[L];var Z=P<3&&F[0]!==j&&F[P-1]!==j?[]:fe(F,j);return P-=Z.length,P<l?xp(t,o,Si,p.placeholder,M,F,Z,M,M,l-P):r(this&&this!==Lt&&this instanceof p?x:t,this,F)}var x=uo(t);return p}function fp(t){return function(o,l,p){var x=lt(o);if(!Yt(o)){var P=Ve(l,3);o=Mt(o),l=function(L){return P(x[L],L,x)}}var F=t(o,l,p);return F>-1?x[P?o[F]:F]:M}}function gp(t){return or(function(o){var l=o.length,p=l,x=Oe.prototype.thru;for(t&&o.reverse();p--;){var P=o[p];if(typeof P!="function")throw new wa(Rt);if(x&&!F&&Ti(P)=="wrapper")var F=new Oe([],!0)}for(p=F?p:l;++p<l;){P=o[p];var L=Ti(P),j=L=="wrapper"?as(P):M;F=j&&Bl(j[0])&&j[1]==(ga|ha|fa|Ue)&&!j[4].length&&j[9]==1?F[Ti(j[0])].apply(F,j[3]):P.length==1&&Bl(P)?F[L]():F.thru(P)}return function(){var Z=arguments,H=Z[0];if(F&&Z.length==1&&De(H))return F.plant(H).value();for(var te=0,be=l?o[te].apply(this,Z):H;++te<l;)be=o[te].call(this,be);return be}})}function Si(t,o,l,p,x,P,F,L,j,Z){function H(){for(var Ze=arguments.length,Ge=Tt(Ze),Nt=Ze;Nt--;)Ge[Nt]=arguments[Nt];if(Ee)var Jt=bn(H),kr=q(Ge,Jt);if(p&&(Ge=dp(Ge,p,x,Ee)),P&&(Ge=up(Ge,P,F,Ee)),Ze-=kr,Ee&&Ze<Z)return xp(t,o,Si,H.placeholder,l,Ge,fe(Ge,Jt),L,j,Z-Ze);var _t=be?l:this,va=Ie?_t[t]:t;return Ze=Ge.length,L?Ge=Fx(Ge,L):ze&&Ze>1&&Ge.reverse(),te&&j<Ze&&(Ge.length=j),this&&this!==Lt&&this instanceof H&&(va=Re||uo(va)),va.apply(_t,Ge)}var te=o&ga,be=o&Ot,Ie=o&ma,Ee=o&(ha|_r),ze=o&jt,Re=Ie?M:uo(t);return H}function yp(t,o){return function(l,p){return U1(l,t,o(p),{})}}function wi(t,o){return function(l,p){var x;if(l===M&&p===M)return o;if(l!==M&&(x=l),p!==M){if(x===M)return p;typeof l=="string"||typeof p=="string"?(l=na(l),p=na(p)):(l=rp(l),p=rp(p)),x=t(l,p)}return x}}function Fl(t){return or(function(o){return o=_(o,we(Ve())),He(function(l){var p=this;return t(o,function(x){return r(x,p,l)})})})}function vi(t,o){o=o===M?" ":na(o);var l=o.length;if(l<2)return l?Cl(o,t):o;var p=Cl(o,qi(t/ue(o)));return ge(o)?vr(pe(p),0,t).join(""):p.slice(0,t)}function hx(t,o,l,p){function x(){for(var L=-1,j=arguments.length,Z=-1,H=p.length,te=Tt(H+j),be=this&&this!==Lt&&this instanceof x?F:t;++Z<H;)te[Z]=p[Z];for(;j--;)te[Z++]=arguments[++L];return r(be,P?l:this,te)}var P=o&Ot,F=uo(t);return x}function _p(t){return function(o,l,p){return p&&typeof p!="number"&&qt(o,l,p)&&(l=p=M),o=lr(o),l===M?(l=o,o=0):l=lr(l),p=p===M?o<l?1:-1:lr(p),tx(o,l,p,t)}}function Ci(t){return function(o,l){return typeof o=="string"&&typeof l=="string"||(o=Sa(o),l=Sa(l)),t(o,l)}}function xp(t,o,l,p,x,P,F,L,j,Z){var H=o&ha,te=H?F:M,be=H?M:F,Ie=H?P:M,Ee=H?M:P;o|=H?fa:xr,o&=~(H?xr:fa),o&yr||(o&=-4);var ze=[t,o,x,Ie,te,Ee,be,L,j,Z],Re=l.apply(M,ze);return Bl(t)&&ym(Re,ze),Re.placeholder=p,Ap(Re,t,o)}function El(t){var o=wn[t];return function(l,p){if(l=Sa(l),p=p==null?0:zt(We(p),292),p&&sm(l)){var x=(tt(l)+"e").split("e");return x=(tt(o(x[0]+"e"+(+x[1]+p)))+"e").split("e"),+(x[0]+"e"+(+x[1]-p))}return o(l)}}function bp(t){return function(o){var l=Wt(o);return l==Aa?J(o):l==Fa?$e(o):Se(o,t(o))}}function nr(t,o,l,p,x,P,F,L){var j=o&ma;if(!j&&typeof t!="function")throw new wa(Rt);var Z=p?p.length:0;if(Z||(o&=-97,p=x=M),F=F===M?F:Pt(We(F),0),L=L===M?L:We(L),Z-=x?x.length:0,o&xr){var H=p,te=x;p=x=M}var be=j?M:as(t),Ie=[t,o,l,p,x,H,te,P,F,L];if(be&&Ix(Ie,be),t=Ie[0],o=Ie[1],l=Ie[2],p=Ie[3],x=Ie[4],L=Ie[9]=Ie[9]===M?j?0:t.length:Pt(Ie[9]-Z,0),!L&&o&(ha|_r)&&(o&=-25),o&&o!=Ot)Ee=o==ha||o==_r?mx(t,o,L):o!=fa&&o!=(Ot|fa)||x.length?Si.apply(M,Ie):hx(t,o,l,p);else var Ee=px(t,o,l);return Ap((be?hm:ym)(Ee,Ie),t,o)}function Sp(t,o,l,p){return t===M||Ra(t,vn[l])&&!rt.call(p,l)?o:t}function wp(t,o,l,p,x,P){return ft(t)&&ft(o)&&(P.set(o,t),yi(t,o,M,wp,P),P.delete(o)),t}function fx(t){return mo(t)?M:t}function vp(t,o,l,p,x,P){var F=l&pa,L=t.length,j=o.length;if(L!=j&&!(F&&j>L))return!1;var Z=P.get(t),H=P.get(o);if(Z&&H)return Z==o&&H==t;var te=-1,be=!0,Ie=l&Na?new jr:M;for(P.set(t,o),P.set(o,t);++te<L;){var Ee=t[te],ze=o[te];if(p)var Re=F?p(ze,Ee,te,o,t,P):p(Ee,ze,te,t,o,P);if(Re!==M){if(Re)continue;be=!1;break}if(Ie){if(!C(o,function(Ze,Ge){if(!K(Ie,Ge)&&(Ee===Ze||x(Ee,Ze,l,p,P)))return Ie.push(Ge)})){be=!1;break}}else if(Ee!==ze&&!x(Ee,ze,l,p,P)){be=!1;break}}return P.delete(t),P.delete(o),be}function gx(t,o,l,p,x,P,F){switch(l){case fn:if(t.byteLength!=o.byteLength||t.byteOffset!=o.byteOffset)return!1;t=t.buffer,o=o.buffer;case no:return!(t.byteLength!=o.byteLength||!P(new zi(t),new zi(o)));case Jn:case Xn:case eo:return Ra(+t,+o);case li:return t.name==o.name&&t.message==o.message;case to:case ao:return t==o+"";case Aa:var L=J;case Fa:var j=p&pa;if(L||(L=ke),t.size!=o.size&&!j)return!1;var Z=F.get(t);if(Z)return Z==o;p|=Na,F.set(t,o);var H=vp(L(t),L(o),p,x,P,F);return F.delete(t),H;case di:if(_o)return _o.call(t)==_o.call(o)}return!1}function yx(t,o,l,p,x,P){var F=l&pa,L=Rl(t),j=L.length;if(j!=Rl(o).length&&!F)return!1;for(var Z=j;Z--;){var H=L[Z];if(!(F?H in o:rt.call(o,H)))return!1}var te=P.get(t),be=P.get(o);if(te&&be)return te==o&&be==t;var Ie=!0;P.set(t,o),P.set(o,t);for(var Ee=F;++Z<j;){H=L[Z];var ze=t[H],Re=o[H];if(p)var Ze=F?p(Re,ze,H,o,t,P):p(ze,Re,H,t,o,P);if(!(Ze===M?ze===Re||x(ze,Re,l,p,P):Ze)){Ie=!1;break}Ee||(Ee=H=="constructor")}if(Ie&&!Ee){var Ge=t.constructor,Nt=o.constructor;Ge!=Nt&&"constructor"in t&&"constructor"in o&&!(typeof Ge=="function"&&Ge instanceof Ge&&typeof Nt=="function"&&Nt instanceof Nt)&&(Ie=!1)}return P.delete(t),P.delete(o),Ie}function or(t){return ns(Ip(t,M,Lp),t+"")}function Rl(t){return Hu(t,Mt,rs)}function Ol(t){return Hu(t,Kt,gm)}function Ti(t){for(var o=t.name+"",l=Tn[o],p=rt.call(Tn,o)?l.length:0;p--;){var x=l[p],P=x.func;
26if(P==null||P==t)return x.name}return o}function bn(t){return(rt.call(y,"placeholder")?y:t).placeholder}function Ve(){var t=y.iteratee||Hl;return t=t===Hl?Gu:t,arguments.length?t(arguments[0],arguments[1]):t}function Pi(t,o){var l=t.__data__;return Tx(o)?l[typeof o=="string"?"string":"hash"]:l.map}function Ll(t){for(var o=Mt(t),l=o.length;l--;){var p=o[l],x=t[p];o[l]=[p,x,Pp(x)]}return o}function Nr(t,o){var l=Ce(t,o);return Zu(l)?l:M}function _x(t){var o=rt.call(t,qr),l=t[qr];try{t[qr]=M;var p=!0}catch{}var x=Di.call(t);return p&&(o?t[qr]=l:delete t[qr]),x}function xx(t,o,l){for(var p=-1,x=l.length;++p<x;){var P=l[p],F=P.size;switch(P.type){case"drop":t+=F;break;case"dropRight":o-=F;break;case"take":o=zt(o,t+F);break;case"takeRight":t=Pt(t,o-F)}}return{start:t,end:o}}function bx(t){var o=t.match(g_);return o?o[1].split(y_):[]}function Cp(t,o,l){o=wr(o,t);for(var p=-1,x=o.length,P=!1;++p<x;){var F=$a(o[p]);if(!(P=t!=null&&l(t,F)))break;t=t[F]}return P||++p!=x?P:(x=t==null?0:t.length,!!x&&Ei(x)&&ir(F,x)&&(De(t)||Hr(t)))}function Sx(t){var o=t.length,l=new t.constructor(o);return o&&typeof t[0]=="string"&&rt.call(t,"index")&&(l.index=t.index,l.input=t.input),l}function Tp(t){return typeof t.constructor!="function"||po(t)?{}:Pn(Wi(t))}function wx(t,o,l){var p=t.constructor;switch(o){case no:return Al(t);case Jn:case Xn:return new p(+t);case fn:return ix(t,l);case Yc:case Kc:case Qc:case Jc:case Xc:case el:case tl:case al:case rl:return lp(t,l);case Aa:return new p;case eo:case ao:return new p(t);case to:return cx(t);case Fa:return new p;case di:return lx(t)}}function vx(t,o){var l=o.length;if(!l)return t;var p=l-1;return o[p]=(l>1?"& ":"")+o[p],o=o.join(l>2?", ":" "),t.replace(f_,`{ 27/* [wrapped with `+o+`] */ 28`)}function Cx(t){return De(t)||Hr(t)||!!(lm&&t&&t[lm])}function ir(t,o){var l=typeof t;return o=o??br,!!o&&(l=="number"||l!="symbol"&&P_.test(t))&&t>-1&&t%1==0&&t<o}function qt(t,o,l){if(!ft(l))return!1;var p=typeof o;return!!(p=="number"?Yt(l)&&ir(o,l.length):p=="string"&&o in l)&&Ra(l[o],t)}function Vl(t,o){if(De(t))return!1;var l=typeof t;return!(l!="number"&&l!="symbol"&&l!="boolean"&&t!=null&&!oa(t))||u_.test(t)||!d_.test(t)||o!=null&&t in lt(o)}function Tx(t){var o=typeof t;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?t!=="__proto__":t===null}function Bl(t){var o=Ti(t),l=y[o];if(typeof l!="function"||!(o in Pe.prototype))return!1;if(t===l)return!0;var p=as(l);return!!p&&t===p[0]}function Px(t){return!!nm&&nm in t}function po(t){var o=t&&t.constructor;return t===(typeof o=="function"&&o.prototype||vn)}function Pp(t){return t===t&&!ft(t)}function kp(t,o){return function(l){return l!=null&&l[t]===o&&(o!==M||t in lt(l))}}function kx(t){var o=Ai(t,function(p){return l.size===pn&&l.clear(),p}),l=o.cache;return o}function Ix(t,o){var l=t[1],p=o[1],x=l|p,P=x<(Ot|ma|ga),F=p==ga&&l==ha||p==ga&&l==Ue&&t[7].length<=o[8]||p==(ga|Ue)&&o[7].length<=o[8]&&l==ha;if(!P&&!F)return t;p&Ot&&(t[2]=o[2],x|=l&Ot?0:yr);var L=o[3];if(L){var j=t[3];t[3]=j?dp(j,L,o[4]):L,t[4]=j?fe(t[3],Xa):o[4]}return L=o[5],L&&(j=t[5],t[5]=j?up(j,L,o[6]):L,t[6]=j?fe(t[5],Xa):o[6]),L=o[7],L&&(t[7]=L),p&ga&&(t[8]=t[8]==null?o[8]:zt(t[8],o[8])),t[9]==null&&(t[9]=o[9]),t[0]=o[0],t[1]=x,t}function Mx(t){var o=[];if(t!=null)for(var l in lt(t))o.push(l);return o}function Ax(t){return Di.call(t)}function Ip(t,o,l){return o=Pt(o===M?t.length-1:o,0),function(){for(var p=arguments,x=-1,P=Pt(p.length-o,0),F=Tt(P);++x<P;)F[x]=p[o+x];x=-1;for(var L=Tt(o+1);++x<o;)L[x]=p[x];return L[o]=l(F),r(t,this,L)}}function Mp(t,o){return o.length<2?t:Wr(t,xa(o,0,-1))}function Fx(t,o){for(var l=t.length,p=zt(o.length,l),x=Gt(t);p--;){var P=o[p];t[p]=ir(P,l)?x[P]:M}return t}function Dl(t,o){if((o!=="constructor"||typeof t[o]!="function")&&o!="__proto__")return t[o]}function Ap(t,o,l){var p=o+"";return ns(t,vx(p,Ex(bx(p),l)))}function Fp(t){var o=0,l=0;return function(){var p=zS(),x=qy-(p-l);if(l=p,x>0){if(++o>=Uy)return arguments[0]}else o=0;return t.apply(M,arguments)}}function ki(t,o){var l=-1,p=t.length,x=p-1;for(o=o===M?p:o;++l<o;){var P=vl(l,x),F=t[P];t[P]=t[l],t[l]=F}return t.length=o,t}function $a(t){if(typeof t=="string"||oa(t))return t;var o=t+"";return o=="0"&&1/t==-Vr?"-0":o}function Ur(t){if(t!=null){try{return Bi.call(t)}catch{}try{return t+""}catch{}}return""}function Ex(t,o){return c(Ky,function(l){var p="_."+l[0];o&l[1]&&!f(t,p)&&t.push(p)}),t.sort()}function Ep(t){if(t instanceof Pe)return t.clone();var o=new Oe(t.__wrapped__,t.__chain__);return o.__actions__=Gt(t.__actions__),o.__index__=t.__index__,o.__values__=t.__values__,o}function Rx(t,o,l){o=(l?qt(t,o,l):o===M)?1:Pt(We(o),0);var p=t==null?0:t.length;if(!p||o<1)return[];for(var x=0,P=0,F=Tt(qi(p/o));x<p;)F[P++]=xa(t,x,x+=o);return F}function Ox(t){for(var o=-1,l=t==null?0:t.length,p=0,x=[];++o<l;){var P=t[o];P&&(x[p++]=P)}return x}function Lx(){var t=arguments.length;if(!t)return[];for(var o=Tt(t-1),l=arguments[0],p=t;p--;)o[p-1]=arguments[p];return w(De(l)?Gt(l):[l],Vt(o,1))}function Vx(t,o,l){var p=t==null?0:t.length;return p?(o=l||o===M?1:We(o),xa(t,o<0?0:o,p)):[]}function Bx(t,o,l){var p=t==null?0:t.length;return p?(o=l||o===M?1:We(o),o=p-o,xa(t,0,o<0?0:o)):[]}function Dx(t,o){return t&&t.length?xi(t,Ve(o,3),!0,!0):[]}function jx(t,o){return t&&t.length?xi(t,Ve(o,3),!0):[]}function zx(t,o,l,p){var x=t==null?0:t.length;return x?(l&&typeof l!="number"&&qt(t,o,l)&&(l=0,p=x),j1(t,o,l,p)):[]}function Rp(t,o,l){var p=t==null?0:t.length;if(!p)return-1;var x=l==null?0:We(l);return x<0&&(x=Pt(p+x,0)),D(t,Ve(o,3),x)}function Op(t,o,l){var p=t==null?0:t.length;if(!p)return-1;var x=p-1;return l!==M&&(x=We(l),x=l<0?Pt(p+x,0):zt(x,p-1)),D(t,Ve(o,3),x,!0)}function Lp(t){return t!=null&&t.length?Vt(t,1):[]}function Wx(t){return t!=null&&t.length?Vt(t,Vr):[]}function Nx(t,o){return t!=null&&t.length?(o=o===M?1:We(o),Vt(t,o)):[]}function Ux(t){for(var o=-1,l=t==null?0:t.length,p={};++o<l;){var x=t[o];p[x[0]]=x[1]}return p}function Vp(t){return t&&t.length?t[0]:M}function qx(t,o,l){var p=t==null?0:t.length;if(!p)return-1;var x=l==null?0:We(l);return x<0&&(x=Pt(p+x,0)),A(t,o,x)}function Hx(t){return t!=null&&t.length?xa(t,0,-1):[]}function $x(t,o){return t==null?"":DS.call(t,o)}function ba(t){var o=t==null?0:t.length;return o?t[o-1]:M}function Zx(t,o,l){var p=t==null?0:t.length;if(!p)return-1;var x=p;return l!==M&&(x=We(l),x=x<0?Pt(p+x,0):zt(x,p-1)),o===o?ee(t,o,x):D(t,R,x,!0)}function Gx(t,o){return t&&t.length?Ju(t,We(o)):M}function Bp(t,o){return t&&t.length&&o&&o.length?wl(t,o):t}function Yx(t,o,l){return t&&t.length&&o&&o.length?wl(t,o,Ve(l,2)):t}function Kx(t,o,l){return t&&t.length&&o&&o.length?wl(t,o,M,l):t}function Qx(t,o){var l=[];
vendor: 6,805 bytes, line 28
28if(!t||!t.length)return l;var p=-1,x=[],P=t.length;for(o=Ve(o,3);++p<P;){var F=t[p];o(F,p,t)&&(l.push(F),x.push(p))}return tp(t,x),l}function jl(t){return t==null?t:NS.call(t)}function Jx(t,o,l){var p=t==null?0:t.length;return p?(l&&typeof l!="number"&&qt(t,o,l)?(o=0,l=p):(o=o==null?0:We(o),l=l===M?p:We(l)),xa(t,o,l)):[]}function Xx(t,o){return _i(t,o)}function eb(t,o,l){return Tl(t,o,Ve(l,2))}function tb(t,o){var l=t==null?0:t.length;if(l){var p=_i(t,o);if(p<l&&Ra(t[p],o))return p}return-1}function ab(t,o){return _i(t,o,!0)}function rb(t,o,l){return Tl(t,o,Ve(l,2),!0)}function nb(t,o){if(t!=null&&t.length){var l=_i(t,o,!0)-1;if(Ra(t[l],o))return l}return-1}function ob(t){return t&&t.length?ap(t):[]}function ib(t,o){return t&&t.length?ap(t,Ve(o,2)):[]}function cb(t){var o=t==null?0:t.length;return o?xa(t,1,o):[]}function lb(t,o,l){return t&&t.length?(o=l||o===M?1:We(o),xa(t,0,o<0?0:o)):[]}function sb(t,o,l){var p=t==null?0:t.length;return p?(o=l||o===M?1:We(o),o=p-o,xa(t,o<0?0:o,p)):[]}function db(t,o){return t&&t.length?xi(t,Ve(o,3),!1,!0):[]}function ub(t,o){return t&&t.length?xi(t,Ve(o,3)):[]}function pb(t){return t&&t.length?Sr(t):[]}function mb(t,o){return t&&t.length?Sr(t,Ve(o,2)):[]}function hb(t,o){return o=typeof o=="function"?o:M,t&&t.length?Sr(t,M,o):[]}function zl(t){if(!t||!t.length)return[];var o=0;return t=h(t,function(l){if(xt(l))return o=Pt(l.length,o),!0}),oe(o,function(l){return _(t,z(l))})}function Dp(t,o){if(!t||!t.length)return[];var l=zl(t);return o==null?l:_(l,function(p){return r(o,M,p)})}function fb(t,o){return ip(t||[],o||[],oo)}function gb(t,o){return ip(t||[],o||[],so)}function jp(t){var o=y(t);return o.__chain__=!0,o}function yb(t,o){return o(t),t}function Ii(t,o){return o(t)}function _b(){return jp(this)}function xb(){return new Oe(this.value(),this.__chain__)}function bb(){this.__values__===M&&(this.__values__=Yp(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?M:this.__values__[this.__index__++]}}function Sb(){return this}function wb(t){for(var o,l=this;l instanceof Te;){var p=Ep(l);p.__index__=0,p.__values__=M,o?x.__wrapped__=p:o=p;var x=p;l=l.__wrapped__}return x.__wrapped__=t,o}function vb(){var t=this.__wrapped__;if(t instanceof Pe){var o=t;return this.__actions__.length&&(o=new Pe(this)),o=o.reverse(),o.__actions__.push({func:Ii,args:[jl],thisArg:M}),new Oe(o,this.__chain__)}return this.thru(jl)}function Cb(){return op(this.__wrapped__,this.__actions__)}function Tb(t,o,l){var p=De(t)?u:D1;return l&&qt(t,o,l)&&(o=M),p(t,Ve(o,3))}function Pb(t,o){return(De(t)?h:qu)(t,Ve(o,3))}function kb(t,o){return Vt(Mi(t,o),1)}function Ib(t,o){return Vt(Mi(t,o),Vr)}function Mb(t,o,l){return l=l===M?1:We(l),Vt(Mi(t,o),l)}function zp(t,o){return(De(t)?c:Tr)(t,Ve(o,3))}function Wp(t,o){return(De(t)?s:pm)(t,Ve(o,3))}function Ab(t,o,l,p){t=Yt(t)?t:Sn(t),l=l&&!p?We(l):0;var x=t.length;return l<0&&(l=Pt(x+l,0)),Ri(t)?l<=x&&t.indexOf(o,l)>-1:!!x&&A(t,o,l)>-1}function Mi(t,o){return(De(t)?_:Yu)(t,Ve(o,3))}function Fb(t,o,l,p){return t==null?[]:(De(o)||(o=o==null?[]:[o]),l=p?M:l,De(l)||(l=l==null?[]:[l]),Xu(t,o,l))}function Eb(t,o,l){var p=De(t)?b:N,x=arguments.length<3;return p(t,Ve(o,4),l,x,Tr)}function Rb(t,o,l){var p=De(t)?v:N,x=arguments.length<3;return p(t,Ve(o,4),l,x,pm)}function Ob(t,o){return(De(t)?h:qu)(t,Fi(Ve(o,3)))}function Lb(t){return(De(t)?zu:ax)(t)}function Vb(t,o,l){return o=(l?qt(t,o,l):o===M)?1:We(o),(De(t)?R1:rx)(t,o)}function Bb(t){return(De(t)?O1:nx)(t)}function Db(t){if(t==null)return 0;if(Yt(t))return Ri(t)?ue(t):t.length;var o=Wt(t);return o==Aa||o==Fa?t.size:bl(t).length}function jb(t,o,l){var p=De(t)?C:ox;return l&&qt(t,o,l)&&(o=M),p(t,Ve(o,3))}function zb(t,o){if(typeof o!="function")throw new wa(Rt);return t=We(t),function(){if(--t<1)return o.apply(this,arguments)}}function Np(t,o,l){return o=l?M:o,o=t&&o==null?t.length:o,nr(t,ga,M,M,M,M,o)}function Up(t,o){var l;if(typeof o!="function")throw new wa(Rt);return t=We(t),function(){return--t>0&&(l=o.apply(this,arguments)),t<=1&&(o=M),l}}function qp(t,o,l){o=l?M:o;var p=nr(t,ha,M,M,M,M,M,o);return p.placeholder=qp.placeholder,p}function Hp(t,o,l){o=l?M:o;var p=nr(t,_r,M,M,M,M,M,o);return p.placeholder=Hp.placeholder,p}function $p(t,o,l){function p(_t){var va=be,bo=Ie;return be=Ie=M,Ge=_t,ze=t.apply(bo,va)}function x(_t){return Ge=_t,Re=xo(L,o),Nt?p(_t):ze}function P(_t){var va=_t-Ze,bo=_t-Ge,Im=o-va;return Jt?zt(Im,Ee-bo):Im}function F(_t){var va=_t-Ze,bo=_t-Ge;return Ze===M||va>=o||va<0||Jt&&bo>=Ee}function L(){var _t=Gi();return F(_t)?j(_t):(Re=xo(L,P(_t)),M)}function j(_t){return Re=M,kr&&be?p(_t):(be=Ie=M,ze)}function Z(){Re!==M&&fm(Re),Ge=0,be=Ze=Ie=Re=M}function H(){return Re===M?ze:j(Gi())}function te(){var _t=Gi(),va=F(_t);if(be=arguments,Ie=this,Ze=_t,va){if(Re===M)return x(Ze);if(Jt)return fm(Re),Re=xo(L,o),p(Ze)}return Re===M&&(Re=xo(L,o)),ze}var be,Ie,Ee,ze,Re,Ze,Ge=0,Nt=!1,Jt=!1,kr=!0;if(typeof t!="function")throw new wa(Rt);return o=Sa(o)||0,ft(l)&&(Nt=!!l.leading,Jt="maxWait"in l,Ee=Jt?Pt(Sa(l.maxWait)||0,o):Ee,kr="trailing"in l?!!l.trailing:kr),te.cancel=Z,te.flush=H,te}function Wb(t){return nr(t,jt)}function Ai(t,o){if(typeof t!="function"||o!=null&&typeof o!="function")throw new wa(Rt);var l=function(){var p=arguments,x=o?o.apply(this,p):p[0],P=l.cache;if(P.has(x))return P.get(x);var F=t.apply(this,p);return l.cache=P.set(x,F)||P,F};return l.cache=new(Ai.Cache||ar),l}function Fi(t){if(typeof t!="function")throw new wa(Rt);return function(){var o=arguments;switch(o.length){case 0:return!t.call(this);case 1:return!t.call(this,o[0]);case 2:return!t.call(this,o[0],o[1]);case 3:return!t.call(this,o[0],o[1],o[2])}return!t.apply(this,o)}}function Nb(t){return Up(2,t)}function Ub(t,o){if(typeof t!="function")throw new wa(Rt);return o=o===M?o:We(o),He(t,o)}function qb(t,o){if(typeof t!="function")throw new wa(Rt);return o=o==null?0:Pt(We(o),0),He(function(l){var p=l[o],x=vr(l,0,o);return p&&w(x,p),r(t,this,x)})}function Hb(t,o,l){var p=!0,x=!0;if(typeof t!="function")throw new wa(Rt);return ft(l)&&(p="leading"in l?!!l.leading:p,x="trailing"in l?!!l.trailing:x),$p(t,o,{leading:p,maxWait:o,trailing:x})}function $b(t){return Np(t,1)}function Zb(t,o){return is(Ml(o),t)}function Gb(){if(!arguments.length)return[];var t=arguments[0];return De(t)?t:[t]}function Yb(t){return _a(t,Ma)}function Kb(t,o){return o=typeof o=="function"?o:M,_a(t,Ma,o)}function Qb(t){return _a(t,ra|Ma)}function Jb(t,o){return o=typeof o=="function"?o:M,_a(t,ra|Ma,o)}function Xb(t,o){return o==null||Nu(t,o,Mt(o))}function Ra(t,o){return t===o||t!==t&&o!==o}function Yt(t){return t!=null&&Ei(t.length)&&!cr(t)}function xt(t){return yt(t)&&Yt(t)}function e2(t){return t===!0||t===!1||yt(t)&&Ut(t)==Jn}function t2(t){return yt(t)&&t.nodeType===1&&!mo(t)}function a2(t){if(t==null)return!0;
28if(Yt(t)&&(De(t)||typeof t=="string"||typeof t.splice=="function"||Pr(t)||kn(t)||Hr(t)))return!t.length;var o=Wt(t);if(o==Aa||o==Fa)return!t.size;if(po(t))return!bl(t).length;for(var l in t)if(rt.call(t,l))return!1;return!0}function r2(t,o){return lo(t,o)}function n2(t,o,l){l=typeof l=="function"?l:M;var p=l?l(t,o):M;return p===M?lo(t,o,M,l):!!p}function Wl(t){if(!yt(t))return!1;var o=Ut(t);return o==li||o==Jy||typeof t.message=="string"&&typeof t.name=="string"&&!mo(t)}function o2(t){return typeof t=="number"&&sm(t)}function cr(t){if(!ft(t))return!1;var o=Ut(t);return o==si||o==cu||o==Qy||o==e_}function Zp(t){return typeof t=="number"&&t==We(t)}function Ei(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=br}function ft(t){var o=typeof t;return t!=null&&(o=="object"||o=="function")}function yt(t){return t!=null&&typeof t=="object"}function i2(t,o){return t===o||xl(t,o,Ll(o))}function c2(t,o,l){return l=typeof l=="function"?l:M,xl(t,o,Ll(o),l)}function l2(t){return Gp(t)&&t!=+t}function s2(t){if(QS(t))throw new Kl(dn);return Zu(t)}function d2(t){return t===null}function u2(t){return t==null}function Gp(t){return typeof t=="number"||yt(t)&&Ut(t)==eo}function mo(t){if(!yt(t)||Ut(t)!=er)return!1;var o=Wi(t);if(o===null)return!0;var l=rt.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&Bi.call(l)==FS}function p2(t){return Zp(t)&&t>=-br&&t<=br}function Ri(t){return typeof t=="string"||!De(t)&&yt(t)&&Ut(t)==ao}function oa(t){return typeof t=="symbol"||yt(t)&&Ut(t)==di}function m2(t){return t===M}function h2(t){return yt(t)&&Wt(t)==ro}function f2(t){return yt(t)&&Ut(t)==a_}function Yp(t){if(!t)return[];if(Yt(t))return Ri(t)?pe(t):Gt(t);if(ho&&t[ho])return ie(t[ho]());var o=Wt(t);return(o==Aa?J:o==Fa?ke:Sn)(t)}function lr(t){return t?(t=Sa(t),t===Vr||t===-Vr?(t<0?-1:1)*Zy:t===t?t:0):t===0?t:0}function We(t){var o=lr(t),l=o%1;return o===o?l?o-l:o:0}function Kp(t){return t?zr(We(t),0,Ua):0}function Sa(t){if(typeof t=="number")return t;if(oa(t))return ii;if(ft(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=ft(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=ce(t);var l=v_.test(t);return l||T_.test(t)?r1(t.slice(2),l?2:8):w_.test(t)?ii:+t}function Qp(t){return Ha(t,Kt(t))}function g2(t){return t?zr(We(t),-br,br):t===0?t:0}function tt(t){return t==null?"":na(t)}function y2(t,o){var l=Pn(t);return o==null?l:Wu(l,o)}function _2(t,o){return O(t,Ve(o,3),qa)}function x2(t,o){return O(t,Ve(o,3),gl)}function b2(t,o){return t==null?t:ts(t,Ve(o,3),Kt)}function S2(t,o){return t==null?t:mm(t,Ve(o,3),Kt)}function w2(t,o){return t&&qa(t,Ve(o,3))}function v2(t,o){return t&&gl(t,Ve(o,3))}function C2(t){return t==null?[]:gi(t,Mt(t))}function T2(t){return t==null?[]:gi(t,Kt(t))}function Nl(t,o,l){var p=t==null?M:Wr(t,o);return p===M?l:p}function P2(t,o){return t!=null&&Cp(t,o,z1)}function Ul(t,o){return t!=null&&Cp(t,o,W1)}function Mt(t){return Yt(t)?ju(t):bl(t)}function Kt(t){return Yt(t)?ju(t,!0):Q1(t)}function k2(t,o){var l={};return o=Ve(o,3),qa(t,function(p,x,P){rr(l,o(p,x,P),p)}),l}function I2(t,o){var l={};return o=Ve(o,3),qa(t,function(p,x,P){rr(l,x,o(p,x,P))}),l}function M2(t,o){return Jp(t,Fi(Ve(o)))}function Jp(t,o){if(t==null)return{};var l=_(Ol(t),function(p){return[p]});return o=Ve(o),ep(t,l,function(p,x){return o(p,x[0])})}function A2(t,o,l){o=wr(o,t);var p=-1,x=o.length;for(x||(x=1,t=M);++p<x;){var P=t==null?M:t[$a(o[p])];P===M&&(p=x,P=l),t=cr(P)?P.call(t):P}return t}function F2(t,o,l){return t==null?t:so(t,o,l)}function E2(t,o,l,p){return p=typeof p=="function"?p:M,t==null?t:so(t,o,l,p)}function R2(t,o,l){var p=De(t),x=p||Pr(t)||kn(t);if(o=Ve(o,4),l==null){var P=t&&t.constructor;l=x?p?new P:[]:ft(t)&&cr(P)?Pn(Wi(t)):{}}
vendor: 4,119 bytes, lines 28-45
28return(x?c:qa)(t,function(F,L,j){return o(l,F,L,j)}),l}function O2(t,o){return t==null||Pl(t,o)}function L2(t,o,l){return t==null?t:np(t,o,Ml(l))}function V2(t,o,l,p){return p=typeof p=="function"?p:M,t==null?t:np(t,o,Ml(l),p)}function Sn(t){return t==null?[]:le(t,Mt(t))}function B2(t){return t==null?[]:le(t,Kt(t))}function D2(t,o,l){return l===M&&(l=o,o=M),l!==M&&(l=Sa(l),l=l===l?l:0),o!==M&&(o=Sa(o),o=o===o?o:0),zr(Sa(t),o,l)}function j2(t,o,l){return o=lr(o),l===M?(l=o,o=0):l=lr(l),t=Sa(t),N1(t,o,l)}function z2(t,o,l){if(l&&typeof l!="boolean"&&qt(t,o,l)&&(o=l=M),l===M&&(typeof o=="boolean"?(l=o,o=M):typeof t=="boolean"&&(l=t,t=M)),t===M&&o===M?(t=0,o=1):(t=lr(t),o===M?(o=t,t=0):o=lr(o)),t>o){var p=t;t=o,o=p}if(l||t%1||o%1){var x=dm();return zt(t+x*(o-t+a1("1e-"+((x+"").length-1))),o)}return vl(t,o)}function Xp(t){return ls(tt(t).toLowerCase())}function em(t){return t=tt(t),t&&t.replace(k_,i1).replace($_,"")}function W2(t,o,l){t=tt(t),o=na(o);var p=t.length;l=l===M?p:zr(We(l),0,p);var x=l;return l-=o.length,l>=0&&t.slice(l,x)==o}function N2(t){return t=tt(t),t&&c_.test(t)?t.replace(du,c1):t}function U2(t){return t=tt(t),t&&m_.test(t)?t.replace(nl,"\\$&"):t}function q2(t,o,l){t=tt(t),o=We(o);var p=o?ue(t):0;if(!o||p>=o)return t;var x=(o-p)/2;return vi(Hi(x),l)+t+vi(qi(x),l)}function H2(t,o,l){t=tt(t),o=We(o);var p=o?ue(t):0;return o&&p<o?t+vi(o-p,l):t}function $2(t,o,l){t=tt(t),o=We(o);var p=o?ue(t):0;return o&&p<o?vi(o-p,l)+t:t}function Z2(t,o,l){return l||o==null?o=0:o&&(o=+o),WS(tt(t).replace(ol,""),o||0)}function G2(t,o,l){return o=(l?qt(t,o,l):o===M)?1:We(o),Cl(tt(t),o)}function Y2(){var t=arguments,o=tt(t[0]);return t.length<3?o:o.replace(t[1],t[2])}function K2(t,o,l){return l&&typeof l!="number"&&qt(t,o,l)&&(o=l=M),(l=l===M?Ua:l>>>0)?(t=tt(t),t&&(typeof o=="string"||o!=null&&!cs(o))&&(o=na(o),!o&&ge(t))?vr(pe(t),0,l):t.split(o,l)):[]}function Q2(t,o,l){return t=tt(t),l=l==null?0:zr(We(l),0,t.length),o=na(o),t.slice(l,l+o.length)==o}function J2(t,o,l){var p=y.templateSettings;l&&qt(t,o,l)&&(o=M),t=tt(t),o=Yi({},o,p,Sp);var x,P,F=Yi({},o.imports,p.imports,Sp),L=Mt(F),j=le(F,L),Z=0,H=o.interpolate||ui,te="__p += '",be=Ql((o.escape||ui).source+"|"+H.source+"|"+(H===uu?S_:ui).source+"|"+(o.evaluate||ui).source+"|$","g"),Ie="//# sourceURL="+(rt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Q_+"]")+` 29`;t.replace(be,function(Re,Ze,Ge,Nt,Jt,kr){return Ge||(Ge=Nt),te+=t.slice(Z,kr).replace(I_,xe),Ze&&(x=!0,te+=`' + 30__e(`+Ze+`) + 31'`),Jt&&(P=!0,te+=`'; 32`+Jt+`; 33__p += '`),Ge&&(te+=`' + 34((__t = (`+Ge+`)) == null ? '' : __t) + 35'`),Z=kr+Re.length,Re}),te+=`'; 36`;var Ee=rt.call(o,"variable")&&o.variable;if(Ee){if(x_.test(Ee))throw new Kl(un)}else te=`with (obj) { 37`+te+` 38} 39`;te=(P?te.replace(r_,""):te).replace(n_,"$1").replace(o_,"$1;"),te="function("+(Ee||"obj")+`) { 40`+(Ee?"":`obj || (obj = {}); 41`)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(P?`, __j = Array.prototype.join; 42function print() { __p += __j.call(arguments, '') } 43`:`; 44`)+te+`return __p 45}`;var ze=km(function(){return rm(L,Ie+"return "+te).apply(M,j)});if(ze.source=te,Wl(ze))throw ze;return ze}function X2(t){return tt(t).toLowerCase()}function eS(t){return tt(t).toUpperCase()}function tS(t,o,l){if(t=tt(t),t&&(l||o===M))return ce(t);if(!t||!(o=na(o)))return t;var p=pe(t),x=pe(o);return vr(p,se(p,x),ae(p,x)+1).join("")}function aS(t,o,l){if(t=tt(t),t&&(l||o===M))return t.slice(0,de(t)+1);if(!t||!(o=na(o)))return t;var p=pe(t);return vr(p,0,ae(p,pe(o))+1).join("")}function rS(t,o,l){if(t=tt(t),t&&(l||o===M))return t.replace(ol,"");if(!t||!(o=na(o)))return t;var p=pe(t);return vr(p,se(p,pe(o))).join("")}function nS(t,o){var l=mn,p=oi;if(ft(o)){var x="separator"in o?o.separator:x;l="length"in o?We(o.length):l,p="omission"in o?na(o.omission):p}t=tt(t);var P=t.length;if(ge(t)){var F=pe(t);P=F.length}if(l>=P)return t;var L=l-ue(p);if(L<1)return p;var j=F?vr(F,0,L).join(""):t.slice(0,L);if(x===M)return j+p;if(F&&(L+=j.length-L),cs(x)){if(t.slice(L).search(x)){var Z,H=j;for(x.global||(x=Ql(x.source,tt(pu.exec(x))+"g")),x.lastIndex=0;Z=x.exec(H);)var te=Z.index;
45j=j.slice(0,te===M?L:te)}}else if(t.indexOf(na(x),L)!=L){var be=j.lastIndexOf(x);be>-1&&(j=j.slice(0,be))}return j+p}function oS(t){return t=tt(t),t&&i_.test(t)?t.replace(su,l1):t}function tm(t,o,l){return t=tt(t),o=l?M:o,o===M?Be(t)?fr(t):I(t):t.match(o)||[]}function iS(t){var o=t==null?0:t.length,l=Ve();return t=o?_(t,function(p){if(typeof p[1]!="function")throw new wa(Rt);return[l(p[0]),p[1]]}):[],He(function(p){for(var x=-1;++x<o;){var P=t[x];if(r(P[0],this,p))return r(P[1],this,p)}})}function cS(t){return B1(_a(t,ra))}function ql(t){return function(){return t}}function lS(t,o){return t==null||t!==t?o:t}function Qt(t){return t}function Hl(t){return Gu(typeof t=="function"?t:_a(t,ra))}function sS(t){return Ku(_a(t,ra))}function dS(t,o){return Qu(t,_a(o,ra))}function $l(t,o,l){var p=Mt(o),x=gi(o,p);l!=null||ft(o)&&(x.length||!p.length)||(l=o,o=t,t=this,x=gi(o,Mt(o)));var P=!(ft(l)&&"chain"in l&&!l.chain),F=cr(t);return c(x,function(L){var j=o[L];t[L]=j,F&&(t.prototype[L]=function(){var Z=this.__chain__;if(P||Z){var H=t(this.__wrapped__);return(H.__actions__=Gt(this.__actions__)).push({func:j,args:arguments,thisArg:t}),H.__chain__=Z,H}return j.apply(t,w([this.value()],arguments))})}),t}function uS(){return Lt._===this&&(Lt._=ES),this}function Zl(){}function pS(t){return t=We(t),He(function(o){return Ju(o,t)})}function am(t){return Vl(t)?z($a(t)):ex(t)}function mS(t){return function(o){return t==null?M:Wr(t,o)}}function Gl(){return[]}function Yl(){return!1}function hS(){return{}}function fS(){return""}function gS(){return!0}function yS(t,o){if(t=We(t),t<1||t>br)return[];var l=Ua,p=zt(t,Ua);o=Ve(o),t-=Ua;for(var x=oe(p,o);++l<t;)o(l);return x}function _S(t){return De(t)?_(t,$a):oa(t)?[t]:Gt(_m(tt(t)))}function xS(t){var o=++AS;return tt(t)+o}function bS(t){return t&&t.length?fi(t,Qt,yl):M}function SS(t,o){return t&&t.length?fi(t,Ve(o,2),yl):M}function wS(t){return k(t,Qt)}function vS(t,o){return k(t,Ve(o,2))}function CS(t){return t&&t.length?fi(t,Qt,Sl):M}function TS(t,o){return t&&t.length?fi(t,Ve(o,2),Sl):M}function PS(t){return t&&t.length?Y(t,Qt):0}function kS(t,o){return t&&t.length?Y(t,Ve(o,2)):0}U=U==null?Lt:yn.defaults(Lt.Object(),U,yn.pick(Lt,K_));var Tt=U.Array,Oi=U.Date,Kl=U.Error,rm=U.Function,wn=U.Math,lt=U.Object,Ql=U.RegExp,IS=U.String,wa=U.TypeError,Li=Tt.prototype,MS=rm.prototype,vn=lt.prototype,Vi=U["__core-js_shared__"],Bi=MS.toString,rt=vn.hasOwnProperty,AS=0,nm=function(){var t=/[^.]+$/.exec(Vi&&Vi.keys&&Vi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Di=vn.toString,FS=Bi.call(lt),ES=Lt._,RS=Ql("^"+Bi.call(rt).replace(nl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ji=Eu?U.Buffer:M,Cr=U.Symbol,zi=U.Uint8Array,om=ji?ji.allocUnsafe:M,Wi=re(lt.getPrototypeOf,lt),im=lt.create,cm=vn.propertyIsEnumerable,Ni=Li.splice,lm=Cr?Cr.isConcatSpreadable:M,ho=Cr?Cr.iterator:M,qr=Cr?Cr.toStringTag:M,Ui=function(){try{var t=Nr(lt,"defineProperty");return t({},"",{}),t}catch{}}(),OS=U.clearTimeout!==Lt.clearTimeout&&U.clearTimeout,LS=Oi&&Oi.now!==Lt.Date.now&&Oi.now,VS=U.setTimeout!==Lt.setTimeout&&U.setTimeout,qi=wn.ceil,Hi=wn.floor,Jl=lt.getOwnPropertySymbols,BS=ji?ji.isBuffer:M,sm=U.isFinite,DS=Li.join,jS=re(lt.keys,lt),Pt=wn.max,zt=wn.min,zS=Oi.now,WS=U.parseInt,dm=wn.random,NS=Li.reverse,Xl=Nr(U,"DataView"),fo=Nr(U,"Map"),es=Nr(U,"Promise"),Cn=Nr(U,"Set"),go=Nr(U,"WeakMap"),yo=Nr(lt,"create"),$i=go&&new go,Tn={},US=Ur(Xl),qS=Ur(fo),HS=Ur(es),$S=Ur(Cn),ZS=Ur(go),Zi=Cr?Cr.prototype:M,_o=Zi?Zi.valueOf:M,um=Zi?Zi.toString:M,Pn=function(){function t(){}return function(o){if(!ft(o))return{};if(im)return im(o);t.prototype=o;var l=new t;return t.prototype=M,l}}();y.templateSettings={escape:l_,evaluate:s_,interpolate:uu,variable:"",imports:{_:y}},y.prototype=Te.prototype,y.prototype.constructor=y,Oe.prototype=Pn(Te.prototype),Oe.prototype.constructor=Oe,Pe.prototype=Pn(Te.prototype),Pe.prototype.constructor=Pe,Dr.prototype.clear=u1,Dr.prototype.delete=p1,Dr.prototype.get=m1,Dr.prototype.has=h1,Dr.prototype.set=f1,tr.prototype.clear=g1,tr.prototype.delete=y1,tr.prototype.get=_1,tr.prototype.has=x1,tr.prototype.set=b1,ar.prototype.clear=S1,ar.prototype.delete=w1,ar.prototype.get=v1,ar.prototype.has=C1,ar.prototype.set=T1,jr.prototype.add=jr.prototype.push=P1,jr.prototype.has=k1,Ea.prototype.clear=I1,Ea.prototype.delete=M1,Ea.prototype.get=A1,Ea.prototype.has=F1,Ea.prototype.set=E1;var Tr=pp(qa),pm=pp(gl,!0),ts=mp(),mm=mp(!0),hm=$i?function(t,o){return $i.set(t,o),t}:Qt,GS=Ui?function(t,o){return Ui(t,"toString",{configurable:!0,enumerable:!1,value:ql(o),writable:!0})}:Qt,YS=He,fm=OS||function(t){return Lt.clearTimeout(t)},KS=Cn&&1/ke(new Cn([,-0]))[1]==Vr?function(t){return new Cn(t)}:Zl,as=$i?function(t){return $i.get(t)}:Zl,rs=Jl?function(t){return t==null?[]:(t=lt(t),h(Jl(t),function(o){return cm.call(t,o)}))}:Gl,gm=Jl?function(t){for(var o=[];t;)w(o,rs(t)),t=Wi(t);return o}:Gl,Wt=Ut;(Xl&&Wt(new Xl(new ArrayBuffer(1)))!=fn||fo&&Wt(new fo)!=Aa||es&&Wt(es.resolve())!=lu||Cn&&Wt(new Cn)!=Fa||go&&Wt(new go)!=ro)&&(Wt=function(t){var o=Ut(t),l=o==er?t.constructor:M,p=l?Ur(l):"";if(p)switch(p){case US:return fn;case qS:return Aa;case HS:return lu;case $S:return Fa;case ZS:return ro}return o}
vendor: 7,694 bytes, line 45
45);var QS=Vi?cr:Yl,ym=Fp(hm),xo=VS||function(t,o){return Lt.setTimeout(t,o)},ns=Fp(GS),_m=kx(function(t){var o=[];return t.charCodeAt(0)===46&&o.push(""),t.replace(p_,function(l,p,x,P){o.push(x?P.replace(b_,"$1"):p||l)}),o}),JS=He(function(t,o){return xt(t)?io(t,Vt(o,1,xt,!0)):[]}),XS=He(function(t,o){var l=ba(o);return xt(l)&&(l=M),xt(t)?io(t,Vt(o,1,xt,!0),Ve(l,2)):[]}),ew=He(function(t,o){var l=ba(o);return xt(l)&&(l=M),xt(t)?io(t,Vt(o,1,xt,!0),M,l):[]}),tw=He(function(t){var o=_(t,Il);return o.length&&o[0]===t[0]?_l(o):[]}),aw=He(function(t){var o=ba(t),l=_(t,Il);return o===ba(l)?o=M:l.pop(),l.length&&l[0]===t[0]?_l(l,Ve(o,2)):[]}),rw=He(function(t){var o=ba(t),l=_(t,Il);return o=typeof o=="function"?o:M,o&&l.pop(),l.length&&l[0]===t[0]?_l(l,M,o):[]}),nw=He(Bp),ow=or(function(t,o){var l=t==null?0:t.length,p=fl(t,o);return tp(t,_(o,function(x){return ir(x,l)?+x:x}).sort(sp)),p}),iw=He(function(t){return Sr(Vt(t,1,xt,!0))}),cw=He(function(t){var o=ba(t);return xt(o)&&(o=M),Sr(Vt(t,1,xt,!0),Ve(o,2))}),lw=He(function(t){var o=ba(t);return o=typeof o=="function"?o:M,Sr(Vt(t,1,xt,!0),M,o)}),sw=He(function(t,o){return xt(t)?io(t,o):[]}),dw=He(function(t){return kl(h(t,xt))}),uw=He(function(t){var o=ba(t);return xt(o)&&(o=M),kl(h(t,xt),Ve(o,2))}),pw=He(function(t){var o=ba(t);return o=typeof o=="function"?o:M,kl(h(t,xt),M,o)}),mw=He(zl),hw=He(function(t){var o=t.length,l=o>1?t[o-1]:M;return l=typeof l=="function"?(t.pop(),l):M,Dp(t,l)}),fw=or(function(t){var o=t.length,l=o?t[0]:0,p=this.__wrapped__,x=function(P){return fl(P,t)};return!(o>1||this.__actions__.length)&&p instanceof Pe&&ir(l)?(p=p.slice(l,+l+(o?1:0)),p.__actions__.push({func:Ii,args:[x],thisArg:M}),new Oe(p,this.__chain__).thru(function(P){return o&&!P.length&&P.push(M),P})):this.thru(x)}),gw=bi(function(t,o,l){rt.call(t,l)?++t[l]:rr(t,l,1)}),yw=fp(Rp),_w=fp(Op),xw=bi(function(t,o,l){rt.call(t,l)?t[l].push(o):rr(t,l,[o])}),bw=He(function(t,o,l){var p=-1,x=typeof o=="function",P=Yt(t)?Tt(t.length):[];return Tr(t,function(F){P[++p]=x?r(o,F,l):co(F,o,l)}),P}),Sw=bi(function(t,o,l){rr(t,l,o)}),ww=bi(function(t,o,l){t[l?0:1].push(o)},function(){return[[],[]]}),vw=He(function(t,o){if(t==null)return[];var l=o.length;return l>1&&qt(t,o[0],o[1])?o=[]:l>2&&qt(o[0],o[1],o[2])&&(o=[o[0]]),Xu(t,Vt(o,1),[])}),Gi=LS||function(){return Lt.Date.now()},os=He(function(t,o,l){var p=Ot;if(l.length){var x=fe(l,bn(os));p|=fa}return nr(t,p,o,l,x)}),xm=He(function(t,o,l){var p=Ot|ma;if(l.length){var x=fe(l,bn(xm));p|=fa}return nr(o,p,t,l,x)}),Cw=He(function(t,o){return Uu(t,1,o)}),Tw=He(function(t,o,l){return Uu(t,Sa(o)||0,l)});Ai.Cache=ar;var Pw=YS(function(t,o){o=o.length==1&&De(o[0])?_(o[0],we(Ve())):_(Vt(o,1),we(Ve()));var l=o.length;return He(function(p){for(var x=-1,P=zt(p.length,l);++x<P;)p[x]=o[x].call(this,p[x]);return r(t,this,p)})}),is=He(function(t,o){return nr(t,fa,M,o,fe(o,bn(is)))}),bm=He(function(t,o){return nr(t,xr,M,o,fe(o,bn(bm)))}),kw=or(function(t,o){return nr(t,Ue,M,M,M,o)}),Iw=Ci(yl),Mw=Ci(function(t,o){return t>=o}),Hr=$u(function(){return arguments}())?$u:function(t){return yt(t)&&rt.call(t,"callee")&&!cm.call(t,"callee")},De=Tt.isArray,Aw=Ru?we(Ru):q1,Pr=BS||Yl,Fw=Ou?we(Ou):H1,Sm=Lu?we(Lu):Z1,cs=Vu?we(Vu):G1,wm=Bu?we(Bu):Y1,kn=Du?we(Du):K1,Ew=Ci(Sl),Rw=Ci(function(t,o){return t<=o}),Ow=_n(function(t,o){if(po(o)||Yt(o))return Ha(o,Mt(o),t),M;for(var l in o)rt.call(o,l)&&oo(t,l,o[l])}),vm=_n(function(t,o){Ha(o,Kt(o),t)}),Yi=_n(function(t,o,l,p){Ha(o,Kt(o),t,p)}),Lw=_n(function(t,o,l,p){Ha(o,Mt(o),t,p)}),Vw=or(fl),Bw=He(function(t,o){t=lt(t);var l=-1,p=o.length,x=p>2?o[2]:M;for(x&&qt(o[0],o[1],x)&&(p=1);++l<p;)for(var P=o[l],F=Kt(P),L=-1,j=F.length;++L<j;){var Z=F[L],H=t[Z];(H===M||Ra(H,vn[Z])&&!rt.call(t,Z))&&(t[Z]=P[Z])}return t}),Dw=He(function(t){return t.push(M,wp),r(Cm,M,t)}),jw=yp(function(t,o,l){o!=null&&typeof o.toString!="function"&&(o=Di.call(o)),t[o]=l},ql(Qt)),zw=yp(function(t,o,l){o!=null&&typeof o.toString!="function"&&(o=Di.call(o)),rt.call(t,o)?t[o].push(l):t[o]=[l]},Ve),Ww=He(co),Nw=_n(function(t,o,l){yi(t,o,l)}),Cm=_n(function(t,o,l,p){yi(t,o,l,p)}),Uw=or(function(t,o){var l={};if(t==null)return l;var p=!1;o=_(o,function(P){return P=wr(P,t),p||(p=P.length>1),P}),Ha(t,Ol(t),l),p&&(l=_a(l,ra|Lr|Ma,fx));for(var x=o.length;x--;)Pl(l,o[x]);return l}),qw=or(function(t,o){return t==null?{}:X1(t,o)}),Tm=bp(Mt),Pm=bp(Kt),Hw=xn(function(t,o,l){return o=o.toLowerCase(),t+(l?Xp(o):o)}),$w=xn(function(t,o,l){return t+(l?"-":"")+o.toLowerCase()}),Zw=xn(function(t,o,l){return t+(l?" ":"")+o.toLowerCase()}),Gw=hp("toLowerCase"),Yw=xn(function(t,o,l){return t+(l?"_":"")+o.toLowerCase()}),Kw=xn(function(t,o,l){return t+(l?" ":"")+ls(o)}),Qw=xn(function(t,o,l){return t+(l?" ":"")+o.toUpperCase()}),ls=hp("toUpperCase"),km=He(function(t,o){try{return r(t,M,o)}catch(l){return Wl(l)?l:new Kl(l)}}),Jw=or(function(t,o){return c(o,function(l){l=$a(l),rr(t,l,os(t[l],t))}),t}),Xw=gp(),ev=gp(!0),tv=He(function(t,o){return function(l){return co(l,t,o)}}),av=He(function(t,o){return function(l){return co(t,l,o)}}),rv=Fl(_),nv=Fl(u),ov=Fl(C),iv=_p(),cv=_p(!0),lv=wi(function(t,o){return t+o},0),sv=El("ceil"),dv=wi(function(t,o){return t/o},1),uv=El("floor"),pv=wi(function(t,o){return t*o},1),mv=El("round"),hv=wi(function(t,o){return t-o},0);return y.after=zb,y.ary=Np,y.assign=Ow,y.assignIn=vm,y.assignInWith=Yi,y.assignWith=Lw,y.at=Vw,y.before=Up,y.bind=os,y.bindAll=Jw,y.bindKey=xm,y.castArray=Gb,y.chain=jp,y.chunk=Rx,y.compact=Ox,y.concat=Lx,y.cond=iS,y.conforms=cS,y.constant=ql,y.countBy=gw,y.create=y2,y.curry=qp,y.curryRight=Hp,y.debounce=$p,y.defaults=Bw,y.defaultsDeep=Dw,y.defer=Cw,y.delay=Tw,y.difference=JS,y.differenceBy=XS,y.differenceWith=ew,y.drop=Vx,y.dropRight=Bx,y.dropRightWhile=Dx,y.dropWhile=jx,y.fill=zx,y.filter=Pb,y.flatMap=kb,y.flatMapDeep=Ib,y.flatMapDepth=Mb,y.flatten=Lp,y.flattenDeep=Wx,y.flattenDepth=Nx,y.flip=Wb,y.flow=Xw,y.flowRight=ev,y.fromPairs=Ux,y.functions=C2,y.functionsIn=T2,y.groupBy=xw,y.initial=Hx,y.intersection=tw,y.intersectionBy=aw,y.intersectionWith=rw,y.invert=jw,y.invertBy=zw,y.invokeMap=bw,y.iteratee=Hl,y.keyBy=Sw,y.keys=Mt,y.keysIn=Kt,y.map=Mi,y.mapKeys=k2,y.mapValues=I2,y.matches=sS,y.matchesProperty=dS,y.memoize=Ai,y.merge=Nw,y.mergeWith=Cm,y.method=tv,y.methodOf=av,y.mixin=$l,y.negate=Fi,y.nthArg=pS,y.omit=Uw,y.omitBy=M2,y.once=Nb,y.orderBy=Fb,y.over=rv,y.overArgs=Pw,y.overEvery=nv,y.overSome=ov,y.partial=is,y.partialRight=bm,y.partition=ww,y.pick=qw,y.pickBy=Jp,y.property=am,y.propertyOf=mS,y.pull=nw,y.pullAll=Bp,y.pullAllBy=Yx,y.pullAllWith=Kx,y.pullAt=ow,y.range=iv,y.rangeRight=cv,y.rearg=kw,y.reject=Ob,y.remove=Qx,y.rest=Ub,y.reverse=jl,y.sampleSize=Vb,y.set=F2,y.setWith=E2,y.shuffle=Bb,y.slice=Jx,y.sortBy=vw,y.sortedUniq=ob,y.sortedUniqBy=ib,y.split=K2,y.spread=qb,y.tail=cb,y.take=lb,y.takeRight=sb,y.takeRightWhile=db,y.takeWhile=ub,y.tap=yb,y.throttle=Hb,y.thru=Ii,y.toArray=Yp,y.toPairs=Tm,y.toPairsIn=Pm,y.toPath=_S,y.toPlainObject=Qp,y.transform=R2,y.unary=$b,y.union=iw,y.unionBy=cw,y.unionWith=lw,y.uniq=pb,y.uniqBy=mb,y.uniqWith=hb,y.unset=O2,y.unzip=zl,y.unzipWith=Dp,y.update=L2,y.updateWith=V2,y.values=Sn,y.valuesIn=B2,y.without=sw,y.words=tm,y.wrap=Zb,y.xor=dw,y.xorBy=uw,y.xorWith=pw,y.zip=mw,y.zipObject=fb,y.zipObjectDeep=gb,y.zipWith=hw,y.entries=Tm,y.entriesIn=Pm,y.extend=vm,y.extendWith=Yi,$l(y,y),y.add=lv,y.attempt=km,y.camelCase=Hw,y.capitalize=Xp,y.ceil=sv,y.clamp=D2,y.clone=Yb,y.cloneDeep=Qb,y.cloneDeepWith=Jb,y.cloneWith=Kb,y.conformsTo=Xb,y.deburr=em,y.defaultTo=lS,y.divide=dv,y.endsWith=W2,y.eq=Ra,y.escape=N2,y.escapeRegExp=U2,y.every=Tb,y.find=yw,y.findIndex=Rp,y.findKey=_2,y.findLast=_w,y.findLastIndex=Op,y.findLastKey=x2,y.floor=uv,y.forEac
vendor: 4,991 bytes, line 45
45h=zp,y.forEachRight=Wp,y.forIn=b2,y.forInRight=S2,y.forOwn=w2,y.forOwnRight=v2,y.get=Nl,y.gt=Iw,y.gte=Mw,y.has=P2,y.hasIn=Ul,y.head=Vp,y.identity=Qt,y.includes=Ab,y.indexOf=qx,y.inRange=j2,y.invoke=Ww,y.isArguments=Hr,y.isArray=De,y.isArrayBuffer=Aw,y.isArrayLike=Yt,y.isArrayLikeObject=xt,y.isBoolean=e2,y.isBuffer=Pr,y.isDate=Fw,y.isElement=t2,y.isEmpty=a2,y.isEqual=r2,y.isEqualWith=n2,y.isError=Wl,y.isFinite=o2,y.isFunction=cr,y.isInteger=Zp,y.isLength=Ei,y.isMap=Sm,y.isMatch=i2,y.isMatchWith=c2,y.isNaN=l2,y.isNative=s2,y.isNil=u2,y.isNull=d2,y.isNumber=Gp,y.isObject=ft,y.isObjectLike=yt,y.isPlainObject=mo,y.isRegExp=cs,y.isSafeInteger=p2,y.isSet=wm,y.isString=Ri,y.isSymbol=oa,y.isTypedArray=kn,y.isUndefined=m2,y.isWeakMap=h2,y.isWeakSet=f2,y.join=$x,y.kebabCase=$w,y.last=ba,y.lastIndexOf=Zx,y.lowerCase=Zw,y.lowerFirst=Gw,y.lt=Ew,y.lte=Rw,y.max=bS,y.maxBy=SS,y.mean=wS,y.meanBy=vS,y.min=CS,y.minBy=TS,y.stubArray=Gl,y.stubFalse=Yl,y.stubObject=hS,y.stubString=fS,y.stubTrue=gS,y.multiply=pv,y.nth=Gx,y.noConflict=uS,y.noop=Zl,y.now=Gi,y.pad=q2,y.padEnd=H2,y.padStart=$2,y.parseInt=Z2,y.random=z2,y.reduce=Eb,y.reduceRight=Rb,y.repeat=G2,y.replace=Y2,y.result=A2,y.round=mv,y.runInContext=B,y.sample=Lb,y.size=Db,y.snakeCase=Yw,y.some=jb,y.sortedIndex=Xx,y.sortedIndexBy=eb,y.sortedIndexOf=tb,y.sortedLastIndex=ab,y.sortedLastIndexBy=rb,y.sortedLastIndexOf=nb,y.startCase=Kw,y.startsWith=Q2,y.subtract=hv,y.sum=PS,y.sumBy=kS,y.template=J2,y.times=yS,y.toFinite=lr,y.toInteger=We,y.toLength=Kp,y.toLower=X2,y.toNumber=Sa,y.toSafeInteger=g2,y.toString=tt,y.toUpper=eS,y.trim=tS,y.trimEnd=aS,y.trimStart=rS,y.truncate=nS,y.unescape=oS,y.uniqueId=xS,y.upperCase=Qw,y.upperFirst=ls,y.each=zp,y.eachRight=Wp,y.first=Vp,$l(y,function(){var t={};return qa(y,function(o,l){rt.call(y.prototype,l)||(t[l]=o)}),t}(),{chain:!1}),y.VERSION=sn,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),c(["drop","take"],function(t,o){Pe.prototype[t]=function(l){l=l===M?1:Pt(We(l),0);var p=this.__filtered__&&!o?new Pe(this):this.clone();return p.__filtered__?p.__takeCount__=zt(l,p.__takeCount__):p.__views__.push({size:zt(l,Ua),type:t+(p.__dir__<0?"Right":"")}),p},Pe.prototype[t+"Right"]=function(l){return this.reverse()[t](l).reverse()}}),c(["filter","map","takeWhile"],function(t,o){var l=o+1,p=l==iu||l==$y;Pe.prototype[t]=function(x){var P=this.clone();return P.__iteratees__.push({iteratee:Ve(x,3),type:l}),P.__filtered__=P.__filtered__||p,P}}),c(["head","last"],function(t,o){var l="take"+(o?"Right":"");Pe.prototype[t]=function(){return this[l](1).value()[0]}}),c(["initial","tail"],function(t,o){var l="drop"+(o?"":"Right");Pe.prototype[t]=function(){return this.__filtered__?new Pe(this):this[l](1)}}),Pe.prototype.compact=function(){return this.filter(Qt)},Pe.prototype.find=function(t){return this.filter(t).head()},Pe.prototype.findLast=function(t){return this.reverse().find(t)},Pe.prototype.invokeMap=He(function(t,o){return typeof t=="function"?new Pe(this):this.map(function(l){return co(l,t,o)})}),Pe.prototype.reject=function(t){return this.filter(Fi(Ve(t)))},Pe.prototype.slice=function(t,o){t=We(t);var l=this;return l.__filtered__&&(t>0||o<0)?new Pe(l):(t<0?l=l.takeRight(-t):t&&(l=l.drop(t)),o!==M&&(o=We(o),l=o<0?l.dropRight(-o):l.take(o-t)),l)},Pe.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Pe.prototype.toArray=function(){return this.take(Ua)},qa(Pe.prototype,function(t,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),x=y[p?"take"+(o=="last"?"Right":""):o],P=p||/^find/.test(o);x&&(y.prototype[o]=function(){var F=this.__wrapped__,L=p?[1]:arguments,j=F instanceof Pe,Z=L[0],H=j||De(F),te=function(Ze){var Ge=x.apply(y,w([Ze],L));return p&&be?Ge[0]:Ge};H&&l&&typeof Z=="function"&&Z.length!=1&&(j=H=!1);var be=this.__chain__,Ie=!!this.__actions__.length,Ee=P&&!be,ze=j&&!Ie;if(!P&&H){F=ze?F:new Pe(this);var Re=t.apply(F,L);return Re.__actions__.push({func:Ii,args:[te],thisArg:M}),new Oe(Re,be)}return Ee&&ze?t.apply(this,L):(Re=this.thru(te),Ee?p?Re.value()[0]:Re.value():Re)})}),c(["pop","push","shift","sort","splice","unshift"],function(t){var o=Li[t],l=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",p=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var x=arguments;if(p&&!this.__chain__){var P=this.value();return o.apply(De(P)?P:[],x)}return this[l](function(F){return o.apply(De(F)?F:[],x)})}}),qa(Pe.prototype,function(t,o){var l=y[o];if(l){var p=l.name+"";rt.call(Tn,p)||(Tn[p]=[]),Tn[p].push({name:o,func:l})}}),Tn[Si(M,ma).name]=[{name:"wrapper",func:M}],Pe.prototype.clone=Zt,Pe.prototype.reverse=ml,Pe.prototype.value=d1,y.prototype.at=fw,y.prototype.chain=_b,y.prototype.commit=xb,y.prototype.next=bb,y.prototype.plant=wb,y.prototype.reverse=vb,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Cb,y.prototype.first=y.prototype.head,ho&&(y.prototype[ho]=Sb),y},yn=s1();Br?((Br.exports=yn)._=yn,ul._=yn):Lt._=yn}).call(So)}
vendor: 5,898 bytes, line 45
45)(bc,bc.exports);var wk=bc.exports,Xf={};(function(e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var a=Object.prototype.hasOwnProperty,r=e.aliasToReal,i={};for(var c in r){var s=r[c];a.call(i,s)?i[s].push(c):i[s]=[c]}return i}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom
45:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})(Xf);var vk={},kt=Xf,Ck=vk,rh=Array.prototype.push;function Tk(e,a){return a==2?function(r,i){return e.apply(void 0,arguments)}:function(r){return e.apply(void 0,arguments)}}function gs(e,a){return a==2?function(r,i){return e(r,i)}:function(r){return e(r)}}function nh(e){for(var a=e?e.length:0,r=Array(a);a--;)r[a]=e[a];return r}function Pk(e){return function(a){return e({},a)}}function kk(e,a){return function(){for(var r=arguments.length,i=r-1,c=Array(r);r--;)c[r]=arguments[r];var s=c[a],u=c.slice(0,a);return s&&rh.apply(u,s),a!=i&&rh.apply(u,c.slice(a+1)),e.apply(this,u)}}function ys(e,a){return function(){var r=arguments.length;if(r){for(var i=Array(r);r--;)i[r]=arguments[r];var c=i[0]=a.apply(void 0,i);return e.apply(void 0,i),c}}}function Bs(e,a,r,i){var c=typeof a=="function",s=a===Object(a);if(s&&(i=r,r=a,a=void 0),r==null)throw new TypeError;i||(i={});var u={cap:"cap"in i?i.cap:!0,curry:"curry"in i?i.curry:!0,fixed:"fixed"in i?i.fixed:!0,immutable:"immutable"in i?i.immutable:!0,rearg:"rearg"in i?i.rearg:!0},h=c?r:Ck,f="curry"in i&&i.curry,g="fixed"in i&&i.fixed,_="rearg"in i&&i.rearg,w=c?r.runInContext():void 0,b=c?r:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},v=b.ary,C=b.assign,T=b.clone,I=b.curry,O=b.forEach,D=b.isArray,A=b.isError,E=b.isFunction,R=b.isWeakMap,k=b.keys,z=b.rearg,Q=b.toInteger,N=b.toPath,W=k(kt.aryMethod),Y={castArray:function(ie){return function(){var J=arguments[0];return D(J)?ie(nh(J)):ie.apply(void 0,arguments)}},iteratee:function(ie){return function(){var J=arguments[0],re=arguments[1],fe=ie(J,re),ke=fe.length;return u.cap&&typeof re=="number"?(re=re>2?re-2:1,ke&&ke<=re?fe:gs(fe,re)):fe}},mixin:function(ie){return function(J){var re=this;if(!E(re))return ie(re,Object(J));var fe=[];return O(k(J),function(ke){E(J[ke])&&fe.push([ke,re.prototype[ke]])}),ie(re,Object(J)),O(fe,function(ke){var $e=ke[1];E($e)?re.prototype[ke[0]]=$e:delete re.prototype[ke[0]]}),re}},nthArg:function(ie){return function(J){var re=J<0?1:Q(J)+1;return I(ie(J),re)}},rearg:function(ie){return function(J,re){var fe=re?re.length:0;return I(ie(J,re),fe)}},runInContext:function(ie){return function(J){return Bs(e,ie(J),i)}}};function oe(ie,J){if(u.cap){var re=kt.iterateeRearg[ie];if(re)return q(J,re);var fe=!c&&kt.iterateeAry[ie];if(fe)return ae(J,fe)}return J}function Se(ie,J,re){return f||u.curry&&re>1?I(J,re):J}function ce(ie,J,re){if(u.fixed&&(g||!kt.skipFixed[ie])){var fe=kt.methodSpread[ie],ke=fe&&fe.start;return ke===void 0?v(J,re):kk(J,ke)}return J}function we(ie,J,re){return u.rearg&&re>1&&(_||!kt.skipRearg[ie])?z(J,kt.methodRearg[ie]||kt.aryRearg[re]):J}function le(ie,J){J=N(J);for(var re=-1,fe=J.length,ke=fe-1,$e=T(Object(ie)),X=$e;X!=null&&++re<fe;){var ee=J[re],ue=X[ee];ue!=null&&!(E(ue)||A(ue)||R(ue))&&(X[ee]=T(re==ke?ue:Object(ue))),X=X[ee]}return $e}function K(ie){return ge.runInContext.convert(ie)(void 0)}function se(ie,J){var re=kt.aliasToReal[ie]||ie,fe=kt.remap[re]||re,ke=i;return function($e){var X=c?w:b,ee=c?w[fe]:J,ue=C(C({},ke),$e);return Bs(X,re,ee,ue)}}function ae(ie,J){return xe(ie,function(re){return typeof re=="function"?gs(re,J):re})}function q(ie,J){return xe(ie,function(re){var fe=J.length;return Tk(z(gs(re,fe),J),fe)})}function xe(ie,J){return function(){var re=arguments.length;if(!re)return ie();for(var fe=Array(re);re--;)fe[re]=arguments[re];var ke=u.rearg?0:re-1;return fe[ke]=J(fe[ke]),ie.apply(void 0,fe)}}function Ce(ie,J,re){var fe,ke=kt.aliasToReal[ie]||ie,$e=J,X=Y[ke];return X?$e=X(J):u.immutable&&(kt.mutate.array[ke]?$e=ys(J,nh):kt.mutate.object[ke]?$e=ys(J,Pk(J)):kt.mutate.set[ke]&&($e=ys(J,le))),O(W,function(ee){return O(kt.aryMethod[ee],function(ue){if(ke==ue){var pe=kt.methodSpread[ke],de=pe&&pe.afterRearg;return fe=de?ce(ke,we(ke,$e,ee),ee):we(ke,ce(ke,$e,ee),ee),fe=oe(ke,fe),fe=Se(ke,fe,ee),!1}}),!fe}),fe||(fe=$e),fe==J&&(fe=f?I(fe,1):function(){return J.apply(this,arguments)}),fe.convert=se(ke,J),fe.placeholder=J.placeholder=re,fe}if(!s)return Ce(a,r,h);var ge=r,Be=[];return O(W,function(ie){O(kt.aryMethod[ie],function(J){var re=ge[kt.remap[J]||J];re&&Be.push([J,Ce(J,re,ge)])})}),O(k(ge),function(ie){var J=ge[ie];if(typeof J=="function"){for(var re=Be.length;re--;)if(Be[re][0]==ie)return;J.convert=se(ie,J),Be.push([ie,J])}}),O(Be,function(ie){ge[ie[0]]=ie[1]}),ge.convert=K,ge.placeholder=ge,O(k(ge),function(ie){O(kt.realToAlias[ie]||[],function(J){ge[J]=ge[ie]})}),ge}var Ik=Bs,oh=wk.runInContext(),Mk=Ik(oh,oh);const ih=fd(Mk),Ak=e=>ih.map(ih.pick(["entity_value","job_role_value","entity_type_value","company_
45size_value"]),e),Fk=e=>{if(!e)return{entity_type:null,entity:null,company_size:null,job_role:null};const a=Ak(e),r=a==null?void 0:a.reduce((i,c)=>{for(const s in c){const u=c[s];s&&u&&(i[s]=u)}return i},{});return{entity_type:(r==null?void 0:r.entity_type_value)||null,entity:(r==null?void 0:r.entity_value)||null,company_size:(r==null?void 0:r.company_size_value)||null,job_role:(r==null?void 0:r.job_role_value)||null}},Ek="user/license-persona",ei=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:i=>Le(Ek,{method:i0,data:i}),onSuccess:()=>{e.invalidateQueries({queryKey:Et.only.queryKey})}});return{updateUserPersona:a,...r}},Rk=({subscriptionId:e,service:a,enabled:r=!0})=>{const{data:i,isLoading:c,error:s}=Je({queryKey:[jm,{subscriptionId:e,service:a}],queryFn:()=>Le(jm(e),{method:"POST",data:{service:a}}),enabled:!!e&&!0&&r});return{data:i,isLoading:c,error:s}},Ok=e=>{const{mutateAsync:a,...r}=mt({mutationFn:({subscriptionId:i,service:c})=>Le(P4(i),{method:"POST",data:{service:c}}),...e||{}});return{storeServiceAddition:a,...r}},ti=e=>{const{data:a,isLoading:r,error:i,refetch:c}=Je({...Er.getById(e||0),refetchOnWindowFocus:!1,enabled:!!e}),s=m.useCallback(f=>a==null?void 0:a.terms.find(g=>[f].includes(g.type.value)),[a]),u=m.useMemo(()=>s("current")||s("trial"),[s]),h=m.useCallback(f=>u==null?void 0:u.services.find(g=>g.type===f),[u]);return{data:a,currentTerm:u,getTerm:s,getCurrentTermService:h,isLoading:r,error:i,refetch:c}},Lk=({total:e,subscriptionId:a,service:r,onSubmit:i})=>{const c=pt(),{storeServiceAddition:s,isPending:u}=Ok({onSuccess:()=>{c.invalidateQueries({queryKey:bt.list({active:1}).queryKey}),c.invalidateQueries({queryKey:Er.list(!0).queryKey}),i==null||i()},onError:()=>{Ct.create({title:"Error adding sound effects",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}}),{data:h}=ti(a);let f;if(h!=null&&h.payment_method){const _=h==null?void 0:h.payment_method,w=new Date,b=new Date(_.exp_year,_.exp_month-1),v=w>=b;f={label:_.last_four?`${_.brand.toUpperCase()} ending in ${_.last_four}`:"Linked to Paypal account",brand:_.brand||"paypal",expiration_month:_.exp_month,expiration_year:_.exp_year,is_expired:(_==null?void 0:_.type)==="paypal"?!1:v}}const g=()=>{s({subscriptionId:a,service:r})};return d(V,{gap:24,width:"100%",height:264,"data-cy":"_ServiceAdditionPaymentStep_Stack",children:[d(V,{gap:8,alignItems:"flex-start","data-cy":"_ServiceAdditionPaymentStep_Stack_1",children:[n(S,{textStyle:"heading.20.reg","data-cy":"_ServiceAdditionPaymentStep_Text",children:"Payment Method"}),n(S,{textStyle:"paragraph.12.reg",textAlign:"left",color:"text.secondary","data-cy":"_ServiceAdditionPaymentStep_Text_3",children:"The subscription assigned payment method will be used for the pro-rated amount due today."})]}),d(V,{alignItems:"flex-start",gap:24,width:"100%",border:"1px solid",borderColor:"border.default",borderRadius:2,p:20,maxWidth:{base:"100%",lg:450},boxShadow:"2","data-cy":"_ServiceAdditionPaymentStep_Stack",children:[d(G,{alignItems:"center",gap:8,"data-cy":"_ServiceAdditionPaymentStep_Flex",children:[n(Ms,{id:"add-new-card",name:"payment_method",type:"radio",checked:!0,readOnly:!0,"data-cy":"_ServiceAdditionPaymentStep_RadioButton"}),n(S,{textStyle:"UI.14.reg","data-cy":"_ServiceAdditionPaymentStep_Text",children:"Credit Card"})]}),f&&n(m0,{width:"100%",paymentMethod:f,"data-cy":"_ServiceAdditionPaymentStep_PaymentCard"})]}),n(qv,{title:`Pay $${e||""}`,onClick:g,isLoading:u,loadingRender:n(Pc,{size:"xl","data-cy":"_ServiceAdditionPaymentStep_Spinner"}),isDisabled:!e,"data-cy":"_ServiceAdditionPaymentStep_ActionButton"})]})};var Vk={name:"9f6lve",styles:"margin:0 auto;width:100%;height:100%"};const Bk=({song:e,license:a,selectedPlanType:r,referralCode:i,source:c,isTrialAllowed:s,isFreeTrialFlow:u,onSubscriptionCheckout:h,upgradeSubscriptionId:f,planId:g,onSubscriptionCustomQuote:_,selectedOptions:w})=>{var pa,Na,Ot,ma,yr,ha,_r,fa,xr,ga;const b=Or({base:!1,md:!0}),v=pt(),{user:{data:C,refetchUser:T}}=ht(),{updateUserPersona:I}=ei(),[O,D]=m.useState(!1),[A,E]=m.useState(r),[R,k]=m.useState("register"),[z,Q]=m.useState(!1),[N,W]=m.useState(void 0),[Y,oe]=m.useState(void 0),[Se,ce]=m.useState(),[we,le]=m.useState(),K=Oa(Ue=>Ue.isSFXAdded),se=Oa(Ue=>Ue.isServiceAddition),ae=Oa(Ue=>Ue.couponCode),q=Oa(Ue=>Ue.setIsSFXAdded),xe=Oa(Ue=>Ue.onCheckoutComplete),Ce=Oa(Ue=>Ue.setCouponCode),ge=m.useRef(!1),Be=m.useRef(!1),ie=m.useRef(!1),J=m.useRef(!1),{countries:re}=hd(),fe=m.useMemo(()=>{var Ue;if(!re.isLoading)return(Ue=re.data.find(jt=>jt.code===C.country))==null?void 0:Ue.id},[re,C.country]),ke=((pa=a==null?void 0:a.subscriptions)==null?void 0:pa[0])||void 0,$e=((Na=C==null?void 0:C.active_organization)==null?void 0:Na.subscription_trial_allowed)!==!1&&s,X=!!f,ee=X?void 0:ae,{currentTerm:ue}=ti(f),pe=(ue==null?void 0:ue.services.some(Ue=>Ue.type==="sound-effects"))??!1,{planDetails:de}=fP({enabled:!se,defaultPlanDetails:ke,standard_license:a.standard_license,coupon_code:ee,vat_number:N,ein_number:Y,country_id:Se||fe||251,region_id:we,referral_code:i,trial:$e,...f&&{upgrade_from_subscription_id:f},...(K||se||pe)&&{services:["sound-effects"]}}),Ke=(ma=(Ot=de.data)==null?void 0:Ot.upgrade_details)==null?void 0:ma.billing_info,Wa=Ke==null?void 0:Ke.country,fr=Ke==null?void 0:Ke.vat_number,M=Ke==null?void 0:Ke.ein_number;m.useEffect(()=>{!X||!ae||Ce(void 0)},[ae,X,Ce]),m.useEffect(()=>{var jt;if(Be.current||!Wa||re.isLoading)return;const Ue=(jt=re.data)==null?void 0:jt.find(mn=>mn.code===Wa);Ue!=null&&Ue.id&&(ce(Ue.id),Be.current=!0)},[Wa,re.data,re.isLoading]),m.useEffect(()=>{ie.current||!fr||(W(fr),ie.current=!0)},[fr]),m.useEffect(()=>{J.current||!M||(oe(M),J.current=!0)},[M]);const{servicePricing:sn}=Gf({...g&&{subscription_plan_id:g},...a.standard_license&&!g&&{standard_license:a.standard_license},services:["sound-effects"],upgradeSubscriptionId:f}),{data:Ia}=Rk({subscriptionId:f,service:"sound-effects",enabled:se}),dn=(Ue=!1)=>{Q(Ue)},Rt=Ue=>{Ce(Ue)},un=()=>Ce(void 0),gr=Ue=>{W(Ue)},pn=Ue=>{oe(Ue)},Xa=Sk(de,a,ue),ra=!!((yr=a==null?void 0:a.license)!=null&&yr.eligible_for_custom_licensing),Lr=async()=>{var oi;const Ue=Fk(w),jt=await I({...Ue,company_name:null}),mn=await T();(oi=mn.data)!=null&&oi.id&&v.setQueryData(Et.only.queryKey,{...mn.data,license_persona:jt})},Ma=({user:Ue,subscription:jt})=>{jt!=null&&jt.id&&(ge.current=!0),h==null||h({user:Ue,subscription:jt}),xe==null||xe({user:Ue,subscription:jt}
45),v.invalidateQueries({queryKey:Er.list().queryKey,type:"all"}),v.invalidateQueries({queryKey:bt.list({active:1}).queryKey,type:"all"}),v.invalidateQueries({queryKey:Qo.list().queryKey,type:"all"})};return bd(()=>{C!=null&&C.username&&!se&&!ge.current&&Y4()}),n(Hv,{css:Vk,"data-cy":"_SubscriptionOnsite_BlockUiWrapper",children:n(ud,{tag:"div",blocking:z,loader:n(Dt,{"data-cy":"_SubscriptionOnsite_CircleLoader"}),message:"Processing Payment","data-cy":"_SubscriptionOnsite_BlockUi",children:d(G,{width:"auto",minHeight:{base:0,lg:830},padding:{base:"40px 30px",md:0},alignItems:"stretch","data-cy":"_SubscriptionOnsite_Flex",children:[(!O||b)&&n(me,{flexShrink:1,position:"sticky",top:0,width:{sm:"100%",md:"auto"},"data-cy":"_SubscriptionOnsite_Box",children:n(bk,{isLoading:de.isLoading||re.isLoading,subscriptionOptions:Xa,planType:A,defaultPlanType:r,isTrialAllowed:!X&&$e,onRemoveCoupon:un,onSelectPlanType:E,upgradeDetails:(ha=de.data)==null?void 0:ha.upgrade_details,setIsCartFormOpen:D,setIsSFXAdded:q,isSFXAdded:K,services:sn.data,soundsAdditionPreview:Ia,currentTermEnabledServices:ue==null?void 0:ue.services,"data-cy":"_SubscriptionOnsite_CartItem"})}),n(gt,{hideBelow:"md",dir:"vertical",width:"1px",bg:"border.default",alignSelf:"stretch","data-cy":"_SubscriptionOnsite_Separator"}),(O||b)&&n(me,{padding:{base:"10px 0px",md:20,lg:40},height:{base:"100%",lg:"auto"},width:{base:"fit-content",lg:418},maxWidth:{md:360,lg:418},alignItems:C.username?"flex-start":"center",flexShrink:0,position:"relative",background:"background.controls.modal",display:"flex","data-cy":"_SubscriptionOnsite_Box",children:se?n(Lk,{subscriptionId:f,service:"sound-effects",total:Ia==null?void 0:Ia.price.due_today,onSubmit:xe,"data-cy":"_SubscriptionOnsite_ServiceAdditionPaymentStep"}):C.username?n(l0,{abilities:["purchase_subscription"],noPermissionComponent:n(d0,{hideBorder:!0,"data-cy":"_SubscriptionOnsite_CartNoPermissionsView"}),"data-cy":"_SubscriptionOnsite_AbilityDisplay",children:n(s0,{loggerData:{cartType:"subscription",cartActionData:`subscription_name: ${a.standard_license}`,source:c},user:C,subscription:{planDetails:de.data,standard_license:a.standard_license,selectedPlanType:A,referralCode:i,source:c,onSubscriptionCheckout:Ma,onProcessing:dn,couponCode:ae,song:e,onSubscriptionCustomQuote:_,isFreeTrialFlow:u},onCountryChanged:ce,onRegionChanged:le,onAddCouponCode:Rt,onAddVAT:gr,onAddEIN:pn,eligibleForCustomLicense:ra,defaultBillingDetails:(fa=(_r=de.data)==null?void 0:_r.upgrade_details)==null?void 0:fa.billing_info,upgradePaymentMethod:(ga=(xr=de.data)==null?void 0:xr.upgrade_details)==null?void 0:ga.card,upgradeSubscriptionId:f,addonServices:K?["sound-effects"]:[],"data-cy":"_SubscriptionOnsite_CartFormSection"})}):d("div",{style:{marginTop:50},"data-cy":"_SubscriptionOnsite_div",children:[R==="register"&&n(sd,{onSwitchView:()=>k("login"),onSuccess:Lr,"data-cy":"_SubscriptionOnsite_RegisterView"}),R==="login"&&n(dd,{onSwitchView:()=>k("register"),"data-cy":"_SubscriptionOnsite_LoginView"})]})})]})})})},eg=(e,a)=>{const{data:r,isLoading:i,isFetching:c,error:s}=Je({...bt.details(e||0),refetchOnMount:!1,refetchOnWindowFocus:!1,...(a==null?void 0:a.id)&&{placeholderData:a},enabled:!!e});return{subscription:{data:r,isLoading:i||c,error:s}}},tg=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.cancellationOffers(e),refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0});return{offers:{data:a,isLoading:r,error:i}}},qd=_e("div",{target:"e19iaxdi7"})(({theme:e})=>({minHeight:382,minWidth:500,[e.media.desktop]:{padding:"48px 50px"},[e.media.tablet]:{padding:"24px"},[e.media.mobile]:{padding:"16px",minWidth:"100%"}})),ag=_e("div",{target:"e19iaxdi6"})(({theme:e,error:a})=>({minHeight:"100%",[e.media.sm]:{padding:"16px 20px",minWidth:"100%"},[e.media.lg]:{padding:"48px 50px",width:a?500:400}})),Dk=_e("div",{target:"e19iaxdi5"})(({theme:e})=>({background:e.color.modal.background,borderRadius:8,[e.media.sm]:{padding:"16px",width:"100%",maxWidth:"100%"},[e.media.lg]:{padding:0,width:"100%",maxWidth:600}})),jk=[{id:"discounted_renewal",name:e=>`${e}% Discount`,description:e=>`Leverage our one-time offer to get ${e}% off your annual subscription.`,icon:"dollarSignOffer"},{id:"month_to_month",name:()=>"Month-to-Month",description:()=>"Move from your annual contract and pay month-to-month.",icon:"calendarTwo"}],zk=[{id:"discounted_renewal",name:e=>`${e}% Discount`,description:e=>`Leverage our one-time offer to get ${e}% off your annual subscription.`,icon:"dollarSignOffer"}],rg=_e("div",{target:"e1e1pqwu4"})(({theme:e})=>({alignSelf:"start",marginRight:"16px",minWidth:32,minHeight:32,background:e.color.base.g2,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"})),ng=_e("div",{target:"e1e1pqwu3"})(({theme:e})=>({minWidth:22,minHeight:22,background:e.color.base.g3,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"})),og=_e("div",{target:"e1e1pqwu2"})(({theme:e})=>({fontSize:14,fontWeight:700,lineHeight:"18px",color:e.mode==="light"?e.color.text.darkBlue:e.color.base["text-color"]})),ig=_e("div",{target:"e1e1pqwu1"})(({theme:e})=>({fontSize:14,fontWeight:400,lineHeight:"18px",color:e.mode==="light"?e.color.text.lightBlue:e.color.base["text-color-secondary"],maxWidth:330})),cg=_e("button",{target:"e1e1pqwu0"})(({theme:e})=>({padding:"16px",background:e.color.surface.surface1,textAlign:"start",border:`2px solid ${e.color.base.divi
45derColor}`,display:"flex",alignItems:"center",cursor:"pointer",transition:"all 0.2s","&:hover":{border:`2px solid ${e.color.base.b}`,backgroundColor:e.color.button.light},minHeight:86,maxHeight:86}));var Wk={name:"26lsfd",styles:"justify-self:end"};const ch=({offer:e,discountedRenewalPercentage:a,onOfferSelected:r})=>n(cg,{id:`${e.id}_option`,"aria-label":"cancellation offer",onClick:()=>r==null?void 0:r(e),"data-cy":"_OfferITem_OfferContainer",children:d(he,{alignItems:"start",justifyContent:"start",style:{width:"100%"},"data-cy":"_OfferITem_Flex",children:[n(rg,{"data-cy":"_OfferITem_OfferIconContainer",children:n(ng,{"data-cy":"_OfferITem_OfferIconInnerContainer",children:n(Xe,{name:e.icon,width:e.iconSize||16,"data-cy":"_OfferITem_Icon"})})}),d(he,{alignItems:"center",justifyContent:"space-between",style:{width:"100%"},"data-cy":"_OfferITem_Flex",children:[d(he,{direction:"column",style:{marginRight:4},"data-cy":"_OfferITem_Flex_6",children:[n(og,{"data-cy":"_OfferITem_Title",children:e.name(a)}),n(ig,{"data-cy":"_OfferITem_SubTitle",children:e.description(a)})]}),n(Xe,{type:"text-color",name:"arrowRightThick",width:18,css:Wk,"data-cy":"_OfferITem_Icon"})]})]})});var Nk={name:"184e4ub",styles:"min-height:180px"},Uk={name:"1bkpu5b",styles:"margin-top:30px"};const qk=({isTrial:e,subscriptionId:a,onOfferSelected:r})=>{const{offers:i}=tg(a),c=m.useMemo(()=>i.data?[...(e?zk:jk).filter(u=>{var h;return!!((h=i.data)!=null&&h[u.id])})]:[],[i.data,e]);return d(qd,{"data-cy":"_CancellationOffers_PaddingContainer",children:[d($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_CancellationOffers_Text",children:["Any chance we could change ",n("br",{"data-cy":"_CancellationOffers_br"}),"your mind?"]}),i.isLoading&&n(he,{alignItems:"center",justifyContent:"center",css:Nk,"data-cy":"_CancellationOffers_Flex",children:n(Dt,{"data-cy":"_CancellationOffers_CircleLoader"})}),!i.isLoading&&n(ve,{children:d(he,{direction:"column",css:Uk,"data-cy":"_CancellationOffers_Flex",children:[c.map(s=>{var u;return n(ch,{offer:s,discountedRenewalPercentage:(u=i.data)==null?void 0:u.discounted_renewal_percentage,onOfferSelected:r,"data-cy":"_CancellationOffers_OfferItem"},s.id)}),n(ch,{offer:{id:"cancellation",name:()=>"Continue to Cancel",description:()=>"I do not want any offers. Continue to cancellation.",icon:"closeTwo",iconSize:12},onOfferSelected:r,"data-cy":"_CancellationOffers_OfferItem_7"})]})})]})},Hk=()=>{const{data:e,isLoading:a,error:r}=Je({...bt.cancellationReasons,refetchOnMount:!1,refetchOnWindowFocus:!1});return{reasons:{data:e||[],isLoading:a,error:r}}},Vn=_e("span",{target:"eu0b8wg1"})(({theme:e})=>({fontSize:"14px",fontWeight:400,lineHeight:"10px",color:e.color.base["text-color-secondary"]})),lg=_e("ul",{target:"eu0b8wg0"})(({theme:e})=>({paddingInlineStart:"20px",li:{"&::marker":{fontSize:12},marginBottom:12}}));var $k={name:"184e4ub",styles:"min-height:180px"},Zk={name:"1qf08n4",styles:"width:100%;margin-top:20px;padding-bottom:30px;align-self:stretch"},Gk={name:"1yzavr9",styles:"max-width:184px;height:44px;margin-right:12px"},Yk={name:"1ev15x2",styles:"max-width:184px;height:44px"};const Kk=({onReasonSelected:e})=>{const a=Qe("manage-active-subscription-modal"),[r,i]=m.useState(),c=h=>{i(h)},{reasons:s}=Hk(),u=()=>{const h=s.data.find(f=>f.id===r);h&&(e==null||e(h))};return d(qd,{"data-cy":"_CancellationReasons_PaddingContainer",children:[d($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_CancellationReasons_Text",children:["Before you go, weâd love ",n("br",{"data-cy":"_CancellationReasons_br"}),"your feedback!"]}),n(Vn,{children:"Please take a moment to tell us why you would like to cancel your subscription:"}),s.isLoading&&n(he,{alignItems:"center",justifyContent:"center",css:$k,"data-cy":"_CancellationReasons_Flex",children:n(Dt,{"data-cy":"_CancellationReasons_CircleLoader"})}),n(he,{direction:"column",css:Zk,"data-cy":"_CancellationReasons_Flex",children:s.data.map(h=>d(he,{onClick:()=>c(h.id),style:{cursor:"pointer",marginBottom:12},"data-cy":"_CancellationReasons_Flex_6",children:[n(Wo,{name:h.name,value:h.id,roun
45ded:!0,type:"checkbox",checked:r===h.id,"aria-label":h.name,"aria-checked":r===h.id,"data-cy":"_CancellationReasons_Checkbox"}),n($,{size:"14px",weight:"400",lineHeight:"10px",style:{marginLeft:8},"data-cy":"_CancellationReasons_Text",children:h.name})]},h.id))}),d(he,{"data-cy":"_CancellationReasons_Flex",children:[n(Ta,{css:Gk,full:!0,buttonType:"outline",outlined:!0,color:"contrast",size:"lg",onClick:a.hide,"data-cy":"_CancellationReasons_Button",children:"No, thanks"}),n(Ta,{css:Yk,full:!0,buttonType:"dark",size:"lg",isDisabled:!r,onClick:u,"data-cy":"_CancellationReasons_Button_11",children:"Continue"})]})]})},Hd=({title:e="Contact support for questions and changes to your subscription."})=>{var u;const{user:{data:a}}=ht(),r=(a==null?void 0:a.account_executive)&&a.account_executive.profile_url||"https://cdn.musicbed.com/image/upload/static/client_services/Ben.jpg",i=(a==null?void 0:a.account_executive)&&a.account_executive.alternate_email||"[email protected]",c=(a==null?void 0:a.account_executive)&&a.account_executive.full_name||"Ben Seth Ramsey",s=(u=a==null?void 0:a.account_executive)==null?void 0:u.phone;return d(Me,{gap:16,alignItems:"start",textAlign:"left",w:"100%","data-cy":"_ContactAECard_VStack",children:[n(S,{textStyle:{base:"paragraph.12.reg",md:"paragraph.14.reg"},"data-cy":"_ContactAECard_Text",children:e}),d(G,{alignItems:"center",justifyContent:"start",w:"100%",gap:16,"data-cy":"_ContactAECard_Flex",children:[n($n,{boxSize:{base:40,md:64},src:r,rounded:"full",bg:"gray.300","data-cy":"_ContactAECard_Image"}),d(G,{justifyContent:"space-between",alignItems:"start",w:"100%",gap:16,"data-cy":"_ContactAECard_Flex",children:[d(Me,{alignItems:"start",gap:{base:4,md:8},"data-cy":"_ContactAECard_VStack",children:[n(S,{textStyle:{base:"UI.12.semi",md:"UI.16.semi"},"data-cy":"_ContactAECard_Text",children:c}),d(Me,{alignItems:"start",gap:4,"data-cy":"_ContactAECard_VStack",children:[n(S,{textStyle:"UI.12.reg","data-cy":"_ContactAECard_Text",children:i}),s&&n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_ContactAECard_Text_9",children:s})]})]}),n(tn,{href:`mailto:${i}`,target:"_blank",textDecor:"initial",hideBelow:"sm","data-cy":"_ContactAECard_Link",children:n(ne,{variant:"shaded","data-cy":"_ContactAECard_Button",children:"Contact"})})]})]}),n(tn,{href:`mailto:${i}`,target:"_blank",textDecor:"initial",hideFrom:"sm",w:"100%","data-cy":"_ContactAECard_Link",children:n(ne,{variant:"shaded",w:"100%","data-cy":"_ContactAECard_Button",children:"Contact"})})]})},sg=(e,a)=>{const r=Qe("manage-active-subscription-modal"),{id:i,active:c,starts_at:s,automatic_renewal:u,trial_ends_at:h,renewal_period_ends_at:f,plan:g,extended_details:_,can_be_cancelled:w}=e||{},b=c&&!u&&!(g!=null&&g.custom),v=_&&(_==null?void 0:_.has_extended_details),C=!!w,T=Vm(f==null?void 0:f.datetime,"YYYY-MM-DD hh:mm:ss").add(1,"days").format("MMMM Do, YYYY"),I=Vm(h==null?void 0:h.datetime,"YYYY-MM-DD hh:mm:ss").add(1,"days").format("MMMM Do, YYYY");return{showResubscribe:b,isInRenewalPeriod:C,hasExtendedDetails:v,renewalDate:T,trialRenewalDate:I,handleResubscribe:async()=>{if(i)try{await Q4(i),await(a==null?void 0:a(i)),r.hide()}catch(A){console.log(A)}},handleCancelTrial:async()=>{if(i)try{await K4(i),await(a==null?void 0:a(i)),r.hide()}catch(A){console.log(A)}},extended_details:_,plan:g}},Qk=({user:e,subscriptionDetails:a,isActiveTrial:r,isInRenewalPeriod:i})=>{const c=m.useMemo(()=>{var s;return r?d(S,{textStyle:"paragraph.14.reg","data-cy":"_RenewalHeader_Text",children:["Your trial period is available until ",(s=a==null?void 0:a.trial_ends_at)==null?void 0:s.fjy]}):i?d(Me,{alignItems:"start",gap:8,w:"100%","data-cy":"_RenewalHeader_VStack",children:[n(S,{textStyle:"paragraph.14.reg",textAlign:"start","data-cy":"_RenewalHeader_Text",children:"You may adjust renewal settings during the Renewal Period."}),d(S,{textStyle:"paragraph.14.reg",textAlign:"start","data-cy":"_RenewalHeader_Text_3",children:["A reminder will be sent to ",e.email," at the start of the renewal period."]})]}):d(Me,{alignItems:"start",gap:8,w:"100%","data-cy":"_RenewalHeader_VStack",children:[n(S,{textStyle:"paragraph.14.reg",textAlign:"start","data-cy":"_RenewalHeader_Text",children:"Renewal settings can be changed during the renewal period."}),d(S,{textStyle:"paragraph.14.reg",textAlign:"start","data-cy":"_RenewalHeader_Text_6",children:["A reminder will be sent to ",e.email," at the start of the renewal period."]})]})},[r,i,a,e.email]);
45return d(ve,{children:[d(Me,{alignItems:"start",gap:8,w:"100%","data-cy":"_RenewalHeader_VStack",children:[d(S,{textStyle:"heading.16.semi","data-cy":"_RenewalHeader_Text",children:[" ",r?"Subscription Trial":"Renewal"]}),n(gt,{borderColor:"border.default",flex:1,h:1,"data-cy":"_RenewalHeader_Separator"})]}),c]})},Jk=({subscriptionDetails:e,showResubscribe:a,isInRenewalPeriod:r})=>{const i=!!(e!=null&&e.trial_active);return n(ve,{children:(()=>{var s,u;return i&&!a?d(G,{direction:"column","data-cy":"_RenewalDescription_Flex",children:[n(S,{textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text",children:"Trial Period"}),d(S,{color:"teal",textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text_2",children:["Open until ",(s=e==null?void 0:e.trial_ends_at)==null?void 0:s.fjy]})]}):e!=null&&e.is_paused?d(G,{direction:"column","data-cy":"_RenewalDescription_Flex",children:[n(S,{textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text",children:"Subscription Paused"}),d(S,{color:"teal",textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text_5",children:["Until ",(u=e==null?void 0:e.paused_to)==null?void 0:u.fjy]})]}):a?d(G,{direction:"column","data-cy":"_RenewalDescription_Flex",children:[n(S,{color:"text.colored.negative",textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text",children:"Your subscription is going to expire!"}),n(S,{textStyle:"UI.12.reg",textAlign:"left",color:"text.secondary","data-cy":"_RenewalDescription_Text_8",children:"Turn your renewal back on to keep it going"})]}):d(G,{alignItems:"center",gap:8,"data-cy":"_RenewalDescription_Flex",children:[n(S,{textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalDescription_Text",children:"Renewal Period"}),r&&n(yd,{height:24,border:"none",round:!0,bg:"background.muted.positive",textStyle:"UI.14.reg",textAlign:"left",variant:"filled","data-cy":"_RenewalDescription_Badge",children:n(S,{textStyle:"UI.12.reg",color:"text.primary","data-cy":"_RenewalDescription_Text",children:"Open"})})]})})()})},Xk=({isInRenewalPeriod:e,showResubscribe:a,isActiveTrial:r,isPaused:i,onResubscribe:c,onDisableConfirmation:s})=>n(ve,{children:i?n(ne,{variant:"textOnly",textDecor:"underline",onClick:c,"data-cy":"_RenewalActions_Button",children:"Resume Now"}):a?n(ne,{variant:"textOnly",textDecor:"underline",onClick:c,"data-cy":"_RenewalActions_Button_1",children:"Keep Subscription"}):r?n(ne,{variant:"textOnly",textDecor:"underline",onClick:s,"data-cy":"_RenewalActions_Button_2",children:"Cancel Trial"}):e?n(ne,{variant:"textOnly",textDecor:"underline",onClick:s,"data-cy":"_RenewalActions_Button_3",children:"Disable Renewal"}):e?null:n(ne,{variant:"textOnly",textDecor:"underline",disabled:!0,"data-cy":"_RenewalActions_Button_4",children:"Disable Renewal"})}),eI=({subscriptionDetails:e,showDisableConfirmation:a,onCancelSubscription:r})=>{var s,u,h;const i=Qe(),c=!!(e!=null&&e.trial_active);return n(ve,{children:d(Me,{gap:8,alignItems:"start",w:"100%",py:8,"data-cy":"_RenewalCancellationConfirmation_VStack",children:[a&&n(S,{textStyle:"UI.14.bold",textAlign:"left","data-cy":"_RenewalCancellationConfirmation_Text",children:`Remember, if ${c?"you cancel":"renewal is turned off"}:`}),d(ta.ul,{children:[n(ta.li,{children:d(S,{color:a?"text.colored.negative":"text.primary",textStyle:"UI.14.semi",textAlign:"left","data-cy":"_RenewalCancellationConfirmation_Text_2",children:["Your ",c?"trial":"subscription"," will end on"," ",(s=e==null?void 0:e[c?"trial_ends_at":"ends_at"])==null?void 0:s.fjy,"."]})}),d(ta.li,{mt:8,children:[n(S,{textStyle:"UI.12.reg",textAlign:"left",color:a?"text.colored.negative":"text.primary","data-cy":"_RenewalCancellationConfirmation_Text_3",children:c?`After ${(u=e==null?void 0:e.trial_ends_at)==null?void 0:u.fjy}, you will no longer be able to access this subscription.`:`After ${(h=e==null?void 0:e.ends_at)==null?void 0:h.fjy}, all new uses will not be covered.`}),n(S,{textStyle:"UI.12.reg",textAlign:"left",mt:4,"data-cy":"_RenewalCancellationConfirmation_Text_4",children:c?" Only published videos will remain covered. New projects and existing downloads will no longer be covered.":" This includes new projects and existing downloads. Only published videos will remain convered."})]})]}),a&&d(G,{justifyContent:"space-between",w:"100%",gap:8,mt:16,"data-cy":"_RenewalCancellationConfirmation_Flex",children:[n(ne,{variant:"filled",w:"100%",flex:1,size:"md",onClick:()=>i.hide(),"data-cy":"_RenewalCancellationConfirmation_Button",children:"Keep my subscription"}),n(ne,{w:"100%",flex:1,size:"md",variant:"outline",onClick:r,"data-cy":"_RenewalCancellationConfirmation_Button_7",children:c?"Cancel Trial":"I understand, turn off"})]})]})})}
45,tI=({user:e,subscriptionDetails:a,isLoadingDetails:r,onSubscriptionUpdates:i,onCancelSubscription:c})=>{var b,v,C,T;const[s,u]=m.useState(!1),{showResubscribe:h,isInRenewalPeriod:f,trialRenewalDate:g,renewalDate:_,handleResubscribe:w}=sg(a,i);return d(ve,{children:[n(Qk,{user:e,subscriptionDetails:a,isActiveTrial:!!(a!=null&&a.trial_active),isInRenewalPeriod:!!f,"data-cy":"_RenewalSection_RenewalHeader"}),d(me,{padding:0,borderWidth:1,borderColor:"border.default",borderRadius:8,w:"100%","data-cy":"_RenewalSection_Box",children:[d(me,{px:16,py:12,display:"flex",alignItems:"center",justifyContent:"space-between","data-cy":"_RenewalSection_Box_2",children:[n(Jk,{subscriptionDetails:a,isInRenewalPeriod:!!f,showResubscribe:!!h,"data-cy":"_RenewalSection_RenewalDescription"}),r&&n(Ne,{w:"100%",maxW:184,h:18,"data-cy":"_RenewalSection_Skeleton"}),!r&&d(Fe,{alignItems:"center",gap:"4",color:f?"text.colored.positive":"text.primary","data-cy":"_RenewalSection_HStack",children:[n(S,{textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalSection_Text",children:a!=null&&a.trial_active?(b=a==null?void 0:a.starts_at)==null?void 0:b.fjy:(v=a==null?void 0:a.renewal_period_starts_at)==null?void 0:v.fjy}),n(Ja,{size:14,"data-cy":"_RenewalSection_ArrowRightIcon"}),n(S,{textStyle:"UI.14.reg",textAlign:"left","data-cy":"_RenewalSection_Text",children:a!=null&&a.trial_active?(C=a==null?void 0:a.trial_ends_at)==null?void 0:C.fjy:(T=a==null?void 0:a.renewal_period_ends_at)==null?void 0:T.fjy})]})]}),n(me,{display:"flex",alignItems:"center",px:16,py:4,borderTopWidth:1,borderColor:"border.default","data-cy":"_RenewalSection_Box",children:s?n(eI,{subscriptionDetails:a,showDisableConfirmation:s,onCancelSubscription:c,"data-cy":"_RenewalSection_RenewalCancellationConfirmation"}):d(ve,{children:[r&&d(Fe,{w:"100%",justifyContent:"space-between",alignItems:"center",py:4,"data-cy":"_RenewalSection_HStack",children:[n(Ne,{w:"100%",maxW:184,h:18,"data-cy":"_RenewalSection_Skeleton"})," ",n(Ne,{w:"100%",maxW:120,h:15,"data-cy":"_RenewalSection_Skeleton_13"})]}),!r&&d(Fe,{w:"100%",justifyContent:"space-between",alignItems:"center","data-cy":"_RenewalSection_HStack",children:[d(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_RenewalSection_Text",children:["Your subscription is set to ",a!=null&&a.trial_active?"start":"renew"," on"," ",a!=null&&a.trial_active?g:_]}),n(Xk,{isInRenewalPeriod:!!f,showResubscribe:!!h,isActiveTrial:!!(a!=null&&a.trial_active),isPaused:!!(a!=null&&a.is_paused),onResubscribe:w,onDisableConfirmation:()=>u(!0),"data-cy":"_RenewalSection_RenewalActions"})]})]})})]})]})},dg=()=>{const{theme:e}=zd();return n(Sd,{columns:5,rowGap:8,columnGap:32,w:"80%","data-cy":"_LoadingCoverageSection_SimpleGrid",children:Array.from({length:14}).map((a,r)=>n(Ye,{colSpan:2,"data-cy":"_LoadingCoverageSection_GridItem",children:n(Ne,{w:"100%",h:15,bg:e==="dark"?"bgd.subtle":"bgd.emphasized","data-cy":"_LoadingCoverageSection_Skeleton"})},r))})},lh=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ug=({subscriptionDetails:e})=>{var h,f;const{showResubscribe:a,handleResubscribe:r}=sg(e),i=!!(e!=null&&e.trial_active),{currentTerm:c}=ti(e==null?void 0:e.id),s=c!=null&&c.starts_at?lh(c.starts_at):"",u=c!=null&&c.ends_at?lh(c.ends_at):"";return d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_TermDisplay_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_TermDisplay_Text",children:"Term"})}),n(Ye,{colSpan:3,"data-cy":"_TermDisplay_GridItem",children:a?d(V,{direction:{base:"column",md:"row"},alignItems:{base:"start",md:"center"},justifyContent:"space-between",textAlign:"left",w:"100%",gap:4,"data-cy":"_TermDisplay_Stack",children:[d(S,{textStyle:"UI.12.semi","data-cy":"_TermDisplay_Text",children:[d(S,{color:"text.colored.negative",textStyle:"UI.12.semi",as:"span","data-cy":"_TermDisplay_Text_5",children:["Expiring on"," "]}),i?(h=e==null?void 0:e.trial_ends_at)==null?void 0:h.fjy:(f=e==null?void 0:e.ends_at)==null?void 0:f.fjy]}),n(tn,{textStyle:"UI.12.reg",onClick:r,"data-cy":"_TermDisplay_Link",children:"Keep Subscription"})]}):d(Fe,{alignItems:"center",gap:"4","data-cy":"_TermDisplay_HStack",children:[n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_TermDisplay_Text",children:s}),n(Ja,{size:12,"data-cy":"_TermDisplay_ArrowRightIcon"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_TermDisplay_Text",children:u})]})})]})}
45,pg=({subscriptionDetails:e,isInRenewalPeriod:a,isLoadingDetails:r,onEditPlan:i})=>{var w,b,v,C,T,I,O,D,A,E,R,k,z,Q,N,W;const{theme:c}=zd(),{getCurrentTermService:s,isLoading:u}=ti(e==null?void 0:e.id),h=!!s("sound-effects");return d(Me,{w:"100%",alignItems:"start",p:24,bg:"background.subtle.gray",borderWidth:.5,borderColor:"border.default",borderRadius:8,gap:16,"data-cy":"_CoverageSection_VStack",children:[d(Fe,{w:"100%",justifyContent:"space-between","data-cy":"_CoverageSection_HStack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_CoverageSection_Text",children:"Annual Subscription"}),i&&n(ve,{children:r||u?n(Ne,{w:120,h:15,bg:c==="dark"?"bgd.subtle":"bgd.emphasized","data-cy":"_CoverageSection_Skeleton"}):n(ne,{variant:"textOnly",color:a?"text.primary":"teal.600",textDecor:"underline",textDecorationColor:a?"blackAlpha.20":"teal.400",onClick:()=>{i==null||i(h)},"data-cy":"_CoverageSection_Button",children:a&&h?"Edit Plan":"Need more coverage?"})})]}),r&&n(dg,{"data-cy":"_CoverageSection_LoadingCoverageSection"}),!r&&d(Sd,{columns:5,rowGap:8,columnGap:32,"data-cy":"_CoverageSection_SimpleGrid",children:[((w=e==null?void 0:e.extended_details)==null?void 0:w.entity_type)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:(b=e==null?void 0:e.extended_details)==null?void 0:b.entity_type})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(v=e==null?void 0:e.extended_details)==null?void 0:v.entity_name})})]}),n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Distribution"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Covers all Standard Uses"})}),((C=e==null?void 0:e.extended_details)==null?void 0:C.client_type)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Client Size"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(T=e==null?void 0:e.extended_details)==null?void 0:T.client_name})})]}),((I=e==null?void 0:e.extended_details)==null?void 0:I.subscribers_type)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:(O=e==null?void 0:e.extended_details)==null?void 0:O.subscribers_type})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(D=e==null?void 0:e.extended_details)==null?void 0:D.subscribers_name})})]}),((A=e==null?void 0:e.extended_details)==null?void 0:A.monthly_downloads_type)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:(E=e==null?void 0:e.extended_details)==null?void 0:E.monthly_downloads_type})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(R=e==null?void 0:e.extended_details)==null?void 0:R.monthly_downloads_name})})]}),h&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Sounds"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Included"})})]}),((k=e==null?void 0:e.plan)==null?void 0:k.formatted_payment_interval)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Payment Interval"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(z=e==null?void 0:e.plan)==null?void 0:z.formatted_payment_interval})})]}),(e==null?void 0:e.next_payment_at)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Next Payment"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:(Q=e==null?void 0:e.next_payment_at)==null?void 0:Q.fjy})})]}),((N=e==null?void 0:e.plan)==null?void 0:N.price_per_interval)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CoverageSection_Text",children:"Total"})}),n(Ye,{colSpan:3,"data-cy":"_CoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CoverageSection_Text",children:it((W=e==null?void 0:e.plan)==null?void 0:W.price_per_interval,{formatWithSymbol:!0}).format()})})]}
45),n(ug,{subscriptionDetails:e,"data-cy":"_CoverageSection_TermDisplay"})]})]})},aI=({subscriptionDetails:e,isLoadingDetails:a})=>{var r;return d(Me,{w:"100%",alignItems:"start",p:24,bg:"background.subtle.gray",borderWidth:.5,borderColor:"border.default",borderRadius:8,gap:16,"data-cy":"_CustomCoverageSection_VStack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_CustomCoverageSection_Text",children:"Plan Details"}),a&&n(dg,{"data-cy":"_CustomCoverageSection_LoadingCoverageSection"}),!a&&d(Sd,{columns:5,rowGap:8,columnGap:32,"data-cy":"_CustomCoverageSection_SimpleGrid",children:[(e==null?void 0:e.next_payment_at)&&d(ve,{children:[n(Ye,{colSpan:2,"data-cy":"_CustomCoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CustomCoverageSection_Text",children:"Next Payment"})}),n(Ye,{colSpan:3,"data-cy":"_CustomCoverageSection_GridItem",children:d(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CustomCoverageSection_Text",children:[it((e==null?void 0:e.next_payment_amount)||0,{formatWithSymbol:!0}).format()," ","- ",n("i",{"data-cy":"_CustomCoverageSection_i",children:(r=e==null?void 0:e.next_payment_at)==null?void 0:r.fjy})]})})]}),n(Ye,{colSpan:2,"data-cy":"_CustomCoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",textAlign:"left","data-cy":"_CustomCoverageSection_Text",children:"Balance Remaining"})}),n(Ye,{colSpan:3,"data-cy":"_CustomCoverageSection_GridItem",children:n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"left","data-cy":"_CustomCoverageSection_Text",children:it((e==null?void 0:e.remaining_balance)||0,{formatWithSymbol:!0}).format()})}),n(ug,{subscriptionDetails:e,"data-cy":"_CustomCoverageSection_TermDisplay"})]})]})},rI=({user:e,subscriptionDetails:a,isLoadingDetails:r,onSubscriptionUpdates:i,onCancelSubscription:c,onEditPlan:s,onIncreaseCoverage:u})=>{var w;const h=Qe(),f=(w=a==null?void 0:a.plan)==null?void 0:w.custom,g=!!(a!=null&&a.can_be_cancelled);return d(Me,{w:{base:"100%",md:600},p:{base:16,md:40},gap:40,alignItems:"start","data-cy":"_ManageYourSubscription_VStack",children:[n(S,{textStyle:"heading.24.semi","data-cy":"_ManageYourSubscription_Text",children:"Manage Subscription"}),n(Me,{gap:24,alignItems:"start",w:"100%","data-cy":"_ManageYourSubscription_VStack",children:f?d(Me,{w:"100%",gap:40,"data-cy":"_ManageYourSubscription_VStack_3",children:[n(aI,{subscriptionDetails:a,isLoadingDetails:r,"data-cy":"_ManageYourSubscription_CustomCoverageSection"}),n(Hd,{"data-cy":"_ManageYourSubscription_ContactAECard"})]}):d(ve,{children:[n(tI,{user:e,isLoadingDetails:r,subscriptionDetails:a,onSubscriptionUpdates:i,onCancelSubscription:c,"data-cy":"_ManageYourSubscription_RenewalSection"}),n(pg,{isLoadingDetails:r,subscriptionDetails:a,onEditPlan:b=>{if(g&&b){s==null||s();return}h.hide(),u==null||u()},isInRenewalPeriod:g,"data-cy":"_ManageYourSubscription_CoverageSection"})]})})]})},Dc=(e,a)=>{const r=m.useRef(!1);m.useEffect(()=>{e&&!r.current&&(a==null||a(),r.current=!0)},[e,a])},nI=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.cancel(e.subscriptionId,e.reasons),refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0});return Dc(a,e.onSuccess),{cancel:{data:a,isLoading:r,error:i}}};var oI={name:"1nis72h",styles:"min-height:212px"},iI={name:"op8623",styles:"margin-bottom:20px;margin-top:20px"},cI={name:"op8623",styles:"margin-bottom:20px;margin-top:20px"};const jc=({isLoading:e,error:a,hasData:r,loadingText:i,errorTitle:c,errorDescription:s,successTitle:u,successDescription:h,listTitle:f,listItems:g})=>{const _=Qe("manage-active-subscription-modal");return d(ag,{error:!!a,"data-cy":"_UpdatedView_UpdateViewContainer",children:[e&&d(he,{direction:"column",alignItems:"center",justifyContent:"center",css:oI,"data-cy":"_UpdatedView_Flex",children:[n(Dt,{"data-cy":"_UpdatedView_CircleLoader"}),n($,{size:"12px",weight:"500",lineHeight:"10px",style:{marginBottom:4},"data-cy":"_UpdatedView_Text",children:i})]}),a&&d(ve,{children:[n($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_UpdatedView_Text_4",children:c}),n(Vn,{children:s}),n(me,{mt:40,w:"100%","data-cy":"_UpdatedView_Box",children:n(Hd,{"data-cy":"_UpdatedView_ContactAECard"})})]}),!e&&r&&d(ve,{children:[n($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_UpdatedView_Text",children:u}),n(Vn,{children:h}),n(aa,{color:"dividerColor",css:iI,"data-cy":"_UpdatedView_Hr"}),n($,{size:"14px",weight:"600",lineHeight:"18px",style:{marginBottom:12},"data-cy":"_UpdatedView_Text",children:f}),n(lg,{children:g.map((w,b)=>n("li",{"data-cy":"_UpdatedView_li",children:n($,{size:"14px",weight:"400",lineHeight:"18px","data-cy":"_UpdatedView_Text",children:w})},b))}),n(aa,{color:"dividerColor",css:cI,"data-cy":"_UpdatedView_Hr"}),n(Ta,{full:!0,buttonType:"dark",size:"lg",style:{marginTop:32},onClick:_.hide,"data-cy":"_UpdatedView_Button",children:"Close"})]})]})},mg=({subscription:e,cancellationReason:a,onCancel:r})=>{var s,u;const{cancel:i}=nI({subscriptionId:e.id,reasons:[a.id],onSuccess:()=>{r==null||r(e.id)}}),c=h=>{var f,g;
45return h?h.trial_active?(f=h.trial_ends_at)==null?void 0:f.fjy:(g=h.ends_at)==null?void 0:g.fjy:""};return n(jc,{isLoading:i.isLoading,error:!!i.error,hasData:!!i.data,loadingText:"Requesting cancellation...",errorTitle:"Cancellation failed.",errorDescription:((u=(s=i.error)==null?void 0:s.data)==null?void 0:u.message)||"Unfortunately, we were unable to cancel your subscription at this time.",successTitle:"Subscription Updated!",successDescription:`Your coverage will end on ${c(i.data)}.`,listTitle:"What cancelling means:",listItems:[n("span",{"data-cy":"_CancelApply_span",children:d("strong",{"data-cy":"_CancelApply_strong",children:["Subscription will end on ",c(i.data),"."]})},"subscription-end-date"),d("span",{"data-cy":"_CancelApply_span",children:[d("strong",{"data-cy":"_CancelApply_strong",children:["After ",c(i.data),", all new uses will not be covered."]})," This includes new projects and existing downloads. Only published videos will remain covered."]},"subscription-end-description")],"data-cy":"_CancelApply_UpdatedView"})};var lI={name:"op8623",styles:"margin-bottom:20px;margin-top:20px"},sI={name:"op8623",styles:"margin-bottom:20px;margin-top:20px"};const dI=({subscription:e,cancelConfirmation:a,onConfirm:r})=>{const i=Qe("manage-active-subscription-modal"),c=m.useMemo(()=>["no-contract","no_contract"].includes((a==null?void 0:a.interval)||"")?"Month-to-Month":e.plan.formatted_payment_interval,[e,a]);return d(ag,{"data-cy":"_ConfirmationView_UpdateViewContainer",children:[n($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_ConfirmationView_Text",children:"Notice"}),n(Vn,{"data-cy":"_ConfirmationView_SubText",children:"Your plan has been grandfathered in and is no longer available to purchase if you cancel. Please confirm youâd like to proceed."}),n(aa,{color:"dividerColor",css:lI,"data-cy":"_ConfirmationView_Hr"}),d($,{size:"14px",weight:"600",lineHeight:"18px",style:{marginBottom:12},"data-cy":"_ConfirmationView_Text",children:[c," Subscription"]}),d(lg,{"data-cy":"_ConfirmationView_OfferList",children:[n("li",{"data-cy":"_ConfirmationView_li",children:d($,{size:"14px",weight:"400",lineHeight:"18px","data-cy":"_ConfirmationView_Text",children:["Your subscription renews ",a==null?void 0:a.changesAt,"."]})}),n("li",{"data-cy":"_ConfirmationView_li",children:d($,{size:"14px",weight:"400",lineHeight:"18px","data-cy":"_ConfirmationView_Text",children:["Your ",(a==null?void 0:a.interval)==="year"?"yearly":"monthly"," rate is $",a==null?void 0:a.price]})})]}),n(aa,{color:"dividerColor",css:sI,"data-cy":"_ConfirmationView_Hr"}),d(he,{style:{marginTop:32,gap:12},"data-cy":"_ConfirmationView_Flex",children:[n(Ta,{full:!0,buttonType:"outline",outlined:!0,color:"contrast",size:"lg",onClick:i.hide,"data-cy":"_ConfirmationView_Button",children:"Keep as is"}),n(Ta,{full:!0,buttonType:"dark",size:"lg",onClick:r,"data-cy":"_ConfirmationView_Button_13",children:"Confirm"})]})]})},uI=({subscription:e,cancellationReason:a,cancelConfirmation:r,onCancel:i})=>{const[c,s]=m.useState(!1);return n(ve,{children:c?n(mg,{subscription:e,cancellationReason:a,onCancel:i,"data-cy":"_CancelConfirmation_CancelApply"}):n(dI,{subscription:e,cancelConfirmation:r,onConfirm:()=>s(!0),"data-cy":"_CancelConfirmation_ConfirmationView"})})},sh=["no-contract","no_contract","retention-no-contract"],pI=({subscription:e,cancellationReason:a,onCancel:r})=>{var h,f;const i=sh.includes(e.plan.payment_interval),c=((h=e.pending_change)==null?void 0:h.payment_interval)&&sh.includes((f=e.pending_change)==null?void 0:f.payment_interval),s=!!i||!!c,u=m.useMemo(()=>{var g,_,w,b,v;return i?{interval:e.plan.payment_interval,changesAt:(g=e.renewal_period_starts_at)==null?void 0:g.fjy,price:e.plan.price_per_interval}:c?{interval:(_=e.pending_change)==null?void 0:_.payment_interval,changesAt:(b=(w=e.pending_change)==null?void 0:w.changes_at)==null?void 0:b.fjy,price:(v=e.pending_change)==null?void 0:v.price_per_interval}:null},[e,i,c]);return n(ve,{children:s?n(uI,{subscription:e,cancellationReason:a,cancelConfirmation:u,onCancel:r,"data-cy":"_Cancel_CancelConfirmation"}):n(mg,{subscription:e,cancellationReason:a,onCancel:r,"data-cy":"_Cancel_CancelApply"})})},mI=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.discountRenewal(e.subscriptionId,e.reasons),refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0});return Dc(a,e.onSuccess),{discountRenewal:{data:a,isLoading:r,error:i}}},hI=({subscriptionId:e,cancellationReason:a,onDiscount:r})=>{var s,u,h,f,g;const{offers:i}=tg(e),{discountRenewal:c}=mI({subscriptionId:e,reasons:[a.id],onSuccess:()=>{r==null||r(e)}});return n(jc,{isLoading:c.isLoading,error:!!c.error,hasData:!!c.data,loadingText:"Requesting discount...",errorTitle:"Discount not applied.",errorDescription:"Unfortunately, we were unable to apply the discount to your subscription at this time.",successTitle:"Subscription Updated!",successDescription:`We have applied ${(s=i.data)==null?void 0:s.discounted_renewal_percentage}% off to your renewal.`,listTitle:"Subscription Details",listItems:[...(u=c.data)!=null&&u.changes_at?[`Your subscription renews ${Xo((h=c.data)==null?void 0:h.changes_at,"PP")}.`]:[],`Your ${((f=c.data)==null?void 0:f.payment_interval)==="year"?"yearly":"monthly"} rate is $${(g=c.data)==null?void 0:g.price_per_interval}.`],"data-cy":"_Discount_UpdatedView"})},fI=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.monthToMonth(e.subscriptionId,e.reasons),refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0});return Dc(a,e.onSuccess),{m2m:{data:a,isLoading:r,error:i}}},gI=({subscriptionId:e,cancellationReason:a,onM2M:r})=>{var c,s,u;const{m2m:i}=fI({subscriptionId:e,reasons:[a.id],onSuccess:()=>{r==null||r(e)}});return n(jc,{isLoading:i.isLoading,error:!!i.error,hasData:!!i.data,loadingText:"Converting Month-to-Month...",errorTitle:"Could not update Subscription.",errorDescription:"Unfortunately, we were unable to convert your subscription into Month-to-Month at this time.",successTitle:"Subscription Updated!",successDescription:"Your subscription will renew as month-to-month.",listTitle:"Subscription Details",listItems:[...(c=i.data)!=null&&c.changes_at?[`Your subscription will start on ${Xo((s=i.data)==null?void 0:s.changes_at,"PP")}.`]:[],`You will be billed monthly at a rate of $${(u=i.data)==null?void 0:u.price_per_interval}.`,"You can cancel your subscription at any time."],"data-cy":"_MonthToMonth_UpdatedView"})},yI=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.pause(e.subscriptionId,e.days),refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0});return Dc(a,e.onSuccess),{pause:{data:a,isLoading:r,error:i}}},_I=({subscriptionId:e,renewalDateSelected:a,onPause:r})=>{const{pause:i}=yI({subscriptionId:e,days:a.days,onSuccess:()=>{r==null||r(e)}});return n(jc,{isLoading:i.isLoading,error:!!i.error,hasData:!!i.data,loadingText:`Requesting ${a.days} days pause...`,errorTitle:`${a.days} days pause not applied.`,errorDescription:"Unfortunately, we were unable to delay your subscription renewal at this time.",successTitle:"Subscription Updated!",successDescription:`We have paused your subscription for ${a.days} days.`,listTitle:"What pausing means:",listItems:[`Billing for your annual subscription will resume on ${Xo(a.renews_at,"PP")}.`,`You can resume at any point during the ${a.days} days.`],"data-cy":"_RenewalDateApply_UpdatedView"})},xI=e=>{const{data:a,isLoading:r,error:i}=Je({...bt.renewalDates(e.subscriptionId),refetchOnMount:!1,refetchOnWindowFocus:!1});
45return{renewalDates:{data:a||[],isLoading:r,error:i}}};var bI={name:"1nis72h",styles:"min-height:212px"},SI={name:"1bkpu5b",styles:"margin-top:30px"},wI={name:"26lsfd",styles:"justify-self:end"};const vI=({subscriptionId:e,onRenewDateSelected:a})=>{const{renewalDates:r}=xI({subscriptionId:e});return d(qd,{"data-cy":"_RenewalDatesList_PaddingContainer",children:[r.isLoading&&d(he,{direction:"column",alignItems:"center",justifyContent:"center",css:bI,"data-cy":"_RenewalDatesList_Flex",children:[n(Dt,{"data-cy":"_RenewalDatesList_CircleLoader"}),n($,{size:"12px",weight:"500",lineHeight:"10px",style:{marginBottom:4},"data-cy":"_RenewalDatesList_Text",children:"Loading renewal dates..."})]}),r.error&&d(ve,{children:[n($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_RenewalDatesList_Text_4",children:"Renewal dates not available."}),n(Vn,{"data-cy":"_RenewalDatesList_SubText",children:"Unfortunately, we were unable to offer a pause to your subscription at this time."}),n(me,{mt:40,w:"100%","data-cy":"_RenewalDatesList_Box",children:n(Hd,{"data-cy":"_RenewalDatesList_ContactAECard"})})]}),!r.isLoading&&r.data&&d(ve,{children:[n($,{size:"20px",weight:"600",lineHeight:"24px",style:{marginBottom:4},"data-cy":"_RenewalDatesList_Text",children:"Pause your subscription"}),n(Vn,{"data-cy":"_RenewalDatesList_SubText",children:"Select how long you want to pause your subscription for:"}),n(he,{direction:"column",css:SI,"data-cy":"_RenewalDatesList_Flex",children:r.data.map(i=>n(cg,{onClick:()=>a==null?void 0:a(i),children:d(he,{alignItems:"start",justifyContent:"start",style:{width:"100%"},"data-cy":"_RenewalDatesList_Flex_11",children:[n(rg,{children:n(ng,{children:n($,{size:"12px",weight:"500",lineHeight:"20px","data-cy":"_RenewalDatesList_Text",children:i.days})})}),d(he,{alignItems:"center",justifyContent:"space-between",style:{width:"100%"},"data-cy":"_RenewalDatesList_Flex",children:[d(he,{direction:"column",style:{marginRight:4},"data-cy":"_RenewalDatesList_Flex_14",children:[d(og,{children:[i.days," Days"]}),d(ig,{children:["Your subscription will begin again",n("br",{"data-cy":"_RenewalDatesList_br"}),Xo(i.renews_at,"PP")]})]}),n(Xe,{name:"arrowRightThick",width:18,css:wI,"data-cy":"_RenewalDatesList_Icon"})]})]})},i.days))})]})]})},CI=({subscriptionId:e,onPause:a})=>{const[r,i]=m.useState();return n(ve,{children:r?n(_I,{subscriptionId:e,renewalDateSelected:r,onPause:a,"data-cy":"_Pause_RenewalDateApply"}):n(vI,{subscriptionId:e,onRenewDateSelected:i,"data-cy":"_Pause_RenewalDatesList"})})},TI=({subscription:e,cancellationReason:a,offerSelected:r,onSubscriptionUpdates:i})=>{const c=m.useMemo(()=>{switch(r.id){case"discounted_renewal":return n(hI,{subscriptionId:e.id,cancellationReason:a,onDiscount:i,"data-cy":"_OfferConfirmation_Discount"});case"month_to_month":return n(gI,{subscriptionId:e.id,cancellationReason:a,onM2M:i,"data-cy":"_OfferConfirmation_MonthToMonth"});case"pause":return n(CI,{subscriptionId:e.id,onPause:i,"data-cy":"_OfferConfirmation_Pause"});case"cancellation":return n(pI,{subscription:e,cancellationReason:a,onCancel:i,"data-cy":"_OfferConfirmation_Cancel"});default:return null}},[r.id,e,a,i]);return n(ve,{children:c})},PI=e=>`subscription/subscriptions/services/${e}/disable`,kI=e=>`subscription/subscriptions/services/${e}/enable`,dh=e=>`subscription/subscriptions/services/${e}/enable/preview`,uh=e=>`subscription/subscriptions/services/${e}/disable/preview`,II=e=>{const a=pt(),{mutateAsync:r,...i}=mt({mutationFn:({serviceId:c})=>Le(kI(c),{method:ld}),onSuccess:()=>{e&&a.invalidateQueries({queryKey:Er.getById(e||0).queryKey})},onError:()=>{Ct.create({title:"Error adding sound effects",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}});return{enableService:r,...i}},MI=e=>{const a=pt(),{mutateAsync:r,...i}=mt({mutationFn:({serviceId:c})=>Le(PI(c),{method:ld}),onSuccess:()=>{e&&a.invalidateQueries({queryKey:Er.getById(e||0).queryKey})},onError:()=>{Ct.create({title:"Error removing sound effects",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}});return{disableService:r,...i}},hg={disablePreview:e=>({queryKey:[uh(e),e],queryFn:()=>Le(uh(e),{})}),enablePreview:e=>({queryKey:[dh(e),e],queryFn:()=>Le(dh(e),{})})},AI=(e,a)=>{const{data:r,isLoading:i,error:c}=Je({...hg.enablePreview(e||0),refetchOnWindowFocus:!1,enabled:!!e&&(a==null?void 0:a.enabled)});return{data:r,isLoading:i,error:c}},FI=(e,a)=>{const{data:r,isLoading:i,error:c}=Je({...hg.disablePreview(e||0),refetchOnWindowFocus:!1,enabled:!!e&&(a==null?void 0:a.enabled)});return{data:r,isLoading:i,error:c}}
45,EI=({subscriptionDetails:e,onCancel:a})=>{var we,le,K;const{enableService:r,isPending:i}=II(e==null?void 0:e.id),{disableService:c,isPending:s}=MI(e==null?void 0:e.id),{getCurrentTermService:u,isLoading:h}=ti(e==null?void 0:e.id),f=u("sound-effects"),[g,_]=m.useState(!1),[w,b]=m.useState(!1),{data:v,isLoading:C}=AI(f==null?void 0:f.id,{enabled:g}),{data:T,isLoading:I}=FI(f==null?void 0:f.id,{enabled:w}),O=C||I||h,[D,A]=m.useState(!!(f!=null&&f.automatic_renewal)),[E]=m.useState((we=e==null?void 0:e.plan)==null?void 0:we.payment_interval),{servicePricing:R}=Gf({subscription_plan_id:(le=e==null?void 0:e.plan)==null?void 0:le.id,services:["sound-effects"]}),k=m.useMemo(()=>D?g?v:void 0:w?T:void 0,[D,v,T]),z=m.useCallback(()=>{A==null||A(!0),_(!(f!=null&&f.automatic_renewal))},[f==null?void 0:f.automatic_renewal]),Q=m.useCallback(()=>{A==null||A(!1),b(!!(f!=null&&f.automatic_renewal))},[f==null?void 0:f.automatic_renewal]),N=m.useMemo(()=>D!==!!(f!=null&&f.automatic_renewal),[D,f==null?void 0:f.automatic_renewal]),W=i||s,Y=!N||W||O||R.isLoading,oe=()=>{if(f){if(D){r({serviceId:f.id},{onSuccess:()=>a==null?void 0:a()});return}c({serviceId:f.id},{onSuccess:()=>a==null?void 0:a()})}},Se=()=>{a==null||a(),b(!1),_(!1)},ce=R.data.find(se=>se.type.value==="sound-effects");return d(Me,{w:{base:"100%",md:600},p:{base:16,md:"48px 48px 56px 48px"},gap:24,alignItems:"start",textAlign:"left","data-cy":"_EditSubscriptionPlanModal_VStack",children:[n(S,{textStyle:"heading.24.semi","data-cy":"_EditSubscriptionPlanModal_Text",children:"Edit Plan"}),d(S,{textStyle:"paragraph.14.reg","data-cy":"_EditSubscriptionPlanModal_Text_2",children:["Changes affect your subscription for your next term starting ",(K=e==null?void 0:e.ends_at)==null?void 0:K.fjy,". Changes will not affect your current subscription term."]}),n(pg,{subscriptionDetails:e,"data-cy":"_EditSubscriptionPlanModal_CoverageSection"}),R.isLoading&&n(Ne,{w:"100%",h:90,"data-cy":"_EditSubscriptionPlanModal_Skeleton"}),(e==null?void 0:e.plan)&&ce&&!R.isLoading&&n(Jf,{interval:E,price:`$${ce.price[E]}`,onAdd:z,onRemove:Q,isAdded:D,"data-cy":"_EditSubscriptionPlanModal_SoundsServiceCard"}),(O||k)&&n(G,{w:"full",direction:{base:"column",md:"row"},align:{base:"start",md:"center"},justify:"space-between","data-cy":"_EditSubscriptionPlanModal_Flex",children:d(Me,{w:"full",direction:{base:"row",md:"column"},justify:{base:"space-between",md:"start"},gap:6,alignItems:"start","data-cy":"_EditSubscriptionPlanModal_VStack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_EditSubscriptionPlanModal_Text",children:"Billing Options"}),n(me,{"data-cy":"_EditSubscriptionPlanModal_Box",children:O?n(Ne,{w:"100px",h:"15px","data-cy":"_EditSubscriptionPlanModal_Skeleton"}):d(S,{textStyle:"UI.12.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:[E==="month"?"12 payments of":"One payment of"," ",E==="month"?k==null?void 0:k.monthly_amount:k==null?void 0:k.sub_total,E==="month"&&d(ve,{children:[" total of ",k==null?void 0:k.sub_total]})]})})]})}),(O||k)&&d(ve,{children:[n(gt,{borderColor:"border.default","data-cy":"_EditSubscriptionPlanModal_Separator"}),d(Me,{w:"full",alignItems:"start",gap:8,"data-cy":"_EditSubscriptionPlanModal_VStack",children:[d(Fe,{w:"full",justifyContent:"space-between","data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:"Subtotal"}),O?n(Ne,{w:"100px",h:"15px","data-cy":"_EditSubscriptionPlanModal_Skeleton"}):n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:k==null?void 0:k.sub_total})]}),d(Fe,{w:"full",justifyContent:"space-between","data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:"Tax"}),O?n(Ne,{w:"100px",h:"15px","data-cy":"_EditSubscriptionPlanModal_Skeleton"}):n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:k==null?void 0:k.tax})]}),d(Fe,{w:"full",justifyContent:"space-between","data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:"Subscription Total"}),O?n(Ne,{w:"100px",h:"15px","data-cy":"_EditSubscriptionPlanModal_Skeleton"}):n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:k==null?void 0:k.total})]})]}),O?d(ve,{children:[n(gt,{borderColor:"border.default","data-cy":"_EditSubscriptionPlanModal_Separator"}),d(Fe,{w:"full",justifyContent:"space-between","data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:"Monthly Payment"}),n(Ne,{w:"100px",h:"15px","data-cy":"_EditSubscriptionPlanModal_Skeleton"})]})]}):n(ve,{children:(k==null?void 0:k.monthly_amount)&&d(ve,{children:[n(gt,{borderColor:"border.default","data-cy":"_EditSubscriptionPlanModal_Separator"}),d(Fe,{w:"full",justifyContent:"space-between","data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text",children:"Monthly Payment"}),n(S,{textStyle:"heading.14.reg","data-cy":"_EditSubscriptionPlanModal_Text_33",children:k==null?void 0:k.monthly_amount})]})]})})]}),d(Fe,{w:"full",gap:16,mt:24,"data-cy":"_EditSubscriptionPlanModal_HStack",children:[n(ne,{variant:"outline",w:"full",flex:1,size:"lg",onClick:Se,"data-cy":"_EditSubscriptionPlanModal_Button",children:"Cancel"}),n(ne,{variant:"filled",w:"full",flex:1,size:"lg",onClick:oe,disabled:Y,loading:W,"data-cy":"_EditSubscriptionPlanModal_Button_36",children:"Save changes"})]})]})};let RI=function(e){return e[e.ManageYourSubscriptionStep=1]="ManageYourSubscriptionStep",e[e.CancellationReasonsStep=2]="CancellationReasonsStep",e[e.CancellationOffersStep=3]="CancellationOffersStep",e[e.ConfirmationStep=4]="ConfirmationStep",e[e.EditDetailsStep=5]="EditDetailsStep",e}({});const OI=(e,a,r,i)=>{var R;const c=pt(),{ManageYourSubscriptionStep:s,CancellationReasonsStep:u,CancellationOffersStep:h,ConfirmationStep:f,EditDetailsStep:g}=RI,{subscription:_}=eg(e.id,e),[w,b]=m.useState(s),[v,C]=m.useState(),[T,I]=m.useState(),O=k=>{C(k),b(f)},D=k=>{c.invalidateQueries({queryKey:bt.details(k).queryKey}),r==null||r(k)}
45,E={[s]:n(rI,{user:a,subscriptionDetails:_.data,isLoadingDetails:_.isLoading,onSubscriptionUpdates:D,onIncreaseCoverage:i,onCancelSubscription:()=>b(u),onEditPlan:()=>b(g),"data-cy":"_useManageActiveSubscription_ManageYourSubscription"}),[g]:n(EI,{subscriptionDetails:_.data,onCancel:()=>b(s),"data-cy":"_useManageActiveSubscription_EditSubscriptionPlanModal"}),[u]:n(Kk,{onReasonSelected:k=>{I(k),b(h)},"data-cy":"_useManageActiveSubscription_CancellationReasons"}),[h]:T&&n(qk,{isTrial:(R=_.data)==null?void 0:R.trial_active,subscriptionId:e.id,onOfferSelected:O,"data-cy":"_useManageActiveSubscription_CancellationOffers"}),[f]:v&&T&&_.data&&n(TI,{subscription:_.data,offerSelected:v,cancellationReason:T,onSubscriptionUpdates:D,"data-cy":"_useManageActiveSubscription_OfferConfirmation"})}[w];return{step:w,setStep:b,currentStep:E}},LI=({subscription:e,user:a,onSubscriptionUpdates:r,onIncreaseCoverage:i})=>{const{currentStep:c}=OI(e,a,r,i);return n(Dk,{children:c})},VI=_e("div",{target:"eo8bsce2"})(({theme:e})=>({maxWidth:500,[e.media.sm]:{padding:"22px"},[e.media.sm]:{padding:"32px 48px 16px"},[e.media.lg]:{padding:"50px 73px 32px"}})),BI=_e($,{target:"eo8bsce1"})(({theme:e})=>({[e.media.sm]:{fontSize:"20px"},[e.media.lg]:{fontSize:"24px"}})),ph=_e($,{target:"eo8bsce0"})(({theme:e})=>({[e.media.sm]:{fontSize:"14px"},[e.media.lg]:{fontSize:"16px"}}));var DI={name:"18uqayh",styles:"margin-bottom:16px"},jI={name:"18uqayh",styles:"margin-bottom:16px"},zI={name:"qkomnt",styles:"margin-bottom:40px"},WI={name:"18uqayh",styles:"margin-bottom:16px"};const NI=()=>{const e=Qe("download-song-limit-reached-modal");return d(VI,{children:[d(BI,{"aria-label":"Daily download limit reached",weight:"700",lineHeight:"110%",css:DI,children:["Youâve reached your daily ",n("u",{"data-cy":"_DownloadSongLimitReachedModal_u",children:"unwatermarked"})," download limit."]}),d(ph,{lineHeight:"21px",css:jI,children:["A ",n("strong",{"data-cy":"_DownloadSongLimitReachedModal_strong",children:"watermarked"})," version of the song has been downloaded."]}),d(ph,{lineHeight:"21px",css:zI,children:["You'll be able to download the ",n("strong",{"data-cy":"_DownloadSongLimitReachedModal_strong_2",children:"unwatermarked"})," version tomorrow."]}),n(he,{justifyContent:"center",css:WI,"data-cy":"_DownloadSongLimitReachedModal_Flex",children:n(Ta,{buttonType:"dark",size:"lg",full:!0,onClick:e.hide,"data-cy":"_DownloadSongLimitReachedModal_Button",children:"Close"})})]})},UI=_e("div",{target:"ee93hfo1"})(({theme:e})=>({borderRadius:"0 0 8px 8px"})),qI=_e("div",{target:"ee93hfo0"})({name:"ntm3k2",styles:"padding:32px 24px;text-align:left"}),HI=_e("div",{target:"e1msvnsc2"})(({theme:e})=>({padding:"40px 16px",display:"grid",gridTemplateColumns:"1fr",rowGap:32,[e.media.md]:{padding:"40px 32px",rowGap:40}})),$I=_e("div",{target:"e1msvnsc1"})(({theme:e})=>({display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateAreas:"'name size' 'uses uses'",rowGap:16,columnGap:32,[e.media.md]:{gridTemplateColumns:"1fr 1fr 1fr",gridTemplateAreas:"'name size uses'",columnGap:40}})),ZI=_e("div",{target:"e1msvnsc0"})(({theme:e})=>({display:"grid",gridTemplateColumns:"1fr",rowGap:16,columnGap:32,[e.media.md]:{gridTemplateColumns:"1fr 1fr",columnGap:40}})),GI=e=>{const{data:a,isLoading:r,error:i}=Je({...Qo.fetchLicense(e),refetchOnWindowFocus:!1});return{data:a,isLoading:r,error:i}};var YI={name:"17y2kki",styles:"text-align:center;margin:0 auto"},KI={name:"wa6ckm",styles:"margin:10px auto 0;max-width:320px"},QI={name:"1q4vxyr",styles:"margin-left:8px"};const JI=({licenseId:e,onBack:a,projectId:r,setGlobalModal:i})=>{var f,g;const[c,s]=m.useState(!1),u=GI(e);La(()=>{a&&i({onBack:a})});const h=()=>{i({view:r?()=>n(Lc,{"data-cy":"_ConfirmLicenseCoverageView_CompleteProjectDetailsView"}):()=>n(Vc,{"data-cy":"_ConfirmLicenseCoverageView_AddProjectDetailsView"})})};return d(me,{bg:"background.controls.popover",borderRadius:{base:"8px 8px 0px 0px",md:"8px"},"data-cy":"_ConfirmLicenseCoverageView_Box",children:[d("div",{style:{padding:30},"data-cy":"_ConfirmLicenseCoverageView_div",children:[n(Ya,{breakpoint:"820",max:"20",min:"18",weight:600,css:YI,"data-cy":"_ConfirmLicenseCoverageView_ResponsiveH2",children:"Confirm license coverage"}),n($,{color:"primary",align:"center",size:14,lineHeight:"18px",weight:400,css:KI,"data-cy":"_ConfirmLicenseCoverageView_Text",children:"Make sure the details below are correct. These will be used on your final license."})]}),n(gt,{"data-cy":"_ConfirmLicenseCoverageView_Separator"}),n(UI,{"data-cy":"_ConfirmLicenseCoverageView_Content",children:d(qI,{"data-cy":"_ConfirmLicenseCoverageView_PaddingWrapper",children:[u.data&&n(me,{bg:"background.surface.1",borderRadius:"8px",borderColor:"border.default",borderWidth:"1px","data-cy":"_ConfirmLicenseCoverageView_Box",children:d(HI,{children:[d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",style:{marginBottom:8},"data-cy":"_ConfirmLicenseCoverageView_Text",children:`LICENSE ID #${u.data.id}`}),n($,{size:"22px",weight:"600","data-cy":"_ConfirmLicenseCoverageView_Text_12",children:u.data.name})]}),d($I,{children:[u.data.license_data.end_client_name&&d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8,gridArea:"name"},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"CLIENT NAME"}),n($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text_15",children:u.data.license_data.end_client_name})]}),u.data.license_data.end_client_size.name&&d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8,gridArea:"size"},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"CLIENT SIZE"}),n($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text_18",children:u.data.license_data.end_client_size.name})]}),d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8,gridArea:"uses"},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"USES REMAINING"}),n($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text_21",children:u.data.use_type==="unlimited"?"Unlimited":`${u.data.use_limit_counter.remaining_uses}`})]})]}),((f=u.data.license_data.distribution_groups)==null?void 0:f.length)>0&&d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"DISTRIBUTIONS"}),n(ZI,{children:u.data.license_data.distribution_groups.map((_,w)=>{var b;return d("div",{style:{...((b=u.data)==null?void 0:b.license_data.distribution_groups.length)===1&&{gridColumn:"1 / 3"}},"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"14px",weight:"600",lineHeight:"120%",style:{marginBottom:8},"data-cy":"_ConfirmLicenseCoverageView_Text",children:_.distributions.map((v,C)=>`${v.name}${_.distributions.length-1===C?"":", "}`)}),n("div",{style:{paddingLeft:8},"data-cy":"_ConfirmLicenseCoverageView_div",children:d($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text",children:["⢠Term:"," ",`${_.term_interval_count>0?`${_.term_interval_count} `:""}${_.term_interval.name}`,_.territory&&d(ve,{children:[n("br",{"data-cy":"_ConfirmLicenseCoverageView_br"}),"⢠Territory: ",_.territory.name]}),_.advertising&&d(ve,{children:[n("br",{"data-cy":"_ConfirmLicenseCoverageView_br_29"}),"⢠Advertising: ",_.advertising.name]})]})})]},w)})})]}),((g=u.data.license_data.usage_details)==null?void 0:g.length)>0&&d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8,gridArea:"uses"},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"USAGE DETAILS"}),n($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text_32",children:u.data.license_data.usage_details})]}),u.data.youtube_channel_clearance&&d("div",{"data-cy":"_ConfirmLicenseCoverageView_div",children:[n($,{size:"12px",weight:"700",lineHeight:"normal",style:{marginBottom:8,gridArea:"uses"},"data-cy":"_ConfirmLicenseCoverageView_Text",children:"YOUTUBE CHANNEL"}),n($,{size:"14px",lineHeight:"120%","data-cy":"_ConfirmLicenseCoverageView_Text_35",children:u.data.youtube_channel_clearance})]})]})}),d(he,{alignItems:"center",style:{margin:"24px 0"},"data-cy":"_ConfirmLicenseCoverageView_Flex",children:[n(Wo,{id:"agreeToCoverage",name:"agreeToCoverage",type:"checkbox",checked:c,onClick:()=>s(!c),"data-cy":"_ConfirmLicenseCoverageView_Checkbox"}),n($,{size:"12px",lineHeight:"14",css:QI,"data-cy":"_ConfirmLicenseCoverageView_Text",children:"I verify this covers my client and distribution needs"})]}),n(ne,{type:"submit",size:"xl",w:"full",variant:"filled",fontSize:"14px",disabled:!c,onClick:h,"data-cy":"_ConfirmLicenseCoverageView_Button",children:"Confirm Coverage"})]})})]})},XI=e=>n(ja,{to:[cn,ur],"data-cy":"_ConfirmLicenseCoverageView_Subscribe",children:(a,r)=>{var i;return n(JI,{...e,setGlobalModal:r.setGlobalModal,closeGlobalModal:r.closeGlobalModal,projectId:a.state.projectId,licenseId:(i=a.state.subscriptionLicense)==null?void 0:i.id,"data-cy":"_ConfirmLicenseCoverageView_ConfirmLicenseCoverage"})}}),mh="preferred-rates/active",hh="preferred-rates",fh=e=>`preferred-rates/${e}`,gh=e=>`preferred-rates/${e}/orders`,eM={activePreferredRates:{queryKey:[mh],queryFn:()=>Le(mh)},searchPreferredRates:e=>({queryKey:[hh,e.status,e.query,e.query_field,e.limit,e.page,e.order_by,e.direction],queryFn:()=>Le(hh,{params:{status:e.status,...e.page&&{page:e.page},...e.limit&&{limit:e.limit},...e.query&&{query:e.query},...e.query_field&&{query_field:e.query_field},...e.order_by&&{order_by:e.order_by},...e.direction&&{direction:e.direction}},includeMeta:!0})}),preferredRateDetail:({preferredRateId:e})=>({queryKey:[fh(e)],queryFn:()=>Le(fh(e))}),preferredRateOrders:({preferredRateId:e,page:a,limit:r})=>({queryKey:[gh(e),a,r],queryFn:()=>Le(gh(e),{params:{...a&&{page:a},...r&&{limit:r}},includeMeta:!0})})},tM=({enabled:e=!0}={})=>{const a=Je({...eM.activePreferredRates,enabled:e});return{preferredRates:a.data??[],...a}},lO=["transfer_team","manage_team"],aM=[{value:"admin",label:"Admin",helperText:"Full access to manage workspace, team, and audio assets."},{value:"purchaser",label:"Purchaser",helperText:"Manage team, payments, and audio assets."},{value:"asset_manager",label:"Asset Manager",helperText:"Download and use audio assets."},{value:"guest",label:"Guest",helperText:"View workspace as read-only."}
45],rM={title:"Licensing permissions",description:"You don't have licensing permissions. Contact a teammate with a licensing role to complete this license.",hideCancel:!0,confirmTitle:"Okay",type:"warning"},fg=({song:e,songRowType:a,hasAnyLicensedSong:r,setLicenseSong:i,setGlobalModal:c,resetLicenseSong:s,projectHasOneSong:u,projectId:h,shareableId:f,triggerTrialLimitModal:g,onLicenseTypeSelect:_})=>{var oe,Se,ce,we;const{subscriptions:{data:w}}=h0({active:1}),{subscriptionLicenses:b}=Bf(),{preferredRates:v,isLoading:C}=tM(),{addCartItem:T,isPending:I}=$v(),O=Qe("confirm-modal"),D=on(),{userAbilities:A}=Zv(),E=A.hasAbility(["manage_license_project"]),R=le=>{var K;return(le==null?void 0:le.trial_active)&&((K=le==null?void 0:le.trial_limit_counter)==null?void 0:K.limit_reached)},k=le=>{var q;const K=w.find(xe=>xe.id===le.subscription_id);if(K!=null&&K.trial_active&&K.trial_limit_counter){const xe=K.trial_limit_counter.remaining_license_project_song_count,Ce=On(xe,"use");return`${xe} ${Ce} remaining`}const se=((q=le.use_limit_counter)==null?void 0:q.remaining_uses)??0,ae=On(se,"use");return le.use_type==="unlimited"?"Unlimited uses":`${se} ${ae} remaining`},z=()=>{c({onBack:null,isOpen:!0,view:()=>n(fg,{song:e,songRowType:a,hasAnyLicensedSong:r,setLicenseSong:i,setGlobalModal:c,resetLicenseSong:s,projectHasOneSong:u,projectId:h,shareableId:f,triggerTrialLimitModal:g,onLicenseTypeSelect:_,"data-cy":"_ChooseLicenseView_ChooseLicenseView"})})},Q=()=>{c({isOpen:!1,view:()=>null}),O.show({...rM,onAccept:()=>O.hide()})},N=le=>{if(!E){Q();return}I||T({song_ids:e?[e.id]:null,preferred_rate_id:le.id},{onSuccess:()=>{c({isOpen:!1,view:()=>null}),D(Bt("cart"))}})},W=le=>{if(!E){Q();return}const K=le.custom&&le.version===2,se=w.find(ae=>ae.id===le.subscription_id);R(se)?g(se):(i({...h&&{projectId:h},subscription:se,subscriptionLicense:le,songs:[e],showVerifyLicenseAfterAddMoreSongsModal:["license","project"].includes(a),licensingFrom:a,showOnlyRecentlyDownloadedSongsOnAddMoreSongsModal:u&&!r}),c({isOpen:!0,onClose:s,view:()=>a==="project"||a==="license"?n(Oc,{shareableId:f,"data-cy":"_ChooseLicenseView_AddMoreSongsView"}):le.custom?n(ve,{children:K?n(XI,{onBack:z,"data-cy":"_ChooseLicenseView_ConfirmLicenseCoverageView"}):n(Vc,{hideBack:!0,"data-cy":"_ChooseLicenseView_AddProjectDetailsView"})}):n(Jo,{hideBack:!0,"data-cy":"_ChooseLicenseView_VerifyCoverageView"})}))},Y=(oe=e==null?void 0:e.album)!=null&&oe.image?window.cloudinaryUrl(e.album.image.cloudinary_public_id,{height:96,width:96,version:e.album.image.cloudinary_version_number}):null;return d(me,{bg:"background.controls.modal",borderRadius:{base:"8px 8px 0px 0px",md:"16px"},"data-cy":"_ChooseLicenseView_Box",children:[d(V,{gap:"20px",p:{base:"12px",md:"24px 24px 12px"},"data-cy":"_ChooseLicenseView_Stack",children:[n(S,{textStyle:"heading.18.semi",textAlign:"center","data-cy":"_ChooseLicenseView_Text",children:"Choose a License"}),e&&d(G,{gap:"12px",alignItems:"center",p:8,"data-cy":"_ChooseLicenseView_Flex",children:[Y&&n($n,{src:Y,alt:e.name,boxSize:"48px",borderRadius:"4px",objectFit:"cover",flexShrink:0,"data-cy":"_ChooseLicenseView_Image"}),d(V,{gap:"4px",flex:"1",minW:"0",alignItems:"flex-start","data-cy":"_ChooseLicenseView_Stack",children:[n(S,{textStyle:"heading.14.reg",truncate:!0,"data-cy":"_ChooseLicenseView_Text",children:e.name}),d(G,{alignItems:"center",gap:"8px","data-cy":"_ChooseLicenseView_Flex",children:[n(S,{textStyle:"UI.12.reg",color:"text.secondary",truncate:!0,"data-cy":"_ChooseLicenseView_Text",children:(ce=(Se=e.album)==null?void 0:Se.artist)==null?void 0:ce.name}),e.duration&&d(ve,{children:[n(S,{textStyle:"UI.12.reg",color:"text.secondary",flexShrink:0,"data-cy":"_ChooseLicenseView_Text_14",children:"â¢"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",flexShrink:0,"data-cy":"_ChooseLicenseView_Text_15",children:g4(e.duration)})]})]})]})]})]}),n(gt,{"data-cy":"_ChooseLicenseView_Separator"}),n(me,{bg:{_dark:"gray.900",_light:"gray.50"},borderRadius:{base:"0px",md:"0px 0px 16px 16px"},"data-cy":"_ChooseLicenseView_Box",children:d(V,{gap:"20px",p:{base:"20px",md:"24px 32px 32px"},"data-cy":"_ChooseLicenseView_Stack",children:[d(V,{gap:"2px","data-cy":"_ChooseLicenseView_Stack_19",children:[(b.isLoading||C)&&n(Ne,{w:"100%",h:"94px","data-cy":"_ChooseLicenseView_Skeleton"}),(we=b.data)==null?void 0:we.map((le,K)=>n(me,{bg:"background",border:"1px solid",borderColor:"border.default",borderRadius:"8px",cursor:"pointer",_hover:{borderColor:"border.active"},onClick:()=>W(le),"data-cy":"_ChooseLicenseView_Box",children:d(G,{p:{base:"16px",md:"24px"},gap:"8px",alignItems:"center","data-cy":"_ChooseLicenseView_Flex",children:[d(V,{gap:"8px",flex:"1",minW:"0",alignItems:"flex-start","data-cy":"_ChooseLicenseView_Stack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_ChooseLicenseView_Text",children:le.name?le.name:"Custom Subscription"}),n(S,{textStyle:"paragraph.12.reg",color:"text.secondary",maxW:"90%",textAlign:"left","data-cy":"_ChooseLicenseView_Text_25",children:le.description})]}
45),le.version!==1&&n(S,{textStyle:"UI.12.semi",flexShrink:0,whiteSpace:"nowrap","data-cy":"_ChooseLicenseView_Text_26",children:k(le)})]})},K)),v.map(le=>n(me,{bg:"background",border:"1px solid",borderColor:"border.default",borderRadius:"8px",cursor:I?"not-allowed":"pointer",opacity:I?.6:1,_hover:{borderColor:"border.active"},onClick:()=>N(le),"data-cy":"_ChooseLicenseView_Box",children:d(G,{p:{base:"16px",md:"24px"},gap:"8px",alignItems:"center","data-cy":"_ChooseLicenseView_Flex",children:[d(V,{gap:"8px",flex:"1",minW:"0",alignItems:"flex-start","data-cy":"_ChooseLicenseView_Stack",children:[n(S,{textStyle:"heading.16.semi","data-cy":"_ChooseLicenseView_Text",children:le.name}),n(S,{textStyle:"paragraph.12.reg",color:"text.secondary",maxW:"90%",textAlign:"left","data-cy":"_ChooseLicenseView_Text_31",children:Gv(le.distribution_groups)})]}),n(S,{textStyle:"UI.12.semi",flexShrink:0,whiteSpace:"nowrap","data-cy":"_ChooseLicenseView_Text_32",children:le.price?`$${le.price}/song`:"Pool"})]})},`preferred-${le.id}`))]}),d(S,{textStyle:"paragraph.12.reg",color:"text.secondary",textAlign:"center","data-cy":"_ChooseLicenseView_Text_33",children:["Need something else?"," ",n(S,{as:"span",textStyle:"paragraph.12.reg",color:"text.secondary",textDecoration:"underline",cursor:"pointer",onClick:()=>{_(),c({isOpen:!1,view:()=>null})},"data-cy":"_ChooseLicenseView_Text_34",children:"Additional licensing options"})]})]})})]})},nM=e=>n(ja,{to:[cn,ur],"data-cy":"_ChooseLicenseView_Subscribe",children:(a,r)=>n(fg,{...e,setLicenseSong:a.setLicenseSong,resetLicenseSong:a.resetLicenseSong,setGlobalModal:r.setGlobalModal,"data-cy":"_ChooseLicenseView_ChooseLicenseView"})}),$d=({type:e})=>{const a=m.useMemo(()=>e==="warning"?n($8,{size:"16px",weight:"bold","data-cy":"_FeedbackIcon_ExclamationMark"}):e==="negative"?n(EC,{size:"16px",weight:"bold","data-cy":"_FeedbackIcon_X"}):n(Td,{size:"16px",weight:"bold","data-cy":"_FeedbackIcon_Check"}),[e]);return n(Va,{backgroundColor:`background.colored.${e}`,outline:"8px solid",outlineColor:`background.subtle.${e}`,borderRadius:"full",w:"32px",h:"32px","data-cy":"_FeedbackIcon_Center",children:n(vt,{color:"white",fontSize:"20px",fontWeight:600,"data-cy":"_FeedbackIcon_Icon",children:a})})},gg="user/dismissed-modals",yh={showDismissals:{queryKey:["modals-show-dismissals"],queryFn:()=>Le(gg)}},oM=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:i=>Le(gg,{method:"POST",data:JSON.stringify({...i})}),onMutate(i){const c=yh.showDismissals.queryKey,s=e.getQueryData(c)||[],u=s.map(h=>h.modal===i.modal?{...h,show_modal:!1}:h);return e.setQueryData(c,u),{previousData:s}},onError:(i,c,s)=>{const u=yh.showDismissals.queryKey;s!=null&&s.previousData&&e.setQueryData(u,s==null?void 0:s.previousData)}});return{markModalDismissed:a,...r}},iM=({soundIds:e=[]})=>{const[a,r]=m.useState(!1),i=Qe(),{markModalDismissed:c}=oM(),s=async()=>{a&&c({modal:"sound-effect-licensing",permanent:!0}),i.hide()},u=h=>r(!!h.checked);return d(Me,{w:{base:"100%",md:"420px"},px:"32px",py:"40px",gap:"24px",alignItems:"center","data-cy":"_DownloadSoundEffectLicensingMessageModal_VStack",children:[n($d,{type:"positive","data-cy":"_DownloadSoundEffectLicensingMessageModal_FeedbackIcon"}),d(Me,{gap:"8px","data-cy":"_DownloadSoundEffectLicensingMessageModal_VStack",children:[d(S,{textStyle:"heading.18.semi","data-cy":"_DownloadSoundEffectLicensingMessageModal_Text",children:["Nice, you downloaded your ",On(e.length,"Sound")]}),n(S,{textAlign:"center",textStyle:"paragraph.14.reg",maxW:"256px","data-cy":"_DownloadSoundEffectLicensingMessageModal_Text_4",children:"Just a reminder, Sounds do not need to be licensed for every use like songs."})]}),d(Fe,{justifyContent:"center",alignItems:"center",gap:"0",w:"100%","data-cy":"_DownloadSoundEffectLicensingMessageModal_HStack",children:[n(k0,{onCheckedChange:u,"data-cy":"_DownloadSoundEffectLicensingMessageModal_FormCheckbox"}),n(S,{textStyle:"UI.12.reg",mt:"4px","data-cy":"_DownloadSoundEffectLicensingMessageModal_Text",children:"Don't show this to me anymore"})]}),n(ne,{variant:"outline",size:"lg",onClick:s,"data-cy":"_DownloadSoundEffectLicensingMessageModal_Button",children:"Got it!"})]})},cM=({title:e,caption:a,footerText:r,buttonText:i,term:c,step:s,isLoading:u,features:h,titleTextStyle:f,hideIcon:g,onClose:_,onAccept:w})=>{const b=Or({base:!0,md:!1}),{subscriptions:{data:v}}=h0({active:1}),C=()=>
45{if(s==="accepted"){_();return}w()};return d(pr,{gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},h:{base:"100%",md:600},w:{base:"100%",md:800},p:{base:24,md:0},pb:{base:48,md:0},justifyItems:"center",alignItems:"center",mx:"auto","data-cy":"_SoundsOfferModal_Grid",children:[d(Ye,{p:{base:"0px",md:"48px 48px 56px"},display:"flex",flexDirection:"column",gap:24,h:"100%",w:"100%",justifyContent:"space-between","data-cy":"_SoundsOfferModal_GridItem",children:[d(V,{gap:16,"data-cy":"_SoundsOfferModal_Stack",children:[n(Xe,{name:"musicbedSquare",width:48,height:48,css:ca({display:g?"none":"block"},""),"data-cy":"_SoundsOfferModal_Icon"}),n(S,{textStyle:f??{base:"heading.40.reg",md:c?"heading.48.reg":"heading.40.reg"},textAlign:"left",mt:s==="accepted"&&b?24:0,"data-cy":"_SoundsOfferModal_Text",children:e}),n(S,{textAlign:"left",textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_SoundsOfferModal_Text_5",children:a}),s==="not-accepted"&&n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:h.map(T=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_SoundsOfferModal_Flex",children:[n(Td,{weight:"bold","data-cy":"_SoundsOfferModal_Check"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_SoundsOfferModal_Text",children:T})]})},T))}),(s==="accepted"||b)&&c&&d(V,{alignItems:"flex-start",gap:4,w:"100%",p:16,borderRadius:4,backgroundColor:"background.surface.2","data-cy":"_SoundsOfferModal_Stack",children:[n(S,{textStyle:"UI.12.reg",textTransform:"uppercase","data-cy":"_SoundsOfferModal_Text",children:"New term"}),d(G,{alignItems:"center",gap:4,"data-cy":"_SoundsOfferModal_Flex",children:[n(S,{textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_SoundsOfferModal_Text",children:c.renewalTermStartsAt}),n(Lo,{size:14,"data-cy":"_SoundsOfferModal_ArrowRight"}),n(S,{textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_SoundsOfferModal_Text",children:c.renewalTermEndsAt})]})]})]}),d(V,{gap:16,"data-cy":"_SoundsOfferModal_Stack",children:[r&&n(S,{textStyle:"UI.12.reg","data-cy":"_SoundsOfferModal_Text",children:r}),d(V,{gap:20,"data-cy":"_SoundsOfferModal_Stack",children:[n(ne,{backgroundColor:"button.filled",h:"48",textStyle:"paragraph.16.reg",color:"text.primary.inverse",onClick:C,loading:u,"data-cy":"_SoundsOfferModal_Button",children:i}),s==="not-accepted"&&n(tn,{w:"100%",justifyContent:"center",textDecorationColor:"text.secondary/20",textStyle:"UI.14.reg",color:"text.secondary",onClick:_,"data-cy":"_SoundsOfferModal_Link",children:v!=null&&v.length?"No thanks, I'll stick with music":"No thanks"})]})]})]}),n(Ye,{display:{base:"none",md:"block"},p:{base:0,md:40},h:"100%",w:"100%",background:`url(https://cdn.musicbed.com/image/upload/w_800,q_auto,f_auto/v1746796437/production/soundEffectsOffer/${s==="accepted"?"offer-accepted":"offer-not-accepted"}.jpg) no-repeat`,backgroundSize:s==="accepted"?"120%":"150%",backgroundPosition:"50% 80%",borderRadius:"0 6px 6px 0","data-cy":"_SoundsOfferModal_GridItem",children:c&&s==="not-accepted"&&d(V,{gap:8,w:"100%",h:"100%",justifyContent:"center",color:"text.primary.onColor","data-cy":"_SoundsOfferModal_Stack",children:[d(V,{position:"relative",alignItems:"center",gap:4,w:"100%",p:"24px 16px 32px",backgroundColor:"background.surface.4",backdropFilter:"blur(12px)",borderRadius:8,zIndex:10,"data-cy":"_SoundsOfferModal_Stack_22",children:[n(S,{textStyle:"UI.12.reg",textTransform:"uppercase","data-cy":"_SoundsOfferModal_Text",children:"Current term"}),d(G,{alignItems:"center",gap:4,"data-cy":"_SoundsOfferModal_Flex",children:[n(S,{textStyle:"paragraph.16.reg","data-cy":"_SoundsOfferModal_Text",children:c.startsAt}),n(Lo,{size:14,"data-cy":"_SoundsOfferModal_ArrowRight"}),n(S,{textStyle:"paragraph.16.reg","data-cy":"_SoundsOfferModal_Text",children:c.endsAt})]}),n(G,{position:"absolute",alignItems:"center",justifyContent:"center",p:8,bottom:0,transform:"translateY(60%)",backgroundColor:"background",color:"icon.primary",borderRadius:"full","data-cy":"_SoundsOfferModal_Flex",children:n(H8,{size:24,"data-cy":"_SoundsOfferModal_ArrowDown"})})]}),d(V,{alignItems:"center",gap:4,w:"100%",p:"32px 16px 24px",backgroundColor:"background.surface.4",backdropFilter:"blur(12px)",borderRadius:8,"data-cy":"_SoundsOfferModal_Stack",children:[n(S,{textStyle:"UI.12.reg",textTransform:"uppercase","data-cy":"_SoundsOfferModal_Text",children:"New term"}),d(G,{alignItems:"center",gap:4,"data-cy":"_SoundsOfferModal_Flex",children:[n(S,{textStyle:"paragraph.16.reg","data-cy":"_SoundsOfferModal_Text",children:c.renewalTermStartsAt}),n(Lo,{size:14,"data-cy":"_SoundsOfferModal_ArrowRight"}),n(S,{textStyle:"paragraph.16.reg","data-cy":"_SoundsOfferModal_Text",children:c.renewalTermEndsAt})]})]})]})})]})},_h=[{name:"Unwatermarked Downloads",smallScreenName:"Unwatermarked Songs",description:"Elevate your edit by removing watermarks"},{name:"Expert Song Search",smallScreenName:"Expert Song Search",description:"Let Musicbed experts find the perfect song"},{name:"Sound Effects",smallScreenName:"Sound Effects",description:"Get access to Musicbed's Sound Effects library"}],lM=({user:e,onClose:a})=>{var _;const[r,i]=m.useState(!1),{control:c,handleSubmit:s,setError:u,formState:{errors:h}}=It({defaultValues:{first_name:(e==null?void 0:e.first_name)||"",last_name:(e==null?void 0:e.last_name)||"",company:((_=e==null?void 0:e.license_persona)==null?void 0:_.company_name)||(e==null?void 0:e.company)||"",company_url:"",phone:(e==null?void 0:e.phone)||"",formName:"enterprise_membership",email:e==null?void 0:e.email,pageUrl:window.location.href,pageName:document.title,enterprise_form_source:gc.PREMIUM_FEATURES_MODAL.SOURCE,enterprise_functionality_requested:gc.PREMIUM_FEATURES_MODAL.FUNCTIONALITY_REQUESTED}}),{submitEnterpriseRequestForm:f}=K0({onError:({errors:w})=>{var b;w&&typeof w=="object"&&((b=Object.keys(w))==null||b.forEach(v=>{var C;return u(v,{type:"custom",message:(C=w[v])==null?void 0:C[0]})}))},onSuccess:()=>{i(!0)}}),g=w=>{var T;const{isValid:b,phone:v,error:C}=Q0(w.phone||"",(T=e==null?void 0:e.country)==null?void 0:T.toLocaleLowerCase());if(!b){u("phone",{type:"custom",message:C||"Enter a valid phone number"});return}f({...w,phone:v})};return n(V,{p:{base:"48px 40px",smDown:"32px 24px"},gap:40,"data-cy":"_PremiumFeaturesModal_Stack",children:r?d(V,{gap:32,maxW:400,alignSelf:"center","data-cy":"_PremiumFeaturesModal_Stack_1",children:[d(V,{gap:8,alignItems:"flex-start","data-cy":"_PremiumFeaturesModal_Stack_2",children:[n(yc,{textStyle:{base
45:"heading.32.bold",smDown:"heading.24.semi"},m:0,fontWeight:700,"data-cy":"_PremiumFeaturesModal_Heading",children:"We received your request"}),n(S,{textStyle:{base:"UI.16.reg",smDown:"UI.14.reg"},color:"text.secondary",textAlign:"left",m:0,maxW:{base:378,lg:"100%"},"data-cy":"_PremiumFeaturesModal_Text",children:"Our support team will reach out to you soon to discuss your music licensing needs."}),n(S,{textStyle:{base:"UI.16.reg",smDown:"UI.14.reg"},color:"text.secondary",textAlign:"left",m:0,maxW:{base:378,lg:"100%"},"data-cy":"_PremiumFeaturesModal_Text_5",children:"In the meantime, enjoy exploring Musicbed's catalog of premium songs and artists."})]}),d(ne,{type:"submit",variant:"filled",h:"48",w:"100%",display:"flex",alignItems:"center",gap:20,onClick:a,"data-cy":"_PremiumFeaturesModal_Button",children:["Let's go",n(Lo,{"data-cy":"_PremiumFeaturesModal_ArrowRight"})]})]}):d(ve,{children:[d(V,{gap:8,alignItems:{base:"center",lg:"unset"},"data-cy":"_PremiumFeaturesModal_Stack",children:[n(Va,{"data-cy":"_PremiumFeaturesModal_Center",children:n(me,{mx:"auto",flexShrink:"1",bg:"linear-gradient(to bottom, #EE5812, #CE3976)",p:"1px",borderRadius:"25px",mb:{base:"16px",md:"24px"},"data-cy":"_PremiumFeaturesModal_Box",children:d(Fe,{bg:"background",p:"8px 16px",borderRadius:"23px",gap:"4px",alignItems:"center","data-cy":"_PremiumFeaturesModal_HStack",children:[n(ta.svg,{boxSize:"14px",children:n(OC,{"data-cy":"_PremiumFeaturesModal_WaveformIcon"})}),n(S,{textStyle:"UI.12.med",fontWeight:"bold",textTransform:"uppercase","data-cy":"_PremiumFeaturesModal_Text",children:"Musicbed Premium Features"})]})})}),d(yc,{textStyle:{base:"heading.32.bold",smDown:"heading.24.semi"},m:0,fontWeight:700,"data-cy":"_PremiumFeaturesModal_Heading",children:["Unlock Tools Used by the ",n("br",{"data-cy":"_PremiumFeaturesModal_br"})," Industry's Best"]}),d(G,{display:{base:"flex",lg:"none"},columnGap:{base:24,smDown:16},rowGap:{base:8,smDown:4},maxW:520,flexWrap:"wrap",justifyContent:"center",mt:8,"data-cy":"_PremiumFeaturesModal_Flex",children:[_h.map(w=>d(G,{alignItems:"center",gap:6,color:"text.secondary","data-cy":"_PremiumFeaturesModal_Flex_17",children:[n(Nm,{size:20,fill:"currentColor","data-cy":"_PremiumFeaturesModal_CheckCircle"}),n(S,{textStyle:"UI.14.reg",color:"text.secondary",m:0,"data-cy":"_PremiumFeaturesModal_Text",children:w.smallScreenName})]},w.smallScreenName)),d(G,{alignItems:"center",gap:6,display:{base:"flex",smDown:"none"},color:"text.secondary","data-cy":"_PremiumFeaturesModal_Flex",children:[n(Nm,{size:20,fill:"currentColor","data-cy":"_PremiumFeaturesModal_CheckCircle"}),n(S,{textStyle:"UI.14.reg",color:"text.secondary",m:0,"data-cy":"_PremiumFeaturesModal_Text",children:"Premium Song Catalog"})]})]})]}),d(pr,{gridTemplateColumns:{base:"1fr",lg:"1fr 1fr"},gap:48,"data-cy":"_PremiumFeaturesModal_Grid",children:[n(Ye,{pt:4,"data-cy":"_PremiumFeaturesModal_GridItem",children:d("form",{style:{display:"flex",flexDirection:"column",gap:19},"data-cy":"_PremiumFeaturesModal_form",children:[d(G,{gap:20,"data-cy":"_PremiumFeaturesModal_Flex",children:[n(Ae,{name:"first_name",control:c,rules:{required:"First name is required"},render:({field:w})=>{var b;return n(je,{label:"First Name",required:!0,errorText:(b=h.first_name)==null?void 0:b.message,inputProps:{...w},"data-cy":"_PremiumFeaturesModal_FormInput"})},"data-cy":"_PremiumFeaturesModal_Controller"}),n(Ae,{name:"last_name",control:c,rules:{required:"Last name is required"},render:({field:w})=>{var b;return n(je,{label:"Last Name",required:!0,errorText:(b=h.last_name)==null?void 0:b.message,inputProps:{...w},"data-cy":"_PremiumFeaturesModal_FormInput"})},"data-cy":"_PremiumFeaturesModal_Controller"})]}),n(Ae,{name:"company",control:c,rules:{required:"Company name is required"},render:({field:w})=>{var b;return n(je,{label:"Company Name",required:!0,errorText:(b=h.company)==null?void 0:b.message,helperText:"ex. Musicbed",inputProps:{...w},"data-cy":"_PremiumFeaturesModal_FormInput"})},"data-cy":"_PremiumFeaturesModal_Controller"}),n(Ae,{name:"company_url",control:c,rules:{required:"Company website is required"},render:({field:w})=>{var b;return n(je,{label:"Company Website",required:!0,errorText:(b=h.company_url)==null?void 0:b.message,helperText:"ex. www.musicbed.com",inputProps:{...w},"data-cy":"_PremiumFeaturesModal_FormInput"})},"data-cy":"_PremiumFeaturesModal_Controller"}),n(Ae,{name:"phone",control:c,rules:{required:"Phone number is required"},defaultValue:e==null?void 0:e.phone,render:({field:w})=>{var b,v;return d(V,{gap:8,alignItems:"flex-start","data-cy":"_PremiumFeaturesModal_Stack",children:[n(LC,{label:"Mobile Number",type:"phone",defaultCountry:e==null?void 0:e.country,errorMessage:(b=h.phone)==null?void 0:b.message,value:w.value,onChange:w.onChange,isPremiumFeaturesModal:!0,"data-cy":"_PremiumFeaturesModal_MobileNumberInput"}),!((v=h.phone)!=null&&v.message)&&n(S,{textStyle:"UI.12.reg",m:0,color:"text.secondary","data-cy":"_PremiumFeaturesModal_Text",children:"Message and data rates may apply"})]})},"data-cy":"_PremiumFeaturesModal_Controller"})]})}),d(Ye,{justifyItems:"start",display:{base:"none",lg:"block"},"data-cy":"_PremiumFeaturesModal_GridItem",children:[n(S,{textStyle:"UI.14.semi",m:"0 0 6px","data-cy":"_PremiumFeaturesModal_Text",children:"Premium Features"}),n(V,{gap:8,w:"100%","data-cy":"_PremiumFeaturesModal_Stack",children:_h.map(w=>d(G,{alignItems:"center",justifyContent:"space-between",h:60,p:12,borderRadius:4,border:"1px solid",borderColor:"border.default","data-cy":"_PremiumFeaturesModal_Flex",children:[d(V,{gap:2,alignItems:"flex-start","data-cy":"_PremiumFeaturesModal_Stack",children:[n(S,{fontSize:14,fontWeight:600,m:0,"data-cy":"_PremiumFeaturesModal_Text",children:w.name}),n(S,{fontSize:12,m:0,color:"text.secondary","data-cy":"_PremiumFeaturesModal_Text_45",children:w.description})]}),n(Ft,{w:16,h:16,bg:"background.default",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",bgColor:"button.primary","data-cy":"_PremiumFeaturesModal_Span",children:n(Td,{weight:"bold",size:12,fill:"white","data-cy":"_PremiumFeaturesModal_Check"})})]},w.name))})]})]}),n(V,{gap:16,alignItems:"center","data-cy":"_PremiumFeaturesModal_Stack",children:d(G,{gap:16,flexDirection:{base:"row",smDown:"column-reverse"},w:"100%",justifyContent:"center","data-cy":"_PremiumFeaturesModal_Flex",children:[n(ne,{bgColor:"background",color:"text.primary",border:"1px solid",borderColor:"border.default",h:"48",w:{base:220,smDown:"100%"},onClick:a,"data-cy":"_PremiumFeaturesModal_Button",children:"No, Thanks"}),d(ne,{type:"submit",variant:"filled",h:"48",w:{base:220,smDown:"100%"},display:"flex",alignItems:"center",gap:20,onClick:s(g),"data-cy":"_PremiumFeaturesModal_Button_51",children:["Submit",n(Lo,{"data-cy":"_PremiumFeaturesModal_ArrowRight"})]})]})})]})})},sM=({steps:e=[]})=>n(ve,{children:(e==null?void 0:e.length)>0&&d(Me,{w:"full",gap:8,"data-cy":"_HeaderPopoverSteps_VStack",children:[n(Fe,{w:"full",gap:2,align:"center","data-cy":"_HeaderPopoverSteps_HStack",children:e==null?void 0:e.map((a,r)=>
45d(m.Fragment,{children:[n(P0,{size:8,bg:r===e.length-1?"background.subtle.gray":"background.colored.teal","data-cy":"_HeaderPopoverSteps_Circle"}),n(G,{h:3,bg:r===e.length-1?"background.subtle.gray":"background.colored.teal",grow:1,"data-cy":"_HeaderPopoverSteps_Flex"})]},a))}),n(Fe,{w:"full",gap:12,align:"center","data-cy":"_HeaderPopoverSteps_HStack",children:e==null?void 0:e.map(a=>n(S,{textStyle:"UI.12.semi",w:`calc(${100/3}% - 8px)`,color:"text.primary",textAlign:"left","data-cy":"_HeaderPopoverSteps_Text",children:a},a))})]})}),dM=({steps:e,ctaText:a,hideCta:r,renderView:i,onClick:c})=>n(me,{p:"32px 24px","data-cy":"_HeaderPopoverAsModal_Box",children:d(Me,{w:"full",gap:32,"data-cy":"_HeaderPopoverAsModal_VStack",children:[n(sM,{steps:e,"data-cy":"_HeaderPopoverAsModal_HeaderPopoverSteps"}),i&&i(),!r&&n(ne,{variant:"filledBrand",size:"lg",w:"full",px:12,color:"button.filled",onClick:c,"data-cy":"_HeaderPopoverAsModal_Button",children:d(G,{w:"full",alignItems:"center",justify:"space-between","data-cy":"_HeaderPopoverAsModal_Flex",children:[a,n(Va,{w:24,"data-cy":"_HeaderPopoverAsModal_Center",children:n(Ja,{size:24,"data-cy":"_HeaderPopoverAsModal_ArrowRightIcon"})})]})})]})}),uM=({enterpriseFormSource:e,headerComponent:a,successMessage:r,onClose:i})=>{const[c,s]=m.useState(!0);return d(Va,{bg:"background.controls.popover",flexDirection:"column",p:{base:"40px 20px",md:"40px"},textAlign:"left","data-cy":"_EnterpriseRequestModal_Center",children:[a&&c&&a({}),n(VC,{enterpriseFormSource:e,onSuccess:()=>s(!1),successMessage:r,onClose:i,"data-cy":"_EnterpriseRequestModal_EnterpriseRequestForm"})]})},pM=()=>{const e=Qe();return d(Me,{w:{base:"100%",md:"420px"},px:"32px",py:"40px",gap:"24px",alignItems:"center","data-cy":"_DownloadSoundsLimitReachedModal_VStack",children:[n($d,{type:"warning","data-cy":"_DownloadSoundsLimitReachedModal_FeedbackIcon"}),d(Me,{gap:"8px","data-cy":"_DownloadSoundsLimitReachedModal_VStack",children:[n(S,{textStyle:"heading.18.semi","data-cy":"_DownloadSoundsLimitReachedModal_Text",children:"Download limit reached"}),n(S,{textStyle:"paragraph.14.reg",maxW:"256px","data-cy":"_DownloadSoundsLimitReachedModal_Text_4",children:"Youâve reached your daily download limit for sound effects. Your download limit will reset tomorrow."})]}),n(ne,{variant:"outline",size:"lg",onClick:e.hide,"data-cy":"_DownloadSoundsLimitReachedModal_Button",children:"Got it!"})]})},mM=({searchTerm:e,setSearchTerm:a,openModal:r})=>d(V,{as:"header",alignItems:"flex-start",gap:8,p:12,borderBottom:"1px solid",borderColor:"border.default","data-cy":"_AddToProjectPopoverHeader_Stack",children:[n(G,{w:"full",h:{base:"32px",md:"unset"},alignItems:"center","data-cy":"_AddToProjectPopoverHeader_Flex",children:n(S,{textStyle:{base:"heading.16.semi",md:"heading.14.reg"},"data-cy":"_AddToProjectPopoverHeader_Text",children:"Add to project"})}),d(me,{position:"relative",w:"full","data-cy":"_AddToProjectPopoverHeader_Box",children:[n(Ft,{position:"absolute",left:6,top:8,color:"text.secondary","data-cy":"_AddToProjectPopoverHeader_Span",children:n(Dd,{width:16,height:16,"data-cy":"_AddToProjectPopoverHeader_MagnifyingGlassIcon"})}),n(hC,{placeholder:"Find a project",backgroundColor:"background.controls.input.outlined",borderRadius:4,h:32,pl:28,border:"1px solid",borderColor:"border.default",_focus:{borderColor:"border.active"},onChange:i=>a(i.target.value),value:e,"data-cy":"_AddToProjectPopoverHeader_Input"})]}),d(G,{as:"button",background:"transparent",alignItems:"center",justifyContent:"flex-start",gap:6,p:"4px 8px",cursor:"pointer",onClick:r,"data-cy":"_AddToProjectPopoverHeader_Flex",children:[n(jd,{width:16,height:16,"data-cy":"_AddToProjectPopoverHeader_PlusIcon"}),n(S,{textStyle:"UI.14.reg",mt:"1px","data-cy":"_AddToProjectPopoverHeader_Text",children:"New project"})]})]}),hM=e=>{switch(e){case 0:return"2px 0 0 0";case 1:return"0 2px 0 0";case 2:return"0 0 0 2px";case 3:return"0 0 2px 0";default:return"0"}};var fM={name:"coxy9w",styles:"& div{padding:0;margin-top:0;}"};const xh=({isChecked:e,project:a,onCheckedChange:r})=>{var i;return d(G,{alignItems:"center",gap:8,backgroundColor:e?"background.controls.states.active":"transparent",p:"4px 0 4px 4px",borderRadius:6,width:"full",_hover:{bg:e?"background.controls.states.active":"background.controls.states.hover"},cursor:"pointer",onClick:()=>r==null?void 0:r({checked:!e}),"data-cy":"_ProjectRow_Flex",children:[n(pr,{w:40,h:40,gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",borderRadius:2,backgroundColor:"background.controls.states.hover","data-cy":"_ProjectRow_Grid",children:((i=a.album_art_images)==null?void 0:i.length)>0&&a.album_art_images.slice(0,4).map((c,s)=>n(Ye,{w:"full",h:"full",backgroundImage:`url(${c.url})`,backgroundPosition:"center",backgroundSize:"cover",borderRadius:hM(s),"data-cy":"_ProjectRow_GridItem"},c.id))}
45),d(V,{alignItems:"flex-start",gap:4,w:"70%","data-cy":"_ProjectRow_Stack",children:[n(S,{textStyle:"UI.14.semi",truncate:!0,w:"full",textAlign:"left","data-cy":"_ProjectRow_Text",children:a.name}),d(G,{alignItems:"center",gap:2,"data-cy":"_ProjectRow_Flex",children:[a.pinned&&n(Xe,{name:"pinVerticalFilled",width:14,height:14,"data-cy":"_ProjectRow_Icon"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_ProjectRow_Text",children:a.end_client})]})]}),n(k0,{ml:"auto",isRounded:!0,checked:e,css:fM,"data-cy":"_ProjectRow_FormCheckbox"})]})},gM=({debouncedSearchTerm:e,projectsBySong:a,selectedProjectsIds:r,handleCheckedChange:i,filteredProjects:c,openNewProjectModal:s})=>d(V,{gap:16,p:12,flex:1,overflowY:"auto",boxShadow:"inset 0 -1px 1px 0 var(--chakra-colors-border-default)","data-cy":"_AddToProjectPopoverContent_Stack",children:[e.length===0&&!!(a!=null&&a.length)&&d(V,{gap:4,alignItems:"flex-start","data-cy":"_AddToProjectPopoverContent_Stack_1",children:[n(S,{textStyle:"heading.12.reg","data-cy":"_AddToProjectPopoverContent_Text",children:"Saved in"}),a.map((u,h)=>n(xh,{project:u,isChecked:r.includes(u.id),onCheckedChange:f=>i(f,u.id),"data-cy":"_AddToProjectPopoverContent_ProjectRow"},h))]}),!(c!=null&&c.length)&&!(a!=null&&a.length)?n(yM,{openNewProjectModal:s,"data-cy":"_AddToProjectPopoverContent_EmptyState"}):d(V,{gap:4,alignItems:"flex-start","data-cy":"_AddToProjectPopoverContent_Stack",children:[e.length===0&&!!(c!=null&&c.length)&&n(S,{textStyle:"heading.12.reg","data-cy":"_AddToProjectPopoverContent_Text",children:"Most recent"}),!!(c!=null&&c.length)&&c.map((u,h)=>n(xh,{project:u,isChecked:r.includes(u.id),onCheckedChange:f=>i(f,u.id),"data-cy":"_AddToProjectPopoverContent_ProjectRow"},h))]})]}),yM=({openNewProjectModal:e})=>d(V,{h:"full",alignItems:"center",justifyContent:"center",gap:16,w:216,margin:"0 auto","data-cy":"_AddToProjectPopoverContent_Stack",children:[d(V,{gap:4,"data-cy":"_AddToProjectPopoverContent_Stack_9",children:[n(S,{textStyle:"UI.12.bold",color:"text.secondary",textAlign:"center","data-cy":"_AddToProjectPopoverContent_Text",children:"Create your first project"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"center","data-cy":"_AddToProjectPopoverContent_Text_11",children:"Projects are the best way to manage songs, licenses, and clients."})]}),d(G,{as:"button",background:"transparent",alignItems:"center",justifyContent:"flex-start",gap:6,p:"4px 6px",cursor:"pointer",border:"1px solid",borderColor:"border.default",borderRadius:4,onClick:e,"data-cy":"_AddToProjectPopoverContent_Flex",children:[n(jd,{width:16,height:16,"data-cy":"_AddToProjectPopoverContent_PlusIcon"}),n(S,{textStyle:"UI.12.reg","data-cy":"_AddToProjectPopoverContent_Text",children:"New project"})]})]}),_M="wishlists",xM=e=>`songs/${e}/wishlists`,bM=e=>`songs/${e}/wishlists/sync`,ai={list:e=>({queryKey:["projects",e],queryFn:()=>Le(_M,{params:e,includeMeta:!0})}),listBySong:e=>({queryKey:["projects",e],queryFn:()=>Le(xM(e))}),syncSongWithProjects:e=>({mutationFn:a=>Le(bM(e),{method:"POST",data:{wishlist_ids:a.wishlist_ids}})})},yg=(e,a)=>{const{data:r,...i}=Je({...ai.list(e),...a||{}});return{projects:(r==null?void 0:r.data)||[],meta:r==null?void 0:r.meta,...i}},SM=(e,a,r)=>yg({name:e},r),wM=(e,a)=>Je({...ai.listBySong(e),...a||{}}),vM=e=>{const{mutateAsync:a,...r}=mt({mutationFn:i=>ai.syncSongWithProjects(i.song_id).mutationFn(i),...e||{}});return{syncSongWithProjects:a,...r}},Ds="createdProjectId",CM=(e,a)=>{localStorage.setItem(Ds,`${e}:${a}`)},TM=e=>{const a=localStorage.getItem(Ds);if(!a)return;localStorage.removeItem(Ds);const[r,i]=a.split(":").map(Number);return r===e?i:void 0},_s=e=>e.sort((a,r)=>a.pinned&&!r.pinned?-1:!a.pinned&&r.pinned?1:0),PM=(e,{onSaved:a}={})=>{const[r,i]=m.useState(""),[c,s]=m.useState([]),[u,h]=m.useState(),f=V0(r,500),{projects:g}=yg({}),{projects:_}=SM(f,void 0,{enabled:!!f}),{data:w}=wM(e,{enabled:!!e}),{syncSongWithProjects:b,isPending:v}=vM({onSuccess:()=>{Ct.create({title:c.length>1?"Projects saved":"Project saved",meta:{closable:!0}}),C.invalidateQueries({queryKey:ai.listBySong(e).queryKey}),a==null||a()}}),C=pt(),T=m.useMemo(()=>f.length>0?_s(_):w!=null&&w.length?_s(g.filter(A=>!w.some(E=>E.id===A.id))):_s(g),[f,_,g,w]),I=(A,E)=>{s(R=>A.checked?[...R,E]:R.filter(k=>k!==E))},O=()=>{b({song_id:e,wishlist_ids:c})},D=()=>
45{if(!(w!=null&&w.length))return c.length>0;const A=w.map(E=>E.id);return JSON.stringify(c)!==JSON.stringify(A)};return m.useEffect(()=>{if(!(w!=null&&w.length))return;const A=w.map(E=>E.id);s(u?[...new Set([...A,u])]:A)},[w,u]),La(()=>{const A=TM(e);A&&(h(A),s(E=>[...new Set([...E,A])]))}),{isPending:v,hasChanges:D(),searchTerm:r,debouncedSearchTerm:f,selectedProjectsIds:c,projects:T,projectsBySong:w,handleCheckedChange:I,handleDone:O,setSearchTerm:i,setSelectedProjectsIds:s}},kM=({songId:e,onClose:a,keepParentOpen:r})=>{const{isPending:i,hasChanges:c,searchTerm:s,debouncedSearchTerm:u,selectedProjectsIds:h,projects:f,projectsBySong:g,setSearchTerm:_,handleCheckedChange:w,handleDone:b}=PM(e),v=Qe("add-to-project-popover-as-modal"),C=Qe("new-project-modal"),T=pt(),I=R=>{CM(e,R),T.invalidateQueries({queryKey:ai.list({}).queryKey}),r==null||r()},O=()=>{v.show({songId:e,onClose:a,keepParentOpen:r}),r==null||r()},D=()=>{C.show({onClose:O,onSuccess:I,isNew:!0})},A=()=>{v.hide(),a==null||a()},E=()=>{b(),a==null||a(),v.hide()};return bd(()=>{a==null||a()}),d(V,{gap:0,backgroundColor:"background.controls.popover",borderRadius:8,w:343,h:600,"data-cy":"_AddToProjectPopoverAsModal_Stack",children:[n(mM,{searchTerm:s,setSearchTerm:_,openModal:D,"data-cy":"_AddToProjectPopoverAsModal_AddToProjectPopoverHeader"}),n(gM,{debouncedSearchTerm:u,projectsBySong:g,selectedProjectsIds:h,handleCheckedChange:w,filteredProjects:f,openNewProjectModal:D,"data-cy":"_AddToProjectPopoverAsModal_AddToProjectPopoverContent"}),d(pr,{as:"footer",p:"8px 12px",gap:8,templateColumns:"1fr 1fr","data-cy":"_AddToProjectPopoverAsModal_Grid",children:[n(ne,{variant:"outline",onClick:A,"data-cy":"_AddToProjectPopoverAsModal_Button",children:"Cancel"}),n(ne,{variant:"filled",disabled:!c,onClick:E,loading:i,"data-cy":"_AddToProjectPopoverAsModal_Button_5",children:"Done"})]})]})},bh=()=>n(Sv,{backgroundImage:{base:"url(https://cdn.musicbed.com/image/upload/w_800,q_auto,f_auto/v1746796437/production/soundEffectsOffer/offer-not-accepted.jpg)",md:"none"},backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"}),xs=e=>({contentProps:{w:"100%",h:"100%",m:10,alignSelf:"center",borderRadius:0,...e}}),IM=["Premium sound effects","Coverage based on your subscription","Unlimited uses"];var MM={name:"4zleql",styles:"display:block"};const AM=()=>{const e=Qe(),[a,r]=m.useState("request"),{submitEnterpriseRequestForm:i,isPending:c}=K0({onError:()=>{Ct.create({title:"Error requesting access",description:"There was an error submitting your request. Please try again.",type:"error",meta:{closable:!0}}),e.hide()},onSuccess:()=>{r("success")}}),{user:{data:s}}=ht(),u=()=>{i({first_name:s==null?void 0:s.first_name,last_name:s==null?void 0:s.last_name,company:s==null?void 0:s.company,company_url:"",email:s==null?void 0:s.email,phone:s==null?void 0:s.phone,formName:"enterprise_membership",pageUrl:window.location.href,pageName:document.title,enterprise_functionality_requested:gc.ENTERPRISE_SOUNDS_LANDING_PAGE.FUNCTIONALITY_REQUESTED,enterprise_form_source:gc.ENTERPRISE_SOUNDS_LANDING_PAGE.SOURCE})},h=()=>{e.hide()};return d(V,{p:{base:"24px",md:"48px 48px 56px"},display:"flex",flexDirection:"column",gap:a==="request"?96:32,h:"100%",w:{base:"100%",md:a==="request"?540:478},justifyContent:"space-between","data-cy":"_RequestSoundsAccessModal_Stack",children:[d(V,{gap:16,"data-cy":"_RequestSoundsAccessModal_Stack_1",children:[a==="request"&&n(Xe,{name:"musicbedSquare",width:48,height:48,css:MM,"data-cy":"_RequestSoundsAccessModal_Icon"}),n(S,{textStyle:a==="request"?"heading.40.reg":"heading.32.reg",textAlign:"left","data-cy":"_RequestSoundsAccessModal_Text",children:a==="request"?"Add Sounds to Your Subscription":"We received your request"}),n(S,{textAlign:"left",textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_RequestSoundsAccessModal_Text_4",children:a==="request"?"Get access to Musicbed's extensive catalogue of premium sound effects.":"Our team will reach out shortly to discuss adding sounds to your account."}),a==="request"&&n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,"aria-label":"Features included with your subscription",children:IM.map(f=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_RequestSoundsAccessModal_Flex",children:[n(Go,{weight:"bold","data-cy":"_RequestSoundsAccessModal_CheckIcon"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_RequestSoundsAccessModal_Text",children:f})]})},f))})]}),a==="request"&&n(V,{gap:20,"data-cy":"_RequestSoundsAccessModal_Stack",children:n(ne,{backgroundColor:"button.filled",h:"48",textStyle:"paragraph.16.reg",color:"text.primary.inverse",onClick:u,loading:c,"data-cy":"_RequestSoundsAccessModal_Button",children:"Request Access"})}),a==="success"&&n(ne,{backgroundColor:"button.filled",h:"48",textStyle:"paragraph.16.reg",color:"text.primary.inverse",onClick:h,"data-cy":"_RequestSoundsAccessModal_Button_10",children:"Sounds good"})]})},FM=e=>{const{data:a,isLoading:r,error:i}=Je({...zf(e).preview}),c=m.useMemo(()=>it((a==null?void 0:a.price_per_interval)||"0",{formatWithSymbol:!0,separator:",",precision:2}).format(),[a]),s=m.useMemo(()=>!!(a!=null&&a.services.includes("sound-effects")),[a]),u=m.useMemo(()=>(a==null?void 0:a.payment_interval)==="year"?"annually":(a==null?void 0:a.payment_interval)==="month"?"monthly for 12 months":"monthly",[a]),h=m.useMemo(()=>{var _;return((_=a==null?void 0:a.payment_method)==null?void 0:_.toLowerCase())==="paypal"?"Payments through PayPal":a!=null&&a.last4?`Card ending in ${a==null?void 0:a.last4}`:"Payments through card"},[a]),f=m.useMemo(()=>new Date((a==null?void 0:a.term.start)??"").toLocaleDateString("en-US",{year:"numeric",month:"short",day:"2-digit"}),[a]),g=m.useMemo(()=>new Date((a==null?void 0:a.term.end)??"").toLocaleDateString("en-US",{year:"numeric",month:"short",day:"2-digit"}),[a]);return{preview:{data:a,formatted:{startDate:f,endDate:g,pricePerInterval:c,paymentMethodLabel:h,paymentInterval:u,includesSFX:s},isLoading:r,error:i}}},EM=({subscription:e,isSuccess:a,onError:r,onCancel:i,onSuccess:c})=>{var v;const s=pt(),[u,h]=m.useState(!!a),{preview:f}=FM(e.id),{user:{refetchUser:g}}=ht(),{endSubscriptionTrial:_,isPending:w}=Wf({onSuccess:()=>{g(),h(!0),c==null||c(),s.invalidateQueries({queryKey:Er.getById(e.id).queryKey}),s.invalidateQueries({queryKey:bt.details(e.id).queryKey})},onError:r}),b=async()=>_(e.id);return u?d(V,{gap:24,w:{base:"100%",md:420},px:32,py:40,alignItems:"center","data-cy":"_StartSubscriptionNowModal_Stack",children:[n($d,{type:"positive","data-cy":"_StartSubscriptionNowModal_FeedbackIcon"}),d(V,{gap:8,"data-cy":"_StartSubscriptionNowModal_Stack",children:[n(S,{textStyle:"heading.18.semi","data-cy":"_StartSubscriptionNowModal_Text",children:"Subscription activated"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_StartSubscriptionNowModal_Text_4",children:"Now finish licensing that song."})]}),n(ne,{variant:"filled",onClick:i,"data-cy":"_StartSubscriptionNowModal_Button",children:"Let's go"})]}):d(pr,{gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},h:"100%",w:"100%",minH:{base:"auto",md:680},maxH:{base:"100%",md:680}
45,maxW:{base:"100%",md:1e3},p:{base:24,md:0},pb:{base:48,md:0},justifyItems:"center",alignItems:"center",mx:"auto","data-cy":"_StartSubscriptionNowModal_Grid",children:[d(Ye,{flex:1,p:{base:"0px",md:"48px 48px 56px"},display:"flex",flexDirection:"column",gap:24,h:"100%",w:"100%",justifyContent:"space-between","data-cy":"_StartSubscriptionNowModal_GridItem",children:[d(V,{gap:24,"data-cy":"_StartSubscriptionNowModal_Stack",children:[d(V,{gap:16,"data-cy":"_StartSubscriptionNowModal_Stack_9",children:[n(Xe,{name:"musicbedSquare",width:48,height:48,"data-cy":"_StartSubscriptionNowModal_Icon"}),n(S,{textStyle:"heading.40.reg",textAlign:"left",lineHeight:"100%","data-cy":"_StartSubscriptionNowModal_Text",children:"Activate your subscription today."}),d(S,{textAlign:"left",textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},maxW:340,"data-cy":"_StartSubscriptionNowModal_Text_12",children:["Start your subscription and get unlimited access to songs","",f.formatted.includesSFX?", sounds,":""," and Musicbed features."]})]}),d(V,{gap:24,"data-cy":"_StartSubscriptionNowModal_Stack",children:[n(V,{gap:8,"data-cy":"_StartSubscriptionNowModal_Stack_14",children:d(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:[n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_StartSubscriptionNowModal_Flex",children:[n(vt,{w:12,h:12,color:"text.primary","data-cy":"_StartSubscriptionNowModal_ChakraIcon",children:n(Fo,{"data-cy":"_StartSubscriptionNowModal_FeaturedIcon"})}),f.isLoading?n(Ne,{w:200,h:18,"data-cy":"_StartSubscriptionNowModal_Skeleton"}):n(S,{textStyle:"paragraph.14.reg","data-cy":"_StartSubscriptionNowModal_Text",children:"Free trial ends"})]})}),n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_StartSubscriptionNowModal_Flex",children:[n(vt,{w:12,h:14,color:"text.primary","data-cy":"_StartSubscriptionNowModal_ChakraIcon",children:n(Fo,{"data-cy":"_StartSubscriptionNowModal_FeaturedIcon"})}),f.isLoading?n(Ne,{w:200,h:18,"data-cy":"_StartSubscriptionNowModal_Skeleton"}):n(S,{textStyle:"paragraph.14.reg","data-cy":"_StartSubscriptionNowModal_Text",children:"Subscription starts today"})]})}),n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_StartSubscriptionNowModal_Flex",children:[n(vt,{w:12,h:14,color:"text.primary","data-cy":"_StartSubscriptionNowModal_ChakraIcon",children:n(Fo,{"data-cy":"_StartSubscriptionNowModal_FeaturedIcon"})}),f.isLoading?n(Ne,{w:200,h:18,"data-cy":"_StartSubscriptionNowModal_Skeleton"}):d(S,{textStyle:"paragraph.14.reg","data-cy":"_StartSubscriptionNowModal_Text",children:[(v=f.formatted)==null?void 0:v.pricePerInterval," billed ",f.formatted.paymentInterval]})]})}),n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_StartSubscriptionNowModal_Flex",children:[n(vt,{w:12,h:12,color:"text.primary","data-cy":"_StartSubscriptionNowModal_ChakraIcon",children:n(Fo,{"data-cy":"_StartSubscriptionNowModal_FeaturedIcon"})}),f.isLoading?n(Ne,{w:200,h:18,"data-cy":"_StartSubscriptionNowModal_Skeleton"}):n(S,{textStyle:"paragraph.14.reg","data-cy":"_StartSubscriptionNowModal_Text",children:f.formatted.paymentMethodLabel})]})})]})}),d(V,{alignItems:"flex-start",gap:4,w:"100%",p:16,borderRadius:4,backgroundColor:"background.surface.2","data-cy":"_StartSubscriptionNowModal_Stack",children:[n(S,{textStyle:"UI.12.reg",textTransform:"uppercase","data-cy":"_StartSubscriptionNowModal_Text",children:"Subscription term"}),f.isLoading?n(Ne,{w:200,h:20,"data-cy":"_StartSubscriptionNowModal_Skeleton"}):d(G,{alignItems:"center",gap:4,"data-cy":"_StartSubscriptionNowModal_Flex",children:[n(S,{textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_StartSubscriptionNowModal_Text",children:f.formatted.startDate}),n(Ja,{size:16,"data-cy":"_StartSubscriptionNowModal_ArrowRightIcon"}),n(S,{textStyle:{base:"paragraph.14.reg",md:"paragraph.16.reg"},"data-cy":"_StartSubscriptionNowModal_Text",children:f.formatted.endDate})]})]})]})]}),n(V,{gap:16,"data-cy":"_StartSubscriptionNowModal_Stack",children:d(V,{gap:20,"data-cy":"_StartSubscriptionNowModal_Stack_43",children:[n(ne,{backgroundColor:"button.filled",h:"48",textStyle:"paragraph.16.reg",color:"text.primary.inverse",onClick:b,loading:w,disabled:w||f.isLoading,"data-cy":"_StartSubscriptionNowModal_Button",children:"Activate subscription"}),n(tn,{w:"100%",justifyContent:"center",textDecorationColor:"text.secondary/20",textStyle:"UI.14.reg",color:"text.secondary",onClick:i,"data-cy":"_StartSubscriptionNowModal_Link",children:"Not right now, continue with free trial"})]})})]}),n(Ye,{flex:1,display:{base:"none",md:"block"},p:{base:0,md:40},h:"100%",w:"100%",background:"url(https://cdn.musicbed.com/image/upload/v1755800541/production/StartSubscriptionNowModal/musicbed-authentic-artists.jpg) no-repeat",backgroundSize:"cover",backgroundPosition:"50% 20%",borderRadius:"0 6px 6px 0","data-cy":"_StartSubscriptionNowModal_GridItem"})]})};var js={exports:{}};const RM=()=>ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none"},ye.createElement("path",{fill:"#2299F8",d:"M19.728 17.3 3.496 33.576c-.776-.736-1.195-1.745-1.195-2.839V5.21c0-1.115.44-2.124 1.237-2.88l16.19 14.97Z"}),ye.createElement("path",{fill:"#FFC107",d:"M33.757 17.973c0 1.473-.797 2.776-2.118 3.512l-4.613 2.566-5.726-5.3-1.572-1.45 6.06-6.078 5.85 3.239
45c1.322.736 2.12 2.04 2.12 3.511Z"}),ye.createElement("path",{fill:"#5ACF5F",d:"M19.728 17.3 3.538 2.33c.21-.211.483-.4.755-.569 1.321-.799 2.915-.82 4.278-.063l17.217 9.525-6.06 6.077Z"}),ye.createElement("path",{fill:"#F84437",d:"M27.026 24.05 8.57 34.25a4.166 4.166 0 0 1-2.097.546c-.755 0-1.51-.189-2.18-.609a3.807 3.807 0 0 1-.798-.61L19.728 17.3l1.572 1.451 5.726 5.3Z"}));var ea=function(){return ea=Object.assign||function(a){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=r[s])}return a},ea.apply(this,arguments)};function Sc(e,a,r){if(r||arguments.length===2)for(var i=0,c=a.length,s;i<c;i++)(s||!(i in a))&&(s||(s=Array.prototype.slice.call(a,0,i)),s[i]=a[i]);return e.concat(s||Array.prototype.slice.call(a))}var st="-ms-",Vo="-moz-",at="-webkit-",_g="comm",zc="rule",Zd="decl",OM="@import",xg="@keyframes",LM="@layer",bg=Math.abs,Gd=String.fromCharCode,zs=Object.assign;function VM(e,a){return At(e,0)^45?(((a<<2^At(e,0))<<2^At(e,1))<<2^At(e,2))<<2^At(e,3):0}function Sg(e){return e.trim()}function sr(e,a){return(e=a.exec(e))?e[0]:e}function qe(e,a,r){return e.replace(a,r)}function cc(e,a,r){return e.indexOf(a,r)}function At(e,a){return e.charCodeAt(a)|0}function Bn(e,a,r){return e.slice(a,r)}function Ga(e){return e.length}function wg(e){return e.length}function Eo(e,a){return a.push(e),e}function BM(e,a){return e.map(a).join("")}function Sh(e,a){return e.filter(function(r){return!sr(r,a)})}var Wc=1,Dn=1,vg=0,Pa=0,wt=0,Gn="";function Nc(e,a,r,i,c,s,u,h){return{value:e,root:a,parent:r,type:i,props:c,children:s,line:Wc,column:Dn,length:u,return:"",siblings:h}}function Mr(e,a){return zs(Nc("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},a)}function An(e){for(;e.root;)e=Mr(e.root,{children:[e]});Eo(e,e.siblings)}function DM(){return wt}function jM(){return wt=Pa>0?At(Gn,--Pa):0,Dn--,wt===10&&(Dn=1,Wc--),wt}function Ba(){return wt=Pa<vg?At(Gn,Pa++):0,Dn++,wt===10&&(Dn=1,Wc++),wt}function Xr(){return At(Gn,Pa)}function lc(){return Pa}function Uc(e,a){return Bn(Gn,e,a)}function Ws(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zM(e){return Wc=Dn=1,vg=Ga(Gn=e),Pa=0,[]}function WM(e){return Gn="",e}function bs(e){return Sg(Uc(Pa-1,Ns(e===91?e+2:e===40?e+1:e)))}function NM(e){for(;(wt=Xr())&&wt<33;)Ba();return Ws(e)>2||Ws(wt)>3?"":" "}function UM(e,a){for(;--a&&Ba()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return Uc(e,lc()+(a<6&&Xr()==32&&Ba()==32))}function Ns(e){for(;Ba();)switch(wt){case e:return Pa;case 34:case 39:e!==34&&e!==39&&Ns(wt);break;case 40:e===41&&Ns(e);break;case 92:Ba();break}return Pa}function qM(e,a){for(;Ba()&&e+wt!==57;)if(e+wt===84&&Xr()===47)break;return"/*"+Uc(a,Pa-1)+"*"+Gd(e===47?e:Ba())}function HM(e){for(;!Ws(Xr());)Ba();return Uc(e,Pa)}function $M(e){return WM(sc("",null,null,null,[""],e=zM(e),0,[0],e))}function sc(e,a,r,i,c,s,u,h,f){for(var g=0,_=0,w=u,b=0,v=0,C=0,T=1,I=1,O=1,D=0,A="",E=c,R=s,k=i,z=A;I;)switch(C=D,D=Ba()){case 40:if(C!=108&&At(z,w-1)==58){cc(z+=qe(bs(D),"&","&\f"),"&\f",bg(g?h[g-1]:0))!=-1&&(O=-1);break}case 34:case 39:case 91:z+=bs(D);break;case 9:case 10:case 13:case 32:z+=NM(C);break;case 92:z+=UM(lc()-1,7);continue;case 47:switch(Xr()){case 42:case 47:Eo(ZM(qM(Ba(),lc()),a,r,f),f);break;default:z+="/"}break;case 123*T:h[g++]=Ga(z)*O;case 125*T:case 59:case 0:switch(D){case 0:case 125:I=0;case 59+_:O==-1&&(z=qe(z,/\f/g,"")),v>0&&Ga(z)-w&&Eo(v>32?vh(z+";",i,r,w-1,f):vh(qe(z," ","")+";",i,r,w-2,f),f);break;case 59:z+=";";default:if(Eo(k=wh(z,a,r,g,_,c,h,A,E=[],R=[],w,s),s),D===123)if(_===0)sc(z,a,k,k,E,s,w,h,R);else switch(b===99&&At(z,3)===110?100:b){case 100:case 108:case 109:case 115:sc(e,k,k,i&&Eo(wh(e,k,k,0,0,c,h,A,c,E=[],w,R),R),c,R,w,h,i?E:R);break;default:sc(z,k,k,k,[""],R,0,h,R)}}g=_=v=0,T=O=1,A=z="",w=u;break;case 58:w=1+Ga(z),v=C;default:if(T<1){if(D==123)--T;else if(D==125&&T++==0&&jM()==125)continue}switch(z+=Gd(D),D*T){case 38:O=_>0?1:(z+="\f",-1);break;case 44:h[g++]=(Ga(z)-1)*O,O=1;break;
45case 64:Xr()===45&&(z+=bs(Ba())),b=Xr(),_=w=Ga(A=z+=HM(lc())),D++;break;case 45:C===45&&Ga(z)==2&&(T=0)}}return s}function wh(e,a,r,i,c,s,u,h,f,g,_,w){for(var b=c-1,v=c===0?s:[""],C=wg(v),T=0,I=0,O=0;T<i;++T)for(var D=0,A=Bn(e,b+1,b=bg(I=u[T])),E=e;D<C;++D)(E=Sg(I>0?v[D]+" "+A:qe(A,/&\f/g,v[D])))&&(f[O++]=E);return Nc(e,a,r,c===0?zc:h,f,g,_,w)}function ZM(e,a,r,i){return Nc(e,a,r,_g,Gd(DM()),Bn(e,2,-2),0,i)}function vh(e,a,r,i,c){return Nc(e,a,r,Zd,Bn(e,0,i),Bn(e,i+1,-1),i,c)}function Cg(e,a,r){switch(VM(e,a)){case 5103:return at+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return at+e+e;case 4789:return Vo+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return at+e+Vo+e+st+e+e;case 5936:switch(At(e,a+11)){case 114:return at+e+st+qe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return at+e+st+qe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return at+e+st+qe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return at+e+st+e+e;case 6165:return at+e+st+"flex-"+e+e;case 5187:return at+e+qe(e,/(\w+).+(:[^]+)/,at+"box-$1$2"+st+"flex-$1$2")+e;case 5443:return at+e+st+"flex-item-"+qe(e,/flex-|-self/g,"")+(sr(e,/flex-|baseline/)?"":st+"grid-row-"+qe(e,/flex-|-self/g,""))+e;case 4675:return at+e+st+"flex-line-pack"+qe(e,/align-content|flex-|-self/g,"")+e;case 5548:return at+e+st+qe(e,"shrink","negative")+e;case 5292:return at+e+st+qe(e,"basis","preferred-size")+e;case 6060:return at+"box-"+qe(e,"-grow","")+at+e+st+qe(e,"grow","positive")+e;case 4554:return at+qe(e,/([^-])(transform)/g,"$1"+at+"$2")+e;case 6187:return qe(qe(qe(e,/(zoom-|grab)/,at+"$1"),/(image-set)/,at+"$1"),e,"")+e;case 5495:case 3959:return qe(e,/(image-set\([^]*)/,at+"$1$`$1");case 4968:return qe(qe(e,/(.+:)(flex-)?(.*)/,at+"box-pack:$3"+st+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+at+e+e;case 4200:if(!sr(e,/flex-|baseline/))return st+"grid-column-align"+Bn(e,a)+e;break;case 2592:case 3360:return st+qe(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(i,c){return a=c,sr(i.props,/grid-\w+-end/)})?~cc(e+(r=r[a].value),"span",0)?e:st+qe(e,"-start","")+e+st+"grid-row-span:"+(~cc(r,"span",0)?sr(r,/\d+/):+sr(r,/\d+/)-+sr(e,/\d+/))+";":st+qe(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(i){return sr(i.props,/grid-\w+-start/)})?e:st+qe(qe(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return qe(e,/(.+)-inline(.+)/,at+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ga(e)-1-a>6)switch(At(e,a+1)){case 109:if(At(e,a+4)!==45)break;case 102:return qe(e,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+Vo+(At(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~cc(e,"stretch",0)?Cg(qe(e,"stretch","fill-available"),a,r)+e:e}break;case 5152:case 5920:return qe(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(i,c,s,u,h,f,g){return st+c+":"+s+g+(u?st+c+"-span:"+(h?f:+f-+s)+g:"")+e});case 4949:if(At(e,a+6)===121)return qe(e,":",":"+at)+e;break;case 6444:switch(At(e,At(e,14)===45?18:11)){case 120:return qe(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+at+(At(e,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+st+"$2box$3")+e;case 100:return qe(e,":",":"+st)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return qe(e,"scroll-","scroll-snap-")+e}return e}function wc(e,a){for(var r="",i=0;i<e.length;i++)r+=a(e[i],i,e,a)||"";return r}function GM(e,a,r,i){switch(e.type){case LM:if(e.children.length)break;case OM:case Zd:return e.return=e.return||e.value;case _g:return"";case xg:return e.return=e.value+"{"+wc(e.children,i)+"}";case zc:if(!Ga(e.value=e.props.join(",")))return""}return Ga(r=wc(e.children,i))?e.return=e.value+"{"+r+"}":""}function YM(e){var a=wg(e);return function(r,i,c,s){for(var u="",h=0;h<a;h++)u+=e[h](r,i,c,s)||"";return u}}function KM(e){return function(a){a.root||(a=a.return)&&e(a)}}function QM(e,a,r,i){if(e.length>-1&&!e.return)switch(e.type){case Zd:e.return=Cg(e.value,e.length,r);return;case xg:return wc([Mr(e,{value:qe(e.value,"@","@"+at)})],i);case zc:if(e.length)return BM(r=e.props,function(c){switch(sr(c,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":An(Mr(e,{props:[qe(c,/:(read-\w+)/,":"+Vo+"$1")]})),An(Mr(e,{props:[c]})),zs(e,{props:Sh(r,i)});break;case"::placeholder":An(Mr(e,{props:[qe(c,/:(plac\w+)/,":"+at+"input-$1")]})),An(Mr(e,{props:[qe(c,/:(plac\w+)/,":"+Vo+"$1")]})),An(Mr(e,{props:[qe(c,/:(plac\w+)/,st+"input-$1")]})),An(Mr(e,{props:[c]})),zs(e,{props:Sh(r,i)});break}return""})}}var JM={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
45idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ia={},jn=typeof Ps.process<"u"&&ia!==void 0&&(ia.REACT_APP_SC_ATTR||ia.SC_ATTR)||"data-styled",Tg="active",Pg="data-styled-version",qc="6.1.19",Yd=`/*!sc*/ 46`,vc=typeof window<"u"&&typeof document<"u",XM=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof Ps.process<"u"&&ia!==void 0&&ia.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&ia.REACT_APP_SC_DISABLE_SPEEDY!==""?ia.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&ia.REACT_APP_SC_DISABLE_SPEEDY:typeof Ps.process<"u"&&ia!==void 0&&ia.SC_DISABLE_SPEEDY!==void 0&&ia.SC_DISABLE_SPEEDY!==""&&ia.SC_DISABLE_SPEEDY!=="false"&&ia.SC_DISABLE_SPEEDY),Hc=Object.freeze([]),zn=Object.freeze({});function eA(e,a,r){return r===void 0&&(r=zn),e.theme!==r.theme&&e.theme||a||r.theme}var kg=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),tA=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,aA=/(^-|-$)/g;function Ch(e){return e.replace(tA,"-").replace(aA,"")}var rA=/(a)(d)/gi,Ji=52,Th=function(e){return String.fromCharCode(e+(e>25?39:97))};function Us(e){var a,r="";for(a=Math.abs(e);a>Ji;a=a/Ji|0)r=Th(a%Ji)+r;return(Th(a%Ji)+r).replace(rA,"$1-$2")}var Ss,Ig=5381,Rn=function(e,a){for(var r=a.length;r;)e=33*e^a.charCodeAt(--r);return e},Mg=function(e){return Rn(Ig,e)};function nA(e){return Us(Mg(e)>>>0)}function oA(e){return e.displayName||e.name||"Component"}function ws(e){return typeof e=="string"&&!0}var Ag=typeof Symbol=="function"&&Symbol.for,Fg=Ag?Symbol.for("react.memo"):60115,iA=Ag?Symbol.for("react.forward_ref"):60112,cA={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},lA={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Eg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sA=((Ss={})[iA]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ss[Fg]=Eg,Ss);function Ph(e){return("type"in(a=e)&&a.type.$$typeof)===Fg?Eg:"$$typeof"in e?sA[e.$$typeof]:cA;var a}var dA=Object.defineProperty,uA=Object.getOwnPropertyNames,kh=Object.getOwnPropertySymbols,pA=Object.getOwnPropertyDescriptor,mA=Object.getPrototypeOf,Ih=Object.prototype;function Rg(e,a,r){if(typeof a!="string"){if(Ih){var i=mA(a);i&&i!==Ih&&Rg(e,i,r)}var c=uA(a);kh&&(c=c.concat(kh(a)));for(var s=Ph(e),u=Ph(a),h=0;h<c.length;++h){var f=c[h];if(!(f in lA||r&&r[f]||u&&f in u||s&&f in s)){var g=pA(a,f);try{dA(e,f,g)}catch{}}}}return e}function Wn(e){return typeof e=="function"}function Kd(e){return typeof e=="object"&&"styledComponentId"in e}function Kr(e,a){return e&&a?"".concat(e," ").concat(a):e||a||""}function Mh(e,a){if(e.length===0)return"";for(var r=e[0],i=1;i<e.length;i++)r+=e[i];return r}function Uo(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function qs(e,a,r){if(r===void 0&&(r=!1),!r&&!Uo(e)&&!Array.isArray(e))return a;
46if(Array.isArray(a))for(var i=0;i<a.length;i++)e[i]=qs(e[i],a[i]);else if(Uo(a))for(var i in a)e[i]=qs(e[i],a[i]);return e}function Qd(e,a){Object.defineProperty(e,"toString",{value:a})}function ri(e){for(var a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(a.length>0?" Args: ".concat(a.join(", ")):""))}var hA=function(){function e(a){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=a}return e.prototype.indexOfGroup=function(a){for(var r=0,i=0;i<a;i++)r+=this.groupSizes[i];return r},e.prototype.insertRules=function(a,r){if(a>=this.groupSizes.length){for(var i=this.groupSizes,c=i.length,s=c;a>=s;)if((s<<=1)<0)throw ri(16,"".concat(a));this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var u=c;u<s;u++)this.groupSizes[u]=0}for(var h=this.indexOfGroup(a+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(h,r[u])&&(this.groupSizes[a]++,h++)},e.prototype.clearGroup=function(a){if(a<this.length){var r=this.groupSizes[a],i=this.indexOfGroup(a),c=i+r;this.groupSizes[a]=0;for(var s=i;s<c;s++)this.tag.deleteRule(i)}},e.prototype.getGroup=function(a){var r="";if(a>=this.length||this.groupSizes[a]===0)return r;for(var i=this.groupSizes[a],c=this.indexOfGroup(a),s=c+i,u=c;u<s;u++)r+="".concat(this.tag.getRule(u)).concat(Yd);return r},e}(),dc=new Map,Cc=new Map,uc=1,Xi=function(e){if(dc.has(e))return dc.get(e);for(;Cc.has(uc);)uc++;var a=uc++;return dc.set(e,a),Cc.set(a,e),a},fA=function(e,a){uc=a+1,dc.set(e,a),Cc.set(a,e)},gA="style[".concat(jn,"][").concat(Pg,'="').concat(qc,'"]'),yA=new RegExp("^".concat(jn,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),_A=function(e,a,r){for(var i,c=r.split(","),s=0,u=c.length;s<u;s++)(i=c[s])&&e.registerName(a,i)},xA=function(e,a){for(var r,i=((r=a.textContent)!==null&&r!==void 0?r:"").split(Yd),c=[],s=0,u=i.length;s<u;s++){var h=i[s].trim();if(h){var f=h.match(yA);if(f){var g=0|parseInt(f[1],10),_=f[2];g!==0&&(fA(_,g),_A(e,_,f[3]),e.getTag().insertRules(g,c)),c.length=0}else c.push(h)}}},Ah=function(e){for(var a=document.querySelectorAll(gA),r=0,i=a.length;r<i;r++){var c=a[r];c&&c.getAttribute(jn)!==Tg&&(xA(e,c),c.parentNode&&c.parentNode.removeChild(c))}};function bA(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Og=function(e){var a=document.head,r=e||a,i=document.createElement("style"),c=function(h){var f=Array.from(h.querySelectorAll("style[".concat(jn,"]")));return f[f.length-1]}(r),s=c!==void 0?c.nextSibling:null;i.setAttribute(jn,Tg),i.setAttribute(Pg,qc);var u=bA();return u&&i.setAttribute("nonce",u),r.insertBefore(i,s),i},SA=function(){function e(a){this.element=Og(a),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var i=document.styleSheets,c=0,s=i.length;c<s;c++){var u=i[c];if(u.ownerNode===r)return u}throw ri(17)}(this.element),this.length=0}return e.prototype.insertRule=function(a,r){try{return this.sheet.insertRule(r,a),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(a){this.sheet.deleteRule(a),this.length--},e.prototype.getRule=function(a){var r=this.sheet.cssRules[a];return r&&r.cssText?r.cssText:""},e}(),wA=function(){function e(a){this.element=Og(a),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(a,r){if(a<=this.length&&a>=0){var i=document.createTextNode(r);return this.element.insertBefore(i,this.nodes[a]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(a){this.element.removeChild(this.nodes[a]),this.length--},e.prototype.getRule=function(a){return a<this.length?this.nodes[a].textContent:""},e}(),vA=function(){function e(a){this.rules=[],this.length=0}return e.prototype.insertRule=function(a,r){return a<=this.length&&(this.rules.splice(a,0,r),this.length++,!0)},e.prototype.deleteRule=function(a){this.rules.splice(a,1),this.length--},e.prototype.getRule=function(a){return a<this.length?this.rules[a]:""},e}(),Fh=vc,CA={isServer:!vc,useCSSOMInjection:!XM},Lg=function(){function e(a,r,i){a===void 0&&(a=zn),r===void 0&&(r={});var c=this;this.options=ea(ea({},CA),a),this.gs=r,this.names=new Map(i),this.server=!!a.isServer,!this.server&&vc&&Fh&&(Fh=!1,Ah(this)),Qd(this,function(){return function(s){for(var u=s.getTag(),h=u.length,f="",g=function(w){var b=function(O){return Cc.get(O)}(w);if(b===void 0)return"continue";var v=s.names.get(b),C=u.getGroup(w);if(v===void 0||!v.size||C.length===0)return"continue";var T="".concat(jn,".g").concat(w,'[id="').concat(b,'"]'),I="";v!==void 0&&v.forEach(function(O){O.length>0&&(I+="".concat(O,","))}
46),f+="".concat(C).concat(T,'{content:"').concat(I,'"}').concat(Yd)},_=0;_<h;_++)g(_);return f}(c)})}return e.registerId=function(a){return Xi(a)},e.prototype.rehydrate=function(){!this.server&&vc&&Ah(this)},e.prototype.reconstructWithOptions=function(a,r){return r===void 0&&(r=!0),new e(ea(ea({},this.options),a),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(a){return this.gs[a]=(this.gs[a]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(a=function(r){var i=r.useCSSOMInjection,c=r.target;return r.isServer?new vA(c):i?new SA(c):new wA(c)}(this.options),new hA(a)));var a},e.prototype.hasNameForId=function(a,r){return this.names.has(a)&&this.names.get(a).has(r)},e.prototype.registerName=function(a,r){if(Xi(a),this.names.has(a))this.names.get(a).add(r);else{var i=new Set;i.add(r),this.names.set(a,i)}},e.prototype.insertRules=function(a,r,i){this.registerName(a,r),this.getTag().insertRules(Xi(a),i)},e.prototype.clearNames=function(a){this.names.has(a)&&this.names.get(a).clear()},e.prototype.clearRules=function(a){this.getTag().clearGroup(Xi(a)),this.clearNames(a)},e.prototype.clearTag=function(){this.tag=void 0},e}(),TA=/&/g,PA=/^\s*\/\/.*$/gm;function Vg(e,a){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(a," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(a," ")),r.props=r.props.map(function(i){return"".concat(a," ").concat(i)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Vg(r.children,a)),r})}function kA(e){var a,r,i,c=zn,s=c.options,u=s===void 0?zn:s,h=c.plugins,f=h===void 0?Hc:h,g=function(b,v,C){return C.startsWith(r)&&C.endsWith(r)&&C.replaceAll(r,"").length>0?".".concat(a):b},_=f.slice();_.push(function(b){b.type===zc&&b.value.includes("&")&&(b.props[0]=b.props[0].replace(TA,r).replace(i,g))}),u.prefix&&_.push(QM),_.push(GM);var w=function(b,v,C,T){v===void 0&&(v=""),C===void 0&&(C=""),T===void 0&&(T="&"),a=T,r=v,i=new RegExp("\\".concat(r,"\\b"),"g");var I=b.replace(PA,""),O=$M(C||v?"".concat(C," ").concat(v," { ").concat(I," }"):I);u.namespace&&(O=Vg(O,u.namespace));var D=[];return wc(O,YM(_.concat(KM(function(A){return D.push(A)})))),D};return w.hash=f.length?f.reduce(function(b,v){return v.name||ri(15),Rn(b,v.name)},Ig).toString():"",w}var IA=new Lg,Hs=kA(),Bg=ye.createContext({shouldForwardProp:void 0,styleSheet:IA,stylis:Hs});Bg.Consumer;ye.createContext(void 0);function Eh(){return m.useContext(Bg)}var MA=function(){function e(a,r){var i=this;this.inject=function(c,s){s===void 0&&(s=Hs);var u=i.name+s.hash;c.hasNameForId(i.id,u)||c.insertRules(i.id,u,s(i.rules,u,"@keyframes"))},this.name=a,this.id="sc-keyframes-".concat(a),this.rules=r,Qd(this,function(){throw ri(12,String(i.name))})}return e.prototype.getName=function(a){return a===void 0&&(a=Hs),this.name+a.hash},e}(),AA=function(e){return e>="A"&&e<="Z"};function Rh(e){for(var a="",r=0;r<e.length;r++){var i=e[r];if(r===1&&i==="-"&&e[0]==="-")return e;AA(i)?a+="-"+i.toLowerCase():a+=i}return a.startsWith("ms-")?"-"+a:a}var Dg=function(e){return e==null||e===!1||e===""},jg=function(e){var a,r,i=[];for(var c in e){var s=e[c];e.hasOwnProperty(c)&&!Dg(s)&&(Array.isArray(s)&&s.isCss||Wn(s)?i.push("".concat(Rh(c),":"),s,";"):Uo(s)?i.push.apply(i,Sc(Sc(["".concat(c," {")],jg(s),!1),["}"],!1)):i.push("".concat(Rh(c),": ").concat((a=c,(r=s)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||a in JM||a.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return i};function en(e,a,r,i){if(Dg(e))return[];if(Kd(e))return[".".concat(e.styledComponentId)];if(Wn(e)){if(!Wn(s=e)||s.prototype&&s.prototype.isReactComponent||!a)return[e];var c=e(a);return en(c,a,r,i)}var s;return e instanceof MA?r?(e.inject(r,i),[e.getName(i)]):[e]:Uo(e)?jg(e):Array.isArray(e)?Array.prototype.concat.apply(Hc,e.map(function(u){return en(u,a,r,i)})):[e.toString()]}function FA(e){for(var a=0;a<e.length;a+=1){var r=e[a];if(Wn(r)&&!Kd(r))return!1}return!0}var EA=Mg(qc),RA=function(){function e(a,r,i){this.rules=a,this.staticRulesId="",this.isStatic=(i===void 0||i.isStatic)&&FA(a),this.componentId=r,this.baseHash=Rn(EA,r),this.baseStyle=i,Lg.registerId(r)}return e.prototype.generateAndInjectStyles=function(a,r,i){var c=this.baseStyle?this.baseStyle.generateAndInjectStyles(a,r,i):"";if(this.isStatic&&!i.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))c=Kr(c,this.staticRulesId);else{var s=Mh(en(this.rules,a,r,i)),u=Us(Rn(this.baseHash,s)>>>0);if(!r.hasNameForId(this.componentId,u)){var h=i(s,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,h)}c=Kr(c,u),this.staticRulesId=u}else{for(var f=Rn(this.baseHash,i.hash),g="",_=0;_<this.rules.length;_++){var w=this.rules[_];if(typeof w=="string")g+=w;else if(w){var b=Mh(en(w,a,r,i));f=Rn(f,b+_),g+=b}}if(g){var v=Us(f>>>0);r.hasNameForId(this.componentId,v)||r.insertRules(this.componentId,v,i(g,".".concat(v),void 0,this.componentId)),c=Kr(c,v)}}return c},e}(),zg=ye.createContext(void 0);zg.Consumer;var vs={};function OA(e,a,r){var i=Kd(e),c=e,s=!ws(e),u=a.attrs,h=u===void 0?Hc:u,f=a.componentId,g=f===void 0?function(E,R){var k=typeof E!="str
46ing"?"sc":Ch(E);vs[k]=(vs[k]||0)+1;var z="".concat(k,"-").concat(nA(qc+k+vs[k]));return R?"".concat(R,"-").concat(z):z}(a.displayName,a.parentComponentId):f,_=a.displayName,w=_===void 0?function(E){return ws(E)?"styled.".concat(E):"Styled(".concat(oA(E),")")}(e):_,b=a.displayName&&a.componentId?"".concat(Ch(a.displayName),"-").concat(a.componentId):a.componentId||g,v=i&&c.attrs?c.attrs.concat(h).filter(Boolean):h,C=a.shouldForwardProp;if(i&&c.shouldForwardProp){var T=c.shouldForwardProp;if(a.shouldForwardProp){var I=a.shouldForwardProp;C=function(E,R){return T(E,R)&&I(E,R)}}else C=T}var O=new RA(r,b,i?c.componentStyle:void 0);function D(E,R){return function(k,z,Q){var N=k.attrs,W=k.componentStyle,Y=k.defaultProps,oe=k.foldedComponentIds,Se=k.styledComponentId,ce=k.target,we=ye.useContext(zg),le=Eh(),K=k.shouldForwardProp||le.shouldForwardProp,se=eA(z,we,Y)||zn,ae=function(ie,J,re){for(var fe,ke=ea(ea({},J),{className:void 0,theme:re}),$e=0;$e<ie.length;$e+=1){var X=Wn(fe=ie[$e])?fe(ke):fe;for(var ee in X)ke[ee]=ee==="className"?Kr(ke[ee],X[ee]):ee==="style"?ea(ea({},ke[ee]),X[ee]):X[ee]}return J.className&&(ke.className=Kr(ke.className,J.className)),ke}(N,z,se),q=ae.as||ce,xe={};for(var Ce in ae)ae[Ce]===void 0||Ce[0]==="$"||Ce==="as"||Ce==="theme"&&ae.theme===se||(Ce==="forwardedAs"?xe.as=ae.forwardedAs:K&&!K(Ce,q)||(xe[Ce]=ae[Ce]));var ge=function(ie,J){var re=Eh(),fe=ie.generateAndInjectStyles(J,re.styleSheet,re.stylis);return fe}(W,ae),Be=Kr(oe,Se);return ge&&(Be+=" "+ge),ae.className&&(Be+=" "+ae.className),xe[ws(q)&&!kg.has(q)?"class":"className"]=Be,Q&&(xe.ref=Q),m.createElement(q,xe)}(A,E,R)}D.displayName=w;var A=ye.forwardRef(D);return A.attrs=v,A.componentStyle=O,A.displayName=w,A.shouldForwardProp=C,A.foldedComponentIds=i?Kr(c.foldedComponentIds,c.styledComponentId):"",A.styledComponentId=b,A.target=i?c.target:e,Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(E){this._foldedDefaultProps=i?function(R){for(var k=[],z=1;z<arguments.length;z++)k[z-1]=arguments[z];for(var Q=0,N=k;Q<N.length;Q++)qs(R,N[Q],!0);return R}({},c.defaultProps,E):E}}),Qd(A,function(){return".".concat(A.styledComponentId)}),s&&Rg(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),A}function Oh(e,a){for(var r=[e[0]],i=0,c=a.length;i<c;i+=1)r.push(a[i],e[i+1]);return r}var Lh=function(e){return Object.assign(e,{isCss:!0})};function Wg(e){for(var a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];if(Wn(e)||Uo(e))return Lh(en(Oh(Hc,Sc([e],a,!0))));var i=e;return a.length===0&&i.length===1&&typeof i[0]=="string"?en(i):Lh(en(Oh(i,a)))}function $s(e,a,r){if(r===void 0&&(r=zn),!a)throw ri(1,a);var i=function(c){for(var s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];return e(a,r,Wg.apply(void 0,Sc([c],s,!1)))};return i.attrs=function(c){return $s(e,a,ea(ea({},r),{attrs:Array.prototype.concat(r.attrs,c).filter(Boolean)}))},i.withConfig=function(c){return $s(e,a,ea(ea({},r),c))},i}var Ng=function(e){return $s(OA,e)},Yn=Ng;kg.forEach(function(e){Yn[e]=Ng(e)});const LA=Yn.div` 47 display: flex; 48 align-items: center; 49 padding: 10px; 50 gap: 10px; 51 cursor: pointer; 52 border: 2px solid #202020; 53 border-radius: ${e=>e.border||10}px; 54 55 ${e=>e.theme==="dark"&&Wg` 56 background-color: #202020; 57 color: #fff; 58 `} 59`,VA=Yn.div` 60 display: flex; 61 flex-direction: column; 62 align-items: flex-start; 63 font-family: "Outfit", sans-serif; 64`,BA=Yn.span` 65 font-size: 12px; 66`,DA=Yn.span` 67 font-size: 20px; 68 font-weight: bold; 69`,Jd=({theme:e="light",height:a=50,width:r=180,border:i,logo:c,storeName:s,title:u,url:h,className:f})=>{const g=c;return ye.createElement(LA,{theme:e,border:i,className:f,style:{height:a,width:r,borderRadius:i},onClick:()=>window.open(h,"_blank"),logo:c,storeName:s,title:u,url:h},ye.createElement(g,null),ye.createElement(VA,null,ye.createElement(BA,null,u),ye.createElement(DA,null,s)))},jA=({theme:e="light",height:a,title:r="GET IT ON",width:i,className:c,url:s})=>ye.createElement(Jd,{theme:e,height:a,width:i,url:s,storeName:"Google Play",logo:RM,className:c,title:r}),zA=()=>ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none"},ye.createElement("path",{fill:"url(#a)",fillRule:"evenodd",d:"M10.442 1C3.529 1 1 3.528 1 10.44v14.77c0 6.912 2.529 9.44 9.442 9.44h14.762c6.913 0 9.446-2.528 9.446-9.44V10.44c0-6.912-2.529-9.44-9.442-9.44H10.442Z",clipRule:"evenodd"}),ye.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M15.678 20.516h1.35l-.677-1.576-.673 1.576Zm-.333.795-.4.917h-.913l1.94-4.403h.79l1.932 4.403h-.937l-.396-.917h-2.016Zm14.684.913h.882v-4.399h-.882v4.4Zm-3.51-1.89h1.626v-.802h-1.626v-.901h2.36v-.803h-3.242v4.4h3.327v-.803h-2.445v-1.09Zm-3.504.52-1-3.029h-.73l-1 3.03-.973-3.028h-.951l1.535 4.403h.74l1.002-2.892 1.001 2.892h.746l1.532-4.403h-.927l-.975 3.027Zm-10.33-.507c0 .716-.355 1.099-1 1.099-.65 0-1.008-.394-1.008-1.13v-2.488h-.894v2.519c0 1.239.689 1.95 1.889 1.95 1.212 0 1.907-.725 1.907-1.987v-2.485h-.893v2.522Zm-5.034-2.522h.893v4.405h-.893v-1.789H5.633v1.79h-.894v-4.406h.894v1.777H7.65v-1.777ZM17.825 12.217a5.614 5.614 0 0 1-5.608-5.609h.792a4.822 4.822 0 0 0 4.816 4.816 4.822 4.822 0 0 0 4.816-4.816h.792a5.615 5.615 0 0 1-5.608 5.609Z",clipRule:"evenodd"}),ye.createElement("defs",null,ye.createElement("linearGradient",{id:"a",x1:17.825,x2:17.825,y1:1,y2:34.65,gradientUnits:"userSpaceOnUse"},ye.createElement("stop",{stopColor:"#FB6361"}),ye.createElement("stop",{offset:1,stopColor:"#ED3E45"}
69)))),WA=({theme:e="light",height:a,title:r="EXPLORE IT ON",width:i,className:c,url:s})=>ye.createElement(Jd,{theme:e,height:a,width:i,url:s,storeName:"AppGallery",logo:zA,className:c,title:r}),NA=()=>ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none"},ye.createElement("path",{fill:"#000",d:"M22.667 6.639C23.76 5.223 24.59 3.22 24.29 1.178c-1.789.124-3.88 1.272-5.098 2.767-1.111 1.356-2.026 3.37-1.67 5.328 1.955.061 3.975-1.114 5.145-2.634Z"}),ye.createElement("path",{fill:"#000",d:"M31.36 12.466c-1.718-2.16-4.132-3.414-6.412-3.414-3.009 0-4.282 1.445-6.373 1.445-2.155 0-3.793-1.44-6.396-1.44-2.556 0-5.278 1.566-7.004 4.245-2.426 3.773-2.011 10.865 1.921 16.906 1.407 2.162 3.286 4.593 5.744 4.614 2.187.02 2.803-1.407 5.767-1.422 2.963-.016 3.525 1.441 5.708 1.418 2.46-.02 4.442-2.713 5.849-4.875 1.009-1.55 1.384-2.33 2.166-4.079-5.69-2.172-6.601-10.285-.97-13.399Z"})),UA=()=>ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none"},ye.createElement("path",{fill:"#fff",d:"M22.667 6.639C23.76 5.223 24.59 3.22 24.29 1.178c-1.789.124-3.88 1.272-5.098 2.767-1.111 1.356-2.026 3.37-1.67 5.328 1.955.061 3.975-1.114 5.145-2.634Z"}),ye.createElement("path",{fill:"#fff",d:"M31.36 12.466c-1.718-2.16-4.132-3.414-6.412-3.414-3.009 0-4.282 1.445-6.373 1.445-2.155 0-3.793-1.44-6.396-1.44-2.556 0-5.278 1.566-7.004 4.245-2.426 3.773-2.011 10.865 1.921 16.906 1.407 2.162 3.286 4.593 5.744 4.614 2.187.02 2.803-1.407 5.767-1.422 2.963-.016 3.525 1.441 5.708 1.418 2.46-.02 4.442-2.713 5.849-4.875 1.009-1.55 1.384-2.33 2.166-4.079-5.69-2.172-6.601-10.285-.97-13.399Z"})),qA=({theme:e="light",height:a,title:r="Download on the",width:i,className:c,url:s})=>ye.createElement(Jd,{theme:e,height:a,width:i,url:s,storeName:"App Store",logo:e==="dark"?UA:NA,className:c,title:r}),HA=Yn.div` 70 display: flex; 71 align-items: center; 72 gap: 20px; 73`,$A=({children:e,gap:a,direction:r="row"})=>ye.createElement(HA,{style:{gap:a,flexDirection:r}},e),ZA=Object.freeze(Object.defineProperty({__proto__:null,AppGalleryButton:WA,AppStoreButton:qA,ButtonsContainer:$A,GooglePlayButton:jA},Symbol.toStringTag,{value:"Module"})),Vh=Jv(ZA);(function(e,a){e.exports=Vh,a.default=Vh}
73)(js,js.exports);var Bh=js.exports;const GA=({onClose:e,imgSrc:a,heading:r,body:i,contentWidth:c,buttonText:s,buttonURL:u,showNew:h,showMobileAppButtons:f})=>{const g=R0("dark","light");return d(me,{w:"full",borderRadius:"6px",overflow:"hidden","data-cy":"_FeatureBannerModal_Box",children:[a&&n($n,{src:a,alt:"Feature Banner",w:"100%",minW:"100%","data-cy":"_FeatureBannerModal_Image"}),d(V,{gap:"8px",align:"center",p:"24px 24px 40px",minW:{base:"none",md:600},"data-cy":"_FeatureBannerModal_Stack",children:[h&&n(yd,{size:"sm",color:"teal","data-cy":"_FeatureBannerModal_Badge",children:n(S,{textStyle:"UI.12.semi",color:"text.colored.black","data-cy":"_FeatureBannerModal_Text",children:"NEW"})}),n(S,{textAlign:"center",textStyle:"heading.20.semi",m:"0px",w:{base:"auto",md:c||"100%"},"data-cy":"_FeatureBannerModal_Text_5",children:r}),n(S,{textAlign:"center",color:"text.secondary",textStyle:"paragraph.14.reg",w:{base:"auto",md:c||"100%"},mt:"0",mb:`${s&&u||f?"0px":"45px"}`,"data-cy":"_FeatureBannerModal_Text_6",children:i}),f?d(V,{direction:{base:"column",md:"row"},justify:"center",align:"center",mt:"24px",gap:"12px",w:"full","data-cy":"_FeatureBannerModal_Stack",children:[n(Bh.AppStoreButton,{url:"https://www.musicbed.com/ios",theme:g,width:185,"data-cy":"_FeatureBannerModal_AppStoreButton"}),n(Bh.GooglePlayButton,{url:"https://www.musicbed.com/android",theme:g,width:185,"data-cy":"_FeatureBannerModal_GooglePlayButton"})]}):s&&u?n(tn,{mt:"24px",href:u,"data-cy":"_FeatureBannerModal_Link",children:n(ne,{variant:"filled",size:"lg",w:{base:"full",md:"auto"},onClick:e,"data-cy":"_FeatureBannerModal_Button",children:s})}):null]})]})},Dh=["Access the largest curated collection of music & sounds","Copyright clearance through our SyncID⢠system","Monetization on YouTube"],YA=e=>e==="wedding-filmmaker"?{name:"Jaired Sullivan",title:"Wedding Filmmaker",image:"https://cdn.musicbed.com/image/upload/v1759431236/production/free-trial-testimonials/jaired-sullivan-musicbed-avatar.jpg",quote:"âMusic is the driving force behind every decision. It can make or break your film. Musicbed helps me create emotions in my films you canât find anywhere else.â"}:e==="youtube-creator-podcaster"?{name:"Eric Floberg",title:"Photographer + Filmmaker",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/eric-floberg-musicbed-avatar.jpg",quote:"âMusicbed is always leading the charge on the best music for filmmakers. From producing commercials to creating videos for YouTube, making documentaries to narrative shorts, itâs my go-to resource.â"}:e==="freelance-filmmaker"?{name:"Ian Liu",title:"Creative Director",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/ian-liu-musicbed-avatar.jpg",quote:"âWith Musicbed, the ease of navigation, the comprehensive filters, and the curation of music artists all make it the ultimate resource for music.â"}:{name:"Taylor Kavanaugh",title:"Executive Producer",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/taylor-kavanaugh-musicbed-avatar.jpg",quote:"âWeâve tried almost every music library out there, but Musicbed changed the game. For us, quality is everythingâand Musicbed delivers that consistently.â"},KA=({source:e,persona:a,onClose:r})=>{const i=Or({base:!0,lg:!1}),c=Qe("license-builder-modal"),s=e==="account-onboarding"?"Try Musicbed with a 14-Day Free Trial":"Start Your Free Trial and Get Unwatermarked Access",{name:u,title:h,image:f,quote:g}=YA(a),{trialEndsAt:_,subscriptionStartsAt:w}=m.useMemo(()=>{const v=new Date,C=new Date(v.getTime()+14*24*60*60*1e3),T=new Date(C.getTime()+1*24*60*60*1e3);return{trialEndsAt:C.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),subscriptionStartsAt:T.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}},[]),b=()=>{c.show({showSoundsPricing:!0,isFreeTrialFlow:!0,source:e==="account-onboarding"?Bo.ACCOUNT_ONBOARDING:Bo.DOWNLOAD_MODAL,onCheckoutComplete:()=>{r()}})};return i?d(V,{p:"32px 24px 48px",gap:32,maxW:700,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:{base
73:"heading.32.reg",md:"heading.40.reg"},textAlign:"left","data-cy":"_FreeTrialOfferModal_Text",children:s}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_FreeTrialOfferModal_Text",children:"Includes"}),n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:Dh.map((v,C)=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_FreeTrialOfferModal_Flex",children:[n(Um,{fill:"#F6B84E",weight:"fill","data-cy":"_FreeTrialOfferModal_StarFour"}),n(S,{textStyle:"paragraph.14.reg",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text",children:v})]})},C))})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_FreeTrialOfferModal_Text",children:"Try it free"}),d(G,{alignItems:"flex-start",gap:12,"data-cy":"_FreeTrialOfferModal_Flex",children:[d(V,{alignItems:"center",gap:0,justifyContent:"space-between",pt:4,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(Ft,{h:8,w:8,bg:"background.colored.black",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"}),n(me,{h:25,w:1,bg:"background.colored.black","data-cy":"_FreeTrialOfferModal_Box"}),n(me,{h:25,w:1,bg:"background.colored.gray","data-cy":"_FreeTrialOfferModal_Box_13"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"}),n(me,{h:50,w:1,bg:"background.colored.gray","data-cy":"_FreeTrialOfferModal_Box"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"})]}),d(V,{alignItems:"flex-start",gap:24,"data-cy":"_FreeTrialOfferModal_Stack",children:[d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack_18",children:[n(S,{textStyle:"heading.14.semi",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text",children:"Today: Start 14-day free trial"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text_20",children:"Cancel any time during trial."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:"October 1, 2025"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text_23",children:"Weâll send a reminder 1 day before your trial ends."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:"October 2, 2025"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text_26",children:"Your subscription begins!"})]})]})]})]}),n(ne,{size:"xl",variant:"filled",w:"full",mt:"auto",textStyle:"paragraph.16.reg",onClick:b,"data-cy":"_FreeTrialOfferModal_Button",children:"Start your 14-day free trial"})]}):d(pr,{gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},h:{base:"100%",md:700},w:{base:"100%",md:1e3},p:{base:24,md:0},pb:{base:48,md:0},justifyItems:"center",alignItems:"center",mx:"auto",bg:"background.defaultSubtle",borderRadius:8,"data-cy":"_FreeTrialOfferModal_Grid",children:[n(Ye,{p:8,display:"flex",flexDirection:"column",gap:24,h:"100%",w:"100%",justifyContent:"space-between","data-cy":"_FreeTrialOfferModal_GridItem",children:d(V,{gap:16,p:{base:"0px",md:"40px 32px"},h:"100%","data-cy":"_FreeTrialOfferModal_Stack",children:[n(Xe,{name:"musicbedSquare",width:40,height:40,"data-cy":"_FreeTrialOfferModal_Icon"}),n(S,{textStyle:{base:"heading.32.reg",md:"heading.40.reg"},textAlign:"left","data-cy":"_FreeTrialOfferModal_Text",children:s}),n(S,{textAlign:"left",textStyle:"paragraph.14.reg","data-cy":"_FreeTrialOfferModal_Text_33",children:"Trusted by the worlds most in-demand agencies, filmmakers, and creatives, Musicbed is the most curated collection of music and sound effects for advertising, TV, and film."}),d(V,{alignItems:"flex-start",gap:40,mt:"auto","data-cy":"_FreeTrialOfferModal_Stack",children:[d(V,{alignItems:"flex-start",ga
73p:12,"data-cy":"_FreeTrialOfferModal_Stack_35",children:[n(S,{textStyle:"paragraph.14.reg",textAlign:"left","data-cy":"_FreeTrialOfferModal_Text",children:g}),d(G,{alignItems:"center",gap:16,"data-cy":"_FreeTrialOfferModal_Flex",children:[n(G,{h:40,w:40,borderRadius:"full",overflow:"hidden","data-cy":"_FreeTrialOfferModal_Flex_38",children:n("img",{src:f,alt:u,"data-cy":"_FreeTrialOfferModal_img"})}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:u}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_FreeTrialOfferModal_Text_42",children:h})]})]})]}),n(Ft,{h:1,w:"100%",bg:"border.default","data-cy":"_FreeTrialOfferModal_Span"}),n(Ln,{"data-cy":"_FreeTrialOfferModal_TrustPilotWidget"})]})]})}),n(Ye,{display:{base:"none",md:"block"},p:{base:0,md:"40px 40px 40px 24px"},h:"100%",w:"100%",borderRadius:"0 6px 6px 0","data-cy":"_FreeTrialOfferModal_GridItem",children:d(V,{gap:32,w:"100%",h:"100%",alignItems:"flex-start",p:"32px 32px 40px 32px",bg:"background",borderRadius:2,"data-cy":"_FreeTrialOfferModal_Stack",children:[d(V,{"data-cy":"_FreeTrialOfferModal_Stack_47",children:[n(S,{textStyle:"UI.12.reg",p:"4",bg:"background.colored.teal",w:"fit-content",borderRadius:2,"data-cy":"_FreeTrialOfferModal_Text",children:"14-Day Free Trial"}),n(S,{textStyle:"heading.40.reg","data-cy":"_FreeTrialOfferModal_Text_49",children:"Annual Subscription"})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_FreeTrialOfferModal_Text",children:"Includes"}),n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:Dh.map((v,C)=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_FreeTrialOfferModal_Flex",children:[n(Um,{fill:"#F6B84E",weight:"fill","data-cy":"_FreeTrialOfferModal_StarFour"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_FreeTrialOfferModal_Text",children:v})]})},C))})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_FreeTrialOfferModal_Text",children:"Try it free"}),d(G,{alignItems:"flex-start",gap:12,"data-cy":"_FreeTrialOfferModal_Flex",children:[d(V,{alignItems:"center",gap:0,justifyContent:"space-between",pt:4,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(Ft,{h:8,w:8,bg:"background.colored.black",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"}),n(me,{h:25,w:1,bg:"background.colored.black","data-cy":"_FreeTrialOfferModal_Box"}),n(me,{h:25,w:1,bg:"background.colored.gray","data-cy":"_FreeTrialOfferModal_Box_61"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"}),n(me,{h:50,w:1,bg:"background.colored.gray","data-cy":"_FreeTrialOfferModal_Box"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_FreeTrialOfferModal_Span"})]}),d(V,{alignItems:"flex-start",gap:24,"data-cy":"_FreeTrialOfferModal_Stack",children:[d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack_66",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:"Today: Start 14-day free trial"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_FreeTrialOfferModal_Text_68",children:"Cancel any time during trial."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:_}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_FreeTrialOfferModal_Text_71",children:"Weâll send a reminder 1 day before your trial ends."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_FreeTrialOfferModal_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_FreeTrialOfferModal_Text",children:w}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_FreeTrialOfferModal_Text_74",children:"Your subscription begins!"})]})]})]})]}),n(ne,{size:"xl",variant:"filled",w:"full",mt:"auto",textStyle:"paragraph.16.reg",onClick:b,"data-cy":"_FreeTrialOfferModal_Button",children:"Start your 14-day free trial"})]})})]})},QA=()=>{const{data:e,isLoading:a,error:r}=Je({...bt.previewSubscriptionOffer});return{data:e,isLoading:a,error:r}},JA=e=>{const{mutateAsync:a,...r}=mt({mutationFn:()=>Le("orders/subscription-upsell-offer/accept",{method:"POST"}),...e||{}});return{acceptSubscriptionOffer:a,...r}},jh={id:null,props:null,priority:0},XA=J0((e,a)=>({...jh,show:(r,i,c=0)=>{const s=a();(s.id===null||c<=s.priority)&&e({id:r,props:i,priority:c})},hide:r=>{const i=a().id;r&&r!==i||e(jh)}})),e5=()=>{var v;const e=pt(),{user:{data:a}}=ht(),{data:r}=QA(),i=(v=a==null?void 0:a.license_persona)==null?void 0:v.entity,c=Qe("subscription-on-site-modal"),s=Qe("single-song-upsell-modal"),u=XA(C=>C.hide),h=Oa(C=>C.setCouponCode),f=Oa(C=>
73C.setIsSingleSongUpsellOffer),{acceptSubscriptionOffer:g,isPending:_}=JA({onSuccess:({code:C})=>{h(C),f(!0),c.show({user:a,license:{standard_license:(r==null?void 0:r.standard_license)||""},selectedPlanType:"year",source:Bo.SINGLE_SONG_UPSELL,onSubscriptionCheckout:()=>{c.hide(),e.invalidateQueries({queryKey:bt.previewSubscriptionOffer.queryKey,type:"all"}),e.refetchQueries({queryKey:bt.previewSubscriptionOffer.queryKey,type:"all"}),u("single-song-upsell-popover")}})}});return{isPending:_,persona:i,subscriptionOffer:r,handleAcceptOffer:()=>{g()},handleTriggerSingleSongUpsellModal:async()=>{const C=`hasDismissedSingleSongUpsellModal-${a==null?void 0:a.username}`,T=localStorage.getItem(C);!(a!=null&&a.username)||T||!r||s.show({onClose:()=>{localStorage.setItem(C,"true"),s.hide()}})}}},t5=e=>e==="youtube-creator-podcaster"?"Monetize all your content with unlimited music.":e==="wedding-filmmaker"?"License unlimited music for weddings.":"Upgrade to unlimited music this year.",a5=e=>e==="youtube-creator-podcaster"?["Largest curated collection of music for filmmakers","Unlimited music","Unlimited sound effects","SyncID⢠copyright clearance","YouTube monetization"]:e==="wedding-filmmaker"?["Largest curated collection of music for filmmakers","Unlimited songs","Coverage for all wedding clients","SyncID⢠copyright clearance","YouTube monetization"]:["Largest curated collection of music for filmmakers","Unlimited music","Unlimited sound effects","SyncID⢠copyright clearance","Coverage for all clients","YouTube monetization"],r5=e=>e==="wedding-filmmaker"?{name:"Russell Kent Nicholls",title:"Wedding Filmmaker",backgroundImage:"https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/graphic-russell-kent-nicholls.jpg",avatarImage:"https://cdn.musicbed.com/image/upload/v1762457820/production/singleSongUpsellModal/russell-kent-nicholls-avatar.jpg",quote:"The music I choose has to do a lot of heavy lifting when youâre telling real, emotional stories where every beat counts. I wouldnât get my music from anywhere else other than Musicbed."}:e==="youtube-creator-podcaster"?{name:"Jeven Dovey",title:"Adventure Filmmaker & YouTuber",backgroundImage:"https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/graphic-jeven-dovey.jpg",avatarImage:"https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/jeven-dovey-avatar.jpg",quote:"Musicbed is more than just a music library, itâs a source of creative inspiration, it sparks ideas and helps shape the entire emotional arc."}:{name:"Taylor Kavanaugh",title:"Executive Producer, Blue Ox Films",backgroundImage:"https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/graphic-taylor-kavanaugh.jpg",avatarImage:"https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/taylor-kavanaugh-avatar.jpg",quote:"Weâve tried almost every music library out there, but Musicbed changed the game. For us, quality is everythingâand Musicbed delivers that consistently."},sO=(e,a)=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumSignificantDigits:1,...a}).format(e);var n5={name:"1q4vxyr",styles:"margin-left:8px"};const o5=({onClose:e})=>{const a=R0("text.primary","text.primary.inverse"),{persona:r,subscriptionOffer:i,handleAcceptOffer:c,isPending:s}=e5(),{name:u,title:h,backgroundImage:f,avatarImage:g,quote:_}=r5(r),w=()=>{c(),e==null||e()};return d(pr,{gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},h:{base:1015,md:700},w:{base:"100%",md:1e3},justifyItems:"center",alignItems:"center",mx:"auto",borderRadius:8,"data-cy":"_index_Grid",children:[n(Ye,{display:"flex",flexDirection:"column",gap:24,h:"100%",w:"100%",justifyContent:"space-between","data-cy":"_index_GridItem",children:d(V,{gap:24,p:{base:"8px 20px 32px",md:"48px 40px 56px"},h:"100%","data-cy":"_index_Stack",children:[d(V,{as:"header",gap:{base:16,md:12},"data-cy":"_index_Stack_3",children:[n(S,{as:"h1",fontSize:{base:32,md:48},lineHeight:"110%",letterSpacing:"-2.5px",textAlign:"left","data-cy":"_index_Text",children:t5(r)}),d(S,{textAlign:"left",textStyle:"paragraph.14.reg","data-cy":"_index_Text_5",children:["Convert your recent single-use purchase into an annual",n("br",{"data-cy":"_index_br"})," subscription and license unlimited music this year."]})]}),n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:a5(r).map(b=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_index_Flex",children:[n(Go,{"data-cy":"_index_CheckIcon"}),n(S,{as:"h3",textStyle:"paragraph.14.reg","data-cy":"_index_Text",children:b})]})},b))}
73),n(ta.span,{h:"0.5px",w:"full",bg:"border.colored.black",mt:"auto"}),d(Me,{as:"footer",gap:8,w:"full","data-cy":"_index_VStack",children:[d(G,{w:"full",alignItems:"center",justifyContent:"space-between","data-cy":"_index_Flex",children:[n(S,{as:"h4",textStyle:"heading.14.reg","data-cy":"_index_Text",children:"Annual Subscription"}),d(S,{textStyle:"UI.14.reg","data-cy":"_index_Text_13",children:["$",i==null?void 0:i.subscription_total]})]}),d(G,{w:"full",alignItems:"center",justifyContent:"space-between","data-cy":"_index_Flex",children:[n(S,{as:"h4",textStyle:"heading.14.reg","data-cy":"_index_Text",children:"Discount"}),d(S,{textStyle:"UI.14.reg","data-cy":"_index_Text_16",children:["-",(i==null?void 0:i.discount)||0]})]}),d(G,{w:"full",alignItems:"center",justifyContent:"space-between","data-cy":"_index_Flex",children:[n(S,{as:"h4",textStyle:"heading.14.reg","data-cy":"_index_Text",children:"Upgrade for only"}),d(S,{textStyle:"UI.14.semi",color:a,position:"relative","data-cy":"_index_Text_19",children:["$",i==null?void 0:i.subscription_total_after_discount,n(me,{position:"absolute",top:-8,right:-10,w:68,h:30,backgroundImage:"url(https://cdn.musicbed.com/image/upload/production/singleSongUpsellModal/vector-grunge-highlight.png)",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:-1,"data-cy":"_index_Box"})]})]})]}),d(ne,{size:"xl",variant:"filled",w:"full",textStyle:"UI.16.reg",onClick:w,loading:s,"data-cy":"_index_Button",children:["Accept Offer",n(Ja,{css:n5,"data-cy":"_index_ArrowRightIcon"})]})]})}),n(Ye,{display:"flex",alignItems:"flex-end",p:{base:"20px",md:"56px"},h:{base:480,md:"100%"},w:"100%",borderRadius:{base:0,md:"0 6px 6px 0"},backgroundImage:`url(${f})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat","data-cy":"_index_GridItem",children:n(DC,{appearance:"light","data-cy":"_index_Theme",children:d(V,{alignItems:"flex-start",gap:16,"data-cy":"_index_Stack",children:[n(G,{color:"text.primary.inverse","data-cy":"_index_Flex",children:Array.from({length:5}).map((b,v)=>n(y4,{weight:"fill",fill:"currentColor","data-cy":"_index_StarIcon"},v))}),n(S,{textStyle:"paragraph.14.reg",textAlign:"left",color:"text.primary.inverse",w:{md:400},"data-cy":"_index_Text",children:_}),d(G,{alignItems:"center",gap:16,"data-cy":"_index_Flex",children:[n(G,{h:56,w:56,borderRadius:"full",overflow:"hidden","data-cy":"_index_Flex_30",children:n("img",{src:g,alt:u,"data-cy":"_index_img"})}),d(V,{alignItems:"flex-start",gap:4,"data-cy":"_index_Stack",children:[n(S,{textStyle:"UI.16.reg",color:"text.primary.inverse","data-cy":"_index_Text",children:u}),n(S,{textStyle:"UI.14.reg",color:"text.primary.inverse","data-cy":"_index_Text_34",children:h})]})]})]})})})]})},Xd=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le("user/details",{method:i0,data:r})});return{updateUserDetails:e,...a}},i5=()=>{Ct.create({title:"Error updating contact info",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},c5=({onClose:e,onComplete:a})=>{const{updateUserDetails:r,isPending:i}=Xd(),{user:{data:c}}=ht(),{countries:{data:s,isLoading:u}}=hd(),h=m.useMemo(()=>s.map(T=>({label:T.name,value:T.code})),[s]),{control:f,handleSubmit:g,setError:_,watch:w,formState:{errors:b}}=It({defaultValues:{first_name:(c==null?void 0:c.first_name)||"",last_name:(c==null?void 0:c.last_name)||"",address:(c==null?void 0:c.address)||"",city:(c==null?void 0:c.city)||"",region:(c==null?void 0:c.region)||"",postal_code:(c==null?void 0:c.postal_code)||"",country:(c==null?void 0:c.country)||"",phone:(c==null?void 0:c.phone)||""}}),v=m.useCallback(T=>{const I=T.replace(/\D/g,"");if(!I)return"";const O=(w("country")||(c==null?void 0:c.country)||"US").toUpperCase(),D=new BC.AsYouTypeFormatter(O);let A="";for(const E of I)A=D.inputDigit(E);return A.replace(/^\+\s?/,"")},[c==null?void 0:c.country,w]);return d(me,{p:{md:"40px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditContactInfoModal_Box",children:[n(S,{textStyle:"heading.20.semi","data-cy":"_EditContactInfoModal_Text",children:"Contact Info"}),d(V,{as:"form",gap:"24px",mt:"24px",w:"100%",onSubmit:g(T=>{const I=T.country||(c==null?void 0:c.country),{isValid:O,phone:D,error:A}=Q0(T.phone||"",I==null?void 0:I.toLowerCase());if(!O){_("phone",{type:"custom",message:A||"Enter a valid phone number"});return}r({...T,phone:D},{onSuccess:()=>{a(),e()},onError:i5})}),"data-cy":"_EditContactInfoModal_Stack",children:[d(G,{gap:"12px",direction:{base:"column",md:"row"},"data-cy":"_EditContactInfoModal_Flex",children:[n(Ae,{name:"first_name",control:f,rules:{required:"First name is required"},render:({field:T})=>{var I;return n(je,{label:"First Name",inputProps:{...T,size:"md"},errorText:(I=b.first_name)==null?void 0:I.message,rootProps:{flex:1},"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"last_name",control:f,rules:{required:"Last name is required"},render:({field:T})=>{var I;return n(je,{label:"Last Name",inputProps:{...T,size:"md"},errorText:(I=b.last_name)==null?void 0:I.message,rootProps:{flex:1},"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"})]}),n(Ae,{name:"address",control:f,render:({field:T})=>{var I;return n(je,{label:"Address",inputProps:{...T,size:"md"},errorText:(I=b.address)==null?void 0:I.message,"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"city",control:f,render:({field:T})=>{var I;return n(je,{label:"City",inputProps:{...T,size:"md"},errorText:(I=b.city)==null?void 0:I.message,"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"region",control:f,render:({field:T})=>{var I;return n(je,{label:"State/Region",inputProps:{...T,size:"md"},errorText:(I=b.region)==null?void 0:I.message,"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"postal_code",control:f,render:({field:T})=>{var I;return n(je,{label:"Postal Code",inputProps:{...T,size:"md"},errorText:(I=b.postal_code)==null?void 0:I.message,"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"country",control:f,render:({field:T})=>{var O,D;const I=((O=h.find(A=>A.value===T.value))==null?void 0:O.label)??"";return d(ua,{invalid:!!b.country,children:[n(As,{inputProps:{h:"42px"},label:"Country",items:h,emptyText:"No countries found",rootProps:{inputBehavior:"autocomplete",openOnClick:!0,defaultValue:T.value?[T.value]:void 0,defaultInputValue:I,onValueChange:({value:A})=>{T.onChange((A==null?void 0:A[0])??"")},disabled:u},"data-cy":"_EditContactInfoModal_FormCombobox"}),n(Da,{children:(D=b.country)==null?void 0:D.message})]})},"data-cy":"_EditContactInfoModal_Controller"}),n(Ae,{name:"phone",control:f,render:({field:T})=>{var I;return n(je,{label:"Mobile Phone",inputProps:{...T,size:"md",type:"tel",placeholder:"(555) 000-0000",onChange:O=>T.onChange(v(O.target.value))},errorText:(I=b.phone)==null?void 0:I.message,"data-cy":"_EditContactInfoModal_FormInput"})},"data-cy":"_EditContactInfoModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end",pt:"12px","data-cy":"_EditContactInfoModal_Flex",children:[n(ne,{variant:"outline",size:"md",onClick:e,"data-cy":"_EditContactInfoModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"md",loading:i,"data-cy":"_EditContactInfoModal_Button_22",children:"Save"})]})]})]})},zh=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>h4(r)});return{updateProfile:e,...a}},l5="Must be a minimum of 8 characters, contain a capital letter, a lowercase letter, and a numerical digit.",Wh=()=>{Ct.create({title:"Error updating security settings",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},ec=({show:e,onToggle:a})=>n(gd,{"aria-label":e?"Hide password":"Show password",variant:"iconOnly",size:"sm",boxSize:"20px",mr:"6px",onClick:a,"data-cy":"_EditSecuritySettingsModal_IconButton",children:e?n(G8,{size:16,"data-cy":"_EditSecuritySettingsModal_EyeSlash"}):n(Z8,{size:16,"data-cy":"_EditSecuritySettingsModal_Eye"})}),s5=({onClose:e,onComplete:a,currentEmail:r,focusPasswordField:i,externalServiceConnected:c})=>{const{updateProfile:s,isPending:u}=zh(),{updateProfile:h,isPending:f}=zh(),{user:{data:g}}=ht(),_=It({defaultValues:{email:r||(g==null?void 0:g.email)||"",current_password:""}}),w=_.watch("email"),b=w!==r&&w.length>0,v=It({defaultValues:{new_password:"",new_password_confirm:"",current_password:""}}),C=v.watch("new_password"),T=v.watch("new_password_confirm"),I=C.length>0&&T.length>0,[O,D]=m.useState(!1),[A,E]=m.useState(!1),[R,k]=m.useState(!1),[z,Q]=m.useState(!1),N=async Y=>{var oe;try{await s({email:Y.email,current_password:Y.current_password}),a(),e()}catch(Se){const ce=Se,we=(oe=ce==null?void 0:ce.data)==null?void 0:oe.errors;we&&typeof we=="object"?Object.entries(we).forEach(([le,K])=>{const se=le;se in Y&&_.setError(se,{message:K==null?void 0:K[0]})}):Wh()}},W=async Y=>{var oe;try{await h({new_password:Y.new_password,new_password_confirm:Y.new_password_confirm,current_password:Y.current_password}),a(),e()}catch(Se){const ce=Se,we=(oe=ce==null?void 0:ce.data)==null?void 0:oe.errors;we&&typeof we=="object"?Object.entries(we).forEach(([le,K])=>{const se=le;se in Y&&v.setError(se,{message:K==null?void 0:K[0]})}):Wh()}};return d(me,{p:{md:"40px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditSecuritySettingsModal_Box",children:[n(S,{textStyle:"heading.20.semi","data-cy":"_EditSecuritySettingsModal_Text",children:"Security"}),d(V,{as:"form",gap:"24px",mt:"24px",w:"100%",onSubmit:_.handleSubmit(N),"data-cy":"_EditSecuritySettingsModal_Stack",children:[n(Ae,{name:"email",control:_.control,rules:{required:"Email is required"},render:({field:Y})=>{var oe;return n(je,{label:"Primary Email",inputProps:{...Y,size:"md",type:"email",disabled:!!c},helperText:c?`Disconnect your ${c} account to change your email`:void 0,errorText:(oe=_.formState.errors.email)==null?void 0:oe.message,"data-cy":"_EditSecuritySettingsModal_FormInput"})},"data-cy":"_EditSecuritySettingsModal_Controller"}),b&&!c&&d(ve,{children:[n(Ae,{name:"current_password",control:_.control,rules:{required:"Password is required to update email"},render:({field:Y})=>{var oe;return n(je,{label:"Confirm Password",inputProps:{...Y,size:"md",type:R?"text":"password"},inputGroupProps:{endElement:n(ec,{show:R,onToggle:()=>k(Se=>!Se),"data-cy":"_EditSecuritySettingsModal_PasswordToggle"})},errorText:(oe=_.formState.errors.current_password)==null?void 0:oe.message,"data-cy":"_EditSecuritySettingsModal_FormInput"})},"data-cy":"_EditSecuritySettingsModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end","data-cy":"_EditSecuritySettingsModal_Flex",children:[n(ne,{variant:"outline",size:"md",onClick:e,"data-cy":"_EditSecuritySettingsModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"md",loading:u,"data-cy":"_EditSecuritySettingsModal_Button_13",children:"Update Email"})]})]})]}),n(gt,{my:"32px","data-cy":"_EditSecuritySettingsModal_Separator"}),d(V,{as:"form",gap:"24px",w:"100%",onSubmit:v.handleSubmit(W),"data-cy":"_EditSecuritySettingsModal_Stack",children:[d(me,{"data-cy":"_EditSecuritySettingsModal_Box",children:[n(S,{textStyle:"heading.16.reg","data-cy":"_EditSecuritySettingsModal_Text",children:"Edit Password"}),n(S,{textStyle:"paragraph.12.reg",color:"text.secondary",fontStyle:"italic","data-cy":"_EditSecuritySettingsModal_Text_18",children:l5})]}),n(Ae,{name:"new_password",control:v.control,rules:{required:"New password is required",minLength:{value:8,message:"Password must be at least 8 characters"}},render:({field:Y})=>{var oe;return n(je,{label:"New Password",inputProps:{...Y,size:"md",type:O?"text":"password",autoFocus:i},inputGroupProps:{endElement:n(ec,{show:O,onToggle:()=>D(Se=>!Se),"data-cy":"_EditSecuritySettingsModal_PasswordToggle"})},errorText:(oe=v.formState.errors.new_password)==null?void 0:oe.message,"data-cy":"_EditSecuritySettingsModal_FormInput"})},"data-cy":"_EditSecuritySettingsModal_Controller"}),n(Ae,{name:"new_password_confirm",control:v.control,rules:{required:"Please confirm your new password",validate:Y=>Y===v.getValues("new_password")||"Passwords do not match"},render:({field:Y})=>{var oe;return n(je,{label:"Confirm New Password",inputProps:{...Y,size:"md",type:A?"text":"password"},inputGroupProps:{endElement:n(ec,{show:A,onToggle:()=>E(Se=>!Se),"data-cy":"_EditSecuritySettingsModal_PasswordToggle"})},errorText:(oe=v.formState.errors.new_password_confirm)==null?void 0:oe.message,"data-cy":"_EditSecuritySettingsModal_FormInput"})},"data-cy":"_EditSecuritySettingsModal_Controller"}),I&&d(ve,{children:[n(Ae,{name:"current_password",control:v.control,rules:{required:"Current password is required"},render:({field:Y})=>{var oe;return n(je,{label:"Current Password",inputProps:{...Y,size:"md",type:z?"text":"password"},inputGroupProps:{endElement:n(ec,{show:z,onToggle:()=>Q(Se=>!Se),"data-cy":"_EditSecuritySettingsModal_PasswordToggle"})},errorText:(oe=v.formState.errors.current_password)==null?void 0:oe.message,"data-cy":"_EditSecuritySettingsModal_FormInput"})},"data-cy":"_EditSecuritySettingsModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end",pt:"12px","data-cy":"_EditSecuritySettingsModal_Flex",children:[n(ne,{variant:"outline",size:"md",onClick:e,"data-cy":"_EditSecuritySettingsModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"md",loading:f,"data-cy":"_EditSecuritySettingsModal_Button_30",children:"Update Password"})]})]})]})]})},Zr={getCompanyDataFromEmail:"user/enrichment/email",getCompanyDataFromDomain:"user/enrichment/domain",checkEmailDomain:"user/enrichment/email-domain-check",getGiftOfferOptions:"form/select-values/gift_offer",submitGiftOfferForm:"form",getGiftEligibility:"user/gift-eligible",listJobRoles:"job-roles"},Kn={getCompanyDataFromEmail:e=>({queryKey:["getCompanyDataFromEmail",e],queryFn:()=>Le(Zr.getCompanyDataFromEmail,{method:"POST",data:{email:e}})}),getCompanyDataFromDomain:e=>({queryKey:["getCompanyDataFromDomain",e],queryFn:()=>Le(Zr.getCompanyDataFromDomain,{method:"POST",data:{domain:e}})}),checkEmailDomain:e=>({queryKey:["checkEmailDomain",e],queryFn:()=>Le(Zr.checkEmailDomain,{method:"POST",data:{email:e}})}),getGiftOfferOptions:{queryKey:["getGiftOfferOptions"],queryFn:()=>Le(Zr.getGiftOfferOptions,{method:"GET"})},getGiftEligibility:{queryKey:["getGiftEligibility"],queryFn:()=>Le(Zr.getGiftEligibility,{method:"GET"})},listJobRoles:e=>({queryKey:["listJobRoles",e],queryFn:()=>Le(Zr.listJobRoles,{method:"POST",data:{entity:e}})})},Ug=e=>{const{data:a,...r}=Je({...Kn.listJobRoles(e)});return{jobRoles:a,...r}},qg=["image/png","image/jpeg","image/gif"],Hg=1048576,d5=".png,.jpg,.jpeg,.gif",u5={"company-website":"","company-name":"","company-type":"","company-size":void 0,"workspace-name":"","workspace-avatar":null},p5={"first-name":"","last-name":"","profile-avatar":null,role:""},m5={"workspace-name":"","workspace-avatar":null},$g=3,h5={invites:Array.from({length:$g},()=>({email:"",role:""}))},Zs=[{label:"Agency",value:"agency",entityType:"business"},{label:"Production Company",value:"production-company",entityType:"business"},{label:"Brand",value:"brand",entityType:"business"},{label:"Non-Profit",value:"non-profit",entityType:"business"},{label:"Freelance Filmmaker",value:"freelance-filmmaker",entityType:"individual"},{label:"Wedding Filmmaker",value:"wedding-filmmaker",entityType:"individual"},{label:"Youtube Creator / Podcaster",value:"youtube-creator-podcaster",entityType:"individual"},{label:"Music Supervisor",value:"music-supervisor",entityType:"individual"},{label:"Other",value:"other-individual",entityType:"individual"}
73],Zg=[{label:"0 - 100 Employees",value:"0-100"},{label:"101 - 250 Employees",value:"101-250"},{label:"250+ Employees",value:"250+"}],eu=[{label:"Producer",value:"producer",entityType:"business"},{label:"Director",value:"director",entityType:"business"},{label:"Editor",value:"editor",entityType:"business"},{label:"Creative Director",value:"creative-director",entityType:"business"},{label:"Business Affairs",value:"business-affairs",entityType:"business"},{label:"Music Supervisor",value:"music-supervisor",entityType:"business"}],Gg=[{label:"Wedding Filmmaker",value:"wedding-filmmaker",entityType:"individual"},{label:"Youtube Creator / Podcaster",value:"youtube-creator-podcaster",entityType:"individual"}],f5={"first-name":"","last-name":"",company:"",address:"",city:"",state:"","postal-code":"","t-shirt-size":"","mobile-phone":void 0},g5=[{value:"admin",label:"Admin",description:"Can manage settings, invite teammates, purchase, license, and download music"},{value:"purchaser",label:"Purchaser",description:"Can purchase and download music"},{value:"asset_manager",label:"Asset Manager",description:"Can download music"},{value:"guest",label:"Guest",description:"View-only workspace access"}],y5=["youtube-creator-podcaster","wedding-filmmaker","music-supervisor"],Yg=e=>eu.some(a=>a.value===e),_5={"youtube-creator-podcaster":"youtube-creator-podcaster","wedding-filmmaker":"wedding-filmmaker","music-supervisor":"music-supervisor",other:"other-individual"},x5=[...eu,...Gg],b5=({onClose:e,onComplete:a})=>{const{updateUserPersona:r,isPending:i}=ei(),{user:{data:c}}=ht(),s=c==null?void 0:c.license_persona,{jobRoles:u,isFetching:h}=Ug(s==null?void 0:s.entity),{control:f,handleSubmit:g,formState:{errors:_}}=It({defaultValues:{"job-role":(s==null?void 0:s.job_role)||""}});return d(me,{p:{md:"40px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditPersonaInfoModal_Box",children:[n(S,{textStyle:"heading.20.semi","data-cy":"_EditPersonaInfoModal_Text",children:"Personalization"}),d(V,{as:"form",gap:"24px",mt:"24px",w:"100%",onSubmit:g(b=>{r({entity_type:(s==null?void 0:s.entity_type)||null,entity:(s==null?void 0:s.entity)||null,company_size:(s==null?void 0:s.company_
73size)||null,company_name:(s==null?void 0:s.company_name)||null,job_role:b["job-role"]||null},{onSuccess:()=>{a(),e()},onError:()=>{Ct.create({title:"Error updating personalization",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}})}),"data-cy":"_EditPersonaInfoModal_Stack",children:[n(Ae,{name:"job-role",control:f,rules:{required:"Occupation type is required"},render:({field:b})=>{var v;return d(ua,{invalid:!!_["job-role"],children:[n(Ka,{size:"lg",label:"What best describes you?",placeholder:"Select your occupation type",items:u??x5,loading:h,disabled:h,defaultValue:b.value?[b.value]:void 0,onValueChange:({value:C})=>{b.onChange((C==null?void 0:C[0])??"")},"data-cy":"_EditPersonaInfoModal_FormSelect"}),n(Da,{children:(v=_["job-role"])==null?void 0:v.message})]})},"data-cy":"_EditPersonaInfoModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end",pt:"12px","data-cy":"_EditPersonaInfoModal_Flex",children:[n(ne,{variant:"outline",size:"md",onClick:e,"data-cy":"_EditPersonaInfoModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"md",loading:i,"data-cy":"_EditPersonaInfoModal_Button_7",children:"Save"})]})]})]})},S5=({title:e,description:a,onAccept:r,onCancel:i,cancelTitle:c="Cancel",confirmTitle:s,type:u="default",loadingAction:h,hideIcon:f,hideCancel:g,hideConfirm:_})=>{const w=u==="negative",b=s||(w?"Delete":"Confirm"),v=m.useMemo(()=>u==="warning"?n(gf,{size:"16px",weight:"bold","data-cy":"_ConfirmModal_ExclamationMarkIcon"}):u==="negative"?n(xf,{size:"16px",weight:"bold","data-cy":"_ConfirmModal_XIcon"}):n(pf,{size:"16px",weight:"bold","data-cy":"_ConfirmModal_CheckIcon"}),[u]);return d(V,{gap:"24px",w:{base:"100%",md:"420px"},px:"32px",pt:"40px",pb:"32px","data-cy":"_ConfirmModal_Stack",children:[d(V,{gap:"24px",justifyContent:"center",w:"full",textAlign:"center","data-cy":"_ConfirmModal_Stack_4",children:[u!=="default"&&!f&&n(Va,{w:"full","data-cy":"_ConfirmModal_Center",children:n(Va,{backgroundColor:`background.colored.${u}`,outline:"8px solid",outlineColor:`background.subtle.${u}`,borderRadius:"full",w:"32px",h:"32px","data-cy":"_ConfirmModal_Center_6",children:n(Va,{color:"white",fontSize:"18px",fontWeight:600,"data-cy":"_ConfirmModal_Center_7",children:v})})}),d(Me,{gap:"8px","data-cy":"_ConfirmModal_VStack",children:[n(S,{textStyle:"heading.18.semi","data-cy":"_ConfirmModal_Text",children:e}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_ConfirmModal_Text_10",children:a})]})]}),d(Fe,{gap:"12px",width:"full","data-cy":"_ConfirmModal_HStack",children:[!g&&n(ne,{size:"lg",variant:"outline",flex:1,onClick:i,"data-cy":"_ConfirmModal_Button",children:c}),!_&&n(ne,{size:"lg",onClick:r,variant:w?"destructive":"filled",disabled:h,colorPalette:w?"red":"blue",flex:1,"data-cy":"_ConfirmModal_Button_13",children:b})]})]})},Kg=({value:e,onChange:a,errorText:r})=>d(Me,{w:"100%",alignItems:"start",textAlign:"start",gap:"0","data-cy":"_RoleRadioGroup_VStack",children:[n(S,{textStyle:"UI.14.semi",color:"text.primary",mb:"2px","data-cy":"_RoleRadioGroup_Text",children:"Role"}),r&&n(S,{textStyle:"UI.12.reg",color:"text.colored.negative","data-cy":"_RoleRadioGroup_Text_2",children:r}),n(I8,{w:"full",value:e,onValueChange:({value:i})=>a(i),mt:"10px",children:n(Me,{align:"start",gap:"12px","data-cy":"_RoleRadioGroup_VStack",children:aM.map(i=>d(M8,{value:i.value,alignItems:"start",cursor:"pointer",children:[n(E8,{}),n(F8,{mt:"2px"}),d(Me,{align:"start",gap:"0",ml:"12px","data-cy":"_RoleRadioGroup_VStack_4",children:[n(A8,{textStyle:"UI.14.reg",children:i.label}),n(S,{textStyle:"paragraph.12.reg",color:"text.secondary","data-cy":"_RoleRadioGroup_Text",children:i.helperText})]})]},i.value))})})]}),w5=la().shape({email:dt().email("Invalid email address").required("Email is required"),role:dt().required("Role is required")}),v5=hr(w5),Gs="workspace/team/members",qo="workspace/team/search",C5="workspace/team/invites",Nh=e=>`workspace/team/members/${e}`,T5=e=>`workspace/team/invites/${e}`,P5=e=>`workspace/team/invites/${e}`,k5=e=>`workspace/team/members/${e}/transfer`,I5="workspace/team/invites/bulk",Uh="organizations/teams/invites/accepted",Qn={teamSearch:e=>({queryKey:[qo,e==null?void 0:e.page,e==null?void 0:e.limit,e==null?void 0:e.search],queryFn:()=>Le(qo,{params:{...(e==null?void 0:e.page)&&{page:e.page},...(e==null?void 0:e.limit)&&{limit:e.limit},...(e==null?void 0:e.search)&&{query:e.search}},includeMeta:!0})}),fetchAllTeamMembers:e=>({queryKey:[Gs,e==null?void 0:e.page,e==null?void 0:e.limit,e==null?void 0:e.search],queryFn:()=>Le(Gs,{params:{...(e==null?void 0:e.page)&&{page:e.page},...(e==null?void 0:e.limit)&&{limit:e.limit},...(e==null?void 0:e.search)&&{query:e.search}},includeMeta:!0})}),cancelPendingInvite:()=>({mutationFn:e=>Le(P5(e.hash),{method:"DELETE"})}),removeMember:()=>({mutationFn:e=>Le(Nh(e.memberId),{method:"DELETE"})}),sendInvite:()=>({mutationFn:e=>Le(C5,{method:"POST",data:{email:e.email,role:e.role}})}),transferOwnership:()=>({mutationFn:e=>Le(k5(e.memberId),{method:"POST"})}),updateTeamMember:()=>({mutationFn:e=>Le(Nh(e.memberId),{method:"PATCH",data:{role:e.role}})}),updateTeamInvite:()=>({mutationFn:e=>Le(T5(e.inviteId),{method:"PATCH",data:{role:e.role}})}),fetchAcceptedTeamInvites:()=>({queryKey:[Uh],queryFn:()=>
73Le(Uh)})},M5=()=>{const e=pt(),a=Qe("confirm-modal"),{mutateAsync:r,...i}=mt({...Qn.sendInvite(),onSuccess:(c,{email:s})=>{a.show({title:"Invite Sent",description:`We sent an invite to ${s} to join your workspace.`,type:"positive",hideCancel:!0,onAccept:()=>a.hide()}),e.invalidateQueries({queryKey:[qo]})},onError:c=>{a.show({type:"negative",title:"Error sending invite",description:(c==null?void 0:c.getFirstErrorMessage())||"Please try again later or contact support if the issue persists.",onCancel:()=>a.hide(),hideConfirm:!0})}});return{sendInvite:r,...i}},A5=()=>{var h,f;const e=Qe(),{control:a,handleSubmit:r,formState:{errors:i}}=It({defaultValues:{email:"",role:""},resolver:v5}),{sendInvite:c,isPending:s}=M5(),u=r(g=>c({email:g.email,role:g.role}));return d(ta.form,{onSubmit:u,p:"40px 32px 32px",maxW:420,children:[d(Me,{gap:8,w:"full","data-cy":"_AddTeamMemberModal_VStack",children:[n(S,{textStyle:"heading.18.semi",color:"text.primary",textAlign:"center","data-cy":"_AddTeamMemberModal_Text",children:"Invite a team member"}),n(S,{textStyle:"paragraph.14.reg",color:"text.primary",textAlign:"center","data-cy":"_AddTeamMemberModal_Text_2",children:"Choose their role and we'll send an invite."})]}),d(Me,{gap:32,w:"100%",mt:40,"data-cy":"_AddTeamMemberModal_VStack",children:[d(Me,{w:"100%",alignItems:"start",textAlign:"start",gap:6,"data-cy":"_AddTeamMemberModal_VStack_4",children:[n(S,{textStyle:"UI.14.semi",color:"text.primary","data-cy":"_AddTeamMemberModal_Text",children:"Email"}),n(Ae,{name:"email",control:a,render:({field:g})=>{var _;return n(je,{errorText:(_=i.email)==null?void 0:_.message,inputProps:{size:"sm",...g},"data-cy":"_AddTeamMemberModal_FormInput"})},"data-cy":"_AddTeamMemberModal_Controller"})]}),n(Ae,{control:a,name:"role",render:({field:g})=>{var _;return n(Kg,{value:g.value,onChange:g.onChange,errorText:(_=i.role)==null?void 0:_.message,"data-cy":"_AddTeamMemberModal_RoleRadioGroup"})},"data-cy":"_AddTeamMemberModal_Controller"})]}),d(Fe,{gap:16,justify:"flex-end",mt:40,"data-cy":"_AddTeamMemberModal_HStack",children:[n(ne,{variant:"outline",onClick:e.hide,flex:1,h:"40px",disabled:s,"data-cy":"_AddTeamMemberModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_AddTeamMemberModal_Text",children:"Cancel"})}),n(ne,{variant:"filled",onClick:u,flex:1,h:"40px",disabled:!!((h=i.email)!=null&&h.message)||!!((f=i.role)!=null&&f.message)||s,"data-cy":"_AddTeamMemberModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_AddTeamMemberModal_Text",children:"Send invite"})})]})]})},F5=la().shape({role:dt().required("Role is required")}),E5=hr(F5),R5=()=>{const e=pt(),a=Qe("confirm-modal"),{mutateAsync:r,...i}=mt({...Qn.updateTeamMember(),onSuccess:()=>{e.invalidateQueries({queryKey:[qo]}),e.invalidateQueries({queryKey:Et.userAbilities.queryKey}),a.hide()},onError:c=>{a.show({type:"negative",title:"Error updating team member",description:(c==null?void 0:c.getFirstErrorMessage())||"Please try again later or contact support if the issue persists.",onCancel:()=>a.hide(),hideConfirm:!0})}});return{updateTeamMember:r,...i}},O5=({member:e})=>{var f;const a=Qe(),{control:r,handleSubmit:i,formState:{errors:c}}=It({defaultValues:{role:e.role.value},resolver:E5}),{updateTeamMember:s,isPending:u}=R5(),h=i(g=>s({memberId:e.id,role:g.role}));return d(V,{p:"40px 32px 32px",maxW:{base:"100%",md:420},"data-cy":"_EditTeamMemberRoleModal_Stack",children:[n(Me,{gap:8,w:"full","data-cy":"_EditTeamMemberRoleModal_VStack",children:n(S,{textStyle:"heading.18.semi",textAlign:"center","data-cy":"_EditTeamMemberRoleModal_Text",children:"Edit role"})}),d(Me,{gap:24,w:"100%",mt:40,"data-cy":"_EditTeamMemberRoleModal_VStack",children:[d(Fe,{gap:8,alignItems:"center",w:"full",h:"48px","data-cy":"_EditTeamMemberRoleModal_HStack",children:[d(Do,{boxSize:48,borderWidth:"0.5px",borderColor:"border.default",children:[e.profile_url?n(jo,{src:e.profile_url}):null,n(zo,{name:e.full_name||e.email})]}),d(Me,{gap:4,alignItems:"start",flex:1,"data-cy":"_EditTeamMemberRoleModal_VStack",children:[n(S,{textStyle:"UI.16.reg","data-cy":"_EditTeamMemberRoleModal_Text",children:e.full_name||e.email}),n(S,{textStyle:"UI.14.reg",color:"text.secondary","data-cy":"_EditTeamMemberRoleModal_Text_7",children:e.email})]})]}),n(gt,{"data-cy":"_EditTeamMemberRoleModal_Separator"}
73),n(Ae,{control:r,name:"role",render:({field:g})=>{var _;return n(Kg,{value:g.value,onChange:g.onChange,errorText:(_=c.role)==null?void 0:_.message,"data-cy":"_EditTeamMemberRoleModal_RoleRadioGroup"})},"data-cy":"_EditTeamMemberRoleModal_Controller"})]}),d(Fe,{gap:16,justify:"flex-end",mt:40,"data-cy":"_EditTeamMemberRoleModal_HStack",children:[n(ne,{variant:"outline",onClick:a.hide,flex:1,h:"40px",disabled:u,"data-cy":"_EditTeamMemberRoleModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_EditTeamMemberRoleModal_Text",children:"Cancel"})}),n(ne,{variant:"filled",onClick:h,flex:1,h:"40px",disabled:!!((f=c.role)!=null&&f.message)||u,"data-cy":"_EditTeamMemberRoleModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_EditTeamMemberRoleModal_Text",children:"Save"})})]})]})},L5=la().shape({memberIdToTransfer:TC().required("Select a member to transfer ownership to")}),V5=hr(L5),B5=e=>{var w;const{data:a,isLoading:r,error:i,fetchNextPage:c,hasNextPage:s,isFetchingNextPage:u,refetch:h,...f}=KC({queryKey:[Gs,e==null?void 0:e.limit,e==null?void 0:e.search],queryFn:({pageParam:b=1})=>Qn.fetchAllTeamMembers({...e,page:b}).queryFn(),getNextPageParam:b=>{const v=b==null?void 0:b.meta;if(v)return v.current_page<v.last_page?v.current_page+1:void 0},initialPageParam:1}),g=(a==null?void 0:a.pages.flatMap(b=>b.data))||[],_=(w=a==null?void 0:a.pages[a.pages.length-1])==null?void 0:w.meta;return{teamMembers:g,meta:_,isLoading:r,error:i,fetchNextPage:c,hasNextPage:s,isFetchingNextPage:u,refetch:h,...f}};var D5={name:"1kpi2tn",styles:"height:130px"};const j5=({children:e,fetchNextPage:a,isFetchingNextPage:r,meta:i})=>{const c={loading:r,hasNextPage:i&&i.current_page<i.last_page,onLoadMore:()=>i&&a(i.current_page+1)},[s]=O0({loading:c.loading||!1,hasNextPage:(c==null?void 0:c.hasNextPage)||!1,onLoadMore:(c==null?void 0:c.onLoadMore)||null,delayInMs:600}),u=r||c.hasNextPage;return d(ve,{children:[e,u&&n("div",{ref:s,"data-cy":"_InfiniteScroll_div",children:n(he,{alignItems:"center",justifyContent:"center",css:D5,grow:1,"data-cy":"_InfiniteScroll_Flex",children:n(Dt,{"data-cy":"_InfiniteScroll_CircleLoader"})})})]})},z5=()=>{const e=pt(),a=Qe("confirm-modal"),{mutateAsync:r,...i}=mt({...Qn.transferOwnership(),onSuccess:()=>{a.show({title:"Transfer complete",description:"Your role has been changed to Admin.",type:"positive",hideCancel:!0,onAccept:a.hide}),e.invalidateQueries({queryKey:[qo]}),e.invalidateQueries({queryKey:Et.userAbilities.queryKey})},onError:c=>{a.show({type:"negative",title:"Error transferring ownership",description:(c==null?void 0:c.getFirstErrorMessage())||"Please try again later or contact support if the issue persists.",onCancel:()=>a.hide(),hideConfirm:!0})}});return{transferOwnership:r,...i}},W5=3,N5=()=>{const a=SC().getInputProps();return n(je,{...a,inputProps:{...a,size:"sm",variant:"outline",bg:"background.controls.input.outlined",placeholder:"Find a member"},inputGroupProps:{startElement:n(vt,{color:"icon.secondary","data-cy":"_TransferOwnershipModal_Icon",children:n(_f,{size:16,"data-cy":"_TransferOwnershipModal_MagnifyingGlassIcon"})}),startElementProps:{px:"8px"}},"data-cy":"_TransferOwnershipModal_FormInput"})},U5=({defaultMemberToTransfer:e})=>{const a=Qe(),[r,i]=m.useState(""),[c,s]=m.useState(e),[u,h]=m.useState(!1),f=V0(r,500),g=f.length>=W5,{transferOwnership:_,isPending:w}=z5(),{control:b,handleSubmit:v,setError:C,clearErrors:T,formState:{errors:I}}=It({defaultValues:{memberIdToTransfer:e==null?void 0:e.id},resolver:V5}),{teamMembers:O,meta:D,isLoading:A,fetchNextPage:E,isFetchingNextPage:R}=B5({search:g?f:void 0,limit:10}),k=m.useMemo(()=>vd({items:O.map(N=>({value:N.id.toString(),label:N.full_name||N.email,member:N}))}),[O]),z=v(N=>{if((c==null?void 0:c.role.value)==="owner"){C("memberIdToTransfer",{message:"Selected member is already the team owner"});return}_({memberId:N.memberIdToTransfer})}),Q=N=>{h(N.open),N.open||i("")};return d(V,{p:"40px 32px 32px",maxW:{base:"100%",md:420},"data-cy":"_TransferOwnershipModal_Stack",children:[d(Me,{gap:8,w:"full","data-cy":"_TransferOwnershipModal_VStack",children:[n(S,{textStyle:"heading.18.semi",textAlign:"center","data-cy":"_TransferOwnershipModal_Text",children:"Transfer workspace ownership"}),n(S,{textStyle:"paragraph.14.reg",textAlign:"center","data-cy":"_TransferOwnershipModal_Text_6",children:"Select the new workspace owner. They will receive an email to confirm the transfer."})]}),n(Me,{gap:32,w:"100%",mt:40,"data-cy":"_TransferOwnershipModal_VStack",children:d(Me,{w:"100%",alignItems:"start",ga
73p:6,"data-cy":"_TransferOwnershipModal_VStack_8",children:[n(S,{textStyle:"UI.14.semi","data-cy":"_TransferOwnershipModal_Text",children:"Workspace owner"}),n(Ae,{control:b,name:"memberIdToTransfer",render:({field:N})=>d(fC,{collection:k,openOnClick:!0,value:N.value?[N.value.toString()]:[],inputValue:u?r:"",onOpenChange:Q,onInputValueChange:W=>{W.reason==="input-change"&&i(W.inputValue)},onValueChange:W=>{if(W.value&&W.value.length>0){T();const Y=W.value[0],oe=O.find(Se=>Se.id.toString()===Y);s(oe),N.onChange(Number(Y))}},positioning:{placement:"bottom-start",gutter:1},closeOnSelect:!0,children:[d(gC,{position:"relative",display:"flex",alignItems:"center",justifyContent:"start",w:"100%",bg:"background.controls.input.shaded",borderColor:"border.default",borderWidth:"1px",rounded:"4px",p:12,h:52,borderBottomRadius:u?"0px":"4px",children:[u&&n(N5,{"data-cy":"_TransferOwnershipModal_ComboboxInputWithIcon"}),!u&&n(yC,{h:"52px",children:d(me,{h:"52px",w:"full","data-cy":"_TransferOwnershipModal_Box",children:[n(jC,{"data-cy":"_TransferOwnershipModal_AnimatePresence",children:c&&!u&&n(zC.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2,ease:[.25,.1,.25,1]},style:{position:"absolute",left:"4px",top:0,bottom:0,height:"52px",width:"100%",willChange:"opacity, transform"},children:d(Fe,{h:"52px",w:"full",gap:8,alignItems:"center",pl:"4px",pr:"8px","data-cy":"_TransferOwnershipModal_HStack",children:[d(Do,{boxSize:40,borderWidth:"0.5px",borderColor:"border.default",outline:"none",children:[c.profile_url?n(jo,{src:c.profile_url}):null,n(zo,{name:c.full_name||c.email})]}),d(Me,{gap:4,alignItems:"start",flex:1,justifyContent:"center",h:"full","data-cy":"_TransferOwnershipModal_VStack",children:[n(S,{textStyle:"UI.14.semi",lineHeight:"1.1","data-cy":"_TransferOwnershipModal_Text",children:c.full_name||c.email}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",lineHeight:"1.1","data-cy":"_TransferOwnershipModal_Text_17",children:c.email})]})]})},"avatar-section")}),n(me,{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",h:"52px","data-cy":"_TransferOwnershipModal_Box",children:n(vt,{color:"icon.secondary","data-cy":"_TransferOwnershipModal_Icon",children:n(uf,{size:16,"data-cy":"_TransferOwnershipModal_CaretDownIcon"})})})]})})]}),n(_C,{children:n(xC,{bg:"bg.default",borderWidth:"0px",rounded:"4px",p:"8px",gap:2,maxHeight:320,scrollbarWidth:"thin",borderTopRadius:u?"0px":"4px",children:n(j5,{fetchNextPage:()=>E(),isFetchingNextPage:R,meta:D,"data-cy":"_TransferOwnershipModal_InfiniteScroll",children:A&&O.length===0?n(me,{p:16,textAlign:"center","data-cy":"_TransferOwnershipModal_Box",children:n(S,{textStyle:"UI.14.reg",color:"text.secondary","data-cy":"_TransferOwnershipModal_Text",children:"Loading..."})}):O.length===0?n(me,{p:16,textAlign:"center","data-cy":"_TransferOwnershipModal_Box",children:n(S,{textStyle:"UI.14.reg",color:"text.secondary","data-cy":"_TransferOwnershipModal_Text",children:"No members found"})}):O.map(W=>{const Y=(c==null?void 0:c.id)===W.id;return n(bC,{item:{value:W.id.toString(),label:W.full_name||W.email,member:W},rounded:"6px",px:"4px",py:"4px",bg:Y?"background.muted.teal":"transparent",_hover:{bg:Y?"background.muted.teal":"background.controls.states.hover"},children:d(Fe,{gap:8,alignItems:"center",w:"full","data-cy":"_TransferOwnershipModal_HStack",children:[d(Do,{boxSize:40,borderWidth:"0.5px",borderColor:"border.default",outline:"none",children:[W.profile_url?n(jo,{src:W.profile_url}):null,n(zo,{name:W.full_name||W.email})]}),d(Me,{gap:4,alignItems:"start",flex:1,"data-cy":"_TransferOwnershipModal_VStack",children:[n(S,{textStyle:"UI.14.semi","data-cy":"_TransferOwnershipModal_Text",children:W.full_name||W.email}),n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_TransferOwnershipModal_Text_29",children:W.email})]}),n(me,{transition:"opacity 0.2s ease-in-out","data-cy":"_TransferOwnershipModal_Box",children:n(gd,{variant:"textOnly",boxSize:40,isRounded:!0,color:Y?"background.colored.teal":"icon.tertiary","data-cy":"_TransferOwnershipModal_IconButton",children:n(hf,{size:24,weight:Y?"fill":"regular","data-cy":"_TransferOwnershipModal_CheckCircleIcon"})})})]})},W.id)})})})})]}),"data-cy":"_TransferOwnershipModal_Controller"})]})}),I.memberIdToTransfer&&n(S,{textStyle:"UI.12.reg",color:"text.colored.negative",textAlign:"left","data-cy":"_TransferOwnershipModal_Text",children:I.memberIdToTransfer.message}),d(Fe,{gap:16,justify:"flex-end",mt:40,"data-cy":"_TransferOwnershipModal_HStack",children:[n(ne,{variant:"outline",onClick:a.hide,flex:1,h:"40px","data-cy":"_TransferOwnershipModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_TransferOwnershipModal_Text",children:"Cancel"})}),n(ne,{variant:"filled",onClick:z,flex:1,h:"40px",disabled:!(c!=null&&c.id)||w,"data-cy":"_TransferOwnershipModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_TransferOwnershipModal_Text",children:"Transfer"})})]})]})};
vendor: 9,695 bytes, line 73
73var Ys=function(e,a){return Ys=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},Ys(e,a)};function tu(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ys(e,a);function r(){this.constructor=e}e.prototype=a===null?Object.create(a):(r.prototype=a.prototype,new r)}var St=function(){return St=Object.assign||function(a){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=r[s])}return a},St.apply(this,arguments)};function Qg(e,a){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(e);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(r[i[c]]=e[i[c]]);return r}function Jg(e,a,r,i){var c=arguments.length,s=c<3?a:i===null?i=Object.getOwnPropertyDescriptor(a,r):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,a,r,i);else for(var h=e.length-1;h>=0;h--)(u=e[h])&&(s=(c<3?u(s):c>3?u(a,r,s):u(a,r))||s);return c>3&&s&&Object.defineProperty(a,r,s),s}function Xg(e,a){return function(r,i){a(r,i,e)}}function ey(e,a,r,i,c,s){function u(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}for(var h=i.kind,f=h==="getter"?"get":h==="setter"?"set":"value",g=!a&&e?i.static?e:e.prototype:null,_=a||(g?Object.getOwnPropertyDescriptor(g,i.name):{}),w,b=!1,v=r.length-1;v>=0;v--){var C={};for(var T in i)C[T]=T==="access"?{}:i[T];for(var T in i.access)C.access[T]=i.access[T];C.addInitializer=function(O){if(b)throw new TypeError("Cannot add initializers after decoration has completed");s.push(u(O||null))};var I=(0,r[v])(h==="accessor"?{get:_.get,set:_.set}:_[f],C);if(h==="accessor"){if(I===void 0)continue;if(I===null||typeof I!="object")throw new TypeError("Object expected");(w=u(I.get))&&(_.get=w),(w=u(I.set))&&(_.set=w),(w=u(I.init))&&c.unshift(w)}else(w=u(I))&&(h==="field"?c.unshift(w):_[f]=w)}g&&Object.defineProperty(g,i.name,_),b=!0}function ty(e,a,r){for(var i=arguments.length>2,c=0;c<a.length;c++)r=i?a[c].call(e,r):a[c].call(e);return i?r:void 0}function ay(e){return typeof e=="symbol"?e:"".concat(e)}function ry(e,a,r){return typeof a=="symbol"&&(a=a.description?"[".concat(a.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",a):a})}function ny(e,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,a)}function oy(e,a,r,i){function c(s){return s instanceof r?s:new r(function(u){u(s)})}return new(r||(r=Promise))(function(s,u){function h(_){try{g(i.next(_))}catch(w){u(w)}}function f(_){try{g(i.throw(_))}catch(w){u(w)}}function g(_){_.done?s(_.value):c(_.value).then(h,f)}g((i=i.apply(e,a||[])).next())})}function iy(e,a){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,c,s,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=h(0),u.throw=h(1),u.return=h(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function h(g){return function(_){return f([g,_])}}function f(g){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,g[0]&&(r=0)),r;)try{if(i=1,c&&(s=g[0]&2?c.return:g[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,g[1])).done)return s;switch(c=0,s&&(g=[g[0]&2,s.value]),g[0]){case 0:case 1:s=g;break;case 4:return r.label++,{value:g[1],done:!1};case 5:r.label++,c=g[1],g=[0];continue;case 7:g=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(g[0]===6||g[0]===2)){r=0;continue}if(g[0]===3&&(!s||g[1]>s[0]&&g[1]<s[3])){r.label=g[1];break}if(g[0]===6&&r.label<s[1]){r.label=s[1],s=g;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(g);break}s[2]&&r.ops.pop(),r.trys.pop();continue}g=a.call(e,r)}catch(_){g=[6,_],c=0}finally{i=s=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}}var $c=Object.create?function(e,a,r,i){i===void 0&&(i=r);var c=Object.getOwnPropertyDescriptor(a,r);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,i,c)}:function(e,a,r,i){i===void 0&&(i=r),e[i]=a[r]};function cy(e,a){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&$c(a,e,r)}function Tc(e){var a=typeof Symbol=="function"&&Symbol.iterator,r=a&&e[a],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function au(e,a){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),c,s=[],u;try{for(;(a===void 0||a-- >0)&&!(c=i.next()).done;)s.push(c.value)}catch(h){u={error:h}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(u)throw u.error}}return s}function ly(){for(var e=[],a=0;a<arguments.length;a++)e=e.concat(au(arguments[a]));return e}function sy(){for(var e=0,a=0,r=arguments.length;a<r;a++)e+=arguments[a].length;for(var i=Array(e),c=0,a=0;a<r;a++)for(var s=arguments[a],u=0,h=s.length;u<h;u++,c++)i[c]=s[u];return i}function dy(e,a,r){if(r||arguments.length===2)for(var i=0,c=a.length,s;i<c;i++)(s||!(i in a))&&(s||(s=Array.prototype.slice.call(a,0,i)),s[i]=a[i]);return e.concat(s||Array.prototype.slice.call(a))}function Nn(e){return this instanceof Nn?(this.v=e,this):new Nn(e)}function uy(e,a,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,a||[]),c,s=[];return c=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),h("next"),h("throw"),h("return",u),c[Symbol.asyncIterator]=function(){return this},c;function u(v){return function(C){return Promise.resolve(C).then(v,w)}}function h(v,C){i[v]&&(c[v]=function(T){return new Promise(function(I,O){s.push([v,T,I,O])>1||f(v,T)})},C&&(c[v]=C(c[v])))}function f(v,C){try{g(i[v](C))}catch(T){b(s[0][3],T)}}function g(v){v.value instanceof Nn?Promise.resolve(v.value.v).then(_,w):b(s[0][2],v)}function _(v){f("next",v)}function w(v){f("throw",v)}function b(v,C){v(C),s.shift(),s.length&&f(s[0][0],s[0][1])}}function py(e){var a,r;return a={},i("next"),i("throw",function(c){throw c}),i("return"),a[Symbol.iterator]=function(){return this},a;function i(c,s){a[c]=e[c]?function(u){return(r=!r)?{value:Nn(e[c](u)),done:!1}:s?s(u):u}:s}}function my(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof Tc=="function"?Tc(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=e[s]&&function(u){return new Promise(function(h,f){u=e[s](u),c(h,f,u.done,u.value)})}}function c(s,u,h,f){Promise.resolve(f).then(function(g){s({value:g,done:h})},u)}}function hy(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}var q5=Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a},Ks=function(e){return Ks=Object.getOwnPropertyNames||function(a){var r=[];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[r.length]=i);return r},Ks(e)};function fy(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r=Ks(e),i=0;i<r.length;i++)r[i]!=="default"&&$c(a,e,r[i]);return q5(a,e),a}function gy(e){return e&&e.__esModule?e:{default:e}}function yy(e,a,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?e!==a||!i:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:a.get(e)}function _y(e,a,r,i,c){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!c)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?e!==a||!c:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?c.call(e,r):c?c.value=r:a.set(e,r),r}function xy(e,a){if(a===null||typeof a!="object"&&typeof a!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?a===e:e.has(a)}function by(e,a,r){if(a!=null){if(typeof a!="object"&&typeof a!="function")throw new TypeError("Object expected.");var i,c;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=a[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=a[Symbol.dispose],r&&(c=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");c&&(i=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:a,dispose:i,async:r})}else r&&e.stack.push({async:!0});return a}var H5=typeof SuppressedError=="function"?SuppressedError:function(e,a,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=a,i};function Sy(e){function a(s){e.error=e.hasError?new H5(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var r,i=0;function c(){for(;r=e.stack.pop();)try{if(!r.async&&i===1)return i=0,e.stack.push(r),Promise.resolve().then(c);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(s).then(c,function(u){return a(u),c()})}else i|=1}catch(u){a(u)}
73if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return c()}function wy(e,a){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,i,c,s,u){return i?a?".jsx":".js":c&&(!s||!u)?r:c+s+"."+u.toLowerCase()+"js"}):e}const $5={__extends:tu,__assign:St,__rest:Qg,__decorate:Jg,__param:Xg,__esDecorate:ey,__runInitializers:ty,__propKey:ay,__setFunctionName:ry,__metadata:ny,__awaiter:oy,__generator:iy,__createBinding:$c,__exportStar:cy,__values:Tc,__read:au,__spread:ly,__spreadArrays:sy,__spreadArray:dy,__await:Nn,__asyncGenerator:uy,__asyncDelegator:py,__asyncValues:my,__makeTemplateObject:hy,__importStar:fy,__importDefault:gy,__classPrivateFieldGet:yy,__classPrivateFieldSet:_y,__classPrivateFieldIn:xy,__addDisposableResource:by,__disposeResources:Sy,__rewriteRelativeImportExtension:wy},dO=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:by,get __assign(){return St},__asyncDelegator:py,__asyncGenerator:uy,__asyncValues:my,__await:Nn,__awaiter:oy,__classPrivateFieldGet:yy,__classPrivateFieldIn:xy,__classPrivateFieldSet:_y,__createBinding:$c,__decorate:Jg,__disposeResources:Sy,__esDecorate:ey,__exportStar:cy,__extends:tu,__generator:iy,__importDefault:gy,__importStar:fy,__makeTemplateOb
73ject:hy,__metadata:ny,__param:Xg,__propKey:ay,__read:au,__rest:Qg,__rewriteRelativeImportExtension:wy,__runInitializers:ty,__setFunctionName:ry,__spread:ly,__spreadArray:dy,__spreadArrays:sy,__values:Tc,default:$5},Symbol.toStringTag,{value:"Module"}));var qh=!1,Yr,Qs,Js,pc,mc,vy,hc,Xs,ed,td,Cy,ad,rd,Ty,Py;function Xt(){if(!qh){qh=!0;var e=navigator.userAgent,a=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),r=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(ad=/\b(iPhone|iP[ao]d)/.exec(e),rd=/\b(iP[ao]d)/.exec(e),td=/Android/i.exec(e),Ty=/FBAN\/\w+;/i.exec(e),Py=/Mobile/i.exec(e),Cy=!!/Win64/.exec(e),a){Yr=a[1]?parseFloat(a[1]):a[5]?parseFloat(a[5]):NaN,Yr&&document&&document.documentMode&&(Yr=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(e);vy=i?parseFloat(i[1])+4:Yr,Qs=a[2]?parseFloat(a[2]):NaN,Js=a[3]?parseFloat(a[3]):NaN,pc=a[4]?parseFloat(a[4]):NaN,pc?(a=/(?:Chrome\/(\d+\.\d+))/.exec(e),mc=a&&a[1]?parseFloat(a[1]):NaN):mc=NaN}else Yr=Qs=Js=mc=pc=NaN;if(r){if(r[1]){var c=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);hc=c?parseFloat(c[1].replace("_",".")):!0}else hc=!1;Xs=!!r[2],ed=!!r[3]}else hc=Xs=ed=!1}}var nd={ie:function(){return Xt()||Yr},ieCompatibilityMode:function(){return Xt()||vy>Yr},ie64:function(){return nd.ie()&&Cy},firefox:function(){return Xt()||Qs},opera:function(){return Xt()||Js},webkit:function(){return Xt()||pc},safari:function(){return nd.webkit()},chrome:function(){return Xt()||mc},windows:function(){return Xt()||Xs},osx:function(){return Xt()||hc},linux:function(){return Xt()||ed},iphone:function(){return Xt()||ad},mobile:function(){return Xt()||ad||rd||td||Py},nativeApp:function(){return Xt()||Ty},android:function(){return Xt()||td},ipad:function(){return Xt()||rd}},Z5=nd,G5=!!(typeof window<"u"&&window.document&&window.document.createElement),Y5={canUseDOM:G5},K5=Y5,ky=K5,Iy;ky.canUseDOM&&(Iy=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/** 74 * Checks if an event is supported in the current execution environment. 75 * 76 * NOTE: This will not work correctly for non-generic events such as `change`, 77 * `reset`, `load`, `error`, and `select`. 78 * 79 * Borrows from Modernizr. 80 * 81 * @param {string} eventNameSuffix Event name, e.g. "click". 82 * @param {?boolean} capture Check if the capture phase is supported. 83 * @return {boolean} True if the event is supported. 84 * @internal 85 * @license Modernizr 3.0.0pre (Custom Build) | MIT 86 */function Q5(e,a){if(!ky.canUseDOM||a&&!("addEventListener"in document))return!1;var r="on"+e,i=r in document;if(!i){var c=document.createElement("div");c.setAttribute(r,"return;"),i=typeof c[r]=="function"}return!i&&Iy&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var J5=Q5,X5=Z5,eF=J5,Hh=10,$h=40,Zh=800;function My(e){var a=0,r=0,i=0,c=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=r,r=0),i=a*Hh,c=r*Hh,"deltaY"in e&&(c=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||c)&&e.deltaMode&&(e.deltaMode==1?(i*=$h,c*=$h):(i*=Zh,c*=Zh)),i&&!a&&(a=i<1?-1:1),c&&!r&&(r=c<1?-1:1),{spinX:a,spinY:r,pixelX:i,pixelY:c}}My.getEventType=function(){return X5.firefox()?"DOMMouseScroll":eF("wheel")?"wheel":"mousewheel"};var tF=My,aF=tF;const rF=fd(aF);function nF(e,a,r,i,c,s){s===void 0&&(s=0);var u=Un(e,a,s),h=u.width,f=u.height,g=Math.min(h,r),_=Math.min(f,i);return g>_*c?{width:_*c,height:_}:{width:g,height:g/c}}function oF(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function Io(e,a,r,i,c){c===void 0&&(c=0);var s=Un(a.width,a.height,c),u=s.width,h=s.height;return{x:Gh(e.x,u,r.width,i),y:Gh(e.y,h,r.height,i)}}function Gh(e,a,r,i){var c=a*i/2-r/2;return Zc(e,-c,c)}function Yh(e,a){return Math.sqrt(Math.pow(e.y-a.y,2)+Math.pow(e.x-a.x,2))}function Kh(e,a){return Math.atan2(a.y-e.y,a.x-e.x)*180/Math.PI}function iF(e,a,r,i,c,s,u){s===void 0&&(s=0),u===void 0&&(u=!0);
86var h=u?cF:lF,f=Un(a.width,a.height,s),g=Un(a.naturalWidth,a.naturalHeight,s),_={x:h(100,((f.width-r.width/c)/2-e.x/c)/f.width*100),y:h(100,((f.height-r.height/c)/2-e.y/c)/f.height*100),width:h(100,r.width/f.width*100/c),height:h(100,r.height/f.height*100/c)},w=Math.round(h(g.width,_.width*g.width/100)),b=Math.round(h(g.height,_.height*g.height/100)),v=g.width>=g.height*i,C=v?{width:Math.round(b*i),height:b}:{width:w,height:Math.round(w/i)},T=St(St({},C),{x:Math.round(h(g.width-C.width,_.x*g.width/100)),y:Math.round(h(g.height-C.height,_.y*g.height/100))});return{croppedAreaPercentages:_,croppedAreaPixels:T}}function cF(e,a){return Math.min(e,Math.max(0,a))}function lF(e,a){return a}function sF(e,a,r,i,c,s){var u=Un(a.width,a.height,r),h=Zc(i.width/u.width*(100/e.width),c,s),f={x:h*u.width/2-i.width/2-u.width*h*(e.x/100),y:h*u.height/2-i.height/2-u.height*h*(e.y/100)};return{crop:f,zoom:h}}function dF(e,a,r){var i=oF(a);return r.height>r.width?r.height/(e.height*i):r.width/(e.width*i)}function uF(e,a,r,i,c,s){r===void 0&&(r=0);var u=Un(a.naturalWidth,a.naturalHeight,r),h=Zc(dF(e,a,i),c,s),f=i.height>i.width?i.height/e.height:i.width/e.width,g={x:((u.width-e.width)/2-e.x)*f,y:((u.height-e.height)/2-e.y)*f};return{crop:g,zoom:h}}function Qh(e,a){return{x:(a.x+e.x)/2,y:(a.y+e.y)/2}}function pF(e){return e*Math.PI/180}function Un(e,a,r){var i=pF(r);return{width:Math.abs(Math.cos(i)*e)+Math.abs(Math.sin(i)*a),height:Math.abs(Math.sin(i)*e)+Math.abs(Math.cos(i)*a)}}function Zc(e,a,r){return Math.min(Math.max(e,a),r)}function tc(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter(function(r){return typeof r=="string"&&r.length>0}).join(" ").trim()}var mF=`.reactEasyCrop_Container { 87 position: absolute; 88 top: 0; 89 left: 0; 90 right: 0; 91 bottom: 0; 92 overflow: hidden; 93 user-select: none; 94 touch-action: none; 95 cursor: move; 96 display: flex; 97 justify-content: center; 98 align-items: center; 99} 100 101.reactEasyCrop_Image, 102.reactEasyCrop_Video { 103 will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ 104} 105 106.reactEasyCrop_Contain { 107 max-width: 100%; 108 max-height: 100%; 109 margin: auto; 110 position: absolute; 111 top: 0; 112 bottom: 0; 113 left: 0; 114 right: 0; 115} 116.reactEasyCrop_Cover_Horizontal { 117 width: 100%; 118 height: auto; 119} 120.reactEasyCrop_Cover_Vertical { 121 width: auto; 122 height: 100%; 123} 124 125.reactEasyCrop_CropArea { 126 position: absolute; 127 left: 50%; 128 top: 50%; 129 transform: translate(-50%, -50%); 130 border: 1px solid rgba(255, 255, 255, 0.5); 131 box-sizing: border-box; 132 box-shadow: 0 0 0 9999em; 133 color: rgba(0, 0, 0, 0.5); 134 overflow: hidden; 135} 136 137.reactEasyCrop_CropAreaRound { 138 border-radius: 50%; 139} 140 141.reactEasyCrop_CropAreaGrid::before { 142 content: ' '; 143 box-sizing: border-box; 144 position: absolute; 145 border: 1px solid rgba(255, 255, 255, 0.5); 146 top: 0; 147 bottom: 0; 148 left: 33.33%; 149 right: 33.33%; 150 border-top: 0; 151 border-bottom: 0; 152} 153 154.reactEasyCrop_CropAreaGrid::after { 155 content: ' '; 156 box-sizing: border-box; 157 position: absolute; 158 border: 1px solid rgba(255, 255, 255, 0.5); 159 top: 33.33%; 160 bottom: 33.33%; 161 left: 0; 162 right: 0; 163 border-left: 0; 164 border-right: 0; 165} 166`,hF=1,fF=3,gF=1,yF=function(e){tu(a,e);function a(){var r=e!==null&&e.apply(this,arguments)||this;return r.cropperRef=m.createRef(),r.imageRef=m.createRef(),r.videoRef=m.createRef(),r.containerPosition={x:0,y:0},r.containerRef=null,r.styleRef=null,r.containerRect=null,r.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},r.dragStartPosition={x:0,y:0},r.dragStartCrop={x:0,y:0},r.gestureZoomStart=0,r.gestureRotationStart=0,r.isTouching=!1,r.lastPinchDistance=0,r.lastPinchRotation=0,r.rafDragTimeout=null,r.rafPinchTimeout=null,r.wheelTimer=null,r.currentDoc=typeof document<"u"?document:null,r.currentWindow=typeof window<"u"?window:null,r.resizeObserver=null,r.previousCropSize=null,r.isInitialized=!1,r.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},r.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!r.containerRef)){var i=!0;r.resizeObserver=new window.ResizeObserver(function(c){if(i){i=!1;return}r.computeSizes()}),r.resizeObserver.observe(r.containerRef)}},r.preventZoomSafari=function(i){return i.preventDefault()},r.cleanEvents=function(){r.currentDoc&&(r.currentDoc.removeEventListener("mousemove",r.onMouseMove),r.currentDoc.removeEventListener("mouseup",r.onDragStopped),r.currentDoc.removeEventListener("touchmove",r.onTouchMove),r.currentDoc.removeEventListener("touchend",r.onDragStopped),r.currentDoc.removeEventListener("gesturechange",r.onGestureChange),r.currentDoc.removeEventListener("gestureend",r.onGestureEnd),r.currentDoc.removeEventListener("scroll",r.onScroll))},r.clearScrollEvent=function(){r.containerRef&&r.containerRef.removeEventListener("wheel",r.onWheel),r.wheelTimer&&clearTimeout(r.wheelTimer)},r.onMediaLoad=function(){var i=r.computeSizes();i&&(r.previousCropSize=i,r.emitCropData(),r.setInitialCrop(i),r.isInitialized=!0),r.props.onMediaLoaded&&r.props.onMediaLoaded(r.mediaSize)},r.setInitialCrop=function(i){if(r.props.initialCroppedAreaPercentages){var c=sF(r.props.initialCroppedAreaPercentages,r.mediaSize,r.props.rotation,i,r.props.minZoom,r.props.maxZoom),s=c.crop,u=c.zoom;r.props.onCropChange(s),r.props.onZoomChange&&r.props.onZoomChange(u)}else if(r.props.initialCroppedAreaPixels){var h=uF(r.props.initialCroppedAreaPixels,r.mediaSize,r.props.rotation,i,r.props.minZoom,r.props.maxZoom),s=h.crop,u=h.zoom;r.props.onCropChange(s),r.props.onZoomChange&&r.props.onZoomChange(u)}},r.computeSizes=function(){var i,c,s,u,h,f,g=r.imageRef.current||r.videoRef.current;if(g&&r.containerRef){r.containerRect=r.containerRef.getBoundingClientRect(),r.saveContainerPosition();var _=r.containerRect.width/r.containerRect.height,w=((i=r.imageRef.current)===null||i===void 0?void 0:i.naturalWi
166dth)||((c=r.videoRef.current)===null||c===void 0?void 0:c.videoWidth)||0,b=((s=r.imageRef.current)===null||s===void 0?void 0:s.naturalHeight)||((u=r.videoRef.current)===null||u===void 0?void 0:u.videoHeight)||0,v=g.offsetWidth<w||g.offsetHeight<b,C=w/b,T=void 0;if(v)switch(r.state.mediaObjectFit){default:case"contain":T=_>C?{width:r.containerRect.height*C,height:r.containerRect.height}:{width:r.containerRect.width,height:r.containerRect.width/C};break;case"horizontal-cover":T={width:r.containerRect.width,height:r.containerRect.width/C};break;case"vertical-cover":T={width:r.containerRect.height*C,height:r.containerRect.height};break}else T={width:g.offsetWidth,height:g.offsetHeight};r.mediaSize=St(St({},T),{naturalWidth:w,naturalHeight:b}),r.props.setMediaSize&&r.props.setMediaSize(r.mediaSize);var I=r.props.cropSize?r.props.cropSize:nF(r.mediaSize.width,r.mediaSize.height,r.containerRect.width,r.containerRect.height,r.props.aspect,r.props.rotation);return(((h=r.state.cropSize)===null||h===void 0?void 0:h.height)!==I.height||((f=r.state.cropSize)===null||f===void 0?void 0:f.width)!==I.width)&&r.props.onCropSizeChange&&r.props.onCropSizeChange(I),r.setState({cropSize:I},r.recomputeCropPosition),r.props.setCropSize&&r.props.setCropSize(I),I}},r.saveContainerPosition=function(){if(r.containerRef){var i=r.containerRef.getBoundingClientRect();r.containerPosition={x:i.left,y:i.top}}},r.onMouseDown=function(i){r.currentDoc&&(i.preventDefault(),r.currentDoc.addEventListener("mousemove",r.onMouseMove),r.currentDoc.addEventListener("mouseup",r.onDragStopped),r.saveContainerPosition(),r.onDragStart(a.getMousePoint(i)))},r.onMouseMove=function(i){return r.onDrag(a.getMousePoint(i))},r.onScroll=function(i){r.currentDoc&&(i.preventDefault(),r.saveContainerPosition())},r.onTouchStart=function(i){r.currentDoc&&(r.isTouching=!0,!(r.props.onTouchRequest&&!r.props.onTouchRequest(i))&&(r.currentDoc.addEventListener("touchmove",r.onTouchMove,{passive:!1}),r.currentDoc.addEventListener("touchend",r.onDragStopped),r.saveContainerPosition(),i.touches.length===2?r.onPinchStart(i):i.touches.length===1&&r.onDragStart(a.getTouchPoint(i.touches[0]))))},r.onTouchMove=function(i){i.preventDefault(),i.touches.length===2?r.onPinchMove(i):i.touches.length===1&&r.onDrag(a.getTouchPoint(i.touches[0]))},r.onGestureStart=function(i){r.currentDoc&&(i.preventDefault(),r.currentDoc.addEventListener("gesturechange",r.onGestureChange),r.currentDoc.addEventListener("gestureend",r.onGestureEnd),r.gestureZoomStart=r.props.zoom,r.gestureRotationStart=r.props.rotation)},r.onGestureChange=function(i){if(i.preventDefault(),!r.isTouching){var c=a.getMousePoint(i),s=r.gestureZoomStart-1+i.scale;if(r.setNewZoom(s,c,{shouldUpdatePosition:!0}),r.props.onRotationChange){var u=r.gestureRotationStart+i.rotation;r.props.onRotationChange(u)}}},r.onGestureEnd=function(i){r.cleanEvents()},r.onDragStart=function(i){var c,s,u=i.x,h=i.y;r.dragStartPosition={x:u,y:h},r.dragStartCrop=St({},r.props.crop),(s=(c=r.props).onInteractionStart)===null||s===void 0||s.call(c)},r.onDrag=function(i){var c=i.x,s=i.y;r.currentWindow&&(r.rafDragTimeout&&r.currentWindow.cancelAnimationFrame(r.rafDragTimeout),r.rafDragTimeout=r.currentWindow.requestAnimationFrame(function(){if(r.state.cropSize&&!(c===void 0||s===void 0)){var u=c-r.dragStartPosition.x,h=s-r.dragStartPosition.y,f={x:r.dragStartCrop.x+u,y:r.dragStartCrop.y+h},g=r.props.restrictPosition?Io(f,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):f;r.props.onCropChange(g)}}))},r.onDragStopped=function(){var i,c;r.isTouching=!1,r.cleanEvents(),r.emitCropData(),(c=(i=r.props).onInteractionEnd)===null||c===void 0||c.call(i)},r.onWheel=function(i){if(r.currentWindow&&!(r.props.onWheelRequest&&!r.props.onWheelRequest(i))){i.preventDefault();var c=a.getMousePoint(i),s=rF(i).pixelY,u=r.props.zoom-s*r.props.zoomSpeed/200;r.setNewZoom(u,c,{shouldUpdatePosition:!0}),r.state.hasWheelJustStarted||r.setState({hasWheelJustStarted:!0},function(){var h,f;return(f=(h=r.props).onInteractionStart)===null||f===void 0?void 0:f.call(h)}),r.wheelTimer&&clearTimeout(r.wheelTimer),r.wheelTimer=r.currentWindow.setTimeout(function(){return r.setState({hasWheelJustStarted:!1},function(){var h,f;return(f=(h=r.props).onInteractionEnd)===null||f===void 0?void 0:f.call(h)})},250)}},r.getPointOnContainer=function(i,c){var s=i.x,u=i.y;if(!r.containerRect)throw new Error("The Cropper is not mounted");return{x:r.containerRect.width/2-(s-c.x),y:r.containerRect.height/2-(u-c.y)}},r.getPointOnMedia=function(i){var c=i.x,s=i.y,u=r.props,h=u.crop,f=u.zoom;return{x:(c+h.x)/f,y:(s+h.y)/f}},r.setNewZoom=function(i,c,s){var u=s===void 0?{}:s,h=u.shouldUpdatePosition,f=h===void 0?!0:h;if(!(!r.state.cropSize||!r.props.onZoomChange)){var g=Zc(i,r.props.minZoom,r.props.maxZoom);if(f){var _=r.getPointOnContainer(c,r.containerPosition),w=r.getPointOnMedia(_),b={x:w.x*g-_.x,y:w.y*g-_.y},v=r.props.restrictPosition?Io(b,r.mediaSize,r.state.cropSize,g,r.props.rotation):b;r.props.onCropChange(v)}r.props.onZoomChange(g)}},r.getCropData=function(){if(!r.state.cropSize)return null;var i=r.props.restrictPosition?Io(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop;return iF(i,r.mediaSize,r.state.cropSize,r.getAspect(),r.props.zoom,r.props.rotation,r.props.restrictPosition)},r.emitCropData=function(){var i=r.getCropData();
166if(i){var c=i.croppedAreaPercentages,s=i.croppedAreaPixels;r.props.onCropComplete&&r.props.onCropComplete(c,s),r.props.onCropAreaChange&&r.props.onCropAreaChange(c,s)}},r.emitCropAreaChange=function(){var i=r.getCropData();if(i){var c=i.croppedAreaPercentages,s=i.croppedAreaPixels;r.props.onCropAreaChange&&r.props.onCropAreaChange(c,s)}},r.recomputeCropPosition=function(){var i,c;if(r.state.cropSize){var s=r.props.crop;if(r.isInitialized&&(!((i=r.previousCropSize)===null||i===void 0)&&i.width)&&(!((c=r.previousCropSize)===null||c===void 0)&&c.height)){var u=Math.abs(r.previousCropSize.width-r.state.cropSize.width)>1e-6||Math.abs(r.previousCropSize.height-r.state.cropSize.height)>1e-6;if(u){var h=r.state.cropSize.width/r.previousCropSize.width,f=r.state.cropSize.height/r.previousCropSize.height;s={x:r.props.crop.x*h,y:r.props.crop.y*f}}}var g=r.props.restrictPosition?Io(s,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):s;r.previousCropSize=r.state.cropSize,r.props.onCropChange(g),r.emitCropData()}},r.onKeyDown=function(i){var c,s,u=r.props,h=u.crop,f=u.onCropChange,g=u.keyboardStep,_=u.zoom,w=u.rotation,b=g;if(r.state.cropSize){i.shiftKey&&(b*=.2);var v=St({},h);switch(i.key){case"ArrowUp":v.y-=b,i.preventDefault();break;case"ArrowDown":v.y+=b,i.preventDefault();break;case"ArrowLeft":v.x-=b,i.preventDefault();break;case"ArrowRight":v.x+=b,i.preventDefault();break;default:return}r.props.restrictPosition&&(v=Io(v,r.mediaSize,r.state.cropSize,_,w)),i.repeat||(s=(c=r.props).onInteractionStart)===null||s===void 0||s.call(c),f(v)}},r.onKeyUp=function(i){var c,s;switch(i.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":i.preventDefault();break;default:return}r.emitCropData(),(s=(c=r.props).onInteractionEnd)===null||s===void 0||s.call(c)},r}return a.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=mF,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},a.prototype.componentWillUnmount=function(){var r,i;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(r=this.resizeObserver)===null||r===void 0||r.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((i=this.styleRef.parentNode)===null||i===void 0||i.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},a.prototype.componentDidUpdate=function(r){var i,c,s,u,h,f,g,_,w;r.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):r.aspect!==this.props.aspect?this.computeSizes():r.objectFit!==this.props.objectFit?this.computeSizes():r.zoom!==this.props.zoom?this.recomputeCropPosition():((i=r.cropSize)===null||i===void 0?void 0:i.height)!==((c=this.props.cropSize)===null||c===void 0?void 0:c.height)||((s=r.cropSize)===null||s===void 0?void 0:s.width)!==((u=this.props.cropSize)===null||u===void 0?void 0:u.width)?this.computeSizes():(((h=r.crop)===null||h===void 0?void 0:h.x)!==((f=this.props.crop)===null||f===void 0?void 0:f.x)||((g=r.crop)===null||g===void 0?void 0:g.y)!==((_=this.props.crop)===null||_===void 0?void 0:_.y))&&this.emitCropAreaChange(),r.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),r.video!==this.props.video&&((w=this.videoRef.current)===null||w===void 0||w.load());var b=this.getObjectFit();b!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:b},this.computeSizes)},a.prototype.getAspect=function(){var r=this.props,i=r.cropSize,c=r.aspect;return i?i.width/i.height:c},a.prototype.getObjectFit=function(){var r,i,c,s;if(this.props.objectFit==="cover"){var u=this.imageRef.current||this.videoRef.current;if(u&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var h=this.containerRect.width/this.containerRect.height,f=((r=this.imageRef.current)===null||r===void 0?void 0:r.naturalWi
166dth)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,g=((c=this.imageRef.current)===null||c===void 0?void 0:c.naturalHeight)||((s=this.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,_=f/g;return _<h?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},a.prototype.onPinchStart=function(r){var i=a.getTouchPoint(r.touches[0]),c=a.getTouchPoint(r.touches[1]);this.lastPinchDistance=Yh(i,c),this.lastPinchRotation=Kh(i,c),this.onDragStart(Qh(i,c))},a.prototype.onPinchMove=function(r){var i=this;if(!(!this.currentDoc||!this.currentWindow)){var c=a.getTouchPoint(r.touches[0]),s=a.getTouchPoint(r.touches[1]),u=Qh(c,s);this.onDrag(u),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var h=Yh(c,s),f=i.props.zoom*(h/i.lastPinchDistance);i.setNewZoom(f,u,{shouldUpdatePosition:!1}),i.lastPinchDistance=h;var g=Kh(c,s),_=i.props.rotation+(g-i.lastPinchRotation);i.props.onRotationChange&&i.props.onRotationChange(_),i.lastPinchRotation=g})}},a.prototype.render=function(){var r=this,i,c=this.props,s=c.image,u=c.video,h=c.mediaProps,f=c.cropperProps,g=c.transform,_=c.crop,w=_.x,b=_.y,v=c.rotation,C=c.zoom,T=c.cropShape,I=c.showGrid,O=c.roundCropAreaPixels,D=c.style,A=D.containerStyle,E=D.cropAreaStyle,R=D.mediaStyle,k=c.classes,z=k.containerClassName,Q=k.cropAreaClassName,N=k.mediaClassName,W=(i=this.state.mediaObjectFit)!==null&&i!==void 0?i:this.getObjectFit();return m.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(oe){return r.containerRef=oe},"data-testid":"container",style:A,className:tc("reactEasyCrop_Container",z)},s?m.createElement("img",St({alt:"",className:tc("reactEasyCrop_Image",W==="contain"&&"reactEasyCrop_Contain",W==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",W==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",N)},h,{src:s,ref:this.imageRef,style:St(St({},R),{transform:g||"translate(".concat(w,"px, ").concat(b,"px) rotate(").concat(v,"deg) scale(").concat(C,")")}),onLoad:this.onMediaLoad})):u&&m.createElement("video",St({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:tc("reactEasyCrop_Video",W==="contain"&&"reactEasyCrop_Contain",W==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",W==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",N)},h,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:St(St({},R),{transform:g||"translate(".concat(w,"px, ").concat(b,"px) rotate(").concat(v,"deg) scale(").concat(C,")")}),controls:!1}),(Array.isArray(u)?u:[{src:u}]).map(function(Y){return m.createElement("source",St({key:Y.src},Y))})),this.state.cropSize&&m.createElement("div",St({ref:this.cropperRef,style:St(St({},E),{width:O?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:O?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:tc("reactEasyCrop_CropArea",T==="round"&&"reactEasyCrop_CropAreaRound",I&&"reactEasyCrop_CropAreaGrid",Q)},f)))},a.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:fF,minZoom:hF,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:gF},a.getMousePoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},a.getTouchPoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},a}(m.Component);const _F=e=>new Promise((a,r)=>{const i=new Image;i.addEventListener("load",()=>a(i)),i.addEventListener("error",c=>r(c)),i.setAttribute("crossOrigin","anonymous"),i.src=e}),Jh=250;async function xF(e,a){const r=await _F(e),i=document.createElement("canvas"),c=i.getContext("2d");if(!c)throw new Error("Could not get canvas context");const s=Math.max(a.width,a.height),u=s>Jh?Jh/s:1,h=Math.round(a.width*u),f=Math.round(a.height*u);return i.width=h,i.height=f,c.fillStyle="#ffffff",c.fillRect(0,0,h,f),c.drawImage(r,a.x,a.y,a.width,a.height,0,0,h,f),new Promise((g,_)=>{i.toBlob(w=>{if(!w){_(new Error("Canvas is empty"));return}const b=new File([w],"avatar.jpg",{type:"image/jpeg"});g(b)},"image/jpeg",.9)})}const bF=1,SF=3,wF=.05,Ay=({imageSrc:e,onConfirm:a,onClose:r})=>{const[i,c]=m.useState({x:0,y:0}),[s,u]=m.useState(1),[h,f]=m.useState(null),[g,_]=m.useState(!1),w=m.useCallback((v,C)=>{f(C)},[]);return d(Me,{gap:{base:"32px",md:"24px"},p:{base:"24px 24px 60px",md:"32px"},w:"full",maxW:"500px",minW:{base:"calc(100vw - 40px)",md:"500px"},mx:"auto",bg:"background.controls.modal",borderRadius:{base:"8px 8px 0 0",md:"8px"},"data-cy":"_AvatarCropModal_VStack",children:[n(S,{textStyle:"heading.20.semi",textAlign:"center","data-cy":"_AvatarCropModal_Text",children:"Crop Profile Photo"}),n(me,{position:"relative",w:"full",h:{base:"280px",md:"340px"},borderRadius:"8px",overflow:"hidden",bg:"black","data-cy":"_AvatarCropModal_Box",children:n(yF,{image:e,crop:i,zoom:s,aspect:1,cropShape:"round",showGrid:!1,onCropChange:c,onZoomChange:u,onCropComplete:w,"data-cy":"_AvatarCropModal_Cropper"})}),d(G,{w:"full",alignItems:"center",gap:"16px",px:"8px","data-cy":"_AvatarCropModal_Flex",children:[n(S,{textStyle:"UI.12.reg",color:"text.secondary",flexShrink:0,"data-cy":"_AvatarCropModal_Text",children:"Zoom"}),n(v4,{min:bF,max:SF,step:wF,value:[s],onValueChange:v=>u(v.value[0]),flex:1,children:d(_4,{children:[n(x4,{h:"8px",children:n(b4,{})}),n(S4,{index:0,h:"20px",w:"12px",bg:"background.inverse",borderRadius:"4px",cursor:"ew-resize",children:n(w4,{})})]})})]}),d(Fe,{gap:"12px",w:"full",justifyContent:"flex-end","data-cy":"_AvatarCropModal_HStack",children:[n(ne,{variant:"outline",size:"md",onClick:r,disabled:g,"data-cy":"_AvatarCropModal_Button",children:"Cancel"}),n(ne,{variant:"filled",size:"md",onClick:async()=>
166{if(h){_(!0);try{const v=await xF(e,h);a(v)}catch(v){console.error("Failed to crop image:",v)}finally{_(!1)}}},loading:g,disabled:g,"data-cy":"_AvatarCropModal_Button_8",children:"Upload"})]})]})},vF="16px",CF="12px",TF="4px",od=({totalPages:e,currentPage:a,size:r="lg",showBackground:i=!0,onPageChange:c,containerProps:s})=>{const h=r==="sm"?CF:vF;return d(G,{position:"relative",alignItems:"center",p:"4px",borderRadius:"2px",...s,"data-cy":"_index_Flex",children:[i&&n(me,{position:"absolute",inset:0,borderRadius:"4px",bg:"background.surface.2","data-cy":"_index_Box"}),Array.from({length:e},(f,g)=>n(me,{as:"button",display:"block",cursor:c?"pointer":"default",position:"relative",h,flex:"1 0 0",minW:"1px",minH:"1px",onClick:()=>c==null?void 0:c(g),focusRing:"none","data-cy":"_index_Box_2",children:n(me,{position:"absolute",inset:TF,borderRadius:"full",bg:g<=a?"icon.primary":"icon.tertiary","data-cy":"_index_Box_3"})},g))]})},Fy=()=>{const{data:e,isLoading:a,error:r,isSuccess:i}=Je({...Et.userLocation,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,staleTime:1/0,gcTime:1/0});return{userLocation:{data:e,isLoading:a,isSuccess:i,error:r}}},PF=e=>{const{data:a,...r}=Je({...Kn.getGiftEligibility,...e});return{giftEligibility:{data:a,...r}}},kF=["youtube-creator-podcaster","wedding-filmmaker","freelance-filmmaker","other-individual","brand","non-profit","production-company","music-supervisor"],IF={customDomain:["company-account","user-profile","invite-team","success"],business:["user-profile","company-account","invite-team","success"],invited:["join-team","user-profile","success"],personal:["user-profile","workspace","success"],individualWorkspace:["workspace","success"],businessWorkspace:["company-account","invite-team","success"]};function Ey({isCustomDomain:e,isBusiness:a,isInvited:r,individualWorkspace:i,businessWorkspace:c}){return i?"individualWorkspace":c?"businessWorkspace":r?"invited":e?"customDomain":a?"business":"personal"}function MF(e,a){const r=[...e];for(const{step:i,insertBefore:c,shouldInclude:s}of a){if(!s)continue;const u=r.indexOf(c);u!==-1&&r.splice(u,0,i)}return r}function AF(e,a){const r=IF[e],i=[{step:"notification-preferences",insertBefore:"success",shouldInclude:a.requiresOptIn},{step:"free-trial-offer",insertBefore:"success",shouldInclude:!a.giftEligible&&a.freeTrialEligible},{step:"gift-offer",insertBefore:"success",shouldInclude:a.giftEligible}];return MF(r,i)}const FF=e=>{var C;const a=F0(E0.ENABLE_ONBOARDING_GIFT_OFFER),[r,i]=m.useState(0),c=m.useRef(null),{userLocation:s}=Fy(),{giftEligibility:{data:u,refetch:h}}=PF({enabled:!1}),f=Ey(e);r===0&&(c.current=f);const g=c.current??f,_=m.useMemo(()=>{var T;return AF(g,{requiresOptIn:!!((T=s.data)!=null&&T.requires_opt_in),giftEligible:a&&!!(u!=null&&u.eligible),freeTrialEligible:kF.includes(e.persona)})},[g,(C=s.data)==null?void 0:C.requires_opt_in,u==null?void 0:u.eligible,e.persona]),w=_[r];return{onboardingSteps:_,currentStep:r,currentStepKey:w,setCurrentStep:i,goToNextStep:()=>{i(T=>Math.min(T+1,_.length-1))},goToStep:T=>{const I=_.indexOf(T);I!==-1&&i(I)},refetchGiftEligibility:h}},Ry=PC().nullable().defined().test("fileType","File must be PNG or JPEG",e=>e?qg.includes(e.type):!0).test("fileSize","File must be less than 1MB",e=>e?e.size<=Hg:!0),Oy={"workspace-name":dt().required("Workspace name is required"),"workspace-avatar":Ry},EF=hr(la().shape({"first-name":dt().required("First name is required"),"last-name":dt().required("Last name is required"),role:dt().required("Role is required"),"profile-avatar":Ry})),RF=hr(la().shape({"company-website":dt().required("Company website is required"),"company-name":dt().required("Company name is required"),"company-type":dt().required("Company type is required"),"company-size":dt().when("company-type",{is:e=>e==="brand"||e==="non-profit",then:e=>e.required("Company size is required"),otherwise:e=>e}),"entity-type":dt().required("Entity type is required"),...Oy})),OF=hr(la().shape({...Oy})),LF=la().shape({email:dt().default("").email("Must be a valid email"),role:dt().default("").when("email",{is:e=>e&&e.length>0,then:e=>e.required("Role is required"),otherwise:e=>e})}),VF=hr(la().shape({invites:kC().of(LF).required()})),BF=hr(la().shape({"first-name":dt().required("First name is required"),"last-name":dt().required("Last name is required"),
166company:dt().required("Company is required"),address:dt().required("Street address is required"),city:dt().required("City is required"),state:dt().required("State / Province is required"),"postal-code":dt().required("ZIP / Postal Code is required"),"t-shirt-size":dt().required("T-Shirt size is required"),"mobile-phone":dt().required("Mobile phone is required")})),ru=({onAvatarChange:e,type:a,errorMessage:r,initialAvatarUrl:i})=>{const c=m.useRef(null),[s,u]=m.useState(i??null),[h,f]=m.useState(null),g=m.useRef(!1),_=m.useCallback(()=>{f(null)},[]),w=m.useCallback(I=>{s&&URL.revokeObjectURL(s),u(URL.createObjectURL(I)),e(I),f(null)},[s,e]),b=m.useCallback(I=>{var E;const O=((E=I.target.files)==null?void 0:E[0])??null;if(c.current&&(c.current.value=""),!(O!==null&&qg.includes(O.type)&&O.size<=Hg)){e(O);return}const A=new FileReader;A.onload=()=>{f(A.result)},A.readAsDataURL(O)},[e]),v=m.useCallback(()=>{var I;(I=c.current)==null||I.click()},[]),C=m.useCallback(I=>{u(I)},[]);return m.useEffect(()=>{const I=s;return()=>{I&&URL.revokeObjectURL(I)}},[s]),m.useEffect(()=>{!i||g.current||(g.current=!0,C(i))},[i]),{element:d(ve,{children:[d(Do,{w:a==="workspace"?56:80,h:a==="workspace"?56:80,position:"relative",cursor:"pointer",onClick:v,children:[!s&&n(zo,{overflow:"hidden",children:a==="workspace"?n(Xe,{name:"workspaceIcon","data-cy":"_useAvatarUpload_Icon"}):n(vt,{transform:"translateY(10px)","data-cy":"_useAvatarUpload_ChakraIcon",children:n(If,{size:76,weight:"fill",color:"white","data-cy":"_useAvatarUpload_UserIcon"})})}),s&&n(jo,{src:s}),n("input",{ref:c,type:"file",accept:d5,onChange:b,hidden:!0,"data-cy":"_useAvatarUpload_input"}),n(gd,{type:"button",variant:"outline",boxSize:24,position:"absolute",bottom:-4,right:-2,borderRadius:"full",backgroundColor:"background.controls.modal",zIndex:2,"data-cy":"_useAvatarUpload_IconButton",children:n(Xe,{name:"editPencil",width:12,height:12,"data-cy":"_useAvatarUpload_Icon"})}),r&&n(S,{as:"span",textStyle:"UI.12.reg",color:"text.colored.negative",position:"absolute",bottom:-16,w:"max-content","data-cy":"_useAvatarUpload_Text",children:r})]}),n(kv,{open:!!h,placement:"center",onEscapeKeyDown:_,onInteractOutside:_,children:n(wv,{"data-cy":"_useAvatarUpload_Portal",children:d(WC,{"data-cy":"_useAvatarUpload_MusicbedThemeProvider",children:[n(vv,{}),n(Cv,{children:n(Tv,{bg:"transparent",shadow:"none",mx:16,children:n(Pv,{p:0,children:h&&n(Ay,{imageSrc:h,onClose:_,onConfirm:w,"data-cy":"_useAvatarUpload_AvatarCropModal"})})})})]})})})]}),updateFromUrl:C}},Xh={companyAccountData:null,userProfileData:null,workspaceData:null},da=J0()(I4(e=>({...Xh,setCompanyAccountData:a=>e(r=>({companyAccountData:{...r.companyAccountData,...a}})),setUserProfileData:a=>e(r=>({userProfileData:{...r.userProfileData,...a}})),setWorkspaceData:a=>e(r=>({workspaceData:{...r.workspaceData,...a}})),resetOnboardingStore:()=>e(Xh)}))),DF={companyFormData:{},userProfileFormData:{}},jF=e=>{const a=e.trim().match(/^https?:\/\//)?e.trim():`https://${e.trim()}`;try{const{hostname:r}=new URL(a);return r.replace(/^www\./,"")}catch{return e.trim()}},zF=e=>{if(!e)return DF;const a={...e.company_name?{"company-name":e.company_name}:{},...e.company_website?{"company-website":e.company_website}:{},...e.company_name?{"workspace-name":e.company_name}:{}},r={...e.first_name?{"first-name":e.first_name}:{},...e.last_name?{"last-name":e.last_name}:{}};return{companyFormData:a,userProfileFormData:r,...e.company_logo?{companyLogoUrl:e.company_logo}:{}}},WF="organizations",NF=e=>`upload/organizations/${e}`,UF="organizations/store",qF=e=>`organizations/${e}/switch`,HF=async({organizationId:e,file:a})=>{const r=new FormData;return r.append("files",a),r.append("foreign_name","organizations"),(await qn.post(`https://sabre.musicbed.com/${NF(e)}`,r,{transformRequest:c=>c,withCredentials:!0})).data.data},nu=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:HF,onSuccess:()=>{e.invalidateQueries({queryKey:Et.accountOrganizations.queryKey}),e.invalidateQueries({queryKey:Et.accountOrganizationDetails.queryKey})}});return{uploadWorkspaceAvatar:a,...r}},$F=({domain:e,enabled:a=!0})=>{const{data:r,...i}=Je({...Kn.getCompanyDataFromDomain(e),enabled:!!e&&a});return{companyData:{data:r,...i}}},ou=()=>{const e=pt(),{mutateAsync:a,...r}=mt({mutationFn:i=>Le(WF,{method:nn,data:i}),onSuccess:()=>
166{e.invalidateQueries({queryKey:Et.accountOrganizations.queryKey}),e.invalidateQueries({queryKey:Et.accountOrganizationDetails.queryKey})}});return{updateAccountDetails:a,...r}},e0=()=>{Ct.create({title:"Error updating company account",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})};var ZF={name:"196vcit",styles:"animation:spin 1.7s linear infinite"};const GF=({initialData:e,isCustomDomain:a=!1,isCreatingWorkspace:r=!1,companyLogoUrl:i,getGiftEligibility:c,onCreateWorkspace:s,onContinue:u})=>{var ae;const h=da(q=>q.companyAccountData),f=da(q=>q.setCompanyAccountData),g=da(q=>q.setUserProfileData),[_,w]=m.useState(i),{updateUserPersona:b,isPending:v}=ei(),{updateAccountDetails:C,isPending:T}=ou(),{uploadWorkspaceAvatar:I}=nu(),{user:{data:O}}=ht(),{control:D,handleSubmit:A,watch:E,setValue:R,formState:{errors:k}}=It({defaultValues:{...u5,...e,...h},resolver:RF}),z=E("company-website"),Q=z?jF(z):"",{companyData:{isFetching:N,refetch:W}}=$F({domain:Q,enabled:!1}),Y=!s,{element:oe,updateFromUrl:Se}=ru({onAvatarChange:q=>{w(void 0),R("workspace-avatar",q,{shouldValidate:!0}),q&&Y&&I({organizationId:String(O.active_organization.id),file:q})},type:"workspace",initialAvatarUrl:i}),ce=E("company-type")==="brand"||E("company-type")==="non-profit",we=async()=>{if(!Q)return;const{data:q}=await W();q&&(q.company_name&&(R("company-name",q.company_name),R("workspace-name",q.company_name)),q.company_logo&&(w(q.company_logo),Se(q.company_logo)))},le=(q,xe)=>{var ge,Be,ie;const Ce=((ge=q.value)==null?void 0:ge[0])??"";xe.onChange(Ce),a&&y5.includes(Ce)&&g({role:Ce}),R("company-size",void 0),R("entity-type",(ie=(Be=q.items)==null?void 0:Be[0])==null?void 0:ie.entityType)},K=(q,xe=u)=>{a||(c(),O&&q.entity&&X0({id:O.id.toString(),email:O.email,persona:q.entity,reloadFeatureFlags:!0})),xe()};return d(V,{gap:{base:24,md:32},alignItems:"center",w:"100%","data-cy":"_CompanyAccountForm_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_CompanyAccountForm_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_CompanyAccountForm_Text",children:"Set up your company account"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_CompanyAccountForm_Text_3",children:"We'll customize Musicbed for your business needs"})]}),d(V,{as:"form",gap:24,alignItems:"flex-start",w:"100%",onSubmit:A(q=>{f(q);const xe={entity_type:q["entity-type"]??null,entity:q["company-type"]??null,company_size:q["company-size"]??null,website:q["company-website"]??null,job_role:null,company_name:q["company-name"]??null};b(xe,{onSuccess:Ce=>{if(s){K(Ce,()=>s(q));return}C({name:q["workspace-name"],..._?{company_logo_url:_}:{}},{onSuccess:()=>K(Ce),onError:e0})},onError:e0})}),"data-cy":"_CompanyAccountForm_Stack",children:[n(Ae,{name:"company-website",control:D,render:({field:q})=>{var xe;return n(je,{label:"Company Website",inputProps:{...q,size:"md",onBlur:we},errorText:(xe=k["company-website"])==null?void 0:xe.message,helperText:"Enter your URL to auto-fill your company info",inputGroupProps:{endElement:N?n(Pf,{size:20,css:ZF,"data-cy":"_CompanyAccountForm_SpinnerIcon"}):void 0},"data-cy":"_CompanyAccountForm_FormInput"})},"data-cy":"_CompanyAccountForm_Controller"}),n(Ae,{name:"company-name",control:D,render:({field:q})=>{var xe;return n(je,{label:"Company Name",inputProps:{...q,disabled:N,size:"md"},errorText:(xe=k["company-name"])==null?void 0:xe.message,"data-cy":"_CompanyAccountForm_FormInput"})},"data-cy":"_CompanyAccountForm_Controller"}),n(Ae,{name:"company-type",control:D,render:({field:q})=>{var xe;return d(ua,{invalid:!!k["company-type"],children:[n(Ka,{size:"md",label:"Company Type",placeholder:"Select your industry",items:Zs,defaultValue:h!=null&&h["company-type"]?[h["company-type"]]:void 0,disabled:N,onValueChange:Ce=>le(Ce,q),"data-cy":"_CompanyAccountForm_FormSelect"}),n(Da,{children:(xe=k["company-type"])==null?void 0:xe.message})]})},"data-cy":"_CompanyAccountForm_Controller"}),ce&&n(Ae,{name:"company-size",control:D,render:({field:q})=>{var xe;return d(ua,{invalid:!!k["company-size"],children:[n(Ka,{size:"md",label:"Company Size",placeholder:"Select company size",disabled:N,items:Zg,defaultValue:h!=null&&h["company-size"]?[h["company-size"]]:void 0,onValueChange:({value:Ce})=>{q.onChange((Ce==null?void 0:Ce[0])??"")},"data-cy":"_CompanyAccountForm_FormSelect"}),n(Da,{children:(xe=k["company-size"])==null?void 0:xe.message})]})},"data-cy":"_CompanyAccountForm_Controller"}),n(gt,{"data-cy":"_CompanyAccountForm_Separator"}),d(V,{gap:12,alignItems:"flex-start",w:"100%","data-cy":"_CompanyAccountForm_Stack",children:[d(V,{gap:4,alignItems:"flex-start","data-cy":"_CompanyAccountForm_Stack_16",children:[n(S,{textStyle:"UI.14.semi","data-cy":"_CompanyAccountForm_Text",children:"Set up your workspace"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_CompanyAccountForm_Text_18",children:"Organize your music, team, and projects"})]}),d(G,{gap:16,alignItems:"center",w:"100%","data-cy":"_CompanyAccountForm_Flex",children:[oe,n(Ae,{name:"workspace-name",control:D,render:({field:q})=>{var xe;
166return n(je,{inputProps:{...q,size:"md",placeholder:"Name your workspace"},errorText:(xe=k["workspace-name"])==null?void 0:xe.message,"data-cy":"_CompanyAccountForm_FormInput"})},"data-cy":"_CompanyAccountForm_Controller"})]}),n(S,{textStyle:"UI.12.reg",color:k["workspace-avatar"]?"fg.error":"text.secondary","data-cy":"_CompanyAccountForm_Text",children:((ae=k["workspace-avatar"])==null?void 0:ae.message)??"PNG or JPEG, max 1mb"})]}),n(ne,{type:"submit",size:"xl",w:"100%",variant:"filled",mt:{base:-12,md:16},textStyle:"UI.16.reg",loading:v||T||r,"data-cy":"_CompanyAccountForm_Button",children:"Continue"})]})]})},YF=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le(I5,{method:"POST",data:r})});return{bulkInvite:e,...a}},t0=vd({items:g5}),KF=({onSuccess:e,onSkip:a})=>{const{control:r,handleSubmit:i,setError:c,formState:{errors:s}}=It({defaultValues:h5,resolver:VF}),{bulkInvite:u,isPending:h}=YF();return d(V,{gap:{base:24,md:32},alignItems:"center",w:"100%","data-cy":"_InviteTeamForm_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_InviteTeamForm_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_InviteTeamForm_Text",children:"Invite your team"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_InviteTeamForm_Text_3",children:"Start with up to 3 peopleâyou can invite more anytime"})]}),d(V,{as:"form",gap:{base:24,md:32},alignItems:"flex-start",w:"100%",onSubmit:i(g=>{const _=g.invites.filter(b=>b.email.trim()!=="");if(_.length===0){a();return}const w={invites:_.map(b=>({email:b.email.trim(),role:b.role}))};u(w,{onSuccess:b=>{const v=b.data.filter(C=>!C.success);v.length>0?v.forEach(({email:C,errors:T})=>{const I=g.invites.findIndex(O=>O.email.trim()===C);I!==-1&&c(`invites.${I}.email`,{message:T[0]??"This invite could not be sent"})}):e()},onSettled:e})}),"data-cy":"_InviteTeamForm_Stack",children:[n(V,{gap:12,w:"100%","data-cy":"_InviteTeamForm_Stack_5",children:Array.from({length:$g}).map((g,_)=>d(G,{gap:8,alignItems:"flex-start",w:"100%","data-cy":"_InviteTeamForm_Flex",children:[n(Ae,{name:`invites.${_}.email`,control:r,render:({field:w})=>{var b,v,C;return n(je,{inputProps:{...w,type:"email",size:"md",placeholder:"Email address"},errorText:(C=(v=(b=s.invites)==null?void 0:b[_])==null?void 0:v.email)==null?void 0:C.message,"data-cy":"_InviteTeamForm_FormInput"})},"data-cy":"_InviteTeamForm_Controller"}),n(Ae,{name:`invites.${_}.role`,control:r,render:({field:w})=>d(B0,{collection:t0,positioning:{placement:"bottom-end"},size:"md",w:"125px",onValueChange:({value:b})=>w.onChange(b==null?void 0:b[0]),children:[n(D0,{}),d(j0,{w:"125px",children:[n(z0,{children:n(W0,{placeholder:"Select role"})}),n(N0,{children:n(U0,{})})]}),n(q0,{children:n(H0,{width:"312px",p:"4px",bg:"background.controls.modal",children:t0.items.map(b=>d($0,{item:b,p:"12px 8px 12px 36px",borderRadius:"6px",children:[d(V,{gap:4,w:256,"data-cy":"_InviteTeamForm_Stack",children:[n(Z0,{textStyle:"UI.16.reg",children:b.label}),n(Ft,{textStyle:"heading.12.reg",color:"text.secondary","data-cy":"_InviteTeamForm_Span",children:b.description})]}),n(wC,{})]},b.value))})})]}),"data-cy":"_InviteTeamForm_Controller"})]},_))}),d(G,{gap:8,w:"100%",flexDirection:{base:"column-reverse",md:"row"},h:{base:104,md:"auto"},"data-cy":"_InviteTeamForm_Flex",children:[n(ne,{type:"button",variant:"outline",size:"xl",flex:1,onClick:a,textStyle:"UI.16.reg","data-cy":"_InviteTeamForm_Button",children:"Skip"}),n(ne,{type:"submit",variant:"filled",size:"xl",flex:1,textStyle:"UI.16.reg",loading:h,"data-cy":"_InviteTeamForm_Button_14",children:"Continue"})]})]})]})},Ly=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le("user/notification-preferences",{method:"PUT",data:JSON.stringify({preferences:r})})});return{updateNotificationPreferences:e,...a}},QF=[{label:"New music, artists, and playlists",value:"newsletter"},{label:"Articles and tips from the Musicbed blog",value:"blog"},{label:"Announcements, events, and competitions from Musicbed",value:"events"}],JF=({onComplete:e})=>{const[a,r]=m.useState({newsletter:!1,blog:!1,events:!1}),{updateNotificationPreferences:i,isPending:c}=Ly(),s=(h,f)=>{r(g=>({...g,[h]:f}))};return d(V,{gap:{base:24,md:32},w:"100%","data-cy":"_NotificationPreferencesForm_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_NotificationPreferencesForm_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_NotificationPreferencesForm_Text",children:"Stay in the loop"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary",textAlign:"center",w:360,"data-cy":"_NotificationPreferencesForm_Text_3",children:"We'll send occasional updates about new music and Musicbed news. Your information stays private and you can unsubscribe anytime."})]}),n(b8,{border:"none",p:0,m:0,children:n(B4,{"data-cy":"_NotificationPreferencesForm_CheckboxGroup",children:n(S8,{gap:16,children:n(D4,{each:QF,"data-cy":"_NotificationPreferencesForm_For",children:(h,f)=>d(j4,{value:h.value,onCheckedChange:({checked:g})=>s(h.value,g),checked:a[h.value],gap:12,alignItems:"center",children:[n(z4,{}),n(W4,{m:0,boxSize:20,_checked:{backgroundColor:"button.filled"}}),d(N4,{textStyle:"UI.14.reg",pos:"relative",children:[h.label,f===0&&n(Ft,{color:"teal",fontSize:"11px",lineHeight:"100%",letterSpacing:"0%",textTransform:"uppercase",pos:"absolute",top:0,transform:"translateY(-110%)","data-cy":"_NotificationPreferencesForm_Span",children:"Recommended"})]})]},h.value)})})})}),n(ne,{variant:"filled",size:"xl",w:"100%",textStyle:"UI.16.reg",loading:c,onClick:()=>{i({email_newsletter_quarterly:a.newsletter,mobile_newsletter_quarterly:a.newsletter,email_blog_updates:a.blog,mobile_blog_updates:a.blog,email_events_and_updates:a.events,mobile_events_and_updates:a.events},{onSuccess:e})},"data-cy":"_NotificationPreferencesForm_Button",children:"Continue"})]})},XF=async e=>{const a=new FormData;return a.append("files",e),a.append("foreign_name","users"),(await qn.post("https://sabre.musicbed.com/upload/users",a,{transformRequest:i=>i,withCredentials:!0})).data.data},eE=()=>{const e=pt(),{user:{data:a}}=ht(),{mutateAsync:r,...i}=mt({mutationFn:XF,onSuccess:c=>{e.setQueryData(Et.only.queryKey,{...a,profile_url:c.url})}});return{uploadAvatar:r,...i}},a0=()=>{Ct.create({title:"Error updating user persona",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},tE=[...eu,...Gg],aE=({initialData:e,isCustomDomain:a,getGiftEligibility:r,onContinue:i})=>{var Q;const c=da(N=>N.userProfileData),s=da(N=>N.companyAccountData),u=da(N=>N.setUserProfileData),h=da(N=>N.setCompanyAccountData),{jobRoles:f,isFetching:g}=Ug(s==null?void 0:s["company-type"]),{updateUserDetails:_,isPending:w}=Xd(),{updateUserPersona:b,isPending:v}=ei(),{uploadAvatar:C}=eE(),{user:{data:T}}=ht(),{control:I,handleSubmit:O,setValue:D,formState:{errors:A}}=It({defaultValues:{...p5,...e,...c},resolver:EF}),{element:E}=ru({onAvatarChange:N=>{D("profile-avatar",N,{shouldValidate:!0}),N&&C(N)},type:"user",errorMessage:(Q=A["profile-avatar"])==null?void 0:Q.message}),R=N=>{a&&(r(),T&&(N!=null&&N.entity)&&X0({id:T.id.toString(),email:T.email,persona:N.entity,reloadFeatureFlags:!0})),i()},k=(N,W)=>{var oe,Se,ce;const Y=((oe=N.value)==null?void 0:oe[0])??"";
166W.onChange(Y),!a&&((ce=(Se=N.items)==null?void 0:Se[0])==null?void 0:ce.entityType)==="individual"&&h({"company-type":Y,"entity-type":"individual"})};return d(V,{gap:{base:24,md:32},alignItems:"center",w:"100%","data-cy":"_UserProfileForm_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_UserProfileForm_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_UserProfileForm_Text",children:"Tell us about yourself"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_UserProfileForm_Text_3",children:"We'll use this info to set up your profile"})]}),E,d(V,{as:"form",gap:24,alignItems:"flex-start",w:"100%",onSubmit:O(N=>{u(N),_({first_name:N["first-name"],last_name:N["last-name"],job_role:N.role},{onSuccess:()=>{!a&&!Yg(N.role)?b({entity_type:"individual",entity:_5[N.role]??"other-individual",company_size:null,company_name:null},{onSuccess:W=>R(W),onError:a0}):R()},onError:a0})}),"data-cy":"_UserProfileForm_Stack",children:[d(G,{gap:16,alignItems:"flex-start",w:"100%","data-cy":"_UserProfileForm_Flex",children:[n(Ae,{name:"first-name",control:I,render:({field:N})=>{var W;return n(je,{label:"First name",inputProps:{...N,size:"md",placeholder:"First name"},errorText:(W=A["first-name"])==null?void 0:W.message,"data-cy":"_UserProfileForm_FormInput"})},"data-cy":"_UserProfileForm_Controller"}),n(Ae,{name:"last-name",control:I,render:({field:N})=>{var W;return n(je,{label:"Last name",inputProps:{...N,size:"md",placeholder:"Last name"},errorText:(W=A["last-name"])==null?void 0:W.message,"data-cy":"_UserProfileForm_FormInput"})},"data-cy":"_UserProfileForm_Controller"})]}),n(Ae,{name:"role",control:I,render:({field:N})=>{var W;return d(ua,{invalid:!!A.role,children:[n(Ka,{size:"md",label:"What best describes you?",placeholder:"Select your role",items:f??tE,defaultValue:c!=null&&c.role?[c.role]:void 0,loading:g,disabled:g,onValueChange:Y=>k(Y,N),"data-cy":"_UserProfileForm_FormSelect"}),n(Da,{children:(W=A.role)==null?void 0:W.message})]})},"data-cy":"_UserProfileForm_Controller"}),n(ne,{type:"submit",size:"xl",w:"100%",variant:"filled",mt:{base:-12,md:16},textStyle:"UI.16.reg",loading:w||v,"data-cy":"_UserProfileForm_Button",children:"Continue"})]})]})},rE=({companyLogoUrl:e,isCreatingWorkspace:a=!1,onCreateWorkspace:r,onContinue:i})=>{var D,A,E,R;const c=da(k=>k.workspaceData),s=da(k=>k.setWorkspaceData),{control:u,setValue:h,handleSubmit:f,formState:{errors:g}}=It({defaultValues:{...m5,...c},resolver:OF}),{updateAccountDetails:_,isPending:w}=ou(),{uploadWorkspaceAvatar:b}=nu(),{user:{data:v}}=ht(),C=!r,{element:T}=ru({onAvatarChange:k=>{h("workspace-avatar",k,{shouldValidate:!0}),k&&C&&b({organizationId:String(v.active_organization.id),file:k})},type:"workspace",initialAvatarUrl:e}),I=!((D=g["workspace-avatar"])!=null&&D.message)&&!((A=g["workspace-name"])!=null&&A.message)||((E=g["workspace-avatar"])==null?void 0:E.message);return d(V,{gap:{base:24,md:32},alignItems:"center",w:"100%","data-cy":"_WorkspaceForm_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_WorkspaceForm_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_WorkspaceForm_Text",children:"Name your workspace"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_WorkspaceForm_Text_3",children:"Organize your music, work, and projects"})]}),d(V,{as:"form",gap:{base:24,md:32},alignItems:"flex-start",w:"100%",onSubmit:f(k=>{if(s(k),r){r(k);return}_({name:k["workspace-name"]},{onSuccess:i})}),"data-cy":"_WorkspaceForm_Stack",children:[d(V,{gap:12,alignItems:"flex-start",w:"100%","data-cy":"_WorkspaceForm_Stack_5",children:[d(G,{gap:16,alignItems:"center",w:"100%","data-cy":"_WorkspaceForm_Flex",children:[T,n(Ae,{name:"workspace-name",control:u,render:({field:k})=>{var z;return n(je,{inputProps:{...k,size:"md",placeholder:"Name your workspace"},errorText:(z=g["workspace-name"])==null?void 0:z.message,"data-cy":"_WorkspaceForm_FormInput"})},"data-cy":"_WorkspaceForm_Controller"})]}),I&&n(S,{textStyle:"UI.12.reg",color:g["workspace-avatar"]?"fg.error":"text.secondary","data-cy":"_Worksp
166aceForm_Text",children:((R=g["workspace-avatar"])==null?void 0:R.message)??"PNG or JPEG, max 1mb"})]}),n(ne,{type:"submit",size:"xl",w:"100%",variant:"filled",textStyle:"UI.16.reg",loading:w||a,"data-cy":"_WorkspaceForm_Button",children:"Continue"})]})]})},nE=()=>d(V,{gap:32,alignItems:"center",w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack",children:[d(V,{gap:4,alignItems:"center",w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack_1",children:[n(Ne,{height:28,width:"60%","data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:18,width:"75%","data-cy":"_CompanyAccountFormSkeleton_Skeleton_3"})]}),d(V,{gap:24,alignItems:"flex-start",w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack",children:[d(V,{gap:6,w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack_5",children:[n(Ne,{height:14,width:120,"data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:40,w:"100%",borderRadius:4,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_7"}),n(Ne,{height:12,width:200,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_8"})]}),d(V,{gap:6,w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack",children:[n(Ne,{height:14,width:100,"data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:40,w:"100%",borderRadius:4,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_11"})]}),d(V,{gap:6,w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack",children:[n(Ne,{height:14,width:90,"data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:48,w:"100%",borderRadius:4,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_14"})]}),n(gt,{"data-cy":"_CompanyAccountFormSkeleton_Separator"}),d(V,{gap:12,alignItems:"flex-start",w:"100%","data-cy":"_CompanyAccountFormSkeleton_Stack",children:[d(V,{gap:4,alignItems:"flex-start","data-cy":"_CompanyAccountFormSkeleton_Stack_17",children:[n(Ne,{height:16,width:140,"data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:14,width:220,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_19"})]}),d(G,{gap:16,alignItems:"center",w:"100%","data-cy":"_CompanyAccountFormSkeleton_Flex",children:[n(Ne,{boxSize:56,borderRadius:"full",flexShrink:0,"data-cy":"_CompanyAccountFormSkeleton_Skeleton"}),n(Ne,{height:40,flex:1,borderRadius:4,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_22"})]}),n(Ne,{height:12,width:160,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_23"})]}),n(Ne,{height:52,w:"100%",borderRadius:4,mt:16,"data-cy":"_CompanyAccountFormSkeleton_Skeleton_24"})]})]}),oE=({email:e,enabled:a=!0})=>{const{data:r,...i}=Je({...Kn.getCompanyDataFromEmail(e),enabled:!!e&&a});return{companyData:{data:r,...i}}},iE=({email:e})=>{const{data:a,...r}=Je({...Kn.checkEmailDomain(e),enabled:!!e});return{hasCommonDomain:a==null?void 0:a.has_common_domain,...r}},cE=({onClick:e})=>d(V,{gap:32,alignItems:"center",w:"100%","data-cy":"_OnboardingSuccess_Stack",children:[d(V,{gap:24,alignItems:"center","data-cy":"_OnboardingSuccess_Stack_1",children:[n(vt,{color:"background.colored.positive","data-cy":"_OnboardingSuccess_Icon",children:n(Ec,{size:40,weight:"fill","data-cy":"_OnboardingSuccess_CheckCircleIcon"})}),d(V,{gap:4,alignItems:"center","data-cy":"_OnboardingSuccess_Stack",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_OnboardingSuccess_Text",children:"Welcome to Musicbed"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_OnboardingSuccess_Text_6",children:"Your profile and workspace are ready to go"})]})]}),n(ne,{variant:"filled",size:"xl",w:"100%",textStyle:"UI.16.reg",onClick:e,"data-cy":"_OnboardingSuccess_Button",children:"Browse and listen"})]}),lE=({setValue:e})=>({handleAddressSelect:async r=>{var i;e("address",r,{shouldValidate:!0});try{const s=((i=(await pd(r))[0])==null?void 0:i.address_components)??[],u={};s.forEach(v=>{v.types.forEach(C=>{u[C]=v.long_name})});const h=u.street_number??"",f=u.route??"",g=[h,f].filter(Boolean).join(" ");g&&e("address",g,{shouldValidate:!0});const _=u.locality??u.postal_town??u.sublocality_level_1??"",w=u.administrative_area_level_1??"",b=u.postal_code??"";_&&e("city",_,{shouldValidate:!0}),w&&e("state",w,{shouldValidate:!0}),b&&e("postal-code",b,{shouldValidate:!0})}catch{}}}),sE=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le(Zr.submitGiftOfferForm,{method:"POST",data:r})});return{submitGiftOfferForm:e,...a}},dE=()=>{const{data:e,...a}=Je({...Kn.getGiftOfferOptions});return{giftOfferOptions:e==null?void 0:e.data,...a}},uE="https://cdn.musicbed.com/image/upload/production/onboarding/fmperiodical_4x3-v5-still
166003-brighter_720.jpg",pE="https://cdn.musicbed.com/image/upload/production/onboarding/fmperiodical_4x3-v5-still003-brighter_720.jpg",mE=({onClaim:e,onSkip:a,totalSteps:r,currentStep:i})=>{const c=Or({base:uE,lg:pE}),s=da(R=>R.userProfileData),u=da(R=>R.companyAccountData),{user:{data:h}}=ht(),{giftOfferOptions:f}=dE(),{submitGiftOfferForm:g,isPending:_}=sE(),{updateUserDetails:w}=Xd(),{trackDisplayedGiftOffer:b,trackSubmittedGiftOffer:v}=Rr();La(()=>{b()});const C=m.useMemo(()=>Object.entries((f==null?void 0:f.selectValues.t_shirt_size)??{}).map(([R,k])=>({label:R,value:k})),[f]),{control:T,handleSubmit:I,setValue:O,formState:{errors:D}}=It({defaultValues:{...f5,"first-name":(s==null?void 0:s["first-name"])??"","last-name":(s==null?void 0:s["last-name"])??"",company:(u==null?void 0:u["company-name"])??""},resolver:BF}),{handleAddressSelect:A}=lE({setValue:O});return d(G,{flexDirection:{base:"column",lg:"row"},gap:{base:24,md:32},alignItems:{base:"center",lg:"flex-start"},w:{base:"100%",md:680,lg:960},"data-cy":"_GiftOfferForm_Flex",children:[n(me,{display:{base:"block",lg:"none"},"data-cy":"_GiftOfferForm_Box",children:n(od,{size:"sm",totalPages:r,currentPage:i,showBackground:!1,containerProps:{w:260},"data-cy":"_GiftOfferForm_PaginationLines"})}),d(V,{as:"header",gap:4,alignItems:"center",w:"100%",textAlign:"center",display:{base:"block",lg:"none"},"data-cy":"_GiftOfferForm_Stack",children:[n(S,{textStyle:"heading.24.reg",mb:4,"data-cy":"_GiftOfferForm_Text",children:"Welcome to Musicbed!"}),d(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_GiftOfferForm_Text_5",children:["Claim your complimentary Periodical below ",n("br",{"data-cy":"_GiftOfferForm_br"})," as a welcome to the community."]})]}),n(V,{gap:{base:8,md:16,lg:20},alignItems:{base:"center",md:"flex-start"},flexShrink:0,w:{base:"100%",lg:"347px"}
166,height:{base:203,md:347,lg:"auto"},alignSelf:"stretch",justifyContent:"center","data-cy":"_GiftOfferForm_Stack",children:n(me,{flex:1,w:"100%",minH:0,borderRadius:4,overflow:"hidden","data-cy":"_GiftOfferForm_Box",children:n($n,{src:c,alt:"Musicbed merchandise",w:"100%",h:"100%",objectFit:"cover","data-cy":"_GiftOfferForm_Image"})})}),d(V,{gap:{base:16,md:20},flex:1,w:"100%",minW:0,alignItems:"flex-start","data-cy":"_GiftOfferForm_Stack",children:[d(V,{gap:32,alignItems:"center",w:"100%","data-cy":"_GiftOfferForm_Stack_11",children:[n(me,{display:{base:"none",lg:"block"},"data-cy":"_GiftOfferForm_Box",children:n(od,{size:"sm",totalPages:r,currentPage:i,showBackground:!1,containerProps:{w:260},"data-cy":"_GiftOfferForm_PaginationLines"})}),d(V,{as:"header",gap:4,alignItems:"center",w:"100%",textAlign:"center",display:{base:"none",lg:"block"},"data-cy":"_GiftOfferForm_Stack",children:[n(S,{textStyle:"heading.24.reg",mb:4,"data-cy":"_GiftOfferForm_Text",children:"Welcome to Musicbed!"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_GiftOfferForm_Text_16",children:"Claim your complimentary Periodical as a welcome to the community."})]}),d(V,{as:"form",gap:{base:16,md:20},alignItems:"flex-start",w:"100%",onSubmit:I(R=>{const k={formName:"gift_offer",first_name:R["first-name"],last_name:R["last-name"],email:(h==null?void 0:h.email)??"",company:R.company??"",address:R.address,city:R.city,state:R.state,postal_code:R["postal-code"],country:"United States",mobile_phone:R["mobile-phone"],t_shirt_size:R["t-shirt-size"],pageUrl:window.location.href,pageName:document.title};w({first_name:R["first-name"],last_name:R["last-name"],address:R.address,city:R.city,region:R.state,postal_code:R["postal-code"],country:"US",phone:R["mobile-phone"]}),v(),g(k,{onSuccess:e})}),"data-cy":"_GiftOfferForm_Stack",children:[d(G,{flexDirection:{base:"column",md:"row"},gap:16,alignItems:"flex-start",w:"100%","data-cy":"_GiftOfferForm_Flex",children:[n(Ae,{name:"first-name",control:T,render:({field:R})=>{var k;return n(je,{label:"First name",inputProps:{...R,size:"lg"},errorText:(k=D["first-name"])==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"}),n(Ae,{name:"last-name",control:T,render:({field:R})=>{var k;return n(je,{label:"Last name",inputProps:{...R,size:"lg"},errorText:(k=D["last-name"])==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"})]}),n(Ae,{name:"company",control:T,render:({field:R})=>{var k;return n(je,{label:"Company name",inputProps:{...R,size:"lg"},errorText:(k=D.company)==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"}),n(Ae,{name:"address",control:T,render:({field:R})=>n(md,{value:R.value,onChange:k=>R.onChange(k),onSelect:A,debounce:300,searchOptions:{types:["address"]},"data-cy":"_GiftOfferForm_PlacesAutocomplete",children:({getInputProps:k,suggestions:z,getSuggestionItemProps:Q})=>{var N;return d(me,{w:"100%",position:"relative","data-cy":"_GiftOfferForm_Box",children:[n(je,{label:"Street address",errorText:(N=D.address)==null?void 0:N.message,inputProps:{...k({name:R.name}),size:"lg"},"data-cy":"_GiftOfferForm_FormInput"}),z.length>0&&n(Qa,{position:"absolute",zIndex:"popover",w:"100%",top:"100%",left:0,bg:"background.controls.modal",borderWidth:1,borderColor:"border.default",borderRadius:4,overflow:"hidden",mt:4,listStyleType:"none",boxShadow:"3",children:z.map((W,Y)=>g0(sa,{...Q(W),key:Y,px:16,py:10,textStyle:"paragraph.14.reg",textAlign:"left",cursor:"pointer",bg:W.active?"button.secondary.hover":void 0,_hover:{bg:"button.secondary.hover"}},W.description))})]})}}),"data-cy":"_GiftOfferForm_Controller"}),d(G,{flexDirection:{base:"column",md:"row"},gap:16,alignItems:"flex-start",w:"100%","data-cy":"_GiftOfferForm_Flex",children:[n(Ae,{name:"city",control:T,render:({field:R})=>{var k;return n(je,{label:"City",inputProps:{...R,size:"lg"},errorText:(k=D.city)==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"}),n(Ae,{name:"state",control:T,render:({field:R})=>{var k;return n(je,{label:"State / Province",inputProps:{...R,size:"lg"},errorText:(k=D.state)==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"}),n(Ae,{name:"postal-code",control:T,render:({field:R})=>{var k;return n(je,{label:"ZIP / Postal Code",inputProps:{...R,size:"lg"},errorText:(k=D["postal-code"])==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"})]}),d(G,{flexDirection:{base:"column",md:"row"},gap:16,alignItems:"flex-start",w:"100%","data-cy":"_GiftOfferForm_Flex",children:[n(Ae,{name:"t-shirt-size",control:T,render:({field:R})=>n(Ka,{size:"lg",label:"T-Shirt Size",placeholder:"Select",clearable:!1,items:C,value:R.value?[R.value]:void 0,onValueChange:k=>{var z;return R.onChange(((z=k.value)==null?void 0:z[0])??"")},"data-cy":"_GiftOfferForm_FormSelect"}),"data-cy":"_GiftOfferForm_Controller"}),n(Ae,{name:"mobile-phone",control:T,render:({field:R})=>{var k;return n(je,{label:"Mobile Number",inputProps:{...R,size:"lg",placeholder:"(555) 000-0000",type:"tel"},errorText:(k=D["mobile-phone"])==null?void 0:k.message,"data-cy":"_GiftOfferForm_FormInput"})},"data-cy":"_GiftOfferForm_Controller"})]}),d(G,{flexDirection:{base:"column-reverse",md:"row"},gap:8,alignItems:"center",w:"100%",mt:{base:12,md:0},"data-cy":"_GiftOfferForm_Flex",children:[n(ne,{variant:"shaded",size:"xl",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"UI.16.reg",type:"button",onClick:a,disabled:_,"data-cy":"_GiftOfferForm_Button",children:"No thanks"}),n(ne,{variant:"filled",size:"xl",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"UI.16.reg",type:"submit",loading:_,"data-cy":"_GiftOfferForm_Button_43",children:"Claim my gift"})]})]})]}
166),n(S,{textStyle:{base:"paragraph.12.reg",md:"paragraph.14.reg"},color:"text.secondary",textAlign:"center",w:"100%","data-cy":"_GiftOfferForm_Text",children:"Shipping is currently limited to US residents"})]})]})},r0=["Access the largest curated collection of music & sounds","Copyright clearance through our SyncID⢠system","Monetization on YouTube"],hE=e=>{switch(e){case"wedding-filmmaker":return{name:"Jaired Sullivan",title:"Wedding Filmmaker",image:"https://cdn.musicbed.com/image/upload/v1759431236/production/free-trial-testimonials/jaired-sullivan-musicbed-avatar.jpg",quote:"âMusic is the driving force behind every decision. It can make or break your film. Musicbed helps me create emotions in my films you canât find anywhere else.â"};case"youtube-creator-podcaster":return{name:"Eric Floberg",title:"Photographer + Filmmaker",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/eric-floberg-musicbed-avatar.jpg",quote:"âMusicbed is always leading the charge on the best music for filmmakers. From producing commercials to creating videos for YouTube, making documentaries to narrative shorts, itâs my go-to resource.â"};case"freelance-filmmaker":return{name:"Ian Liu",title:"Creative Director",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/ian-liu-musicbed-avatar.jpg",quote:"âWith Musicbed, the ease of navigation, the comprehensive filters, and the curation of music artists all make it the ultimate resource for music.â"};default:return{name:"Taylor Kavanaugh",title:"Executive Producer",image:"https://cdn.musicbed.com/image/upload/v1759431235/production/free-trial-testimonials/taylor-kavanaugh-musicbed-avatar.jpg",quote:"âWeâve tried almost every music library out there, but Musicbed changed the game. For us, quality is everythingâand Musicbed delivers that consistently.â"}}},fE=({onClose:e})=>{const a=da(v=>v.companyAccountData),r=Or({base:!0,lg:!1}),i=Qe("license-builder-modal"),c="Try Musicbed with a 14-Day Free Trial",s=a==null?void 0:a["company-type"],{name:u,title:h,image:f,quote:g}=hE(s),{trialEndsAt:_,subscriptionStartsAt:w}=m.useMemo(()=>{const v=new Date,C=new Date(v.getTime()+14*24*60*60*1e3),T=new Date(C.getTime()+1*24*60*60*1e3);return{trialEndsAt:C.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),subscriptionStartsAt:T.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}},[]),b=()=>{i.show({showSoundsPricing:!0,isFreeTrialFlow:!0,source:Bo.ACCOUNT_ONBOARDING,onCheckoutComplete:()=>{e()}})};return r?d(V,{p:{base:"0px 4px 28px",md:"0px 40px 48px"},gap:32,maxW:700,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:{base:"heading.32.reg",md:"heading.40.reg"},textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text",children:c}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Includes"}),n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:r0.map((v,C)=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_OnboardingFreeTrialOffer_Flex",children:[n(_c,{fill:"#F6B84E",weight:"fill","data-cy":"_OnboardingFreeTrialOffer_StarFourIcon"}),n(S,{textStyle:"paragraph.14.reg",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text",children:v})]})},C))})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Try it free"}),d(G,{alignItems:"flex-start",gap:12,"data-cy":"_OnboardingFreeTrialOffer_Flex",children:[d(V,{alignItems:"center",gap:0,justifyContent:"space-between",pt:4,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(Ft,{h:8,w:8,bg:"background.colored.black",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"}),n(me,{h:25,w:1,bg:"background.colored.black","data-cy":"_OnboardingFreeTrialOffer_Box"}),n(me,{h:25,w:1,bg:"background.colored.gray","data-cy":"_OnboardingFreeTrialOffer_Box_13"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"}),n(me,{h:50,w:1,bg:"background.colored.gray","data-cy":"_OnboardingFreeTrialOffer_Box"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"})]}
166),d(V,{alignItems:"flex-start",gap:24,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack_18",children:[n(S,{textStyle:"heading.14.semi",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Today: Start 14-day free trial"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text_20",children:"Cancel any time during trial."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:"October 1, 2025"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text_23",children:"Weâll send a reminder 1 day before your trial ends."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:"October 2, 2025"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text_26",children:"Your subscription begins!"})]})]})]})]}),d(G,{flexDirection:{base:"column-reverse",md:"row"},gap:8,alignItems:"center",w:"100%",mt:"auto","data-cy":"_OnboardingFreeTrialOffer_Flex",children:[n(ne,{type:"button",variant:"shaded",size:"xl",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"UI.16.reg",onClick:e,"data-cy":"_OnboardingFreeTrialOffer_Button",children:"No thanks"}),n(ne,{type:"button",size:"xl",variant:"filled",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"paragraph.16.reg",onClick:b,"data-cy":"_OnboardingFreeTrialOffer_Button_29",children:"Start 14-day free trial"})]})]}):d(pr,{gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},h:{base:"100%",md:700},w:{base:"100%",md:1e3},p:{base:24,md:0},pb:{base:48,md:0},justifyItems:"center",alignItems:"center",mx:"auto",bg:"background.controls.popover",borderRadius:"0 0 8px 8px","data-cy":"_OnboardingFreeTrialOffer_Grid",children:[n(Ye,{p:"0 8px 8px",display:"flex",flexDirection:"column",gap:24,h:"100%",w:"100%",justifyContent:"space-between","data-cy":"_OnboardingFreeTrialOffer_GridItem",children:d(V,{gap:16,p:{base:"0px",md:"0px 32px 40px"},h:"100%","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(Xe,{name:"musicbedSquare",width:40,height:40,"data-cy":"_OnboardingFreeTrialOffer_Icon"}),n(S,{textStyle:{base:"heading.32.reg",md:"heading.40.reg"},textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text",children:c}),n(S,{textAlign:"left",textStyle:"paragraph.14.reg","data-cy":"_OnboardingFreeTrialOffer_Text_35",children:"Trusted by the worlds most in-demand agencies, filmmakers, and creatives, Musicbed is the most curated collection of music and sound effects for advertising, TV, and film."}),d(V,{alignItems:"flex-start",gap:40,mt:"auto","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[d(V,{alignItems:"flex-start",gap:12,"data-cy":"_OnboardingFreeTrialOffer_Stack_37",children:[n(S,{textStyle:"paragraph.14.reg",textAlign:"left","data-cy":"_OnboardingFreeTrialOffer_Text",children:g}),d(G,{alignItems:"center",gap:16,"data-cy":"_OnboardingFreeTrialOffer_Flex",children:[n(G,{h:40,w:40,borderRadius:"full",overflow:"hidden","data-cy":"_OnboardingFreeTrialOffer_Flex_40",children:n("img",{src:f,alt:u,"data-cy":"_OnboardingFreeTrialOffer_img"})}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:u}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_OnboardingFreeTrialOffer_Text_44",children:h})]})]})]}),n(Ft,{h:1,w:"100%",bg:"border.default","data-cy":"_OnboardingFreeTrialOffer_Span"}),n(Ln,{"data-cy":"_OnboardingFreeTrialOffer_TrustPilotWidget"})]})]})}),n(Ye,{display:{base:"none",md:"block"},p:{base:0,md:"0px 40px 40px 24px"},h:"100%",w:"100%",borderRadius:"0 6px 6px 0","data-cy":"_OnboardingFreeTrialOffer_GridItem",children:d(V,{gap:32,w:"100%",h:"100%",alignItems:"flex-start",p:"32px 32px 40px 32px",bg:"background",borderRadius:2,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[d(V,{"data-cy":"_OnboardingFreeTrialOffer_Stack_49",children:[n(S,{textStyle:"UI.12.reg",p:"4",bg:"background.colored.teal",w:"fit-content",borderRadius:2,"data-cy":"_OnboardingFreeTrialOffer_Text",children:"14-Day Free Trial"}),n(S,{textStyle:"heading.40.reg","data-cy":"_OnboardingFreeTrialOffer_Text_51",children:"Annual Subscription"})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Includes"}),n(Qa,{listStyleType:"none",display:"flex",flexDirection:"column",gap:8,children:r0.map((v,C)=>n(sa,{children:d(G,{alignItems:"center",gap:8,"data-cy":"_OnboardingFreeTrialOffer_Flex",children:[n(_c,{fill:"#F6B84E",weight:"fill","data-cy":"_OnboardingFreeTrialOffer_StarFourIcon"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_OnboardingFreeTrialOffer_Text",children:v})]})},C))})]}),d(V,{gap:16,alignItems:"flex-start","data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"paragraph.12.reg",textTransform:"uppercase","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Try it free"}
166),d(G,{alignItems:"flex-start",gap:12,"data-cy":"_OnboardingFreeTrialOffer_Flex",children:[d(V,{alignItems:"center",gap:0,justifyContent:"space-between",pt:4,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(Ft,{h:8,w:8,bg:"background.colored.black",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"}),n(me,{h:25,w:1,bg:"background.colored.black","data-cy":"_OnboardingFreeTrialOffer_Box"}),n(me,{h:25,w:1,bg:"background.colored.gray","data-cy":"_OnboardingFreeTrialOffer_Box_63"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"}),n(me,{h:50,w:1,bg:"background.colored.gray","data-cy":"_OnboardingFreeTrialOffer_Box"}),n(Ft,{h:8,w:8,bg:"background.colored.gray",borderRadius:"full","data-cy":"_OnboardingFreeTrialOffer_Span"})]}),d(V,{alignItems:"flex-start",gap:24,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack_68",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:"Today: Start 14-day free trial"}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_OnboardingFreeTrialOffer_Text_70",children:"Cancel any time during trial."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:_}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_OnboardingFreeTrialOffer_Text_73",children:"Weâll send a reminder 1 day before your trial ends."})]}),d(V,{alignItems:"flex-start",gap:0,"data-cy":"_OnboardingFreeTrialOffer_Stack",children:[n(S,{textStyle:"heading.14.semi","data-cy":"_OnboardingFreeTrialOffer_Text",children:w}),n(S,{textStyle:"heading.14.reg",color:"text.secondary","data-cy":"_OnboardingFreeTrialOffer_Text_76",children:"Your subscription begins!"})]})]})]})]}),d(G,{flexDirection:{base:"column-reverse",md:"row"},gap:8,alignItems:"center",w:"100%",mt:"auto","data-cy":"_OnboardingFreeTrialOffer_Flex",children:[n(ne,{variant:"shaded",size:"xl",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"UI.16.reg",type:"button",onClick:e,"data-cy":"_OnboardingFreeTrialOffer_Button",children:"No thanks"}),n(ne,{type:"button",variant:"filled",size:"xl",flex:{base:"auto",md:1},w:{base:"100%",md:"auto"},textStyle:"UI.16.reg",onClick:b,"data-cy":"_OnboardingFreeTrialOffer_Button_79",children:"Start 14-day free trial"})]})]})})]})},gE=({onJoinTeam:e,acceptedInvites:a,isFetching:r})=>d(V,{gap:32,alignItems:"flex-start",w:"100%","data-cy":"_OnboardingJoinTeam_Stack",children:[d(V,{as:"header",gap:4,alignItems:"center",w:"100%","data-cy":"_OnboardingJoinTeam_Stack_1",children:[n(S,{textStyle:"heading.24.reg","data-cy":"_OnboardingJoinTeam_Text",children:`Join your ${On((a==null?void 0:a.length)||0,"team")} on Musicbed`}),d(S,{textStyle:"paragraph.14.reg",color:"text.secondary","data-cy":"_OnboardingJoinTeam_Text_3",children:["Set up your profile and start working alongside your ",On((a==null?void 0:a.length)||0,"team")]})]}),n(V,{gap:32,w:"100%","data-cy":"_OnboardingJoinTeam_Stack",children:r?n(_E,{"data-cy":"_OnboardingJoinTeam_TeamCardSkeleton"}):n(ve,{children:a==null?void 0:a.map(i=>n(yE,{teamName:i.organization.name,invitedBy:i.invited_by_user_name,teamImageUrl:i.organization.image_url,"data-cy":"_OnboardingJoinTeam_TeamCard"},i.organization.id))})}),d(ne,{variant:"filled",size:"xl",w:"100%",textStyle:"UI.16.reg",onClick:e,"data-cy":"_OnboardingJoinTeam_Button",children:["Join the ",On((a==null?void 0:a.length)||0,"team")]})]}),yE=({teamName:e,invitedBy:a,teamImageUrl:r})=>d(G,{alignItems:"center",gap:12,"data-cy":"_OnboardingJoinTeam_Flex",children:[d(Do,{w:56,h:56,children:[n(zo,{children:n(Xe,{name:"workspaceIcon","data-cy":"_OnboardingJoinTeam_Icon"})}),n(jo,{src:r})]}),d(V,{gap:4,alignItems:"flex-start",flex:1,"data-cy":"_OnboardingJoinTeam_Stack",children:[n(S,{textStyle:"UI.16.semi","data-cy":"_OnboardingJoinTeam_Text",children:e}),d(S,{textStyle:"UI.14.reg",color:"text.secondary","data-cy":"_OnboardingJoinTeam_Text_12",children:[a," inv
166ited you"]})]})]}),_E=()=>d(G,{alignItems:"center",gap:12,"data-cy":"_OnboardingJoinTeam_Flex",children:[n(Ne,{boxSize:56,borderRadius:"full",flexShrink:0,"data-cy":"_OnboardingJoinTeam_Skeleton"}),d(V,{gap:4,alignItems:"flex-start",flex:1,"data-cy":"_OnboardingJoinTeam_Stack",children:[n(Ne,{height:16,width:140,"data-cy":"_OnboardingJoinTeam_Skeleton"}),n(Ne,{height:14,width:220,"data-cy":"_OnboardingJoinTeam_Skeleton_17"})]})]}),xE=()=>{const{data:e,...a}=Je({...Qn.fetchAcceptedTeamInvites()});return{acceptedInvites:e,...a}},bE=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le(UF,{method:nn,data:r}),onSuccess:()=>{Ro.invalidateQueries({queryKey:Et.accountOrganizations.queryKey}),Ro.invalidateQueries({queryKey:Et.accountOrganizationDetails.queryKey})}});return{createWorkspace:e,...a}},SE=()=>{const{mutateAsync:e,...a}=mt({mutationFn:({organizationId:r})=>Le(qF(r),{method:nn}),onSuccess:()=>{Ro.invalidateQueries({queryKey:Et.accountOrganizations.queryKey}),Ro.invalidateQueries({queryKey:Et.accountOrganizationDetails.queryKey}),Ro.invalidateQueries({queryKey:Et.only.queryKey})}});return{switchActiveAccount:e,...a}},wE=()=>{Ct.create({title:"Error creating workspace",description:"Please try again later or contact support if the issue persists.",type:"error"})},vE=({user:e,onSuccess:a})=>{const{createWorkspace:r,isPending:i}=bE(),{switchActiveAccount:c,isPending:s}=SE(),{uploadWorkspaceAvatar:u,isPending:h}=nu(),f=i||s||h,g=async({name:b,entityType:v,jobRole:C,workspaceAvatar:T})=>{try{const I=await r({name:b,entity_type:v,job_role:C});await c({organizationId:I.id}),T&&await u({organizationId:String(I.id),file:T}),a()}catch{wE()}};return{createBusinessWorkspace:b=>{g({name:b["workspace-name"],entityType:b["entity-type"],workspaceAvatar:b["workspace-avatar"]})},createIndividualWorkspace:b=>{var v,C;g({name:b["workspace-name"],entityType:(v=e==null?void 0:e.license_persona)==null?void 0:v.entity_type,jobRole:(C=e==null?void 0:e.license_persona)==null?void 0:C.job_role,workspaceAvatar:b["workspace-avatar"]})},isSubmittingWorkspaceCreation:f}},CE=["join-team","success","free-trial-offer","gift-offer"],TE=["free-trial-offer","gift-offer","success"],PE=({isCreatingIndividualWorkspace:e,isCreatingBusinessWorkspace:a})=>{var K,se,ae;const r=da(q=>q.userProfileData),i=Qe("onboarding-modal-container"),c=Or({base:!0,md:!1}),s=on(),{trackOnboardingEvent:u}=Rr(),{user:{data:h}}=ht(),{hasCommonDomain:f,isSuccess:g}=iE({email:h==null?void 0:h.email}),{companyData:_}=oE({email:h==null?void 0:h.email,enabled:!f}),{acceptedInvites:w,isFetching:b}=xE(),{userLocation:v}=Fy(),{updateNotificationPreferences:C}=Ly(),T=m.useRef(!1),{companyFormData:I,userProfileFormData:O,companyLogoUrl:D}=zF(_.data),A=!!r&&Yg((r==null?void 0:r.role)??""),{onboardingSteps:E,currentStep:R,currentStepKey:k,goToNextStep:z,refetchGiftEligibility:Q}=FF({isCustomDomain:!f,isInvited:(h==null?void 0:h.needs_to_complete_profile)&&!!w&&(w==null?void 0:w.length)>0,isBusiness:A,persona:(K=h==null?void 0:h.license_persona)==null?void 0:K.entity,individualWorkspace:e,businessWorkspace:a}),N=Ey({isCustomDomain:!f,isInvited:(h==null?void 0:h.needs_to_complete_profile)&&!!w&&(w==null?void 0:w.length)>0,isBusiness:A,persona:(se=h==null?void 0:h.license_persona)==null?void 0:se.entity,individualWorkspace:e,businessWorkspace:a});m.useEffect(()=>{!k||E.length===0||!g||u({step:k,step_number:R+1,flow_type:N})},[k,g]);const W=()=>{const q=Math.min(R+1,E.length-1),xe=E[q];if(TE.includes(xe)){const Ce=NC();if(Ce){window.location.href=Ce;return}}z()},{createBusinessWorkspace:Y,createIndividualWorkspace:oe,isSubmittingWorkspaceCreation:Se}=vE({user:h,onSuccess:W}),ce=()=>{switch(k){case"join-team":return n(gE,{onJoinTeam:W,acceptedInvites:w,isFetching:b,"data-cy":"_OnboardingContainer_OnboardingJoinTeam"});case"company-account":return _.isLoading?n(nE,{"data-cy":"_OnboardingContainer_CompanyAccountFormSkeleton"}):n(GF,{initialData:I,isCustomDomain:!f,isCreatingWorkspace:Se,companyLogoUrl:D,getGiftEligibility:Q,onCreateWorkspace:a?Y:void 0,onContinue:W,"data-cy":"_OnboardingContainer_CompanyAccountForm"});case"user-profile":return n(aE,{initialData:O,isCustomDomain:!f,getGiftEligibility:Q,onContinue:W,"data-cy":"_OnboardingContainer_UserProfileForm"});case"invite-team":return n(KF,{onSuccess:W,onSkip:W,"data-cy":"_OnboardingContainer_InviteTeamForm"});
166case"workspace":return n(rE,{companyLogoUrl:D,isCreatingWorkspace:Se,onCreateWorkspace:e?oe:void 0,onContinue:W,"data-cy":"_OnboardingContainer_WorkspaceForm"});case"notification-preferences":return n(JF,{onComplete:W,"data-cy":"_OnboardingContainer_NotificationPreferencesForm"});case"gift-offer":return n(mE,{onClaim:W,onSkip:W,totalSteps:E.length,currentStep:R,"data-cy":"_OnboardingContainer_GiftOfferForm"});case"free-trial-offer":return n(fE,{onClose:W,"data-cy":"_OnboardingContainer_OnboardingFreeTrialOffer"});case"success":return n(cE,{onClick:()=>{i.hide(),s("/discover")},"data-cy":"_OnboardingContainer_OnboardingSuccess"});default:return null}},we=k==="gift-offer",le=k==="free-trial-offer";return m.useEffect(()=>{var q;!v.isSuccess||T.current||((q=v.data)==null?void 0:q.requires_opt_in)===!1&&(T.current=!0,C({email_newsletter_quarterly:!0,mobile_newsletter_quarterly:!0,email_blog_updates:!0,mobile_blog_updates:!0,email_events_and_updates:!0,mobile_events_and_updates:!0}))},[v.isSuccess,(ae=v.data)==null?void 0:ae.requires_opt_in,C]),d(V,{gap:{base:24,md:32},w:{base:"100%",md:we||le?void 0:480},p:{base:20,md:le?"32px 0 0":32},alignItems:"center",borderRadius:8,bg:le&&!c?"background.controls.popover":"transparent","data-cy":"_OnboardingContainer_Stack",children:[!CE.includes(k)&&n(od,{size:"sm",totalPages:E.length,currentPage:R,showBackground:!1,containerProps:{w:260},"data-cy":"_OnboardingContainer_PaginationLines"}),ce()]})},kE=()=>{Ct.create({title:"Error updating company info",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},IE=({onClose:e,onComplete:a})=>{var T;const{updateUserPersona:r,isPending:i}=ei(),{user:{data:c}}=ht(),s=c==null?void 0:c.license_persona,u=((T=Zs.find(I=>I.value===(s==null?void 0:s.entity)))==null?void 0:T.entityType)??"",{control:h,handleSubmit:f,watch:g,setValue:_,formState:{errors:w}}=It({defaultValues:{"company-name":(s==null?void 0:s.company_name)||(c==null?void 0:c.company)||"","company-type":(s==null?void 0:s.entity)||"","entity-type":u,"company-size":(s==null?void 0:s.company_
166size)||void 0}}),b=g("company-type"),v=b==="brand"||b==="non-profit";return d(me,{p:{md:"40px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditCompanyModal_Box",children:[n(S,{textStyle:"heading.20.semi","data-cy":"_EditCompanyModal_Text",children:"Company Info"}),d(V,{as:"form",gap:"24px",mt:"24px",w:"100%",onSubmit:f(I=>{r({entity_type:I["entity-type"]||null,entity:I["company-type"]||null,company_size:I["company-size"]||null,company_name:I["company-name"]||null,job_role:(s==null?void 0:s.job_role)||null,website:null},{onSuccess:()=>{a(),e()},onError:kE})}),"data-cy":"_EditCompanyModal_Stack",children:[n(Ae,{name:"company-name",control:h,rules:{required:"Company name is required"},render:({field:I})=>{var O;return n(je,{label:"Company Name",inputProps:{...I,size:"md"},errorText:(O=w["company-name"])==null?void 0:O.message,"data-cy":"_EditCompanyModal_FormInput"})},"data-cy":"_EditCompanyModal_Controller"}),n(Ae,{name:"company-type",control:h,rules:{required:"Company type is required"},render:({field:I})=>{var O;return d(ua,{invalid:!!w["company-type"],children:[n(Ka,{size:"lg",label:"Company Type",placeholder:"Select your industry",items:Zs,defaultValue:I.value?[I.value]:void 0,onValueChange:D=>{var E,R,k;const A=((E=D.value)==null?void 0:E[0])??"";I.onChange(A),_("entity-type",((k=(R=D.items)==null?void 0:R[0])==null?void 0:k.entityType)??""),A!=="brand"&&A!=="non-profit"&&_("company-size",void 0)},"data-cy":"_EditCompanyModal_FormSelect"}),n(Da,{children:(O=w["company-type"])==null?void 0:O.message})]})},"data-cy":"_EditCompanyModal_Controller"}),v&&n(Ae,{name:"company-size",control:h,rules:{required:"Company size is required"},render:({field:I})=>{var O;return d(ua,{invalid:!!w["company-size"],children:[n(Ka,{size:"lg",label:"Company Size",placeholder:"Select company size",items:Zg,defaultValue:I.value?[I.value]:void 0,onValueChange:({value:D})=>{I.onChange((D==null?void 0:D[0])??"")},"data-cy":"_EditCompanyModal_FormSelect"}),n(Da,{children:(O=w["company-size"])==null?void 0:O.message})]})},"data-cy":"_EditCompanyModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end",pt:"12px","data-cy":"_EditCompanyModal_Flex",children:[n(ne,{variant:"outline",size:"lg",onClick:e,"data-cy":"_EditCompanyModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"lg",loading:i,"data-cy":"_EditCompanyModal_Button_11",children:"Save"})]})]})]})},ME=()=>{const{data:e,isLoading:a,error:r}=Je({...Et.accountOrganizationDetails,refetchOnWindowFocus:!1});return{accountOrganizationDetails:{data:e,isLoading:a,error:r}}},AE=({onClose:e,onComplete:a})=>{const{updateAccountDetails:r,isPending:i}=ou(),{accountOrganizationDetails:{data:c}}=ME(),{control:s,handleSubmit:u,formState:{errors:h}}=It({defaultValues:{"workspace-name":(c==null?void 0:c.name)||""}});return d(me,{p:{md:"40px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditWorkspaceNameModal_Box",children:[n(S,{textStyle:"heading.20.semi","data-cy":"_EditWorkspaceNameModal_Text",children:"Name your workspace"}),d(V,{as:"form",gap:"24px",mt:"24px",w:"100%",onSubmit:u(g=>{r({name:g["workspace-name"]},{onSuccess:()=>{a(),e()},onError:()=>{Ct.create({title:"Error updating workspace name",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})}})}),"data-cy":"_EditWorkspaceNameModal_Stack",children:[n(Ae,{name:"workspace-name",control:s,rules:{required:"Workspace name is required"},render:({field:g})=>{var _;return n(je,{label:"Workspace Name",inputProps:{...g,size:"md",placeholder:"Name your workspace"},errorText:(_=h["workspace-name"])==null?void 0:_.message,"data-cy":"_EditWorkspaceNameModal_FormInput"})},"data-cy":"_EditWorkspaceNameModal_Controller"}),d(G,{gap:"12px",justifyContent:"flex-end",pt:"12px","data-cy":"_EditWorkspaceNameModal_Flex",children:[n(ne,{variant:"outline",size:"lg",onClick:e,"data-cy":"_EditWorkspaceNameModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"lg",loading:i,"data-cy":"_EditWorksp
166aceNameModal_Button_7",children:"Save"})]})]})]})},FE=e=>e.split(/\s+/).filter(Boolean).slice(0,2).map(a=>a[0]).join("").toUpperCase(),ac=e=>e,EE=e=>{const a=(e==null?void 0:e.full_name)||[e==null?void 0:e.first_name,e==null?void 0:e.last_name].filter(Boolean).join(" ");return!(e!=null&&e.id)||!a?null:{email:e.email,full_name:a,id:e.id,profile_url:e.profile_url,role:{name:"User",value:"owner"}}},RE=e=>{const a=[e==null?void 0:e.first_name,e==null?void 0:e.last_name].filter(Boolean).join(" ");return!(e!=null&&e.user_id)||!a?null:{email:e.email??"",full_name:a,id:e.user_id,profile_url:"",role:{name:"User",value:"owner"}}},Fn=(e,a)=>{const r=e==null?void 0:e[a];return typeof(r==null?void 0:r.message)=="string"?r.message:void 0},En=(e,a)=>e[a]?`${a} is required`:void 0,OE={billingContactId:!0},LE=({contact:e})=>n(G,{alignItems:"center",justifyContent:"center",border:"0.5px solid",borderColor:"border.default",borderRadius:"999px",bg:"background.surface.2",flexShrink:0,h:32,overflow:"hidden",textStyle:"UI.12.reg",w:32,"data-cy":"_index_Flex",children:e.profileUrl?n($n,{src:e.profileUrl,alt:"",h:"100%",w:"100%",objectFit:"cover","data-cy":"_index_Image"}):FE(e.fullName)}),VE=({contact:e})=>d(G,{alignItems:"center",gap:12,minW:0,w:"100%","data-cy":"_index_Flex",children:[n(LE,{contact:e,"data-cy":"_index_BillingContactAvatar"}),d(V,{alignItems:"flex-start",gap:0,minW:0,"data-cy":"_index_Stack",children:[n(S,{textStyle:"UI.14.reg",color:"text.primary",lineHeight:1.1,truncate:!0,"data-cy":"_index_Text",children:e.fullName}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",lineHeight:1.1,truncate:!0,"data-cy":"_index_Text_6",children:e.email})]})]}),Vy=({billingDetails:e,errors:a,recurlyDataAttributes:r=!1,requiredFields:i})=>{const c={...OE,...i},{billingContactCollection:s,control:u,countryBounds:h,countryItems:f,fieldNames:g,handleAddressSelect:_,isCountriesLoading:w,isTeamMembersLoading:b,regionItems:v,setValue:C}=e;return d(ve,{children:[n(Ae,{name:g.billingContactId,control:u,rules:{required:En(c,"billingContactId")},render:({field:T})=>d(ua,{invalid:!!Fn(a,g.billingContactId),children:[d(B0,{collection:s,disabled:b,size:"md",value:T.value?[T.value]:[],positioning:{gutter:8,sameWidth:!0},onValueChange:({value:I})=>T.onChange((I==null?void 0:I[0])??""),children:[n(D0,{}),n(vC,{children:"Billing contact"}),d(j0,{children:[n(z0,{h:48,px:16,borderColor:"border.default",borderRadius:4,bg:"background.controls.input",_open:{bg:"button.secondary.hover"},children:n(W0,{placeholder:"Select a billing contact"})}),n(N0,{children:n(U0,{})})]}),n(q0,{zIndex:"popover",children:n(H0,{bg:"background.controls.modal",border:0,borderRadius:4,boxShadow:"0 0 1px rgba(0, 0, 0, 0.24), 0 12px 24px rgba(0, 0, 0, 0.2)",p:8,children:s.items.map(I=>n($0,{item:I,h:48,p:8,borderRadius:2,cursor:"pointer",children:n(Z0,{asChild:!0,children:n(VE,{contact:I,"data-cy":"_index_BillingContactOption"})})},I.value))})})]}),n(Da,{children:Fn(a,g.billingContactId)})]}),"data-cy":"_index_Controller"}),n(Ae,{name:g.country,control:u,rules:{required:En(c,"country")},render:({field:T})=>n(Ka,{size:"lg",label:"Country",placeholder:"Select country",items:f,loading:w,clearable:!1,value:T.value?[T.value]:[],onValueChange:({value:I})=>{T.onChange((I==null?void 0:I[0])??""),C(g.region,"",{shouldDirty:!0,shouldValidate:!0})},"data-cy":"_index_FormSelect"}),"data-cy":"_index_Controller"}),d(G,{gap:12,"data-cy":"_index_Flex",children:[n(Ae,{name:g.address,control:u,rules:{required:En(c,"address")},render:({field:T})=>n(md,{value:T.value,onChange:T.onChange,onSelect:_,debounce:300,searchOptions:{types:["address"],...h&&{bounds:h}},"data-cy":"_index_PlacesAutocomplete",children:({getInputProps:I,suggestions:O,getSuggestionItemProps:D})=>d(me,{flex:1,position:"relative","data-cy":"_index_Box",children:[n(je,{label:"Address",errorText:Fn(a,g.address),inputProps:ac({...I({name:T.name}),...r&&{"data-recurly":"address1"},size:"lg"}),"data-cy":"_index_FormInput"}),O.length>0&&n(Qa,{position:"absolute",zIndex:"popover",w:"100%",top:"100%",left:0,bg:"background.controls.modal",borderWidth:1,borderColor:"border.default",borderRadius:4,overflow:"hidden",mt:4,listStyleType:"none",boxShadow:"3",children:O.map((A,E)=>g0(sa,{...D(A),key:E,px:16,py:10,textStyle:"paragraph.14.reg",textAlign:"left",cursor:"pointer",bg:A.active?"button.secondary.hover":void 0,_hover:{bg:"button.secondary.hover"}},A.description))})]})}),"data-cy":"_index_Controller"}),n(Ae,{name:g.address2,control:u,render:({field:T})=>n(je,{label:"Address 2 (optional)",inputProps:{...T,placeholder:"eg. Suite/Apt",size:"lg"},rootProps:{flex:1},"data-cy":"_index_FormInput"}),"data-cy":"_index_Controller"})]}),d(G,{gap:12,"data-cy":"_index_Flex",children:[n(Ae,{name:g.city,control:u,rules:{required:En(c,"city")},render:({field:T})=>n(je,{label:"City",errorText:Fn(a,g.city),inputProps:ac({...T,...r&&{"data-recurly":"city"},size:"lg"}),rootProps:{flex:1},"data-cy":"_index_FormInput"}),"data-cy":"_index_Controller"}),n(Ae,{name:g.region,control:u,rules:{required:En(c,"region")},render:({field:T})=>v.length>0?n(Ka,{size:"lg",label:"State",placeholder:"",items:v,clearable:!1,value:T.value?[T.value]:[],onValueChange:({value:I})=>T.onChange((I==null?void 0:I[0])??""),flex:1,"data-cy":"_index_FormSelect"}):n(je,{label:"State",errorText:Fn(a,g.region),inputProps:ac({...T,...r&&{"data-recurly":"state"},size:"lg"}),rootProps:{flex:1},"data-cy":"_index_FormInput"}),"data-cy":"_index_Controller"}),n(Ae,{name:g.postalCode,control:u,rules:{required:En(c,"postalCode")},render:({field:T})=>n(je,{label:"Zip code",errorText:Fn(a,g.postalCode),inputProps:ac({...T,...r&&{"data-recurly":"postal_code"},size:"lg"}),rootProps:{flex:1},"data-cy":"_index_FormInput"}),"data-cy":"_index_Controller"})]})]})},BE=e=>{const{data:a,isLoading:r,error:i,refetch:c,...s}=Je({...Qn.fetchAllTeamMembers(e)});return{teamMembers:{data:(a==null?void 0:a.data)||[],pagination:(a==null?void 0:a.meta)||xv,isLoading:r,error:i,refetch:c},...s}},DE=e=>{const[a,r]=m.useState();return m.useEffect(()=>{var s;if(!e||typeof google>"u"||!((s=google.maps)!=null&&s.Geocoder)){r(void 0);return}let i=!1;return new google.maps.Geocoder().geocode({componentRestrictions:{country:e}},(u,h)=>{var f;i||(h===google.maps.GeocoderStatus.OK&&((f=u==null?void 0:u[0])!=null&&f.geometry)?r(u[0].geometry.bounds??u[0].geometry.viewport):r(void 0))}),()=>{i=!0}},[e]),a},By=({control:e,fallbackContact:a,fallbackUser:r,fieldNames:i,setValue:c})=>{const{teamMembers:{data:s,isLoading:u}}=BE(),{countries:{data:h,isLoading:f}}=hd(),g=ss({control:e,name:i.country}),_=ss({control:e,name:i.billingContactId}),w=ss({control:e,name:i.region}),b=DE(g),v=m.useMemo(()=>{const z=a??EE(r),Q=z?[z,...s]:s,N=new Map;return Q.forEach(W=>{N.set(W.id,W)}),Array.from(N.values())},[a,r,s]),C=m.useMemo(()=>v.map(z=>({email:z.email,fullName:z.full_name,profileUrl:z.profile_url,value:String(z.id)})),[v]),T=m.useMemo(()=>vd({itemToString:z=>`${z.fullName} ${z.email}`,items:C}),[C]),I=m.useMemo(()=>h.map(z=>({label:z.name,value:z.code})),[h]),O=m.useMemo(()=>{const z=h.find(Q=>Q.code===g);return(z==null?void 0:z.regions)??[]},[h,g]),D=m.useMemo(()=>O.map(z=>({label:z.name,value:z.name})),[O]),A=m.useMemo(()=>v.find(z=>String(z.id)===_),[v,_]),E=m.useMemo(()=>h.find(z=>z.code===g),[h,g]),R=f||u;return m.useEffect(()=>{!_&&v[0]&&c(i.billingContactId,String(v[0].id),{shouldValidate:!0})},[v,i.billingContactId,_,c]),{billingContactCollection:T,control:e,countryBounds:b,countryItems:I,fieldNames:i,handleAddressSelect:async z=>{var Q;c(i.address,z,{shouldDirty:!0,shouldValidate:!0});try{const W=((Q=(await pd(z))[0])==null?void 0:Q.address_components)??[],Y={},oe={};W.forEach(q=>
166{q.types.forEach(xe=>{Y[xe]=q.long_name,oe[xe]=q.short_name})});const Se=Y.street_number??"",ce=Y.route??"",we=[Se,ce].filter(Boolean).join(" "),le=Y.locality??Y.postal_town??Y.sublocality_level_1??"",K=Y.administrative_area_level_1??"",se=Y.postal_code??"",ae=oe.country??"";we&&c(i.address,we,{shouldDirty:!0,shouldValidate:!0}),le&&c(i.city,le,{shouldDirty:!0,shouldValidate:!0}),K&&c(i.region,K,{shouldDirty:!0,shouldValidate:!0}),se&&c(i.postalCode,se,{shouldDirty:!0,shouldValidate:!0}),ae&&c(i.country,ae,{shouldDirty:!0,shouldValidate:!0})}catch{}},isCountriesLoading:f,isTeamMembersLoading:u,metadata:{countries:h,isLoading:R,selectedBillingContact:A,selectedCountry:E,selectedRegion:w},regionItems:D,setValue:c}},jE=()=>{Ct.create({title:"Error updating billing info",description:"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},zE=({onClose:e,onComplete:a})=>{var b,v;const{updateBilling:r,isPending:i}=u6(),{billing:{data:c}}=Yv(),s=(c==null?void 0:c.billing_address)||"",{control:u,handleSubmit:h,formState:{errors:f},setValue:g}=It({defaultValues:{"billing-user-id":(b=c==null?void 0:c.billing_user)!=null&&b.id?String(c.billing_user.id):"","billing-country":((v=c==null?void 0:c.billing_country)==null?void 0:v.code)||"","billing-address":s,"billing-address-2":"","billing-city":(c==null?void 0:c.billing_city)||"","billing-region":(c==null?void 0:c.billing_region)||"","billing-postal-code":(c==null?void 0:c.billing_postal_code)||""}}),_=By({control:u,fieldNames:{address:"billing-address",address2:"billing-address-2",billingContactId:"billing-user-id",city:"billing-city",country:"billing-country",postalCode:"billing-postal-code",region:"billing-region"},setValue:g});return d(me,{p:{md:"40px 32px 32px",base:"50px 20px"},textAlign:"left",maxW:"600px",minW:{base:"auto",md:"500px"},"data-cy":"_EditBillingModal_Box",children:[n(S,{textStyle:"heading.18.semi",textAlign:"center",w:"full","data-cy":"_EditBillingModal_Text",children:"Edit billing"}),d(V,{as:"form",gap:"32px",mt:"24px",w:"100%",onSubmit:h(C=>{const T=[C["billing-address"],C["billing-address-2"]].filter(Boolean).join(", ");r({billing_user_id:Number(C["billing-user-id"]),billing_address:T||null,billing_city:C["billing-city"]||null,billing_region:C["billing-region"]||null,billing_postal_code:C["billing-postal-code"]||null,billing_country:C["billing-country"]||null},{onSuccess:()=>{a(),e()},onError:jE})}),"data-cy":"_EditBillingModal_Stack",children:[n(Vy,{billingDetails:_,errors:f,"data-cy":"_EditBillingModal_BillingDetailsFormFields"}),d(G,{gap:"16px",pt:"8px","data-cy":"_EditBillingModal_Flex",children:[n(ne,{variant:"outline",size:"lg",flex:1,onClick:e,"data-cy":"_EditBillingModal_Button",children:"Cancel"}),n(ne,{type:"submit",variant:"filled",size:"lg",flex:1,loading:i,"data-cy":"_EditBillingModal_Button_6",children:"Save"})]})]})]})},WE=({onComplete:e,defaultView:a="login"})=>{const[r,i]=m.useState(a),c=Or({base:378,md:356}),{hide:s}=Qe(),u=()=>{e==null||e(),s()};return d(me,{p:{base:"50px 20px",md:"40px 32px 32px"},textAlign:"left",maxW:"500px",minW:{base:"auto",md:"420px"},"data-cy":"_QuickAuthModal_Box",children:[r==="login"&&d(ve,{children:[n(S,{textStyle:"heading.18.semi",mb:"4px","data-cy":"_QuickAuthModal_Text",children:"Log in to your account"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary",mb:"24px","data-cy":"_QuickAuthModal_Text_2",children:"Log in to continue."}),n(UC,{hideLinks:!0,onSuccess:u,oneTapSurface:"registration-gate:quick-auth",googleButtonProps:{width:c},appleButtonProps:{width:c},"data-cy":"_QuickAuthModal_LoginForm"}),d(S,{textStyle:"paragraph.14.reg",color:"text.secondary",textAlign:"center",mt:"24px","data-cy":"_QuickAuthModal_Text",children:["Don't have an account?"," ",n(S,{as:"button",textStyle:"paragraph.14.reg",textDecoration:"underline",color:"text.primary",cursor:"pointer",onClick:()=>i("register"),"data-cy":"_QuickAuthModal_Text_5",children:"Create Free Account"})]})]}),r==="register"&&d(ve,{children:[n(S,{textStyle:"heading.18.semi",mb:"4px","data-cy":"_QuickAuthModal_Text_6",children:"Create a free account"}),n(S,{textStyle:"paragraph.14.reg",color:"text.secondary",mb:"24px","data-cy":"_Qu
166ickAuthModal_Text_7",children:"Sign up to get started."}),n(qC,{hideLinks:!0,isQuickRegistration:!0,noRefresh:!0,onQuickRegistrationSuccess:u,oneTapSurface:"registration-gate:quick-auth",googleButtonProps:{width:c},appleButtonProps:{width:c},"data-cy":"_QuickAuthModal_RegisterForm"}),d(S,{textStyle:"paragraph.14.reg",color:"text.secondary",textAlign:"center",mt:"24px","data-cy":"_QuickAuthModal_Text",children:["Already have an account?"," ",n(S,{as:"button",textStyle:"paragraph.14.reg",textDecoration:"underline",color:"text.primary",cursor:"pointer",onClick:()=>i("login"),"data-cy":"_QuickAuthModal_Text_10",children:"Log In"})]})]}),r==="success"&&n(Cd,{title:"Thanks for creating an account!",text:"Please check your email to complete the process.",buttonText:"Ok, I'll check my email",onButtonClick:u,iconColor:"primary","data-cy":"_QuickAuthModal_SuccessView"})]})},NE=()=>d(V,{gap:"0",w:{base:"100%",md:"420px"},"data-cy":"_NewspaperSuccessModal_Stack",children:[d(V,{gap:"8px",textAlign:"center",pt:"40px",px:"32px",pb:"24px","data-cy":"_NewspaperSuccessModal_Stack_1",children:[n(S,{textStyle:"heading.18.semi",color:"text.primary","data-cy":"_NewspaperSuccessModal_Text",children:"We've received your request!"}),d(S,{textStyle:"paragraph.14.reg",color:"text.primary","data-cy":"_NewspaperSuccessModal_Text_3",children:["Your copy will be on it's way shortly. In the mean time, ",n("br",{"data-cy":"_NewspaperSuccessModal_br"})," check out our amazing roster of artists."]})]}),n(me,{px:"32px",pb:"32px","data-cy":"_NewspaperSuccessModal_Box",children:n(tn,{href:"/songs",w:"full",display:"block",_hover:{textDecoration:"none"},_focus:{outline:"none"},"data-cy":"_NewspaperSuccessModal_Link",children:n(ne,{variant:"filled",size:"lg",w:"full","data-cy":"_NewspaperSuccessModal_Button",children:"Browse songs"})})})]}),UE=()=>{const{mutateAsync:e,...a}=mt({mutationFn:r=>Le("form",{method:"POST",data:r})});return{submitRequestPreferredRateForm:e,...a}},qE=()=>{const[e,a]=m.useState(!1),r=Qe(),{user:{data:i}}=ht(),{register:c,handleSubmit:s,reset:u,control:h,setValue:f,formState:{errors:g}}=It({defaultValues:{first_name:(i==null?void 0:i.first_name)??"",last_name:(i==null?void 0:i.last_name)??"",email:(i==null?void 0:i.email)??"",additional_details:"",formName:"preferred_rate_request",pageUrl:window.location.href,pageName:document.title}});m.useEffect(()=>{i!=null&&i.first_name&&f("first_name",i.first_name),i!=null&&i.last_name&&f("last_name",i.last_name),i!=null&&i.email&&f("email",i.email)},[i==null?void 0:i.first_name,i==null?void 0:i.last_name,i==null?void 0:i.email,f]);const{submitRequestPreferredRateForm:_,isPending:w}=UE(),b=()=>{u(),r.hide()},v=C=>{_(C,{onError:T=>{Ct.create({title:"Error requesting preferred rate",description:T.getFirstErrorMessage()||"Please try again later or contact support if the issue persists.",type:"error",meta:{closable:!0}})},onSuccess:()=>{a(!0),u()}})};return e?d(Me,{p:"32px",maxW:420,gap:16,align:"center","data-cy":"_RequestPreferredRateModal_VStack",children:[n(vt,{boxSize:32,color:"background.colored.positive","data-cy":"_RequestPreferredRateModal_Icon",children:n(Ec,{"data-cy":"_RequestPreferredRateModal_CheckCircleIcon"})}),d(V,{gap:8,align:"center","data-cy":"_RequestPreferredRateModal_Stack",children:[n(S,{textStyle:"heading.18.semi",color:"text.primary","data-cy":"_RequestPreferredRateModal_Text",children:"We have received your request."}),n(S,{textStyle:"paragraph.14.reg",color:"text.primary","data-cy":"_RequestPreferredRateModal_Text_5",children:"Thank you for your inquiry. Our team will review your request and reach out shortly."})]}),n(ne,{variant:"filled",h:"40px",w:"100%",mt:16,onClick:b,"data-cy":"_RequestPreferredRateModal_Button",children:n(S,{"data-cy":"_RequestPreferredRateModal_Text",children:"Close"})})]}):d(ta.form,{onSubmit:s(v),p:"40px 32px 32px",maxW:420,children:[d(Me,{gap:8,w:"full","data-cy":"_RequestPreferredRateModal_VStack",children:[n(S,{textStyle:"heading.18.semi",color:"text.primary",textAlign:"center","data-cy":"_RequestPreferredRateModal_Text",children:"Request a preferred rate"}),n(S,{textStyle:"paragraph.14.reg",color:"text.primary",textAlign:"center","data-cy":"_RequestPreferredRateModal_Text_10",children:"Tell us about the preferred rate you need."})]}),d(Me,{gap:24,w:"100%",mt:24,"data-cy":"_RequestPreferredRateModal_VStack",children:[d(Fe,{gap:16,w:"100%",alignItems:"flex-start","data-cy":"_RequestPreferredRateModal_HStack",children:[n(Ae,{name:"first_name",control:h,rules:{required:"First name is required"},render:({field:{ref:C,...T}})=>{var I;return n(je,{ref:C,label:"First name",errorText:(I=g.first_name)==null?void 0:I.message,rootProps:{flex:1},inputProps:{size:"md",...T},"data-cy":"_RequestPreferredRateModal_FormInput"})},"data-cy":"_RequestPreferredRateModal_Controller"}),n(Ae,{name:"last_name",control:h,rules:{required:"Last name is required"},render:({field:{ref:C,...T}})=>{var I;return n(je,{ref:C,label:"Last name",errorText:(I=g.last_name)==null?void 0:I.message,rootProps:{flex:1},inputProps:{size:"md",...T},"data-cy":"_RequestPreferredRateModal_FormInput"})},"data-cy":"_RequestPreferredRateModal_Controller"})]}
166),d(ua,{w:"100%",invalid:!!g.additional_details,children:[n(wd,{children:n(S,{textStyle:"UI.14.semi",color:"text.primary","data-cy":"_RequestPreferredRateModal_Text",children:"Message"})}),n(L0,{h:"96px",resize:"none",variant:"outline",borderColor:"border.default",...c("additional_details",{required:"Message is required"}),"data-cy":"_RequestPreferredRateModal_Textarea"}),g.additional_details?n(Da,{children:g.additional_details.message}):n(CC,{children:n(S,{textStyle:"UI.12.reg",color:"text.secondary","data-cy":"_RequestPreferredRateModal_Text",children:"ie. media type, distribution, term, etc."})})]})]}),d(Fe,{gap:16,justify:"flex-end",mt:32,"data-cy":"_RequestPreferredRateModal_HStack",children:[n(ne,{variant:"outline",onClick:b,flex:1,h:"40px",disabled:w,"data-cy":"_RequestPreferredRateModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_RequestPreferredRateModal_Text",children:"Cancel"})}),n(ne,{variant:"filled",type:"submit",flex:1,h:"40px",disabled:w,loading:w,"data-cy":"_RequestPreferredRateModal_Button",children:n(S,{textStyle:"button.14","data-cy":"_RequestPreferredRateModal_Text",children:"Submit"})})]})]})},HE=({enabled:e=!0,refetchInterval:a=!1}={})=>{const{data:r,isLoading:i,isFetching:c,error:s,isSuccess:u,refetch:h}=Je({...bt.overdueInvoices,enabled:e,refetchInterval:a,refetchOnWindowFocus:!1});return{overdueSubscriptionInvoices:{data:r||[],isLoading:i||c,error:s,isSuccess:u,refetch:h}}},$E=({onSuccess:e,subscriptionId:a})=>{const r=Mc.useRecurly(),i=m.useRef(r),c=m.useRef(null),s=m.useRef(e),u=m.useRef(a),[h,f]=m.useState(!1),[g,_]=m.useState(null),{data:w,isLoading:b,error:v}=Je({queryKey:[Rm],queryFn:()=>Le(Rm)});m.useEffect(()=>{s.current=e},[e]),m.useEffect(()=>{i.current=r},[r]),m.useEffect(()=>{u.current=a},[a]);const C=m.useCallback(async I=>{if(!u.current){_("Unable to update PayPal right now. Please try again."),f(!1);return}const O=await window.grecaptcha.execute("6Lf4n8cUAAAAAM7xaiXqhtsU4gE1gsMnq1kTP4wu",{action:"subscriptionUpdateCard"});await A0(u.current,{"g-recaptcha-response":O,recurly_token:I}),await s.current()},[]);m.useEffect(()=>{if(!(w!=null&&w.data)||c.current)return;const I=i.current.PayPal({braintree:{clientAuthorization:w.data.braintree.client_authorization}});return I.on("error",O=>{_(O.message??"Unable to connect to PayPal. Please try again."),f(!1)}),I.on("cancel",()=>{f(!1)}),I.on("token",async({id:O})=>{f(!0);try{await C(O)}catch(D){const A=D instanceof Error?D.message:"Unable to update PayPal right now. Please try again.";_(A),f(!1)}}),c.current=I,()=>{var O;(O=I.destroy)==null||O.call(I),c.current=null}},[w==null?void 0:w.data,C]);const T=m.useCallback(()=>{var I;if(_(null),v||!((I=w==null?void 0:w.data)!=null&&I.subscription_checkout_enabled)||!c.current){_("Unable to connect to PayPal right now. Please try again.");return}try{c.current.start()}catch{_("Unable to connect to PayPal right now. Please try again."),f(!1)}},[v,w]);return{errorMessage:g,isLoading:b,isSubmitting:h,startPayPal:T}},ZE=({onSuccess:e,subscriptionId:a})=>{const r=U4("none","brightness(0) invert(1)"),i=$E({onSuccess:e,subscriptionId:a});return d(ve,{children:[d(ne,{variant:"outline",height:"56px",w:"100%",justifyContent:"flex-start",gap:4,borderRadius:"8px",loading:i.isSubmitting||i.isLoading,disabled:i.isSubmitting||i.isLoading,onClick:i.startPayPal,"data-cy":"_PastDuePayPalButton_Button",children:[n(S,{as:"span",textStyle:"UI.14.reg","data-cy":"_PastDuePayPalButton_Text",children:"Pay with"}),n($n,{src:"https://cdn.musicbed.com/image/upload/static/account/paypalLogo.svg",alt:"PayPal Logo",style:{filter:r},objectFit:"contain","data-cy":"_PastDuePayPalButton_Image"}),n(vt,{boxSize:24,ml:"auto","data-cy":"_PastDuePayPalButton_Icon",children:n(Ja,{"data-cy":"_PastDuePayPalButton_ArrowRightIcon"})})]}),i.errorMessage&&n(S,{textStyle:"paragraph.14.reg",color:"text.colored.negative","data-cy":"_PastDuePayPalButton_Text",children:i.errorMessage})]})},Dy=ef(ZE,n(Ne,{height:"56px",w:"100%",borderRadius:"8px","data-cy":"_PastDuePayPalButton_Skeleton"})),GE=e=>`Due ${new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",timeZone:"UTC",year:"numeric"}).format(new Date(e))}`,rc=({currentOverdueInvoices:e,invoices:a,isProcessing:r})=>{var h;const i=e??a,c=new Set(i.map(f=>f.id)),s=(h=i[0])==null?void 0:h.id,u=a.findIndex(f=>f.id===s);
166return d(V,{alignItems:"flex-start",gap:16,p:r?16:"16px 16px 20px",bg:"background.warning",border:r?void 0:"1px solid",borderColor:"border.subtle.warning",borderRadius:"8px",w:"100%","data-cy":"_PastDueInvoicesList_Stack",children:[n(S,{fontSize:11,lineHeight:1,textTransform:"uppercase",color:"text.colored.warning","data-cy":"_PastDueInvoicesList_Text",children:"Payments past due"}),n(V,{alignItems:"flex-start",gap:8,w:"100%","data-cy":"_PastDueInvoicesList_Stack",children:a.map((f,g)=>{const _=r&&!c.has(f.id),w=r&&f.id===s,b=r&&u!==-1&&g>u;return d(G,{alignItems:"center",gap:4,w:"100%","data-cy":"_PastDueInvoicesList_Flex",children:[d(S,{textStyle:"UI.14.reg",color:b?"text.secondary":"text.primary","data-cy":"_PastDueInvoicesList_Text",children:["Invoice #",f.id]}),_&&n(vt,{boxSize:1,color:"background.colored.positive","data-cy":"_PastDueInvoicesList_Icon",children:n(Go,{"data-cy":"_PastDueInvoicesList_CheckIcon"})}),w&&n(Pc,{boxSize:10,color:"icon.tertiary","data-cy":"_PastDueInvoicesList_Spinner"}),n(S,{textStyle:"UI.12.reg",color:"text.secondary",textAlign:"right",ml:"auto","data-cy":"_PastDueInvoicesList_Text",children:GE(f.due_at)})]},f.id)})})]})},YE={address1:"billing address",city:"city",country:"country",cvv:"security code",first_name:"first name",last_name:"last name",month:"expiration month",number:"card number",postal_code:"postal code",state:"state or region",year:"expiration year"},KE="Something went wrong with the server, please try again.",QE="Please check your card information and try again.",ni=e=>typeof e=="object"&&e!==null,rn=(e,a)=>{const r=e==null?void 0:e[a];return ni(r)?r:void 0},Ca=(e,a)=>{const r=e==null?void 0:e[a];return typeof r=="string"?r:void 0},JE=(e,a)=>{const r=e==null?void 0:e[a];return typeof r=="number"?r:void 0},id=(e,a)=>{const r=e==null?void 0:e[a];return Array.isArray(r)?r.filter(i=>typeof i=="string"):void 0},Gc=e=>{const a=ni(e)?e:void 0;return rn(rn(a,"response"),"data")??a},n0=e=>YE[e]??e.replaceAll("_"," "),XE=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,e7=e=>/[\s.!?]$/.test(e)?e.trim():`${e.trim()}.`,t7=e=>e.length<=1?e[0]??"":e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e.at(-1)}`,jy=e=>{var s;const a=Gc(e),r=a==null?void 0:a.details,i=(Array.isArray(r)?r:[]).flatMap(u=>{if(!ni(u))return[];const h=Ca(u,"field"),f=id(u,"messages");return!h||!(f!=null&&f.length)?[]:f.filter(g=>!!g.trim()).map(g=>e7(XE(`${n0(h)} ${g.trim()}`)))});if(i.length)return i.join(" ");
166const c=[...new Set(((s=id(a,"fields"))==null?void 0:s.filter(Boolean).map(n0))??[])];return c.length?`Please check your ${t7(c)}.`:Ca(a,"message")??QE},cd=e=>{var s;const a=Gc(e),r=rn(a,"data"),i=rn(a,"error"),c=(s=zy(e))==null?void 0:s[0];return(c==null?void 0:c.message)??Ca(r,"message")??Ca(i,"message")??Ca(a,"message")??KE};function o0(e){var r;const a=(r=rn(e,"errors"))==null?void 0:r.recurly_token;if(Array.isArray(a))return a.flatMap(i=>ni(i)?[{account_id:Ca(i,"account_id"),action_token_id:Ca(i,"action_token_id"),message:Ca(i,"message")}]:[])}function zy(e){const a=Gc(e);return o0(a)??o0(rn(a,"data"))}const a7=e=>{const a=ni(e)?e:void 0,r=Gc(e),i=rn(a,"response");return{code:Ca(a,"code")??Ca(r,"code"),fields:id(r,"fields"),name:Ca(a,"name")??Ca(r,"name"),status:JE(i,"status")}},nc=(e,a)=>{const r=a==="tokenization"?jy(e):cd(e),i=new Error(e instanceof Error?e.message:r);e instanceof Error&&(i.name=e.name,i.stack=e.stack),bv(i,{extra:{...a7(e),resolvedMessage:r},tags:{"payment.operation":a}})},r7=({formRef:e,onSuccess:a,subscriptionId:r})=>{const i=Mc.useRecurly(),[c,s]=m.useState(!1),[u,h]=m.useState(null),[f,g]=m.useState(null),[_,w]=m.useState(null),[b,v]=m.useState(null),C=m.useCallback(async A=>{const E=await window.grecaptcha.execute("6Lf4n8cUAAAAAM7xaiXqhtsU4gE1gsMnq1kTP4wu",{action:"subscriptionUpdateCard"});await A0(r,{"g-recaptcha-response":E,...A})},[r]),T=m.useCallback(A=>{nc(A,"3d-secure"),h(A.message??"Your payment could not be verified. Please try again."),g(null),w(null),v(null),s(!1)},[]),I=m.useCallback(async({id:A})=>{if(!(!b||!_)){s(!0),h(null);try{await C({recurly_3d_account_id:_,recurly_3d_result_token:A,recurly_token:b}),await a()}catch(E){nc(E,"3d-secure"),h(cd(E)),s(!1)}}},[a,_,b,C]),O=m.useCallback((A,E)=>{const R=zy(A),k=R==null?void 0:R[0];if(k!=null&&k.action_token_id&&(E!=null&&E.id)){g(k.action_token_id),w(k.account_id??null),v(E.id),h(k.message??"Your payment requires additional verification. Please complete the 3D Secure process to continue."),s(!1);return}nc(A,"subscription-update"),h(cd(A)),s(!1)},[]),D=m.useCallback(()=>{e.current&&(h(null),s(!0),i.token(e.current,async(A,E)=>{if(A||!E){const R=A??new Error("Recurly did not return a payment token.");nc(R,"tokenization"),h(jy(R)),s(!1);return}try{await C({recurly_token:E.id}),await a()}catch(R){O(R,E)}}))},[e,O,a,i,C]);return{errorMessage:u,handle3DError:T,handle3DToken:I,isSubmitting:c,recurlyActionTokenId:f,updateCard:D}},n7=e=>{const a=(e==null?void 0:e.trim().split(/\s+/).filter(Boolean))??[],r=a[0]??"",i=a.length>1?a.slice(1).join(" "):r;return{firstName:r,lastName:i}},o7=({billingDetails:e,onBack:a,onSuccess:r,subscription:i})=>{var k,z;const c=m.useRef(null),[s,u]=m.useState(!1),[h,f]=m.useState(!1),{user:{data:g}}=ht(),_=m.useMemo(()=>RE(e),[e]),{control:w,formState:{isValid:b},handleSubmit:v,setValue:C}=It({defaultValues:{address:(e==null?void 0:e.address)??g.address??"",address2:(e==null?void 0:e.address2)??"",billingContactId:e!=null&&e.user_id?String(e.user_id):g.id?String(g.id):"",city:(e==null?void 0:e.city)??g.city??"",country:(e==null?void 0:e.country)||g.country||"US",postalCode:(e==null?void 0:e.postal_code)??g.postal_code??"",region:(e==null?void 0:e.region)??g.region??""},mode:"onChange"}),T=By({control:w,..._?{fallbackContact:_}:{fallbackUser:g},fieldNames:{address:"address",address2:"address2",billingContactId:"billingContactId",city:"city",country:"country",postalCode:"postalCode",region:"region"},setValue:C}),I=n7((k=T.metadata.selectedBillingContact)==null?void 0:k.full_name),O=e!=null&&e.first_name||e!=null&&e.last_name?{firstName:e.first_name??"",lastName:e.last_name??""}:I,D=((z=T.metadata.selectedCountry)==null?void 0:z.code)??"",A=T.metadata.selectedRegion??"",E=r7({formRef:c,onSuccess:r,subscriptionId:i.id}),R=!b||!s||E.isSubmitting||T.metadata.isLoading;return d(me,{position:"relative",w:{base:"100%",md:560},"data-cy":"_PastDueSubscriptionPaymentMethodForm_Box",children:[n(ne,{"aria-label":"Back to payment method options",position:"absolute",top:8,left:8,size:"sm",variant:"textOnly",onClick:a,"data-cy":"_PastDueSubscriptionPaymentMethodForm_Button",children:n(vt,{boxSize:20,"data-cy":"_PastDueSubscriptionPaymentMethodForm_Icon",children:n(Sf,{"data-cy":"_PastDueSubscriptionPaymentMethodForm_ArrowLeftIcon"})})}),d(V,{alignItems:"center",gap:32,p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_PastDueSubscriptionPaymentMethodForm_Stack",children:[n(S,{as:"h1",textStyle:"heading.18.semi",textAlign:"center",w:"100%","data-cy":"_PastDueSubscriptionPaymentMethodForm_Text",children:"Add payment method"}),d(ta.form,{ref:c,display:"flex",flexDirection:"column",gap:32,w:"100%",onSubmit:v(E.updateCard),children:[E.recurlyActionTokenId&&tC(E.recurlyActionTokenId,E.handle3DToken,E.handle3DError),d(V,{gap:16,w:"100%","data-cy":"_PastDueSubscriptionPaymentMethodForm_Stack",children:[n(Vy,{billingDetails:T,recurlyDataAttributes:!0,requiredFields:{address:!0,billingContactId:!0,city:!0,country:!0,postalCode:!0,region:!0},"data-cy":"_PastDueSubscriptionPaymentMethodForm_BillingDetailsFormFields"}),d(ua,{children:[n(wd,{children:"Credit/Debit Card"}),d(me,{minH:48,position:"relative",w:"100%","data-cy":"_PastDueSubscriptionPaymentMethodForm_Box",children:[!h&&n(Ne,{h:48,position:"absolute",inset:0,w:"100%","data-cy":"_PastDueSubscriptionPaymentMethodForm_Skeleton"}),n(Mc.CardElement,{onChange:Q=>u(Q.valid),onReady:()=>f(!0),css:ca({visibility:h?"visible":"hidden","& .recurly-element.recurly-element-card":{alignItems:"center",backgroundColor:"white",borderColor:"rgba(0, 0, 0, 0.1)",borderRadius:4,height:48}},""),"data-cy":"_PastDueSubscriptionPaymentMethodForm_CardElement"})]})]})]}),n("input",{type:"hidden","data-recurly":"first_name",value:O.firstName,readOnly:!0,"data-cy":"_PastDueSubscriptionPaymentMethodForm_input"}),n("input",{type:"hidden","data-recurly":"last_name",value:O.lastName,readOnly:!0,"data-cy":"_PastDueSubscriptionPaymentMethodForm_input_12"}),n("input",{type:"hidden","data-recurly":"country",value:D,readOnly:!0,"data-cy":"_PastDueSubscriptionPaymentMethodForm_input_13"}),n("input",{type:"hidden","data-recurly":"state",value:A,readOnly:!0,"data-cy":"_PastDueSubscriptionPaymentMethodForm_input_14"}),E.errorMessage&&n(S,{role:"alert",textStyle:"paragraph.14.reg",color:"text.colored.negative","data-cy":"_PastDueSubscriptionPaymentMethodForm_Text",children:E.errorMessage}),n(ne,{type:"submit",size:"xl",variant:"filled",w:"100%",loading:E.isSubmitting,disabled:R,"data-cy":"_PastDueSubscriptionPaymentMethodForm_Button",children:"Add card"})]})]})]})},Wy=ef(o7,n(G,{alignItems:"center",justifyContent:"center",minH:320,w:{base:"100%",md:560},"data-cy":"_PastDueSubscriptionPaymentMethodForm_Flex",children:n(Pc,{"data-cy":"_PastDueSubscriptionPaymentMethodForm_Spinner"})})),Cs="[email protected]",i7=1500,c7=3500,l7=8,Ts=({description:e})=>d(V,{as:"header",alignItems:"center",gap:8,"data-cy":"_index_Stack",children:[n(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:"Account temporarily locked"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_index_Text_2",children:e})]}),Ny=({initialInvoices:e=[]})=>{const a=pt(),r=Qe(),i=on(),[c,s]=m.useState("locked"),[u,h]=m.useState([]),f=l8({value:Cs,timeout:i7}),{overdueSubscriptionInvoices:{data:g,isSuccess:_,refetch:w}}=HE({enabled:!0}),b=m.useMemo(()=>_?g:e,[e,g,_]),v=b[0],C=(v==null?void 0:v.automatic_payments)??!0,T=v==null?void 0:v.subscription_id,{subscription:{data:I,isLoading:O}}=eg(C?T:void 0),D=Y0(),A=!!(v!=null&&v.custom)&&(v==null?void 0:v.custom_version)===2&&!(v!=null&&v.automatic_payments),E=m.useMemo(()=>{var Q;if(A)return(Q=[...b].sort((N,W)=>new Date(N.due_at).getTime()-new Date(W.due_at).getTime())[0])==null?void 0:Q.id},[b,A]),R=()=>{E!==void 0&&(r.hide(),i(`${Bt("subscriptionCart")}?invoice_id=${E}`))},k=m.useCallback(()=>{a.invalidateQueries({queryKey:bt.overdueInvoices.queryKey}
166),a.invalidateQueries({queryKey:bt.authSubscriptionDetails.queryKey}),a.invalidateQueries({queryKey:bt.list({}).queryKey}),a.invalidateQueries({queryKey:Er.list().queryKey}),a.invalidateQueries({queryKey:f0.list.queryKey}),a.invalidateQueries({queryKey:Et.only.queryKey})},[a]);m.useEffect(()=>{if(c!=="processing")return;let Q=0,N=!0;const W=async()=>{Q+=1;try{const{data:oe=[]}=await w();if(!N)return;if(oe.length===0){k(),s("success");return}Q>=l7&&s("failure")}catch{N&&s("failure")}};W();const Y=window.setInterval(W,c7);return()=>{N=!1,window.clearInterval(Y)}},[c,k,w]);const z=async()=>{h(b),k(),s("processing")};return c==="success"?d(V,{alignItems:"center",gap:24,w:{base:"100%",md:420},p:{base:"24px 16px",md:"40px 32px 32px"},"data-cy":"_index_Stack",children:[n(vt,{boxSize:16,bg:"background.colored.positive",border:"8px solid",borderColor:"background.subtle.positive",borderRadius:"100%",boxSizing:"content-box",p:8,color:"text.primary.onColor","data-cy":"_index_ChakraIcon",children:n(Go,{weight:"bold","data-cy":"_index_CheckIcon"})}),d(V,{alignItems:"center",gap:8,textAlign:"center",w:"100%","data-cy":"_index_Stack",children:[n(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:"Payment received!"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_index_Text_8",children:"Invoices are paid. Account unlocked. Find the music."})]}),n(ne,{variant:"filled",size:"lg",w:"100%",mt:16,onClick:r.hide,"data-cy":"_index_Button",children:"Done"})]}):c==="failure"?d(V,{alignItems:"center",gap:24,w:{base:"100%",md:420},p:{base:"24px 16px",md:"40px 32px 32px"},"data-cy":"_index_Stack",children:[n(vt,{boxSize:16,bg:"background.colored.negative",border:"8px solid",borderColor:"background.subtle.negative",borderRadius:"100%",boxSizing:"content-box",p:8,color:"text.primary.onColor","data-cy":"_index_ChakraIcon",children:n(RC,{weight:"bold","data-cy":"_index_XIcon"})}),d(V,{alignItems:"center",gap:8,textAlign:"center",w:"100%","data-cy":"_index_Stack",children:[n(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:"Failed transaction"}),n(S,{maxW:320,textStyle:"paragraph.14.reg","data-cy":"_index_Text_15",children:"Your transaction was declined. Please use a different card or contact your bank."})]}),n(ne,{variant:"filled",size:"lg",w:"100%",mt:16,onClick:()=>s("add-card"),"data-cy":"_index_Button",children:"Add a different payment method"})]}):c==="processing"?d(V,{alignItems:"center",gap:32,w:{base:"100%",md:460},p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_index_Stack",children:[d(V,{alignItems:"center",gap:8,textAlign:"center",w:"100%","data-cy":"_index_Stack_18",children:[n(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:"Processing payments"}),n(S,{textStyle:"paragraph.14.reg","data-cy":"_index_Text_20",children:"Your account will be restored instantly â no gaps in access."})]}),n(rc,{currentOverdueInvoices:g,invoices:u.length?u:b,isProcessing:!0,"data-cy":"_index_PastDueInvoicesList"}),n(ne,{loading:!0,size:"xl",variant:"shaded",w:"100%","aria-label":"Processing payments","data-cy":"_index_Button"})]}):c==="add-card"?O||!I?n(G,{alignItems:"center",justifyContent:"center",minH:320,w:{base:"100%",md:560},"data-cy":"_index_Flex",children:n(Pc,{"data-cy":"_index_Spinner"})}):n(Wy,{billingDetails:v==null?void 0:v.billing_details,subscription:I,onBack:()=>s("locked"),onSuccess:z,"data-cy":"_index_PastDueSubscriptionPaymentMethodForm"}):A?d(V,{alignItems:"flex-start",gap:32,w:{base:"100%",md:460},p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_index_Stack",children:[n(Ts,{description:"You have unpaid invoices. Pay your invoices to restore your account instantly.","data-cy":"_index_LockedAccountHeader"}),n(rc,{invoices:b,"data-cy":"_index_PastDueInvoicesList"}),n(ne,{variant:"filled",size:"lg",w:"100%",onClick:R,"data-cy":"_index_Button",children:"Pay invoices"})]}):C?d(V,{alignItems:"flex-start",gap:32,w:{base:"100%",md:460},p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_index_Stack",children:[n(Ts,{description:"Your last payment didn't go through. Adding a payment method restores your account instantly and prevents future interruptions.","data-cy":"_index_LockedAccountHeader"}),n(rc,{invoices:b,"data-cy":"_index_PastDueInvoicesList"}),d(V,{as:"footer",alignItems:"center",gap:12,w:"100%","data-cy":"_index_Stack",children:[n(S,{as:"h2",textStyle:"heading.14.semi","data-cy":"_index_Text",children:"Add a payment method to restore access"}
166),d(V,{alignItems:"flex-start",gap:8,w:"100%","data-cy":"_index_Stack",children:[d(ne,{variant:"outline",height:"56px",w:"100%",justifyContent:"space-between",borderRadius:"8px",onClick:()=>s("add-card"),"data-cy":"_index_Button",children:[n(S,{as:"span",textStyle:"UI.14.reg","data-cy":"_index_Text",children:"Credit or debit card"}),n(vt,{boxSize:24,"data-cy":"_index_ChakraIcon",children:n(Ja,{"data-cy":"_index_ArrowRightIcon"})})]}),n(Dy,{onSuccess:z,subscriptionId:T,"data-cy":"_index_PastDuePayPalButton"})]})]})]}):d(V,{alignItems:"flex-start",gap:32,w:{base:"100%",md:460},p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_index_Stack",children:[n(Ts,{description:"You have unpaid invoices. Contact support to update your payment method and unlock your account.","data-cy":"_index_LockedAccountHeader"}),n(rc,{invoices:b,"data-cy":"_index_PastDueInvoicesList"}),d(V,{as:"footer",alignItems:"center",gap:12,w:"100%","data-cy":"_index_Stack",children:[n(S,{as:"h2",textStyle:"heading.14.semi","data-cy":"_index_Text",children:"Contact support"}),d(V,{alignItems:"flex-start",gap:8,w:"100%","data-cy":"_index_Stack",children:[d(G,{alignItems:"center",justifyContent:"space-between",gap:16,p:16,border:"1px solid",borderColor:"border.default",borderRadius:"8px",w:"100%","data-cy":"_index_Flex",children:[d(S,{as:"span",textStyle:"UI.14.reg","data-cy":"_index_Text",children:["Email"," ",n(ta.a,{href:`mailto:${Cs}`,color:"text.colored.blue",textDecoration:"underline",outline:"none",children:Cs})]}),n(ne,{variant:"shaded",size:"sm",onClick:f.copy,"data-cy":"_index_Button",children:f.copied?"Copied!":"Copy"})]}),d(G,{alignItems:"center",justifyContent:"space-between",gap:16,p:16,border:"1px solid",borderColor:"border.default",borderRadius:"8px",w:"100%","data-cy":"_index_Flex",children:[n(S,{as:"span",textStyle:"UI.14.reg","data-cy":"_index_Text",children:"Live chat with support"}),n(ne,{variant:"shaded",size:"sm",onClick:()=>D.open(),"data-cy":"_index_Button",children:"Chat"})]})]})]})]})},uO=Object.freeze(Object.defineProperty({__proto__:null,PastDueSubscriptionLockModal:Ny},Symbol.toStringTag,{value:"Module"})),s7=(e,a)=>`${e>=10?e:`0${e}`}/${a}`,d7=({subscription:e,isExpired:a=!1})=>{const r=pt(),i=Qe(),[c,s]=m.useState("initial"),u=m.useCallback(()=>{r.invalidateQueries({queryKey:bt.authSubscriptionDetails.queryKey}),r.invalidateQueries({queryKey:bt.list({}).queryKey}),r.invalidateQueries({queryKey:Er.list().queryKey}),r.invalidateQueries({queryKey:f0.list.queryKey}),r.invalidateQueries({queryKey:Et.only.queryKey}),s("success")},[r]);return c==="success"?d(V,{alignItems:"center",gap:24,w:{base:"100%",md:420},p:{base:"24px 16px",md:"40px 32px 32px"},"data-cy":"_index_Stack",children:[n(vt,{boxSize:16,bg:"background.colored.positive",border:"8px solid",borderColor:"background.subtle.positive",borderRadius:"100%",boxSizing:"content-box",p:8,color:"text.primary.onColor","data-cy":"_index_ChakraIcon",children:n(Go,{weight:"bold","data-cy":"_index_CheckIcon"})}),n(V,{alignItems:"center",gap:8,textAlign:"center",w:"100%","data-cy":"_index_Stack",children:n(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:"Payment method updated"})}),n(ne,{variant:"filled",size:"lg",w:"100%",mt:16,onClick:i.hide,"data-cy":"_index_Button",children:"Done"})]}):c==="add-card"?n(Wy,{subscription:{id:e.id},onBack:()=>s("initial"),onSuccess:u,"data-cy":"_index_PastDueSubscriptionPaymentMethodForm"}):d(V,{alignItems:"center",gap:24,w:{base:"100%",md:460},p:{base:"24px 16px",md:"40px 32px"},"data-cy":"_index_Stack",children:[n(vt,{boxSize:16,bg:"background.colored.warning",border:"8px solid",borderColor:"background.subtle.warning",borderRadius:"100%",boxSizing:"content-box",p:8,color:"text.primary.onColor","data-cy":"_index_ChakraIcon",children:n(Bd,{weight:"bold","data-cy":"_index_ExclamationMarkIcon"})}),d(V,{alignItems:"center",gap:8,textAlign:"center",w:"100%","data-cy":"_index_Stack",children:[d(S,{as:"h1",textStyle:"heading.18.semi","data-cy":"_index_Text",children:["Your card is ",a?"expired":"expiring soon"]}),d(S,{textStyle:"paragraph.14.reg","data-cy":"_index_Text_12",children:["The card ending in ",e.card.last4," ",a?"expired":"expires"," ",s7(e.card.exp_month,e.card.exp_year),". Add a new payment method to keep your subscription active."]})]}
166),d(V,{alignItems:"flex-start",gap:8,w:"100%",mt:8,"data-cy":"_index_Stack",children:[d(ne,{variant:"outline",height:"56px",w:"100%",justifyContent:"space-between",borderRadius:"8px",onClick:()=>s("add-card"),"data-cy":"_index_Button",children:[n(S,{as:"span",textStyle:"UI.14.reg","data-cy":"_index_Text",children:"Credit or debit card"}),n(vt,{boxSize:24,"data-cy":"_index_ChakraIcon",children:n(Ja,{"data-cy":"_index_ArrowRightIcon"})})]}),n(Dy,{onSuccess:u,subscriptionId:e.id,"data-cy":"_index_PastDuePayPalButton"})]})]})},oc={"download-song-limit-reached-modal":{component:NI,defaultModalProps:{useDrawer:!0}},"download-sounds-limit-reached-modal":{component:pM,defaultModalProps:{useDrawer:!0}},"license-builder-modal":{component:sP,defaultModalProps:{useDrawer:!0}},"choose-license-modal":{component:nM,defaultModalProps:{useDrawer:!0}},"subscription-plans-modal":{component:hP,defaultModalProps:{useDrawer:!0}},"subscription-on-site-modal":{component:Bk,defaultModalProps:{useDrawer:!0}},"manage-active-subscription-modal":{component:LI,defaultModalProps:{useDrawer:!0}},"sound-effect-licensing-message-modal":{component:iM,defaultModalProps:{useDrawer:!0}},"sounds-offer-modal":{component:cM,customDrawerBackdrop:n(bh,{"data-cy":"_GlobalModalContainer_SoundsBackdrop"}),defaultModalProps:{useDrawer:!0,closeIconColor:"light",overlayCloseIcon:!0,...xs}},"start-subscription-now-modal":{component:EM,defaultModalProps:{useDrawer:!0,...xs({m:16,borderRadius:8})}},"request-sounds-access-modal":{component:AM,customDrawerBackdrop:n(bh,{"data-cy":"_GlobalModalContainer_SoundsBackdrop_1"}),defaultModalProps:{useDrawer:!0,...xs}},"unlock-premium-features-modal":{component:lM,defaultModalProps:{useDrawer:!0}},"header-popover-as-modal":{component:dM,defaultModalProps:{useDrawer:!1,placement:"bottom"}},"enterprise-request-modal":{component:uM,defaultModalProps:{useDrawer:!0}},"add-to-project-popover-as-modal":{component:kM,defaultModalProps:{useDrawer:!1}},"new-project-modal":{component:pC,defaultModalProps:{useDrawer:!0}},"feature-banner-modal":{component:GA,defaultModalProps:{useDrawer:!0,drawerBodyProps:{mt:"0px",borderRadius:"6px 6px 0 0"},closeIconColor:"light",overlayCloseIcon:!0}},"free-trial-offer-modal":{component:KA,defaultModalProps:{useDrawer:!0}},"single-song-upsell-modal":{component:o5,defaultModalProps:{useDrawer:!0}},"onboarding-modal-container":{component:PE,defaultModalProps:{useDrawer:!0}},"edit-contact-info-modal":{component:c5,defaultModalProps:{useDrawer:!0}},"edit-security-settings-modal":{component:s5,defaultModalProps:{useDrawer:!0}},"edit-persona-info-modal":{component:b5,defaultModalProps:{useDrawer:!0}},"confirm-modal":{component:S5,defaultModalProps:{useDrawer:!0}},"add-team-member-modal":{component:A5,defaultModalProps:{useDrawer:!0}},"transfer-ownership-modal":{component:U5,defaultModalProps:{useDrawer:!0}},"edit-team-member-role-modal":{component:O5,defaultModalProps:{useDrawer:!0}},"avatar-crop-modal":{component:Ay,defaultModalProps:{useDrawer:!0}},"edit-company-modal":{component:IE,defaultModalProps:{useDrawer:!0}},"edit-workspace-name-modal":{component:AE,defaultModalProps:{useDrawer:!0}},"edit-billing-modal":{component:zE,defaultModalProps:{useDrawer:!0}},"quick-auth-modal":{component:WE,defaultModalProps:{useDrawer:!0}},"newspaper-success-modal":{component:NE},"request-preferred-rate-modal":{component:qE,defaultModalProps:{useDrawer:!0}},"past-due-subscription-lock-modal":{component:Ny,defaultModalProps:{useDrawer:!0,noClose:!0}},"expiring-card-modal":{component:d7,defaultModalProps:{useDrawer:!0}}},pO=()=>{var b,v,C,T;const[e,a]=m.useContext(Mf),{view:r,props:i,modalProps:c}=e,s=r?(b=oc[r])==null?void 0:b.component:null,u=r?(v=oc[r])==null?void 0:v.customDrawerBackdrop:null,h=r?(C=oc[r])==null?void 0:C.customModalBackdrop:null,g={...r?(T=oc[r])==null?void 0:T.defaultModalProps:{},...c},_=Or({base:!0,md:!1});return s?n(Iv,{view:r,onClose:()=>{var I,O;a({view:null,props:null,modalProps:null}),(I=i==null?void 0:i.onClose)==null||I.call(i),(O=c==null?void 0:c.onClose)==null||O.call(c)},customDrawerBackdrop:u,customModalBackdrop:h,isMobileOrTablet:_,...g,"data-cy":"_GlobalModalContainer_BaseModal",children:n(s,{...i,"data-cy":"_GlobalModalContainer_View"})}):null};export{eu as $,Vc as A,rO as B,nM as C,Rc as D,yh as E,kF as F,Gf as G,yc as H,j5 as I,Ja as J,Mf as K,e5 as L,t5 as M,rM as N,a5 as O,mP as P,sM as Q,sO as R,_6 as S,rT as T,tO as U,Jo as V,HE as W,pO as X,L8 as Y,z8 as Z,eE as _,XA as a,Gg as a0,Nd as a1,aO as a2,lh as a3,Jf as a4,Qn as a5,qo as a6,M5 as a7,lO as a8,uf as a9,_f as aa,Xo as ab,ME as ac,Lo as ad,nu as ae,BE as af,Zs as ag,Zg as ah,Es as ai,w8 as aj,P8 as ak,C8 as al,v8 as am,T8 as an,eO as ao,Sf as ap,dO as aq,oO as ar,uO as as,Qe as b,eg as c,Ec as d,jd as e,tM as f,cO as g,Xd as h,ou as i,DE as j,iO as k,bf as l,Bf as m,Oc as n,PM as o,eM as p,mM as q,_c as r,gM as s,CM as t,zd as u,ai as v,ln as w,nO as x,KC as y,Dd as z}; 167
168//# debugId=5b73342b-31a5-5d1e-8c12-4dabf8d1f7c6
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.