PageSourceSearch

https://univers.ph/_nuxt/BGxEYygF.js

js univers.ph collected 2026-10-01 23:53:46 UTC 2,629 bytes, 1 lines download raw bytes

1import I from"./DMzx58iQ.js";import{_ as K}from"./CYwy5q5M.js";import{_ as P}from"./D6Y0ded2.js";import{u as q,_ as G}from"./266f0qLN.js";import{_ as H}from"./1-qlIMh8.js";import J from"./Dq2Hkpct.js";import{f as Q,g as U,r as c,h as W,i as y,o as s,c as b,a,b as l,w as g,j as n,k as _,F as h,l as X,d as Y}from"./yOJj5uNE.js";import{u as Z}from"./VSNg6JR7.js";import{u as ee}from"./QCFukRM2.js";import{g as te}from"./DJIia-oI.js";import"./DwHmOvlT.js";import"./CPuWFeW3.js";import"./CU1OwxUW.js";import"./BV650Hjl.js";import"./C-8QKdr8.js";import"./DlAUqK2U.js";const oe={class:"mb-8"},ne={class:"flex items-center space-x-2"},se=a("p",{class:"underline"},"BACK",-1),ae={class:"flex items-center justify-between mb-8"},ie=a("h3",{class:"text-h3 font-medium"},"Add New Address",-1),we=Q({__name:"create",setup(re){const x=U(),{addToast:k,removeToast:A,visibleToasts:w}=Z(),{createAddress:B}=ee(),{fetchProvinces:C,provinces:T,fetchCities:$,cities:O,fetchBarangays:F,barangays:E}=q(),i=c(!1),u=c({}),e=c({type:null,label:null,first_name:null,last_name:null,email:null,mobile_number:null,province_id:null,city_id:null,barangay_id:null,address_line:null,zip_code:null,longitude:"0.00",latitude:"0.00",is_default:!1}),d=async()=>{e.value.province_id&&(await $(e.value.province_id),e.value.city_id=0,e.value.barangay_id=0)},m=async()=>{e.value.city_id&&(await F(e.value.city_id),e.value.barangay_id=0)},N=async()=>{i.value=!0;try{const{data:r,error:o}=await B(e.value);r.value?x.push("/account/address-book"):u.value=te(o.value)}catch{k({title:"Failed to create address",duration:5e3})}finally{i.value=!1}};return W(async()=>{await C()}),y(()=>e.value.province_id,d),y(()=>e.value.city_id,m),(r,o)=>{var p,f,v;const S=I,V=K,L=P,j=G,D=H,M=J;return s(),b(h,null,[a("div",oe,[l(V,{class:"inline-block",to:"/account/address-book"},{default:g(()=>[a("div",ne,[l(S,{name:"heroicons:chevron-left"}),se])]),_:1})]),a("div",ae,[ie,l(L,{onClick:o[0]||(o[0]=t=>N())},{default:g(()=>[Y("SAVE ADDRESS")]),_:1})]),n(i)?(s(),_(D,{key:1})):(s(),_(j,{key:0,form:n(e),errors:n(u),provinceOptions:((p=n(T))==null?void 0:p.options)||[],cityOptions:((f=n(O))==null?void 0:f.options)||[],barangayOptions:((v=n(E))==null?void 0:v.options)||[],onFetchCities:o[1]||(o[1]=t=>d()),onFetchBarangays:o[2]||(o[2]=t=>m())},null,8,["form","errors","provinceOptions","cityOptions","barangayOptions"])),(s(!0),b(h,null,X(n(w),(t,R)=>(s(),_(M,{key:R,title:t.title,actionText:t.actionText,duration:t.duration,onClose:z=>n(A)(t),onAction:z=>t.onAction&&t.onAction()},null,8,["title","actionText","duration","onClose","onAction"]))),128))],64)}}});export{we 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.