PageSourceSearch

https://vocus.cc/_next/static/chunks/1500.21b5b463e6f2e1c1.js

js vocus.cc collected 2026-09-24 08:32:30 UTC 9,912 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{76947:(e,t,o)=>{o.d(t,{S:()=>r});var n=o(452671);function r(e){let{siteName:t,body:o}=e,r=t?n.i[t]:void 0;return{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/plain, */*"},body:JSON.stringify(r?{...o,from:r}:o)}}},301500:(e,t,o)=>{o.r(t),o.d(t,{default:()=>I});var n=o(368794),r=o.n(n),_=o(642198),a=o(64472),i=o(505724),l=o(621462),E=o(88089),s=o(76947),T=o(730351);let d=`${a.config.serverUrl}/api/v2/site/users/google-one-tap`;var c=o(410139),S=o(416147);let u=["/app-webview"];function I(){var e;let t=(0,_.useRouter)(),o=(0,i.A)();return!function(e){let{enabled:t,siteName:o,onSuccess:n,sendNotification:r}=e,{trigger:_,isMutating:i}=function(){let{sendLogin:e}=(0,T.A)(),{trigger:t,data:o,error:n,isMutating:r}=(0,E.A)("google-one-tap-login",(t,o)=>{let{arg:n}=o,{credential:r,siteName:_}=n;return e(d,(0,s.S)({siteName:_,body:{credential:r}}))});return{trigger:t,data:o,error:n,isMutating:r}}(),{isReady:u}=(0,c.I)(),I=(0,l.useRef)({onSuccess:n,sendNotification:r,trigger:_,siteName:o});I.current={onSuccess:n,sendNotification:r,trigger:_,siteName:o};let p=(0,l.useRef)(!1);(0,l.useEffect)(()=>{!t&&p.current&&(window.google?.accounts?.id?.cancel?.(),p.current=!1)},[t]),(0,l.useEffect)(()=>{if(t&&u){if(!a.config.googleAppId)return void console.error("[GoogleOneTap] Missing GOOGLE_APP_ID config");if(!p.current)try{let e=window.google?.accounts?.id;if(!e)return void console.error("[GoogleOneTap] google.accounts.id not available after GSI script ready");e.initialize({client_id:a.config.googleAppId,callback:e=>{if(!e.credential)return void I.current.sendNotification({type:"error",message:"Google 登入失敗,請洽客服,或稍後再試。"});I.current.trigger({credential:e.credential,siteName:I.current.siteName}).then(e=>{(0,S.j8)({name:"googleOneTap_login_success",action:"",component:"GoogleOneTap",index:"",value:""});let t=e?.isRegistered;window.dataLayer?.push({event:t?"sign_up":"login",method:"Google"}),I.current.onSuccess(e)}).catch(e=>{console.error("[GoogleOneTap] login error:",e),I.current.sendNotification({type:"error",message:"Google 登入失敗,請洽客服,或稍後再試。"})})}
1,auto_select:!1,cancel_on_tap_outside:!0,itp_support:!0,use_fedcm_for_prompt:!0,context:"signin"}),p.current=!0;let t=!1,o=()=>{t||(t=!0,(0,S.j8)({name:"googleOneTap_display",action:"",component:"GoogleOneTap",index:"",value:""}))};e.prompt(e=>{if(e.isDisplayMoment()&&o(),e.isNotDisplayed()&&console.error("[GoogleOneTap] not displayed:",e.getNotDisplayedReason()),e.isSkippedMoment()&&(console.error("[GoogleOneTap] skipped:",e.getSkippedReason()),o(),(0,S.j8)({name:"googleOneTap_close_click",action:"",component:"GoogleOneTap",index:"",value:""})),e.isDismissedMoment()){console.error("[GoogleOneTap] dismissed:",e.getDismissedReason());let t=e.getDismissedReason();("credential_returned"===t||"user"===t)&&o()}})}catch(e){console.error("[GoogleOneTap] init error:",e)}}},[t,u])}({enabled:!r().get("userId")&&(e=t.pathname,!u.some(t=>e.startsWith(t))),siteName:a.config.siteName,onSuccess:()=>{if("/become_creator"===t.pathname)return void t.replace("/");window.location.reload()},sendNotification:o}),null}},419015:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(959235),r=o(689196);let _={SET_USER_DATA:"SET_USER_DATA",SET_PREMIUM_ORDER:"SET_PREMIUM_ORDER",SET_IS_VALIDATED:"SET_IS_VALIDATED",UPDATE_USER_DATA:"UPDATE_USER_DATA",USER_LOGOUT:"USER_LOGOUT",ADD_RECOMMEND_AUTHOR_LIST:"ADD_RECOMMEND_AUTHOR_LIST",ADD_RECOMMEND_PUBLICATION_LIST:"ADD_RECOMMEND_PUBLICATION_LIST",DELETE_RECOMMEND_AUTHOR_LIST:"DELETE_RECOMMEND_AUTHOR_LIST",DELETE_RECOMMEND_PUBLICATION_LIST:"DELETE_RECOMMEND_PUBLICATION_LIST",CLEAR_RECOMMEND_AUTHOR_LIST:"CLEAR_RECOMMEND_AUTHOR_LIST",CLEAR_RECOMMEND_PUBLICATION_LIST:"CLEAR_RECOMMEND_PUBLICATION_LIST",SHOW_WELCOME_GIFT_RECEIVED_ALERT:"SHOW_WELCOME_GIFT_RECEIVED_ALERT",SWITCH_USER_HAS_PUBLICATIONS:"SWITCH_USER_HAS_PUBLICATIONS",SET_WELCOME_GIFT_STATUS:"SET_WELCOME_GIFT_STATUS",SET_IS_CHANGE_PWD_MODAL_SHOW:"SET_IS_CHANGE_PWD_MODAL_SHOW",SET_HIDE_ADULT_ALERT:"SET_HIDE_ADULT_ALERT",SET_CHATROOM_HINT:"SET_CHATROOM_HINT",SET_XMAS_HINT:"SET_XMAS_HINT",SET_POLL_HINT:"SET_POLL_HINT",SET_COMMENT_SORT_HINT:"SET_COMMENT_SORT_HINT",SET_IS_PHONE_VERIFIED:"SET_IS_PHONE_VERIFIED",setUserData:e=>{let{name:t="",avatarUrl:o="",fullname:a="",username:i="",_id:l="",level:E="",email:s="",receiveEmail:T="",permissionWrite:d=!1,recommendStatus:c=0,recommendSelection:S=[],premiumDate:u="",mailVerification:I=0,mailAuthor:p=!1,mailAuthorOpp:A=!1,mailFollow:O=0,mailMember:D=!1,mailSubscribe:R=0,welcomeGift:L=0,createdAt:g=null,updatedAt:m=null,welcomeGiftReceivedAt:M=!1,headerColor:C="",isPremium:N=!1,intro:y="",likerId:H="",walletAddress:U="",permissionAuthorization:f=0,socialLinks:P={},socialLinkPosition:h=[],addLikerButtonByDefault:v=!1,permissionDonate:G=!1,reply:w="",hideAdultAlert:W,salons:b=[],isVAFHolder:V=!1,hasSalonPermission:k=!1,interestedCatalogIDs:B=[],salonBurgerHint:F=!1,homePageEventHint:x=!1,chatroomHint:j=!1,cardEventHint:X=!1,createButtonTooltipHint:z=!1,pollHomeHint:$,pollCreateHint:J,pollToolbarHint:Z,commentSortHint:K=!1,isPhoneVerified:q=!1,canPublishContent:Q=!1}=e;return{type:_.SET_USER_DATA,payload:{name:t,avatarUrl:o,fullname:a,username:i,userId:l,level:E,email:s,premiumDate:u,receiveEmail:T,permissionWrite:d,recommendStatus:c,recommendSelection:S,mailVerification:I,mailAuthor:p,mailAuthorOpp:A,mailFollow:O,mailMember:D,mailSubscribe:R,welcomeGift:L,createdAt:g,updatedAt:m,welcomeGiftReceivedAt:M,headerColor:C||n.PL[n.ZV.WHITE],isPremium:N,intro:y,likerId:H,walletAddress:U,socialLinks:P,socialLinkPosition:h,hasPremiumPermission:(0,r.di)({premiumDate:u,level:E,isVAFHolder:V}),permissionAuthorization:f,addLikerButtonByDefault:v,permissionDonate:G,reply:w,hideAdultAlert:W,salons:b,userHasSalon:b?.length>0,isVAFHolder:V,hasSalonPermission:k,interestedCatalogIDs:B,salonBurgerHint:F,homePageEventHint:x,chatroomHint:j,cardEventHint:X,createButtonTooltipHint:z,pollHomeHint:$,pollCreateHint:J,pollToolbarHint:Z,commentSortHint:K,isPhoneVerified:q,canPublishContent:Q}}},setPremiumOrder:e=>{let{premiumOrder:t=!1}=e;return{type:_.SET_PREMIUM_ORDER,payload:{premiumOrder:t}}},setIsValidated:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:_.SET_IS_VALIDATED,payload:{isValidated:e}}},updateUserData:e=>({type:_.UPDATE_USER_DATA,payload:e}),addRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:_.ADD_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},deleteRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:_.DELETE_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},clearRecommendAuthorList:()=>({type:_.CLEAR_RECOMMEND_AUTHOR_LIST}),addRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:_.ADD_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},deleteRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:_.DELETE_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},clearRecommendPublicationList:()=>({type:_.CLEAR_RECOMMEND_PUBLICATION_LIST}),showWelcomeGiftAlert:()=>({type:_.SHOW_WELCOME_GIFT_RECEIVED_ALERT}),switchUserHasPublications:e=>({type:_.SWITCH_USER_HAS_PUBLICATIONS,payload:{hasPublications:e}}),setWelcomeGiftStatus:e=>({type:_.SET_WELCOME_GIFT_STATUS,payload:e}),setIsChangePasswordModalShow:e=>({type:_.SET_IS_CHANGE_PWD_MODAL_SHOW,payload:e}),setHideAdultAlert:e=>({type:_.SET_HIDE_ADULT_ALERT,payload:e}),setChatroomHint:e=>({type:_.SET_CHATROOM_HINT,payload:e}),setXmasHint:e=>{let{hasClosedPopup:t,hasClosedTooltip:o}=e;return{type:_.SET_XMAS_HINT,payload:{hasClosedPopup:t,hasClosedTooltip:o}}},setPollHint:e=>{let{pollHomeHint:t,pollCreateHint:o,pollToolbarHint:n}=e;return{type:_.SET_POLL_HINT,payload:{pollHomeHint:t,pollCreateHint:o,pollToolbarHint:n}}},setCommentSortHint:e=>{let{commentSortHint:t}=e;return{type:_.SET_COMMENT_SORT_HINT,payload:{commentSortHint:t}}},setPhoneVerified:e=>{let{isPhoneVerified:t}=e;return{type:_.SET_IS_PHONE_VERIFIED,payload:{isPhoneVerified:t}}}},a=_},452671:(e,t,o)=>{o.d(t,{i:()=>n});let n={zaShare:"za"}},505724:(e,t,o)=>{o.d(t,{A:()=>_,a:()=>r});var n=o(884997);function r(){return(0,n.aH)()}let _=function(){return(0,n.Xh)()}},689196:(e,t,o)=>{o.d(t,{$N:()=>u,JK:()=>E,VG:()=>d,aZ:()=>T,di:()=>s,gb:()=>a.A,jz:()=>c,l8:()=>S});var n=o(552683),r=o(990688),_=o(64472),a=o(35758);let{serverUrl:i}=_.config,l=n.Ay.animateScroll,E=()=>{let{locales:e}=_.config,t=sessionStorage.getItem("country");return e.includes(t)?t:"TW"},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{level:"",isVAFHolder:!1,premiumDate:""};return!!e&&!!(e?.level==="10"||e?.isVAFHolder||e?.premiumDate&&(0,r.default)(new Date,new Date(e.premiumDate)))},T=e=>{e?document.body.style.overflow="hidden":document.body.style.overflow="auto"},d=e=>{l.scrollTo(e)},c=e=>{let{firstAddress:t=6,lastAddress:o=6,idAddress:n=""}=e;return n?`${n.slice(0,t)}...${n.slice(-1*o)}`:""},S=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return e?e<=100?2*e:1.5*e:200}},730351:(e,t,o)=>{o.d(t,{A:()=>s});var n=o(621462),r=o(448561),_=o(368794),a=o.n(_),i=o(64472),l=o(923196),E=o(419015);let s=()=>
1{let e=(0,r.wA)(),[t,o]=(0,n.useState)(!1);return{sendLogin:(0,n.useCallback)(async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{method:"POST"};o(!0);let r=await fetch(t,n),_=await r.json(),s=_.data?._id||"";if(o(!1),200!==r.status)throw _;return localStorage.setItem("id_token",_.token),localStorage.setItem("isLoggedIn","true"),localStorage.removeItem(l.ox),e(E.A.setUserData(_.data)),e(E.A.setIsValidated(!0)),a().set("id_token",_.token,{expires:8,secure:i.config.isProduction,SameSite:"Lax"}),a().set("userId",s,{expires:8,secure:i.config.isProduction,SameSite:"Lax"}),_},[e]),isFetching:t}}}}]);

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.