1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4725],{13187:(e,t,r)=>{r.d(t,{default:()=>u});var a=r(19115),n=r(49635),i=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&d(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&d(e,r,t[r]);return e},u=(0,a.forwardRef)((e,t)=>{let r=c(c({},a.useContext(n.IconoirContext)),e);return a.createElement("svg",c({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19 20H5C3.89543 20 3 19.1046 3 18V9C3 7.89543 3.89543 7 5 7H19C20.1046 7 21 7.89543 21 9V18C21 19.1046 20.1046 20 19 20Z",stroke:"currentColor"}),a.createElement("path",{d:"M16.5 14C16.2239 14 16 13.7761 16 13.5C16 13.2239 16.2239 13 16.5 13C16.7761 13 17 13.2239 17 13.5C17 13.7761 16.7761 14 16.5 14Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 7V5.60322C18 4.28916 16.7544 3.33217 15.4847 3.67075L4.48467 6.60409C3.60917 6.83756 3 7.63046 3 8.53656V9",stroke:"currentColor"}))})},27834:(e,t,r)=>{r.d(t,{ProfileMobileHeader:()=>B});var a=r(43163),n=r(19115),i=r(60808),s=r(50401),o=r(31867),l=r(86806),d=r(80439),c=r(22632),u=r(83213),p=r(79400),m=r(43179),f=r(87272),g=r(94759),x=r(89832),b=r(91601),v=r(93416),y=r(735),h=r(79915),w=r(21089),j=r(4237),N=r(83579),C=r(74195),k=r(43981),E=r(14394),S=r(99921),P=r(99785),L=r(30830),O=r(70018),U=r(51757),R=r(6968),T=r(8671),I=r(36857),A=r(84826),z=r(77682),M=r(45121);function B({profile:e,pageId:t,isHomepage:r,ownerSlug:D}){let{ensName:W,firstTxDate:_}=(0,s.v)(),{setIsSaving:V}=(0,l.KR)(),{hasClaimAccess:$}=(0,w.w)(),{user:G,refreshUser:H}
1=(0,c.k)(),F=(0,z.j)(),[K,Z]=(0,n.useState)(!1),[Y,q]=(0,n.useState)(!1),[J,X]=(0,n.useState)(null),Q=(0,n.useRef)(null),[ee,et]=(0,n.useState)(""),[er,ea]=(0,n.useState)(!1),en=(0,n.useRef)(null),ei=(0,n.useRef)(null),es=(0,n.useRef)(!1);(0,n.useEffect)(()=>{let t=D||e?.username||e?.ensName||e?.address;X(t?`${window.location.origin}/${t}`:null)},[D,e?.address,e?.ensName,e?.username]);let eo=(0,o.X)("current"),el=eo.canRenderOwnerChrome,ed=eo.canEditBranding,ec=eo.canRenderVisitorOnlyChrome,eu=eo.isDirectOwner,ep=(0,d.Kf)(),em=ep?.previewProfile,ef=em?.displayName||e?.displayName||(eu?G?.display_name:null),eg=e?.ensName||(eu?W:null),ex=e?.address?`${e.address.slice(0,6)}...${e.address.slice(-4)}`:null,eb=ef||eg||ex||"Anonymous",{isSavingName:ev,recordNameDraft:ey,saveName:eh}=(0,A.B)({canSave:ed,scope:"page",pageId:t,profileAddress:e?.address,profileUserId:e?.userId,currentName:ef,fallbackDisplayName:eb,refreshUser:H,setGlobalSaving:V,onSaved:()=>{es.current=!1},onRollback:e=>{es.current=!1,et(e),en.current&&(en.current.textContent=e)}}),{avatarUrl:ew,isUpdating:ej,uploadAvatar:eN,removeAvatar:eC,setEnsAvatar:ek,error:eE}=(0,R.d)({scope:"page",pageId:t,profileUserId:e?.userId,pageType:e?.pageType,initialAvatarUrl:em?.avatarUrl||e?.avatarUrl||null,refreshUser:H}),eS=em?.bio||e?.bio||(eu?G?.bio:null),eP=e?.firstTxDate||(eu?G?.first_tx_date||_:null),eL=e?.lastTxTimestamp||null,eO=(0,U.d)({farcasterUsername:e?.farcasterUsername,ensName:eg,walletAddress:e?.address}),{editedBio:eU,isSavingBio:eR,bioRef:eT,handleBioChange:eI,handleBioBlur:eA,BIO_MAX_LENGTH:ez}=(0,S.D)({bio:eS,scope:"page",profileAddress:e?.address??void 0,pageId:t,refreshUser:H,setIsSaving:V});(0,n.useEffect)(()=>{er||ev||es.current&&ee!==eb||(es.current=!1,et(eb||""))},[eb,ee,er,ev]),(0,n.useEffect)(()=>{!en.current||!ed||er||ev||es.current&&ee!==eb||(en.current.textContent=eb||"")},[eb,ee,er,ev,ed]),(0,n.useEffect)(()=>{Z(!1),q(!1)},[ew]),(0,n.useEffect)(()=>()=>{ei.current&&clearTimeout(ei.current)},[]);let eM=(0,n.useCallback)(e=>{ey(e),ei.current&&clearTimeout(ei.current),ei.current=setTimeout(()=>eh(e),1500)},[ey,eh]),eB=(0,n.useCallback)(e=>{if(e.length>50){if(en.current){var t;let e,r;en.current.textContent=ee,t=en.current,e=document.createRange(),r=window.getSelection(),e.selectNodeContents(t),e.collapse(!1),r?.removeAllRanges(),r?.addRange(e)}return}et(e),es.current=e!==eb,eM(e)},[eM,eb,ee]),eD=(0,n.useCallback)(e=>{eB(e.currentTarget.textContent||"")},[eB]),eW=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=e.clipboardData.getData("text/plain").replace(/\n/g," ");(0,M.u2)(en.current,t),eB(en.current?.textContent||"")},[eB]),e_=(0,n.useCallback)(e=>{"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),en.current?.blur()):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation())},[]),eV=(0,n.useCallback)(()=>{ea(!1),ei.current&&(clearTimeout(ei.current),ei.current=null),eh(en.current?.textContent??ee)},[ee,eh]);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"relative px-10 pt-12 pb-6 lg:hidden",children:[el?(0,a.jsx)(i.P.div,{initial:!F&&{opacity:0},animate:{opacity:1},transition:{duration:.4*!F,delay:.3*!F},className:"absolute top-12 right-10 z-10",children:(0,a.jsx)(g.JY,{profileUrl:J||window.location.href,avatarUrl:e?.avatarUrl||em?.avatarUrl||void 0,pageTitle:eb,isOwner:!0,ogImageUrl:e?.ogImageUrl,side:"bottom",align:"end",displayName:eb,trigger:(0,a.jsxs)("button",{type:"button","aria-label":"Share my page",className:"relative flex h-10 cursor-pointer items-center gap-1.5 overflow-hidden rounded-xl px-5 text-sm font-semibold text-white shadow-sm transition-[box-shadow,filter] hover:shadow-md focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 focus-visible:outline-none data-[state=open]:ring-[1.5px] data-[state=open]:ring-gray-900",style:{background:"linear-gradient(135deg, #2d1f3d, #1a1a2e, #2d1f3d)"},children:[!F&&(0,a.jsx)("span",{className:"pointer-events-none absolute top-0 bottom-0",style:{width:"60%",left:"-60%",background:"linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.12) 40%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.12) 60%, transparent 80%)",animation:"share-glass 12s ease-in-out infinite"}}),(0,a.jsx)("span",{className:"relative z-10",children:"Share my page"})]})})}
1):ec&&!r&&(0,a.jsx)(i.P.div,{initial:!F&&{opacity:0},animate:{opacity:1},transition:{duration:.4*!F,delay:.3*!F},className:"absolute top-12 right-10 z-10",children:(0,a.jsx)(g.JY,{profileUrl:window.location.href,avatarUrl:e?.avatarUrl||void 0,pageTitle:e?.displayName||void 0,isOwner:!1,ogImageUrl:e?.ogImageUrl,side:"bottom",align:"end",displayName:eb,trigger:(0,a.jsxs)("button",{type:"button","aria-label":"Share page",className:"flex h-10 items-center gap-1.5 rounded-xl border border-gray-4 bg-gray-2 px-3 text-sm font-medium text-gray-9 transition-colors hover:bg-gray-3 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none",children:[(0,a.jsx)(p.default,{className:"size-3.5",strokeWidth:2}),"Share"]})})}),(0,a.jsxs)(i.P.div,{className:"relative w-fit",initial:!F&&{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.5*!F,ease:"easeOut"},children:[ew&&!Y?ed?(0,a.jsx)("button",{type:"button","aria-label":"Upload profile image",onClick:()=>Q.current?.click(),className:"cursor-pointer rounded-full focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none",children:(0,a.jsxs)(u.eu,{className:"size-[120px] border border-gray-300",children:[(0,a.jsx)(u.BK,{src:ew,alt:eb,className:(0,P.cn)(!F&&"transition-opacity duration-300",K?"opacity-100":"opacity-0"),onLoad:()=>Z(!0),onLoadingStatusChange:e=>{"error"===e&&q(!0)}}),(0,a.jsx)(u.q5,{className:"bg-muted",children:(0,a.jsx)("div",{"aria-hidden":"true",className:(0,P.cn)("size-6 rounded-full border-2 border-muted-foreground/20 border-t-muted-foreground/60",!F&&"animate-spin")})})]})}):(0,a.jsxs)(u.eu,{className:"size-[120px] border border-gray-300",children:[(0,a.jsx)(u.BK,{src:ew,alt:eb,className:(0,P.cn)(!F&&"transition-opacity duration-300",K?"opacity-100":"opacity-0"),onLoad:()=>Z(!0),onLoadingStatusChange:e=>{"error"===e&&q(!0)}}),(0,a.jsx)(u.q5,{className:"bg-muted",children:(0,a.jsx)("div",{"aria-hidden":"true",className:(0,P.cn)("size-6 rounded-full border-2 border-muted-foreground/20 border-t-muted-foreground/60",!F&&"animate-spin")})})]}):ed?(0,a.jsxs)("div",{className:"relative flex size-[120px] flex-col items-center justify-center gap-2 rounded-full border-2 border-dashed border-muted-foreground/30 bg-muted/50",children:[(0,a.jsxs)("button",{type:"button","aria-label":"Upload profile image",onClick:()=>Q.current?.click(),className:"flex flex-col items-center gap-0.5 rounded-xl focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none",children:[(0,a.jsx)(m.default,{className:"size-5 text-muted-foreground/60",strokeWidth:1.5}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:"Add photo"})]}),eg&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"h-px w-10 bg-muted-foreground/20"}),(0,a.jsxs)("button",{type:"button","aria-label":"Use ENS avatar",onClick:()=>void ek((0,L.h)(eg)),disabled:ej,className:"flex items-center gap-1 rounded-lg text-[10px] text-muted-foreground/60 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:opacity-50",children:[(0,a.jsx)(O.iP,{className:"size-3.5"}),(0,a.jsx)("span",{children:"Use ENS"})]})]})]}):(0,a.jsx)(T.d,{displayName:eb,className:"size-[120px] border border-gray-300"}),ed&&ew&&!ej&&(0,a.jsx)("button",{type:"button","aria-label":"Remove profile image",onClick:e=>{e.stopPropagation(),eC()},className:"absolute top-1 right-1 flex size-8 cursor-pointer items-center justify-center rounded-full bg-white shadow-md transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none",children:(0,a.jsx)(f.default,{"aria-hidden":"true",focusable:"false",className:"size-4 text-gray-600",strokeWidth:2})}),ej&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-black/50",children:(0,a.jsx)("div",{"aria-hidden":"true",className:(0,P.cn)("size-6 rounded-full border-2 border-white border-t-transparent",!F&&"animate-spin")})}),(0,a.jsx)("input",{ref:Q,type:"file",accept:"image/*","aria-label":"Upload profile image",onCh
1ange:e=>{let t=e.target.files?.[0];t&&ed&&eN(t),e.currentTarget.value=""},className:"hidden"}),eE&&ed&&(0,a.jsx)("p",{role:"alert","aria-live":"polite",className:"absolute top-full mt-2 w-[120px] text-center text-xs text-red-600",children:eE})]}),(0,a.jsx)(i.P.div,{className:"mt-6",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.1*!F},children:ed?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{ref:en,contentEditable:!0,role:"textbox","aria-label":"Edit profile name",suppressContentEditableWarning:!0,onInput:eD,onKeyDown:e_,onPaste:eW,onFocus:()=>ea(!0),onBlur:eV,className:(0,P.cn)("min-h-[1.2em] cursor-text text-[32px] leading-[1.2] font-bold tracking-[-1px] text-foreground",I.x.profileEditableFocusRing)}),!ee&&!er&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 text-[32px] leading-[1.2] font-bold tracking-[-1px] text-muted-foreground/50","aria-hidden":!0,children:"Your name..."})]}):(0,a.jsx)("p",{className:"min-h-[1.2em] text-[32px] leading-[1.2] font-bold tracking-[-1px]",children:eb})}),(0,a.jsx)(i.P.div,{className:"mt-3",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.15*!F},children:ed?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{ref:eT,value:eU,"aria-label":"Edit profile bio",onChange:eI,onBlur:eA,placeholder:"Your bio...",maxLength:ez,rows:1,className:(0,P.cn)("[field-sizing:content] min-h-[1.5em] w-full resize-none bg-transparent text-base leading-relaxed text-muted-foreground placeholder:text-muted-foreground/50",I.x.profileBioEditableFocus)}),eU&&(0,a.jsx)("div",{className:"mt-0.5 flex items-center gap-2",children:(0,a.jsxs)("span",{className:(0,P.cn)("text-xs font-semibold",eU.length>=ez?"text-destructive":"text-muted-foreground/40"),children:[eU.length,"/",ez," characters"]})})]}):eS&&(0,a.jsx)("div",{className:"flex min-h-[1.5em] flex-col gap-0.5 text-base leading-relaxed text-muted-foreground",children:eS.split(/\n{2,}/).map((e,t)=>(0,a.jsx)("p",{className:"whitespace-pre-line",children:e},t))})}),r&&(0,a.jsx)(i.P.div,{className:"mt-8",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.2*!F},children:(0,a.jsx)(k.I,{})}),e?.pageType==="community"&&!$&&(0,a.jsx)(i.P.div,{className:"mt-4",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.2*!F},children:(0,a.jsx)(h.b,{updatedAt:e.pageUpdatedAt,...e.lastEditedByUsername?{managerName:e.lastEditedByName||e.lastEditedByUsername,managerUrl:`/${e.lastEditedByUsername}`,managerAvatar:e.lastEditedByAvatar||"/clawlinker-avatar.png"}:{}})}),(0,a.jsx)(j.z,{pageType:e?.pageType}),e?.pageType==="token"&&e?.address&&(0,a.jsx)(i.P.div,{className:"mt-4",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.2*!F},children:(0,a.jsx)(N.r,{tokenAddress:e.address})}),!r&&e?.pageType!=="community"&&e?.pageType!=="token"&&(e?.address||e?.ensName||eP||e?.isAgent)&&(0,a.jsx)(i.P.div,{className:"mt-6 flex flex-col gap-2 text-sm text-muted-foreground",initial:!F&&{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.2*!F},children:(e?.isAgent||e?.address||e?.ensName)&&(0,a.jsxs)("div",{className:"flex min-h-[26px] flex-wrap items-center gap-1.5",children:[e?.isAgent&&e.erc8004AgentId&&(0,a.jsx)(y.N,{variant:"verified",agentId:e.erc8004AgentId,registrationData:e.erc8004RegistrationData,registeredAt:e.erc8004RegisteredAt,lastUpdatedAt:e.erc8004LastUpdatedAt}),e?.farcasterUsername&&(0,a.jsx)(v.J,{farcasterUsername:e.farcasterUsername,walletAddress:eO.farcasterWalletAddress,ensName:eO.farcasterEnsName,firstTxDate:eP,lastTxTimestamp:eL}),eO.showEnsBadge&&eg&&(0,a.jsx)(x.W,{ensName:eg||null,walletAddress:e.address,firstTxDate:eP,lastTxTimestamp:eL,showExpiryWarning:!!e.ensExpiryWarning,expiryStatus:e.ensExpiryWarning?.status,expiryDaysRemaining:e.ensExpiryWarning?.daysRemaining,expiryMessage:e.ensExpiryWarning?.message}),!r&&(0,a.jsx)(b.G,{}),!r&&t&&!$&&(0,a.jsx)("span",{className:"text-xs",style:{marginLeft:"12px"},children:(0,a.jsx)(E.E,{pageId:t,scope:"current"})})]})}),!r&&e&&!e.isRegistered&&(0,a.jsx)(i.P.div,{className:"mt-4",initial:!F&&{op
1acity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4*!F,delay:.25*!F},children:(0,a.jsx)(C.Z,{profile:e})})]})})}},39084:(e,t,r)=>{var a=r(19115),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=a.useState,s=a.useEffect,o=a.useLayoutEffect,l=a.useDebugValue;function d(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),a=i({inst:{value:r,getSnapshot:t}}),n=a[0].inst,c=a[1];return o(function(){n.value=r,n.getSnapshot=t,d(n)&&c({inst:n})},[e,r,t]),s(function(){return d(n)&&c({inst:n}),e(function(){d(n)&&c({inst:n})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c},43179:(e,t,r)=>{r.d(t,{default:()=>u});var a=r(19115),n=r(49635),i=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&d(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&d(e,r,t[r]);return e},u=(0,a.forwardRef)((e,t)=>{let r=c(c({},a.useContext(n.IconoirContext)),e);return a.createElement("svg",c({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 16V4M12 4L15.5 7.5M12 4L8.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))})},45004:(e,t,r)=>{r.d(t,{default:()=>u});var a=r(19115),n=r(49635),i=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&d(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&d(e,r,t[r]);return e},u=(0,a.forwardRef)((e,t)=>{let r=c(c({},a.useContext(n.IconoirContext)),e);return a.createElement("svg",c({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 11.5V16.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 7.51L12.01 7.49889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))})},52436:(e,t,r)=>{r.d(t,{H4:()=>N,_V:()=>j,bL:()=>w});var a=r(19115),n=r(43163),i=r(69728),s=r(88052),o=r(88999),l=r(96465);function d(){return()=>{}}var c="Avatar",[u,p]=function(e,t=[]){let r=[],i=()=>{let t=r.map(e=>a.createContext(e));return function(r){let n=r?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return i.scopeName=e,[function(t,i){let s=a.createContext(i);s.displayName=t+"Context";let o=r.length;r=[...r,i];let l=t=>{let{scope:r,children:i,...l}=t,d=r?.[e]?.[o]||s,c=a.useMemo(()=>l,Object.values(l));return(0,n.jsx)(d.Provider,{value:c,children:i})};return l.displayName=t+"Provider",[l,function(r,n){let l=n?.[e]?.[o]||s,d=a.useContext(l);if(d)return d;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:a})=>{let n=r(e)[`__scope${a}`];return{...t,...n}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(i,...t)]}(c),[m,f]=u(c),g=a.forwardRef((e,t)=>{let{__scopeAvatar:r,...i}=e,[s,l]=a.useState("idle");return(0,n.jsx)(m,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:l,children:(0,n.jsx)(o.sG.span,{...i,ref:t})})});g.displayName=c;var x="AvatarImage",b=a.forwardRef((e,t)=>
1{let{__scopeAvatar:r,src:c,onLoadingStatusChange:u=()=>{},...p}=e,m=f(x,r),g=function(e,{referrerPolicy:t,crossOrigin:r}){let n=(0,l.useSyncExternalStore)(d,()=>!0,()=>!1),i=a.useRef(null),o=n?(i.current||(i.current=new window.Image),i.current):null,[c,u]=a.useState(()=>h(o,e));return(0,s.N)(()=>{u(h(o,e))},[o,e]),(0,s.N)(()=>{let e=e=>()=>{u(e)};if(!o)return;let a=e("loaded"),n=e("error");return o.addEventListener("load",a),o.addEventListener("error",n),t&&(o.referrerPolicy=t),"string"==typeof r&&(o.crossOrigin=r),()=>{o.removeEventListener("load",a),o.removeEventListener("error",n)}},[o,r,t]),c}(c,p),b=(0,i.c)(e=>{u(e),m.onImageLoadingStatusChange(e)});return(0,s.N)(()=>{"idle"!==g&&b(g)},[g,b]),"loaded"===g?(0,n.jsx)(o.sG.img,{...p,ref:t,src:c}):null});b.displayName=x;var v="AvatarFallback",y=a.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:i,...s}=e,l=f(v,r),[d,c]=a.useState(void 0===i);return a.useEffect(()=>{if(void 0!==i){let e=window.setTimeout(()=>c(!0),i);return()=>window.clearTimeout(e)}},[i]),d&&"loaded"!==l.imageLoadingStatus?(0,n.jsx)(o.sG.span,{...s,ref:t}):null});function h(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}y.displayName=v;var w=g,j=b,N=y},53796:(e,t,r)=>{r.d(t,{bL:()=>w,zi:()=>j});var a=r(19115),n=r(1713),i=r(98101),s=r(25865),o=r(37232),l=r(51836),d=r(25266),c=r(43163),u="Switch",[p,m]=(0,s.A)(u),[f,g]=p(u),x=a.forwardRef((e,t)=>{let{__scopeSwitch:r,name:s,checked:l,defaultChecked:p,required:m,disabled:g,value:x="on",onCheckedChange:b,form:v,...w}=e,[j,N]=a.useState(null),C=(0,i.s)(t,e=>N(e)),k=a.useRef(!1),E=!j||v||!!j.closest("form"),[S,P]=(0,o.i)({prop:l,defaultProp:p??!1,onChange:b,caller:u});return(0,c.jsxs)(f,{scope:r,checked:S,disabled:g,children:[(0,c.jsx)(d.sG.button,{type:"button",role:"switch","aria-checked":S,"aria-required":m,"data-state":h(S),"data-disabled":g?"":void 0,disabled:g,value:x,...w,ref:C,onClick:(0,n.mK)(e.onClick,e=>{P(e=>!e),E&&(k.current=e.isPropagationStopped(),k.current||e.stopPropagation())})}),E&&(0,c.jsx)(y,{control:j,bubbles:!k.current,name:s,value:x,checked:S,required:m,disabled:g,form:v,style:{transform:"translateX(-100%)"}})]})});x.displayName=u;var b="SwitchThumb",v=a.forwardRef((e,t)=>{let{__scopeSwitch:r,...a}=e,n=g(b,r);return(0,c.jsx)(d.sG.span,{"data-state":h(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t})});v.displayName=b;var y=a.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{let d,u=a.useRef(null),p=(0,i.s)(u,o),m=(d=a.useRef({value:r,previous:r}),a.useMemo(()=>(d.current.value!==r&&(d.current.previous=d.current.value,d.current.value=r),d.current.previous),[r])),f=(0,l.X)(t);return a.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(m!==r&&t){let a=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(a)}},[m,r,n]),(0,c.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:p,style:{...s.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function h(e){return e?"checked":"unchecked"}y.displayName="SwitchBubbleInput";var w=x,j=v},88999:(e,t,r)=>{r.d(t,{sG:()=>s});var a=r(19115);r(78506);var n=r(6658),i=r(43163),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,n.TL)(`Primitive.${t}`),s=a.forwardRef((e,a)=>{let{asChild:n,...s}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?r:t,{...s,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{})},89233:(e,t,r)=>{r.d(t,{default:()=>u});var a=r(19115),n=r(49635),i=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&d(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&d(e,r,t[r]);return e},u=(0,a.forwardRef)((e,t)=>{let r=c(c({},a.useContext(n.IconoirContext)),e);return a.createElement("svg",c({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M22 9V17C22 18.1046 21.1046 19 20 19H4C2.89543 19 2 18.1046 2 17V7C2 5.89543 2.89543 5 4 5H20C21.1046 5 22 5.89543 22 7V9ZM22 9H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))})},96465:(e,t,r)=>{e.exports=r(39084)}}]);
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.