/opt/canhelp/apps/web/.next/static/chunks
NameSizeModeActions
app/-0755rm
pages/-0755rm
18-90b700ea37b686a2.js1724420644editdlrm
87c73c54-24122e7b92478d00.js1730190644editdlrm
1516-8fa03da2e85f0346.js320360644editdlrm
1530-9b7ed74b97e19ada.js142900644editdlrm
2838-634f5b2cc5013451.js413180644editdlrm
2982-ceba4ec1ee77f2f4.js131080644editdlrm
3542.ec15a3607f89153b.js340930644editdlrm
6467.a600a1d7b0465863.js45140644editdlrm
7797.f44d1d20dafa108a.js53640644editdlrm
9664-af80478aa73ba424.js85330644editdlrm
9906-d244902bff9e69ec.js3331750644editdlrm
e89fb3a8.970022b1c726abe3.js1485040644editdlrm
framework-811407f832a33072.js1897640644editdlrm
main-0857aa8dd6c62449.js1277880644editdlrm
main-app-4faf785318adadbd.js5550644editdlrm
polyfills-42372ed130431b0a.js1125940644editdlrm
webpack-9d06b1f3167e8ae0.js48490644editdlrm
Edit: /opt/canhelp/apps/web/.next/static/chunks/1530-9b7ed74b97e19ada.js (14290B)
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1530],{2818:(e,t,r)=>{r.d(t,{W:()=>a});var n=r(4568),s=r(7620),l=r(5940);function o(e,t){var r;let n="string"==typeof e?e.trim():"";return!n||(r=n).startsWith("/api/")||r.startsWith("/uploads/")||r.startsWith("http://")||r.startsWith("https://")?t.split("-").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):n}function a(e){let{categories:t,locale:r,value:a,onChange:i,placeholder:u}=e,[c,d]=(0,s.useState)(!1),[h,x]=(0,s.useState)(null),[g,m]=(0,s.useState)(""),f=(0,s.useRef)(null),p=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&(d(!1),x(null))}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{if(!a)return void x(null);for(let r of t){var e;for(let t of null!=(e=r.children)?e:[])if(t.slug===a)return void x(r.slug)}},[a,t]);let k="",b="";e:for(let e of t){var v,j,y,w,L;if(e.slug===a){k=o(null!=(v=e.names[r])?v:e.names.el,e.slug),b=null!=(j=e.icon)?j:"";break}for(let t of null!=(y=e.children)?y:[])if(t.slug===a){k=o(null!=(w=t.names[r])?w:t.names.el,t.slug),b=null!=(L=e.icon)?L:"";break e}}function N(){d(!1),x(null),m("")}let C=g.toLowerCase(),W=C?t.filter(e=>{var t,n;return(null!=(t=e.names[r])?t:e.names.el).toLowerCase().includes(C)||(null!=(n=e.children)?n:[]).some(e=>{var t;return(null!=(t=e.names[r])?t:e.names.el).toLowerCase().includes(C)})}):t;return(0,n.jsxs)("div",{className:"relative",ref:f,children:[(0,n.jsx)("input",{type:"hidden",name:"category",value:a}),(0,n.jsxs)("button",{type:"button",onClick:()=>d(!c),className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm transition-colors ".concat(c?"rounded-t-lg border border-green-400 bg-white text-gray-900":"rounded-lg border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 hover:text-gray-900"),children:[b?(0,n.jsx)(l.Ez,{icon:b,alt:k||u,className:"h-4 w-4 object-contain text-base leading-none shrink-0",fallback:"\uD83D\uDCE6"}):(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),(0,n.jsx)("span",{className:"flex-1 text-left truncate font-medium",children:k||u}),(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-400 shrink-0 transition-transform ".concat(c?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),c&&(0,n.jsxs)("div",{className:"absolute left-0 top-full w-full min-w-[240px] bg-white border border-t-0 border-green-400 rounded-b-xl shadow-lg z-50 max-h-96 overflow-y-auto",children:[(0,n.jsx)("div",{className:"sticky top-0 bg-white border-b border-gray-100 px-3 py-2",children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,n.jsx)("input",{ref:p,type:"text",value:g,onChange:e=>m(e.target.value),className:"w-full pl-8 pr-7 py-1.5 text-sm border border-gray-200 rounded-md focus:outline-none focus:border-green-400",placeholder:"Поиск...",onClick:e=>e.stopPropagation()}),g&&(0,n.jsx)("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>m(""),children:(0,n.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,n.jsxs)("button",{className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm hover:bg-gray-50 text-left border-b border-gray-100 ".concat(a?"text-gray-700":"text-green-600 font-medium"),onClick:()=>{i(""),N()},children:[(0,n.jsx)("span",{className:"flex-1",children:u}),!a&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),W.map(e=>{var t,s,u;let c=o(null!=(t=e.names[r])?t:e.names.el,e.slug),d=null!=(s=e.icon)?s:"",g=null!=(u=e.children)?u:[],m=C?g.filter(e=>{var t;return(null!=(t=e.names[r])?t:e.names.el).toLowerCase().includes(C)||c.toLowerCase().includes(C)}):g,f=h===e.slug||!!C&&m.length>0&&!c.toLowerCase().includes(C),p=g.length>0;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-left transition-colors ".concat(p?"hover:bg-gray-50 text-gray-800":a===e.slug?"text-green-600 font-medium hover:bg-green-50":"hover:bg-gray-50 text-gray-700"),onClick:()=>{p?x(f?null:e.slug):(i(e.slug),N())},children:[d?(0,n.jsx)(l.Ez,{icon:d,alt:c,className:"h-4 w-4 object-contain text-base leading-none shrink-0",fallback:"\uD83D\uDCE6"}):null,(0,n.jsx)("span",{className:"flex-1 font-medium",children:c}),p?(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-400 shrink-0 transition-transform ".concat(f?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}):a===e.slug?(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):null]}),p&&f&&(0,n.jsx)("div",{className:"bg-gray-50 border-t border-b border-gray-100",children:m.map(e=>{var t;let s=o(null!=(t=e.names[r])?t:e.names.el,e.slug),l=a===e.slug;return(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-10 pr-4 py-2 text-sm text-left transition-colors ".concat(l?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{i(e.slug),N()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsx)("span",{className:"flex-1",children:s}),l&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},e.id)})})]},e.id)})]})]})}},3119:(e,t,r)=>{r.d(t,{V:()=>o});var n=r(4568),s=r(7620),l=r(9906);function o(e){let{locations:t,value:r,onChange:o,anyLabel:a,allLabel:i}=e,[u,c]=(0,s.useState)(!1),[d,h]=(0,s.useState)(null),[x,g]=(0,s.useState)(""),m=(0,s.useRef)(null),{locale:f}=(0,l.Y)();(0,s.useEffect)(()=>{function e(e){m.current&&!m.current.contains(e.target)&&(c(!1),h(null))}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{if(!r)return void h(null);for(let n of t){var e;if(n.slug===r)return;for(let t of null!=(e=n.children)?e:[])if(t.slug===r)return void h(n.slug)}},[r,t]);let p=a;e:for(let e of t){var k,b,v;if(e.slug===r){p=null!=(k=e.names[f])?k:e.names.el;break}for(let t of null!=(b=e.children)?b:[])if(t.slug===r){p=null!=(v=t.names[f])?v:t.names.el;break e}}function j(){c(!1),h(null),g("")}let y=x.toLowerCase(),w=y?t.filter(e=>{var t,r;return(null!=(t=e.names[f])?t:e.names.el).toLowerCase().includes(y)||(null!=(r=e.children)?r:[]).some(e=>{var t;return(null!=(t=e.names[f])?t:e.names.el).toLowerCase().includes(y)})}):t;return(0,n.jsxs)("div",{className:"relative",ref:m,children:[(0,n.jsx)("input",{type:"hidden",name:"location",value:r}),(0,n.jsxs)("button",{type:"button",onClick:()=>c(!u),className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm transition-colors ".concat(u?"rounded-t-lg border border-green-400 bg-white text-gray-900":"rounded-lg border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 hover:text-gray-900"),children:[(0,n.jsxs)("svg",{className:"w-4 h-4 text-gray-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,n.jsx)("span",{className:"flex-1 text-left truncate font-medium",children:p}),(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-400 shrink-0 transition-transform ".concat(u?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),u&&(0,n.jsxs)("div",{className:"absolute left-0 top-full w-full min-w-[220px] bg-white border border-t-0 border-green-400 rounded-b-xl shadow-lg z-50 max-h-96 overflow-y-auto",children:[(0,n.jsx)("div",{className:"sticky top-0 bg-white border-b border-gray-100 px-3 py-2",children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,n.jsx)("input",{type:"text",value:x,onChange:e=>g(e.target.value),className:"w-full pl-8 pr-7 py-1.5 text-sm border border-gray-200 rounded-md focus:outline-none focus:border-green-400",placeholder:"Поиск...",onClick:e=>e.stopPropagation()}),x&&(0,n.jsx)("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>g(""),children:(0,n.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,n.jsxs)("button",{className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm hover:bg-gray-50 text-left border-b border-gray-100 ".concat(r?"text-gray-700":"text-green-600 font-medium"),onClick:()=>{o(""),j()},children:[(0,n.jsx)("span",{className:"flex-1",children:a}),!r&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),w.map(e=>{var t,s;let l=null!=(t=e.names[f])?t:e.names.el,a=null!=(s=e.children)?s:[],u=y?a.filter(e=>{var t;return(null!=(t=e.names[f])?t:e.names.el).toLowerCase().includes(y)}):a,c=a.length>0,x=r===e.slug,g=d===e.slug||!!y&&u.length>0&&!l.toLowerCase().includes(y);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-left transition-colors ".concat(x?"text-green-600 font-medium hover:bg-green-50":"text-gray-800 hover:bg-gray-50"),onClick:()=>{c?h(g?null:e.slug):(o(e.slug),j())},children:[(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-300 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"})}),(0,n.jsx)("span",{className:"flex-1 font-medium",children:l}),c?(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-400 shrink-0 transition-transform ".concat(g?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}):x?(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):null]}),c&&g&&(0,n.jsxs)("div",{className:"bg-gray-50 border-t border-b border-gray-100",children:[(!y||l.toLowerCase().includes(y))&&(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-8 pr-4 py-2 text-sm text-left transition-colors ".concat(x?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{o(e.slug),j()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsxs)("span",{className:"flex-1",children:[l," — ",i]}),x&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),u.map(e=>{var t;let s=null!=(t=e.names[f])?t:e.names.el,l=r===e.slug;return(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-8 pr-4 py-2 text-sm text-left transition-colors ".concat(l?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{o(e.slug),j()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsx)("span",{className:"flex-1",children:s}),l&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},e.id)})]})]},e.id)})]})]})}},5940:(e,t,r)=>{r.d(t,{Ez:()=>o,V:()=>l});var n=r(4568),s=r(7620);function l(e){if(!e)return!1;let t=e.trim();return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")}function o(e){let{icon:t,alt:r="",className:o,fallback:a="\uD83D\uDCE6"}=e,i=(t||"").trim(),[u,c]=(0,s.useState)(!1);(0,s.useEffect)(()=>{c(!1)},[i]);let d=(0,s.useMemo)(()=>l(i)?i.startsWith("/api/")?"".concat("https://api.canhelp.gr").concat(i):i:"",[i]),h="/category-icons/package.svg";return l(i)?u&&i!==h?(0,n.jsx)("img",{src:h,alt:r,className:o,loading:"lazy",onError:()=>c(!0)}):u&&i===h?(0,n.jsx)("span",{className:o,children:a}):(0,n.jsx)("img",{src:d,alt:r,className:o,loading:"lazy",onError:()=>c(!0)}):(0,n.jsx)("span",{className:o,children:i||a})}}}]);