PageSourceSearch

https://velaflow.com/_next/static/chunks/pages/marketplace/listing/[slug]-7872fad9f44ef89f.js

js velaflow.com collected 2026-10-01 16:25:33 UTC 15,378 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1423,5020],{12128:(e,t,l)=>{"use strict";function s(e){return e||0===e?new Intl.NumberFormat("en-IN").format(e):""}l.d(t,{m:()=>s})},15234:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var s=l(37876),n=l(14232),r=l(96145),i=l(47716);function a(e){let{isOpen:t=!1,onClose:l=()=>{},children:a,header:o,headerClass:c,customWidth:d,childControlsWidth:u=!1,customWidthData:m="max-w-3xl w-full",gifModal:h=!1}=e,[x,p]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{if(t){let e=window.scrollY;document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.width="100%"}else{let e=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,-1*parseInt(e||"0"))}return()=>{document.body.style.position="",document.body.style.top="",document.body.style.width=""}},[t]),(0,n.useEffect)(()=>{let e;return t?p(!0):e=setTimeout(()=>p(!1),200),()=>clearTimeout(e)},[t]),t||x)?(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 transition-opacity duration-200",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-xl p-6 sm:p-8 relative transform transition-all duration-200\n  ".concat(t?"scale-100 opacity-100":"scale-95 opacity-0","\n  ").concat(u?"w-auto max-w-full":d?m:"max-w-md w-full"),children:[(0,s.jsx)(r.$n,{onClick:l,"aria-label":"Close",className:"absolute right-4 ".concat(h?"top-3":"top-4"," w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-greyLight hover:text-black transition-colors"),children:(0,s.jsx)(i.A,{className:"w-5 h-5"})}),o&&(0,s.jsx)(r.DZ,{type:"h2",text:o,className:c||"text-[40px]"}),(0,s.jsx)("div",{children:a})]})}):null}},25432:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/marketplace/listing/[slug]",function(){return l(95457)}])},47716:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var s=l(51935);let n={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};n.node;let r=(0,s.A)(n)},51935:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var s=l(14232);let n=function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter((e,t,l)=>!!e&&""!==e.trim()&&l.indexOf(e)===t).join(" ").trim()},r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},i=(0,s.createContext)({}),a=(0,s.forwardRef)((e,t)=>{var l,a,o;let{color:c,size:d,width:u,height:m,strokeWidth:h,absoluteStrokeWidth:x,nonScalingStroke:p,className:f="",children:v,iconNode:g=[],icon:j={node:g,aliases:[],size:24},...b}=e,{size:y=24,strokeWidth:w=2,absoluteStrokeWidth:N=!1,nonScalingStroke:k=!1,color:C="currentColor",className:_=""}=null!=(l=(0,s.useContext)(i))?l:{},S=!!v||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(b),[E,A,z=[]]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){var t,l,s,i,a,o,c,d,u,m,h,x,p,f,v;let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},j=null!=(s=g.attributeNames)?s:{},b=e=>{var t;return null!=(t=j[e])?t:e},y=null!=(a=null!=(i=e.size)?i:e.width)?a:r.width,w=null!=(c=null!=(o=e.size)?o:e.height)?c:r.height,N=null!=(d=null==(t=e.aliases)?void 0:t.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>"lucide-".concat(e)))?d:[],k=[...e.name?["lucide-".concat(e.name)]:[],...N],C=null!=(u=null==(l=g.className)?void 0:l.split(" ").filter(Boolean))?u:[],_=!1===g.includeDefaultClasses?n(...C):n("lucide",...k,...C),S=g.absoluteStrokeWidth?Number(null!=(m=g.strokeWidth)?m:r["stroke-width"])*Number(null!=(x=null!=(h=e.size)?h:e.width)?x:r.width)/Number(null!=(f=null!=(p=g.size)?p:g.width)?f:r.width):null!=(v=g.strokeWidth)?v:r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,t)=>{let[l,s]=t;return e[b(l)]=s,e},{}),..."color"in g&&g.color&&{[b("stroke")]:g.color},..."size"in g&&null!=g.size&&{[b("width")]:g.size,[b("height")]:g.size},..."width"in g&&null!=g.width&&{[b("width")]:g.width},..."height"in g&&null!=g.height&&{[b("height")]:g.height},[b("stroke-width")]:S,..._&&{[b("class")]:_},[b("viewBox")]:"0 0 ".concat(y," ").concat(w),...!1===g.hasA11yProp?{[b("aria-hidden")]:"true"}:{},..."attributes"in g&&g.attributes},e.node.map(e=>{let[t,l,s]=e,n=g.nonScalingStroke?{[b("vector-effect")]:"non-scaling-stroke",...l}:l;return s?[t,n,s]:[t,n]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(j,{color:null!=c?c:C,width:null!=(a=null!=u?u:d)?a:y,height:null!=(o=null!=m?m:d)?o:y,strokeWidth:null!=h?h:w,absoluteStrokeWidth:null!=x?x:N,nonScalingStroke:null!=p?p:k,className:n(_,f),hasA11yProp:S,attributes:b});return(0,s.createElement)(E,{ref:t,...A},[...z.map(e=>{let[t,l]=e;return(0,s.createElement)(t,l)}),...Array.isArray(v)?v:[v]])});function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n="string"==typeof e?function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...l.length>0?{aliases:l}:{}}}(e,t,l):e,r=(0,s.forwardRef)((e,t)=>{let{className:l,...r}=e;return(0,s.createElement)(a,{ref:t,icon:n,className:l,...r})});return n.name&&(r.displayName=(e=>{let t=(e=>{let t="",l=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){l=t.length>0;continue}0===t.length?t+=s.toLowerCase():t+=l?s.toUpperCase():s,l=!1}return t})(e);return t.charAt(0).toUpperCase()+t.slice(1)})(n.name)),r}},80612:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var s=l(37876),n=l(77328),r=l.n(n);function i(e){let{title:t}=e;return(0,s.jsx)(r(),{children:(0,s.jsx)("title",{children:t?"".concat(t," | Velaflow"):"Velaflow"})})}},91423:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>a});var s=l(37876),n=l(62945),r=l(14232);let i={width:"100%",height:"139px",borderRadius:"12px"};function a(e){let{lat:t,lng:l}=e,{isLoaded:a}=(0,n.RH)({googleMapsApiKey:"AIzaSyD00PC_q2TkuDpDb1nv19I2cbZIYx4jmXA",libraries:["places"]}),o=(0,r.useMemo)(()=>({lat:t,lng:l}),[t,l]);return a?(0,s.jsx)(n.u6,{mapContainerStyle:i,center:o,zoom:13,children:(0,s.jsx)(n.pH,{position:o})}):(0,s.jsx)("div",{children:"Loading map..."})}},95457:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>N,default:()=>k});var s=l(37876),n=l(14232),r=l(54587),i=l.n(r),a=l(96145),o=l(91423),c=l(12128),d=l(10841),u=l.n(d),m=l(89099),h=l(10553),x=l(15234),p=l(91408),f=l(97685),v=l(81220);let g=p.Ik().shape({subject:p.Yj().required("Subject is required").max(100,"Subject cannot exceed 100 characters"),message:p.Yj().required("Message is required").max(100,"Message cannot exceed 100 characters")}),j={subject:"",message:""},b=e=>{var t;let{isOpen:l,onCloseAlertModal:r}=e,i=(0,m.useRouter)(),o=null==i||null==(t=i.query)?void 0:t.slug,[c,d]=(0,n.use
1State)(!1),[u,h]=(0,n.useState)(j),[p,b]=(0,n.useState)(null),y=e=>{let{target:t}=e,{type:l,checked:s,name:n}=t,r="checkbox"===l?s:t.value;h({...u,[n]:r})},w=async()=>{d(!0);let{subject:e,message:t}=u;try{await g.validate(u,{abortEarly:!1}),b({});let r=new FormData;r.append("subject",e),r.append("message",t);let i=await (0,v.wE)(r,o);if(i.error){var l,s,n;b({apiError:null==i||null==(n=i.message)||null==(s=n.response)||null==(l=s.data)?void 0:l.message}),d(!1)}else h(j),d(!1),f.Ay.success(null==i?void 0:i.message),N()}catch(t){d(!1);let e={};t.inner?t.inner.forEach(t=>{e[t.path]=t.message}):e[t.path]=t.message,b(e)}},N=()=>{h(j),b(null),d(!1),r()};return(0,s.jsx)(x.A,{isOpen:l,onClose:N,children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col mt-6",children:(0,s.jsx)("p",{className:"text-14 text-black font-semibold",children:"Enter details below to an email to the owner."})}),(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsx)(a.pd,{type:"text",value:null==u?void 0:u.subject,placeholder:"Subject",onChange:y,name:"subject",className:"text-12 border border-grey text-black w-full px-5 py-3 rounded-[5px]"}),(null==p?void 0:p.subject)&&(0,s.jsx)("p",{className:"text-12 text-red",children:p.subject}),(0,s.jsx)(a.pd,{type:"text",value:null==u?void 0:u.message,placeholder:"Message",onChange:y,name:"message",className:"text-12 border border-grey text-black mt-5 w-full px-5 py-3 rounded-[5px]"}),(null==p?void 0:p.message)&&(0,s.jsx)("p",{className:"text-12 text-red",children:p.message})]}),(0,s.jsxs)("div",{className:"mt-4 flex justify-end",children:[(0,s.jsx)(a.$n,{className:"bg-white border border-grey text-14 px-5 py-2 rounded-[5px]",onClick:N,children:"Cancel"}),(0,s.jsx)(a.$n,{disabled:c,className:"ml-3 bg-primary text-14 px-5 py-2 rounded-[5px] text-white",onClick:w,children:c?(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(a.aH,{})}):"Send Email"}),(null==p?void 0:p.apiError)&&Object.entries(p.apiError).map(e=>{let[t,l]=e;return(0,s.jsx)("div",{children:"object"==typeof l&&(null==l?void 0:l.map((e,t)=>(0,s.jsx)("p",{className:"text-red text-12",children:e},t)))},t)})]}),(0,s.jsx)("div",{className:"flex justify-end mt-3",children:(null==p?void 0:p.apiError)&&(0,s.jsx)("p",{className:"text-red text-12",children:null==p?void 0:p.apiError})})]})})},y=e=>{var t,l,r,d,x,p,f,v,g;let{listing:j}=e,y=(0,m.useRouter)(),{data:w}=(0,h.useSession)(),[N,k]=(0,n.useState)(""),C=null==w||null==(l=w.user)||null==(t=l.userData)?void 0:t.id,_=(null==j||null==(r=j.user)?void 0:r.id)===C,S=null==j?void 0:j.updated_at,E=u()(),A=u()(S),z=24>E.diff(A,"hours")?A.fromNow():A.format("MMM D, YYYY"),[I,D]=(0,n.useState)(0),[M,P]=(0,n.useState)(!1),W=null==j?void 0:j.photos;return(0,n.useEffect)(()=>{(async()=>{try{var e;let t=await fetch("https://api.velaflow.com/api/v1/currencies"),l=await t.json();if((null==l||null==(e=l.content)?void 0:e.length)&&(null==j?void 0:j.currency)){let e=l.content.find(e=>e.currency_code===j.currency);(null==e?void 0:e.currency_symbol)&&k(e.currency_symbol)}}catch(e){console.error("Currency API error:",e)}})()},[null==j?void 0:j.currency]),(0,s.jsxs)("div",{className:"w-full min-h-screen bg-[#f5f5f5] mb-16 sm:mb-0",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-8",children:[(0,s.jsxs)("div",{className:"lg:col-span-2 rounded-xl p-4 sm:p-6 flex flex-col",children:[(0,s.jsxs)("div",{className:"relative w-full h-[300px] sm:h-[400px] md:h-[500px] lg:h-[600px] rounded-lg overflow-hidden flex items-center justify-center",children:[(0,s.jsx)(a.$n,{onClick:()=>{D(e=>0===e?W.length-1:e-1)},className:"absolute left-2 z-10 w-10 h-10 bg-white hover:bg-[#d5d5d5] rounded-[10px] flex items-center justify-center transition-all","aria-label":"Previous image",children:(0,s.jsx)("span",{className:"text-gray-700 text-xl font-light",children:"<"})}),(0,s.jsx)("div",{className:"relative w-full h-full",children:(0,s.jsx)(i(),{src:null==W||null==(d=W[I])?void 0:d.url,alt:"Primary Image",fill:!0,className:"object-contain",priority:!0})}),(0,s.jsx)(a.$n,{onClick:()=>{D(e=>e===W.length-1?0:e+1)},className:"absolute right-2 z-10 w-10 h-10 bg-white hover:bg-[#d5d5d5] rounded-[10px] flex items-center justify-center transition-all","aria-label":"Next image",children:(0,s.jsx)("span",{className:"text-gray-700 text-xl font-light",children:">"})})]}),(0,s.jsx)("div",{className:"flex items-center justify-center gap-3 sm:gap-4 mt-6",children:null==W?void 0:W.map((e,t)=>(0,s.jsx)(a.$n,{onClick:()=>{D(t)},className:"relative w-20 h-16 sm:w-24 sm:h-20 rounded-md overflow-hidden border-2 transition-all ".concat(t===I?"border-primary":"border-gray-200 hover:border-gray-300"),children:(0,s.jsx)(i(),{src:null==e?void 0:e.url,alt:"Thumbn
1ail ".concat(t+1),fill:!0,className:"object-cover"})},t))})]}),(0,s.jsxs)("div",{className:"bg-white p-6 sm:p-8 space-y-6 sm:space-y-8",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(a.In,{onClick:()=>y.push("/marketplace"),id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,s.jsx)(a.DZ,{type:"h2",text:"Back",className:"text-14 text-black ml-2"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(a.DZ,{type:"h1",className:"text-[20px] font-normal text-black mb-2",children:null==j?void 0:j.title}),(0,s.jsxs)("p",{className:"text-[20px] font-medium text-black mb-3",children:[N," ",(0,c.m)(null==j?void 0:j.price)]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("p",{className:"text-[16px] text-grey",children:["Listed ",z]}),(0,s.jsx)("p",{className:"text-[16px] text-grey",children:null==j?void 0:j.address})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-[20px] font-normal text-black mb-3",children:"Description"}),(0,s.jsxs)("div",{className:"text-grey text-[16px] font-normal leading-relaxed space-y-1",children:[(0,s.jsx)("p",{children:null==j?void 0:j.title}),(0,s.jsx)("p",{children:null==j?void 0:j.description}),(0,s.jsx)("p",{className:"capitalize",children:null==j?void 0:j.condition_type})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-[16px] font-normal text-black mb-3",children:"Location"}),(0,s.jsx)("p",{className:"text-grey text-[16px] font-normal mb-3",children:null==j?void 0:j.address}),(0,s.jsx)("div",{className:"w-full max-w-2xl h-48 lg:h-44 mt-2",children:(0,s.jsx)(o.default,{lat:Number(null==j?void 0:j.latitude),lng:Number(null==j?void 0:j.longitude)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-[20px] font-normal text-black mb-4",children:"Seller Details"}),(0,s.jsxs)(a.N_,{href:"/profile-details/".concat(null==j||null==(x=j.user)?void 0:x.username),className:"flex items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"relative w-12 h-12 sm:w-14 sm:h-14 rounded-full overflow-hidden flex-shrink-0",children:(0,s.jsx)(i(),{src:null==j||null==(p=j.user)?void 0:p.profile_pic,alt:"Ethan Walker",fill:!0,className:"object-cover"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-14 text-black font-normal",children:[null==j||null==(f=j.user)?void 0:f.first_name," ",null==j||null==(v=j.user)?void 0:v.last_name]}),(0,s.jsxs)("p",{className:"text-12 text-grey font-normal",children:["@",null==j||null==(g=j.user)?void 0:g.username]})]})]})]}),!_&&(0,s.jsx)(a.$n,{onClick:()=>{var e,t,l,s;return y.push("/messenger?userId=".concat(null==j||null==(e=j.user)?void 0:e.id,"&name=").concat(encodeURIComponent("".concat((null==j||null==(t=j.user)?void 0:t.first_name)||""," ").concat((null==j||null==(l=j.user)?void 0:l.last_name)||"").trim()),"&avatar=").concat(encodeURIComponent((null==j||null==(s=j.user)?void 0:s.profile_pic)||"")))},className:"w-full bg-primary text-white py-3 sm:py-4 rounded-lg font-normal hover:bg-opacity-90 transition-colors text-14 sm:text-base",children:"Message"})]})]}),(0,s.jsx)(b,{isOpen:M,onCloseAlertModal:()=>{P(!M)},listing:j})]})};var w=l(80612),N=!0;function k(e){let{listing:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.A,{title:"Marketplace Listing"}),(0,s.jsx)(y,{listing:t})]})}}},e=>{e.O(0,[3716,9759,1408,636,6593,8792],()=>e(e.s=25432)),_N_E=e.O()}]);

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.