%PDF- %PDF-
Direktori : /home/opti/public_html/ncf/static/js/ |
Current File : /home/opti/public_html/ncf/static/js/7.6744c27e.chunk.js |
/*! For license information please see 7.6744c27e.chunk.js.LICENSE.txt */ (this["webpackJsonpncf-nigeria"]=this["webpackJsonpncf-nigeria"]||[]).push([[7],{104:function(e,t,n){},105:function(e,t,n){"use strict";var s=n(48),r=n(1),c=n(21),i=(n(106),n(107),n(108),n(2));t.a=function(){var e=localStorage.getItem("loggedInUser"),t=Object(r.useState)([]),n=Object(s.a)(t,2),a=n[0],o=n[1];Object(r.useEffect)((function(){fetch("".concat(c.SERVER_URL,"/cart/all/").concat(e)).then((function(e){return e.json()})).then((function(e){200===e.status?o(e.data):console.log(e)}))}),[]);var l=a.length;return Object(i.jsx)("div",{className:"sliderbardiv sm:mb-20",children:Object(i.jsxs)("div",{className:"flex sliderbar shadow-sm -mt-9 field-bottom",children:[Object(i.jsxs)("a",{href:"/shop",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48 broder-0 border-r border-solid",children:[Object(i.jsx)("span",{className:"mb-2",children:Object(i.jsx)("img",{src:"/assets/images/icons/shop.svg",alt:""})}),Object(i.jsx)("span",{children:"Shop"})]}),Object(i.jsxs)("a",{href:"/cart",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48 broder-0 border-r border-solid",children:[Object(i.jsx)("span",{className:"mb-2",children:Object(i.jsx)("img",{src:"/assets/images/icons/shopping-cart.svg",alt:""})}),Object(i.jsxs)("span",{children:["Cart ",Object(i.jsxs)("span",{className:"cartNumber",children:[" ",l]})]})]}),Object(i.jsxs)("a",{href:"/donate",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48",children:[Object(i.jsx)("span",{className:"mb-2",children:Object(i.jsx)("img",{src:"/assets/images/icons/donation.svg",alt:""})}),Object(i.jsx)("span",{children:"Donate"})]})]})})}},106:function(e,t,n){},107:function(e,t,n){},108:function(e,t,n){},112:function(e,t,n){"use strict";function s(e){return"object"===typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function r(e,t){var n=["__proto__","constructor","prototype"];Object.keys(t).filter((function(e){return n.indexOf(e)<0})).forEach((function(n){"undefined"===typeof e[n]?e[n]=t[n]:s(t[n])&&s(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:r(e[n],t[n]):e[n]=t[n]}))}function c(e){return void 0===e&&(e={}),e.navigation&&"undefined"===typeof e.navigation.nextEl&&"undefined"===typeof e.navigation.prevEl}function i(e){return void 0===e&&(e={}),e.pagination&&"undefined"===typeof e.pagination.el}function a(e){return void 0===e&&(e={}),e.scrollbar&&"undefined"===typeof e.scrollbar.el}function o(e){void 0===e&&(e="");var t=e.split(" ").map((function(e){return e.trim()})).filter((function(e){return!!e})),n=[];return t.forEach((function(e){n.indexOf(e)<0&&n.push(e)})),n.join(" ")}n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return o}))},114:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var s=n(1);function r(e,t){return"undefined"===typeof window?Object(s.useEffect)(e,t):Object(s.useLayoutEffect)(e,t)}},127:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var s=n(1),r=n.n(s),c=n(112),i=n(114),a=["tag","children","className","swiper","zoom","virtualIndex"];function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}var l=Object(s.forwardRef)((function(e,t){var n,l=void 0===e?{}:e,d=l.tag,u=void 0===d?"div":d,b=l.children,p=l.className,m=void 0===p?"":p,f=l.swiper,j=l.zoom,h=l.virtualIndex,x=function(e,t){if(null==e)return{};var n,s,r={},c=Object.keys(e);for(s=0;s<c.length;s++)n=c[s],t.indexOf(n)>=0||(r[n]=e[n]);return r}(l,a),g=Object(s.useRef)(null),O=Object(s.useState)("swiper-slide"),v=O[0],y=O[1];function w(e,t,n){t===g.current&&y(n)}Object(i.a)((function(){if(t&&(t.current=g.current),g.current&&f){if(!f.destroyed)return f.on("_slideClass",w),function(){f&&f.off("_slideClass",w)};"swiper-slide"!==v&&y("swiper-slide")}})),Object(i.a)((function(){f&&g.current&&y(f.getSlideClasses(g.current))}),[f]),"function"===typeof b&&(n={isActive:v.indexOf("swiper-slide-active")>=0||v.indexOf("swiper-slide-duplicate-active")>=0,isVisible:v.indexOf("swiper-slide-visible")>=0,isDuplicate:v.indexOf("swiper-slide-duplicate")>=0,isPrev:v.indexOf("swiper-slide-prev")>=0||v.indexOf("swiper-slide-duplicate-prev")>=0,isNext:v.indexOf("swiper-slide-next")>=0||v.indexOf("swiper-slide-duplicate-next")>=0});var N=function(){return"function"===typeof b?b(n):b};return r.a.createElement(u,o({ref:g,className:Object(c.f)(v+(m?" "+m:"")),"data-swiper-slide-index":h},x),j?r.a.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"===typeof j?j:void 0},N()):N())}));l.displayName="SwiperSlide"},138:function(e,t,n){"use strict";var s,r=n(48),c=n(1),i=n(21),a=n(127),o=n(50),l=n(49).a.div(s||(s=Object(o.a)(["\n position: relative;\n height: 700px;\n\tborder: 1px solid #eee\n\n background: #eee;\n font-family: 'Roboto', Helvetica Neue, Helvetica, Arial, sans-serif;\n font-size: 14px;\n color: rgb(39, 38, 38);\n margin: 0;\n padding: 0;\n\n\t.swiper-container {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t.swiper-slide {\n\t\tfont-size: 18px;\n\t\tbackground: transparent;\n\n\t\t/* Center slide text vertically */\n\t\tdisplay: -webkit-box;\n\t\tdisplay: -ms-flexbox;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: flex;\n\t\t-webkit-box-pack: center;\n\t\t-ms-flex-pack: center;\n\t\t-webkit-justify-content: center;\n\t\tjustify-content: center;\n\t\t-webkit-box-align: center;\n\t\t-ms-flex-align: center;\n\t\t-webkit-align-items: center;\n\t\talign-items: center;\n\t}\n\n\t.swiper-slide img {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\t.swiper-slide .slider-wrapper {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\t.slider-text {\n\t\tposition: absolute;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.field-bottom {\n\t\ttransform: translate(10%, 306px);\n\t}\n\n\t@media screen and (max-width: 640px) {\n\t\t.field-bottom {\n\t\t\ttransform: translate(0%, 0%);\n\t\t}\n\t}\n"]))),d=(n(104),n(2));t.a=function(e){var t=Object(c.useState)(""),n=Object(r.a)(t,2),s=n[0],o=n[1];Object(c.useEffect)((function(){fetch("".concat(i.SERVER_URL,"/image/page-banners")).then((function(e){return e.json()})).then((function(e){if(200===e.status){var t=e.data;o(t)}else console.log("Oops couldn't fetch data")}))}),[]);var u=e.page;return Object(d.jsx)(l,{className:"mt-6 z-index-3",children:Object(d.jsx)(a.a,{children:Object(d.jsxs)("div",{className:"slider-wrapper",children:[Object(d.jsx)("div",{className:"slider-text border border-solid",children:Object(d.jsx)("div",{className:"max-w-7xl mx-auto pb-16 pt-48 md:px-16 px-8",children:Object(d.jsx)("div",{className:"grid md:grid-cols-2 grid-cols-1 gap-x-8 gap-y-8",children:Object(d.jsxs)("div",{className:"content banner-txt",children:[Object(d.jsx)("h1",{className:"text-4xl font-bold text-white mb-4",children:"What have you done for the Environment Lately?"}),Object(d.jsx)("p",{className:"font-light text-white mb-6",children:"What you give goes a long way"}),Object(d.jsx)("a",{href:"/donate",children:Object(d.jsx)("button",{className:"bg-green hover:bg-green-800 text-white font-bold py-2 px-8 rounded",children:"Donate"})})]})})})}),Object(d.jsx)("img",{src:"https://admin.ncfnigeria.org/images/banners/".concat(s[u]),alt:""})]})})})}},304:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}));var s=n(21);function r(e){fetch("".concat(s.SERVER_URL,"/membership/corporate"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then((function(e){return e.json()})).then((function(e){console.log(e,"json"),200===e.status?(localStorage.setItem("login-success","Membership Registration Successful"),window.location.reload()):422===e.status?(localStorage.setItem("login-error",JSON.stringify(e.message)),window.location.reload()):console.log("An error occured")}))}function c(e){fetch("".concat(s.SERVER_URL,"/membership/individual"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then((function(e){return e.json()})).then((function(e){console.log(e,"json"),200===e.status?(localStorage.setItem("login-success","Membership Registration Successful"),window.location.reload()):422===e.status?(localStorage.setItem("login-error",JSON.stringify(e.message)),window.location.reload()):console.log("An error occured")}))}},305:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var s=n(1),r=n.n(s),c=[];function i(e){var t=function(){var e="https://js.paystack.co/v1/inline.js",t=Object(s.useState)({loaded:!1,error:!1}),n=t[0],r=t[1];return Object(s.useEffect)((function(){if(!c.includes(e)){c.push(e);var t=document.createElement("script");t.src=e,t.async=!0;var n=function(){r({loaded:!0,error:!1})},s=function(){var n=c.indexOf(e);n>=0&&c.splice(n,1),t.remove(),r({loaded:!0,error:!0})};return t.addEventListener("load",n),t.addEventListener("complete",n),t.addEventListener("error",s),document.body.appendChild(t),function(){t.removeEventListener("load",n),t.removeEventListener("error",s)}}r({loaded:!0,error:!1})}),[e]),[n.loaded,n.error]}(),n=t[0],r=t[1],i=e.publicKey,a=e.firstname,o=e.lastname,l=e.phone,d=e.email,u=e.amount,b=e.reference,p=e.metadata,m=void 0===p?{}:p,f=e.currency,j=void 0===f?"NGN":f,h=e.channels,x=e.label,g=void 0===x?"":x,O=e.plan,v=void 0===O?"":O,y=e.quantity,w=void 0===y?"":y,N=e.subaccount,_=void 0===N?"":N,S=e.transaction_charge,k=void 0===S?0:S,E=e.bearer,C=void 0===E?"account":E,R=e.split,q=e.split_code;return Object(s.useEffect)((function(){if(r)throw new Error("Unable to load paystack inline script")}),[r]),function(t,s){if(r)throw new Error("Unable to load paystack inline script");n&&function(e){var t=window.PaystackPop&&window.PaystackPop.setup(e);t&&t.openIframe()}({callback:t||function(){return null},onClose:s||function(){return null},key:i,ref:b,email:d,firstname:a,lastname:o,phone:l,amount:u,currency:j,plan:v,quantity:w,"data-custom-button":e["data-custom-button"]||"",channels:h,subaccount:_,transaction_charge:k,bearer:C,label:g,metadata:m,split:R,split_code:q})}}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}var l=Object(s.createContext)({initializePayment:function(){return null},onSuccess:function(){return null},onClose:function(){return null}}),d=function(e){var t=e.children,n=e.onSuccess,s=e.onClose,c=i(o(e,["children","onSuccess","onClose"]));return r.a.createElement(l.Provider,{value:{initializePayment:c,onSuccess:n,onClose:s}},t)},u=function(e){var t=e.children,n=e.ref,r=Object(s.useContext)(l),c=r.initializePayment,i=r.onSuccess,a=r.onClose;return t({initializePayment:function(){return c(i,a)},ref:n})};Object(s.forwardRef)((function(e,t){var n=e.children,s=e.onSuccess,c=e.onClose,i=o(e,["children","onSuccess","onClose"]),l=s||function(){return null},b=c||function(){return null};return r.a.createElement(d,a({},i,{onSuccess:l,onClose:b}),r.a.createElement(u,{ref:t},n))}))},306:function(e,t,n){"use strict";var s=n(27),r=n(48),c=n(1),i=n(21),a=n(202),o=(n(23),n(18)),l=n(304),d=n(305),u=n(2);t.a=function(e){var t=Object(c.useState)([]),n=Object(r.a)(t,2),b=n[0],p=n[1],m=Object(c.useState)(""),f=Object(r.a)(m,2),j=f[0],h=f[1],x=Object(c.useState)([]),g=Object(r.a)(x,2),O=g[0],v=g[1],y=Object(c.useState)([]),w=Object(r.a)(y,2),N=w[0],_=w[1],S=Object(c.useState)([]),k=Object(r.a)(S,2),E=k[0],C=k[1],R=Object(c.useState)([]),q=Object(r.a)(R,2),T=q[0],P=q[1],L=Object(c.useState)(e.membershipType),I=Object(r.a)(L,2),z=I[0],A=(I[1],Object(c.useState)(Number(100*e.price))),U=Object(r.a)(A,2),V=U[0],D=(U[1],Object(c.useState)()),M=Object(r.a)(D,2),F=M[0],J=M[1],G=Object(c.useState)(),H=Object(r.a)(G,2),K=H[0],W=H[1];Object(c.useEffect)((function(){fetch("".concat(i.SERVER_URL,"/location/country")).then((function(e){return e.json()})).then((function(e){200===e.status?p(e.data):console.log("Oops couldn't fetch data")}))}),[]);var B,Q,X,Y=Object(a.a)(),Z=Y.register,$=Y.handleSubmit,ee=Y.formState,te=ee.errors;ee.isDirty,ee.isValid,Object(c.useEffect)((function(){fetch("".concat(i.SERVER_URL,"/gateway/payment")).then((function(e){return e.json()})).then((function(e){200===e.status?J(e.data):console.log(e.message)}))}),[]),F&&F.map((function(e){B=e.public_key,Q=e.id})),K&&(X=K);var ne={reference:(new Date).getTime().toString(),email:X,amount:V,publicKey:B},se=Object(d.a)(ne);return Object(u.jsx)(u.Fragment,{children:Object(u.jsx)("form",{onSubmit:$((function(e){var t=z,n=e.full_name,s=e.other_name,r=j,c=N,i=T,a=e.address,o=e.email_address,d=e.phone_number,u=e.gender,b=e.marital_status,p=e.occupation,m=e.institution,f=e.previous_membership_number;void 0!==K&&void 0!==B&&se((function(e){var j,h=e.reference,x=Q;j="success"===e.status?1:2;var g={type:t,name:n,other_name:s,country_id:r,state_id:c,city_id:i,address:a,email:o,phone_number:d,sex:u,marital_status:b,occupation:p,institution:m,previous_mem_no:f,payment_gateway_id:x,transaction_reference:h,payment_status:j,amount:V};Object(l.b)(g)}),(function(){console.log("closed")}))})),children:Object(u.jsx)("div",{className:"shadow overflow-hidden sm:rounded-md",children:Object(u.jsxs)("div",{className:"px-4 py-5 bg-white sm:p-6",children:[Object(u.jsxs)("div",{className:"grid grid-cols-6 gap-y-3 gap-x-6",children:[Object(u.jsx)("div",{className:"col-span-6 sm:col-span-6",children:Object(u.jsx)("h2",{className:"text-lg font-bold text-black uppercase mb-4",children:"General Information"})}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text",name:"full_name",id:"full_name"},Z("full_name",{required:!0})),{},{placeholder:"Full name",autoComplete:"given-name",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.full_name&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("other_name",{required:!1})),{},{placeholder:"Other Name (Optional)",id:"other-name",autoComplete:"other-name",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.other_name&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"w-full block relative",children:[Object(u.jsxs)("select",Object(s.a)(Object(s.a)({id:"gender"},Z("gender",{required:!0})),{},{placeholder:"Gender",autoComplete:"gender",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white leading-tight rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",children:[Object(u.jsx)("option",{value:"MALE",children:"Male"}),Object(u.jsx)("option",{value:"FEMALE",children:"Female"})]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(o.d,{})})]}),te.gender&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"w-full block relative",children:[Object(u.jsxs)("select",Object(s.a)(Object(s.a)({id:"marital_status",name:"marital_status"},Z("marital_status",{required:!0})),{},{placeholder:"Marital status",autoComplete:"marital-status",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white leading-tight rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",children:[Object(u.jsx)("option",{value:"Single",children:"Single"}),Object(u.jsx)("option",{value:"Married",children:"Married"}),Object(u.jsx)("option",{value:"Divorced",children:"Divorced"})]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(o.d,{})})]}),te.marital_status&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"date"},Z("dob",{required:!0})),{},{placeholder:"Company Registered Date",id:"date-of-birth",autoComplete:"date-of-birth",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.dob&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("address",{required:!0})),{},{placeholder:"Address",id:"street_address",autoComplete:"street_address",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.address&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"w-full block relative",children:[Object(u.jsxs)("select",Object(s.a)(Object(s.a)({id:"country"},Z("country",{required:!0})),{},{placeholder:"Country",autoComplete:"country",value:j,className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white leading-tight rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",onChange:function(e){var t=e.target.value;fetch("".concat(i.SERVER_URL,"/location/state/").concat(t)).then((function(e){return e.json()})).then((function(e){200===e.status?v(e.data):console.log("Oops couldn't fetch data")})),h(e.target.value)},children:[Object(u.jsx)("option",{children:"Country"}),b.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(o.d,{})})]}),te.country&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"number"},Z("phone_number",{required:!0})),{},{placeholder:"Phone number",id:"phone_number",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.phone_number&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"relative",children:[Object(u.jsxs)("select",Object(s.a)(Object(s.a)({id:"state"},Z("state",{required:!0})),{},{placeholder:"State",autoComplete:"state",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",value:N,onChange:function(e){var t=e.target.value;fetch("".concat(i.SERVER_URL,"/location/city/").concat(t)).then((function(e){return e.json()})).then((function(e){200===e.status?C(e.data):console.log("Oops couldn't fetch data")})),_(e.target.value)},children:[Object(u.jsx)("option",{children:"State"}),O.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(o.d,{})})]}),te.state&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("email_address",{required:!0})),{},{placeholder:"Email address",id:"email_address",autoComplete:"email",onChange:function(e){console.log(),W(e.target.value)},className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.email_address&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"w-full block relative",children:[Object(u.jsxs)("select",Object(s.a)(Object(s.a)({id:"city"},Z("city",{required:!0})),{},{placeholder:"City",autoComplete:"city",value:T,className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white leading-tight rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",onChange:function(e){P(e.target.value)},children:[Object(u.jsx)("option",{children:"City"}),E.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(o.d,{})})]}),te.country&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("occupation",{required:!0})),{},{placeholder:"Occupation/Profession",id:"occupation",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.occupation&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("institution",{required:!0})),{},{placeholder:"Institution",id:"institution",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.institution&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(s.a)(Object(s.a)({type:"text"},Z("previous_membership_number",{required:!1})),{},{placeholder:"Previous membership number",id:"previous_membership_number",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.previous_membership_number&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsx)("div",{className:"col-span-4",children:Object(u.jsx)("fieldset",{children:Object(u.jsxs)("div",{className:"mt-4 space-y-4",children:[Object(u.jsxs)("div",{className:"flex items-center",children:[Object(u.jsx)("div",{className:"flex items-center h-5",children:Object(u.jsx)("input",Object(s.a)(Object(s.a)({id:"new-account"},Z("new_account")),{},{type:"checkbox",className:"focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"}))}),Object(u.jsx)("div",{className:"ml-3 text-sm mt-0.5",children:Object(u.jsx)("label",{htmlFor:"new-account",className:"font-medium text-gray-700",children:"Please confirm that the information provided on this form is true and accurate."})})]}),Object(u.jsxs)("div",{className:"flex items-center",children:[Object(u.jsx)("div",{className:"flex items-center h-5",children:Object(u.jsx)(o.b,{fontSize:"large",color:"#666"})}),Object(u.jsx)("div",{className:"ml-3 text-sm mt-0.5",children:Object(u.jsx)("label",{htmlFor:"shipping-address",className:"font-medium text-gray-700",children:"DATA PROTECTION: The personal information provided by you will be held on our database and will not be shared with any third party.."})})]})]})})})]}),Object(u.jsx)("div",{className:"flex justify-center space-x-12 px-4 py-3 bg-gray-50 text-right sm:px-6 mt-12",children:Object(u.jsx)("button",{type:"submit",className:"bg-green hover:bg-green-800 inline-flex justify-center py-2 px-12 border border-transparent shadow-sm text-sm font-medium rounded-sm text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green",children:"Submit"})})]})})})})}}}]); //# sourceMappingURL=7.6744c27e.chunk.js.map