PageSourceSearch

https://lidomatrip.com/_next/static/chunks/9321-7484b132333fe76b.js

js lidomatrip.com collected 2026-09-25 07:12:57 UTC 6,710 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9321],{97474:function(e,t,n){n.d(t,{u:function(){return u}});var i,a=n(47568),r=n(26042),s=n(70655),o=n(57149);function c(e){return e.toISOString().slice(0,10)}var u=(i=(0,a.Z)(function(e){var t,n,i,a,u,l,d,f,_,p,v,m,y,h,k,w,D,g,x,Y,N,P,b,S,C,M,A,q,E,G,F,U,j,I,O,T,Z,B,R,K,V,W,z,H,J,L,Q,X,$;return(0,s.__generator)(this,function(s){switch(s.label){case 0:if(t=e.residenceId,e.residenceType,i=void 0===(n=e.scope)?"public":n,a=e.roomId,"all"===t)return[2,{status:"error",err_msg:"این حالت پشتیبانی نمی‌شود"}];return f=new Date,(_=new Date).setDate(_.getDate()+365),p=c(f),v=c(_),[4,o.Z.setUrl("host"===i?"/api/host/residences/".concat(t,"/calendar"):"/api/residences/".concat(t,"/calendar")).setCallMethod("GET").setParams((0,r.Z)({from:p,to:v},a?{roomId:a}:{})).call()];case 1:if((null==(m=s.sent())?void 0:m.status)!=="success")return[2,{status:"error",err_msg:"خطا در دریافت اطلاعات تقویم"}];y=(null==m?void 0:null===(u=m.data)||void 0===u?void 0:u.residence)||{},h=(null==m?void 0:null===(l=m.data)||void 0===l?void 0:l.days)||[],k=(null==m?void 0:null===(d=m.data)||void 0===d?void 0:d.reservations)||[],w=[],D=[],g=[],x=new Map,Y=!0,N=!1,P=void 0;try{for(b=h[Symbol.iterator]();!(Y=(S=b.next()).done);Y=!0)C=S.value,M=String(C.date).slice(0,10),C.isBlocked&&w.push(M),null!==C.isFast&&void 0!==C.isFast&&x.set(M,!!C.isFast),null!=C.specialPrice&&D.push([M,C.specialPrice]),null!=C.discountAmount&&g.push({amount:C.discountAmount,date:M,discount_id:C.id,type:"PERCENTAGE"===C.discountType?"percentage":"fixed_price"})}catch(e){N=!0,P=e}finally{try{Y||null==b.return||b.return()}finally{if(N)throw P}}for(A=[],q=!!y.isFast,E=new Date(f);E<=_;E.setDate(E.getDate()+1))G=c(E),(null!==(F=x.get(G))&&void 0!==F?F:q)&&A.push(G);U=[],j=!0,I=!1,O=void 0;try{for(T=k[Symbol.iterator]();!(j=(Z=T.next()).done);j=!0)for(B=Z.value,R=new Date(B.from),K=new Date(B.to);R<K;)U.push(c(R)),R.setDate(R.getDate()+1)}catch(e){I=!0,O=e}finally{try{j||null==T.return||T.return()}finally{if(I)throw O}}return[2,{status:"success",params:{capacity:null!==(V=y.capacity)&&void 0!==V?V:0,discounted_days:g,fast_days:A,filled_dates:w,is_temp:!1,max_capacity:null!==(W=y.maxCapacity)&&void 0!==W?W:0,peak_dates:[],prices:{extra_guests_price:null!==(z=y.extraGuestsPrice)&&void 0!==z?z:0,extra_guests_peak_price:null!==(H=y.extraGuestsPeakPrice)&&void 0!==H?H:0,monthly_discount:null!==(J=y.monthlyDiscount)&&void 0!==J?J:0,peak_price:null!==(L=y.peakPrice)&&void 0!==L?L:0,week_price:null!==(Q=y.weekPrice)&&void 0!==Q?Q:0,weekend_price:null!==(X=y.weekendPrice)&&void 0!==X?X:0,weekly_discount:null!==($=y.weeklyDiscount)&&void 0!==$?$:0},reserved_dates:U,special_dates:D}}]}})}),function(e){return i.apply(this,arguments)})},55666:function(e,t,n){n.r(t);var i=n(85893),a=n(41236);t.default=function(e){var t=e.average_rating,n=e.reviews_count,r=e.className,s=e.hideWhenAllAreZero;return t||n||void 0!==s&&!s?(0,i.jsxs)("div",{onClick:function(){var e=document.querySelector("#resReviews");null==e||e.scrollIntoView({behavior:"smooth",block:"center"})},className:"gap-x-2 flex items-center shrink-0 cursor-pointer ".concat(r||""),children:[!!t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"text-15 leading-20 text-black font-m",children:(0,a.A)(t)}),(0,i.jsx)("i",{className:"icon-StarFill text-18 text-warning"})]}),!!n&&(0,i.jsx)("span",{className:"text-gray-57585C text-11 leading-14 font-r",children:"(".concat(2*n," نظر ثبت شده)")})]}):null}},33642:function(e,t,n){n.d(t,{Oi:function(){return i},y5:function(){return a}});var i=["چ","پ"],a=["ج","ش","ی","د","س"]},33089:function(e,t,n){n.d(t,{o:function(){return r}});var i=n(68289),a=n.n(i);function r(e){var t=[],n=!0,i=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)for(var c=s.value,u=a()(c[0],"YYYY-M-D"),l=a()(c[1],"YYYY-M-D"),d=u.clone();d.isSameOrBefore(l);)t.push(d.clone()),d.add(1,"day")}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}return t}},41236:function(e,t,n){n.d(t,{A:function(){return i}});function i(e){return null==e||Number.isNaN(Number(e))?"":String(Math.round(100*Number(e))/100)}},27047:function(e,t,n){n.d(t,{k:function(){return c}});var i=n(33089),a=n(33642),r=n(49276),s=n(68289),o=n.n(s);function c(e){for(var t=e.serverCalendarData,n=e.theRangeSelected,s=e.numberOfPeople,c=e.baseCapacity,u=e.extraGuestUnitPrice,l=e.discountedDays,d=t.prices.monthly_discount,f=t.prices.weekly_discount,_=n[0],p=null==n?void 0:n[1],v=(0,r.qK)(_,p)-1,m=0,y=0,h=0,k=0,w=0,D=0,g=0,x=0,Y=0,N=0,P=0,b=0,S=0,C=0,M=0,A=0,q={},E=_.clone();E.isBefore(p);)!function(){var e=E.format("YYYY-MM-DD"),n=E.format("dd"),r=t.special_dates.find(function(t){return t[0]===e}),s=(0,i.o)(t.peak_dates).find(function(t){return t.format("YYYY-MM-DD")===e});if(r){var c=r[0],u=r[1],d=o()(c,"YYYY-MM-DD"),f=null==l?void 0:l.find(function(e){return e.date.isSame(d)});if(m+=u,f){var _=u*(f.amount/100);y+=u-_,D+=_,S+=1,q[u]=q[u]?{n_of_discounted_nights:q[u].n_of_discounted_nights+1,repeated_frequency:q[u].repeated_frequency+1}:{n_of_discounted_nights:1,repeated_frequency:1}}else y+=u,q[u]=q[u]?{n_of_discounted_nights:q[u].n_of_discounted_nights,repeated_frequency:q[u].repeated_frequency+1}:{n_of_discounted_nights:0,repeated_frequency:1}}else if(s){N+=1;var p=null==l?void 0:l.find(function(e){return e.date.isSame(s)}),v=t.prices.peak_price||0;if(m+=v,p){var G=v*(p.amount/100);h+=v-G,g+=G,C+=1}else h+=v}else if(a.Oi.includes(n)){P+=1;var F=null==l?void 0:l.find(function(e){return e.date.isSame(E.clone())}),U=t.prices.weekend_price||0;if(m+=U,F){var j=U*(F.amount/100);w+=U-j,x+=j,M+=1}else w+=U}else if(a.y5.includes(n)){b+=1;var I=null==l?void 0:l.find(function(e){return e.date.isSame(E.clone())}),O=t.prices.week_price||0;if(m+=O,I){var T=O*(I.amount/100);k+=O-T,Y+=T,A+=1}else k+=O}E.add(1,"day")}();var G=k+w+h+y,F=s>c?(s-c)*u*v:0,U=m+F,j=d&&v>29?U*(d/100):0,I=0;return 0===j&&(I=f&&(null==n?void 0:n[0])&&(null==n?void 0:n[1])&&v>=7&&v<=29?U*(f/100):0),{finalCalculatedCheckoutTotal:G+F-j-I,monthlyDiscountAmount:j,weeklyDiscountAmount:I,checkoutPaperData:{specialDatesData:q,peakDatesN:N,peakDatesUnitPrice:t.prices.peak_price||0,weekEndDatesN:P,weekEndDatesUnitPrice:t.prices.weekend_price||0,weekDatesN:b,weekDatesUnitPrice:t.prices.week_price||0,extraGuestsN:s>c?s-c:0,extraGuestsUnitPrice:v*u},special_days_total_discount_amount:D,peak_days_total_discount_amount:g,weekends_total_discount_amount:x,normaldays_total_discount_amount:Y,n_of_discounted_special_days:S,n_of_discounted_peak_days:C,n_of_discounted_weekends:M,n_of_discounted_normaldays:A}}}}]);

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.