PageSourceSearch

https://www.clientpoint.me/_next/static/chunks/pages/relationships/[relationshipId]-672a40a34d6a11d4.js

js clientpoint.me collected 2026-10-02 07:14:28 UTC 8,831 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9802],{98135:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var s=n(87395);function a(e){let{theme:t,name:n,props:a}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,s.Z)(t.components[n].defaultProps,a):a}},80442:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/relationships/[relationshipId]",function(){return n(92263)}])},92263:function(e,t,n){"use strict";n.r(t),n.d(t,{Index:function(){return T},default:function(){return x}});var s=n(52322),a=n(2784),r=n.t(a,2),o=n(57675),i=n(18579),u=n(94449),d=n(69745),c=n(5632),l=n(12910),h=n(39011),E=n(95207),I=n(37129),f=n(42351),m=n(92403),v=n(55647),p=n(13806),S=n(98135),_=n(38457);let y=r.useSyncExternalStore;var N=n(23925),g=n(55934),w=n(56189),R=n(60418);function T(){let e=(0,c.useRouter)(),t=(0,u.I0)(),n=(0,u.v9)(e=>e.auth),r=(0,u.v9)(e=>e.assistant),{isReady:v}=e,{threadPostId:T}=(0,u.v9)(e=>e.layout),{selectedRelationshipId:x,selectedRelationPairingId:O}=(0,u.v9)(e=>e.relationship),{countries:P,loading:C}=(0,u.v9)(e=>e.country),{relationshipId:U,threadPostId:L}=e.query;("undefined"===U||U===n.userId)&&e.push("/");let b={userId:U,firstName:"Pat",lastName:"Smith",role:"testUser",headline:"AI Assistant Tester",bio:"Pat Smith is an imaginary persona you will assume here in testing mode so that you can interact with Meg to see how she will respond to people on your behalf."},[A,j]=(0,a.useState)(void 0),[k,F]=(0,a.useState)(!1),[M,Z]=(0,a.useState)(),[z,D]=(0,a.useState)(""),[q,Y]=(0,a.useState)(!1),[V,X]=(0,a.useState)(!1),H=(0,a.useRef)(),J={USER_PROFILE:!1,USER_PROFILE_1:!1,USER_PROFILE_2:!1,USER_PROFILE_3:!1,ASSISTANT_PROFILE:!1,TEST_PROFILE:!1},[W,$]=(0,a.useState)({...J,USER_PROFILE_2:!0,ASSISTANT_PROFILE:!0}),G=function(e,t={}){let n=(0,_.Z)(),s="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:r=!1,matchMedia:o=s?window.matchMedia:null,ssrMatchMedia:i=null,noSsr:u=!1}=(0,S.Z)({name:"MuiUseMediaQuery",props:t,theme:n}),d="function"==typeof e?e(n):e;return(void 0!==y?function(e,t,n,s,r){let o=a.useCallback(()=>t,[t]),i=a.useMemo(()=>{if(r&&n)return()=>n(e).matches;if(null!==s){let{matches:t}=s(e);return()=>t}return o},[o,e,s,r,n]),[u,d]=a.useMemo(()=>{if(null===n)return[o,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[o,n,e]);return y(d,u,i)}:function(e,t,n,s,r){let[o,i]=a.useState(()=>r&&n?n(e).matches:s?s(e).matches:t);return(0,p.Z)(()=>{let t=!0;if(!n)return;let s=n(e),a=()=>{t&&i(s.matches)};return a(),s.addListener(a),()=>{t=!1,s.removeListener(a)}},[e,n]),o})(d=d.replace(/^@media( ?)/m,""),r,o,i,u)}("(max-width:".concat(l.Wk,"px)"));!T&&L&&(T=L);let Q=(0,a.useCallback)(async()=>{t((0,d.h9)());let e=await E.zk.get(l.eb+"/utility/countries");e.data.isSuccess&&e.data.data.results&&t((0,d.mw)(e.data.data.results))},[t]);(0,a.useEffect)(()=>{t((0,d.cr)(!1))},[t]),(0,a.useEffect)(()=>{let{threadPostId:n,notificationPostId:s,commentId:a,commentReplyId:r,entityId:o}=e.query,i=n||s;i?(t((0,d.Uv)(i)),(r||a)&&(t((0,d.SP)(r)),t((0,d.qe)(a)),t((0,d.GL)(null!=o?o:"")))):n&&e.replace({query:{...e.query,threadPostId:""}},void 0,{shallow:!0})},[]),(0,a.useEffect)(()=>{"idle"!==C||P.length||Q()},[P.length,C,Q]),(0,a.useEffect)(()=>{D(""),j(void 0),E.zk.get(l.R8+"/pairing/status?userId="+n.userId+"&connectedWithUserId="+U).then(e=>{e&&("invited-to-connect"===e.data.data.status?(D("ACCEPT"),j(void 0)):"requested"===e.data.data.status?(D(""),j(void 0)):"connected"===e.data.data.status?(D(""),j(U)):"undefined"===e.data.data.status?(D("CONNECT"),j("")):j(void 0))}).catch(function(e){e.response&&!1===e.response.data.isSuccess&&(j(void 0),D("CONNECT"))})},[U,n.userId]),(0,a.useEffect)(()=>{x||t((0,d.Iy)(U))},[U]);let B=(0,a.useCallback)(()=>{if(H.current&&H.current.cancel("Operation canceled due to new request."),U){var e;H.current=R.Z.CancelToken.source(),E.zk.get(l.eb+"/user/id?userId="+U,{cancelToken:H.current.token}).then(e=>{if(e){if("testUser"!==e.data.data.role)Z(e.data.data),t((0,d.sS)(e.data.data)),F(!1);else{I.Z.dispatch("REFRESH_CONNECTIONS_LIST",{status:"added",testUserId:U}),(0,d.r1)({status:"testMode",testUserId:U}),F(!0);let e={userId:U,firstName:"Meg",role:"assistant",headline:"Your AI Assistant",bio:"Your AI Assistant will support you in many ways, and can even interact with others on ClientPoint when you are not available. Meg can remind you about things you need to do, set meetings on your behalf as directed, summarize activity that occurred while you were away, help you write documents and messages, do research and even call or text you to let you know certain people are reaching out."};Z(e),t((0,d.sS)(e))}}}).catch(function(e){var n;(null==e?void 0:e.code)!=="ERR_CANCELED"&&(H.current=R.Z.CancelToken.source(),E.zk.get(l.eb+"/assistant/"+U,{cancelToken:null==H?void 0:null===(n=H.current)||void 0===n?void 0:n.token}).then(e=>{if(e.data.isSuccess){F(!0);let e={userId:U,firstName:"Meg",role:"assistant",headline:"Your AI Assistant",bio:"Your AI Assistant will support you in many ways, and can even interact with others on ClientPoint when you are not available. Meg can remind you about things you need to do, set meetings on your behalf as directed, summarize activity that occurred while you were away, help you write documents and messages, do research and even call or text you to let you know certain people are reaching out."};Z(e),t((0,d.sS)(e))}}))}),null===(e=window.rudderanalytics)||void 0===e||e.page()}},[U,t]);(0,a.useEffect)(()=>(v&&B(),()=>{F(!1),j(void 0),t((0,d.sS)(void 0)),H.current&&H.current.cancel("Component unmounted or timeline changed.")}),[B,v]),(0,a.useEffect)(()=>{async function e(){E.zk.get(l.R8+"/assistant/"+(null==r?void 0:r.assistantId)+"/user/"+n.userId+"/pairing/"+O+"/settings").then(function(e){var n,s,a;(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.isSuccess)&&t((0,d.kR)(null!=e&&null!==(a=e.data)&&void 0!==a&&null!==(s=a.data)&&void 0!==s&&!!s.enabled))}).catch(e=>{console.error("Error fetching data to initialize relationship.",e)})}(null==n?void 0:n.userId)&&(null==r?void 0:r.assistantId)&&O&&e()},[null==r?void 0:r.assistantId,t,O,n.userId]),(0,a.useEffect)(()=>{let e=e=>{e&&Y(!q)};return I.T.on("CONNECTION_CREATED",e),()=>{I.T.removeListener("CONNECTION_CREATED",e)}},[q]),(0,a.useEffect)(()=>{let e=()=>{D("")};return I.T.on("HIDE_CONNECTION_CARD",e),()=>{I.T.removeListener("HIDE_CONNECTION_CARD",e)}},[]);let K=e=>{"relation"===e&&X(!1)};return(0,a.useEffect)(()=>{G||X(!1)},[G]),U!==n.userId&&(0,s.jsxs)(s.Fragment,{children:[G&&T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.J5,{showDrawerOnly:!0}),(0,s.jsx)(i.IT,{postId:T,threadView:!0})]}):(0,s.jsx)(f.Z,{connectedUser:M,excludeShareCard:V,openProfile:e=>{"relation"===e&&X(!0)},children:(0,s.jsxs)(s.Fragment,{children:[M&&V&&(0,s.jsx)(o.MX,{className:"overflow-auto",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(N.Z,{onClick:()=>{K("relation")},color:"grey.50",className:"list-pin-icon cursor-pointer list-close",display:"flex",alignItems:"center",children:(0,s.jsx)(w.Tw,{})}),(0,s.jsx)(N.Z,{onClick:()=>{K("relation")},className:" cursor-pointer list-back",children:(0,s.jsx)("span",{className:"material-icons",children:"arrow_back"})}),k?(0,s.jsx)(h.iJ,{isExpanded:W.ASSISTANT_PROFILE,user:M,buttonName:z,connectedUser:M,onToggle:e=>{$({...J,ASSISTANT_PROFILE:e})}}):(0,s.jsx)(h.v3,{isExpanded:W.USER_PROFILE,user:M,buttonName:z,connectedUser:M,connectedUserId:A,countries:P,onToggle:e=>{$({...J,USER_PROFILE:e})}}
1),k&&(null==r?void 0:r.status)==="testMode"?(0,s.jsx)(h.$V,{user:b,buttonName:z,connectedUser:M}):(0,s.jsx)(h.v3,{isExpanded:W.USER_PROFILE_1,user:n,buttonName:z,connectedUser:M,connectedUserId:A,countries:P,onToggle:e=>{$({...J,USER_PROFILE_1:e})}})]})}),!V&&(0,s.jsx)(i.TY,{})]})}),(0,s.jsx)(m.Z,{children:T&&!G?(0,s.jsx)(i.IT,{postId:T,threadView:!0}):M?(0,s.jsx)(o.MX,{className:"overflow-auto",children:(0,s.jsxs)("div",{children:[k?(0,s.jsx)(h.iJ,{isExpanded:W.ASSISTANT_PROFILE,user:M,buttonName:z,connectedUser:M,onToggle:e=>{$({...J,ASSISTANT_PROFILE:e})}}):(0,s.jsx)(h.v3,{isExpanded:W.USER_PROFILE_2,user:M,connectedUserId:A,buttonName:z,connectedUser:M,countries:P,onToggle:e=>{$({...J,USER_PROFILE_2:e})}}),k&&(null==r?void 0:r.status)==="testMode"?(0,s.jsx)(h.$V,{isExpanded:W.TEST_PROFILE,user:b,buttonName:z,connectedUser:M}):(0,s.jsx)(h.v3,{isExpanded:W.USER_PROFILE_3,user:n,buttonName:z,connectedUser:M,connectedUserId:A,countries:P,onToggle:e=>{$({...J,USER_PROFILE_3:e})}})]})}):null})]})}var x=T;T.displayName="RelationshipPage",T.getLayout=function(e){return(0,s.jsx)(v.Z,{children:e})}}},function(e){e.O(0,[3325,2182,5220,2812,5417,3661,6577,9097,1055,524,3850,1563,2888,9774,179],function(){return e(e.s=80442)}),_N_E=e.O()}]);

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.