File: /var/www/html/public/static/js/hookUserB-6950a06d.js
import{addCompanyWeb as lt,getdaysClander as rt,bookingOrderWeb as dt,getHealthFormDataWeb as ut,submitHealthFormModelWeb as _t,bookingCheckIn as mt,submitNoteFormWeb as gt,getCompanyListWeb as ft,getUserAssocDetailWeb as pt,getTherapistDetailWeb as ht,bookingCustomerSchduleListWeb as yt,bookingAmountCalculteWeb as vt,yuyueFDF as bt,getNoteFormWeb as wt,deleteCompanyWeb as Dt,bookingSchduleWeb as kt,bookingDetailClientWeb as St,bookingPaymentWeb as At,bookingDelete as Ct}from"./po-7a0a44a1.js";import{d as De,u as Tt}from"./vue-router-a383d220.js";import{b7 as r}from"./message-2472a54a.js";import{o as R}from"./index-81e4a901.js";import{r as o,A as l,o as Ot}from"./runtime-core.esm-bundler-6128546f.js";import"./index-3e40fd7d.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function Ht(){De(),Tt(),De();const ae=o(),m=o(!1),H=o(!1),z=o(!1),q=o([]),d=o([]),ke=o(!1),ne=o(!1),K=o(!1),Y=o(!1),se=o(!1),oe=o(!1),ce=o(!1),x=o(!1),E=o(!1),U=o(!1),le=o(!1),re=o(""),v=o(""),V=o(""),de=o(""),Se=o(le),N=o(""),G=o([]),f=o([]),Z=o([]),Ae=o([]),h=o([]),Q=o([]),ue=o([]),Ce=o([]),_e=o([]),X=o([]),Te=l({}),Oe=l({}),xe=l({}),Ee=l({}),Ne=l({}),je=l({}),We=l({}),Pe=l({}),Ie=l({});l({});const Be=l({}),Le=o([{id:1,text:"<500m",value:"500m"},{id:2,text:"<1km",value:"1km"},{id:3,text:"<3km",value:"3km"},{id:4,text:"<5km",value:"5km"},{id:5,text:"<10km",value:"10km"},{id:6,text:">10km",value:"larger10km"},{id:7,text:"All",value:"all"}]),j=l({name:"",today_date:"",hear_about:"",chief_complaint:"",rashes_bruise:!1,address:"",Birth:"",Code_ZIP:"",Occupation:"",Phone:"",Work_Phone:"",Physician:"",Phone1:"",City:""}),me=l({tableIndex:0,note:""}),W=l({signal_url:"",form_type:"",note_id:""}),t=l({loacation_id:"",loacation_name:"",Client_name:"",Client_id:"",date:"",time:"",service_name:"Massage",Therapist_name:"",Therapist_id:"",Therapist_id1:"",comment:"",During:60,gender:-1,description:"",service_times:"",config_id:"",dateInfo:"",Terapist:"",checkbox:!1,is_items:!1,Clinic_id:"",Location_id:"",amount:"",service_name1:"",next_page:"",prev_page:"",page:1,allow_code:"",allow_times_time:"",allow_times_mins:"",booking_id:""}),a=l({SignatureValue:"Please sign in the mini program",time:"",note_id:"",signal_url1:"",signal_url2:"",signal_desc1:"",signal_desc2:"",form_type:"",sensitived_url:"",sensitived_desc:"",ougoing_url1:"",ougoing_url2:"",ougoing_url3:"",ougoing_url4:"",ougoing_url5:"",ougoing_desc1:"",ougoing_desc2:"",ougoing_desc3:"",ougoing_desc4:"",ougoing_desc5:"",userId1:"",formInfo1:"",formInfo2:"",formInfo3:"",formInfo4:"",formInfo5:"",imgView:"",service_name:"",Therapist_name:"",date:0,month:"",action:"",click_date:"",checked1:!1,therapist_name:"",userId:"",is_additional:"",is_form_history:2,is_historyAll:2,is_form_edit:1}),b=l({plan:"",date:"",daily_living:"",treatment_goal:"",focus_treatment:"",frequency:"",duration:"",performed:"",assessments:"",schedule:"",responses:"",recommended:"",hydrotherapy:"",contraindications:"",referrals:"",discussed_with:"",treatment_plan:"",checkedCities:""}),u=l({notes:"",date:"",time:"",duration:"",fee:"",assessment:"",therapist:"",findings:"",feedback:"",self_care:"",timeType:"",durationType:"",receivedType:""}),D=l({name:"",name1:"",indication:"",client_name:"",date:"",checkedCities:""}),k=l({date1:"",date2:"",date3:"",date4:"",date5:""}),ge=o([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),fe=o([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),$=o([{id:1,text:"am",value:"am",is_selected:0},{id:2,text:"pm",value:"pm",is_selected:0}]),pe=o([{id:1,text:"min.",value:"min",is_selected:0},{id:2,text:"hr.",value:"hr",is_selected:0}]),P=o([{id:1,name:"Chest Wall Muscles (not including breasts)",is_selected:0},{id:2,name:"Breast (s)",is_selected:0},{id:3,name:"Buttocks (gluteal muscles)",is_selected:0},{id:4,name:"Upper Inner Thigh(s)",is_selected:0}]),I=o([{id:1,name:"back",is_selected:0},{id:2,name:"neck",is_selected:0},{id:3,name:"shoulders",is_selected:0},{id:4,name:"face",is_selected:0},{id:5,name:"arm L R",is_selected:0},{id:6,name:"leg L R",is_selected:0},{id:7,name:"hip area",is_selected:0},{id:8,name:"abdominals",is_selected:0},{id:9,name:"chest",is_selected:0},{id:10,name:"breast",is_selected:0},{id:11,name:"other (list)",is_selected:0}]),B=o([{id:1,name:"Swedish",is_selected:0},{id:2,name:"Frictions",is_selected:0},{id:3,name:"deep facial",is_selected:0},{id:4,name:"trigger points",is_selected:0},{id:5,name:"stretch",is_selected:0},{id:6,name:"intra-oral",is_selected:0},{id:7,name:"Breast",is_selected:0},{id:8,name:"Hydrotherapy",is_selected:0},{id:9,name:"joint mobilization grade: ",is_selected:0},{id:10,name:"other (list) ",is_selected:0}]),he=o([{id:1,text:"Yes",value:"yes",is_selected:0},{id:2,text:"No",value:"no",is_selected:0}]),L=o([{id:1,name:"back",is_selected:0},{id:2,name:"neck",is_selected:0},{id:3,name:"shoulders",is_selected:0},{id:4,name:"face",is_selected:0},{id:5,name:"arm L R",is_selected:0},{id:6,name:"leg L R",is_selected:0},{id:7,name:"gluteus",is_selected:0},{id:8,name:"abdominals",is_selected:0},{id:9,name:"chest",is_selected:0},{id:10,name:"breast",is_selected:0},{id:11,name:"other (list)",is_selected:0}]),S=l({company_name:"",first_name:"",last_name:"",phone:"",email:"",address:"",state:"Ontraio",city:"",hst:"",r_ac:"",rmt_register:"",country:"Canada",postal:"L3S 0E2",company_id:"",number_companyname:""});l({destination_comp:"",state:"",city:"",address:"",phone:"",contact:"",customer_id:""});const ee=l({name:"",id:""}),ie=l({name:"",id:"",Therapist_id:""}),Je=l({}),Fe=l({}),Me=l({}),Re=l({}),He=l({}),ze=l({}),qe=l({}),Ke=l({}),Ye=l({qo_item_str:"",name:"",address:"",way:"",shipping:[],itemsDetail:[],trackingNo:"",courier:"",comment:""}),w=l({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),Ue=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Avatar",prop:"avatar",minWidth:100,slot:"Avatar",align:"center",hide:({checkList:e})=>!e.includes("Avatar")},{label:"Clinic Name",prop:"clinic_name",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Name")},{label:"Descprion",prop:"descprion",minWidth:100,hide:({checkList:e})=>!e.includes("Descprion")},{label:"Distance Meters",prop:"distance_meters",minWidth:100,hide:({checkList:e})=>!e.includes("Distance Meters")},{label:"Create name",prop:"hst",minWidth:100,slot:"Createname",hide:({checkList:e})=>!e.includes("Create name")},{label:"Address",prop:"address",minWidth:100,hide:({checkList:e})=>!e.includes("Address")},{label:"Clinic Web",prop:"clinic_web",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Web")},{label:"Phone",prop:"phone_number",minWidth:100,slot:"Phone",hide:({checkList:e})=>!e.includes("Phone")},{label:"Email",prop:"email",minWidth:100,hide:({checkList:e})=>!e.includes("Email")},{label:"Business Time",minWidth:100,slot:"BusinessTime",hide:({checkList:e})=>!e.includes("Business Time")},{label:"Therapists",prop:"Therapist_str",minWidth:100,hide:({checkList:e})=>!e.includes("Therapists")},{label:"Service name",prop:"service_name",minWidth:100,hide:({checkList:e})=>!e.includes("Service name")},{label:"Invitation code",prop:"invitation_code",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Invitation code")},{label:"HST",prop:"hst",minWidth:100,hide:({checkList:e})=>!e.includes("HST")}],Ve=["勾选列","Avatar","Clinic Name","Descprion","Distance Meters","Create name","Address","Clinic Web","Phone","Email","Business Time","Therapists","Service name","Invitation code","HST"],_=l({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",bookingorder_id:"",room:"",current_jindu:"",current_weidu:"",clinic_name:"",is_distance:"all"});function Ge(){J()}function Ze(e){w.pageSize=e,T()}function Qe(e){w.currentPage=e,T()}const Xe=(e,i)=>{if(e.length>1){const s=e.shift(),{toggleRowSelection:n}=ae.value.getTableRef();n(s,!1)}ve(i.id),_.clinic_name=i.clinic_name,z.value=!1};function $e(e){me.tableIndex=e}function ei(){Object.keys(S).map(e=>{S[e]=""}),x.value=!0}async function ii(){const{data:e}=await lt(Object.assign(Je,{data_row:S}));e.code==1?(J(),x.value=!1,r({type:"success",message:e.msg})):r({type:"error",message:e.msg})}function ti(e){Object.keys(e).map(i=>{S[i]=e[i]}),x.value=!0}async function ai(e){const{data:i}=await Dt(Object.assign(Fe,{company_id:e.id}));i.code==1?(J(),r({type:"success",message:i.msg})):r({type:"error",message:i.msg})}const ni=e=>{R.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{ai(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function si(){var e=new Date,i=e.getFullYear(),s=("0"+(e.getMonth()+1)).slice(-2),n=("0"+e.getDate()).slice(-2);V.value=i+"-"+s+"-"+n}async function oi(){const{data:e}=await kt(Object.assign(Oe,{date:V}));re.value="max-height:"+window.innerHeight+"px",e.code==1}function ci(){oi()}async function A(e){a.action=e;const{data:i}=await rt(Object.assign(xe,{month:a.month,action:a.action,click_date:a.click_date,many_one:"one"}));i.code==1&&(a.month=i.month,_e.value=i.data,N.value=i.higher_days[0],e!=1&&p())}function li(e){a.click_date=e.date,a.action="",A(a.action),F()}async function C(e){const{data:i}=await St(Object.assign(Be,{bookingorder_id:e}));i.code==1?(v.value=i.data,a.is_additional="",i.data.clients.additional_Service&&i.data.clients.additional_Service.forEach((s,n)=>{s.is_Selected&&(a.is_additional=1)}),H.value=!0):r({type:"error",message:i.msg})}function ri(){se.value=!0}function di(){ce.value=!0}function ui(){t.loacation_name=ie.name,t.loacation_id=ie.id}function _i(){t.Client_id=ee.id,t.Client_name=ee.name}function mi(){oe.value=!0}async function gi(){if(m.value=!0,t.allow_code==0){r({type:"error",message:"Appointment cannot be made during this time period"}),m.value=!1;return}if(t.During>t.allow_times_mins){r({type:"error",message:"Max Mins: "+t.allow_times_mins}),m.value=!1;return}if(!t.checkbox){r({type:"error",message:"Please read the Privacy Policy and check the box"}),m.value=!1;return}const{data:e}=await dt(Object.assign(Re,{clinics_id:t.Clinic_id,therapist_list:t.Therapist_id,description:t.description,service_date:t.date,service_times:t.service_times,amount:t.amount,first_name:"",last_name:"",phone:"",email:"",config_id:t.config_id,add_session:"",during:t.During,sex:t.gender,customer_id:t.Client_id,company_id:t.Location_id,Description_type:t.service_name1,owner_booking:"Y",mul_service:y,additional_Service:f.value,booking_id:t.booking_id}));e.code==1?(m.value=!1,p(),t.booking_id&&C(t.booking_id),E.value=!1):(m.value=!1,r({type:"error",message:e.msg}))}async function fi(e){j.name=e.clients.customer_name,a.userId1=e.clients.customer_id;const{data:i}=await ut(Object.assign(He,{customer_id:e.clients.customer_id}));i.code==1&&(q.value=i.model.health_info,Object.keys(i.model.information).map(s=>{j[s]=i.model.information[s]}),Y.value=!0)}async function pi(){m.value=!0;let e={information:j,health_info:q.value};const{data:i}=await _t(Object.assign(ze,{customer_id:v.value.clients.customer_id,data_row:e}));i.code==1?(r({type:"success",message:i.msg}),C(v.value.clients.id),Y.value=!1,m.value=!1):(r({type:"error",message:i.msg}),m.value=!1)}function hi(e){_.bookingorder_id=e.clients.id,U.value=!0}async function yi(){if(_.room==""){r({type:"error",message:"Please fill in the room"});return}const{data:e}=await mt(Object.assign(qe,{bookingorder_id:_.bookingorder_id,room:_.room}));e.code==1?(p(),U.value=!1,r({type:"success",message:e.msg})):r({type:"error",message:e.msg})}async function vi(e){const{data:i}=await At(Object.assign(Ke,{bookingorder_id:e.clients.id}));i.code==1?(p(),r({type:"success",message:i.msg})):r({type:"error",message:i.msg})}const bi=e=>{R.confirm("Are you sure to payment?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{vi(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function wi(e){e.clients.is_more=2}function Di(e){e.clients.is_more=1}async function ye(e){let i={detail:"",imageurl:""},s={detail:""};if(a.form_type=="informed"){let g={information:a.time,signal_desc1:a.signal_desc1,signal_desc2:a.signal_desc2},O={signal_url1:a.signal_url1,signal_url2:a.signal_url2};i.detail=g,i.imageurl=O}if(a.form_type=="treatment_plan"){let g={pendingProcessing:L,information:b};s.detail=g}if(a.form_type=="treatment_note"){let g={information:u,usedData:B,areasData:I};s.detail=g}if(a.form_type=="sensitived"){let g={information:D,initialData:P,sensitived_desc:a.sensitived_desc},O={signal_url1:a.sensitived_url};i.detail=g,i.imageurl=O}if(a.form_type=="ougoing"){let g={information:k,ougoing_desc1:a.ougoing_desc1,ougoing_desc2:a.ougoing_desc2,ougoing_desc3:a.ougoing_desc3,ougoing_desc4:a.ougoing_desc4,ougoing_desc5:a.ougoing_desc5},O={signal_url1:a.ougoing_url1,signal_url2:a.ougoing_url2,signal_url3:a.ougoing_url3,signal_url4:a.ougoing_url4,signal_url5:a.ougoing_url5};i.detail=g,i.imageurl=O}let n="";a.form_type=="treatment_plan"||a.form_type=="treatment_note"?n=s:(a.form_type=="informed"||a.form_type=="sensitived"||a.form_type=="ougoing")&&(n=i);const{data:c}=await gt(Object.assign(Ne,{note_id:a.note_id,form_type:a.form_type,data_row:n}));c.code==1?e==1&&(p(),C(v.value.clients.id),K.value=!1,r({type:"success",message:c.msg})):r({type:"error",message:c.msg})}function ki(e,i){ge.value.forEach((s,n)=>{s.is_selected=0}),e.is_selected=1,b.discussed_with=e.value}function Si(e,i){fe.value.forEach((s,n)=>{s.is_selected=0}),e.is_selected=1,b.treatment_plan=e.value}function Ai(e){e.is_selected==1?e.is_selected=0:e.is_selected=1}function Ci(e){e.is_selected==1?e.is_selected=0:e.is_selected==0&&(e.is_selected=1)}function Ti(e){e.is_selected==1?e.is_selected=0:e.is_selected=1}function Oi(e){e.is_selected==1?e.is_selected=0:e.is_selected=1}function xi(e,i){$.value.forEach((s,n)=>{s.is_selected=0}),e.is_selected=1,u.timeType=e.value}function Ei(e,i){pe.value.forEach((s,n)=>{s.is_selected=0}),e.is_selected=1,u.durationType=e.value}function Ni(e,i){he.value.forEach((s,n)=>{s.is_selected=0}),e.is_selected=1,u.receivedType=e.value}const y=o([{id:1,date:"",time:"",duration:60}]);function ji(){let e={id:y.value.length+1,time:"",date:t.date,duration:60};y.value.push(e)}function Wi(e){let i=y.value.findIndex(s=>s.id===e.id);i!==-1&&y.value.splice(i,1),y.value.forEach((s,n)=>{s.id=n+1})}const Pi=e=>{R.confirm("Are you sure you want to delete this item ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{Wi(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function Ii(e,i){W.signal_url=i,W.form_type=e,W.note_id=a.note_id,ye(2),ne.value=!0}function Bi(){be(de.value,a.form_type)}async function J(){m.value=!0;const{data:e}=await ft(Object.assign(Te,{searchKey:_.searchKey,Therapist_id:t.Therapist_id1}));G.value=e.data,m.value=!1}function Li(e){if(h.value.length==1)return;e.is_Selected==1?e.is_Selected=0:e.is_Selected=1;let i=[],s=[];h.value.forEach((n,c)=>{n.is_Selected==1&&(i.push(n),s.push(n.service_name))}),t.service_name=s.toString(),d.value=i,d.value.forEach((n,c)=>{c==0?(n.is_Selected1=1,t.service_name1=n.service_name):n.is_Selected1=0}),p()}function Ji(e){d.value.forEach((i,s)=>{i.is_Selected1=0}),e.is_Selected1=1,t.service_name1=e.service_name,e.additional_Service?f.value=JSON.parse(JSON.stringify(e.additional_Service)):f.value=[],M()}function Fi(){M()}async function T(){const{data:e}=await pt(Object.assign(je,{pageSize:w.pageSize,page:w.currentPage,current_jindu:_.current_jindu,current_weidu:_.current_weidu,searchKey:_.searchKey,distance_meters:_.is_distance}));e.code==1?(ue.value=e.data.therapist_info,G.value=e.data.clinic_info,t.Clinic_id=e.data.clinic_info[0].id,w.total=e.data.total,F()):r({type:"error",message:e.msg})}async function F(){const{data:e}=await ht(Object.assign(We,{clinic_id:t.Clinic_id,therapists_id:t.Therapist_id1,date:N.value,is_worktime:1}));if(e.code==1){Q.value=e.data.location_info,h.value=e.data.services_info,t.Location_id=e.data.location_info[0].id,t.loacation_name=e.data.location_info[0].company_name,e.data.location_info[0].is_Selected1=1,h.value.length>0&&(h.value[0].is_Selected=1);let i=[],s=[];h.value.forEach((n,c)=>{n.is_Selected==1&&(i.push(n),s.push(n.service_name))}),d.value=i,t.service_name=s.toString(),d.value.length>0&&(d.value[0].is_Selected1=1,t.service_name1=d.value[0].service_name,d.value[0].additional_Service?f.value=JSON.parse(JSON.stringify(d.value[0].additional_Service)):f.value=[])}else(t.Clinic_id==""||t.Therapist_id1=="")&&p(),r({type:"error",message:e.msg})}function ve(e){t.Clinic_id=e,t.Therapist_id1="",F()}function Mi(e){t.Clinic_id="",_.clinic_name="",t.Therapist_id1=e,F()}function Ri(e){t.Location_id=e,Q.value.forEach((i,s)=>{e==i.id&&(t.loacation_name=i.company_name)})}async function p(){const{data:e}=await yt(Object.assign(Me,{date:N.value,services_array:t.service_name,clinic_id:t.Clinic_id,therapists_id:t.Therapist_id1,page:t.page}));e.code==1?(X.value=e.data.content,Z.value=e.data.title,a.therapist_name=e.data.therapist_name,t.next_page=e.page_data.next_page,t.prev_page=e.page_data.prev_page,J()):(Z.value=[],a.therapist_name="",X.value=[],r({type:"error",message:e.msg}))}async function M(){d.value.forEach((i,s)=>{i.value==t.service_name1&&i.id});const{data:e}=await vt(Object.assign(Ie,{descrption:t.service_name1,Therapist_id:t.Therapist_id,during:t.During,customer_id:"",role:"",clinic_id:t.Clinic_id,service_id:"",additional_Service:f.value}));e.code==1?(t.amount=e.total_amount,t.During=e.during):r({type:"error",message:e.msg})}function Hi(){a.prev_page==-2&&(a.click_date=a.last_day,a.action="click",A(a.action)),t.prev_page>0&&(t.page=t.prev_page,p())}function zi(){a.next_page==-2&&(a.click_date=a.next_day,a.action="click",A(a.action)),t.next_page>0&&(t.page=t.next_page,p())}function qi(e){e.clients.is_24hour==1?alert(e.clients.is_notice):onDelBooking1(e)}function Ki(){M()}async function Yi(e){m.value=!0;const{data:i}=await Ct(Object.assign(Pe,{booking_id:e.clients.id}));i.code==1?(H.value=!1,p(),r({type:"success",message:i.msg})):r({type:"error",message:i.msg}),m.value=!1}const Ui=e=>{R.confirm("Are you sure you want to delete this booking ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{Yi(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function Vi(e){if(e.status=="free"){t.is_items=!1,y.value=[];let i={id:1,date:e.date,time:"",duration:60};t.Therapist_name=e.therapists_name,t.Therapist_id=e.therapists_id,t.service_times=e.time,t.date=e.date,E.value=!0,t.allow_code=e.allow_code,t.allow_times_time=e.allow_times.end_time,t.allow_times_mins=e.allow_times.mins,y.value.push(i);let s=[];h.value.forEach((n,c)=>{n.is_Selected==1&&s.push(n)}),d.value=s,d.value.length>0&&(d.value.forEach((n,c)=>{n.is_Selected1=0}),d.value[0].is_Selected1=1,t.service_name1=d.value[0].service_name,d.value[0].additional_Service?f.value=JSON.parse(JSON.stringify(d.value[0].additional_Service)):f.value=[]),t.config_id="",t.checkbox=!1,t.During=60,t.description="",t.booking_id="",M()}e.status=="new"&&C(e.clients.id)}function Gi(e){t.Therapist_name=e.therapists_name,t.Therapist_id=e.therapists_id,t.loacation_name=e.clients.company_name,t.loacation_id=e.clients.company_id,d.value=JSON.parse(JSON.stringify(h.value)),t.service_name1=e.clients.description_type,d.value.forEach((i,s)=>{i.is_Selected1=0,t.service_name1==i.value&&(i.is_Selected1=1),e.clients.additional_Service?f.value=e.clients.additional_Service:f.value=[],t.date=e.date,t.service_times=e.time,t.During=e.clients.session,t.amount=e.clients.amount,t.description=e.clients.description,t.allow_times_time=e.allow_times.data.end_time,t.allow_times_mins=e.allow_times.data.mins,t.allow_code=e.allow_times.code,t.checkbox=!0,t.booking_id=e.clients.id}),E.value=!0}function Zi(e,i){i.is_selected==1?i.is_selected=0:i.is_selected==0&&(i.is_selected=1)}function Qi(e,i,s){e.code==1&&(p(),C(v.value.clients.id),r({type:"success",message:"Upload successful"}))}function Xi(e){window.open(bt+e.replace("/var/www/html/public",""))}function be(e,i){we(e,i,1)}function $i(e,i){we(e,i,2)}async function we(e,i,s){a.is_form_edit=1,s==2&&(i=="sensitived"||i=="informed")&&(a.is_form_edit=2),de.value=e,s==1?a.note_id=e.clients.note_id:s==2&&(a.note_id=e.id),a.form_type=i;const{data:n}=await wt(Object.assign(Ee,{note_id:a.note_id,form_type:i}));n.code==1?(K.value=!0,a.form_type=="informed"?(n.data.content?(a.time=n.data.content.information,a.signal_desc1=n.data.content.signal_desc1,a.signal_desc2=n.data.content.signal_desc2):a.time="",a.signal_url1=n.data.signal_url1,a.signal_url2=n.data.signal_url2):a.form_type=="treatment_plan"?n.data.content?(Object.keys(n.data.content.information).map(c=>{b[c]=n.data.content.information[c]}),L.value=n.data.content.pendingProcessing):(Object.keys(b).map(c=>{b[c]=""}),L.value.forEach((c,g)=>{c.is_selected=0})):a.form_type=="treatment_note"?(n.data.content?(I.value=n.data.content.areasData,B.value=n.data.content.usedData,Object.keys(n.data.content.information).map(c=>{u[c]=n.data.content.information[c]})):(Object.keys(u).map(c=>{u[c]=""}),I.value.forEach((c,g)=>{c.is_selected=0}),B.value.forEach((c,g)=>{c.is_selected=0})),n.is_first&&(u.fee=e.clients.amount,u.duration=e.clients.session,u.time=e.clients.begin_time,u.date=e.date,u.notes=e.clients.customer_name,u.client_goal=e.clients.description,$.value.forEach((c,g)=>{c.is_selected=0,c.text==e.clients.am_pm&&(c.is_selected=1,u.timeType=c.value)}))):a.form_type=="sensitived"?(n.data.content?(P.value=n.data.content.initialData,a.sensitived_desc=n.data.content.sensitived_desc,Object.keys(n.data.content.information).map(c=>{D[c]=n.data.content.information[c]})):(Object.keys(D).map(c=>{D[c]=""}),P.value.forEach((c,g)=>{c.is_selected=0})),a.sensitived_url=n.data.signal_url1):a.form_type=="ougoing"&&(n.data.content?(a.ougoing_desc1=n.data.content.ougoing_desc1,a.ougoing_desc2=n.data.content.ougoing_desc2,a.ougoing_desc3=n.data.content.ougoing_desc3,a.ougoing_desc4=n.data.content.ougoing_desc4,a.ougoing_desc5=n.data.content.ougoing_desc5,Object.keys(n.data.content.ougoingArr).map(c=>{k[c]=n.data.content.ougoingArr[c]})):(Object.keys(k).map(c=>{k[c]=""}),a.ougoing_desc1="",a.ougoing_desc2="",a.ougoing_desc3="",a.ougoing_desc4="",a.ougoing_desc5=""),a.ougoing_url1=n.data.signal_url2,a.ougoing_url2=n.data.signal_url3,a.ougoing_url3=n.data.signal_url4,a.ougoing_url4=n.data.signal_url5,a.ougoing_url5=n.data.signal_url6),u.therapist=e.therapists_name):r({type:"error",message:n.msg})}function et(e){a.is_historyAll=e,v.value.clients.other_note_detail.forEach((i,s)=>{e==1?(i.is_informed=!0,i.is_ongoning=!0,i.is_sensitive=!0,i.is_treatment_note=!0,i.is_treatment_plan=!0,i.is_record=!0):e==2&&(i.is_informed=JSON.parse(JSON.stringify(i.is_informed_show)),i.is_ongoning=JSON.parse(JSON.stringify(i.is_ongoning_show)),i.is_sensitive=JSON.parse(JSON.stringify(i.is_sensitive_show)),i.is_treatment_note=JSON.parse(JSON.stringify(i.is_treatment_note_show)),i.is_treatment_plan=JSON.parse(JSON.stringify(i.is_treatment_plan_show)),i.is_record=JSON.parse(JSON.stringify(i.is_record_show)))})}function it(){a.is_form_history==1?a.is_form_history=2:a.is_form_history=1}function tt(){z.value=!0}const te=o(null),at=async()=>{try{if(navigator.permissions){const{state:i}=await navigator.permissions.query({name:"geolocation"});if(i==="denied")throw new Error("PERMISSION_DENIED")}const e=await nt();te.value={latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy},_.current_jindu=te.value.longitude,_.current_weidu=te.value.latitude}catch(e){}finally{}},nt=()=>new Promise((e,i)=>{navigator.geolocation.getCurrentPosition(s=>e(s),s=>i(s),{enableHighAccuracy:!0,timeout:3e4,maximumAge:0})});function st(){T()}function ot(e){_.is_distance=e.value,T()}function ct(e){window.open(e)}return Ot(()=>{T(),at(),si(),A(1)}),{searchDetail:_,btnSearchPart:Ge,loading:m,small:le,selectList:Ve,columns:Ue,pagination:w,handleSizeChange:Ze,handleCurrentChange:Qe,PartList:G,deliverDialog:ke,selectClick:Xe,deliverDataArr:Ye,btnDeliverConfirm:ii,itemArr:me,onSituationArr:$e,addLocationDialog:x,btnAdd:ei,locationArr:S,EditLocation:ti,btnDellocation:ni,BookingInfoData:X,Terapist:Z,get_table_box:re,bookingDate:V,serverDate:ci,formArr:a,calendarData:_e,loadDaysClander:A,onDay:li,addBookingDialog:E,onAddBooking:Vi,addForm:t,goPrivacy:ri,PrivacyDialog:se,ClientDialog:oe,eventIsNum:_i,ClientData:ee,locationDialog:ce,eventIsNumlocation:ui,locationData:ie,onSelectLocation:di,onSelClient:mi,btnAddConfirm:gi,serviceData:h,onHealthForm:fi,health_info:q,infoData:Ae,healthDialog:Y,btnHealthConfirm:pi,onCheckIn:hi,addDuringDialog:U,addDuringConfirm:yi,onPaymant:bi,higher_days:N,onMore:wi,onRetract:Di,formDialog:K,Form1Edit:be,planArr:b,noteArr:u,sensitivedArr:D,ougoingArr:k,isData:ge,isData1:fe,TimeData:$,DurationData:pe,initialData:P,areasData1:I,usedData1:B,receivedData1:he,treatedData:L,submitNoteForm:ye,selectedTr:ki,selectedTr1:Si,btnInitia:Ai,coatingRequire:Ci,coatingRequire1:Ti,coatingRequire2:Oi,onTime:xi,onDuration:Ei,onReceived:Ni,items:y,onDelete:Pi,onAddItem:ji,autographDialog:ne,openAutograph:Ii,signalData:W,eventSignal:Bi,singleTableRef:ae,addServiceData:d,onServiceAdd:Li,TherapistsData:ue,ClinicData:Ce,btnClinic:ve,locationDataselect:Q,btnTherapist:Mi,btnLocation:Ri,onServiceAdd1:Ji,btnDuring:Fi,onArrowLeft:Hi,onArrowRight:zi,onDelBooking:qi,size:Se,additionalService:f,changeAdditional:Ki,bookingDetailDialog:H,bookedArr:v,btnDelBooking:Ui,btnEdit:Gi,HealthArr:j,onHealth:Zi,uploadSlotFile1:Qi,btnFormImgView:Xi,btnFillout:et,btnHistory:it,onNotesForm:$i,clinicDialog:z,selectClinic:tt,onSearchKey:st,distanceMeters:Le,onDistance:ot,viewIMG:ct}}export{Ht as useEqu};