import{r as w,j as e}from"./vendor-react-xnlkqCTC.js";import{T as C}from"./ToolPageSEO-CJfesqON.js";import{T}from"./toolsMeta-CeuNOhcH.js";import{d as S,w as l,D as q,z as f,y as a,H as m,F as g}from"./index-h3-nOCov.js";import"./vendor-dayjs-CTLjenN8.js";import"./vendor-sentry-qG-dVXi3.js";import{M as P,a as M}from"./MarketingShell-DlFdkac9.js";import{u as E}from"./vendor-i18n-BZWggl2o.js";import{C as R}from"./users-DU41Pj4K.js";import{T as I}from"./trash-2-D92yeFFv.js";import{P as z}from"./plus-D0EWC2Oo.js";import{C as V}from"./circle-check-BF1F0-g0.js";import"./vendor-query-Cbb05LTU.js";import"./vendor-antd-core-DLLca_om.js";import"./zap-CcgON_pn.js";import"./globe-D-NdIehH.js";import"./shield-check-BegsGXBw.js";import"./file-text-xZLRdt2j.js";import"./SiteFooter-CeOXYlmJ.js";import"./send-iGmzNNWK.js";import"./building-2-CfUUs6nB.js";/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F=[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],y=S("file-down",F);function W(){return Math.random().toString(36).slice(2,10)}function N(t){const c=parseFloat(t);return isNaN(c)||c<0?0:c}function b(){return{id:W(),description:"",qty:"",weight:"",volume:"",hsCode:""}}const A=new Intl.NumberFormat("ru-RU",{maximumFractionDigits:3});function h(t){return A.format(t)}function D(t){return[{id:"desc",text:t("tools.packingList.checklist.desc","Точное наименование товара на русском и английском"),critical:!0},{id:"qty",text:t("tools.packingList.checklist.qty","Количество мест (грузовых единиц)"),critical:!0},{id:"weight",text:t("tools.packingList.checklist.weight","Вес нетто и брутто каждой позиции (кг)"),critical:!0},{id:"volume",text:t("tools.packingList.checklist.volume","Объём каждой позиции (м³ или CBM)"),critical:!0},{id:"hs",text:t("tools.packingList.checklist.hs","Код ТН ВЭД (HS Code) для таможенного декларирования"),critical:!0},{id:"marks",text:t("tools.packingList.checklist.marks","Маркировка грузовых мест (Marks & Numbers)"),critical:!1},{id:"country",text:t("tools.packingList.checklist.country","Страна происхождения товара"),critical:!1},{id:"invoice",text:t("tools.packingList.checklist.invoice","Ссылка на номер коммерческого инвойса"),critical:!1},{id:"sign",text:t("tools.packingList.checklist.sign","Подпись и печать грузоотправителя"),critical:!1}]}function B(t){return[{no:1,desc:t("tools.packingList.example.row1","Ноутбук HP ProBook 450 G9"),qty:20,weight:"2.10",totalWeight:"42.00",volume:"0.006",totalVolume:"0.120",hs:"8471.30"},{no:2,desc:t("tools.packingList.example.row2","Зарядное устройство 65W"),qty:20,weight:"0.35",totalWeight:"7.00",volume:"0.001",totalVolume:"0.020",hs:"8504.40"},{no:3,desc:t("tools.packingList.example.row3","Мышь беспроводная Logitech"),qty:20,weight:"0.15",totalWeight:"3.00",volume:"0.001",totalVolume:"0.020",hs:"8471.60"}]}function ne(){const{t}=E(),c=D(t),k=B(t),[o,u]=w.useState([b(),b()]);function v(){o.length>=30||u(s=>[...s,b()])}function L(s){o.length<=1||u(r=>r.filter(i=>i.id!==s))}function n(s){u(r=>r.map(i=>i.id===s.id?s:i))}const d=o.reduce((s,r)=>s+N(r.weight)*(parseInt(r.qty)||1),0),x=o.reduce((s,r)=>s+N(r.volume)*(parseInt(r.qty)||1),0),p=o.reduce((s,r)=>s+(parseInt(r.qty)||0),0);function j(){alert(t("tools.packingList.downloadAlert","Функция в разработке — обратитесь к менеджеру Avalog"))}return e.jsxs(P,{active:"tools",children:[e.jsx(C,{...T["packing-list"]}),e.jsx("section",{className:"py-10 bg-surface border-b border-border",children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:e.jsx(l,{gap:4,children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary-light flex items-center justify-center flex-shrink-0",children:e.jsx(R,{className:"h-7 w-7 text-primary"})}),e.jsxs(l,{gap:2,children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx(q,{size:"sm",children:t("tools.packingList.hero.title","Упаковочный лист")}),e.jsx(f,{variant:"default",children:t("tools.packingList.hero.badge","Шаблон")})]}),e.jsx(a,{variant:"lead",children:t("tools.packingList.hero.lead","Конструктор упаковочного листа с авторасчётом веса и объёма. Чек-лист обязательных полей для таможенного оформления.")})]})]})})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:e.jsxs(l,{gap:8,children:[e.jsxs(l,{gap:2,children:[e.jsx(m,{size:"h2",children:t("tools.packingList.builder.title","Конструктор упаковочного листа")}),e.jsx(a,{variant:"muted",children:t("tools.packingList.builder.desc","Добавьте позиции груза — вес и объём рассчитываются автоматически")})]}),e.jsx(g,{children:e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted w-8",children:"#"}),e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted min-w-[180px]",children:t("tools.packingList.builder.col.description","Описание товара")}),e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted w-24",children:t("tools.packingList.builder.col.qty","Кол-во, шт")}),e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted w-28",children:t("tools.packingList.builder.col.weight","Вес, кг/ед")}),e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted w-28",children:t("tools.packingList.builder.col.volume","Объём, м³/ед")}),e.jsx("th",{className:"text-left pb-3 pr-3 font-medium text-text-muted w-32",children:t("tools.packingList.builder.col.hsCode","Код ТН ВЭД")}),e.jsx("th",{className:"pb-3 w-10"})]})}),e.jsx("tbody",{children:o.map((s,r)=>e.jsxs("tr",{className:"border-b border-border/50 last:border-b-0",children:[e.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs font-mono",children:r+1}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("input",{type:"text",placeholder:t("tools.packingList.builder.namePlaceholder","Наименование товара"),value:s.description,onChange:i=>n({...s,description:i.target.value}),className:"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-sm text-text placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors"})}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("input",{type:"number",min:"1",step:"1",placeholder:"0",value:s.qty,onChange:i=>n({...s,qty:i.target.value}),className:"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-sm text-text placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors"})}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("input",{type:"number",min:"0",step:"0.001",placeholder:"0.000",value:s.weight,onChange:i=>n({...s,weight:i.target.value}),className:"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-sm text-text placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors"})}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("input",{type:"number",min:"0",step:"0.001",placeholder:"0.000",value:s.volume,onChange:i=>n({...s,volume:i.target.value}),className:"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-sm text-text placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors"})}),e.jsx("td",{className:"py-2 pr-3",children:e.jsx("input",{type:"text",placeholder:"0000.00",value:s.hsCode,onChange:i=>n({...s,hsCode:i.target.value}),className:"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-sm text-text placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors font-mono"})}),e.jsx("td",{className:"py-2",children:e.jsx("button",{type:"button",onClick:()=>L(s.id),disabled:o.length<=1,"aria-label":t("tools.packingList.builder.removeRow","Удалить строку {{n}}",{n:r+1}),className:"flex items-center justify-center h-7 w-7 rounded-md text-text-muted hover:text-red-500 hover:bg-red-50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:e.jsx(I,{className:"h-4 w-4"})})})]},s.id))}),e.jsx("tfoot",{children:e.jsxs("tr",{className:"border-t-2 border-border bg-surface",children:[e.jsx("td",{colSpan:2,className:"py-3 pr-3 pl-0",children:e.jsx("span",{className:"text-sm font-semibold text-text",children:t("tools.packingList.builder.total","Итого")})}),e.jsx("td",{className:"py-3 pr-3",children:e.jsx("span",{className:"text-sm font-bold tabular-nums text-primary",children:p>0?p:"—"})}),e.jsx("td",{className:"py-3 pr-3",children:e.jsx("span",{className:"text-sm font-bold tabular-nums text-text",children:d>0?t("tools.packingList.unit.kg","{{n}} кг",{n:h(d)}):"—"})}),e.jsx("td",{className:"py-3 pr-3",children:e.jsx("span",{className:"text-sm font-bold tabular-nums text-text",children:x>0?t("tools.packingList.unit.m3","{{n}} м³",{n:h(x)}):"—"})}),e.jsx("td",{colSpan:2})]})})]})}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[e.jsxs("button",{type:"button",onClick:v,disabled:o.length>=30,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-background px-4 py-2 text-sm font-medium text-text hover:bg-surface disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[e.jsx(z,{className:"h-4 w-4"}),t("tools.packingList.builder.addRow","Добавить позицию")]}),e.jsxs("button",{type:"button",onClick:j,className:"inline-flex items-center gap-2 rounded-lg border border-primary bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 transition-colors",children:[e.jsx(y,{className:"h-4 w-4"}),t("tools.packingList.builder.downloadTemplate","Скачать шаблон")]})]}),(p>0||d>0||x>0)&&e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full border border-border bg-surface text-text-muted",children:[t("tools.packingList.chip.places","Мест:")," ",e.jsx("strong",{className:"text-text",children:p})]}),e.jsx("span",{className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full border border-primary/30 bg-primary-light text-primary font-medium",children:t("tools.packingList.chip.weight","Вес: {{n}} кг",{n:h(d)})}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full border border-border bg-surface text-text-muted",children:[t("tools.packingList.chip.volume","Объём:")," ",e.jsx("strong",{className:"text-text",children:t("tools.packingList.unit.m3","{{n}} м³",{n:h(x)})})]})]})]})}),e.jsxs(l,{gap:4,children:[e.jsxs(l,{gap:1,children:[e.jsx(m,{size:"h3",children:t("tools.packingList.checklist.title","Обязательные поля для таможенного оформления")}),e.jsx(a,{variant:"muted",children:t("tools.packingList.checklist.desc","Отсутствие любого из критичных полей может задержать груз на таможне")})]}),e.jsx(g,{children:e.jsx("div",{className:"p-6",children:e.jsx(l,{gap:3,children:c.map(s=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(V,{className:`h-5 w-5 flex-shrink-0 mt-0.5 ${s.critical?"text-primary":"text-text-muted"}`}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(a,{children:s.text}),s.critical&&e.jsx(f,{variant:"error",children:t("tools.packingList.checklist.required","Обязательно")})]})]},s.id))})})})]})]})})}),e.jsx("section",{className:"py-12 bg-surface border-t border-border",children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:e.jsxs(l,{gap:6,children:[e.jsxs(l,{gap:2,children:[e.jsx(m,{size:"h2",children:t("tools.packingList.example.title","Пример заполненного упаковочного листа")}),e.jsx(a,{variant:"muted",children:t("tools.packingList.example.subtitle","Образец для партии электроники из Китая в Россию")})]}),e.jsx(g,{children:e.jsxs("div",{className:"p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(m,{size:"h2",as:"h1",className:"uppercase tracking-widest",children:t("tools.packingList.example.docTitle","Packing List / Упаковочный лист")}),e.jsx(a,{variant:"muted",className:"mt-1",children:t("tools.packingList.example.docSubtitle","Образец заполнения")})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 mb-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(a,{variant:"caption",children:t("tools.packingList.example.shipperLabel","Грузоотправитель / Shipper")}),e.jsx(a,{className:"font-medium",children:"Shenzhen Tech Export Co., Ltd."})]}),e.jsxs("div",{children:[e.jsx(a,{variant:"caption",children:t("tools.packingList.example.consigneeLabel","Грузополучатель / Consignee")}),e.jsx(a,{className:"font-medium",children:t("tools.packingList.example.consigneeValue","ООО «Технологии Будущего»")})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(a,{variant:"caption",children:"Invoice No."}),e.jsx(a,{className:"font-medium font-mono",children:"INV-2026-00412"})]}),e.jsxs("div",{children:[e.jsx(a,{variant:"caption",children:t("tools.packingList.example.dateLabel","Дата / Date")}),e.jsx(a,{className:"font-medium",children:"2026-05-15"})]}),e.jsxs("div",{children:[e.jsx(a,{variant:"caption",children:t("tools.packingList.example.routeLabel","Маршрут")}),e.jsx(a,{className:"font-medium",children:t("tools.packingList.example.routeValue","Шэньчжэнь → Москва (авиа)")})]})]})]}),e.jsx("div",{className:"border-t border-border mb-6"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b-2 border-text",children:[e.jsx("th",{className:"text-left py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide",children:"#"}),e.jsx("th",{className:"text-left py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide",children:t("tools.packingList.example.col.description","Описание товара")}),e.jsx("th",{className:"text-right py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.qty","Кол-во")}),e.jsx("th",{className:"text-right py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.weightPer","Вес/ед (кг)")}),e.jsx("th",{className:"text-right py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.weightTotal","Вес итого (кг)")}),e.jsx("th",{className:"text-right py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.volumePer","Объём/ед (м³)")}),e.jsx("th",{className:"text-right py-2.5 pr-4 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.volumeTotal","Объём итого (м³)")}),e.jsx("th",{className:"text-left py-2.5 font-semibold text-text text-xs uppercase tracking-wide whitespace-nowrap",children:t("tools.packingList.example.col.hsCode","Код ТН ВЭД")})]})}),e.jsx("tbody",{children:k.map(s=>e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-3 pr-4 text-text-muted",children:s.no}),e.jsx("td",{className:"py-3 pr-4 text-text font-medium",children:s.desc}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text",children:s.qty}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text",children:s.weight}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text font-medium",children:s.totalWeight}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text",children:s.volume}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text font-medium",children:s.totalVolume}),e.jsx("td",{className:"py-3 text-text-muted font-mono text-xs",children:s.hs})]},s.no))}),e.jsx("tfoot",{children:e.jsxs("tr",{className:"border-t-2 border-text font-semibold",children:[e.jsx("td",{colSpan:2,className:"py-3 pr-4 text-text text-xs uppercase tracking-wide",children:t("tools.packingList.example.totalRow","Итого / Total")}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-text",children:"60"}),e.jsx("td",{className:"py-3 pr-4"}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-primary",children:"52.00"}),e.jsx("td",{className:"py-3 pr-4"}),e.jsx("td",{className:"py-3 pr-4 text-right tabular-nums text-primary",children:"0.160"}),e.jsx("td",{})]})})]})}),e.jsx("div",{className:"border-t border-border mt-6 pt-6",children:e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-4 py-3 text-center",children:[e.jsx(a,{variant:"caption",className:"mb-1",children:t("tools.packingList.example.summary.places","Мест")}),e.jsx("p",{className:"text-2xl font-bold text-text tabular-nums",children:"60"})]}),e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-primary-light px-4 py-3 text-center",children:[e.jsx(a,{variant:"caption",className:"mb-1 text-primary/70",children:t("tools.packingList.example.summary.grossWeight","Вес брутто")}),e.jsx("p",{className:"text-2xl font-bold text-primary tabular-nums",children:t("tools.packingList.unit.kg","{{n}} кг",{n:52})})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-4 py-3 text-center",children:[e.jsx(a,{variant:"caption",className:"mb-1",children:t("tools.packingList.example.summary.volumeCbm","Объём (CBM)")}),e.jsx("p",{className:"text-2xl font-bold text-text tabular-nums",children:t("tools.packingList.unit.m3","{{n}} м³",{n:"0.160"})})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-4 py-3 text-center",children:[e.jsx(a,{variant:"caption",className:"mb-1",children:t("tools.packingList.example.summary.airFreight","Авиа-фрахт")}),e.jsx("p",{className:"text-2xl font-bold text-text tabular-nums",children:t("tools.packingList.unit.kg","{{n}} кг",{n:52})})]})]})})]})}),e.jsx("div",{className:"flex justify-center",children:e.jsxs("button",{type:"button",onClick:j,className:"inline-flex items-center gap-2 rounded-xl border border-primary bg-primary px-6 py-3 text-base font-semibold text-white hover:bg-primary/90 transition-colors shadow-sm",children:[e.jsx(y,{className:"h-5 w-5"}),t("tools.packingList.downloadExcelPdf","Скачать шаблон в Excel / PDF")]})})]})})}),e.jsx(M,{title:t("tools.packingList.cta.title","Нужна помощь с таможенным оформлением?"),description:t("tools.packingList.cta.description","Менеджеры Avalog помогут правильно оформить документы и организуют перевозку"),ctaLabel:t("tools.packingList.cta.label","Рассчитать доставку"),ctaTo:"/calculator"})]})}export{ne as default};