PageSourceSearch

https://www.tiketux.com/_nuxt/usePaymentReservation.ChyYu4Hj.js

js tiketux.com collected 2026-09-24 09:48:40 UTC 3,404 bytes, 1 lines download raw bytes

1import{p as z}from"./payment.B7WSibdY.js";import{u as A}from"./useVoucherStore.BJNm1o5G.js";import{u as B}from"./useReservationStore.BzNWGGnC.js";import{C as I,R as N,V as O,W as V,F as G,ag as q,B as J,n as _}from"./f_G1Uo6f.js";import{u as K}from"./useDetailReservation.DAEz-Fbk.js";import{a9 as Y,ar as $,w as H,r as o,c as h}from"./vendor-vueuse.u2VY2iEt.js";import{u as Q}from"./useReservationFetch.DWzWOEJ-.js";const U="WEB",ne=()=>{const{$api:g}=Y(),{listPaymentReservation:R,changePaymentMethod:C}=z(g),p=A(),t=B(),i=o(null),s=o(""),n=o([]),v=o(!1),r=o(!1),m=o(!1),b=I(),f=N(),u=O(),{track:F}=V(),{setDetailReservation:k}=K(),{showDialogChangePrice:S}=Q(),{t:d}=G(),w=q(),y=J(),c=h(()=>{const e=y.params.code||y.query.code;try{return e?atob(e):""}catch{return e??""}}),M=async()=>{m.value=!0;const e=t.detailReservation?.sub_total||0;try{const a=await R({reservasi_kode:c.value,amount:e,voucher_kode:p.voucherApplied?.code??""});t.listPaymentReservation=a}catch(a){console.log(a,"error fetch payment reservation list")}finally{m.value=!1}},D=async()=>{r.value=!0;try{const e=await C({jenis_pembayaran_kode:t.selectedPaymentMethod?.code||"",reservasi_kode:c.value,device_id:w.userAgent,client_type:U});e.error_code=="DRSV-3"&&u.info({message:d("alert.failedChoosePaymentMethod"),position:"bottomCenter",backgroundColor:"black",maxWidth:1e3,messageColor:"#FFFFFF",titleSize:"14"}),e.status=="ERROR"&&u.info({message:d("alert.failedChangePaymentMethod"),position:"bottomCenter",backgroundColor:"black",maxWidth:1e3,messageColor:"#FFFFFF",titleSize:"14"}),e.status=="OK"&&(u.info({message:d("alert.successChoosePaymentMethod"),position:"bottomCenter",backgroundColor:"black",maxWidth:1e3,messageColor:"#FFFFFF",titleSize:"14"}),F("payment_selected_reservation",{search_payment:s.value,selected_payment_method:t?.selectedPaymentMethod?.name??"",confirmation_payment_click:!0}),t.selectedPaymentMethod=null,P.value?(await k(),b.back()):(r.value=!0,await _(f({name:"detail-order",params:{code:btoa(c.value)}})),r.value=!1))}catch(e){console.log(e,"error change payment method")}finally{r.value=!1}},L=e=>{v.value=e},T=h(()=>s.value.trim()?n.value:t.listPaymentReservation?.list_jenis_pembayaran||[]),W=e=>{if(i.value?.kode===e?.kode){i.value=null,t.selectedPaymentMethod=null;return}const a={code:e?.kode||"",name:e?.nama||"",fee:e?.admin_fee||0,typeFee:e?.tipe_admin_fee||""};t.selectedPaymentMethod=a,i.value=e,p.voucherReward=null},j=e=>{let a=[];try{return a=JSON.parse(e),a[0].step??[]}catch{return a}},P=h(()=>y.path.includes("change-payment")),x=()=>{S.value=!1,_(f({name:"confirmation-order",params:{code:btoa(t.reservationCode)}}))};return $(s,()=>{const e=t.listPaymentReservation?.list_jenis_pembayaran;if(!e){n.value=[];return}const a=s.value.toLowerCase().trim();n.value=a?e.map(l=>({...l,list:l.list.filter(E=>E.nama?.toLowerCase().includes(a))})).filter(l=>l.list.length>0):e},{debounce:300,immediate:!0}),H(()=>t.listPaymentReservation,()=>{t.listPaymentReservation?.list_jenis_pembayaran&&(n.value=t.listPaymentReservation.list_jenis_pembayaran)},{immediate:!0}),{setPaymentReservation:M,selectedPayment:i,searchPayment:s,listPaymentSearch:n,paymentStep:j,setSelectedPayment:W,showDialogConfirmation:v,setShowDialogConfirmation:L,setChangePaymentMethod:D,isLoading:r,isLoadingFetchList:m,isChangePaymentRoute:P,filteredPayment:T,redirectToPayment:x,reservationCode:c}};export{ne as u};

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.