1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AnatomySegmentedGlbRenderer-CC_6ewDC.js","assets/vendor-react-px-HMjAK.js","assets/index-20qqchLO.js","assets/vendor-markdown-83KAX7Ln.js","assets/index-BqWYRg4z.css","assets/AnatomySegmentedGlbRenderer-DiXQA89a.css"])))=>i.map(i=>d[i]); 2import{r as n,j as e}from"./vendor-react-px-HMjAK.js";import{g as re,a as oe,c as te,_ as le,b as ie,d as ce,E as ue,e as de,M as me,f as he,h as pe}from"./index-20qqchLO.js";function ye(r){const a={};for(const c of r)c.selection_status==="parent_zone_fallback"&&(a[c.id]=c.parent_id);return a}function Ae(r,a){return a[r]??r}function _e(r,a){if(!Array.isArray(a))return{};const c=new Set(a),o={};for(const _ of r)_.selection_status==="exact_mesh"&&c.has(_.parent_id)&&(o[_.id]=_.parent_id);return o}const xe="https://dbarchive.biosciencedbc.jp/data/bodyparts3d/LATEST/README_e.html",be="https://dbarchive.biosciencedbc.jp/data/bodyparts3d/20110915/README_e.html",fe="https://creativecommons.org/licenses/by/4.0/",je="https://creativecommons.org/licenses/by-sa/2.1/jp/";function ne(r,a){if(!r||typeof r!="object")return null;const c=r,o=a==="v3"?{license:"CC BY-SA 2.1 Japan",licenseUrl:je,sourceNoticeUrl:be,title:"BodyParts3D v3 и адапÑаÑиÑ"}:{license:"CC BY 4.0",licenseUrl:fe,sourceNoticeUrl:xe,title:"BodyParts3D v4"};return c.license!==o.license||c.license_url!==o.licenseUrl||c.source_notice_url!==o.sourceNoticeUrl||typeof c.attribution!="string"||!c.attribution.trim()||typeof c.modification_notice!="string"||!c.modification_notice.trim()?null:{key:a,title:o.title,attribution:c.attribution.trim(),license:o.license,licenseUrl:o.licenseUrl,sourceNoticeUrl:o.sourceNoticeUrl,modificationNotice:c.modification_notice.trim()}}const ge={beginner:"наÑалÑнÑй ÑÑовенÑ",intermediate:"ÑÑедний ÑÑовенÑ",advanced:"пÑодвинÑÑÑй ÑÑовенÑ"},ve={home:"дома",gym:"в зале",outdoor:"на ÑлиÑе"},Ne=n.lazy(()=>le(()=>import("./AnatomySegmentedGlbRenderer-CC_6ewDC.js"),__vite__mapDeps([0,1,2,3,4,5])));function ae(r){var R,k;const a=(R=r==null?void 0:r.asset)==null?void 0:R.manifest;if(((k=r==null?void 0:r.asset)==null?void 0:k.model_status)!=="approved"||r.asset.skeleton_status!=="approved"||!a||typeof a!="object"||a.status!=="approved"||!Array.isArray(a.regions))return!1;const c=new Set([...r.zones.map(u=>u.id),...r.subzones.map(u=>u.id),...r.skeleton_landmarks.map(u=>u.id)]),o=r.asset.aggregate_parent_ids??[],_=new Set(r.zones.map(u=>u.id));if(!Array.isArray(o)||new Set(o).size!==o.length||o.some(u=>typeof u!="string"||!_.has(u)||!r.subzones.some(l=>l.parent_id===u)))return!1;const f=new Set([...c].filter(u=>!o.includes(u))),h=new Set,S=a.regions;if(S.length!==f.size)return!1;for(const u of S){if(typeof u.anatomy_id!="string"||!f.has(u.anatomy_id))return!1;h.add(u.anatomy_id)}return f.size>0&&h.size===f.size}function Se(r){return{id:r.exercise_id,name_ru:r.name_ru,muscle_groups:[r.matched_zone_id||r.requested_zone_id],equipment:r.equipment,met:0}}function Ce({goal:r,selectedZone:a,onSelectZone:c,selectedExerciseIds:o,onSelectExercise:_,onOpenExercise:f,onUseFallback:h,initialCatalog:S,goalSelection:R,goalLabel:k,selectionFooter:u}){var Q,t,i;const[l,p]=n.useState(S||null),[m,x]=n.useState(null),[G,j]=n.useState(!1),[I,q]=n.useState(0),[F,X]=n.useState(0),[T,b]=n.useState("idle"),[W,C]=n.useState(null),[A,Z]=n.useState("");n.useEffect(()=>{if(S&&I===0){p(S),j(!1);return}let s=!0;return j(!1),re().then(d=>{s&&p(d)}).catch(()=>{s&&j(!0)}),()=>{s=!1}},[I,S]),n.useEffect(()=>{if(!a){x(null),b("idle");return}let s=!0;return x(null),b("loading"),oe(a,r).then(d=>{s&&(x(d),b("ready"))}).catch(()=>{s&&(x(null),b("error"))}),()=>{s=!1}},[r,a,F]);const L=(l==null?void 0:l.zones)||[],y=(l==null?void 0:l.subzones)||[],w=(l==null?void 0:l.skeleton_landmarks)||[],g=(Q=l==null?void 0:l.asset)==null?void 0:Q.manifest,Y=g!=null,v=ae(l),O=((t=[...L,...y].find(s=>s.id===(m==null?void 0:m.selection.matched_zone_id)))==null?void 0:t.label)||te(m==null?void 0:m.selection.matched_zone_id),H=w.find(s=>s.id===W),$=((i=[...L,...y].find(s=>s.id===a))==null?void 0:i.label)||te(a),z=n.useMemo(()=>
2{if(!g||typeof g!="object")return[];const s=g;return(s.sources?[ne(s.sources.v4,"v4"),ne(s.sources.v3,"v3")]:[ne(s.source,"v4")]).filter(E=>!!E)},[g]),B=n.useMemo(()=>ye(y),[y]),J=n.useMemo(()=>_e(y,l==null?void 0:l.asset.aggregate_parent_ids),[l==null?void 0:l.asset.aggregate_parent_ids,y]),ee=n.useMemo(()=>y.filter(s=>s.touch_status==="listed_only"||s.layer==="deep"&&s.touch_status!=="exact_touch").map(s=>s.id),[y]),V=y.find(s=>s.id===a),se=(V==null?void 0:V.recommendation_status)==="parent_recommendation_uncertain",K=A.trim().toLocaleLowerCase("ru-RU"),M=s=>!K||s.toLocaleLowerCase("ru-RU").includes(K),N=L.filter(s=>M(s.label)),P=y.filter(s=>M(s.label)),D=w.filter(s=>M(s.label)),U=s=>{if(w.some(d=>d.id===s)){C(s),c(null);return}C(null),c(s)};return e.jsxs("section",{className:`consumer-anatomy-3d${v?" consumer-anatomy-3d--active":""}`,"aria-label":v?"ÐнÑеÑакÑивнÑй вÑÐ±Ð¾Ñ Ð·Ð¾Ð½Ñ Ñела":void 0,"aria-labelledby":v?void 0:"consumer-anatomy-3d-title",children:[!v&&e.jsxs("div",{className:"consumer-anatomy-3d__header",children:[e.jsxs("div",{children:[e.jsx("p",{className:"consumer-eyebrow",children:"ТÐÐÐ Ð ÐЫШЦЫ"}),e.jsx("h2",{id:"consumer-anatomy-3d-title",children:"ÐÐ¾Ð½Ñ Ñела"})]}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:h,children:"ÐÑкÑÑÑÑ Ð´Ð¾ÑÑÑпнÑÑ ÑÑ
емÑ"})]}),!v&&e.jsxs("div",{className:"consumer-anatomy-3d__unavailable",role:"status",children:[e.jsx("strong",{children:"3D-Ð¼Ð¾Ð´ÐµÐ»Ñ Ð¿Ð¾ÐºÐ° не подклÑÑена"}),e.jsx("p",{children:"ÐаннÑе зон Ñже гоÑовÑ. ÐаÑÑоÑÑее вÑаÑение и маÑÑÑаб поÑвÑÑÑÑ Ð¿Ð¾Ñле пÑовеÑки лиÑензии и пÑбликаÑии модели."})]}),v&&Y&&e.jsx(n.Suspense,{fallback:e.jsx("div",{className:"consumer-anatomy-3d__unavailable",role:"status",children:"ÐагÑÑжаеÑÑÑ Ð¿ÑовеÑÐµÐ½Ð½Ð°Ñ 3D-моделÑâ¦"}),children:e.jsx(Ne,{manifest:g,selectedAnatomyId:a?B[a]??a:null,selectionCollapseMap:B,highlightParentMap:J,nonTouchAnatomyIds:ee,onSelect:U,fallback:e.jsxs("div",{className:"consumer-anatomy-3d__unavailable",role:"status",children:[e.jsx("p",{children:"3D-Ð¼Ð¾Ð´ÐµÐ»Ñ Ð½ÐµÐ´Ð¾ÑÑÑпна."}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:h,children:"ÐÑкÑÑÑÑ Ð´Ð¾ÑÑÑпнÑÑ ÑÑ
емÑ"})]})})}),a&&$&&e.jsxs("section",{className:"consumer-anatomy-3d__selection-summary","aria-label":"ÐÑбÑÐ°Ð½Ð½Ð°Ñ Ð·Ð¾Ð½Ð° и ÑледÑÑÑий Ñаг",children:[e.jsxs("strong",{children:["ÐÑбÑана зона: ",$," "]}),e.jsxs("p",{children:["ЦелÑ: ",k||r]}),se&&e.jsx("p",{children:"ТоÑÐ½Ð°Ñ Ð·Ð¾Ð½Ð° вÑбÑана, но ÑекомендаÑии пока опиÑаÑÑÑÑ Ð½Ð° ÑодиÑелÑÑкÑÑ Ð³ÑÑÐ¿Ð¿Ñ Ð¼ÑÑÑ."})]}),a&&R,G&&e.jsxs("div",{className:"consumer-anatomy-3d__explanation",role:"alert",children:[e.jsx("p",{children:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð·Ð¾Ð½Ñ."}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:()=>q(s=>s+1),children:"ÐовÑоÑиÑÑ Ð·Ð°Ð³ÑÑÐ·ÐºÑ Ð·Ð¾Ð½"})]}),H&&e.jsxs("div",{className:"consumer-anatomy-3d__explanation",role:"status",children:[e.jsx("strong",{children:H.label}),e.jsx("p",{children:"ÐоÑÑÐ½Ð°Ñ Ð¾Ð¿Ð¾ÑÐ½Ð°Ñ ÑоÑка. УпÑÐ°Ð¶Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð±Ð¸ÑаÑÑÑÑ ÑолÑко поÑле вÑбоÑа мÑÑÑÑ Ð¸Ð»Ð¸ мÑÑеÑной зонÑ."})]}),a&&T==="loading"&&e.jsx("p",{className:"consumer-anatomy-3d__explanation",role:"status",children:"ÐодбиÑаем ÑпÑÐ°Ð¶Ð½ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²ÑбÑанной зонÑâ¦"}),a&&T==="error"&&e.jsxs("div",{className:"consumer-anatomy-3d__explanation",role:"alert",children:[e.jsx("p",{children:"Ðе ÑдалоÑÑ Ð¿Ð¾Ð´Ð¾Ð±ÑаÑÑ ÑпÑÐ°Ð¶Ð½ÐµÐ½Ð¸Ñ Ð´Ð»Ñ ÑÑой зонÑ."}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:()=>X(s=>s+1),children:"ÐовÑоÑиÑÑ Ð¿Ð¾Ð´Ð±Ð¾Ñ"})]}),a&&m&&e.jsxs("div",{className:"consumer-anatomy-3d__explanation","aria-live":"polite",children:[e.jsx("p",{className:"consumer-eyebrow",children:"Шаг 3"}),e.jsx("strong",{children:"ÐÑбеÑи 1â2 ÑпÑажнениÑ"}),e.jsxs("p",{children:["ÐÑименена ÑелÑ: ",k||r,"."]}),e.jsx("strong",{children:"ÐÐ¾Ð´Ð±Ð¾Ñ Ñ ÑÑÑÑом пÑоÑилÑ"}),e.jsxs("p",{children:[ge[m.profile.experience]||"ÑÑÐ¾Ð²ÐµÐ½Ñ Ð½Ðµ Ñказан",","," ",ve[m.profile.location]||"меÑÑо не Ñказано",", инвенÑаÑÑ: ",m.profile.equipment_count,"."," ","ÐгÑаниÑÐµÐ½Ð¸Ñ Ð¿ÑоÑÐ¸Ð»Ñ ÑÑÑенÑ: ",m.profile.has_exclusions?"да":"неÑ","."]}),(m.selection.fallback_parent_id||m.selection.recommendation_status==="parent_recommendation_uncertain")&&e.jsx("p",{children:m.selection.recommendation_status==="parent_recommendation_due_to_profile"?`ТоÑнÑй акÑÐµÐ½Ñ Ð½Ðµ подоÑÑл под ÑекÑÑий инвенÑаÑÑ Ð¸Ð»Ð¸ огÑаниÑÐµÐ½Ð¸Ñ Ð¿ÑоÑилÑ, поÑÑÐ¾Ð¼Ñ Ð¿Ð¾Ð´Ð±Ð¾Ñ Ð²Ñполнен по ÑодиÑелÑÑкой зоне «${O}».`:`ÐÐ¾Ð´Ð±Ð¾Ñ Ð²Ñполнен по ÑодиÑелÑÑкой зоне «${O}». ТоÑнÑй акÑÐµÐ½Ñ Ð´Ð»Ñ ÑÑой Ð¿Ð¾Ð´Ð·Ð¾Ð½Ñ Ð¿Ð¾ÐºÐ° не подÑвеÑждÑн.`}),m.candidates.length===0&&e.jsx("p",{role:"status",children:"Ðл
2Ñ ÑÑой Ð·Ð¾Ð½Ñ Ð¿Ð¾ÐºÐ° Ð½ÐµÑ Ð¿Ð¾Ð´Ñ
одÑÑиÑ
ÑпÑажнений в библиоÑеке."}),m.candidates.length>0&&e.jsx("ul",{className:"consumer-anatomy-3d__candidate-list",children:m.candidates.map(s=>{const d=Se(s),E=o.has(d.id);return e.jsxs("li",{children:[e.jsxs("div",{className:"consumer-anatomy-3d__candidate-copy",children:[e.jsx("button",{type:"button",className:"consumer-anatomy-3d__exercise-link","aria-label":`ÐÑкÑÑÑÑ ÐºÐ°ÑÑоÑÐºÑ ÑпÑажнениÑ: ${s.name_ru}`,onClick:()=>f(d),children:s.name_ru}),e.jsxs("span",{children:[": ",s.explanation]})]}),e.jsx("button",{type:"button",className:"consumer-anatomy__exercise-select","aria-pressed":E,"aria-label":`${E?"УбÑаÑÑ":"ÐобавиÑÑ"}: ${s.name_ru}`,onClick:()=>_(d),children:E?"ÐÑбÑано":"ÐÑбÑаÑÑ"})]},s.exercise_id)})})]}),a&&u,(L.length>0||y.length>0||w.length>0)&&e.jsxs("details",{className:"consumer-anatomy-3d__zone-picker",open:!v,children:[e.jsx("summary",{children:"ÐÑбÑаÑÑ Ð¸Ð· ÑпиÑка"}),e.jsxs("label",{className:"consumer-anatomy-3d__search",children:[e.jsx("span",{children:"ÐоиÑк зонÑ"}),e.jsx("input",{type:"search",value:A,onChange:s=>Z(s.target.value),placeholder:"ÐапÑимеÑ, пÑеÑÑ"})]}),e.jsxs("div",{className:"consumer-anatomy-3d__zones",role:"list","aria-label":"ÐоÑÑÑпнÑе Ð·Ð¾Ð½Ñ Ñела",children:[N.map(s=>e.jsxs("button",{type:"button","aria-pressed":a===s.id,"aria-label":`ÐÑбÑаÑÑ Ð·Ð¾Ð½Ñ: ${s.label}`,onClick:()=>U(s.id),children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:["ÐÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð·Ð¾Ð½Ð° · ",s.view==="front"?"СпеÑеди":"Сзади"]})]},s.id)),P.map(s=>{const d=L.find(E=>E.id===s.parent_id);return e.jsxs("button",{type:"button","aria-pressed":a===s.id,"aria-label":`ÐÑбÑаÑÑ Ð¿Ð¾Ð´Ð·Ð¾Ð½Ñ: ${s.label}`,onClick:()=>U(s.id),children:[e.jsx("strong",{children:s.label}),e.jsx("span",{children:s.recommendation_status==="parent_recommendation_uncertain"?"Ðодзона · ÑекомендаÑии по ÑодиÑелÑÑкой гÑÑппе":`Ðодзона · ${(d==null?void 0:d.label)||te(s.parent_id)}`})]},s.id)}),D.map(s=>e.jsxs("button",{type:"button","aria-pressed":W===s.id,"aria-label":`ÐÑбÑаÑÑ Ð¾Ð±Ð»Ð°ÑÑÑ: ${s.label}`,onClick:()=>U(s.id),children:[e.jsx("strong",{children:s.label}),e.jsx("span",{children:"ÐоÑÑÐ½Ð°Ñ Ð¾Ð¿Ð¾ÑÐ½Ð°Ñ ÑоÑка"})]},s.id))]}),N.length+P.length+D.length===0&&e.jsx("p",{className:"consumer-anatomy-3d__empty-search",role:"status",children:"ÐÐ¾Ð½Ñ Ñ Ñаким названием не найденÑ."})]}),v&&z.length>0&&e.jsxs("details",{className:"consumer-anatomy-3d__credits",children:[e.jsx("summary",{children:"ÐÑÑоÑник 3D-модели и лиÑензии"}),e.jsx("div",{className:"consumer-anatomy-3d__credits-list",children:z.map(s=>e.jsxs("section",{"aria-label":s.title,children:[e.jsx("strong",{children:s.title}),e.jsx("p",{children:s.attribution}),e.jsxs("p",{className:"consumer-anatomy-3d__credit-links",children:[e.jsx("a",{href:s.sourceNoticeUrl,target:"_blank",rel:"noreferrer",children:"ÐÑÑоÑник"}),e.jsxs("a",{href:s.licenseUrl,target:"_blank",rel:"noreferrer",children:["ÐиÑÐµÐ½Ð·Ð¸Ñ ",s.license]})]}),e.jsx("p",{children:s.modificationNotice})]},s.key))})]})]})}function Ee({onBack:r,onAddExercises:a}){const c=n.useRef(null),o=n.useRef(0),_=n.useRef(!1),f=n.useRef(0),[h,S]=n.useState(null),[R,k]=n.useState(null),[u,l]=n.useState(!1),[p,m]=n.useState(null),[x,G]=n.useState("hypertrophy"),[j,I]=n.useState(null),[q,F]=n.useState(!1),[X,T]=n.useState(!1),[b,W]=n.useState({}),[C,A]=n.useState("svg"),[Z,L]=n.useState(null),[y,w]=n.useState(!1),[g,Y]=n.useState(null),[v,O]=n.useState(null),[H,$]=n.useState(!1),z=n.useCallback(async()=>{l(!1);try{const[t,i]=await Promise.all([ie(),re().catch(()=>null)]);S(t),G(s=>{var d;return t.goals.some(E=>E.id===s)?s:((d=t.goals[0])==null?void 0:d.id)||s}),k(i),!_.current&&ae(i)&&A("3d")}catch{S(null),k(null),l(!0)}},[]);n.useEffect(()=>{var t;(t=c.current)==null||t.focus({preventScroll:!0}),z()},[z]);const B=n.useCallback(async(t,i)=>{const s=++o.current;F(!0),T(!1);try{const d=await ce(t,i);o.current===s&&I(d)}catch{o.current===s&&(I(null),T(!0))}finally{o.current===s&&F(!1)}},[]);n.useEffect(()=>{if(!p){I(null);return}return B(p,x),()=>{o.current+=1}},[B,x,p]);const J=t=>{const i=String(t.id);W(s=>{if(s[i]){const d={...s};return delete d[i],d}return Object.keys(s).length<2?{...s,[i]:t}:s})},ee=t=>{const i=++f.current;O(t),$(!0),pe(String(t.id)).then(s=>{f.current===i&&O(s)}).catch(()=>{}).finally(()=>{f.current===i&&$(!1)})},V=()=>{f.current+=1,$(!1),O(null)},se=n.useMemo(()=>new Set(Object.keys(b)),[b]),K=async()=>{const t=Object.keys(b).length;if(t<1||t>2)return;const i=Object.values(b);
2if(!(i.length<1||i.length>2||new Set(i.map(s=>String(s.id))).size!==i.length)&&a){w(!0),Y(null);try{await a(i,x)}catch{Y("Ðе ÑдалоÑÑ Ð¾ÑкÑÑÑÑ ÑÑениÑовкÑ. ÐопÑобÑй еÑÑ Ñаз.")}finally{w(!1)}}},M=n.useMemo(()=>Object.fromEntries(((h==null?void 0:h.muscles)||[]).map(t=>[t.id,t.label])),[h]),N=h==null?void 0:h.goals.find(t=>t.id===x),P=C==="3d"&&ae(R),D=Object.keys(b).length,U=e.jsxs("div",{className:"consumer-anatomy__selection-cta",children:[e.jsxs("p",{"aria-live":"polite",children:["ÐÑбÑано: ",D," из 2 (можно вÑбÑаÑÑ 1â2)"]}),e.jsx("button",{type:"button",className:"consumer-primary-button",disabled:D<1||D>2||!a||y,onClick:K,children:y?"ÐÑкÑÑваем подгоÑовкÑâ¦":"ÐобавиÑÑ Ð² ÑÑениÑовкÑ"}),g&&e.jsx("p",{role:"alert",children:g}),g&&e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:K,disabled:y,children:"ÐовÑоÑиÑÑ"})]}),Q=h&&e.jsxs("section",{className:"consumer-anatomy__goals","aria-labelledby":"consumer-anatomy-goal-title",children:[e.jsx("p",{className:"consumer-eyebrow",children:"Шаг 2"}),e.jsx("h2",{id:"consumer-anatomy-goal-title",children:"Ð¦ÐµÐ»Ñ Ð½Ð°Ð³ÑÑзки"}),e.jsx("div",{role:"radiogroup","aria-label":"Ð¦ÐµÐ»Ñ Ð½Ð°Ð³ÑÑзки",children:h.goals.map(t=>e.jsxs("button",{type:"button",role:"radio","aria-checked":x===t.id,onClick:()=>G(t.id),children:[e.jsx("strong",{children:t.label}),e.jsx("span",{children:t.description})]},t.id))})]});return v?e.jsxs("main",{className:"consumer-anatomy","aria-label":"ÐаÑÑоÑка ÑпÑÐ°Ð¶Ð½ÐµÐ½Ð¸Ñ Ð¸Ð· анаÑомии",children:[H&&e.jsx("p",{role:"status",className:"consumer-anatomy__detail-loading",children:"ÐагÑÑжаем каÑÑоÑÐºÑ ÑпÑажнениÑâ¦"}),e.jsx(ue,{exercise:v,onBack:V})]}):e.jsxs("main",{className:`consumer-anatomy${P?" consumer-anatomy--3d-active":""}`,"aria-labelledby":"consumer-anatomy-title",children:[e.jsxs("button",{type:"button",className:"consumer-context-back",onClick:r,children:[e.jsx(de,{name:"arrowLeft",width:18,height:18}),"Ð ÑÑениÑовкам"]}),e.jsx("p",{className:"consumer-eyebrow",children:"Тело и мÑÑÑÑ"}),e.jsx("h1",{id:"consumer-anatomy-title",ref:c,tabIndex:-1,children:P?"ÐÑбеÑи мÑÑÑÑ":"ÐÑбеÑи, ÑÑо ÑÑениÑоваÑÑ."}),e.jsx("p",{className:"consumer-lead",children:P?"Ðажми на Ð¼Ð¾Ð´ÐµÐ»Ñ Ð¸Ð»Ð¸ вÑбеÑи Ð·Ð¾Ð½Ñ Ð½Ð¸Ð¶Ðµ.":"Ðажми на мÑÑÑÑ, вÑбеÑи ÑÐµÐ»Ñ Ð½Ð°Ð³ÑÑзки и полÑÑи ÑпÑÐ°Ð¶Ð½ÐµÐ½Ð¸Ñ Ð¸Ð· библиоÑеки."}),u&&e.jsxs("section",{className:"consumer-state-card",role:"alert",children:[e.jsx("h2",{children:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÑÑ
емÑ"}),e.jsx("p",{children:"ÐÑовеÑÑ Ñоединение и повÑоÑи попÑÑкÑ."}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:()=>void z(),children:"ÐовÑоÑиÑÑ"})]}),!h&&!u&&e.jsxs("section",{className:"consumer-action-card consumer-action-card--loading",role:"status","aria-label":"ÐагÑÑжаем ÑÑ
ÐµÐ¼Ñ Ð¼ÑÑÑ",children:[e.jsx("span",{className:"consumer-skeleton consumer-skeleton--short"}),e.jsx("span",{className:"consumer-skeleton consumer-skeleton--title"}),e.jsx("span",{className:"consumer-skeleton"})]}),h&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"consumer-anatomy__mode-switch",role:"group","aria-label":"Режим вÑбоÑа зонÑ",children:[e.jsx("button",{type:"button",className:"consumer-secondary-button","aria-pressed":C==="svg",onClick:()=>{_.current=!0,A("svg")},children:"ÐоÑÑÑÐ¿Ð½Ð°Ñ ÑÑ
ема"}),e.jsx("button",{type:"button",className:"consumer-secondary-button","aria-pressed":C==="3d",onClick:()=>{_.current=!0,A("3d")},children:"ÐÐ¾Ð½Ñ Ñела"})]}),C==="3d"&&e.jsx(Ce,{goal:x,selectedZone:Z,selectedExerciseIds:se,onSelectExercise:J,onOpenExercise:ee,onSelectZone:t=>{L(t),t?h.muscles.some(i=>i.id===t)&&m(t):m(null)},onUseFallback:()=>{_.current=!0,A("svg")},initialCatalog:R||void 0,goalSelection:Q,goalLabel:N==null?void 0:N.label,selectionFooter:U}),C==="svg"&&e.jsxs("section",{className:"consumer-anatomy__map-card","aria-labelledby":"
2consumer-anatomy-muscle-title",children:[e.jsxs("div",{children:[e.jsx("p",{className:"consumer-eyebrow",children:"Шаг 1"}),e.jsx("h2",{id:"consumer-anatomy-muscle-title",children:"ÐÑÑÑа"}),e.jsx("p",{children:p?M[p]:"Ðажми на облаÑÑÑ Ñела"})]}),e.jsx(me,{mode:"selection",selectedMuscle:p,availableMuscles:h.muscles.map(t=>t.id),muscleLabels:M,onMuscleClick:m})]}),C==="svg"&&p&&Q,C==="svg"&&e.jsxs("section",{className:"consumer-anatomy__results","aria-labelledby":"consumer-anatomy-results-title","aria-live":"polite",children:[e.jsx("p",{className:"consumer-eyebrow",children:"ÐодÑ
одÑÑие ÑпÑажнениÑ"}),e.jsx("h2",{id:"consumer-anatomy-results-title",children:p?M[p]:"СнаÑала вÑбеÑи мÑÑÑÑ"}),p&&N&&e.jsxs("p",{className:"consumer-anatomy__prescription",children:["ÐÑиенÑиÑ: ",N.prescription.sets," подÑ
ода по"," ",N.prescription.reps_min,"-",N.prescription.reps_max," повÑоÑений,"," ","оÑдÑÑ
",N.prescription.rest_seconds," Ñек."]}),q&&e.jsx("p",{role:"status",children:"ÐодбиÑаем ÑпÑажнениÑ..."}),X&&p&&e.jsxs("div",{className:"consumer-state-card",role:"alert",children:[e.jsx("p",{children:"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÑпÑажнениÑ."}),e.jsx("button",{type:"button",className:"consumer-secondary-button",onClick:()=>void B(p,x),children:"ÐовÑоÑиÑÑ"})]}),!q&&j&&j.count===0&&e.jsx("p",{children:"ÐÐ»Ñ ÑÑой облаÑÑи пока Ð½ÐµÑ ÑпÑажнений в библиоÑеке."}),!q&&j&&j.count>0&&e.jsx("ul",{className:"consumer-anatomy__exercise-list",children:j.exercises.map(t=>e.jsxs("li",{children:[e.jsx(he,{name:t.name_ru,imageUrl:t.demonstration_image_url||t.image_url,width:64,height:64,accentColor:"var(--consumer-accent)"}),e.jsxs("span",{children:[e.jsx("strong",{children:t.name_ru}),e.jsx("small",{children:[...t.equipment||[],...t.equipment_needed||[]].some(i=>!["bodyweight","none",""].includes(i.trim().toLowerCase()))?"С инвенÑаÑÑм":"Ðез инвенÑаÑÑ"})]}),e.jsx("button",{type:"button",className:"consumer-anatomy__exercise-select","aria-pressed":!!b[String(t.id)],"aria-label":`ÐобавиÑÑ: ${t.name_ru}`,onClick:()=>J(t),children:b[String(t.id)]?"ÐÑбÑано":"ÐÑбÑаÑÑ"})]},t.id))}),(j&&j.count>=2||D>0)&&U]})]})]})}const Le=Object.freeze(Object.defineProperty({__proto__:null,default:Ee},Symbol.toStringTag,{value:"Module"}));export{Le as A,Ae as g};
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.