PageSourceSearch

https://cnbc.africa/_next/static/chunks/3086-c8c7c2131dce9873.js

js cnbc.africa collected 2026-09-30 10:08:31 UTC 9,968 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3086],{43086:function(e,t,n){n.d(t,{Z:function(){return v}});var r=n(47568),o=n(97582),a=n(85893),l=n(67294),i=n(41664),s=n.n(i),c=n(39805);function d(e){var t=e.event,n=(0,c.JC)(t),r=(0,c.Nw)(t),o=((null==t?void 0:t.location)||"").trim();return n||r||o?(0,a.jsxs)("div",{className:"mt-3 text-sm leading-6 text-gray-600",children:[n&&(0,a.jsx)("p",{children:n}),r&&(0,a.jsx)("p",{children:r}),o&&(0,a.jsx)("p",{children:o})]}):null}function u(e){var t=e.themeColor,n=e.eyebrow,r=e.title,o=e.eventTitle,l=e.event,i=e.titleUsesThemeColor,s=void 0!==i&&i,c=e.children;return(0,a.jsxs)("div",{className:"min-w-0 overflow-hidden border bg-white p-6 text-black md:p-10",style:{borderColor:t},children:[(0,a.jsxs)("div",{className:"mb-8",children:[n&&(0,a.jsx)("p",{className:"mb-2 text-xs font-bold uppercase tracking-[0.2em]",style:{color:t},children:n}),(0,a.jsx)("h2",{className:"text-3xl font-extrabold leading-tight md:text-5xl ".concat(s?"":"text-black"),style:s?{color:t}:void 0,children:r}),o&&(0,a.jsx)("p",{className:"mt-3 text-lg italic text-gray-600",children:o}),l&&(0,a.jsx)(d,{event:l})]}),c]})}function m(e){var t=e.event,n=e.themeColor;return(null==t?void 0:t.eventLogo)?(0,a.jsx)("aside",{className:"mx-auto w-full max-w-[280px] self-start overflow-hidden border bg-white lg:mx-0",style:{borderColor:n},children:(0,a.jsx)("div",{className:"relative aspect-[4/3] w-full overflow-hidden",style:{backgroundColor:n},children:(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-8",children:(0,a.jsx)("img",{src:t.eventLogo,alt:t.title||"Event logo",className:"max-h-full max-w-full object-contain"})})})}):null}function h(e){var t=e.event,n=e.themeColor,r=e.children,o=Boolean(null==t?void 0:t.eventLogo);return(0,a.jsxs)("div",{className:"grid gap-6 ".concat(o?"grid-cols-1 lg:grid-cols-[minmax(0,1fr)_280px] lg:gap-10":"grid-cols-1"),children:[o&&(0,a.jsx)("div",{className:"order-1 lg:order-2",children:(0,a.jsx)(m,{event:t,themeColor:n})}),(0,a.jsx)("div",{className:o?"order-2 lg:order-1":void 0,children:r})]})}function g(e){var t=e.themeColor,n=e.primaryLabel,r=e.onPrimaryClick,o=e.primaryType,l=e.primaryDisabled;return(0,a.jsx)("div",{className:"mt-8",children:(0,a.jsx)("button",{type:void 0===o?"button":o,onClick:r,disabled:void 0!==l&&l,className:"px-10 py-3 text-sm font-bold !text-white transition-colors hover:!text-cnbc-yellow disabled:cursor-not-allowed disabled:opacity-60",style:{backgroundColor:t},children:n})})}function v(e){var t,n=e.event,i=e.token,c=e.error,d=(0,l.useState)(!1),m=d[0],v=d[1],x=(0,l.useState)(!1),f=x[0],b=x[1],y=(0,l.useState)(null),p=y[0],j=y[1],N=(null==n?void 0:n.themeColor)||"#332867",w=(t=(0,r.Z)(function(){var e,t,r;return(0,o.__generator)(this,function(o){switch(o.label){case 0:if(!i)return j("Missing invitation token"),[2];v(!0),j(null),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,fetch("/api/events/decline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i,eventId:null==n?void 0:n._id,eventSlug:null==n?void 0:n.slug})})];case 2:return[4,(e=o.sent()).json()];case 3:return t=o.sent(),e.ok?b(!0):t.expired?j("This invitation link has expired. Please contact the event organizers if you need to update your response."):j(t.error||"Failed to process your decline. Please try again."),[3,6];case 4:return r=o.sent(),console.error("Error processing decline:",r),j("Network error. Please try again."),[3,6];case 5:return v(!1),[7];case 6:return[2]}})}),function(){return t.apply(this,arguments)}),C=function(e){return(0,a.jsxs)("div",{className:"mx-auto w-full max-w-screen-xl shrink-0 self-stretch bg-white px-2 pb-20 pt-8 md:pt-10",children:[(null==n?void 0:n.slug)&&(0,a.jsx)(s(),{href:"/events/".concat(n.slug),children:(0,a.jsx)("a",{className:"mb-8 inline-block text-sm text-blue-600 hover:underline",children:"← Back to Event Details"})}),e]})};return C(c?(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsxs)(u,{themeColor:N,eyebrow:"Invitation",title:"Event not found",children:[(0,a.jsx)("p",{className:"mb-6 text-sm leading-6 text-gray-700",children:c}),(0,a.jsx)(s(),{href:"/events",children:(0,a.jsx)("a",{className:"inline-block px-10 py-3 text-sm font-bold !text-white transition-colors hover:!text-cnbc-yellow",style:{backgroundColor:N},children:"Back to events"})})]})}):n?m?(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsx)(u,{themeColor:N,eyebrow:"Invitation Response",title:"Updating status",children:(0,a.jsxs)("div",{className:"flex flex-col items-center py-8",children:[(0,a.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-b-2",style:{borderColor:N}}),(0,a.jsx)("p",{className:"mt-4 text-sm text-gray-600",children:"Updating status…"})]})})}):p?(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsxs)(u,{themeColor:N,eyebrow:"Invitation Response",title:"Unable to decline",children:[(0,a.jsx)("div",{className:"mb-6 border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:p}
1),(0,a.jsx)(g,{themeColor:N,primaryLabel:"Try again",onPrimaryClick:w})]})}):f?(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsxs)(u,{themeColor:N,eyebrow:"Invitation Response",title:"Response recorded",children:[(0,a.jsxs)("div",{className:"mb-6 border border-green-200 bg-green-50 p-4 text-sm text-green-700",children:[(0,a.jsxs)("p",{children:["Thank you for your response. We're sorry that you will not be attending ",n.title,"."]}),(0,a.jsx)("p",{className:"mt-2",children:"We hope that you will join us at one of our future events."})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-4",children:(0,a.jsx)(s(),{href:"/events",children:(0,a.jsx)("a",{className:"inline-block border border-black px-8 py-3 text-sm font-bold text-black",children:"Browse other events"})})})]})}):(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsxs)(u,{themeColor:N,title:"We're sorry you can't make it",eventTitle:n.title,event:n,titleUsesThemeColor:!0,children:[(0,a.jsx)("p",{className:"text-sm leading-6 text-gray-700 md:text-base",children:"Please confirm below and we'll update your invitation status."}),(0,a.jsx)(g,{themeColor:N,primaryLabel:"Decline Invitation",onPrimaryClick:w})]})}):(0,a.jsx)(h,{event:n,themeColor:N,children:(0,a.jsx)(u,{themeColor:N,eyebrow:"Invitation",title:"Loading",children:(0,a.jsxs)("div",{className:"flex flex-col items-center py-8",children:[(0,a.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-b-2",style:{borderColor:N}}),(0,a.jsx)("p",{className:"mt-4 text-sm text-gray-600",children:"Loading event information…"})]})})}))}},39805:function(e,t,n){n.d(t,{JC:function(){return s},Nw:function(){return d},YN:function(){return c}});var r=n(82670),o=n(26042);function a(e){if(!e)return"";if("string"==typeof e){var t=e.match(/^(\d{4}-\d{2}-\d{2})/);if(t)return t[1]}var n=(0,r.Z)(e,Date)?e:new Date(e);if(Number.isNaN(n.getTime()))return"";var o=n.getFullYear(),a=String(n.getMonth()+1).padStart(2,"0"),l=String(n.getDate()).padStart(2,"0");return"".concat(o,"-").concat(a,"-").concat(l)}function l(e){return e?new Date("2000-01-01T".concat(e)).toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:!0}):""}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";var n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleDateString("en-US",(0,o.Z)({month:"long",day:"numeric",year:"numeric"},t))}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.startDate||e.date,n=e.endDate,r=t?new Date(t):null,o=n?new Date(n):null;if(!r||Number.isNaN(r.getTime()))return"";if(!o||Number.isNaN(o.getTime())||r.toDateString()===o.toDateString())return i(t);var a=r.getFullYear()===o.getFullYear();if(a&&r.getMonth()===o.getMonth()){var l=r.toLocaleDateString("en-US",{month:"long"});return"".concat(l," ").concat(r.getDate(),"–").concat(o.getDate(),", ").concat(r.getFullYear())}if(a){var s=r.toLocaleDateString("en-US",{month:"long",day:"numeric"}),c=o.toLocaleDateString("en-US",{month:"long",day:"numeric"});return"".concat(s," – ").concat(c,", ").concat(r.getFullYear())}return"".concat(i(t)," – ").concat(i(n))}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.startDate||e.date,n=e.endDate,r=t?new Date(t):null,o=n?new Date(n):null;if(!r||Number.isNaN(r.getTime()))return"";if(!o||Number.isNaN(o.getTime())||r.toDateString()===o.toDateString())return r.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});if(r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()){var a=r.toLocaleDateString("en-US",{month:"long"});return"".concat(a," ").concat(r.getDate()," - ").concat(o.getDate(),", ").concat(r.getFullYear())}var l=r.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=o.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return"".concat(l," - ").concat(i)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=a(e.startDate||e.date),n=a(e.endDate||e.startDate||e.date);return Boolean(t&&n&&t!==n)}(e);return t&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Array.isArray(e.dayTimes)?e.dayTimes:[];return!(t.length<=1)&&new Set(t.map(function(e){return"".concat((null==e?void 0:e.startTime)||"","|").concat((null==e?void 0:e.endTime)||"")})).size>1}(e)?"":function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.daily,r=e.startTime||e.timeStart||"",o=e.endTime||e.timeEnd||"",a="";return r&&o?a="".concat(l(r)," - ").concat(l(o)):r?a=l(r):o&&(a=l(o)),a&&void 0!==n&&n&&(a="".concat(a," daily")),a}(e,{daily:t})}},82670:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof 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.