PageSourceSearch

https://photobucket.com/assets/js/groups-fRAOQbil.js

js photobucket.com collected 2026-09-24 06:57:04 UTC 8,499 bytes, 1 lines download raw bytes

1var T=Object.defineProperty;var G=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var C=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&C(e,r,t[r]);if(G)for(var r of G(t))E.call(t,r)&&C(e,r,t[r]);return e};import{_ as o,a as m,b as N}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B177jzqY.js";import{s as B,m as L,L as R,v as P,M as O,N as D,y as U,l as z,i as j,I as V,o as $,p as H,P as K,Q,j as F,d as Z}from"./index-C8DIms-h.js";import{c as _,b as v,e as g,i as W,a as q}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js-ClGO9exV.js";import{B as J}from"./useBucketList-Dp_j2Qaf.js";import{u as X}from"./CreateGroupDrawerContext-CYmLA6sq.js";import{d as S}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_router_mf_2_dom__loadShare__.js-CK4j7iSY.js";import{C as Y}from"./CoverCard-CI-Q54-M.js";import{u as ee}from"./useGroupCounters-htIN71tD.js";import{u as te}from"./useDormantMigrationProgress-DJLNmhqd.js";import{M as re,a as oe,D as ne,b as ie,c as h}from"./menu-BYaH7iOB.js";import{I as se}from"./IconButton-Cswe56TH.js";import{L as ae}from"./Link1Icon-b7kYrNLi.js";import{S as le,I as ce}from"./InviteMemberDialog-YZvHMsT4.js";import"./inviteUrl-BPL9TqJF.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-D_fXcg40.js";import"./virtualExposes-_ivNhQLP.js";import"./remoteEntry-uboCqDRT.js";import"./preload-helper-s0Msbe4-.js";import"./index-DM2295YJ.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-_fD68H2V.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-BYnSnx8j.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare___mf_0_unleash_mf_1_proxy_mf_2_client_mf_2_react__loadShare__.js-BdtqsXmB.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-ckyQG2Wp.js";import"./FolderIcon-Djop75le.js";import"./ImageIcon-D2XgVoX2.js";import"./LoadingIcon-BUCARp-P.js";import"./UsersIcon-FFXIPf6P.js";import"./formatImageProxyUrl-Brvd124A.js";import"./placeholders-BhfK6KrI.js";import"./Text-B0sdoH5a.js";import"./DirectionContext-CJiZK74l.js";import"./ToolbarRootContext-CFM4y31V.js";import"./useValueChanged-DjAsLpO_.js";import"./CompositeItem-C1ACorGw.js";import"./useCompositeItem-Dt2AISPC.js";import"./usePositioner-D-LvJytS.js";import"./Copy06Icon-DoXOQPp6.js";import"./input-BAKHZGps.js";import"./useControlled-DMkbsAxB.js";import"./useRegisterFieldControl-B2c9p962.js";import"./CheckIcon-uJqVXt3W.js";import"./ChevronDownIcon-CB9Tmqtp.js";import"./inviteValidation-D3KKHiX7.js";import"./index-CwMG8eoe.js";const I=40;function ue(e){var u;const{data:t,loading:r,error:a,fetchMore:i,refetch:n}=B(R,{skip:!e,notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-first",variables:{userId:e,bucketType:L.Group,sorter:J,limit:I}}),l=(u=t==null?void 0:t.bucketsByUserId)==null?void 0:u.nextToken,s=_(()=>{var d,p;return((p=(d=t==null?void 0:t.bucketsByUserId)==null?void 0:d.items)!=null?p:[]).filter(f=>!f.isBanned)},[t]),c=_(()=>P.debounce(()=>{l&&i({variables:{nextToken:l,limit:I}}).catch(()=>{})},500,{leading:!0,trailing:!1}),[l,i]);return v(()=>()=>c.cancel(),[c]),{buckets:s,loading:r&&s.length===0,loadingMore:r&&s.length>0,error:a,hasMore:!!l,fetchMore:c,refetch:n}}function A({children:e}){return o("div",{className:"grid grid-cols-1 gap-16 md:grid-cols-2 lg:grid-cols-3",children:e})}function me(){return o("div",{className:"bg-muted aspect-15/8 w-full animate-pulse rounded-16"})}function de(){return o(A,{children:Array.from({length:3}).map((e,t)=>o(me,{},"group-skeleton-".concat(t)))})}function pe(){return m("div",{className:"text-foreground font-text flex flex-col items-center gap-8 py-48 text-center",children:[o("p",{className:"font-display text-base font-semibold",children:"No groups yet"}),o("p",{className:"text-muted-foreground text-sm",children:"Groups you create or join will show up here."})]})}function fe(e,{enabled:t=!0,rootMargin:r="400px"}={}){const a=g(e);a.current=e;const i=g(t);i.current=t;const n=g(!1),l=g(null);return v(()=>{t&&(n.current=!1)},[t]),W(s=>{var u;if((u=l.current)==null||u.disconnect(),!s)return;n.current=!1;const c=new IntersectionObserver(d=>{!n.current&&i.current&&d.some(p=>p.isIntersecting)&&(n.current=!0,a.current())},{rootMargin:r});c.observe(s),l.current=c},[r])}const M=9;function ge(e){const t=e==null?void 0:e.id,{data:r,loading:a,error:i}=B(U,{skip:!t,variables:{bucketId:t,limit:M,sortBy:{field:D.DateTaken,order:O.Asc}},fetchPolicy:"cache-first"});return v(()=>{i&&z.error("Error fetching group thumbnails:",i)},[i]),{media:_(()=>{var s,c;return[...((c=(s=r==null?void 0:r.bucketMediaByAlbumId)==null?void 0:s.items)!=null?c:[]).filter(
1Boolean)].sort((u,d)=>{var p,f,b,x;return((f=(p=u.dateTaken)!=null?p:u.createdAt)!=null?f:"").localeCompare((x=(b=d.dateTaken)!=null?b:d.createdAt)!=null?x:"")}).slice(0,M)},[r]),loading:a,error:i}}const k="Groups aren't available until your media finishes migrating.";function he({bucket:e,menu:t}){var d;const r=S(),{media:a}=ge(e),{mediaCount:i,albumCount:n,loading:l}=ee(e.id),{mutationsLocked:s}=te(),{createAlert:c}=j();return o(Y,{onClick:()=>{if(s){c(k,"info");return}r("/groups/".concat(e.id))},unavailable:s,unavailableReason:k,title:e.title,mediaList:a,mediaCount:i!=null?i:0,albumTotal:n!=null?n:0,memberCount:(d=e.bucketUserCount)!=null?d:0,countsLoading:l,menu:t})}const _e='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 10V4m-3 3h6m-6 14v-1.2c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C13.72 15 12.88 15 11.2 15H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 17.28 2 18.12 2 19.8V21M12.5 7.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';function ve(e){return o(V,y({svg:_e},e))}function be({bucketId:e}){const t=S(),r=$(H),[a,i]=q(!1),{myMembership:n}=K(e),l=Q(n==null?void 0:n.userRole);return m(N,{children:[m(re,{children:[o(oe,{render:o(se,{variant:"ghost",size:"sm","aria-label":"Group actions",icon:o(ne,{size:"base"}),className:"rounded-8  text-white hover:bg-white/50"})}),m(ie,{children:[m(h,{onClick:()=>i(!0),children:[o(ve,{size:"small"}),"Invite Members"]}),m(h,{onClick:()=>t("/groups/".concat(e,"/links")),children:[o(ae,{size:"small"}),"Public Links"]}),l&&m(h,{onClick:()=>t("/groups/".concat(e,"/manage")),children:[o(le,{size:"small"}),"Group Settings"]})]})]}),o(ce,{bucketId:e,currentRole:n==null?void 0:n.userRole,open:a,onClose:()=>i(!1),fullScreen:!r})]})}function xe({buckets:e,loading:t,loadingMore:r,error:a,hasMore:i,onLoadMore:n}){const l=fe(n,{enabled:i&&!r&&!a});return t&&e.length===0?o(de,{}):a&&e.length===0?o("p",{className:"text-foreground font-text text-base",children:"We're having trouble retrieving your groups. Please try again."}):e.length===0?o(pe,{}):m(N,{children:[o(A,{children:e.map(s=>o(he,{bucket:s,menu:o(be,{bucketId:s.id})},s.id))}),i&&!a&&o("div",{ref:l,"aria-hidden":!0,className:"h-1"}),a&&e.length>0&&m("div",{className:"mt-16 text-center",children:[o("p",{className:"text-muted-foreground font-text text-sm",children:"Couldn't load more groups."}),o("button",{type:"button",onClick:n,className:"text-brand-700 font-text focus-visible:ring-ring rounded-4 mt-4 text-sm font-bold underline outline-none focus-visible:ring-2",children:"Try again"})]})]})}const Ge="h-40 rounded-24 border-brand-500 px-24 text-base font-display font-semibold text-brand-600 hover:bg-brand-500/10 hover:text-brand-600";function pt(){var c,u;const e=(u=(c=F().currentUser)==null?void 0:c.uid)!=null?u:"",{buckets:t,loading:r,loadingMore:a,error:i,hasMore:n,fetchMore:l}=ue(e),{open:s}=X();return m("main",{className:"h-full overflow-y-auto px-24 pt-24",children:[m("div",{className:"mb-24 flex items-center justify-between gap-16",children:[o("h1",{className:"text-foreground font-display text-xl font-bold",children:"Groups"}),o("div",{className:"flex items-center gap-8",children:o(Z,{variant:"ghost",className:Ge,onClick:()=>s(),children:"Create a Group"})})]}),o(xe,{buckets:t,loading:r,loadingMore:a,error:i,hasMore:n,onLoadMore:l})]})}export{pt as default};

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.