PageSourceSearch

https://static.wuubi.com/_next/static/chunks/3476-9d1d64b02e1a5b12.js

js wuubi.com collected 2026-10-02 01:01:40 UTC 14,455 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="51c351b4-780e-4f48-be46-591043e2428a",e._sentryDebugIdIdentifier="sentry-dbid-51c351b4-780e-4f48-be46-591043e2428a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3476],{1119:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(85278),r=i(11304);let o=()=>{let[e,t]=(0,n.fp)(r.bc),[i,o]=(0,n.fp)(r.qA),[s,a]=(0,n.fp)(r.pP),[u,c]=(0,n.fp)(r.ZK),[l,d]=(0,n.fp)(r.Pi),[f,h]=(0,n.fp)(r.Jl);return{notifications:e,setNotifications:t,unreadCount:i,setUnreadCount:o,loading:s,setLoading:a,error:u,setError:c,pagination:l,setPagination:d,hasMore:f,setHasMore:h}}},11304:(e,t,i)=>{i.d(t,{Jl:()=>c,Pi:()=>u,ZK:()=>a,bc:()=>r,pP:()=>s,qA:()=>o});var n=i(99542);let r=(0,n.eU)([]),o=(0,n.eU)(0),s=(0,n.eU)(!1),a=(0,n.eU)(null),u=(0,n.eU)({currentPage:1,limit:10,total:0}),c=(0,n.eU)(!0)},19596:(e,t,i)=>{i.d(t,{q:()=>a});var n=i(13478),r=i(61482),o=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",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,t){let{state:i}=e,n=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:u}=n,c=i.fetchMeta?.fetchMore?.direction,l=a&&"forward"===c,d=o&&"forward"===c,f=a&&"backward"===c,h=o&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.rB)(t,i.data),hasPreviousPage:(0,r.RQ)(t,i.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:u&&!l&&!f,isRefetching:s&&!d&&!h}}},s=i(23836);function a(e,t){return(0,s.t)(e,o,t)}},22824:(e,t,i)=>{i.d(t,{H:()=>d,L:()=>c});var n=i(74359),r=i(14232),o=i(92963),s=i(58346),a=i(40458);let u="wuubi:notification-preferences",c={emailNotifications:!0,soundNotifications:!0,showOnlineStatus:!0,showLastSeen:!0,sendReadReceipts:!0,quietHoursEnabled:!1,quietHoursStart:"23:00",quietHoursEnd:"08:00"},l=()=>{try{let e=window.localStorage.getItem(u);if(!e)return c;let t=JSON.parse(e);return{emailNotifications:"boolean"!=typeof t?.emailNotifications||t.emailNotifications,soundNotifications:"boolean"!=typeof t?.soundNotifications||t.soundNotifications,showOnlineStatus:"boolean"!=typeof t?.showOnlineStatus||t.showOnlineStatus,showLastSeen:"boolean"!=typeof t?.showLastSeen||t.showLastSeen,sendReadReceipts:"boolean"!=typeof t?.sendReadReceipts||t.sendReadReceipts,quietHoursEnabled:"boolean"==typeof t?.quietHoursEnabled&&t.quietHoursEnabled,quietHoursStart:"string"==typeof t?.quietHoursStart&&t.quietHoursStart?t.quietHoursStart:"23:00",quietHoursEnd:"string"==typeof t?.quietHoursEnd&&t.quietHoursEnd?t.quietHoursEnd:"08:00"}}catch{return c}};function d(){let e=(0,o.A)(),{ProfileInfoSet:t}=(0,a.A)(),i=(0,n.I)({queryKey:["notificationPreferences",e?._id],queryFn:async()=>{if(!e?.token)return l();let t=await fetch("https://api.wuubi.com/api/profile-settings/email-notifications",{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e.token}`}});if(!t.ok)throw Error("Bildirim tercihleri y\xfcklenemedi");let i=await t.json(),n=i?.responseResult?.status,r=i?.result?.data;if(!n||"boolean"!=typeof r?.emailNotifications||"boolean"!=typeof r?.soundNotifications)throw Error((0,s.S)(i,"Bildirim tercihleri y\xfcklenemedi"));return r},enabled:!!e?.token,initialData:l,staleTime:6e4,refetchOnWindowFocus:!1});return(0,r.useEffect)(()=>{if(i.data){var e;e=i.data,window.localStorage.setItem(u,JSON.stringify(e)),t(e=>({...e,emailNotifications:i.data.emailNotifications,soundNotifications:i.data.soundNotifications,showOnlineStatus:i.data.showOnlineStatus,showLastSeen:i.data.showLastSeen,sendReadReceipts:i.data.send
1ReadReceipts}))}},[t,i.data]),{preferences:i.data||c,isLoading:i.isLoading,isFetching:i.isFetching,refetch:i.refetch}}},27337:(e,t,i)=>{i.d(t,{Y:()=>l});var n=i(35975),r=i(66332),o=i(14232),s=i(92963),a=i(97685),u=i(22824),c=i(1119);function l(){let e=(0,s.A)(),{setNotifications:t,setUnreadCount:i}=(0,c.A)(),{preferences:l}=(0,u.H)(),{play:d}=(0,r.N)({enabled:l.soundNotifications,src:"/sound/notification.wav"});(0,o.useEffect)(()=>{if(!e?._id||!e?.token)return;(0,n.hi)(e.token),(0,n.Th)();let r=()=>{n.Ay.emit("joinUserRoom",e._id)},o=e=>{let n=!1;if(t(t=>(n=t.some(t=>t._id===e._id))?t:[e,...t]),n)return;i(e=>e+1),d();let r=e.actor&&"object"==typeof e.actor?e.actor:null,o=r?.firstName&&r?.lastName?`${r.firstName} ${r.lastName}`:e.description||"Bilinmeyen kullanıcı";a.Ay.success(r?.firstName&&r?.lastName?`${o} ${f(e.type)}`:e.description||f(e.type),{duration:4e3,position:"top-right",icon:h(e.type)})},s=e=>{i("number"==typeof e?e:Number(e?.count||0))};return n.Ay.on("connect",r),n.Ay.on("newNotification",o),n.Ay.on("unreadCount",s),n.Ay.connected&&r(),()=>{n.Ay.off("connect",r),n.Ay.off("newNotification",o),n.Ay.off("unreadCount",s)}},[d,l.soundNotifications,t,i,e?._id,e?.token]);let f=e=>{switch(e){case"like":return"g\xf6nderinle etkileşime ge\xe7ti";case"comment":return"g\xf6nderine yorum yaptı";case"follow":return"seni takip etmeye başladı";default:return"bir etkinlikte bulundu"}},h=e=>{switch(e){case"like":return"❤️";case"comment":return"\uD83D\uDCAC";case"follow":return"\uD83D\uDC64";default:return"\uD83D\uDD14"}};return{isConnected:n.Ay.connected}}},35975:(e,t,i)=>{i.d(t,{Ay:()=>s,Th:()=>o,hi:()=>r});let n=(0,i(12692).io)("https://api.wuubi.com/api",{transports:["websocket"],autoConnect:!1,withCredentials:!0}),r=e=>{if(!e||"__cookie__"===e){n.auth={};return}n.auth={token:`Bearer ${e}`}},o=()=>{n.connected||n.connect()},s=n},40097:(e,t,i)=>{i.d(t,{n:()=>l});var n=i(14232),r=i(21407),o=i(60388),s=i(90089),a=i(37149),u=class extends s.Q{#e;#t=void 0;#i;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.EN)(t.mutationKey)!==(0,a.EN)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#r(),this.#o()}mutate(e,t){return this.#n=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#r(){let e=this.#i?.state??(0,r.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.jG.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,i,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(e.data,null,t,i,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,i,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,e.error,t,i,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=i(67768);function l(e,t){let i=(0,c.jE)(t),[r]=n.useState(()=>new u(i,e));n.useEffect(()=>{r.setOptions(e)},[r,e]);let s=n.useSyncExternalStore(n.useCallback(e=>r.subscribe(o.jG.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=n.useCallback((e,t)=>{r.mutate(e,t).catch(a.lQ)},[r]);if(s.error&&(0,a.GU)(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}},40458:(e,t,i)=>{i.d(t,{A:()=>
1o});var n=i(85278);let r=(0,i(99542).eU)({totalPoints:0,achievements:[],badges:[],_id:"",firstName:"",lastName:"",username:"",email:"",emailNotifications:!0,soundNotifications:!0,showOnlineStatus:!0,showLastSeen:!0,sendReadReceipts:!0,profilePicture:"",coverPicture:"",followers:0,following:0,bio:"",birthDate:null,createdAt:"",updatedAt:"",id:""}),o=()=>{let[e,t]=(0,n.fp)(r);return{ProfileInfo:e,ProfileInfoSet:t}}},44542:(e,t,i)=>{i.d(t,{fH:()=>o,vV:()=>s});let n=console;function r(e,t,i){if("error"!==e&&"warn"!==e)return;let r=`[WuubiWeb][${e}] ${t}`;return"error"===e?void n?.error?.(r,i):"warn"===e?void n?.warn?.(r,i):"debug"===e?void n?.debug?.(r,i):void n?.info?.(r,i)}function o(e,t){r("info",e,t)}function s(e,t){r("error",e,t)}},66332:(e,t,i)=>{i.d(t,{N:()=>r});var n=i(14232);function r({enabled:e=!0,src:t="/sound/notification.wav",volume:i=1}={}){let o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{let e=new Audio(t);e.preload="auto",e.volume=i,o.current=e;let n=()=>{let e=o.current;e&&(s.current=!0,e.muted=!0,e.play().then(()=>{e.pause(),e.currentTime=0,e.muted=!1}).catch(()=>{e.muted=!1}))};return window.addEventListener("pointerdown",n,{once:!0,passive:!0}),window.addEventListener("keydown",n,{once:!0}),window.addEventListener("touchstart",n,{once:!0,passive:!0}),()=>{window.removeEventListener("pointerdown",n),window.removeEventListener("keydown",n),window.removeEventListener("touchstart",n),o.current&&(o.current.pause(),o.current=null)}},[t,i]),{play:(0,n.useCallback)(()=>{if(!e)return;let t=o.current;t&&(t.currentTime=0,t.play().then(()=>{s.current=!0}).catch(()=>{}))},[e])}}},83476:(e,t,i)=>{i.d(t,{Jp:()=>c,Yn:()=>h,ch:()=>w,SF:()=>y,J9:()=>b});var n=i(94764),r=i(14232),o=i(92963),s=i(1119),a=i(85278),u=i(11304);function c(){return{count:(0,a.md)(u.qA)}}var l=i(19596),d=i(58346),f=i(44542);function h(e={}){let{limit:t=10}=e,i=(0,o.A)(),{setNotifications:a,setError:u,setUnreadCount:c,setPagination:p,setHasMore:m}=(0,s.A)(),y=(0,l.q)({queryKey:["notifications","infinite",i?._id,t],queryFn:async({pageParam:e=1})=>{if(!i?.token)throw Error("Oturum a\xe7man gerekiyor");let r=(0,n.d)(`/notification?page=${e}&limit=${t}`,i.token,{headers:{"Content-Type":"application/json"}}),o=await fetch(r.url,r.init);if(!o.ok)throw Error("Bildirimler y\xfcklenemedi");let s=await o.json();if(!s.responseResult.status)throw Error((0,d.S)(s,"Bildirimler y\xfcklenemedi"));return s},initialPageParam:1,getNextPageParam:e=>{let t=e.result.pagination;if(!t)return;let i=Math.ceil(t.total/t.limit);return t.currentPage<i?t.currentPage+1:void 0},enabled:!!i?.token,staleTime:3e4,refetchOnWindowFocus:!1});return(0,r.useEffect)(()=>{if(!y.data)return;let e=[],t=0,i=null;y.data.pages.forEach(n=>{e.push(...n.result.data),t+=n.result.data.filter(e=>!e.isRead).length,i=n.result.pagination??null}),a(e),c(t),i&&(p(i),m(!!y.hasNextPage)),u(null)},[y.data,y.hasNextPage,a,c,p,m,u]),(0,r.useEffect)(()=>{y.error&&((0,f.vV)("Infinite notification fetch error:",y.error),u(y.error instanceof Error?y.error.message:"Bir sorun oluştu"),a([]))},[y.error,u,a]),{...y,notifications:y.data?.pages.flatMap(e=>e.result.data)||[],unreadCount:y.data?.pages.reduce((e,t)=>e+t.result.data.filter(e=>!e.isRead).length,0)||0,hasNextPage:y.hasNextPage,fetchNextPage:y.fetchNextPage,isFetchingNextPage:y.isFetchingNextPage,refetch:y.refetch}}var p=i(67768),m=i(40097);function y(){let e=(0,o.A)(),t=(0,p.jE)(),{notifications:i,setNotifications:r,setUnreadCount:a}=(0,s.A)();return(0,m.n)({mutationFn:async t=>{if(!e?.token)throw Error("Oturum a\xe7man gerekiyor");let i=(0,n.d)(`/notification/${t}/read`,e.token,{method:"POST",headers:{"Content-Type":"application/json"}}),r=await fetch(i.url,i.init);if(!r.ok)throw Error("Bildirim g\xfcncellenemedi");let o=await r.json();if(!o?.responseResult?.status)throw Error(o?.responseResult?.exceptionDetail?.[0]||"Bildirim g\xfcncellenemedi");return o},onSuccess:(e,n)=>{let o=i.map(e=>e._id===n?{...e,isRead:!0}:e);r(o),a(o.filter(e=>!e.isRead).length),t.invalidateQueries({queryKey:["notifications"]})},onError:e=>{(0,f.vV)("Error marking notification as read:",e),t.invalidateQueries({queryKey:["notifications"]})}})}function w(){let e=(0,o.A)(),t=(0,p.jE)(),{notifications:i,setNotifications:r,setUnreadCount:a}=(0,s.A)();return(0,m.n)({mutationFn:async()=>
1{if(!e?.token)throw Error("Oturum a\xe7man gerekiyor");let t=(0,n.d)("/notification/read-all",e.token,{method:"POST",headers:{"Content-Type":"application/json"}}),i=await fetch(t.url,t.init);if(!i.ok)throw Error("Bildirimler g\xfcncellenemedi");let r=await i.json();if(!r?.responseResult?.status)throw Error(r?.responseResult?.exceptionDetail?.[0]||"Bildirimler g\xfcncellenemedi");return r},onSuccess:()=>{r(i.map(e=>({...e,isRead:!0}))),a(0),t.invalidateQueries({queryKey:["notifications"]})},onError:e=>{(0,f.vV)("Error marking all notifications as read:",e),t.invalidateQueries({queryKey:["notifications"]})}})}var g=i(74359);function b(){let e=(0,o.A)(),{setUnreadCount:t}=(0,s.A)(),i=(0,g.I)({queryKey:["notifications","unread-count",e?._id],queryFn:async()=>{if(!e?.token)return 0;let t=(0,n.d)("/notification/unread-count",e.token,{headers:{"Content-Type":"application/json"}}),i=await fetch(t.url,t.init);if(!i.ok)throw Error("Okunmamış bildirim sayısı y\xfcklenemedi");let r=await i.json();if(!r?.responseResult?.status)throw Error((0,d.S)(r,"Okunmamış bildirim sayısı y\xfcklenemedi"));return Number(r?.result?.data?.count||0)},enabled:!!e?.token,staleTime:3e4,refetchInterval:3e4,refetchOnWindowFocus:!1});return(0,r.useEffect)(()=>{void 0!==i.data&&t(i.data)},[i.data,t]),{count:i.data||0,loading:i.isLoading,refetch:i.refetch}}i(27337)},94764:(e,t,i)=>{i.d(t,{d:()=>o});var n=i(52648);let r=new Set(["","__cookie__","undefined","null"]),o=(e,t,i={})=>{let o=(0,n.KB)(e),s=new Headers(i.headers),a=(e=>{let t=String(e||"").trim();return r.has(t)?null:t})(t);return a?s.set("Authorization",`Bearer ${a}`):s.delete("Authorization"),{url:o,init:{...i,headers:s,credentials:i.credentials||((0,n.MZ)(o)?"include":void 0)}}}}}]);

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.