(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1165],{60388:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/share/[[...shareParams]]",function(){return r(66309)}])},66309:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return j},config:function(){return N},default:function(){return D}});var i=r(39324),t=r(71209),s=r(10064),a=r(35250),o=r(65484),u=r(76768),l=r(25687),d=r(98800);function c(e){var n=e.sharedConversationId,r=e.initiallyHighlightedMessageId,i=e.continueConversationUrl;return(0,a.jsx)(l.gB.Provider,{value:{serverSharedThreadId:n},children:(0,a.jsx)(d.Z,{clientThreadId:n,setClientThreadId:function(){},initiallyHighlightedMessageId:r,continueConversationUrl:i})})}var h=r(66638),v=r(82473),m=r(73040),_=r.n(m),f=r(70079),g=r(1454),x=r(94968),p=r(32004),j=!0,N={runtime:"nodejs"},C=(0,x.vU)({home:{id:"sharedConversation.home",defaultMessage:"Home",description:"Home link text in error message"}});function D(e){if("error"===e.serverResponse.type)return(0,a.jsx)(w,{error:e.serverResponse.error});var n=(0,t._)((0,i._)({},e),{conversationData:e.serverResponse.data,isGizmoLive:e.isGizmoLive});return e.continueMode?(0,a.jsx)(I,(0,i._)({},n)):e.moderationMode?(0,a.jsx)(u.Z,{children:(0,a.jsx)(P,(0,i._)({},n))}):(0,a.jsx)(P,(0,i._)({},n))}function I(e){var n=(0,s._)((0,f.useState)(function(){return(0,h.OX)()}),1)[0];h.tQ.initThreadFromServerData(n,e.conversationData,!0,e.sharedConversationId);var r=(0,v.NL)();return(null!=e.plugins&&r.setQueryData(e.plugins.map(function(e){return e.id}),e.plugins),null!=e.chatPageProps)?(0,a.jsx)(o.ZP,(0,t._)((0,i._)({},e.chatPageProps),{clientThreadId:n})):null}function P(e){h.tQ.initThreadFromServerData(e.sharedConversationId,e.conversationData,!0);var n=(0,v.NL)();return null!=e.plugins&&n.setQueryData(e.plugins.map(function(e){return e.id}),e.plugins),(0,a.jsx)(c,(0,t._)((0,i._)({},e),{initiallyHighlightedMessageId:e.conversationData.highlighted_message_id,continueConversationUrl:e.conversationData.continue_conversation_url}))}function w(e){var n=e.error;return(0,a.jsx)("div",{className:"mx-8 mt-8 flex flex-col items-center sm:mt-16",children:(0,a.jsxs)("div",{className:"max-w-xl rounded-lg bg-red-500 px-8 py-4 text-white",role:"alert",children:[(0,a.jsx)("div",{children:n}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsxs)(_(),{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)(g.m6D,{className:"icon-sm"}),(0,a.jsx)(p.Z,(0,i._)({},C.home))]})})]})})}}},function(e){e.O(0,[1e3,746,2218,816,4865,7039,3140,1771,1522,5484,9774,2888,179],function(){return e(e.s=60388)}),_N_E=e.O()}]);