1import{d as G,ar as R,s as S,f as I,h as Q,r as C,o as y,k as g,w as u,as as q,ao as H,e as a,b as f,m as L,B as J,j as b,a as K,R as W,t as X,Q as Z,l as ee,a8 as T}from"./DIRkIRWB.js";import{_ as ae,a as te}from"./CEVKOmmi.js";import{_ as re}from"./rnE1g2z2.js";import{a as se}from"./BvHRGukz.js";import{_ as oe}from"./BfYEpJcq.js";import{_ as ue}from"./YaJdc0zA.js";import{_ as ie}from"./JVYuG2wt.js";import{_ as z}from"./Bd5-BPWv.js";import{u as le}from"./DZaGo95G.js";import{_ as ne}from"./DQa3KIq6.js";import"./BySLqogL.js";import"./ZeFnSFAq.js";import"./D6dOeW3N.js";import"./DlAUqK2U.js";import"./i0Zhayvw.js";import"./Cd76Yl2q.js";import"./P6pD3OVm.js";import"./C0d0QLjF.js";import"./BxBvvXoE.js";import"./DE3IOLBM.js";import"./DKcOAgYu.js";import"./A6Qg0GQ8.js";import"./CBYHVi5_.js";import"./D1C5anRm.js";const de={class:"container-sm md:py-6 max-md:p-0"},fe={class:"grid gap-4"},me={class:"grid gap-4"},ce={class:"grid grid-cols-3 gap-4"},De=G({__name:"features",setup(ve){const k=R(),{fetchedFeaturesOptions:E,fetchedFeaturesOptionsPending:P}=S(k),B=le(),{escortFeaturesData:s}=S(B);I();const D=Q(),{formState:e}=S(D),O=C([]),Y=C(!0),_=C(!1);async function N(){var i,t,l,r,o,n,d,m,c,v,p,h,F;await Promise.all([k.fetchFeaturesOptions(),B.fetchEscortFeatures()]),e.value.userFeatures={dateOfBirthFull:void 0,dateOfBirthMonth:void 0,dateOfBirthYear:void 0,gender:void 0,ethnicity:void 0,nationality:void 0,languages:[],skinColor:void 0,breastSize:void 0,hairColor:void 0,hairLength:void 0,eyeColor:void 0,bodyType:void 0,dressSize:void 0,cupSize:void 0},e.value.userFeatures.dateOfBirthFull=(i=s.value)==null?void 0:i.dateOfBirth,e.value.userFeatures.gender=(t=s.value)==null?void 0:t.gender,e.value.userFeatures.ethnicity=(l=s.value)==null?void 0:l.ethnicity,e.value.userFeatures.nationality=(r=s.value)==null?void 0:r.nationality,e.value.userFeatures.languages=((o=s.value)==null?void 0:o.languages)??[],e.value.userFeatures.skinColor=(n=s.value)==null?void 0:n.skinColor,e.value.userFeatures.breastSize=(d=s.value)==null?void 0:d.breastSize,e.value.userFeatures.hairColor=(m=s.value)==null?void 0:m.hairColor,e.value.userFeatures.hairLength=(c=s.value)==null?void 0:c.hairLength,e.value.userFeatures.eyeColor=(v=s.value)==null?void 0:v.eyeColor,e.value.userFeatures.bodyType=(p=s.value)==null?void 0:p.bodyType,e.value.userFeatures.dressSize=(h=s.value)==null?void 0:h.dressSize,e.value.userFeatures.cupSize=(F=s.value)==null?void 0:F.cupSize,Y.value=!1,j()}N();function j(){const i=q().year(),t=[],l=i-65,r=i-18;for(let o=r;o>=l;o--)t.push(o);O.value=t}async function A(){var n,d,m,c,v,p,h,F,$,x,w,M,U,V;_.value=!0;const i=(n=e.value.userFeatures)==null?void 0:n.dateOfBirthMonth,t=(d=e.value.userFeatures)==null?void 0:d.dateOfBirthYear,r={date_of_birth:`01/${i}/${t}`,gender:(m=e.value.userFeatures)==null?void 0:m.gender,ethnicity:(c=e.value.userFeatures)==null?void 0:c.ethnicity,nationality:(v=e.value.userFeatures)==null?void 0:v.nationality,languages:(p=e.value.userFeatures)==null?void 0:p.languages,skin_color:(h=e.value.userFeatures)==null?void 0:h.skinColor,breast_size:(F=e.value.userFeatures)==null?void 0:F.breastSize,hair_color:($=e.value.userFeatures)==null?void 0:$.hairColor,hair_length:(x=e.value.userFeatures)==null?void 0:x.hairLength,eye_color:(w=e.value.userFeatures)==null?void 0:w.eyeColor,body_type:(M=e.value.userFeatures)==null?void 0:M.bodyType,dress_size:(U=e.value.userFeatures)==null?void 0:U.dressSize,cup_size:(V=e.value.userFeatures)==null?void 0:V.cupSize},{error:o}=await B.updateEscortFeatures(r);o?T.error():T.success(),_.value=!1}return(i,t)=>{const l=H;return y(),g(l,{name:"account"},{default:u(()=>[Y.value?(y(),g(a(oe),{key:0,"full-page":""})):(y(),g(a(ue),{key:1,title:"My Features",description:"You can change and add information about you. Changes will be automatically saved."},{sidebar:u(()=>[f(a(ie))]),actions:u(()=>[f(a(ne),{size:"sm",variant:"outline",class:"max-md:w-full",onClick:J(A,["prevent"]),disabled:_.value,loading:_.value},{default:u(()=>[L(" Confirm Changes ")]),_:1},8,["disabled","loading"])]),default:u(()=>[b("div",de,[f(a(z),{title:"Date of Birth",description:"Please select your Date of birth",class:"md:mb-4"},{default:u(()=>[b("div",fe,[f(a(ae),{years:O.value,"onUpdate:years":t[0]||(t[0]=r=>O.value=r),"date-of-birth-full":a(e).userFeatures.dateOfBirthFull,"onUpdate:dateOfBirthFull":t[1]||(t[1]=r=>a(e).userFeatures.dateOfBirthFull=r),"date-of-birth-month":a(e).userFeatures.dateOfBirthMonth,"onUpdate:dateOfBirthMonth":t[2]||(t[2]=r=>a(e).userFeatures.dateOfBirthMonth=r),"date-of-birth-year":a(e).userFeatures.dateOfBirthYear,"onUpdate:dateOfBirthYear":t[3]||(t[3]=r=>a(e).userFeatures.dateOfBirthYear=r)},null,8,["years","date-of-birth-full","date-of-birth-month","date-of-birth-year"])])]),_:1}),f(a(z),{title:"Gender",description:"Please select your Gender",class:"md:mb-4"},{default:u(()=>{var r;return[b("div",me,[b("div",ce,[a(P)?ee("",!0):(y(!0),K(Z,{key:0},W((r=a(E))==null?void 0:r.results.gender,(o,n)=>(y(),g(a(re),{id:"gender-"+n,name:"gender",value:o,modelValue:a(e).userFeatures.gender,"onUpdate:modelValue":t[4]||(t[4]=d=>a(e).userFeatures.gender=d),customLabelClass:"before:!hidden justify-center"},{default:u(()=>[L(X(a(se)("gender",o)),1)]),_:2},1032,["id","value","modelValue"]))),256))])])]}),_:1}),f(a(z),{title:"Additional Information",description:"Please provide as many as possible information."},{default:u(()=>[f(a(te))]),_:1})])]),_:1}))]),_:1})}}});
1export{De 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.