1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9875],{99875:function(e,l,i){i.r(l);var t=i(20567),o=i(85893);i(67294);var s=i(96788),a=i(11032),r=i(60990),n=i(84166),d=i(40492),u=i(4336),c=i(82409),b=i(11163),v=i(49381),m=i(62411),x=i(61776),p=i(65626),g=i(42705),h=i.n(g),_=i(87536),w=i(66030),f=i(12283),S=i(18745),y=i(61730),Z=i(12166),j=i(65806);let N=h().object({email:h().string().email({tlds:{allow:!1}}).messages({"string.email":"Email must be valid","string.empty":"Email is required"}).required(),firstName:h().string().messages({"string.empty":"Name is required"}).required(),postCode:h().string().allow(""),allowShare:h().boolean()});l.default=e=>{var l,i,g,h,k,C,E,R,B,T,I,q,P,F,G;let{title:H}=e,L=(0,S.Z)(),Y=(0,y.Z)(L.breakpoints.between("xs","lg_xl")),{enqueueSuccess:K,enqueueError:M}=(0,c.zn)(),O=(0,b.useRouter)(),{register:U,handleSubmit:W,formState:{errors:z}}=(0,_.cI)({resolver:(0,w.L)(N)}),A=async e=>{(0,x.c)(e.email),(0,p.IN)(e.email),V({variables:(0,t._)({property:m.HMM.GoodsContactSource,value:"title:".concat(null==H?void 0:H.slug)},e)}).then(e=>{var l,i,t;(null===(l=e.data)||void 0===l?void 0:l.updateHubspotProperty)==="ok"||(null===(t=e.data)||void 0===t?void 0:null===(i=t.updateHubspotProperty)||void 0===i?void 0:i.includes("Contact already exists"))?K("Successfully subscribed"):M("Failed to subscribe")},()=>{M("Failed to subscribe")})},[V]=(0,m.gIZ)();return(0,o.jsx)(a.Z,{sx:{bgcolor:"transparent"},children:(0,o.jsxs)(r.Z,{sx:{border:"1px solid #C72F7A33",borderRadius:"5px"},mx:"auto",width:{xs:"100%"},p:2,children:[(0,o.jsx)(s.Z,{variant:"h4",children:null!==(q=null==H?void 0:null===(l=H.campaign_subscribe_section)||void 0===l?void 0:l.title)&&void 0!==q?q:"Get the latest updates about ".concat(null==H?void 0:H.name)}),(0,o.jsx)(s.Z,{color:"common.black",mb:2,mt:1,children:null!==(P=null==H?void 0:null===(i=H.campaign_subscribe_section)||void 0===i?void 0:i.body_copy)&&void 0!==P?P:"Be part of a community who looks at the world 25 frames at a time. Receive updates, our Guide to the film and more. No spam, ever."}),(0,o.jsxs)(n.Z,{direction:"column",component:"form",onSubmit:W(A),"data-testid":"subscribe-form",noValidate:!0,children:[(0,o.jsxs)(n.Z,{direction:{xs:"column",lg_xl:"row"},spacing:{xs:2,lg_xl:2},width:"100%",alignSelf:{xs:"center",lg_xl:"center"},children:[(0,o.jsx)(d.Z,(0,t._)({type:"text",label:"Your email address",sx:{"& input":{backgroundColor:"white",borderRadius:"5px"},width:{xs:"100%",lg_xl:"100%"}},error:!!(null==z?void 0:null===(g=z.email)||void 0===g?void 0:g.message)},U("email"))),(0,o.jsx)(d.Z,(0,t._)({type:"text",label:"Your first name",sx:{"& input":{backgroundColor:"white",borderRadius:"5px"},width:{xs:"100%",lg_xl:"100%"}},error:!!(null==z?void 0:null===(h=z.firstName)||void 0===h?void 0:h.message)},U("firstName"))),(0,o.jsx)(d.Z,(0,t._)({type:"text",label:"Your post code",sx:{"& input":{backgroundColor:"white",borderRadius:"5px"},width:{xs:"100%",lg_xl:"100%"}}},U("postCode"))),Y?null:(0,o.jsx)(u.Z,{type:"submit","data-eventcategory":v.K.SUBSCRIBE_TO_NEWSLETTER,"data-eventaction":"subscribe","data-eventlabel":"Newsletter Subscribe button","data-eventvalue":O.asPath,sx:{flexShrink:{xs:0},marginBottom:4},children:null!==(F=null==H?void 0:null===(k=H.campaign_subscribe_section)||void 0===k?void 0:k.button.text)&&void 0!==F?F:"Subscribe"})]}),(null==H?void 0:null===(C=H.campaign_subscribe_section)||void 0===C?void 0:C.share_partner)?(0,o.jsx)(j.Z,{control:(0,o.jsx)(Z.Z,(0,t._)({},U("allowShare"))),label:"Share my details with ".concat(null==H?void 0:H.campaign_subscribe_section.share_partner)}):null,Y?(0,o.jsx)(u.Z,{type:"submit","data-eventcategory":v.K.SUBSCRIBE_TO_NEWSLETTER,"data-eventaction":"subscribe","data-eventlabel":"Newsletter Subscribe button","data-eventvalue":O.asPath,sx:{flexShrink:{xs:0},marginBottom:4},children:null!==(G=null==H?void 0:null===(E=H.campaign_subscribe_section)||void 0===E?void 0:E.button.text)&&void 0!==G?G:"Subscribe"}):null]}),!!(null==z?void 0:null===(R=z.email)||void 0===R?void 0:R.message)&&(0,o.jsx)(f.Z,{error:!0,children:null===(B=z.email)||void 0===B?void 0:B.message}),!!(null==z?void 0:null===(T=z.firstName)||void 0===T?void 0:T.message)&&(0,o.jsx)(f.Z,{error:!0,children:null===(I=z.firstName)||void 0===I?void 0:I.message})]})})}}}]);
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.