PageSourceSearch

https://ripplemind.com/_next/static/chunks/pages/test/socket-test/…/[auctionNo]-d0b84d7aa9c773f3.js

js ripplemind.com collected 2026-10-06 13:17:15 UTC 7,181 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7786],{70510:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test/socket-test/socket-pauction-test-hover/[auctionNo]",function(){return i(82971)}])},82971:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return v}});var n=i(85893),d=i(29552),r=i(6154),s=i(67294),l=i(53920),o=i(11163),a=i(30120),u=i(88446),c=i(94543),m=i(48583);let h=e=>{let{auctionNo:t}=e,[i,o]=(0,s.useState)({id:-1,code:-1,title:-1,imagesArr:[],bid:-1,bidder:-1,s_bid:-1,s_bidder:-1,next_slab:-1,minimum_price:-1,status:-1,end_time:null,end_time_str:""}),[h,v]=(0,s.useState)([]),[_,b]=(0,s.useState)([]),[p,x]=(0,s.useState)(""),[f,y]=(0,s.useState)(""),g=(0,m.Dv)(c.ZP),j=(0,s.useRef)(!1);(0,s.useEffect)(()=>(!1===j.current&&(k(),T()),()=>{j.current=!0}),[]),(0,s.useEffect)(()=>{setInterval(()=>{let e=a.ou.now().setZone("Asia/Kolkata").toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").toString();y(e)},1e3)},[]);let[w,N]=(0,s.useState)({pageSize:"lg",width:-1,height:-1});(0,s.useEffect)(()=>{function e(){let{innerWidth:e,innerHeight:t}=window;e>=992?N({pageSize:"lg",width:e,height:t}):N({pageSize:"sm",width:e,height:t})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let S=e=>{let t={id:-1,code:-1,title:-1,imagesArr:[],bid:-1,bidder:-1,s_bid:-1,s_bidder:-1,next_slab:-1,minimum_price:-1,status:-1,end_time:null,end_time_str:""};return"number"==typeof(null==e?void 0:e.id)&&(t.id=null==e?void 0:e.id),"number"==typeof(null==e?void 0:e.code)&&(t.code=null==e?void 0:e.code),"string"==typeof(null==e?void 0:e.title)&&(t.title=null==e?void 0:e.title),"number"==typeof(null==e?void 0:e.bid)&&(t.bid=null==e?void 0:e.bid),"number"==typeof(null==e?void 0:e.bidder)&&(t.bidder=null==e?void 0:e.bidder),"number"==typeof(null==e?void 0:e.s_bid)&&(t.s_bid=null==e?void 0:e.s_bid),"number"==typeof(null==e?void 0:e.s_bidder)&&(t.s_bidder=null==e?void 0:e.s_bidder),"number"==typeof(null==e?void 0:e.next_slab)&&(t.next_slab=null==e?void 0:e.next_slab),"number"==typeof(null==e?void 0:e.minimum_price)&&(t.minimum_price=null==e?void 0:e.minimum_price),"number"==typeof(null==e?void 0:e.status)&&(t.status=null==e?void 0:e.status),"string"==typeof(null==e?void 0:e.end_time)&&(t.end_time=new Date(null==e?void 0:e.end_time)),"string"==typeof(null==e?void 0:e.end_time)&&(t.end_time_str=null==e?void 0:e.end_time),t},E=()=>{let e=a.ou.now().setZone("Asia/Kolkata").toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").toString();return e},A=e=>{try{if(!e)return"expired";let t=E(),i=new Date(t),n=new Date(e),d=i.valueOf(),r=n.valueOf();if(d-r>0)return"expired";return"not-expired"}catch(e){return"expired"}},D=e=>{try{if(!e)return"-";let t=new Date(e),i=a.ou.fromJSDate(t).minus({hours:5,minutes:30}).setZone("Asia/Kolkata").toRelative();if("string"==typeof i)return"".concat(i,"-").concat(1e4*Math.random());return""}catch(e){return"expired"}},k=async()=>{try{let e=await M();e.on("auction-2-".concat(t),e=>{try{Z(e)}catch(e){console.error(e)}})}catch(e){console.error(e)}},M=async()=>(0,l.io)(d.Z.BACKEND_URL_SOCKET),T=async()=>{try{var e;let i=await r.default.get("".concat(d.Z.BACKEND_URL,"/api/main/page-realtime-bidding-pauction/get-product-list-by-auction-no-cache?auction_no=").concat(t)),n=null===(e=i.data)||void 0===e?void 0:e.data;n&&Z(n)}catch(e){console.error(e)}},Z=async e=>{try{if(!e)return;let t=null==e?void 0:e.productArr;if(!1===Array.isArray(t))return;let i=[];for(let e=0;e<t.length;e++){let n=t[e];if(2===n.status){let e=S(n);i.push(e)}}i.length>=1?o(i[0]):o({id:-1,code:-1,title:-1,imagesArr:[],bid:-1,bidder:-1,s_bid:-1,s_bidder:-1,next_slab:-1,minimum_price:-1,status:-1,end_time:null,end_time_str:""});let n=[];for(let e=0;e<t.length;e++){let i=t[e];if(1===i.status){let e=S(i);n.push(e)}}v(n);let d=[];for(let e=0;e<t.length;e++){let i=t[e];if(7===i.status||8===i.status){let e=S(i);d.push(e)}}b(d)}catch(e){console.error(e)}},C=async e=>{let{bidAmt:t}=e;try{await u.Z.post("product-1-bid/insert-product-1-bid",{lotno:i.code,bid:t,s_bid:0,bid_type_normal_secret:1})}catch(e){console.error(e)}},R=()=>(0,n.jsxs)("div",{className:"py-3",children:[(0,n.jsxs)("h3",{children:["Upcoming Product ",h.length]}),h.map(e=>(0,n.jsx)("div",{children:e.title},e.id))]}),z=()=>(0,n.jsxs)("div",{className:"py-3",children:[(0,n.jsxs)("h3",{children:["Past Product ",_.length]}),_.map(e=>(0,n.jsxs)("div",{children:[e.id,":",e.title]},e.id))]}),H=async e=>{try{var t;await u.Z.post("/product_auction_bid_hover/insertproductauctionbidhover",{lotno:20430001,fullName:null==g?void 0:null===(t=g.userDetails)||void 0===t?void 0:t.name,hoverBidType:"normal",secretBidAmt:1,isLive:!0})}catch(e){}};(0,s.useEffect)(()=>
1{if("Hover"===p){let e=setInterval(()=>{H()},650);return()=>clearInterval(e)}},[p,H]);let P=()=>(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:"Current"}),(0,n.jsx)("div",{}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{children:i.title}),(0,n.jsxs)("div",{children:["code: ",i.code]}),(0,n.jsx)("div",{children:i.bid}),(0,n.jsxs)("div",{children:["Current Date Time: ",f]}),i.end_time&&(0,n.jsxs)("div",{children:["End Date Time: ",new Date(i.end_time).toString()]}),(0,n.jsxs)("div",{children:["End Date Time Str: ",i.end_time_str]}),(0,n.jsxs)("div",{children:["Expired or not: ",A(i.end_time)]}),(0,n.jsxs)("div",{children:["Time remaining:"," ",D(i.end_time_str)]}),(0,n.jsx)("div",{children:(0,n.jsxs)("button",{className:"button bg-blue-500 text-white lg:w-full py-2 rounded",onClick:()=>{C({bidAmt:Math.max(i.bid,i.minimum_price,i.next_slab)})},children:["Next Bid Rs"," ",Math.max(i.bid,i.minimum_price,i.next_slab)]})})]})]});return(0,n.jsxs)("div",{className:"container m-auto py-10 px-3",children:[(0,n.jsx)("h1",{children:"Socket Pauction Test"}),(0,n.jsxs)("div",{children:["auctionNo: ",t]}),(0,n.jsxs)("div",{children:["hjhjhgh",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{children:(0,n.jsxs)("button",{onMouseEnter:()=>{x("Hover")},onMouseLeave:()=>{x("")},className:"button bg-blue-500 text-white lg:w-full py-2 rounded",onClick:()=>{C({bidAmt:Math.max(i.bid,i.minimum_price,i.next_slab)})},children:["Next Bid Rs"," ",Math.max(i.bid,i.minimum_price,i.next_slab)]})})})]}),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{children:["lg"===w.pageSize&&(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"w-1/4",children:R()}),(0,n.jsx)("div",{className:"w-2/4",children:P()}),(0,n.jsx)("div",{className:"w-1/4",children:z()})]}),"sm"===w.pageSize&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"w-full",children:P()}),(0,n.jsx)("div",{className:"w-full",children:R()}),(0,n.jsx)("div",{className:"w-full",children:z()})]})]})})]})};var v=()=>{let e=(0,o.useRouter)(),[t,i]=(0,s.useState)(-1);return(0,s.useEffect)(()=>{if(e.isReady){var t,n;if("string"==typeof(null===(t=e.query)||void 0===t?void 0:t.auctionNo)){let t=parseInt(null===(n=e.query)||void 0===n?void 0:n.auctionNo);t>=1&&i(t)}else console.error("not valid")}},[e.isReady]),(0,n.jsxs)("div",{children:[JSON.stringify(e.query),"auctionNo: ",t,t>=1&&(0,n.jsx)(h,{auctionNo:t})]})}}},function(e){e.O(0,[120,9774,2888,179],function(){return e(e.s=70510)}),_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.