PageSourceSearch

https://simlodzkie.pl/_next/static/chunks/app/investments/miasto-b…/page-d1175ab403ad0534.js

js simlodzkie.pl collected 2026-10-05 00:53:33 UTC 11,418 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4006],{368:(e,s,r)=>{"use strict";r.d(s,{A:()=>a});let a=(0,r(1847).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},4285:(e,s,r)=>{"use strict";r.d(s,{A:()=>a});let a=(0,r(1847).A)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]])},4652:(e,s,r)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),!function(e,s){for(var r in s)Object.defineProperty(e,r,{enumerable:!0,get:s[r]})}(s,{default:function(){return c},getImageProps:function(){return l}});let a=r(8140),n=r(2659),i=r(1356),t=a._(r(1124));function l(e){let{props:s}=(0,n.getImgProps)(e,{defaultLoader:t.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(s))void 0===r&&delete s[e];return{props:s}}let c=i.Image},5229:(e,s,r)=>{"use strict";r.d(s,{A:()=>a});let a=(0,r(1847).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5239:(e,s,r)=>{"use strict";r.d(s,{default:()=>n.a});var a=r(4652),n=r.n(a)},6026:(e,s,r)=>{"use strict";r.d(s,{default:()=>f});var a=r(5155),n=r(3998),i=r(5142),t=r(6444),l=r(6948),c=r(9235),o=r(2170),d=r(1647),m=r(2115),h=r(2619),x=r.n(h),p=r(63);let u={relevance:"Sortowanie: trafność","price-low":"Partycypacja: od najniższej","price-high":"Partycypacja: od najwyższej","area-small":"Powierzchnia: od najmniejszej","area-large":"Powierzchnia: od największej"},g=["1","2","3","4+"];function v(e){let{title:s,children:r}=e;return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(t.J,{className:"text-base font-medium text-gray-900",children:s}),r]})}function j(e){let{value:s,onChange:r,placeholder:n,suffix:t}=e;return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[0,1].map(e=>(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.p,{placeholder:n[e],value:s[e],onChange:a=>{let n=[...s];n[e]=a.target.value,r(n)},className:"bg-gray-50 border-gray-200 focus:bg-white pr-12",type:"number"}),(0,a.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm",children:t})]},e))})}function b(e){let s,r,{apartment:n,participation:i,rent:t,imgFormat:c,investment:o,pathname:m}=e,h=i*n.area;switch(n.area,n.location){case 0:r="Parter";break;case 1:r="Piętro I";break;case 2:r="Piętro II";break;case 3:r="Piętro III";break;case 4:r="Piętro IV"}return(0,a.jsx)(x(),{href:"".concat(m,"/").concat(n.id),className:"cursor-pointer group",target:"_blank",children:(0,a.jsx)(l.Zp,{className:"p-2 group-hover:bg-green-950/10 transition-colors",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6 p-5 items-center sm:flex-row",children:[(0,a.jsx)("img",{src:"https://cdn.simlodzkie.pl/img/".concat(o,"/apartments/nr-").concat(n.id,".").concat(c||"gif"),alt:"Mieszkanie ".concat(n.id),width:150,height:150,className:"object-contain w-[150px] h-[150px] rounded-lg"}),(0,a.jsxs)("div",{className:"flex-1 space-y-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,a.jsxs)("h3",{className:"text-xl font-bold",children:["Mieszkanie nr ",n.id,n.buildingName]}),n.accessible&&(0,a.jsx)("span",{className:"mt-6  text-sm",children:"Mieszkanie przystosowane dla os\xf3b niepełnosprawnych! ♿️"}),n.available&&(0,a.jsx)(d.E,{className:"bg-green-800 font-bold w-fit",children:"Dostępność: wolne"}),!n.available&&(0,a.jsx)(d.E,{className:"bg-red-800 font-bold w-fit",children:"Dostępność: zajęte"})]}),(0,a.jsx)("div",{className:"space-y-1 text-gray-600",children:(0,a.jsxs)("p",{children:["Partycypacja: ",new Intl.NumberFormat("pl-PL",{style:"currency",currency:"PLN",minimumFractionDigits:0,maximumFractionDigits:0}).format(h)]})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(d.E,{variant:"secondary",children:1===(s=n.rooms)?"1 pok\xf3j":"".concat(s," pokoje")}),(0,a.jsxs)(d.E,{variant:"secondary",children:[n.area," m\xb2"]}),(0,a.jsx)(d.E,{variant:"secondary",children:r})]})]})]})})})}function f(e){let{buildings:s=[],participation:r=0,rent:i=0,investment:t,imgFormat:d}=e,h=(0,p.usePathname)(),[x,f]=(0,m.useState)("relevance"),[y,N]=(0,m.useState)(1),[P,w]=(0,m.useState)({participationRange:["",""],rentRange:["",""],areaRange:["",""],selectedRooms:[]}),k=(0,m.useMemo)(()=>s&&0!==s.length?s.flatMap(e=>(e.apartments||[]).map(s=>({...s,buildingId:e.id,buildingName:e.name}))):[],[s]),z=(0,m.useMemo)(()=>{let e=k.filter(e=>{if(!e.available)return!1;let s=r*e.area,a=i*e.area,[n,t]=P.participationRange;if(n&&s<Number(n)||t&&s>Number(t))return!1;let[l,c]=P.rentRange;if(l&&a<Number(l)||c&&a>Number(c))return!1;let[o,d]=P.areaRange;return!(o&&e.area<Number(o)||d&&e.area>Number(d))&&(!(P.selectedRooms.length>0)||!!P.selectedRooms.some(s=>"4+"===s?e.rooms>=4:e.rooms===Number(s)))&&!0});return e.sort((e,s)=>{switch(x){case"price-low":return r*e.area-r*s.area;case"price-high":return r*s.area-r*e.area;case"area-small":return e.area-s.area;case"area-large":return s.area-e.area;default:return e.id-s.id}}),e},[k,P,x,r,i]);(0,m.useEffect)(()=>{N(1)},[P,x]);let R=Math.ceil(z.length/10),C=(y-1)*10,A=C+10,M=z.slice(C,A),I=(e,s)=>{w(r=>({...r,[e]:s}))},_=()=>{w({participationRange:["",""],rentRange:["",""],areaRange:["",""],selectedRooms:[]})};return s&&0!==s.length?(0,a.jsx)("div",{className:"min-h-screen",children:(0,a.jsx)("div",{className:"container max-w-screen-lg mx-auto py-6",children:(0,a.jsxs)("div",{className:"flex flex-col xl:flex-row gap-6",children:[(0,a.jsxs)("div",{className:"flex-1 xl:order-1",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-6 px-1 md:px-0",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("p",{className:"text-gray-600 text-lg",children:["Liczba mieszkań:"," ",(0,a.jsx)("span",{className:"font-bold",children:z.length})]}),z.length>0&&(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["Wyświetlane: ",C+1,"-",Math.min(A,z.length)," z"," ",z.length]})]}),(0,a.jsxs)(c.l6,{value:x,onValueChange:e=>f(e),children:[(0,a.jsx)(c.bq,{className:"w-full shadow-none sm:w-64 bg-white",children:(0,a.jsx)(c.yv,{})}),(0,a.jsx)(c.gC,{children:Object.entries(u).map(e=>{let[s,r]=e;return(0,a.jsx)(c.eb,{value:s,children:r},s)})})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===M.length?(0,a.jsxs)(l.Zp,{className:"p-8 text-center",children:[(0,a.jsx)("p",{className:"text-gray-500 text-lg mb-4",children:"Nie znaleziono mieszkań spełniających wybrane kryteria."}),(0,a.jsx)(n.$,{variant:"outline",onClick:_,className:"bg-transparent",children:"Wyczyść filtry"})]}):M.map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(b,{apartment:e,participation:r,rent:i,investment:t,imgFormat:d,pathname:h})},"".concat(e.id)))}),R>1&&(0,a.jsx)("div",{className:"mt-8 flex justify-center",children:(0,a.jsx)(o.dK,{children:(0,a.jsxs)(o.Iu,{children:[(0,a.jsx)(o.cU,{children:(0,a.jsx)(o.Eb,{href:"#",onClick:e=>{e.preventDefault(),y>1&&N(y-1)},className:1===y?"pointer-events-none opacity-50":""})}),(()=>{let e=[];
1if(R<=5)for(let s=1;s<=R;s++)e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.n$,{href:"#",onClick:e=>{e.preventDefault(),N(s)},isActive:y===s,children:s})},s));else{e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.n$,{href:"#",onClick:e=>{e.preventDefault(),N(1)},isActive:1===y,children:"1"})},1)),y>3&&e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.M_,{})},"ellipsis1"));let s=Math.max(2,y-1),r=Math.min(R-1,y+1);for(let n=s;n<=r;n++)e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.n$,{href:"#",onClick:e=>{e.preventDefault(),N(n)},isActive:y===n,children:n})},n));y<R-2&&e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.M_,{})},"ellipsis2")),R>1&&e.push((0,a.jsx)(o.cU,{children:(0,a.jsx)(o.n$,{href:"#",onClick:e=>{e.preventDefault(),N(R)},isActive:y===R,children:R})},R))}return e})(),(0,a.jsx)(o.cU,{children:(0,a.jsx)(o.WA,{href:"#",onClick:e=>{e.preventDefault(),y<R&&N(y+1)},className:y===R?"pointer-events-none opacity-50":""})})]})})})]}),(0,a.jsx)("div",{className:"w-full xl:w-80 xl:order-2",children:(0,a.jsxs)(l.Zp,{className:"p-6 sticky top-6  space-y-6 gap-0",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold",children:"Filtrowanie"}),(0,a.jsx)(v,{title:"Partycypacja",children:(0,a.jsx)(j,{value:P.participationRange,onChange:e=>I("participationRange",e),placeholder:["od","do"],suffix:"zł"})}),(0,a.jsx)(v,{title:"Powierzchnia",children:(0,a.jsx)(j,{value:P.areaRange,onChange:e=>I("areaRange",e),placeholder:["od","do"],suffix:"m\xb2"})}),(0,a.jsx)(v,{title:"Liczba pokoi",children:(0,a.jsx)("div",{className:"grid grid-cols-4 gap-2",children:g.map(e=>(0,a.jsx)(n.$,{variant:P.selectedRooms.includes(e)?"default":"outline",onClick:()=>{w(s=>({...s,selectedRooms:s.selectedRooms.includes(e)?s.selectedRooms.filter(s=>s!==e):[...s.selectedRooms,e]}))},className:"h-10 ".concat(P.selectedRooms.includes(e)?"bg-green-900 text-white hover:bg-green-800":"bg-gray-50 hover:bg-gray-100 border-gray-200"," cursor-pointer"),children:e},e))})}),(0,a.jsx)(n.$,{variant:"outline",onClick:_,className:"w-full bg-white cursor-pointer border-gray-300 hover:bg-gray-50",children:"Wyczyść kryteria"})]})})]})})}):(0,a.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,a.jsx)("div",{className:"container max-w-screen-lg mx-auto py-6",children:(0,a.jsx)(l.Zp,{className:"p-8 text-center",children:(0,a.jsx)("p",{className:"text-gray-500 text-lg",children:"Brak dostępnych mieszkań."})})})})}},6983:(e,s,r)=>{"use strict";r.d(s,{A:()=>a});let a=(0,r(1847).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},7783:(e,s,r)=>{Promise.resolve().then(r.bind(r,8609)),Promise.resolve().then(r.bind(r,5646)),Promise.resolve().then(r.bind(r,7870)),Promise.resolve().then(r.bind(r,8162)),Promise.resolve().then(r.bind(r,7259)),Promise.resolve().then(r.bind(r,6202)),Promise.resolve().then(r.bind(r,9511)),Promise.resolve().then(r.bind(r,6218)),Promise.resolve().then(r.bind(r,6348)),Promise.resolve().then(r.bind(r,2733)),Promise.resolve().then(r.bind(r,4604)),Promise.resolve().then(r.bind(r,489)),Promise.resolve().then(r.bind(r,7007
1)),Promise.resolve().then(r.bind(r,7649)),Promise.resolve().then(r.bind(r,1210)),Promise.resolve().then(r.bind(r,8462)),Promise.resolve().then(r.bind(r,2286)),Promise.resolve().then(r.bind(r,5433)),Promise.resolve().then(r.bind(r,9484)),Promise.resolve().then(r.bind(r,4058)),Promise.resolve().then(r.bind(r,9034)),Promise.resolve().then(r.bind(r,7887)),Promise.resolve().then(r.bind(r,3026)),Promise.resolve().then(r.bind(r,7599)),Promise.resolve().then(r.bind(r,5667)),Promise.resolve().then(r.bind(r,5476)),Promise.resolve().then(r.bind(r,3413)),Promise.resolve().then(r.bind(r,1887)),Promise.resolve().then(r.bind(r,784)),Promise.resolve().then(r.bind(r,7520)),Promise.resolve().then(r.bind(r,5673)),Promise.resolve().then(r.bind(r,7013)),Promise.resolve().then(r.bind(r,6026)),Promise.resolve().then(r.bind(r,6408))},7937:(e,s,r)=>{"use strict";r.d(s,{A:()=>a});let a=(0,r(1847).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])}},e=>{e.O(0,[2619,2958,6787,1356,6831,5559,7887,9674,3341,7261,6111,8441,1255,7358],()=>e(e.s=7783)),_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.