PageSourceSearch

https://secondhand.sandro-paris.com/_next/static/chunks/168.f5ca0c7fde57aac2.js

js sandro-paris.com collected 2026-09-24 10:16:04 UTC 12,113 bytes, 6 lines download raw bytes

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]="26bf5c4e-1283-5433-b47e-ec4779097d27")}catch(e){}}();
3!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0cf28-f915-0000-c1ab-65cbcf56b850";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="bef66ec5-0513-5ea0-894a-c19dc8b00c63")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[168,876],{10168:(e,t,a)=>{a.r(t),a.d(t,{default:()=>W});var s=a(64476),i=a(68205),n=a(78249),r=a(5776),l=a(8645),o=a(80820),c=a(33460),d=a(84206),u=a(86272),h=a(40897),g=a(57833),f=a(40640),m=a(70876),y=a(37114);let p=e=>{let t=(0,h.Wg)(),{data:a,loading:s,error:i}=(0,g.aFz)({variables:{key:`${e}`,brandId:t}});return{channelId:a?.chat_channels.at(0)?.channel_external_identifier,channelIdLoading:s,channelIdError:i}};var x=a(51456),b=a(76895),v=a(58503),A=a(1050),w=a(56838),j=a(570),C=a(53514),k=a(11701),S=a(58190),_=a(953),I=a(18065),L=a(91),M=a(76910),Q=a(33399),N=a(33602),q=a(65808),D=a(9532),T=a(98872);let U=e=>{let{subscribe:t}=e,a=(0,M.A)("ListingQAMessageInput"),{sendMessage:i}=(0,D.KS)(),n=async e=>{let{localMessage:a,message:s,sendOptions:n}=e;await i({localMessage:a,message:s,options:n}),t()};return(0,s.jsx)("div",{className:a.root,"data-sentry-component":"ListingQAMessageInput","data-sentry-source-file":"ListingQAMessageInput.tsx",children:(0,s.jsx)(T.E,{focus:!0,overrideSubmitHandler:n,"data-sentry-element":"MessageInput","data-sentry-source-file":"ListingQAMessageInput.tsx"})})};var E=a(53633);function P(e){let{handleSignUp:t,handleSignIn:a}=e,i=(0,M.A)("ListingQASignedOutInput");return(0,s.jsx)("div",{className:i.root??"flex justify-center px-2 py-4 text-center","data-sentry-component":"ListingQASignedOutInput","data-sentry-source-file":"ListingQASignedOutInput.tsx",children:(0,s.jsx)(b.A,{color:"textSecondary","data-sentry-element":"Typography","data-sentry-source-file":"ListingQASignedOutInput.tsx",children:(0,s.jsx)(l.A,{defaultMessage:"Please <SignInLink>sign in</SignInLink> or <SignUpLink>create an account</SignUpLink> to add a message",id:"XzqPzb",values:{SignInLink:e=>(0,s.jsx)(E.A,{className:"underline hover:cursor-pointer",onClick:a,children:e}),SignUpLink:e=>(0,s.jsx)(E.A,{className:"underline hover:cursor-pointer",onClick:t,children:e})},"data-sentry-element":"FormattedMessage","data-sentry-source-file":"ListingQASignedOutInput.tsx"})})})}var z=a(46542),O=a(14638);let F=e=>{let{listing:t,open:a,onClose:i,signInCallback:n,signUpCallback:o}=e,{connected:c,error:h,chatUserId:g,channel:x,isSubscribed:D,subscribe:T,unsubscribe:E}=(e=>{let[t,a]=(0,r.useState)(),{connected:s,error:i,chatUserId:n}=(0,y.Y)(),[l,o]=(0,r.useState)(i),[c,h]=(0,r.useState)(!1),{channelId:g,channelIdLoading:x,channelIdError:b}=p(e);(0,r.useEffect)(()=>{if(s)return t(),()=>{o(void 0)};async function t(){if(g)try{let e=await m.default.queryChannels({id:{$eq:g}});if(!e[0])throw Error("ChannelID from DB does not exist in stream");a(e[0])}catch(t){o(t),(0,d.h)(t,u.y.CHAT,{listingId:e,channelId:g})}else o("No chat channels were found for listing"),(0,d.h)("No chat channels were found for listing",u.y.CHAT,{listingId:e,channelId:g})}},[g,n,s,e]),(0,r.useEffect)(()=>{s&&t&&e();async function e(){t&&h((await t.queryMembers({user_id:n})).members.length>0)}},[t,n,s]);let v=(0,r.useCallback)(async()=>{n&&t&&(await t.addMembers([n]),h(!0),(0,f.u)("listing_qa_subscribe_click",{listingId:e}))},[t,n,e]),A=(0,r.useCallback)(async()=>{n&&t&&(await t.removeMembers([n]),h(!1),(0,f.u)("listing_qa_unsubscribe_click",{listingId:e}))},[t,n,e]);return{connected:s,error:l||i||b,chatUserId:n,channel:t,loading:x,isSubscribed:c,subscribe:v,unsubscribe:A}})(t.id),{storefront:F}=(0,I.MM)(),W=(0,M.A)("ListingQADialog"),{hideProductDetails:H=!1,showDisclaimerInHeader:Y=!1}=(0,Q.A)("ListingQADialog"),B=(0,r.useCallback)(()=>{i()},[i]),K=(0,s.jsx)(l.A,{defaultMessage:"This Q&A can be viewed by all other users. Please do not share private or personal information. You will be able to privately chat with the seller once you have purchased the item.",id:"t0cwrw"});
3g&&F?.storefront_id&&t.storefront?.id!==F.storefront_id&&(K=D?(0,s.jsx)(l.A,{defaultMessage:"<Unsubscribe>Unsubscribe</Unsubscribe> to stop receiving email notifications for all new messages. This Q&A can be viewed by all other users. Please do not share private or personal information. You will be able to privately chat with the seller once you have purchased the item.",id:"BEFhHV",values:{Unsubscribe:e=>(0,s.jsx)("span",{className:"cursor-pointer underline",onClick:E,children:e})}}):(0,s.jsx)(l.A,{defaultMessage:"Add a message or <Subscribe>subscribe</Subscribe> to receive email notifications for all new messages. This Q&A can be viewed by all other users. Please do not share private or personal information. You will be able to privately chat with the seller once you have purchased the item.",id:"kYupx7",values:{Subscribe:e=>(0,s.jsx)("span",{className:"cursor-pointer underline",onClick:T,children:e})}}));let G=(0,s.jsx)(z.A,{fullScreen:!1});return h?((0,d.h)(Error("Error loading listing Q&A"),u.y.CHAT,{listingId:t.id,storefrontId:F?.storefront_id,chatUserId:g,error:h}),G=(0,s.jsx)(b.A,{className:"flex h-full w-full items-center justify-center p-24 text-center",children:(0,s.jsx)(l.A,{defaultMessage:"There was an error loading the Q&A for this listing. Please reload the page and try again",id:"ZL/ohi"})})):c&&x&&(G=(0,s.jsx)(A.r,{client:m.default.client,i18nInstance:m.default.getI18nInstance(),customClasses:{messageList:"px-2 py-6 overflow-x-hidden overflow-y-auto overscroll-behavior-none w-full h-full max-h-full"},children:(0,s.jsxs)(w.c,{channel:x,EmptyStateIndicator:()=>(0,s.jsx)("div",{className:"flex h-full grow items-center justify-center",children:(0,s.jsx)(b.A,{children:(0,s.jsx)(l.A,{defaultMessage:"There are no questions for this listing yet.",id:"9rR9MM"})})}),children:[(0,s.jsx)(j.p,{children:(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[!H&&(0,s.jsxs)("div",{className:"mb-4 flex gap-4 px-6",children:[(0,s.jsx)(C.e,{image:(0,_.i9)(t).primaryImage?.src,className:"h-[50px] w-[50px]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(O.A,{className:"font-bold",product:t.product}),(0,s.jsx)(b.A,{color:"textSecondary",variant:"caption",children:(0,s.jsx)(l.A,{defaultMessage:"Seller: {sellerName}",id:"2P32PI",values:{sellerName:t.storefront?.name}})})]})]}),(!Y||!H)&&(0,s.jsx)(b.A,{variant:"caption",color:"textSecondary",className:W.disclaimer??"mx-4",children:K}),(0,s.jsx)(k.M,{messageActions:L.Gx,disableDateSeparator:!0}),(0,s.jsx)("div",{id:"listing-q-and-a-input-wrapper",children:g?(0,s.jsx)(U,{subscribe:T}):(0,s.jsx)(P,{handleSignUp:()=>{(0,f.u)("listing_qa_sign_up_click"),B(),o(t.id)},handleSignIn:()=>{(0,f.u)("listing_qa_sign_in_click"),B(),n(t.id)}})})]})}),(0,s.jsx)(S.j,{})]})})),(0,s.jsxs)(N.A,{open:a,onClose:B,fullWidth:!0,maxWidth:"sm","data-sentry-element":"Dialog","data-sentry-component":"ListingQADialog","data-sentry-source-file":"ListingQADialog.tsx",children:[(0,s.jsx)(q.A,{onClose:B,divider:!1,"data-sentry-element":"DialogTitle","data-sentry-source-file":"ListingQADialog.tsx",children:(0,s.jsx)(l.A,{defaultMessage:"Q&A",id:"wz6PZS","data-sentry-element":"FormattedMessage","data-sentry-source-file":"ListingQADialog.tsx"})}),Y?(0,s.jsx)(b.A,{variant:"caption",color:"textSecondary",className:W.disclaimer??"mx-4",component:"div",children:K}):null,(0,s.jsx)(v.A,{className:W.content??"flex flex-col p-0","data-sentry-element":"DialogContent","data-sentry-source-file":"ListingQADialog.tsx",children:G})]})},W=e=>{let{listing:t,onClick:a,isPreview:d,buttonProps:u}=e,{channelId:h}=p(t?.id),[{qaDialogOpen:g},f]=(0,n.ab)({qaDialogOpen:n.cr.withDefault(!1),selectedListingId:n.tU}),m=(0,r.useCallback)(()=>{t&&(a?.(),f({qaDialogOpen:!0,selectedListingId:t.id}))},[a,t,f]),y=(0,r.useCallback)(()=>{f({qaDialogOpen:!1})},[f]),b=e=>async()=>{await f({selectedListingId:e,qaDialogOpen:!0})},v=(0,c.w)("ListingQADialog_signInCallback",b,{defaultMode:x.cj.SIGN_IN}),A=(0,c.w)("ListingQADialog_signUpCallback",b,{defaultMode:x.cj.SIGN_UP});return(0,o.uy)(h)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{size:"medium",variant:"outlined",fullWidth:!0,onClick:m,disabled:d,...u,"data-sentry-element":"Button","data-sentry-source-file":"ListingQAButtonWrapper.tsx",children:(0,s.jsx)(l.A,{defaultMessage:"Ask the seller a question",id:"xgufWw","data-sentry-element":"FormattedMessage","data-sentry-source-file":"ListingQAButtonWrapper.tsx"})}),g&&t?(0,s.jsx)(F,{open:g,onClose:y,listing:t,signInCallback:v,signUpCallback:A}):null]})}},37114:(e,t,a)=>{a.d(t,{Y:()=>o});var s=a(84206),i=a(86272),n=a(5776),r=a(68339),l=a(51456);let o=()=>
3{let[e,t]=(0,n.useState)(),[o,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(),{isAuthenticated:h}=(0,l.yj)({required:!1}),g=(0,r.ZC)(h),f=(0,n.useCallback)(async()=>{if(o)try{let{default:e}=await Promise.resolve().then(a.bind(a,70876));await e.disconnect(),c(!1),t(void 0),u(void 0)}catch(e){u(e),(0,s.h)(e,i.y.CHAT)}},[o]),m=(0,n.useCallback)(async()=>{let e=async()=>{try{let{default:e}=await Promise.resolve().then(a.bind(a,70876)),s=await e.connect();c(!0),t(s),u(void 0)}catch(e){u(e),(0,s.h)(e,i.y.CHAT)}};o?g!==h&&(await f(),await e()):await e()},[o,f,h,g]);return(0,n.useEffect)(()=>(m(),()=>{f()}),[f,m]),{connected:o,error:d,chatUserId:e}}},70876:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});let s=["af","am","ar","az","bg","bn","bs","cs","da","de","el","en","es","es-MX","et","fa","fa-AF","fi","fr","fr-CA","ha","he","hi","hr","hu","id","it","ja","ka","ko","lt","lv","ms","nl","no","pl","ps","pt","ro","ru","sk","sl","so","sq","sr","sv","sw","ta","th","tl","tr","uk","ur","vi","zh","zh-TW"];function i(e){return s.includes(e)}var n=a(82216),r=a(29837),l=a(80820),o=a(57833),c=a(3982);class d{static init(e,t){(this.instance=new d(e),(0,l.uy)(t))?console.info("No chat config present, skipping chat service initialization"):!(0,l.uy)(t)&&(0,l.uy)(t.streamChatKey)?console.error("Missing chatConfig.streamChatKey brand setting, unable to initialize chat service"):(console.info("Initializing chat service with key",{key:t.streamChatKey}),this.client=n.hxx.getInstance(t.streamChatKey,{timeout:6e3}),this.client.setMessageComposerSetupFunction(e=>{let{composer:t}=e;t.textComposer.middlewareExecutor.remove("stream-io/text-composer/mentions-middleware"),t.textComposer.middlewareExecutor.remove("stream-io/text-composer/commands-middleware")}))}static async refreshToken(e,t){let a=d.store.getState().brand.id,{data:s}=await c.A.client.query({query:o.OXq,variables:{brand_id:a,stream_chat_user_id:e,verification_code:t}});return s.refreshStreamChatToken.stream_chat_user_token}static languageForChat(){var e=d.store.getState().locale.language;if(!e)return;if(i(e))return e;let t=e.split("-")[0];return t&&i(t)?t:void 0}static async connect(){let e=d.store.getState().auth.uid;if(!(0,l.uy)(e)){let e=d.store.getState().brand.id,{data:t}=await c.A.client.query({query:o.wCP,variables:{brand_id:e}}),a=t.getOrCreateStreamChatUser.stream_chat_user_id;return await d.client.connectUser({id:a},async()=>d.refreshToken(a)),a}let{streamUserId:t,verificationCode:a}=d.store.getState().chat;if(!(0,l.uy)(t)&&!(0,l.uy)(a))return await d.client.connectUser({id:t},async()=>d.refreshToken(t,a)),t;await d.client.connectAnonymousUser()}static async disconnect(){await d.client.disconnectUser()}static async queryChannels(e){return d.client.queryChannels(e)}static getI18nInstance(){let e=d.languageForChat();return new r.L({language:e})}constructor(e){d.store=e,d.instance=this}}let u=d}}]);
4//# sourceMappingURL=168.f5ca0c7fde57aac2.js.map
5//# chunkId=bef66ec5-0513-5ea0-894a-c19dc8b00c63
6//# debugId=26bf5c4e-1283-5433-b47e-ec4779097d27

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.