1"use strict";(self.webpackChunkdiscovery_nissan=self.webpackChunkdiscovery_nissan||[]).push([[2676],{227:(e,t,s)=>{s.d(t,{K:()=>d});var a=s(579),r=s(4765),n=s(3109),i=s(7375),o=s(5003),l=s(7971);const d=(0,o.R)((function(e,t){const s=(0,i.Jn)({...e,ref:t}),o=(0,n.e)();return(0,a.jsx)(l.B.div,{outline:"0",...s,className:(0,r.cx)("chakra-tabs__tab-panel",e.className),__css:o.tabpanel})}));d.displayName="TabPanel"},502:(e,t,s)=>{s.d(t,{d:()=>c});var a=s(5043),r=s(610),n=s(6827);function i(e,t){const s=e??"bottom",a={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[s];return a?.[t]??s}var o=s(482);var l=s(2325),d=s(6448);function c(e){const{theme:t}=(0,d.UQ)(),s=(0,l.NU)();return(0,a.useMemo)((()=>function(e,t){const s=s=>({...t,...s,position:i(s?.position??t?.position,e)}),a=e=>{const t=s(e),a=(0,n.q)(t);return o.Z.notify(a,t)};return a.update=(e,t)=>{o.Z.update(e,s(t))},a.promise=(e,t)=>{const s=a({...t.loading,status:"loading",duration:null});e.then((e=>a.update(s,{status:"success",duration:5e3,...(0,r.J)(t.success,e)}))).catch((e=>a.update(s,{status:"error",duration:5e3,...(0,r.J)(t.error,e)})))},a.closeAll=o.Z.closeAll,a.close=o.Z.close,a.isActive=o.Z.isActive,a}(t.direction,{...s,...e})),[e,t.direction,s])}},1794:(e,t,s)=>{s.d(t,{T:()=>d});var a=s(579),r=s(4765),n=s(3109),i=s(7375),o=s(5003),l=s(7971);const d=(0,o.R)((function(e,t){const s=(0,i.uo)(e),o=(0,n.e)();return(0,a.jsx)(l.B.div,{...s,width:"100%",ref:t,className:(0,r.cx)("chakra-tabs__tab-panels",e.className),__css:o.tabpanels})}));d.displayName="TabPanels"},2676:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var a=s(502),r=s(8939),n=s(3109),i=s(1411),o=s(4566),l=s(1794),d=s(227),c=s(2107),u=s(9077),h=s(5371),p=s(9081),m=s(8662),x=s(6148),b=s(5043),v=s(4443),g=s(7667),f=s(579);const y=()=>{const e=(0,a.d)(),t=v.A.checkForToken(),[s,y]=(0,b.useState)(""),[k,j]=(0,b.useState)(null),[w,C]=(0,b.useState)(!1),R=t=>{const s=t.target.files[0];s&&(j(s),e({title:"File attached",description:s.name,status:"info",duration:2e3,isClosable:!0})),t.target.value=""},F=()=>{j(null)};return(0,f.jsx)(r.m,{maxW:"container.md",mt:10,p:5,boxShadow:"md",borderRadius:"md",bg:"white",children:(0,f.jsxs)(n.t,{variant:"enclosed",children:[(0,f.jsxs)(i.w,{children:[(0,f.jsx)(o.o,{children:"Developer"}),(0,f.jsx)(o.o,{children:"Dealer"})]}),(0,f.jsx)(l.T,{children:["developer","dealer"].map((a=>(0,f.jsx)(d.K,{children:(0,f.jsxs)(c.a,{maxW:"md",mx:"auto",mt:10,p:5,boxShadow:"md",borderRadius:"md",children:[(0,f.jsx)(u.T,{placeholder:"Enter your text here...",mb:4,value:s,onChange:e=>y(e.target.value)}),k&&(0,f.jsxs)(h.s,{align:"center",mb:3,px:3,py:2,bg:"blue.50",borderRadius:"md",border:"1px solid",borderColor:"blue.200",gap:2,children:[(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"#3182ce",strokeWidth:2,style:{flexShrink:0},children:(0,f.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.172 7l-6.586 6.586a2 2 0 002.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"})}),(0,f.jsx)(p.E,{fontSize:"sm",color:"blue.700",flex:1,noOfLines:1,title:k.name,children:k.name}),(0,f.jsxs)(p.E,{fontSize:"xs",color:"gray.500",whiteSpace:"nowrap",children:[(k.size/1024).toFixed(1)," KB"]}),(0,f.jsx)(m.$,{size:"xs",variant:"ghost",colorScheme:"red",onClick:F,"aria-label":"Remove attachment",ml:1,children:"\u2715"})]}),(0,f.jsx)("input",{type:"file",hidden:!0,id:"contact-file",onChange:R}),(0,f.jsxs)(x.z,{spacing:4,children:[(0,f.jsx)(m.$,{background:"primary",color:"white",leftIcon:(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,f.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.172 7l-6.586 6.586a2 2 0 002.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"})}),onClick:()=>document.getElementById("contact-file").click(),children:k?"Change File":"Attach File"}),(0,f.jsx)(m.$,{color:"primary",variant:"outline",isLoading:w,onClick:()=>(async a=>{if(s.trim())if(t)try{C(!0);const r=new FormData;r.append("message",s),r.append("contact_for",a),k&&r.append("conatctattachment",k),await(0,g.ex)(r,t),e({title:"Message sent",description:"Your message was sent successfully.",status:"success",duration:3e3,isClosable:!0}),y(""),j(null)}catch(i){var r,n;e({title:"Error",description:(null===i||void 0===i||null===(r=i.response)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.error)||"Something went wrong.",status:"error",duration:3e3,isClosable:!0})}finally{C(!1)}else e({title:"Login required",description:"Please login to continue.",status:"error",duration:3e3,isClosable:!0});else e({title:"Message required",description:"Please enter your message.",status:"warning",duration:3e3,isClosable:!0})})(a),children:"Send Message"})]})]})},a)))})]})})}},3225:(e,t,s)=>{s.d(t,{MJ:()=>v,TP:()=>m,Uc:()=>b,eK:()=>g});var a=s(579),r=s(3194),n=s(3033),i=s(6417),o=s(8813),l=s(4765),d=s(5043),c=s(5003),u=s(5158),h=s(7971);const[p,m]=(0,i.q)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[x,b]=(0,i.q)({strict:!1,name:"FormControlContext"});const v=(0,c.R)((function(e,t){const s=(0,u.o)("Form",e),i=(0,n.M)(e),{getRootProps:c,htmlProps:m,...b}=function(e){const{id:t,isRequired:s,isInvalid:a,isDisabled:n,isReadOnly:i,...l}=e,c=(0,d.useId)(),u=t||`field-${c}`,h=`${u}-label`,p=`${u}-feedback`,m=`${u}-helptext`,[x,b]=(0,d.useState)(!1),[v,g]=(0,d.useState)(!1),[f,y]=(0,d.useState)(!1),k=(0,d.useCallback)((function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{id:m,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},ref:(0,r.Px)(e,(e=>{e&&g(!0)}))}}),[m]),j=(0,d.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{...e,ref:t,"data-focus":(0,o.s)(f),"data-disabled":(0,o.s)(n),"data-invalid":(0,o.s)(a),"data-readonly":(0,o.s)(i),id:void 0!==e.id?e.id:h,htmlFor:void 0!==e.htmlFor?e.htmlFor:u}}),[u,n,f,a,i,h]),w=(0,d.useCallback)((function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{id:p,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},ref:(0,r.Px)(e,(e=>{e&&b(!0)})),"aria-live":"polite"}}),[p]),C=(0,d.useCallback)((function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},...l,ref:e,role:"group","data-focus":(0,o.s)(f),"data-disabled":(0,o.s)(n),"data-invalid":(0,o.s)(a),"data-readonly":(0,o.s)(i)}}),[l,n,f,a,i]),R=(0,d.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;
1return{...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"}}),[]);return{isRequired:!!s,isInvalid:!!a,isReadOnly:!!i,isDisabled:!!n,isFocused:!!f,onFocus:()=>y(!0),onBlur:()=>y(!1),hasFeedbackText:x,setHasFeedbackText:b,hasHelpText:v,setHasHelpText:g,id:u,labelId:h,feedbackId:p,helpTextId:m,htmlProps:l,getHelpTextProps:k,getErrorMessageProps:w,getRootProps:C,getLabelProps:j,getRequiredIndicatorProps:R}}(i),v=(0,l.cx)("chakra-form-control",e.className);return(0,a.jsx)(x,{value:b,children:(0,a.jsx)(p,{value:s,children:(0,a.jsx)(h.B.div,{...c({},t),className:v,__css:s.container})})})}));v.displayName="FormControl";const g=(0,c.R)((function(e,t){const s=b(),r=m(),n=(0,l.cx)("chakra-form__helper-text",e.className);return(0,a.jsx)(h.B.div,{...s?.getHelpTextProps(e,t),__css:r.helperText,className:n})}));g.displayName="FormHelperText"},3635:(e,t,s)=>{s.d(t,{t:()=>i,v:()=>o});var a=s(8813),r=s(7246),n=s(3225);function i(e){const{isDisabled:t,isInvalid:s,isReadOnly:r,isRequired:n,...i}=o(e);return{...i,disabled:t,readOnly:r,required:n,"aria-invalid":(0,a.r)(s),"aria-required":(0,a.r)(n),"aria-readonly":(0,a.r)(r)}}function o(e){const t=(0,n.Uc)(),{id:s,disabled:a,readOnly:i,required:o,isRequired:l,isInvalid:d,isReadOnly:c,isDisabled:u,onFocus:h,onBlur:p,...m}=e,x=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&x.push(t.feedbackId),t?.hasHelpText&&x.push(t.helpTextId),{...m,"aria-describedby":x.join(" ")||void 0,id:s??t?.id,isDisabled:a??u??t?.isDisabled,isReadOnly:i??c??t?.isReadOnly,isRequired:o??l??t?.isRequired,isInvalid:d??t?.isInvalid,onFocus:(0,r.H)(t?.onFocus,h),onBlur:(0,r.H)(t?.onBlur,p)}}},8939:(e,t,s)=>{s.d(t,{m:()=>d});var a=s(579),r=s(3033),n=s(4765),i=s(5003),o=s(5158),l=s(7971);const d=(0,i.R)((function(e,t){const{className:s,centerContent:i,...d}=(0,r.M)(e),c=(0,o.V)("Container",e);return(0,a.jsx)(l.B.div,{ref:t,className:(0,n.cx)("chakra-container",s),...d,__css:{...c,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})}));d.displayName="Container"},9077:(e,t,s)=>{s.d(t,{T:()=>h});var a=s(579),r=s(3033),n=s(4079),i=s(4765),o=s(3635),l=s(5003),d=s(5158),c=s(7971);const u=["h","minH","height","minHeight"],h=(0,l.R)(((e,t)=>{const s=(0,d.V)("Textarea",e),{className:l,rows:h,...p}=(0,r.M)(e),m=(0,o.t)(p),x=h?(0,n.c)(s,u):s;return(0,a.jsx)(c.B.textarea,{ref:t,rows:h,...m,className:(0,i.cx)("chakra-textarea",l),__css:x})}));h.displayName="Textarea"}}]); 2//# sourceMappingURL=2676.3a60dd5c.chunk.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.