PageSourceSearch

https://soana.tech/_next/static/chunks/2160.43c11f167f3dcf61.js

js soana.tech collected 2026-10-08 06:04:44 UTC 15,721 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2160],{6267:(e,t,r)=>{r.d(t,{F:()=>n});var a=r(89279);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=a.$,n=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return l(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:n,defaultVariants:i}=t,o=Object.keys(n).map(e=>{let t=null==r?void 0:r[e],a=null==i?void 0:i[e];if(null===t)return null;let l=s(t)||s(a);return n[e][l]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return l(e,o,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},8191:(e,t,r)=>{r.d(t,{cn:()=>l});var a=r(89279),s=r(71563);function l(...e){return(0,s.QP)((0,a.$)(e))}},25633:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},25856:(e,t,r)=>{r.d(t,{$:()=>d});var a=r(95155),s=r(12115),l=r(36469),n=r(6267),i=r(8191);let o=(0,n.F)("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-white",{variants:{variant:{default:"bg-black text-white hover:bg-neutral-900",outline:"border border-[#E7E6E4] dark:border-border bg-white dark:bg-card text-[#2B2D2D] dark:text-foreground hover:bg-gray-50 dark:hover:bg-muted",ghost:"text-neutral-700 hover:bg-neutral-100"},size:{default:"h-10 px-5",lg:"h-11 px-6 text-base",sm:"h-8 px-4 text-xs",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=s.forwardRef(({className:e,variant:t,size:r,asChild:s=!1,...n},d)=>{let c=s?l.DX:"button";return(0,a.jsx)(c,{className:(0,i.cn)(o({variant:t,size:r,className:e})),ref:d,...n})});d.displayName="Button"},33351:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},42160:(e,t,r)=>{r.r(t),r.d(t,{EditTaskModal:()=>f});var a=r(95155),s=r(12115),l=r(58079),n=r(33351),i=r(25633),o=r(52782),d=r(74593),c=r(42601),u=r(69351),m=r(29094),x=r(91527),p=r(25856);let h=[{id:"ai",label:"AI",emoji:"\uD83E\uDD16"},{id:"development",label:"Разработка и IT",emoji:"\uD83D\uDCBB"},{id:"design",label:"Дизайн и Креатив",emoji:"\uD83C\uDFA8"},{id:"content",label:"Тексты и Контент",emoji:"\uD83D\uDCDD"},{id:"marketing",label:"Маркетинг",emoji:"\uD83D\uDCE3"},{id:"legal",label:"Юридические",emoji:"⚖️"},{id:"finance",label:"Финансы",emoji:"\uD83D\uDCB0"},{id:"consulting",label:"Консультации",emoji:"\uD83E\uDDE0"}];function f({task:e,onClose:t,onSaved:r}){let[f,b]=(0,s.useState)(e.title),[g,y]=(0,s.useState)(e.description??""),[v,j]=(0,s.useState)(String(e.budget_amount)),[N,w]=(0,s.useState)(e.categories??[]),[k,A]=(0,s.useState)(e.attachments??[]),[C,S]=(0,s.useState)(""),[$,M]=(0,s.use
1State)(0),[E,R]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[T,D]=(0,s.useState)(()=>e.deadline?new Date(e.deadline).toISOString().split("T")[0]:""),[F,H]=(0,s.useState)(()=>{if(!e.deadline)return"";let t=new Date(e.deadline);return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}),I=(0,s.useRef)(null),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let _=()=>{let e=C.trim();if(!e)return;let t=e.startsWith("http")?e:`https://${e}`;try{let e=new URL(t);A(r=>[...r,{type:"link",name:e.hostname,url:t}]),S("")}catch{m.oR.error("Некорректная ссылка")}},W=e=>{A(t=>t.filter((t,r)=>r!==e))},P=async e=>{let t=Array.from(e);M(e=>e+t.length),(await Promise.allSettled(t.map(async e=>{let t=new FormData;t.append("file",e);let r=await fetch("/api/upload",{method:"POST",body:t,credentials:"include"});if(!r.ok)throw Error((await r.json().catch(()=>({}))).error||"Ошибка загрузки");let a=await r.json();return{type:"file",name:a.name,url:a.url,mime:a.mime}}))).forEach(e=>{"fulfilled"===e.status?A(t=>[...t,e.value]):m.oR.error(e.reason?.message??"Не удалось загрузить файл")}),M(e=>e-t.length)},U=async()=>{if(!f.trim())return void m.oR.error("Введите заголовок");let a=parseFloat(v);if(isNaN(a)||a<=0)return void m.oR.error("Введите корректный бюджет");let s=k,l=C.trim();if(l){let e=l.startsWith("http")?l:`https://${l}`;try{let t=new URL(e);s=[...k,{type:"link",name:t.hostname,url:e}],S("")}catch{}}R(!0);try{let l=T?F?`${T}T${F}`:`${T}T23:59`:null,n=await fetch(`/api/tasks?id=${e.id}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:f.trim(),description:g.trim()||null,budget_amount:a,deadline:l,categories:N,attachments:s})});if(!n.ok){let e=await n.json().catch(()=>({}));m.oR.error(e.error||"Не удалось сохранить изменения");return}let{task:i}=await n.json();m.oR.success("Заказ обновлён"),r(i),t()}catch{m.oR.error("Не удалось сохранить изменения")}finally{R(!1)}},V=k.filter(e=>"file"===e.type),B=k.filter(e=>"link"===e.type),q=function(e,t){if(!e)return"";let[r,a,s]=e.split("-"),l=`${parseInt(s)} ${["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"][parseInt(a)-1]} ${r}`;return t?`${l}, ${t}`:l}(T,F);return(0,a.jsx)("div",{ref:L,onClick:e=>{e.target===L.current&&t()},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",children:(0,a.jsxs)("div",{className:"relative flex w-full max-w-xl max-h-[90vh] flex-col overflow-hidden rounded-2xl bg-card border border-border shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-5 py-4",children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"Редактировать заказ"}),(0,a.jsx)("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-full hover:bg-muted transition-colors",children:(0,a.jsx)(l.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Заголовок"}),(0,a.jsx)("input",{value:f,onChange:e=>b(e.target.value),className:"w-full rounded-xl border border-border bg-card py-2.5 px-3.5 text-sm outline-none focus:ring-2 focus:ring-primary/10 focus:border-primary/60 transition-all"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Описание"}),(0,a.jsx)("textarea",{value:g,onChange:e=>y(e.target.value),rows:4,className:"w-full resize-none rounded-xl border border-border bg-card py-2.5 px-3.5 text-sm outline-none focus:ring-2 focus:ring-primary/10 focus:border-primary/60 transition-all"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Бюджет (TON)"}
1),(0,a.jsx)("input",{type:"number",step:"0.01",value:v,onChange:e=>j(e.target.value),className:"w-full rounded-xl border border-border bg-card py-2.5 px-3.5 text-sm outline-none focus:ring-2 focus:ring-primary/10 focus:border-primary/60 transition-all"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Дедлайн"}),(0,a.jsxs)(x.AM,{open:O,onOpenChange:z,children:[(0,a.jsx)(x.Wv,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:`flex w-full items-center justify-between rounded-xl border bg-card py-2.5 px-3.5 text-sm outline-none transition-all hover:border-primary/60 ${q?"text-foreground":"text-muted-foreground"} border-border`,children:[(0,a.jsx)("span",{className:"truncate",children:q||"Выберите дату"}),(0,a.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground ml-2"})]})}),(0,a.jsx)(x.hl,{align:"start",className:"w-72 p-4 rounded-2xl border border-border bg-card shadow-lg",children:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Дата"}),(0,a.jsx)("input",{type:"date",value:T,onChange:e=>D(e.target.value),min:new Date().toISOString().split("T")[0],className:"w-full rounded-xl border border-border bg-muted/30 py-2 px-3 text-sm outline-none focus:border-primary/60 transition-all [color-scheme:dark]"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Время"}),(0,a.jsx)("input",{type:"time",value:F,onChange:e=>H(e.target.value),className:"w-full rounded-xl border border-border bg-muted/30 py-2 px-3 text-sm outline-none focus:border-primary/60 transition-all [color-scheme:dark]"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{D(""),H("")},className:"flex-1 rounded-xl border border-border bg-muted/40 py-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:"Сбросить"}),(0,a.jsx)("button",{type:"button",onClick:()=>z(!1),className:"flex-1 rounded-xl bg-primary py-2 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:"Готово"})]})]})})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Категория"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.id,void w(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:`flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${N.includes(e.id)?"border-primary bg-primary/10 text-primary":"border-border bg-muted/40 text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[(0,a.jsx)("span",{className:"text-base leading-none",children:e.emoji}),(0,a.jsx)("span",{children:e.label})]},e.id))})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Файлы и ссылки"}),V.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:V.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border bg-muted/50 px-2.5 py-1.5",children:[e.mime?.startsWith("image/")?(0,a.jsx)("img",{src:e.url,alt:e.name,className:"h-4 w-4 rounded object-cover"}):(0,a.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"max-w-32 truncate text-xs",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>W(k.indexOf(e)),className:"ml-0.5 text-muted-foreground hover:text-destructive transition-colors",children:(0,a.jsx)(l.A,{className:"h-3 w-3"})})]},t))}),B.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:B.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border bg-muted/50 px-2.5 py-1.5",children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"max-w-40 truncate text-xs",children:e.name||e.url}),(0,a.jsx)("button",{type:"button",onClick:()=>W(k.indexOf(e)),className:"ml-0.5 text-muted-foreground hover:text-destructive transition-colors",children:(0,a.jsx)(l.A,{className:"h-3 w-3"})})]},t))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"relative flex-1",children:[(0,a.jsx)(o.A,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground pointer-events-none"}),(0,a.jsx)("input",{value:C,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),_())},placeholder:"https://figma.com/...",className:"w-full rounded-xl border border-border bg-card py-2.5 pl-9 pr-3.5 text-sm outline-none focus:border-primary/60 focus:ring-2 focus:ring-primary/10 transition-all"})]}),(0,a.jsx)("button",{type:"button",onClick:_,className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-muted/40 text-muted-foreground hover:text-foreground transition-colors",children:(0,a.jsx)(d.A,{className:"h-4 w-4"})})]}),(0,a.jsx)("input",{ref:I,type:"file",multiple:!0,accept:"image/*,.pdf,.doc,.docx,.xls,.xlsx,.txt,.zip",className:"hidden",onChange:e=>{e.target.files?.length&&(P(e.target.files),e.target.value="")}}),(0,a.jsx)("button",{type:"button",onClick:()=>I.current?.click(),disabled:$>0,className:"flex w-full items-center justify-center gap-2 rounded-xl border border-dashed border-border px-4 py-2.5 text-sm text-muted-foreground transition-colors hover:border-primary/50 hover:text-foreground disabled:opacity-50",children:$>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{className:"h-4 w-4 animate-spin"}),"Загрузка ",$," файл(ов)..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{className:"h-4 w-4"}),"Прикрепить файлы или фото"]})})]})]}),(0,a.jsxs)("div",{className:"shrink-0 flex gap-3 border-t border-border px-5 py-4",children:[(0,a.jsx)(p.$,{variant:"outline",className:"flex-1 h-11 rounded-xl text-sm font-medium",onClick:t,disabled:E,children:"Отмена"}),(0,a.jsx)(p.$,{className:"flex-1 h-11 rounded-xl text-sm font-medium",onClick:U,disabled:E||$>0,children:E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Сохранение..."]}):"Сохранить"})]})]})})}},42601:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},52782:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",ke
1y:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},69351:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).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"}]])},74593:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71858).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},91527:(e,t,r)=>{r.d(t,{AM:()=>i,Wv:()=>o,hl:()=>d});var a=r(95155),s=r(12115),l=r(5947),n=r(8191);let i=l.bL,o=l.l9,d=s.forwardRef(({className:e,align:t="center",sideOffset:r=8,...s},i)=>(0,a.jsx)(l.ZL,{children:(0,a.jsx)(l.UC,{ref:i,align:t,sideOffset:r,className:(0,n.cn)("z-50 w-80 rounded-xl border bg-popover p-4 text-popover-foreground shadow-lg outline-none",e),...s})}));d.displayName=l.UC.displayName}}]);

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.