PageSourceSearch

https://wbk-assets.webook.com/0.7.8.2/assets/index-BazHAE3i.js

js webook.com collected 2026-10-03 20:44:48 UTC 4,956 bytes, 1 lines download raw bytes

1import{j as s}from"./@wbk/hooks-FtCTMeyH.js";import{u as b,S as N}from"./index-DZ2Htu0z.js";import{L as j,r as k}from"./vendor-Cc9w-i99.js";import{cg as y}from"./@wbk/queue-8-09eRJS.js";import{T as o,t as _,B as f,l as w}from"./@wbk/ui-DZdD23Ta.js";import{af as O,ag as h,ak as S,aQ as L}from"./@wbk/svg-Bua7FxzL.js";import{a as E}from"./evisa-C4JgXFxe.js";import{u as m}from"./react-i18next-Dxy0wzdl.js";import"./i18next-Ce0fiPMx.js";import"./i18next-http-backend-C2uFdLra.js";import"./i18next-browser-languagedetector-Bv2FoO1s.js";import"./@wbk/logger-DfNVpG3P.js";import"./react-helmet-BcOPeyN0.js";import"./@wbk/analytics-B-_ZPhJq.js";import"./@wbk/contentful-C-wfS48z.js";import"./@wbk/config-DuwrGB8a.js";import"./react-hook-form-D_m77UuM.js";import"./@wbk/auth-Djoddyo0.js";import"./@wbk/currency-BxlCDaIM.js";import"./@wbk/api-DFKMxA3e.js";import"./@wbk/ticketing-Og7zkUfp.js";import"./@wbk/payment-cL5x8D1N.js";import"./@wbk/flights-Cjxxns74.js";import"./@wbk/hotels-CFdSoV_6.js";import"./@smc/ads-C1pDiBF5.js";import"./@wbk/auction-CsNezADS.js";const P=()=>s.jsx("div",{className:"bg-body-dark/10 h-40 animate-pulse rounded-md xl:h-32"}),T=({status:t,className:a,showIcon:e=!0})=>{const{t:i}=m("booking"),r=E(t),n=i(r==="success"?"booking:evisa.status_approved":r==="failed"?"booking:evisa.status_failed":r==="action_required"?"booking:evisa.require_update":"booking:evisa.status_processing");return s.jsx("div",{className:_("w-fit",a),children:r==="success"?s.jsxs(o,{variant:"label-S",color:"success",className:"flex items-center gap-1",children:[e&&s.jsx(O,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{children:n})]}):r==="failed"?s.jsxs(o,{variant:"label-S",color:"error",className:"flex items-center gap-1",children:[e&&s.jsx(h,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{children:n})]}):r==="action_required"?s.jsxs(o,{variant:"label-S",color:"notice",className:"flex items-center gap-1",children:[e&&s.jsx(h,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{children:n})]}):s.jsxs(o,{variant:"label-S",className:"flex items-center gap-1 text-blue-500",children:[e&&s.jsx(S,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),s.jsx("span",{children:n})]})})},I=({order:t})=>{var i;const{t:a}=m(["booking"]),e=((i=t.counts)==null?void 0:i.total)??0;return s.jsx(f,{className:"flex w-full flex-col items-start justify-start px-1 text-start",theme:"action",shape:"text",as:j,to:`/profile/bookings/evisa/${t.order_id}`,children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"rounded-S h-24 w-24 shrink-0 overflow-hidden",children:s.jsx(w,{src:"/images/evisa/hero.png",alt:a("booking:evisa.package_title"),className:"rounded-S h-full w-full object-cover"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(o,{variant:"body-S",color:"text-secondary",children:a("booking:evisa.package_type")}),s.jsx(o,{variant:"label-L",className:"line-clamp-2",children:a("booking:evisa.package_title")}),s.jsx(o,{variant:"body-S",strong:!0,className:"capitalize",color:"text-secondary",children:a("booking:evisa.travelers",{count:e})})]}),s.jsx(T,{status:t.status,className:"border-0 bg-transparent p-0"})]})]})})},g=({orders:t,title:a})=>s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-base capitalize",children:a}),s.jsx("ul",{className:"space-y-6",children:t.map(e=>s.jsx("li",{children:s.jsx(I,{order:e})},e.id))})]}),q=()=>{const{locale:t}=b(),{t:a}=m(["booking","common","profile"]),{data:e,isLoading:i,error:r}=y({lang:t}),{pastOrders:n,upcomingOrders:d}=k.useMemo(()=>{var x;const l=[],p=[],v=Date.now();for(const c of e||[]){const u=c.trip_start_date||((x=c.flight_summary)==null?void 0:x.depart_at_date);(u?new Date(u).getTime()<v:!1)?p.push(c):l.push(c)}return{pastOrders:p,upcomingOrders:l}},[e]);return i?s.jsx("div",{className:"space-y-4 py-4",children:[1,2,3,4].map(l=>s.jsx(P,{},l))}):r?s.jsx("div",{className:"mx-auto max-w-xl p-4 pb-12",children:s.jsxs("div",{className:"space-y-8 shadow-md",children:[s.jsx(o,{color:"error",variant:"heading-M",className:"text-center",children:(r==null?void 0:r.message)||a("common:unknown_error")}),s.jsx("div",{className:"mx-auto w-full max-w-xs",children:s.jsx(f,{as:j,to:`/${t}`,theme:"action",shape:"outlined",className:"w-full text-lg",children:a("common:go_home")})})]})}):e!=null&&e.length?s.jsxs("div",{className:"space-y-10 px-0.5",children:[d.length>0&&s.jsx(g,{orders:d,title:a("profile:upcoming_bookings")}),n.length>0&&s.jsx(g,{orders:n,title:a("profile:past_bookings")})]}):s.jsxs("div",{className:"px-4 py-8 text-center",children:[s.jsx("div",{className:"mx-auto flex items-center justify-center rounded-full",children:s.jsx(L,{className:"text-text-primary h-12 w-12"})}),s.jsx(o,{variant:"heading-L",className:"py-3",children:a("booking:evisa.no_applications")})]})},ns=()=>{const{t}=m();return s.jsxs(s.Fragment,{children:[s.jsx(N,{title:t("profile:my_bookings")}),s.jsx(q,{})]})};export{ns 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.