PageSourceSearch

https://sklep.mindhealth.pl/_nuxt/JWSZaJl1.js

js mindhealth.pl collected 2026-09-25 05:59:21 UTC 4,447 bytes, 1 lines download raw bytes

1import{u as V,a as L,_ as R}from"./RO_oCkml.js";import{gP as $,hB as D,hD as I,hC as w,t as M,b as O,i5 as z,e as H,$ as v,hf as W,i6 as j,d as E,gZ as F,gM as G}from"#entry";import{_ as U}from"./DEz-VUOd.js";import{_ as Y}from"./D-uFUcIh.js";import{m as P,d as Z,A as J,x as K,b9 as b,ba as x,bh as _,H as a,c0 as Q,br as X,b3 as T,b as ee,u as p,C as te,b1 as i,b7 as oe,G as ae,b4 as S}from"./BHj63JdW.js";import{a as ne}from"./BIAj8JYz.js";import"./DlAUqK2U.js";import"./DB_VoSSJ.js";import"./CJvsS0h8.js";import"./Cpj98o6Y.js";import"./836GI_BY.js";const re=P({__name:"AddToCart",setup(N){const t=$(),l=D(),s=I(),m=w(),{notify:k,notifyError:C}=M(),{t:y}=O(),n=Z(!1),f=async()=>{const{slot:e}=await v("/api/slots/getSlotDetails",{query:{date:t.query.date,clinic:t.query.clinic,doctor:t.query.doctor,region:t.query.region,specialty:t.query.specialty,vendor:t.query.vendor}});return e},g=e=>t.query.reservation_id?t.query.date?{appointmentsDate:String(t.query.date),reservationId:String(t.query.reservation_id),duration:Number(t.query.duration),clinic:{code:String(t.query.clinic??""),description:""},doctor:{code:String(t.query.doctor??""),description:String(t.query.doctor_name??"")},region:{code:String(t.query.region??""),description:""},specialty:{code:String(t.query.specialty??""),description:String(t.query.utm_content??"")},vendor:{code:String(t.query.vendor??""),description:""},ageFrom:t.query.age_from?Number(t.query.age_from):null,ageTo:t.query.age_to?Number(t.query.age_to):null}:null:e?{appointmentsDate:e.date,duration:e.duration,clinic:{code:e.clinic?.code??"",description:e.clinic?.description??""},doctor:{code:e.doctor?.code??"",description:e.doctor?.description??""},region:{code:e.region?.code??"",description:e.region?.description??""},specialty:{code:e.specialty?.code??"",description:e.specialty?.description??""},vendor:{code:e.vendor?.code??"",description:e.vendor?.description??""}}:null,q=(e,o)=>{if(!("reserveData"in e)||!e.reserveData)return!1;const{appointmentsDate:c,duration:d,clinic:r,doctor:u,specialty:A,vendor:B}=e.reserveData;return c===o.appointmentsDate&&d===o.duration&&r?.code===o.clinic.code&&u?.code===o.doctor.code&&A?.code===o.specialty.code&&B?.code===o.vendor.code},h=e=>j(m.value).some(o=>q(o,e));return J(async()=>{let e=null;t.query.variant_code&&(await z(),H().$queuePromise(async()=>{try{l.value++,n.value=!0;const o=await v("/api/product-variant/getVariantId",{query:{variant_code:t.query.variant_code}});switch(o?.product?.__typename){case"AppointmentProduct":case"AppointmentWithDoctorProduct":case"PackagedServiceProduct":{const c=ne[o.product.__typename],d=t.query.reservation_id?null:await f(),r=g(d);if(!r){k({content:y("Your appointment date is unfortunately not available. Please search again"),variant:"error"});break}if(h(r))break;const u={variantId:o.variant?.variant_id??0,quantity:1,productTypeData:{[c]:{reserveData:r}}};e=(await v("/api/basket/add",{method:"post",body:{typename:o?.product?.__typename,...u,basketId:s.value}})).basket;break}case"PhysicalProduct":{e=(await v("/api/basket/add",{method:"post",body:{basketId:s.value,variantId:o?.variant?.variant_id,quantity:1}})).basket;break}}e&&(s.value=e.basketId,await K(),m.value=e,k({content:y("Added to cart PROD",{product:o?.product?.name}),variant:"success"}))}catch(o){C(o)}finally{l.value--,n.value=!1}}))}),(e,o)=>{const c=Q,d=W,r=E;return b(),x(r,{modelValue:p(n),"onUpdate:modelValue":o[0]||(o[0]=u=>ee(n)?n.value=u:null)},{default:_(()=>[a(d,{class:"text-primary-500 flex max-w-80 gap-2"},{default:_(()=>[a(c,{class:"size-6"}),X(" "+T(e.$t("Please wait")),1)]),_:1})]),_:1},8,["modelValue"])}}}),ce=Object.assign(re,{__name:"CheckoutWidgetAddToCart"}),ie={class:"flex min-h-screen flex-col"},se={class:"relative border-b"},de={class:"sticky top-0 z-100 h-1"},ue={class:"bg-primary-500 py-2 break-words text-white sm:px-4"},pe={class:"container text-sm"},xe=P({__name:"checkout",setup(N){const t=F(),l=D(),s=I(),m=w();return V(),(k,C)=>{const y=R,n=L,f=G,g=U,q=Y,h=ce;return b(),te(ae,null,[i("div",ie,[i("header",se,[i("div",{class:oe(["container flex justify-center py-4",{"pointer-events-none":p(m)?.isReadOnly}])},[a(y)],2),a(f,null,{default:_(()=>[a(n)]),_:1})]),i("div",de,[a(f,null,{fallback:_(()=>[p(s)?(b(),x(g,{key:0})):S("",!0)]),default:_(()=>[p(l)?(b(),x(g,{key:0})):S("",!0)]),_:1})]),a(q),i("footer",ue,[i("p",pe,T(p(t)?.config?.storeConfig?.copyright),1)])]),a(h)],64)}}});
1export{xe 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.