PageSourceSearch

https://lidomatrip.com/_next/static/chunks/pages/my-trips-c86d5cae860cfa6c.js

js lidomatrip.com collected 2026-10-02 20:27:53 UTC 27,516 bytes, 22 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[925,4649],{98717:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-trips",function(){return n(24777)}])},85468:function(e,t,n){"use strict";n.d(t,{Gt:function(){return c},H5:function(){return u},gK:function(){return o},mi:function(){return l},p1:function(){return d}});var r=n(68668),i=n(92752),s=n(57149),a=n(57170);let l=(e,t)=>{if(e===r.f.HOST_APPROVAL)return{name:"در انتظار تأیید میزبان",icon:"icon-Timer",iconPathInDesktop:"/assets/reserve_states/hostApproval.svg",stateDescription:` مهمان حداکثر 1 ساعت مهلت دارد تا با پرداخت صورتحساب رزرو خود را قطعی کند. در پایان مهلت مقرر
2        رزرو بصورت خودکار لغو می شود.`,bgColor:"bg-warning",textColor:"text-warning"};if(e===r.f.SECOND_PAYMENT)return{name:"در انتظار پرداخت",icon:"icon-Timer",iconPathInDesktop:"/assets/reserve_states/secondPayment.svg",stateDescription:`    مهمان حداکثر 1 ساعت مهلت دارد تا با پرداخت صورتحساب رزرو خود را قطعی کند. در پایان مهلت مقرر
3        رزرو بصورت خودکار لغو می شود.`,bgColor:"bg-warning",textColor:"text-blue-main"};if(e===r.f.DONE)return{name:"رزرو قطعی",icon:"icon-Success",iconPathInDesktop:"/assets/reserve_states/done.svg",stateDescription:`ضمن قدردانی از تلاش شما برای ثبت خاطره ای شیرین برای میهمانان ، امیدواریم تلاشهای تیم لیدوما
4        در کنار شما موجب رونق صنعت گردشگری و ارتقاء سطح رفاه هموطنان عزیز شود.`,bgColor:"bg-success",textColor:"text-green-main"};if(e===r.f.CANCEL){if(t===i.w.HOST_CANCELLED)return{name:"لغو شده توسط میزبان",icon:"icon-Error",iconPathInDesktop:"/assets/reserve_states/cancel.svg",stateDescription:` توجه: رد یا منقضی شدن هر درخواست رزرو، موجب کاهش امتیاز میزبانی شما می شود. این امر به تدریج
5          موجب کاهش بازدید، کاهش رزرو و کاهش درآمد شما می شود. درصورت ادامه روند فوق اقامتگاه معلق شده
6          و از لیست نمایش حذف می شود.`,bgColor:"bg-error-light",textColor:"text-error-light"};if(t===i.w.GUEST_CANCELLED)return{name:"لغو شده توسط مهمان",icon:"icon-Error",iconPathInDesktop:"/assets/reserve_states/cancel.svg",bgColor:"bg-error-light",textColor:"text-error-light"};if(t===i.w.LIDOMA_CANCELLED)return{name:"لغو شده توسط لیدوما",icon:"icon-Error",iconPathInDesktop:"/assets/reserve_states/cancel.svg",bgColor:"bg-error-light",textColor:"text-error-light"}}else if(e===r.f.EXPIRED)return{name:"منقضی شده",icon:"icon-Error",iconPathInDesktop:"/assets/reserve_states/cancel.svg",bgColor:"bg-error-light",textColor:"text-error-light"}},o=async()=>{let e=await s.Z.setUrl("/api/reservations/mine").setCallMethod("GET").call();return(null==e?void 0:e.status)!=="success"?e:{status:"success",params:(0,a.EI)((null==e?void 0:e.data)||[])}},c=async e=>{let{order_id:t,reason:n}=e,r=`/api/reservations/${t}/cancel`;return s.Z.setUrl(r).setCallMethod("POST").setParams({reason:n}).call()};async function d(){var e;let t=await s.Z.setUrl("/api/reservations/pending-count").setCallMethod("GET").call();return(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.count)??0}let u=async e=>{let t=await s.Z.setUrl(`/api/reservations/${e}/cancel-quote`).setCallMethod("GET").call();return(null==t?void 0:t.status)==="success"?t.data:null}},57170:function(e,t,n){"use strict";n.d(t,{E3:function(){return v},EI:function(){return m},tY:function(){return h}});let r={HOST_APPROVAL:"host_approval",SECOND_PAYMENT:"second_payment",DONE:"done",CANCEL:"cancel",EXPIRED:"expired"},i={HOST_CANCELLED:"cancelled_by_host",LIDOMA_CANCELLED:"cancelled_by_lidoma",GUEST_CANCELLED:"cancelled_by_guest"};
6function s(e){return r[e]||String(e||"").toLowerCase()}function a(e){if(e)return i[e]||void 0}function l(e){if(e)return"BOOMGARDI"===e?"boomgardi":"HOTEL"===e?"hotel":"suit"}function o(e){return(e.rooms||[]).map(e=>{var t,n,r;return{id:null===(t=e.room)||void 0===t?void 0:t.id,name:(null===(n=e.room)||void 0===n?void 0:n.name)||"",image_url:(null===(r=e.room)||void 0===r?void 0:r.image)||""}})}function c(e){return e?String(e).slice(0,10):""}function d(e){let t=(null==e?void 0:e.type)==="PROVINCE";return{cityRow:t?null:e,provinceRow:t?e:(null==e?void 0:e.parent)??null}}function u(e){var t,n,r,i,u,m,v,h,p,x;let g=(null===(t=e.residence)||void 0===t?void 0:null===(n=t.images)||void 0===n?void 0:null===(r=n[0])||void 0===r?void 0:r.url)||"",{cityRow:_,provinceRow:b}=d(null===(i=e.residence)||void 0===i?void 0:i.location);return{id:e.id,reference:e.reference,state:s(e.state),cancelled_by:a(e.cancelledBy),start_date:c(e.startDate),end_date:c(e.endDate),expiry_date:e.expiryDate||"",days_count:e.daysCount??0,days_to_start:0,guests_count:e.guestsCount??0,extra_guests_count:e.extraGuestsCount??0,total_amount:f(e),host_share:e.hostShare??0,customer:{name:(null===(u=e.guest)||void 0===u?void 0:u.name)||"",phone:null===(m=e.guest)||void 0===m?void 0:m.ph
6one},conversation_public_id:(null===(v=e.conversation)||void 0===v?void 0:v.publicId)??null,has_review:!!e.review,rooms:o(e),product:{id:null===(h=e.residence)||void 0===h?void 0:h.id,name:(null===(p=e.residence)||void 0===p?void 0:p.name)||"",image_url:g,city:(null==_?void 0:_.name)||"",province:(null==b?void 0:b.name)||"",display_type:l(null===(x=e.residence)||void 0===x?void 0:x.type)}}}function m(e){let t=(e||[]).map(u),n=t.filter(e=>"host_approval"===e.state||"second_payment"===e.state),r=t.filter(e=>"done"===e.state||"cancel"===e.state||"expired"===e.state);return{current_reserves:n,past_reserves:r,all_reserves:t}}function v(e){let t=(e||[]).map(u),n=t.filter(e=>"host_approval"===e.state||"second_payment"===e.state),r=t.filter(e=>"done"===e.state),i=t.filter(e=>"cancel"===e.state||"expired"===e.state);return{current_reserves:n,succeed_reserves:r,failed_reserves:i}}function f(e){return(e.totalAmount??0)+(e.guestCommission??0)}function h(e){var t,n,r,i,u,m,v,h,p,x,g;let _=e.residence||{},{cityRow:b,provinceRow:y}=d(_.location);return{faqs:(e.faqs||[]).map(e=>e),order_details:{conversation_public_id:e.conversationPublicId??null,paid_amount:e.paidAmount??0,remaining_amount:e.remainingAmount??0,total_amount:f(e),guest_commission:e.guestCommission??0,alters:[],cancel_desc:e.cancelDesc||void 0,cancel_reason:e.cancelReason||void 0,cancelled_by:a(e.cancelledBy),coordinated_with:void 0,days_count:e.daysCount??0,end_date:c(e.endDate),expiry_date:e.expiryDate||"",has_review:!!e.review,review_id:(null===(t=e.review)||void 0===t?void 0:t.id)??null,guest:{name:(null===(n=e.guest)||void 0===n?void 0:n.name)||"",phone:(null===(r=e.guest)||void 0===r?void 0:r.phone)||void 0,avatar_url:(null===(i=e.guest)||void 0===i?void 0:i.avatarUrl)||void 0},guests_count:e.guestsCount??0,extra_guests_count:e.extraGuestsCount??0,host:{name:(null===(u=e.host)||void 0===u?void 0:u.name)||"",phone:(null===(m=e.host)||void 0===m?void 0:m.ph
6one)||void 0,avatar_url:(null===(v=e.host)||void 0===v?void 0:v.avatarUrl)||void 0},host_share:e.hostShare??0,id:e.id,prices:function(e){let t=e.priceBreakdown;if(!t){let t=e.daysCount||1,n=e.totalAmount??0;return[{weekdays:t,unit_price:n/t,total_price:n},{weekends:0,unit_price:0,total_price:0},{peaks:0,unit_price:0,total_price:0},{specials:0,unit_price:0,total_price:0},{count:0,extras:0,unit_price:0,total_price:0},{host_discount:e.hostGiftDiscount??0},{website_discount:e.siteGiftDiscount??0},{coupon_discount:e.codeDiscountAmount??0},{period_discount:0}]}return[{weekdays:t.weekdayNights||0,unit_price:t.weekdayNights?t.weekdayTotal/t.weekdayNights:0,total_price:t.weekdayTotal||0},{weekends:t.weekendNights||0,unit_price:t.weekendNights?t.weekendTotal/t.weekendNights:0,total_price:t.weekendTotal||0},{peaks:t.peakNights||0,unit_price:t.peakNights?t.peakTotal/t.peakNights:0,total_price:t.peakTotal||0},{specials:t.specialNights||0,unit_price:t.specialNights?t.specialTotal/t.specialNights:0,total_price:t.specialTotal||0},{count:t.extraGuests||0,extras:t.extraGuests&&e.daysCount||0,unit_price:t.extraGuests&&e.daysCount?t.extraGuestsTotal/t.extraGuests/e.daysCount:0,total_price:t.extraGuestsTotal||0},{host_discount:e.hostGiftDiscount??0},{website_discount:e.siteGiftDiscount??0},{coupon_discount:e.codeDiscountAmount??0},{period_discount:t.discountAmount||0}]}(e),rooms:o(e),product:{display_type:l(_.type),cancel_rule:"",beds_count:void 0,rooms_count:void 0,capacity:_.capacity??0,max_capacity:_.maxCapacity??0,before_start_time:_.beforeStartTime??0,full_return_time:_.fullReturnTime??0,host_share_future_nights:_.hostShareFutureNights??0,host_share_past_nights:_.hostSharePastNights??0,host_share_total_amount:_.hostShareTotalAmount??0,address:_.address||"",average_rating:_.averageRating??0,city:(null==b?void 0:b.name)||"",city_id:null==b?void 0:b.id,city_title:(null==b?void 0:b.titleEn)||(null==b?void 0:b.name)||"",id:_.id,image_url:(null===(h=_.images)||void 0===h?void 0:null===(p=h[0])||void 0===p?void 0:p.url)||"",latitude:null!=_.latitude?String(_.latitude):"",longitude:null!=_.longitude?String(_.longitude):"",name:_.name||"",neighborhood:_.neighborhood||"",province:(null==y?void 0:y.name)||"",province_id:null==y?void 0:y.id,province_title:(null==y?void 0:y.titleEn)||(null==y?void 0:y.name)||"",reviews_count:_.reviewsCount??0,min_reservable_days:_.minReservableDays??1,checkin_from:_.checkinFrom||void 0,checkin_to:_.checkinTo||void 0,checkout:_.checkout||void 0,rules:(_.rules||[]).map(e=>{var t,n,r;return{category:(null===(t=e.rule)||void 0===t?void 0:t.category)||"",id:null===(n=e.rule)||void 0===n?void 0:n.id,name:(null===(r=e.rule)||void 0===r?void 0:r.name)||"",value:"string"==typeof e.value?e.value:e.value?"بله":"خیر"}})},reference:e.reference,start_date:c(e.startDate),state:s(e.state),voucher_url:void 0,temp_state:void 0,website_share:e.websiteShare??0,vat_amount:(null===(x=e.invoice)||void 0===x?void 0:x.vatAmount)??e.vatAmount??0,host_bill_total:(null===(g=e.invoice)||void 0===g?void 0:g.hostBillTotal)??(e.totalAmount??0)-(e.hostGiftDiscount??0)}}}},47416:function(e,t,n){"use strict";var r=n(85893);n(67294),t.Z=function(e){let{icon:t,title:n,containerClassname:i,element:s,asH1:a}=e;return(0,r.jsxs)("div",{className:`flex items-center justify-between ${i||""}`,children:[(0,r.jsxs)("div",{className:"flex items-center",children:[!!t&&(0,r.jsx)("div",{className:"flex items-center ml-12",children:t}),a?(0,r.jsx)("h1",{className:"text-[#000000] text-16 leading-28 font-m",children:n}):(0,r.jsx)("h2",{className:"text-[#000000] text-16 leading-28 font-m",children:n})]}),s]})}},5518:function(e,t,n){"use strict";var r=n(85893),i=n(47300),s=n(82941);t.Z=function(e){let{title:t="اطلاعات بارگذاری نشد",subTitle:n="ارتباط برقرار نشد. دوباره تلاش کنید.",onRetry:a,isRetrying:l}=e;return(0,r.jsx)(s.Z,{iconSrc:(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-Warning text-56 text-warning"}),title:t,subTitle:n,containerClassname:"py-40",actions:(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(i.z,{variant:"outlined",color:"black",onClick:a,isLoading:l,loadingText:"در حال تلاش…",rightIcon:(0,r.jsx)("i",{"aria-hidden":"true",className:"icon-Refresh text-20"}),children:"تلاش دوباره"})})})}},60110:function(e,t,n){"use strict";n.d(t,{y:function(){return s}});var r=n(85893),i=n(2195);function s(){return(0,r.jsxs)("div",{className:"rounded-12",children:[(0,r.jsx)("div",{className:"w-full h-[214px] relative rounded-tr-12 rounded-tl-12 border-1 border-solid border-[#1C345442] border-b-none",children:(0,r.jsx)(i.Z,{widthClass:"w-full",height
6Class:"h-full",borderRadiusClass:"rounded-tr-12 rounded-tl-12"})}),(0,r.jsxs)("div",{className:"p-12 border-1 border-solid border-[#1C345442] border-t-none rounded-br-12 rounded-bl-12",children:[(0,r.jsx)("div",{className:"mb-12",children:(0,r.jsx)(i.Z,{widthClass:"w-full",heightClass:"h-[28px]",borderRadiusClass:"rounded-2"})}),(0,r.jsx)("div",{className:"mb-16",children:(0,r.jsx)(i.Z,{widthClass:"w-full",heightClass:"h-[24px]",borderRadiusClass:"rounded-2"})}),(0,r.jsx)(i.Z,{widthClass:"w-full",heightClass:"h-[40px]",borderRadiusClass:"rounded-6"})]})]})}},8849:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(85893),i=n(2195);function s(){return(0,r.jsx)(i.Z,{widthClass:"w-full",heightClass:"h-[37px]",borderRadiusClass:"rounded-9"})}},2195:function(e,t,n){"use strict";var r=n(85893);t.Z=function(e){let{widthClass:t,heightClass:n,borderRadiusClass:i,marginsClassnames:s,extraClassnames:a}=e;return(0,r.jsx)("div",{className:`
7        skeleton-shimmer
8        ${t||"w-48"}
9        ${n||"h-48"}
10        ${s||""}
11        ${a||""}
12    `,children:(0,r.jsx)("div",{className:`
13              w-full h-full
14              bg-gray-E9EdF1
15              ${i||"rounded-8"}
16        `})})}},83888:function(e,t,n){"use strict";var r=n(85893);function i(e){return(0,r.jsx)("div",{className:`
17        flex flex-row md:flex-col items-center justify-center cursor-pointer pt-4 pb-4 px-4 md:px-0 md:pt-10 md:pb-0
18        ${e.scroll?"grow-0 shrink-0 basis-auto whitespace-nowrap":"grow md:grow-0 shrink md:shrink-0 basis-0 md:basis-auto"}
19        ${e.currentActiveIndex===e.tabIndex?"bg-white rounded-6 md:after:content-[''] md:after:w-full md:after:mt-10 md:after:block md:after:h-4 md:after:bg-primary-main md:after:rounded-tr-100 md:after:rounded-tl-100":"md:pb-6"}
20        drop-shadow-[0px_1px_6px_rgba(0,0,0,0.1)] md:drop-shadow-none
21        text-12 md:text-16 leading-21 md:leading-24 font-r text-black
22      `,onClick:()=>{e.onChange(e.tabIndex)},children:e.label})}t.Z=function(e){let{activeIndex:t,onChange:n,data:s,scroll:a}=e;return(0,r.jsx)("div",{className:`flex items-center rounded-9 bg-gray-EFEFF0 md:bg-transparent px-4 py-4 md:px-16 md:py-0 gap-x-5 md:gap-x-32 md:border-b-1 md:border-b-gray-CACFD3 md:border-solid md:rounded-0 ${a?"w-max min-w-full":""}`,children:s.map((e,s)=>(0,r.jsx)(i,{label:e.tabLabel,tabIndex:e.tabIndex||s,currentActiveIndex:t,onChange:n,scroll:a},s))})}},68668:function(e,t,n){"use strict";var r,i;n.d(t,{f:function(){return r}}),(i=r||(r={})).CANCEL="cancel",i.EXPIRED="expired",i.HOST_APPROVAL="host_approval",i.SECOND_PAYMENT="second_payment",i.DONE="done"},92752:function(e,t,n){"use strict";var r,i,s,a;n.d(t,{$:function(){return i},w:function(){return r}}),(s=r||(r={})).LIDOMA_CANCELLED="cancelled_by_lidoma",s.HOST_CANCELLED="cancelled_by_host",s.GUEST_CANCELLED="cancelled_by_guest",(a=i||(i={})).GUEST="guest",a.HOST="host"},24777:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return $},default:function(){return Y}});var r=n(85893),i=n(47300),s=n(68220),a=n(83888),l=n(47416),o=n(67294),c=n(36492),d=n(70
2278),u=n(82941),m=n(5518),v=n(49276),f=n(12486),h=n(68289),p=n.n(h),x=n(8849),g=n(60110),_=n(85468),b=n(41664),y=n.n(b),w=n(34649),N=n(25675),j=n.n(N),C=n(80113),E=n(85945),D=n(68668);let k="MyTripsList_ActiveTab",S="MyTripsList_PageN",I="MyTripsList_ClickedMyTrip_Id";function T(e){let{mytripId:t}=e;sessionStorage.setItem(I,t.toString())}var L=function(e){let{price:t,startDate:n,endDate:i,mainGuestsN:s,extraGuestsN:a}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-16 leading-28 text-black font-m mb-12",children:["مبلغ رزرو : ",null==t?void 0:t.toLocaleString("en-US")," تومان"]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-16 flex-wrap",children:[(0,r.jsxs)("p",{className:"flex items-center gap-x-8",children:[(0,r.jsx)("span",{children:n}),(0,r.jsx)("i",{className:"icon-CalendarFlash text-20"}),(0,r.jsx)("span",{children:i})]}),(0,r.jsxs)("p",{className:"flex items-center gap-x-6 text-14 leading-24 text-black",children:[s," نفر",!!a&&(0,r.jsxs)("span",{className:"text-[#1C2E4599]",children:["+ ",a," نفر اضافه"]})]})]})]})},A=n(77087),M=function(e){let{state:t,mytripId:n,residenceName:s,reserveCode:a,reservePrice:l,startDate:c,endDate:d,mainGuestsN:u,extraGuestsN:m,residenceId:v,residenceImage:f,expiryDate:h,cancelledBy:p,voucherUrl:x,cancelDesc:g,cancelReason:b,suggestedResidencesList:N,coordinatedWith:k,residenceCity:S,displayType:M,canReview:P,hasReview:R}=e,O=(0,o.useMemo)(()=>(0,_.mi)(t,p),[t,p]),$=(0,o.useRef)(),Y=(0,o.useRef)(null),[G,Z]=(0,o.useState)(null),F=(0,E.NL)();return(0,o.useEffect)(()=>{let e=sessionStorage.getItem(I);e&&Number(e)===n&&($.current.scrollIntoView({behavior:"smooth",block:"center"}),sessionStorage.removeItem(I))},[]),(0,o.useEffect)(()=>(h&&(Y.current=setInterval(()=>{let e=(0,w.getTimeDiff)(Date.now(),new Date(h||"").getTime());0===e?(F.invalidateQueries(["getReserves","getDashboardData"]),Y.current&&clearInterval(Y.current)):Z(e)},1e3)),()=>{Y.current&&clearInterval(Y.current)}),[]),(0,r.jsxs)("div",{className:"rounded-16 flex flex-col md:h-full",ref:$,children:[(0,r.jsxs)("div",{className:"w-full h-[214px] p-12 relative rounded-tr-16 rounded-tl-16",children:[(0,r.jsx)(j(),{src:f,fill:!0,style:{objectFit:"cover"},alt:"",className:"rounded-tr-16 rounded-tl-16",placeholder:"blur",blurDataURL:(0,C.n)(f)}),(0,r.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,r.jsxs)("div",{className:"z-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:`flex items-center p-5 pl-12 rounded-50 gap-x-5 text-white ${null==O?void 0:O.bgColor}`,children:[(0,r.jsx)("i",{className:`${null==O?void 0:O.icon} text-18`}),(0,r.jsx)("p",{className:"text-12 leading-21",children:null==O?void 0:O.name})]}),(0,r.jsxs)(y(),{passHref:!0,prefetch:!1,href:(0,A.$)({residenceId:v}),className:"p-5 pl-12 text-white flex items-center gap-x-5 bg-black rounded-50 bg-opacity-80 cursor-pointer",onClick:()=>{T({mytripId:n})},children:[(0,r.jsx)("i",{className:"icon-See text-18"}),(0,r.jsx)("span",{className:"text-12 leading-21",children:"مشاهده"})]})]}),(t===D.f.HOST_APPROVAL||t===D.f.SECOND_PAYMENT)&&!!h&&(0,r.jsxs)("div",{className:"mt-8 w-fit-content px-12 py-2 rounded-50 bg-white",children:["زمان باقی مانده : ",G]})]}),(0,r.jsx)("div",{className:"z-2",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-x-8",children:[(0,r.jsx)("div",{className:"text-14 leading-24 text-white OnlyOneLineAndEndWithElipsis",children:s}),(0,r.jsx)("div",{className:"shrink-0 flex justify-end",children:(0,r.jsxs)("p",{className:"rounded-50 bg-white text-12 leading-21 text-black whitespace-nowrap px-12 py-2 flex items-center justify-center w-fit-content",children:["کد رزرو : ",a]})})]})})]}),(0,r.jsx)("div",{className:"h-[107px] absolute w-full bottom-0 right-0",style:{background:"linear-gradient(0deg, #000000 7%, rgba(0, 0, 0, 0.52) 49.82%, rgba(0, 0, 0, 0.0001) 80.84%)"}})]}),(0,r.jsx)("div",{className:"grow flex flex-col justify-between p-12 border-1 border-solid border-[#1C345442] border-t-none rounded-br-12 rounded-bl-12",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{price:l,startDate:c,endDate:d,mainGuestsN:u,extraGuestsN:m}),(0,r.jsx)(i.Q,{href:`/my-trips/${n}`,isFullWidth:!0,variant:t===D.f.CANCEL||t===D.f.EXPIRED?"outlined":"contained",color:t===D.f.CANCEL||t===D.f.EXPIRED?"black":"primary",onClick:()=>
22{T({mytripId:n})},children:"مشاهده جزئیات رزرو"}),!!P&&(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(i.Q,{href:`/submit-review?id=${n}`,isFullWidth:!0,color:"secondary",rightIcon:(0,r.jsx)("i",{className:"icon-message text-24"}),children:R?"مشاهده نظر ثبت‌شده":"ثبت نظر"})})]})})]})},P=n(31138),R=function(){var e;(0,f.e)();let[t,n]=(0,o.useState)(null),[h,b]=(0,o.useState)(null),y=(0,P.a)("(min-width: 1024px)"),w=(0,o.useMemo)(()=>y?15:8,[y]),[N,j]=(0,o.useState)(),{isLoading:C,isSuccess:E,data:D,isError:I,isFetching:T,refetch:L}=(0,c.a)(["getMyTrips"],()=>(0,_.gK)(),{staleTime:3e4});(0,o.useEffect)(()=>{D&&(null==D?void 0:D.status)==="success"&&j(null==D?void 0:D.params)},[D]);let A=(0,o.useCallback)(()=>{let e;if(0===t){if((null==N?void 0:N.current_reserves.length)===0)return"سفر جاری نداری !";e=null==N?void 0:N.current_reserves}else if(1===t){if((null==N?void 0:N.past_reserves.length)===0)return"سفر پایان یافته ای نداری !";e=null==N?void 0:N.past_reserves}else{if((null==N?void 0:N.all_reserves.length)===0)return"سفری نداشتی !";e=null==N?void 0:N.all_reserves}return null==e?void 0:e.slice(0,w*h)},[t,N,w,h]),R=A();(0,o.useEffect)(()=>{(t||0===t)&&sessionStorage.setItem(k,t.toString())},[t]),(0,o.useEffect)(()=>{let e=sessionStorage.getItem(k);n(e?Number(e):0)},[]),(0,o.useEffect)(()=>{h&&sessionStorage.setItem(S,h.toString())},[h]),(0,o.useEffect)(()=>{let e=sessionStorage.getItem(S);b(e?Number(e):1)},[]);let O=(0,o.useMemo)(()=>C||null===t||null===h,[C,t,h]);return(0,r.jsxs)("div",{className:"pb-40 md:pb-80 ",children:[(0,r.jsx)(l.Z,{title:"سفرهای من",icon:(0,r.jsx)("i",{className:"icon-Trips text-24"}),containerClassname:"mb-16"}),O?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-16",children:(0,r.jsx)(x.j,{})}),Array.from({length:w}).map((e,t)=>(0,r.jsx)("div",{className:"mb-16 last:mb-0",children:(0,r.jsx)(g.y,{})},t))]}):I||!N?(0,r.jsx)(m.Z,{title:"سفرها بارگذاری نشد",onRetry:()=>void L(),isRetrying:T}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-16 md:mb-24",children:(0,r.jsx)(a.Z,{activeIndex:t,onChange:e=>{n(e)},data:[{tabLabel:N?`جاری (${(0,s.YS)(N.current_reserves.length)})`:`جاری`,tabIndex:0},{tabLabel:N?`پایان یافته (${(0,s.YS)(N.past_reserves.length)})`:`پایان یافته`,tabIndex:1},{tabLabel:N?`همه (${(0,s.YS)(N.all_reserves.length)})`:`همه`,tabIndex:2}]})}),(0,r.jsx)("div",{className:"grid grid-cols-12 sm:gap-x-16 md:gap-x-16 gap-y-16 sm:gap-y-16 md:gap-y-24",children:"string"==typeof R?(0,r.jsx)("div",{className:"pt-40 col-span-full",children:(0,r.jsx)(u.Z,{title:R,iconSrc:"/assets/No-reserve.svg"})}):null==R?void 0:R.map(e=>(0,r.jsx)("div",{className:"col-span-full sm:col-span-6 md:col-span-4 md:h-full",children:(0,r.jsx)(M,{state:e.state,residenceName:e.product.name,reserveCode:e.reference,reservePrice:e.total_amount,startDate:(0,v.mW)(e.start_date),endDate:(0,v.mW)(e.end_date),mainGuestsN:e.guests_count,extraGuestsN:e.extra_guests_count,mytripId:e.id,residenceId:e.product.id,residenceImage:`${e.product.image_url}`,expiryDate:e.expiry_date,cancelledBy:"cancelled_by"in e&&(null==e?void 0:e.cancelled_by)?null==e?void 0:e.cancelled_by:void 0,residenceCity:e.product.city,displayType:e.product.display_type,canReview:"done"===e.state&&p()(e.end_date).isBefore(p()()),hasReview:!!e.has_review})},e.id))}),!!h&&!!(0,d.f)(h,w,null===(e=0===t?null==N?void 0:N.current_reserves:1===t?null==N?void 0:N.past_reserves:null==N?void 0:N.all_reserves)||void 0===e?void 0:e.length)&&(0,r.jsx)("div",{className:"mt-16 md:mt-24 md:w-[280px] md:mx-auto",children:(0,r.jsx)(i.z,{variant:"outlined",color:"black",isFullWidth:!0,onClick:()=>b(e=>e+1),rightIcon:(0,r.jsx)("i",{className:"icon-Plus hidden md:block text-20 text-black"}),children:"نمایش بیشتر"})})]})]})};let O=()=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(R,{})});var $=!0,Y=O},7078:function(e,t,n){"use strict";function r(e,t,n){return n>e*t}n.d(t,{f:function(){return r}})},34649:function(e,t,n){"use strict";function r(e){return 0<=e&&e<10?"0"+e:10<=e&&e<100?e.toString():void 0}n.r(t),n.d(t,{getTimeDiff:function(){return i}});let i=(e,t)=>{let n=t-e;if(n<=0)return 0;let i=Math.floor(n/1e3),s=Math.floor(i/3600),a=i-3600*s,l=Math.floor(a/60),o=a-60*l;return 0===s&&0===l&&0===o?0:0===s?`${r(l)}:${r(o)}`:`${s}:${r(l)}:${r(o)}`}},50534:function(e,t,n){"use strict";function r(e,t){let n=e.map(e=>e.format("jYYYY/jMM/jDD")),r=t.map(e=>{let t=[],n=e[0].clone();for(;n.isSameOrBefore(e[1]);)t.push(n.format("jYYYY/jMM/jDD")),n.add(1,"day");return t}),i=r.flat(1),s=new Set([...n,...i]),a=[...s];return a}n.d(t,{M:function(){return r}})},49276:function(e,t,n){"use strict";n.d(t,{IS:function(){return l},K9:function(){return v},ZJ:function(){return a},_q:function(){return o},bP:function(){return d},mW:function(){return c},qK:function(){return u},wI:function(){return m}});var r=n(68289),i=n.n(r),s=n(50534);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new(i());return e.format("jYYYY/jMM/jDD - hh:mm")}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new(i());return e.format("HH:mm - jYYYY/jMM/jDD")}function o(e){return e.format("jYYYY/jMM/jDD")}function c(e){return o(i()(e))}function d(e){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new(i());return e.format("jMMMM jYYYY")}(i()(e))}function u(e,t){let n=(0,s.M)([],[[e,t]]);return n.length}i().loadPersian({dialect:"persian-modern"}),i().locale("fa-IR");let m=e=>(e||(e=new(i())),i()(e).startOf("jMonth").format("dd")),v=e=>{e||(e=new(i()));let t=c(e).split("/"),n=t[0],r=t[1];return i().jDaysInMonth(Number(n),Number(r)-1)}},77087:function(e,t,n){"use strict";function r(e){let{residenceId:t,startDate:n,endDate:r,guestsCount:i}=e;return`/rentals/${t}${n&&r?`?start=${n}&end=${r}`:""}${i&&n&&r?`&guests_count=${i}`:i?`?guests_count=${i}`:""}`}n.d(t,{$:function(){return r}})},62236:function(e,t,n){"use strict";function r(e){["getReserve","getReserves","getMyTrips","getDashboardData"].forEach(t=>e.invalidateQueries([t]))}n.d(t,{J:function(){return r}})},89987:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(67294);let i=["message","read","typing","message-deleted","reservation","notification"];function s(e,t,n){let s=(0,r.useRef)(t);s.current=t;let a=(0,r.useRef)(n);a.current=n,(0,r.useEffect)(()=>
22{if(!e||"undefined"==typeof EventSource){var t;null===(t=a.current)||void 0===t||t.call(a,!0);return}let n=null,r=0,l=!1;return(n=new EventSource("/api/conversations/stream",{withCredentials:!0})).onopen=()=>{var e;r=0,null===(e=a.current)||void 0===e||e.call(a,!1)},i.forEach(e=>{null==n||n.addEventListener(e,t=>{try{s.current({type:e,data:JSON.parse(t.data)})}catch{}})}),n.onerror=()=>{if((r+=1)>=2){var e;null===(e=a.current)||void 0===e||e.call(a,!0)}},()=>{null==n||n.close()}},[e])}},12486:function(e,t,n){"use strict";n.d(t,{e:function(){return l}});var r=n(67294),i=n(85945),s=n(89987),a=n(62236);function l(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,i.NL)(),[n,l]=(0,r.useState)(!1),o=(0,r.useRef)(n);return o.current=n,(0,s.Q)(e,e=>{"reservation"===e.type&&((0,a.J)(t),t.invalidateQueries(["notifications"])),"notification"===e.type&&t.invalidateQueries(["notifications"])},l),(0,r.useEffect)(()=>{if(!e||"undefined"==typeof document)return;let n=()=>{"visible"===document.visibilityState&&((0,a.J)(t),t.invalidateQueries(["notifications"]))},r=()=>{"visible"===document.visibilityState&&n()};document.addEventListener("visibilitychange",r),window.addEventListener("focus",n);let i=window.setInterval(n,o.current?15e3:6e4);return()=>{document.removeEventListener("visibilitychange",r),window.removeEventListener("focus",n),window.clearInterval(i)}},[e,t,n]),{live:!n}}}},function(e){e.O(0,[4885,8289,113,8220,9774,2888,179],function(){return e(e.s=98717)}),_N_E=e.O()}]);

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.