PageSourceSearch

https://downtowncalgary.com/component---src-pages-events-submit-an-event-index-js-f147d38478df3821369c.js

js downtowncalgary.com collected 2026-10-02 10:18:34 UTC 8,811 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkcalgary_downtown_association=self.webpackChunkcalgary_downtown_association||[]).push([[35],{28314:function(e,t,n){n.r(t),n.d(t,{default:function(){return v}});var a=n(30758),o=n(7201),l=n(71657),i=n(84899),r=n(93973),s=n(17356),u=n(3675),m=n.n(u),d=n(5250);var c={name:"e0dnmk",styles:"cursor:pointer"};const p=e=>{let{onClick:t,name:n}=e;return(0,s.Y)(a.Fragment,null,n&&(0,s.Y)(i.so,{py:"layout.1",justifyContent:"space-between",alignItems:["flex-start","center"],flexDirection:["column","row"],css:c,onClick:t},(0,s.Y)(i.az,{mr:"layout.1"},(0,s.Y)(i.DZ,{size:100,as:"h2",children:n})),(0,s.Y)(i.In,{symbol:"arrowRight"})))},h=e=>{let{active:t,onChange:n,tags:a,id:o}=e;const l=(0,d.u)();return(0,s.Y)(i.MC,{content:a.map(((e,a)=>{let{label:r,originalId:u,itemActive:m}=e;return{children:(0,s.Y)(i.$n,{type:"button",height:[40,48],px:"0.75em",fontFamily:"standard",fontWeight:"normal",css:(0,s.AH)({textTransform:"capitalize",boxShadow:`inset 0 0 0 4px ${l.colors.text} !important`},"",""),className:t===u||m?"selected":"",onClick:()=>{n(u)},key:o+a},r)}})),gutterX:[2],gutterY:[2],justifyContent:"flex-start"})};var Y={name:"5df7c4",styles:"> * + *{margin-top:16px;}"},y={name:"e0dnmk",styles:"cursor:pointer"},g={name:"1wbll7q",styles:"text-decoration:underline"};var f=()=>{const{businesses:e,categories:t,experiences:n}=(0,o.GR)("4222743563"),{0:l,1:u}=(0,a.useState)(""),{0:d,1:c}=(0,a.useState)(""),{0:f,1:b}=(0,a.useState)(""),{0:C,1:v}=(0,a.useState)([]),{0:T,1:D}=(0,a.useState)(""),{0:z,1:x}=(0,a.useState)([]);(0,a.useEffect)((()=>{let t=[];e.nodes.forEach((e=>{d&&e.name&&-1!==e.name.toLowerCase().indexOf(d.toLowerCase())&&t.length<5&&t.push(e)})),x(t)}),[d]);const{0:S,1:w}=(0,a.useState)({});function E(e){const t=new FormData;for(const n of Object.keys(e))t.append(n,e[n]);return t}const k=e=>{w({...S,[e.target.name]:e.target.value})},F=e=>{w({...S,[e.target.name]:e.target.files[0]})};return(0,s.Y)(a.Fragment,null,(0,s.Y)(i.mO,{id:"submit-an-event-form",maxWidth:768},(0,s.Y)(i.az,{as:"form",name:"submitEventForm",method:"POST","data-netlify":"true",action:"/thank-you/",css:Y,onSubmit:e=>{if(!l){u(!0),e.preventDefault();const t=e.target;fetch("/",{method:"POST",body:E({"form-name":t.getAttribute("name"),...S,startDateTime:m()(S.startDateTime).utcOffset(0,!0).toISOString(),endDateTime:m()(S.endDateTime).utcOffset(0,!0).toISOString()})}).then((()=>(0,o.oo)(t.getAttribute("action")))).catch((e=>alert(e)))}},style:{pointerEvents:l?"none":"",opacity:l?.3:1}},(0,s.Y)("input",{type:"hidden",name:"form-name",value:"submitEventForm"}),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"contactName",type:"name",label:"Your name",placeholder:"Enter your name",required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"contactPhone",type:"phone",label:"Phone",placeholder:"Enter your phone number",required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"contactEmail",type:"email",label:"Email",placeholder:"Enter your email address",required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.TM,{name:"comments",type:"text",label:"Private comments",placeholder:"Please write any comments that you only want the CDA to see",minRows:5,onChange:k})),(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Event details"),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"eventName",type:"text",label:"Event name",placeholder:"Enter your event's name",required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)("input",{type:"hidden",name:"startDateTime",value:S.startDateTime}),(0,s.Y)(i.lr,{label:"Start Date & Time",placeholder:"Enter the start date and time of the event",selected:S.startDateTime,value:S.endDateTime&&m()(S.startDateTime).format("MMMM DD, YYYY h:mm a"),onChange:e=>{w({...S,startDateTime:e})},required:!0})),(0,s.Y)(i.az,null,(0,s.Y)("input",{type:"hidden",name:"endDateTime",value:S.endDateTime}),(0,s.Y)(i.lr,{label:"End Date & Time",placeholder:"Enter the end date and time of the event",selected:S.endDateTime,value:S.endDateTime&&m()(S.endDateTime).format("MMMM DD, YYYY h:mm a"),onChange:e=>{w({...S,endDateTime:e})},required:!0})),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"address",type:"text",label:"Address / Location",placeholder:"Enter the location of the event",required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"parkingTips",type:"text",label:"Parking tips",placeholder:"Enter helpful tips about parking nearby",onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.TM,{name:"details",type:"text",label:"Event details",placeholder:"Event details in a few paragraphs -- (how you want it to show up on the site)",minRows:5,required:!0,onChange:k})),(0,s.Y)(i.az,null,(0,s.Y)(i.pd,{name:"website",type:"text",label:"Website",placeholder:"Enter a link 
1where more information can be found",onChange:k})),t&&t.nodes&&(0,s.Y)(a.Fragment,null,(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Type of event"),(0,s.Y)(i.az,null,(0,s.Y)("input",{name:"category",value:f,type:"text",style:{display:"none"},onChange:w}),(0,s.Y)(h,{id:"categoryTags",active:f,onChange:e=>{f!==e?(b(e),w({...S,category:e})):(b(""),w({...S,category:""}))},tags:t.nodes.map((e=>{let{heroTitle:t,originalId:n}=e;return{label:t,originalId:n}}))}))),n&&n.nodes&&(0,s.Y)(a.Fragment,null,(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Occasion"),(0,s.Y)(i.az,null,(0,s.Y)("input",{name:"experiences",value:C.toString(),type:"text",style:{display:"none"}}),(0,s.Y)(h,{id:"occasionTags",onChange:e=>{if(-1===C.indexOf(e)){let t=JSON.parse(JSON.stringify(C));t.push(e),w({...S,experiences:t.toString()}),v(t)}else{let t=JSON.parse(JSON.stringify(C));t.splice(C.indexOf(e),1),w({...S,experiences:t.toString()}),v(t)}},tags:n.nodes.map((e=>{let{experience:t,originalId:n}=e;return{label:t,originalId:n,itemActive:-1!==C.indexOf(n)}}))}))),(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Feature photo"),(0,s.Y)(i.FM,{name:"featuredPhoto",onChange:F}),(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Additional photos"),(0,s.Y)(i.so,null,(0,s.Y)(i.az,{mr:"layout.1"},(0,s.Y)(i.FM,{name:"additionalPhoto1",onChange:F})),(0,s.Y)(i.az,{mr:"layout.1"},(0,s.Y)(i.FM,{name:"additionalPhoto2",onChange:F})),(0,s.Y)(i.az,{mr:"layout.1"},(0,s.Y)(i.FM,{name:"additionalPhoto3",onChange:F})),(0,s.Y)(i.FM,{name:"additionalPhoto4",onChange:F})),(0,s.Y)(i.DZ,{size:700,mt:"layout.6"},"Feature a local business"),(0,s.Y)(i.az,null,(0,s.Y)(i.so,{alignItems:"center",css:y,onClick:()=>{D(""),w({...S,featuredBusiness:""})},style:{display:T?"":"none"}},(0,s.Y)("input",{name:"featuredBusiness",value:T,type:"text",style:{display:"none"}}),(0,s.Y)(i.DZ,{size:100,my:"layout.2",mr:"layout.2"},"Currently featuring: ",T),(0,s.Y)(i.In,{symbol:"close"})),!T&&(0,s.Y)(i.az,{mb:"layout.2"},(0,s.Y)(i.pd,{label:"Feature a business",placeholder:"Search for a business...",value:d,onChange:e=>{c(e.target.value)}})),z&&(0,s.Y)(i.az,{mb:"layout.4"},(0,s.Y)(i.MC,{gutterY:[0],justifyContent:"center",content:z.map(((e,t)=>({width:["100%"],children:(0,s.Y)(p,(0,r.A)({},e,{onClick:()=>{c(""),D(e.name),w({...S,featuredBusiness:e.originalId})},key:"businessCard"+e.name+t}))})))})),(0,s.Y)(i.az,{style:{display:T?"":"none"}},(0,s.Y)(i.l6,{name:"businessFeatureType",label:"Type of feature",width:"100%",onChange:k},(0,s.Y)("option",null,"Where To Eat"),(0,s.Y)("option",null,"Where To Park"),(0,s.Y)("option",null,"Where To Shop"),(0,s.Y)("option",null,"Where To Socialize"),(0,s.Y)("option",null,"Where To Grab Coffee"),(0,s.Y)("option",null,"What To Explore")))),(0,s.Y)(i.az,null,(0,s.Y)(i.Sc,{name:"Terms and Conditions Accepted",onClick:()=>{w({...S,"Terms and Conditions Accepted":!S["Terms and Conditions Accepted"]})},required:!0},"I agree to the"," ",(0,s.Y)(o.N_,{to:"/terms-and-conditions/",css:g},"Terms and Conditions"))),(0,s.Y)(i.az,{mt:"layout.1"},(0,s.Y)("div",{"data-netlify-recaptcha":"true"})),(0,s.Y)(i.az,{mt:"layout.4"},(0,s.Y)(i.$n,{children:"Submit",iconAfter:"arrowRight",intent:"primary",appearance:"primary"})))))};var b=e=>{let{data:t}=e;return(0,s.Y)(a.Fragment,null,t.guidelines&&(0,s.Y)(i.mO,{id:"submit-an-event-guidelines",maxWidth:768},(0,s.Y)(i._I,{items:[{icon:null,heading:"Submission Guidelines",children:(0,s.Y)(i.sD,{content:{html:t.guidelines}})}]})))};var C=e=>{let{data:t}=e;return(0,s.Y)(a.Fragment,null,t.bodyContent&&(0,s.Y)(i.mO,{id:"submit-an-event-intro",maxWidth:768},(0,s.Y)(i.sD,{content:{html:t.bodyContent}})))};var v=function(e){let{loaderComplete:t}=e;const{page:n}=(0,o.GR)("658233266");return(0,s.Y)(a.Fragment,null,(0,s.Y)(l.HelmetDatoCms,{seo:n.seoMetaTags}),(0,s.Y)(i.ff,{id:"submit-an-event-hero",title:n.heroTitle,image:n.heroImage,loaderComplete:t,page:(0,s.Y)(a.Fragment,null,(0,s.Y)(C,{data:{bodyContent:n.introductoryDescription}}),(0,s.Y)(b,{data:{guidelines:n.submissionGuidelines}}),(0,s.Y)(f,null))}))}}}]);
2//# sourceMappingURL=component---src-pages-events-submit-an-event-index-js-f147d38478df3821369c.js.map

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.