PageSourceSearch

https://damsdelhi.com/assets/Details-DFw0xAWW.js

js damsdelhi.com collected 2026-09-25 18:35:16 UTC 30,250 bytes, 52 lines download raw bytes

1import{s as rt,a as at}from"./vendor-antd-CjcCcqh_.js";import{j as e,a as c}from"./vendor-react-CIe7BBPp.js";import{a as T,A as N,D as nt}from"./index-B3dWxf7F.js";import{toast as P}from"./vendor-react-toastify-DyH3b-7G.js";import{g as ot}from"./vendor-react-icons-BjOknaQJ.js";import{u as it}from"./vendor-redux-LH1zpDpA.js";import{H as lt}from"./vendor-react-helmet-async-CO3viEpT.js";import ct from"./Login-CwfFzfYl.js";import{P as n}from"./vendor-prop-types-DNxwfY3H.js";import{I as dt}from"./images-DsoEKV9h.js";import mt from"./Advertisment-Du9_6jO0.js";import{d as xt}from"./decryptUrl-CTfu1oj1.js";import{p as pt}from"./vendor-dompurify-D6gMnemd.js";import{d as ut,b as ft}from"./vendor-router-MF_ECADz.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-helpers-Bu0hh0lh.js";import"./vendor-react-dom-t5F7FhZR.js";import"./vendor-resize-observer-polyfill-pFR5zza0.js";import"./vendor-stylis-BmaM3nay.js";import"./vendor-scroll-into-view-if-needed-D5b_oRbX.js";import"./vendor-compute-scroll-into-view-Bl8rNFhg.js";import"./vendor-throttle-debounce-CUWDS_la.js";import"./vendor-json2mq-CN42t7xi.js";import"./vendor-string-convert-Bhuo--sE.js";import"./vendor-copy-to-clipboard-DxQUb0mb.js";import"./vendor-toggle-selection-DGa8lynz.js";import"./vendor-axios-D2K41pGA.js";import"./vendor-js-cookie-Cz0CWeBA.js";import"./vendor-remix-run-router-D1FRce34.js";import"./vendor-use-sync-external-store-f1cvjnMh.js";import"./vendor-immer-Bp5DpiZ6.js";import"./vendor-redux-thunk-ClJT1hhx.js";import"./vendor-react-fast-compare-Dxl0Zvcn.js";import"./vendor-invariant-CCbxWKZF.js";import"./vendor-shallowequal-Ck_j7EqP.js";import"./vendor-react-international-phone-0WvDnNd3.js";import"./vendor-react-bootstrap-BWua6sV7.js";import"./vendor-react-lifecycles-compat-BQyd-nVo.js";import"./vendor-restart-ui-CZ6pMDW7.js";import"./vendor-dom-helpers-DY4L_g-8.js";import"./vendor-warning-CQQPl30N.js";import"./vendor-react-aria-ssr-C_EJWdyo.js";import"./vendor-restart-hooks-C7rFwvJj.js";import"./vendor-uncontrollable-B5vvWZVv.js";import"./vendor-prop-types-extra-BShinCMI.js";import"./vendor-react-transition-group-BNHTQ0HL.js";import"./vendor-libphonenumber-js-D3XxeqIS.js";/* empty css                      */import"./vendor-crypto-js-B5jrpidJ.js";import"./cryptoConfig-DuU3nrp7.js";const ht=()=>e.jsx("div",{className:"w-full float-left bg-[#fafafa]",children:e.jsx("section",{className:"max-sm:!py-6 max-md:!py-7 md:!py-8 lg:!py-10",children:e.jsx("div",{className:"tw-container",children:e.jsxs("div",{className:"flex flex-col md:!flex-row md:!self-start",children:[e.jsxs("div",{className:"!w-full md:!w-1/2 md:!sticky md:!top-[100px] md:!self-start",children:[e.jsx("div",{className:"relative !rounded-lg",children:e.jsx("div",{className:"!w-full !bg-[#eee] !flex !justify-center !py-5 md:!px-10 !rounded-lg",children:e.jsx("div",{className:"max-md:!h-50 md:!h-60 !mx-2.5 !w-full !rounded-[10px] news-article-skeleton"})})}),e.jsx("div",{className:"!flex !gap-2 !py-5 !overflow-x-auto scrollbar-hide lg:!justify-center",children:Array.from({length:4}).map((t,s)=>e.jsx("div",{className:"!flex-shrink-0 !bg-[#eee] !rounded-lg",children:e.jsx("div",{className:"max-md:!p-[7px] max-md:!h-[45px] max-md:!w-[50px] md:!p-[6px_5px] md:!h-[54px] md:!w-[54px] !rounded-md news-article-skeleton"})},s.id))})]}),e.jsxs("div",{className:"!w-full max-md:!mt-5 md:!px-3",children:[e.jsxs("div",{className:"max-md:!p-2.5 !border !border-[#cccccc82] !p-2.5 !rounded-[9px] !bg-white",children:[e.jsx("div",{className:"!w-3/4 !h-6 !rounded news-article-skeleton"}),e.jsx("div",{className:"!mt-1 !w-1/3 !h-4 !rounded news-article-skeleton"}
1),e.jsxs("div",{className:"flex items-center !gap-3 !flex-wrap max-md:!py-2 md:!pb-3 !mt-2",children:[e.jsx("div",{className:"flex items-center !gap-1",children:Array.from({length:5}).map((t,s)=>e.jsx("div",{className:"!w-4 !h-4 !rounded news-article-skeleton"},s.id))}),e.jsx("div",{className:"!w-20 !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-24 !h-4 !rounded news-article-skeleton"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap !pb-3",children:[e.jsx("div",{className:"!w-12 !h-5 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-16 !h-5 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-20 !h-5 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-16 !h-5 !rounded news-article-skeleton"})]}),e.jsxs("div",{className:"flex !items-center max-md:!gap-2 !gap-4 !flex-wrap max-md:!my-3",children:[e.jsx("div",{className:"!w-16 !h-4 !rounded news-article-skeleton"}),e.jsxs("div",{className:"flex items-center overflow-hidden !rounded-lg !border !border-[#e5e7eb]",children:[e.jsx("div",{className:"flex !h-10 !w-10 max-[767px]:!h-[30px] max-[767px] news-article-skeleton"}),e.jsx("div",{className:"!h-10 !w-14 max-[767px]:!h-[30px] news-article-skeleton"}),e.jsx("div",{className:"flex !h-10 !w-10 max-[767px]:!h-[30px] max-[767px]:!w-[35px] !bg-[#eff7ff] news-article-skeleton"})]})]})]}),e.jsx("div",{className:"!flex !flex-wrap !items-center !gap-3 
1!py-2 !w-full",children:Array.from({length:5}).map((t,s)=>e.jsx("div",{className:"!w-8 !h-8 !rounded-full news-article-skeleton"},s.id))}),e.jsxs("div",{className:"flex items-center !gap-3 !py-2 !flex-wrap",children:[e.jsx("div",{className:"!w-12 !h-4 !rounded news-article-skeleton"}),Array.from({length:4}).map((t,s)=>e.jsx("div",{className:"!w-10 !h-8 !rounded-md news-article-skeleton"},s.id))]}),e.jsxs("div",{className:"!bg-[linear-gradient(0deg,#eee,#fafafa_52%,#fff)] !p-2.5 md:!p-3.5 !rounded-2xl !mt-4",children:[e.jsx("div",{className:"!w-40 !h-6 !rounded news-article-skeleton"}),e.jsxs("div",{className:"!mt-3 !space-y-2",children:[e.jsx("div",{className:"!w-full !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-full !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-3/4 !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-1/2 !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-full !h-4 !rounded news-article-skeleton"}),e.jsx("div",{className:"!w-2/3 !h-4 !rounded news-article-skeleton"})]})]}),e.jsxs("div",{className:"!flex !items-center !justify-center !flex-wrap !py-4",children:[e.jsx("div",{className:"!w-[170px] !h-[45px] !rounded-lg !mx-2.5 max-md:!w-[120px] news-article-skeleton"}),e.jsx("div",{className:"!w-[170px] !h-[45px] !rounded-lg !mx-2.5 max-md:!w-[120px] max-md:!my-2.5 news-article-skeleton"})]})]})]})})})}),bt=(t="")=>{try{const s=t.replaceAll("-","+").replaceAll("_","/"),a=s.padEnd(s.length+(4-s.length%4)%4,"="),r=globalThis.atob(a),l=Uint8Array.from(r,d=>d.codePointAt(0));return new TextDecoder().decode(l)}catch(s){return globalThis.__APP_LOGGER__.log("Invalid base64 string",s),""}},gt=t=>t.is_ebook==1?"ebook_price":t.is_audiable==1?"audiable_price":"paper_book_price",_t=(t,s,a,r,l)=>t.is_paper_book==1||t.is_ebook==0||t.is_audiable==0?{attribute_id:s??a,color_id:r??l}:{attribute_id:void 0,color_id:void 0},jt=({userId:t,prod:s,variant:a,attribute_id:r,color_id:l,counter:d,crosdealId:h,partner_id:b,customText:p,customDesign:x,allData:f})=>{var S;const _={user_id:t,book_id:s.id,variant:a,qty:d,attribute_id:r,color_id:l,is_combo_master:s.is_combo_master,combo_course_id:Number(s.combo_course_id),cross_deal_id:h};return b!==null?{..._,partner_member_id:b,is_multiorder:4}:(p==null?void 0:p.length)>0?{..._,customization_text:x,customize_proudct_price:(S=f==null?void 0:f.detail)==null?void 0:S.customize_proudct_price}:_},wt=async({axiosInstance:t,userId:s,prod:a,requestData:r,cartData:l,crossale:d,navigate:h,toast:b})=>{var x,f;const p=(f=(x=l==null?void 0:l.data)==null?void 0:x.list)==null?void 0:f[0];if(l.status===!1){await t.post(N.MEDIMART.ADD_BOOK_TO_CART,r),b.success("Item has been added successfully..."),h("/addToCart");return}if((a==null?void 0:a.id)===(p==null?void 0:p.id)){b.warning("This product is already exist in your cart..");return}(a==null?void 0:a.product_type)!==(p==null?void 0:p.product_type)&&d===null&&await t.post(N.CBT.CLEAR_DATA,{user_id:s}),await t.post(N.MEDIMART.ADD_BOOK_TO_CART,r),b.success("Item has been added successfully..."),h("/addToCart")},yt=(t,s)=>t&&s.split("_")[0]==="h"?"h":"s",Nt=t=>(t==null?void 0:t.out_stock)==="1"||Number(t==null?void 0:t.availableStockTv)<=0,vt=({condition:t,userId:s,productId:a,parameter:r,partnerId:l})=>t==="h"?{user_id:s??4,book_id:a,partner_id:l}:{user_id:s??4,slug:r,partner_id:l},kt=t=>t.length>30?{value:t,error:"Max text length"}:t&&!/^[a-zA-Z0-9]+( [a-zA-Z0-9]+)* ?$/.test(t)?{value:t,error:"Only alphanumeric characters and single space
1s are allowed."}:{value:t,error:null},Tt=async(t,s)=>{var h,b,p;const a=await T.post(N.MEDIMART.GET_USER_CART_DATA,{user_id:t}),r=(h=a==null?void 0:a.data)==null?void 0:h.status;if(r===!1)return{status:r,isInCart:!1};const d=(((p=(b=a==null?void 0:a.data)==null?void 0:b.data)==null?void 0:p.list)||[]).some(x=>String(x.id)===String(s));return{status:r,isInCart:d}},se=({open:t,onToggle:s,onWhatsapp:a,onCopyLink:r})=>e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:`!absolute !top-4 md:!top-1 md:!right-2 !right-4 !w-10 !h-10 !rounded-full !bg-[#007aff] !text-white !border-0 !shadow-md hover:!bg-[#0056b3]\r
2       !transition-colors !duration-150 !flex !items-center !justify-center !cursor-pointer !z-10  max-md:!h-[30px] max-md:!w-[30px]\r
3        md:!h-[30px] md:!w-[30px]      lg:!h-9 lg:!w-9  \r
4       `,onClick:s,children:e.jsx("i",{className:`icon fa ${t?"fa-times":"fa-share"} !text-base`})}),t&&e.jsxs("div",{className:"!absolute !top-14 md:!top-14 md:!right-3 !right-4 !flex flex-col !gap-2 !z-10",children:[e.jsx("button",{type:"button",className:"!w-[30px] !h-[30px] !rounded-full !bg-[#25D366] !text-white !border-0 !shadow-md flex !items-center !justify-center !cursor-pointer !text-base",onClick:a,"aria-label":"Share on WhatsApp",children:e.jsx("i",{className:"fa fa-whatsapp"})}),e.jsx("button",{type:"button",className:"!w-[30px] !h-[30px] !rounded-full !bg-[#333] !text-white !border-0 !shadow-md flex items-center justify-center cursor-pointer text-base",onClick:r,"aria-label":"Copy link",children:e.jsx("i",{className:"fa fa-copy"})})]})]});se.propTypes={open:n.bool.isRequired,onToggle:n.func.isRequired,onWhatsapp:n.func.isRequired,onCopyLink:n.func.isRequired};const re=({bannerData:t,image:s,setImage:a,color:r,selectedColor:l,shareOpen:d,onToggleShare:h,onWhatsapp:b,onCopyLink:p})=>e.jsxs("div",{children:[e.jsxs("div",{className:"relative !rounded-lg ",children:[e.jsx("div",{className:" !w-full !bg-[#eee] !flex !justify-center !py-5 md:!px-10 !rounded-lg ",children:t.map((x,f)=>f===0?e.jsx("img",{src:s??x.images,alt:`Banner ${f+1}`,className:`max-md:!h-50  lg:!h-60 !mx-2.5 rounded-[10px]\r
5               hover:!scale-[1.7] !transition-transform !duration-[900ms] !ease-in-out`},x.id||f):null)}),e.jsx(se,{open:d,onToggle:h,onWhatsapp:b,onCopyLink:p})]}),e.jsx("div",{className:"!flex !gap-2 !py-5 !overflow-x-auto scrollbar-hide lg:!justify-center ",children:t.map((x,f)=>{var _;return(x.color_id===((_=r[0])==null?void 0:_.id)||(x==null?void 0:x.color_id)===(l==null?void 0:l.id))&&e.jsx("div",{className:"!flex-shrink-0  !bg-[#eee] !rounded-lg",children:e.jsx("button",{type:"button",className:"!w-full !h-full !border-0 !p-0 !cursor-pointer !rounded-lg","data-id":f+1,onClick:()=>a(x.images),children:e.jsx("img",{className:` !m-0 !w-full !bg-[#eee] !h-full  !rounded-md !border-2 !transition-colors !duration-150 !w-full !bg-[#eee] !h-full   !border-2
6                     !transition-colors !duration-150 !border-transparent max-md:!p-[7px] max-md:!h-[45px] max-md:!w-[50px]
7                     md:!p-[6px_5px]  md:!h-[54px] md:!w-[54px] 
8                      ${x.images===s?"!border-[#007aff]":"!border-transparent "}`,src:x.images,alt:`Banner ${f+1}`})})},x.id)})})]});re.propTypes={bannerData:n.array.isRequired,image:n.string,setImage:n.func.isRequired,color:n.array.isRequired,selectedColor:n.object,shareOpen:n.bool.isRequired,onToggleShare:n.func.isRequired,onWhatsapp:n.func.isRequired,onCopyLink:n.func.isRequired};const ae=({detail:t})=>e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center !gap-3  !flex-wrap max-md:!py-2 md:!pb-3",children:[e.jsxs("div",{className:"flex items-center !gap-1 !text-[#f5b800] !text-base",children:[e.jsx("i",{className:"fa fa-star"}),e.jsx("i",{className:"fa fa-star"}),e.jsx("i",{className:"fa fa-star"}),e.jsx("i",{className:"fa fa-star"}),e.jsx("i",{className:"fa fa-star text-[#ccc]"})]}),e.jsx("h6",{className:"!text-sm !font-medium !text-[#007aff] !m-0 max-md:!text-xs",children:"Very Good"}),e.jsxs("h5",{className:"!text-sm !text-[#007aff] !m-0 !flex !items-center !gap-1  max-md:!text-[13px]",children:[e.jsx("i",{className:"fa fa-circle !text-[#007aff] !text-[6px]"}),t==null?void 0:t.course_review_count," reviews"]})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.jsxs("h4",{className:`\r
9      !m-0 !flex !items-center !flex-wrap\r
10      !text-base !font-medium !text-[#212121]\r
11      max-md:!text-sm\r
12      md:!w-full !gap-2 md:!gap-4 md:!pb-3\r
13    `,children:[e.jsx("span",{className:"!text-[#757575] !font-medium",children:"MRP"}),Number(t==null?void 0:t.discount_paper)>0&&e.jsxs("del",{className:"!text-[#999] !font-medium",children:["₹",t==null?void 0:t.paper_book_price]}),e.jsxs("span",{className:"!text-[#212121] !font-medium !whitespace-nowrap",children:["₹",(t==null?void 0:t.paper_display_price)==null||(t==null?void 0:t.paper_display_price)==="0"?t==null?void 0:t.discount_paper_price:t==null?void 0:t.paper_display_price]}),(t==null?void 0:t.discount_ebook)>0&&e.jsxs("span",{className:`\r
14          !text-[15px] !font-medium !text-white\r
15          !bg-[#08d002]\r
16          !py-1 !px-2.5\r
17          !rounded-[6px]\r
18          !ml-3.5\r
19          md:!ml-0\r
20          [clip-path:polygon(0%_0,_100%_0,_90%_100%,_0_100%)]\r
21          max-md:!p-1\r
22          max-md:!text-[11px]\r
23          !whitespace-nowrap\r
24        `,children:[Math.round(t==null?void 0:t.discount_paper),"% OFF"]})]})})]});ae.propTypes={detail:n.object};const ne=({counter:t,onIncrement:s,onDecrement:a,isOutOfStock:r})=>e.jsxs("div",{className:"flex !items-center max-md:!gap-2 !gap-4 !flex-wrap max-md:!my-3",children:[e.jsx("span",{className:"!text-sm !font-medium !text-[#424242] max-md:!text-[13px]",children:"Quantity"}),e.jsxs("div",{className:"flex items-center overflow-hidden !rounded-lg !border !border-[#007aff]",children:[e.jsx("button",{type:"button",onClick:a,className:`flex !h-10 !w-10 !items-center !justify-center !border-r !border-[#007aff] !bg-[#eff7ff] !text-[#007aff] !transition-colors !duration-150 hover:!bg-[#e0ebf9] cursor-pointer\r
25    max-[767px]:!h-[30px] max-[767px]:!w-[35px]`,children:e.jsx("i",{className:"fa fa-minus text-sm"})}),e.jsx("input",{type:"text",name:"qty",value:t,readOnly:!0,id:"input-qty",className:`!h-10 !w-14 !border-0 !bg-white !text-center !text-lg !font-medium !text-[#212121] !outline-none\r
26    max-[767px]:!h-[30px]`}),e.jsx("button",{type:"button",onClick:s,className:`flex !h-10 !w-10 !items-center !justify-center !border-l !border-[#007aff] !bg-[#eff7ff] !text-[#007aff] !transition-colors !duration-150 hover:!bg-[#e0ebf9] !cursor-pointer\r
27    max-[767px]:!h-[30px] max-[767px]:!w-[35px]`,children:e.jsx("i",{className:"fa fa-plus  !text-sm !text-[#007aff]"})})]}),r&&e.jsx("button",{type:"button",className:"px-6 py-2 bg-[#999] text-white rounded-lg border-0 cursor-not-allowed opacity-60",disabled:!0,children:"Out of Stock"})]});ne.propTypes={counter:n.number.isRequired,onIncrement:n.func.isRequired,onDecrement:n.func.isRequired,isOutOfStock:n.bool.isRequired};const oe=({color:t,selectedColor:s,onSelectColor:a})=>
27e.jsx("div",{className:"!flex !flex-wrap !items-center !gap-3 !py-2 !w-full",children:t.map(r=>e.jsx("button",{type:"button",tabIndex:0,className:`!w-8 !h-8 !rounded-full !border-2 !transition-colors !duration-150 cursor-pointer ${(s==null?void 0:s.color_code)===(r==null?void 0:r.color_code)?"!border-[#007aff] ring-2 !ring-[#007aff] !ring-offset-2":"!border-[#ccc] hover:!border-[#007aff]"}`,onClick:()=>a(r,r==null?void 0:r.id),onKeyDown:l=>l.key==="Enter"&&a(r,r==null?void 0:r.id),style:{backgroundColor:r==null?void 0:r.color_code},"aria-label":`Select color ${r==null?void 0:r.color_code}`},r.id))});oe.propTypes={color:n.array.isRequired,selectedColor:n.object,onSelectColor:n.func.isRequired};const ie=({size:t,selectedType:s,onSelectSize:a})=>e.jsxs("div",{className:"flex items-center !gap-3 max-md:!gap-2 !py-2 !flex-wrap",children:[e.jsx("span",{className:"!text-sm !font-medium !text-[#212121]  max-sm:!mr-1 !mr-2",children:"Size"}),Array.from(new Set([...t.map(r=>r==null?void 0:r.attribute_name),"M","L","XL"])).map(r=>e.jsx("button",{type:"button",className:` max-[767px]:!w-[35px] max-[767px]:!h-[38px]  md:!w-[45px] md:!h-[45px]     !rounded-md !transition-colors !duration-150 !cursor-pointer !font-medium !text-sm ${s===r?"!bg-[#007aff] !text-white !border !border-[#007aff]":"bg-transparent text-[#424242] border border-[#ccc]"}`,onClick:()=>{var l;return a(r,((l=t.find(d=>(d==null?void 0:d.attribute_name)===r))==null?void 0:l.attribute_id)||null)},"aria-pressed":s===r,children:r},r))]});ie.propTypes={size:n.array.isRequired,selectedType:n.string.isRequired,onSelectSize:n.func.isRequired};const le=({isChecked:t,onCheckboxChange:s,price:a,sampleImage:r,customText:l,onTextChange:d})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between !py-3 md:py-5 lg:!py-6 xl:!py-8  flex-wrap ",children:[e.jsxs("div",{className:" !w-full flex items-center  !bg-[linear-gradient(86deg,#007aff,#004c9f_99%)] !p-5 !rounded-t-[20px] max-md:!p-[10px_12px]",children:[e.jsx("img",{src:`${dt}/customsetng.svg`,alt:"Custom",className:"!w-6 !h-6"}),e.jsx("h6",{className:"!text-sm !font-medium !text-[#212121] !m-0",children:"Engraving"})]}),e.jsxs("div",{className:" !w-full flex items-center gap-3 bg-[#e5e5e5]  !p-5 !rounded-b-[20px] max-md:!p-[10px_12px]",children:[t&&e.jsxs("p",{className:"!text-sm !font-semibold !text-[#212121] !m-0",children:["₹ ",a]}),e.jsxs("div",{className:"!flex !items-center !gap-2 !justify-center",children:[e.jsx("input",{type:"checkbox",id:"addTextCheckbox",checked:t,onChange:s,className:"!w-4 !h-4 !accent-[#007aff] !cursor-pointer"}),e.jsx("label",{htmlFor:"addTextCheckbox",className:"!text-sm !text-[#212121] !cursor-pointer !mb-0",children:"Engraving"})]})]})]}),t&&e.jsxs("div",{className:"flex flex-col md:!flex-row !items-center !gap-4 !py-3 max-md:!p-5 !p-10 !bg-[linear-gradient(0deg,#eee,#fafafa_52%,#fff)] !rounded-2xl",children:[e.jsx("div",{className:"!w-16 !h-16 !flex-shrink-0  !rounded-lg  ",children:e.jsx("img",{src:r||"/web/web-logo.webp",alt:"Lab Coat",className:"!border-none ",onError:h=>{h.currentTarget.onerror=null,h.currentTarget.src="/web/web-logo.webp"}})}),e.jsx("input",{type:"text",placeholder:"Add text",value:l,onChange:d,className:`flex-1 w-full !px-4 !py-2 !border !border-[#ccc] !rounded-full !text-sm !text-[#212121] !outline-none focus:!border-[#007aff] \r
28          focus:!ring-2 focus:!ring-[#007aff] !transition-colors !duration-150  !text-base max-md:!text-sm !text-center placeholder:!text-center placeholder:!font-semibold`})]})]});le.propTypes={isChecked:n.bool.isRequired,onCheckboxChange:n.func.isRequired,price:n.oneOfType([n.string,n.number]),sampleImage:n.string,customText:n.string.isRequired,onTextChange:n.func.isRequired};const ce=({productData:t})=>e.jsxs("div",{className:"!mt-4",children:[e.jsx("h3",{className:"!text-lg !font-semibold !text-[#212121] !mb-3 max-md:!text-base",children:"Product Specifications"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsx("table",{className:"w-full !border-collapse",children:e.jsx("tbody",{children:t.map(s=>e.jsxs("tr",{className:"!border !border-[#e8e8e8] last:!border-0",children:[e.jsx("td",{className:"!p-2 !font-medium !text-[#212121] !text-sm !w-1/3",children:s==null?void 0:s.product_feature_heading}),e.jsx("td",{className:"!p-2 !text-[#757575] !text-sm",children:s==null?void 0:s.product_data})]},s.id))})})})]});
28ce.propTypes={productData:n.array.isRequired};const de=({cartStatus:t,isInCart:s,onAddToCart:a,onGoToCart:r,onBuyNow:l,isBuying:d})=>e.jsxs("div",{className:"!flex !items-center !justify-center !flex-wrap !py-4 ",children:[t!==!1&&e.jsx("button",{type:"button",className:`!text-[#212121] !border !border-[#e0e0e0] !bg-[#f5f5f5] !text-[15px] !w-[170px] !py-2.5 !px-0 !rounded-lg !mx-2.5
29         !font-medium !h-[45px] !cursor-pointer max-md:!w-[120px] max-md:!py-2.5 max-md:!px-0 max-md:!my-2.5 max-md:!text-[13px]
30          max-md:!h-auto max-md:!leading-normal 
31        ${s?"!bg-[#e5fce8] !text-[#08D002]":"!bg-[#f5f5f5] !text-[#212121]"}`,onClick:s?r:a,children:s?"Added To Cart":"Add to Cart"}),e.jsx("button",{type:"button",className:` !text-white !bg-[#005fcc] !border-0 !text-[15px] !w-[170px] !py-2.5 !px-0 !rounded-lg !mx-2.5 !font-medium !h-[45px]\r
32     !cursor-pointer !transition-all !duration-300 hover:!bg-[#0056b3] disabled:!opacity-60 disabled:!cursor-not-allowed max-md:!w-[120px] \r
33     max-md:!py-2.5 max-md:!px-0 max-md:!my-2.5 max-md:!text-[13px] max-md:!h-auto max-md:!leading-normal\r
34    `,onClick:l,disabled:d,children:d?e.jsx(at,{className:"!text-white"}):"Buy Now"})]});de.propTypes={cartStatus:n.bool,isInCart:n.bool.isRequired,onAddToCart:n.func.isRequired,onGoToCart:n.func.isRequired,onBuyNow:n.func.isRequired,isBuying:n.bool.isRequired};const St=({setIsAuthenticated:t})=>{var H,W,K,V,Q,Z,X,J;const s=sessionStorage.getItem("id"),{slug:a,id:r}=ut(),l=a.includes("_"),d=r?bt(r):"",h=yt(l,a),b=l?a.split("_")[1]:a,p=d?xt(d):null;c.useEffect(()=>{window.scrollTo({top:0,behavior:"instant"})},[]);const[x,f]=c.useState(),{productId:_}=it(i=>i.medimart),[S,C]=c.useState(!1),[k,O]=c.useState(1),[me,xe]=c.useState(null),[pe,ue]=c.useState(!1),[R,fe]=c.useState([]),[I,he]=c.useState([]),[be,M]=c.useState(null),[ge,_e]=c.useState(null),[je,L]=c.useState(null),[we,ye]=c.useState(null),[o,Ne]=c.useState({}),[ve,ke]=c.useState(null),[Te,G]=c.useState("S"),[z,Se]=c.useState(""),[Ce,Ae]=c.useState("0"),[Re,Ie]=c.useState(null),B=ft(),[qe,Ee]=c.useState(null),[Pe,Oe]=c.useState(!1),[q,Me]=c.useState([]),[A,$]=c.useState([]),[Le,D]=c.useState(!1),[Ge,ze]=c.useState(!0),[Be,$e]=c.useState(!1),U=async i=>{if(!s){localStorage.setItem("redirectAfterLogin",globalThis.location.pathname+globalThis.location.search),C(!0);return}const{data:u}=await T.post(N.MEDIMART.GET_USER_CART_DATA,{user_id:s});localStorage.setItem("subID",i.id);const g=gt(i),{attribute_id:j,color_id:w}=_t(i,we,je,ge,be),y=jt({userId:s,prod:i,variant:g,attribute_id:j,color_id:w,counter:k,crosdealId:x,partner_id:p,customText:z,customDesign:Re,allData:o});await wt({axiosInstance:T,userId:s,prod:i,requestData:y,cartData:u,crossale:ve,navigate:B,toast:P})},De=()=>{C(!1)},Ue=()=>{C(!1)},[v,Fe]=c.useState(()=>{const i=`${globalThis.location.pathname}_selectedColor`;return localStorage.getItem(i)||null}),He=(i,u)=>{Fe(i),_e(u),$(o.banner.filter(g=>g.color_id===u)),M(null)},We=(i,u)=>{G(i),ye(u),L(null)},Ke=()=>{O(k+1)},Ve=()=>{k!==1&&O(k-1)},Qe=i=>{const{value:u,error:g}=kt(i.target.value);if(g){P.error(g);return}Se(u),Ie(u)};c.useEffect(()=>{s&&Tt(s,_).then(({status:i,isInCart:u})=>{Ee(i),Oe(u)}).catch(console.error)},[s,_]);const Ze=async()=>{var i,u,g,j,w,y,Y,ee,te;try{const{data:m}=await T.post(N.MEDIMART.GET_ECOMM_PRODUCT_DETAILE,vt({condition:h,userId:s,productId:_,parameter:b,partnerId:p}));ze(!1),Ne(m.data),fe(m.data.available_size),he(m.data.color),M((u=(i=m==null?void 0:m.data)==null?void 0:i.color[0])==null?void 0:u.id),L((j=(g=m==null?void 0:m.data)==null?void 0:g.available_size[0])==null?void 0:j.attribute_id),G((y=(w=m==null?void 0:m.data)==null?void 0:w.available_size[0])==null?void 0:y.attribute_name),Me(m.data.product_faeture),$((Y=m==null?void 0:m.data)==null?void 0:Y.banner),Ae((te=(ee=m==null?void 0:m.data)==null?void 0:ee.detail)==null?void 0:te.is_customizable)}catch(m){globalThis.__APP_LOGGER__.log(m)}};c.useEffect(()=>{Ze()},[]);const Xe=()=>{ue(i=>!i)},F=`${globalThis.location.href}`,Je=()=>{navigator.clipboard.writeText(F).then(()=>{rt.open({message:e.jsxs("span",{children:[e.jsx(ot,{className:"mr-2"}),e.jsx("span",{children:"Link copied to clipboard!"})]}),duration:2,placement:"bottom"})}).catch(i=>{globalThis.__APP_LOGGER__.log("Failed to copy: ",i)})}
34,Ye=`https://web.whatsapp.com/send?text=${encodeURIComponent(F)}`,et=()=>{window.open(Ye,"_blank")},tt=async()=>{if(E){P.error("Product is out of stock");return}D(!0);try{await U(o==null?void 0:o.detail)}finally{D(!1)}},st=i=>{$e(i.target.checked)};c.useEffect(()=>{T.post(N.MEDIMART.GET_USER_CART_DATA,{user_id:s}).then(i=>{var g,j,w,y;const u=(j=(g=i==null?void 0:i.data)==null?void 0:g.data)==null?void 0:j.cross_sale_deal_attachment_product;f((y=(w=i==null?void 0:i.data)==null?void 0:w.data.cross_sale_deal_attachment_product[0])==null?void 0:y.cross_deal_id),ke(Array.isArray(u)&&u.length>0?u.length:null)}).catch(i=>globalThis.__APP_LOGGER__.log(i))},[s]);const E=Nt(o==null?void 0:o.detail);return e.jsxs("div",{className:"w-full float-left bg-[#fafafa]",children:[e.jsx(nt,{pageType:"Product",referenceId:_}),e.jsxs(lt,{children:[e.jsx("meta",{property:"og:type",content:"product"}),e.jsx("meta",{property:"og:title",content:((H=o==null?void 0:o.detail)==null?void 0:H.title)||""}),e.jsx("meta",{property:"og:description",content:((W=o==null?void 0:o.detail)==null?void 0:W.book_description)||""}),e.jsx("meta",{property:"og:url",content:`https://damsdelhi.com/damspublication/${a}`}),e.jsx("meta",{property:"og:image",content:((K=A==null?void 0:A[0])==null?void 0:K.images)||((V=o==null?void 0:o.detail)==null?void 0:V.image)||""}),e.jsx("meta",{property:"og:site_name",content:"DAMS"})]}),e.jsx("div",{className:"page-content position-relative ",children:e.jsx("div",{className:"breadcrumb-row  ",children:e.jsx("div",{className:"container  ",children:e.jsxs("ul",{className:"list-inline",children:[e.jsx("li",{children:e.jsx("a",{href:"/",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/medimart",children:"Medimart"})}),e.jsx("li",{children:"Product Description"})]})})})}),e.jsx(mt,{type:5}),Ge?e.jsx(ht,{}):e.jsx("section",{className:" max-sm:!py-6 max-md:!py-7 md:!py-8 lg:!py-10 ",children:e.jsxs("div",{className:"tw-container",children:[e.jsxs("div",{className:"flex flex-col md:!flex-row  md:!self-start",children:[e.jsx("div",{className:" !w-full md:!w-1/2  md:!sticky md:!top-[100px] md:!self-start",children:e.jsx(re,{bannerData:A,image:me,setImage:xe,color:I,selectedColor:v,shareOpen:pe,onToggleShare:Xe,onWhatsapp:et,onCopyLink:Je})}),e.jsxs("div",{className:"!w-full  max-md:!mt-5 md:!ml-8 xl:!ml-10 ",children:[e.jsxs("div",{className:" max-md:!p-2.5 !border !border-[#cccccc82] !p-2.5 !rounded-[9px] !bg-white",children:[e.jsx("p",{className:"xl:!text-lg !font-medium !text-[#212121] m-0 max-md:!text-xs  md:!text-base  max-md:!leading-5 md:!py-2 ",children:(Q=o==null?void 0:o.detail)==null?void 0:Q.title}),(v==null?void 0:v.color)&&e.jsxs("p",{className:"text-sm text-[#757575]",children:["(",v.color,")"]}),e.jsx(ae,{detail:o==null?void 0:o.detail}),e.jsx(ne,{counter:k,onIncrement:Ke,onDecrement:Ve,isOutOfStock:E})]}),e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex flex-wrap mt-3",children:[o!=null&&o.color&&I.length>0?e.jsx(oe,{color:I,selectedColor:v,onSelectColor:He}):null,R&&R.length>0?e.jsx(ie,{size:R,selectedType:Te,onSelectSize:We}):null]}),Ce==="1"&&e.jsx(le,{isChecked:Be,onCheckboxChange:st,price:(Z=o==null?void 0:o.detail)==null?void 0:Z.customize_proudct_price,sampleImage:(X=o==null?void 0:o.detail)==null?void 0:X.sample_image,customText:z,onTextChange:Qe}),e.jsx("div",{className:"flex flex-wrap",children:e.jsx("div",{className:"w-full !py-3 md:py-5 lg:!py-6 xl:!py-8",children:e.jsxs("div",{className:" !bg-[linear-gradient(0deg,#eee,#fafafa_52%,#fff)] !p-2.5 md:!p-3.5    !rounded-2xl",children:[e.jsxs("div",{className:"",children:[e.jsx("h3",{className:"!text-lg !font-semibold !text-[#212121] !mb-3 max-md:!text-base  007af",children:"Product Description"}),e.jsx("ul",{className:`!text-sm !text-[#424242] !text-justify !leading-6 !list-none !p-0 !leading-[26px] max-md:!text-xs \r
35                            [&_p]:!text-[#757575] [&_p]:!font-normal [&_p]:!mb-2.5 [&_p]:!leading-6\r
36                            [&_span]:!text-[#424242]\r
37\r
38                            [&_li]:!relative [&_li]:!pl-5 [&_li]:!mb-2 [&_li]:!text-[#424242] [&_li]:!leading-6\r
39                            [&_li::before]:!content-[''] [&_li::before]:!absolute [&_li::before]:!left-0 [&_li::before]:!top-[10px]\r
40                            [&_li::before]:!w-1 [&_li::before]:!h-1 [&_li::before]:!rounded-full [&_li::before]:!bg-[#424242]\r
41                            [&_li::before]:!flex-shrink-0   \r
42\r
43                            md:[&_li]:!pl-6 md:[&_li]:!mb-2.5 \r
44                            md:[&_li::before]:!w-1.5 md:[&_li::before]:!h-1.5 md:[&_li::before]:!top-[10px]\r
45                            md:[&_p]:!mb-3\r
46                            \r
47                            lg:[&_li]:!pl-7 lg:[&_li]:!mb-3 \r
48                            lg:[&_li::before]:!w-2 lg:[&_li::before]:!h-2 lg:[&_li::before]:!top-[11px]\r
49                            lg:[&_p]:!mb-3.5\r
50                            \r
51                            [&_li_strong]:!text-[#212121] [&_li_strong]:!font-semibold\r
52                            [&_p_strong]:!text-[#212121] [&_p_strong]:!font-semibold`,dangerouslySetInnerHTML:{__html:pt.sanitize((J=o==null?void 0:o.detail)==null?void 0:J.book_description)}})]}),q&&q.length>0?e.jsx(ce,{productData:q}):null]})})})]})]})]}),e.jsx("div",{className:"flex !flex-wrap",children:e.jsxs("div",{className:"w-full",children:[!E&&e.jsx(de,{cartStatus:qe,isInCart:Pe,onAddToCart:()=>U(o==null?void 0:o.detail),onGoToCart:()=>B("/addToCart"),onBuyNow:tt,isBuying:Le}),S&&e.jsx(ct,{handlerClose:De,setIsAuthenticated:t,handleSignInSuccess:Ue,setSignInModalOpen:C,targeturl:globalThis.location.pathname+globalThis.location.search})]})})]})})]})};St.propTypes={setIsAuthenticated:n.func.isRequired};export{St as default};

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.