1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1457,5574],{86545:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/BidaskCard",function(){return a(29066)}])},85574:function(e,t,a){"use strict";a.r(t),a.d(t,{UserContext:function(){return i},UserProvider:function(){return o}});var s=a(85893),r=a(67294),l=a(11837),n=a(6490);let i=r.createContext({userId:"",token:null,userDetails:null,clearUser:()=>{}}),o=e=>{var t;let{children:a,initialJboId:o,theme:c}=e,[u,d]=(0,r.useState)(0),[m,g]=(0,r.useState)(0),[h,x]=(0,r.useState)(!1),[p,S]=(0,r.useState)([]),[f,j]=(0,r.useState)(),[N,v]=(0,r.useState)(""),[I,y]=(0,r.useState)(localStorage.getItem("userId")),[w,b]=(0,r.useState)(!1),[_,k]=(0,r.useState)(!1),[P,O]=(0,r.useState)(!1),[T,C]=(0,r.useState)(!0),[J,E]=(0,r.useState)(localStorage.getItem("token")),[F,D]=(0,r.useState)(o),[W,U]=(0,r.useState)(c),[L,B]=(0,r.useState)([]),[R,M]=(0,r.useState)(JSON.parse(localStorage.getItem("userDetails"))),[H,X]=(0,r.useState)(()=>{let e=localStorage.getItem("privilegeStatus");return e||0}),[q,A]=(0,r.useState)([]),[V,z]=(0,r.useState)(""),[$,G]=(0,r.useState)({}),[K,Q]=(0,r.useState)({}),[Y,Z]=(0,r.useState)({}),[ee,et]=(0,r.useState)({}),[ea,es]=(0,r.useState)([]),[er,el]=(0,r.useState)(!0),[en,ei]=(0,r.useState)({pageNotFound:"",somethingWentWrong:"",noDataFound:"",productNotFound:""}),[eo,ec]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=localStorage.getItem("userId"),t=(0,l.ej)("userId");e!==I&&y(e||t);let a=localStorage.getItem("token"),s=(0,l.ej)("token");a!==J&&E(a||s);let r=JSON.parse(localStorage.getItem("userDetails")),n=(0,l.ej)("userDetails")?JSON.parse((0,l.ej)("userDetails")):null;r!==R&&M(r||n)},[]),(0,r.useEffect)(()=>{localStorage.setItem("userId",I),localStorage.setItem("token",J),localStorage.setItem("userDetails",JSON.stringify(R)),(0,l.d8)("userId",I,30),(0,l.d8)("token",J,30),(0,l.d8)("userDetails",JSON.stringify(R),30)},[I,J,R]);let eu=()=>{localStorage.removeItem("userId"),localStorage.removeItem("token"),localStorage.removeItem("userDetails"),localStorage.removeItem("privilegeStatus"),localStorage.removeItem("earImage"),localStorage.removeItem("piercingPoint"),localStorage.removeItem("topPoint"),localStorage.removeItem("bottomPoint"),(0,l.kT)("userId"),(0,l.kT)("token"),(0,l.kT)("userDetails"),y(""),E(null),M(null),X(null),sessionStorage.clear()},{websiteStatus:ed}=(0,r.useContext)(n.m),em=null!==(t=null==R?void 0:R.user_type)&&void 0!==t?t:null,[eg,eh]=(0,r.useState)(()=>{let e=localStorage.getItem("earImage");return e?JSON.parse(e):null}),[ex,ep]=(0,r.useState)(()=>{let e=localStorage.getItem("piercingPoint");return e?JSON.parse(e):null}),[eS,ef]=(0,r.useState)(()=>{let e=localStorage.getItem("earHeightRatio");return e?JSON.parse(e):null}),[ej,eN]=(0,r.useState)({width:0,height:0}),[ev,eI]=(0,r.useState)(()=>{let e=localStorage.getItem("topPoint");return e?JSON.parse(e):null}),[ey,ew]=(0,r.useState)(()=>{let e=localStorage.getItem("bottomPoint");return e?JSON.parse(e):null});(0,r.useEffect)(()=>{null!==eg&&localStorage.setItem("earImage",JSON.stringify(eg)),null!==ex&&localStorage.setItem("piercingPoint",JSON.stringify(ex)),null!==ev&&localStorage.setItem("topPoint",JSON.stringify(ev)),null!==ey&&localStorage.setItem("bottomPoint",JSON.stringify(ey)),null!==eS&&localStorage.setItem("earHeightRatio",JSON.stringify(eS))},[eg,ex,eS]);let eb=()=>{if(ev&&ey){ey.y,ev.y;let e=Math.sqrt(Math.pow(ey.x-ev.x,2)+Math.pow(ey.y-ev.y,2));ef(e/60)}},[e_,ek]=(0,r.useState)();return(0,s.jsx)(i.Provider,{value:{userId:I,buySellEnable:h,setBuySellEnable:x,enquiryEnable:m,kycDetailsStatus:f,setKycDetail
1sStatus:j,setEnquiryEnable:g,privilegeValue:N,arEnable:u,setArEnable:d,setPrivilegeValue:v,sortByData:p,setSortByData:S,jboId:F,qrEnable:_,setqrEnable:k,logoUrl:V,errorLoading:T,menuData:L,setMenuData:B,setErrorLoading:C,setLogoUrl:z,ShippingEnable:P,errorImages:en,setShippingEnable:O,setErrorImages:ei,setJboId:D,theme:W,setTheme:U,setUserId:y,goldPlanEnable:w,setGoldPlanEnable:b,token:J,setToken:E,userDetails:R,setUserDetails:M,clearUser:eu,goldRate:q,setGoldRate:A,domainData:$,setDomainData:G,featureCustomizations:K,setFeatureCustomizations:Q,metalCategories:Y,setMetalCategories:Z,menuJsonApp:ee,setMenuJsonApp:et,privilegeStatus:H,setPrivilegeStatus:X,shouldShowOnSite:!(3==ed&&(1==em||null==em||0==em))||2==em,websiteStatus:ed,clickAndCollectMenu:ea,setClickAndCollectMenu:es,isMobEnb:er,setMobEnb:el,earImage:eg,setEarImage:eh,piercingPoint:ex,setPiercingPoint:ep,earHeightRatio:eS,setEarHeightRatio:ef,earringRenderDimensions:ej,setEarringRenderDimensions:eN,topPoint:ev,setTopPoint:eI,bottomPoint:ey,setBottomPoint:ew,calculateEarScale:eb,earringImages:e_,setEarringImages:ek,contactEnquiryEnable:eo,setContactEnquiryEnable:ec},children:a})}},29066:function(e,t,a){"use strict";a.r(t);var s=a(85893),r=a(67294),l=a(41664),n=a.n(l),i=a(43812),o=a(60017),c=a(25675),u=a.n(c),d=a(85574);let m=e=>{let{product:t,bidTouch:a,onBidTouchChange:l}=e,{formatCurrency:c}=(0,r.useContext)(o.CurrencyContext),[m,g]=(0,r.useState)(a),{json:h,tax_amount:x,purchase_price:p,purchase_price_with_tax:S,margin:f,touch:j,product_id:N,pure_weight:v}=t,{shouldShowOnSite:I}=(0,r.useContext)(d.UserContext);(0,r.useEffect)(()=>{g(a)},[a]);let y=e=>{let a=e.target.value;g(a),l(t.product_id,a)},w={initial:{opacity:0,x:-50,scale:.85,rotate:-10},animate:e=>({opacity:1,x:0,scale:1,rotate:0,transition:{delay:.6*e,duration:1.5,ease:[.16,1,.3,1]}})};return(0,s.jsxs)("div",{className:"bg-white shadow transition duration-500 ease-in-out transform hover:shadow-xl rounded-lg overflow-hidden mb-2",children:[(0,s.jsxs)("div",{className:"flex flex-col md:flex-row items-start p-5 rounded-t-lg",children:[(0,s.jsx)(n(),{href:"".concat(t.url),className:"flex-shrink-0",children:(0,s.jsx)(u(),{src:(0,i.setImageSrc)(h.Images,""),alt:h["Product Name"]||"Product Image",width:192,height:192,className:"h-48 w-full md:w-48 object-cover rounded-lg mb-4 md:mb-0"})}),(0,s.jsxs)("div",{className:"flex-1 md:ml-4",children:[h["Product Name"]?(0,s.jsx)("h3",{variants:w,className:"font-semibold text-xl mb-2 capitalize text-primary",children:h["Product Name"]}):null,(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-x-2 text-gray-700",children:[h["Tag Label"]?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Tag Label"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsxs)("p",{className:"flex items-center",children:["# ",h["Tag Label"]]})]}):null,h["Category name"]?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Category"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsx)("p",{className:"flex items-center",children:h["Category name"]})]}):null,t.weight?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Weight"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsxs)("p",{className:"flex items-center",children:[t.weight,"g"]})]}):null,I&&(v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Pure Weight"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsxs)("p",{className:"flex items-center",children:[v,"g"]})]}):null),I&&(t.pure_rate?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Pure Rate"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsx)("p",{className:"flex items-center",children:c(t.pure_rate)})]}):null),I&&(void 0!==f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center",children:"Margin"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsx)("p",{className:"flex items-center",children:c(f.toFixed(2))})]}):null),I&&(t.touch?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{variants:w,className:"flex items-center font-semibold text-xl",children:"Touch"}),(0,s.jsx)("p",{children:"-"}),(0,s.jsx)("p",{className:"flex items-center text-xl font-semibold",children:t.touch})]}):null)]})]})]}),(0,s.jsx)("div",{className:"p-5 bg-gray-50 rounded-b-lg",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-center md:items-end",children:[(0,s.jsxs)("div",{children:[I&&(void 0!==p&&0!=x?(0,s.jsxs)("p",{variants:w,className:"text-lg text-gray-600 mb-1",children:["Taxable Amou
1nt: ",(0,s.jsx)("span",{className:"text-gray-800",children:c(p)})]}):null),I&&(void 0!==x&&0!=x?(0,s.jsxs)("p",{variants:w,className:"text-lg text-gray-600",children:["Tax: ",(0,s.jsx)("span",{className:"text-gray-800",children:c(x)})]}):null),I&&(void 0!==S?(0,s.jsxs)("p",{variants:w,className:"text-lg text-gray-600",children:["Total: ",(0,s.jsx)("span",{className:"text-gray-800",children:c(S)})]}):null)]}),(0,s.jsxs)("div",{className:"mt-4 md:mt-0",children:[(0,s.jsxs)("label",{htmlFor:"bidTouch-".concat(t.product_id),className:"block text-gray-700 text-lg mb-2",children:["Bid Touch ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})," :"]}),(0,s.jsx)("input",{id:"bidTouch-".concat(t.product_id),type:"text",value:localStorage.getItem("bidValue-".concat(t.product_id))||m,onChange:y,onInput:e=>{e.target.value=e.target.value.replace(/[^0-9.]/g,"")},className:"shadow appearance-none border rounded-lg py-3 px-5 text-gray-700 leading-tight focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary hover:border-primary transition duration-200 ease-in-out"})]})]})})]})};t.default=m},43812:function(e,t,a){"use strict";var s=a(83454);let r=()=>!1,l=()=>r()?s.env.NEXT_PUBLIC_WEB_HOST:window.location.hostname,n=()=>{let e=l();return[e,"dev.darjewellery.com","qc.darjewellery.com","www.darjewellery.com","jpencil.ta4.in","img.freepik.com","media.ta4.in","ik.imagekit.io","dashboard2.jpencil.com","jbo.tanjorepainting.info","media2.tarangarts.com","media.jpencil.in","shop.jpencil.com","via.placeholder.com","media.tarangarts.com","static.tarangarts.com","veritypc.com","165.232.187.184","media.jpencil.in","undefined.undefined"].filter(e=>void 0!==e&&"undefined.undefined"!==e)},i=e=>{if(!e)return"#";let t=e.replace(/^(https?:)\/{1}(?!\/)/,"$1//");return/^https?:\/\//i.test(t)?t:"".concat(window.location.origin).concat(t.startsWith("/")?"":"/").concat(t)};e.exports={BASE_URL:(()=>{let e=l();return"https://".concat(e,"/api")})(),BUILDER_URL:(()=>{let e=l();return"https://".concat(e,"/api/v3")})(),setImageSrc:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"s400",s=l(),r="string"==typeof e&&(e.startsWith("http://")||e.startsWith("https://"));return r?e:null!=e?"https://".concat(s,"/product_image/").concat(a?"".concat(a,"__"):"").concat(e):void 0},setImageSrcNew:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"s400";l();let s="string"==typeof e&&(e.startsWith("http://")||e.startsWith("https://")),n=a?"".concat(a,"__"):"";return s?e:null!=e?r()?"https://jpencil.ta4.in/product_image/".concat(n).concat(e):"/product_image/".concat(n).concat(e):void 0},imagesConfig:n,_ENV:(()=>{{let e=window.location.hostname;return e}})(),getRedirectUrl:i,isDevelopment:r,getHostname:l}}},function(e){e.O(0,[5675,1664,17,9774,2888,179],function(){return e(e.s=86545)}),_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.