import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{i as t,r as n}from"./framework-CXnKph_e.js";var r=e(t(),1),i=1e-4,a=.72,o=.58,s=.025,c=.2,l=.14,u=[`predsonie`,`polyana`,`mostok`,`medved`,`pogonya`,`kum`,`pir`,`hozyain`,`moyo`,`nozh`,`probuzhdenie`],d={predsonie:{entry:{kind:`noise`,filter:`bandpass`,frequency:1050,q:.65,duration:.032,peak:.07},ambient:{afterSeconds:8.2,event:{kind:`noise`,filter:`bandpass`,frequency:380,q:.65,duration:.075,peak:.065}}},polyana:{entry:{kind:`noise`,filter:`lowpass`,frequency:420,q:.4,duration:.11,peak:.09},ambient:{afterSeconds:7.4,event:{kind:`noise`,filter:`lowpass`,frequency:280,q:.3,duration:.07,peak:.06}}},mostok:{entry:{kind:`noise`,filter:`highpass`,frequency:2400,q:.5,duration:.038,peak:.11},ambient:null},medved:{entry:{kind:`tone`,frequency:72,duration:.14,peak:.12},ambient:{afterSeconds:6.2,event:{kind:`tone`,frequency:68,duration:.12,peak:.055}}},pogonya:{entry:{kind:`noise`,filter:`bandpass`,frequency:680,q:.75,duration:.065,peak:.12},ambient:{afterSeconds:7.8,event:{kind:`noise`,filter:`lowpass`,frequency:360,q:.35,duration:.08,peak:.065}}},kum:{entry:{kind:`noise`,filter:`bandpass`,frequency:480,q:.9,duration:.072,peak:.1},ambient:{afterSeconds:8.5,event:{kind:`noise`,filter:`bandpass`,frequency:320,q:.7,duration:.09,peak:.06}}},pir:{entry:{kind:`noise`,filter:`bandpass`,frequency:920,q:.38,duration:.034,peak:.085},ambient:{afterSeconds:6.7,event:{kind:`noise`,filter:`bandpass`,frequency:430,q:.65,duration:.06,peak:.07}}},hozyain:{entry:null,ambient:null},moyo:{entry:{kind:`noise`,filter:`bandpass`,frequency:1350,q:.3,duration:.018,peak:.075},ambient:null},nozh:{entry:{kind:`noise`,filter:`lowpass`,frequency:190,q:.35,duration:.105,peak:.14},ambient:null},probuzhdenie:{entry:{kind:`noise`,filter:`bandpass`,frequency:700,q:.5,duration:.036,peak:.06},ambient:null}};function f(e,t=0,n=1){return Math.min(n,Math.max(t,Number.isFinite(e)?e:t))}function p(e){return typeof e==`number`?Number.isInteger(e)?u[e]??null:null:u.includes(e)?e:null}function m(){if(typeof window>`u`)return null;let e=window;return window.AudioContext??e.webkitAudioContext??null}function h(e,t){let n=e;if(typeof n.cancelAndHoldAtTime==`function`){n.cancelAndHoldAtTime(t);return}let r=e.value;e.cancelScheduledValues(t),e.setValueAtTime(r,t)}function g(e,t,n,r){h(e,n),e.linearRampToValueAtTime(t,n+Math.max(.01,r))}function _(e){let t=Math.ceil(e.sampleRate*.16),n=e.createBuffer(1,t,e.sampleRate),r=n.getChannelData(0);for(let e=0;e{s.disconnect(),c.disconnect(),l.disconnect()},{once:!0}),s}function b(e,t,n){let{context:r}=e,a=r.currentTime,o=f(t.duration,.04,.16),s=r.createOscillator(),c=r.createGain();return s.type=`sine`,s.frequency.setValueAtTime(t.frequency,a),c.gain.setValueAtTime(i,a),c.gain.linearRampToValueAtTime(t.peak*n,a+.004),c.gain.exponentialRampToValueAtTime(i,a+o),s.connect(c),c.connect(e.accentBus),s.start(a),s.stop(a+o),s.addEventListener(`ended`,()=>{s.disconnect(),c.disconnect()},{once:!0}),s}function x(e,t,n){let r=f(n,0,1.2);return r===0?null:t.kind===`noise`?y(e,t,r):b(e,t,r)}var S=class{constructor(e={}){this.runtime=null,this.enabledPreference=!1,this.pageVisible=typeof document>`u`?!0:!document.hidden,this.destroyed=!1,this.operation=0,this.suspendTimer=null,this.ambientTimer=null,this.activeEvent=null,this.lastEventAt=-1/0,this.hasAcknowledgedEnable=!1,this.entryPlayed=new Set,this.ambientPlayed=new Set,this.volume=f(e.volume??a),this.outputGain=f(e.outputGain??o,.1,.75),this.currentScene=p(e.initialScene??u[0])??u[0],this.accentOnEnable=e.accentOnEnable??!0}clearSuspendTimer(){this.suspendTimer!==null&&(clearTimeout(this.suspendTimer),this.suspendTimer=null)}clearAmbientTimer(){this.ambientTimer!==null&&(clearTimeout(this.ambientTimer),this.ambientTimer=null)}ensureRuntime(){if(this.runtime&&this.runtime.context.state!==`closed`)return this.runtime;let e=m();if(!e)return null;let t;try{t=new e({latencyHint:`interactive`})}catch{t=new e}let n=v(t);return this.runtime=n,n}targetMasterGain(){return this.volume*this.outputGain}stopEvent(){let e=this.activeEvent;if(this.activeEvent=null,e)try{e.stop()}catch{}}triggerEvent(e,t,n=!1){if(!e)return!1;let r=this.runtime;if(!r||r.context.state!==`running`)return!1;let i=r.context.currentTime;if(!n&&i-this.lastEventAt{this.activeEvent===a&&(this.activeEvent=null)},{once:!0}),!0):!1}scheduleAmbient(e){this.clearAmbientTimer();let t=e.ambient,n=this.runtime;if(!t||this.ambientPlayed.has(this.currentScene)||!n||!this.enabledPreference||!this.pageVisible||n.context.state!==`running`)return;let r=this.currentScene,i=f(t.afterSeconds,5,9)*1e3;this.ambientTimer=setTimeout(()=>{this.ambientTimer=null,!(this.currentScene!==r||this.ambientPlayed.has(r)||!this.enabledPreference||!this.pageVisible||this.runtime!==n||n.context.state!==`running`)&&this.triggerEvent(t.event,.68)&&this.ambientPlayed.add(r)},i)}async enable(){if(this.destroyed)return!1;this.enabledPreference=!0;let e=++this.operation;this.clearSuspendTimer(),this.clearAmbientTimer();let t;try{t=this.ensureRuntime()}catch{return this.enabledPreference=!1,!1}if(!t)return this.enabledPreference=!1,!1;if(!this.pageVisible)return t.context.state===`running`&&await t.context.suspend(),!0;try{await t.context.resume()}catch{return e===this.operation&&(this.enabledPreference=!1),!1}if(e!==this.operation||!this.enabledPreference||this.destroyed||t.context.state!==`running`)return!1;g(t.master.gain,this.targetMasterGain(),t.context.currentTime,s);let n=d[this.currentScene];return this.accentOnEnable&&!this.hasAcknowledgedEnable&&(this.hasAcknowledgedEnable=!0,!this.entryPlayed.has(this.currentScene)&&this.triggerEvent(n.entry,.65)&&this.entryPlayed.add(this.currentScene)),this.scheduleAmbient(n),!0}async disable(){this.enabledPreference=!1,++this.operation,this.clearSuspendTimer(),this.clearAmbientTimer(),this.stopEvent();let e=this.runtime;!e||e.context.state===`closed`||(g(e.master.gain,0,e.context.currentTime,c),this.suspendTimer=setTimeout(()=>{this.suspendTimer=null,!this.enabledPreference&&this.runtime===e&&e.context.state===`running`&&e.context.suspend()},Math.ceil((c+.06)*1e3)))}async toggle(){return this.enabledPreference?(await this.disable(),!1):this.enable()}async setEnabled(e){return e?this.enable():(await this.disable(),!1)}setVolume(e){this.volume=f(e);let t=this.runtime;!t||!this.enabledPreference||t.context.state!==`running`||g(t.master.gain,this.targetMasterGain(),t.context.currentTime,.1)}setScene(e,t={}){let n=p(e);if(!n||this.destroyed)return!1;let r=n!==this.currentScene;this.currentScene=n,r&&(this.clearAmbientTimer(),this.stopEvent());let i=this.runtime;if(!i||i.context.state===`closed`)return!0;let a=d[n];if(t.transitionSeconds,(r||t.forceAccent===!0)&&t.accent!==!1&&this.enabledPreference&&this.pageVisible&&i.context.state===`running`){let e=t.forceAccent===!0;(e||!this.entryPlayed.has(n))&&this.triggerEvent(a.entry,t.intensity??1,e)&&this.entryPlayed.add(n)}return this.scheduleAmbient(a),!0}async setPageVisible(e){this.pageVisible=e;let t=this.runtime;if(!(!t||t.context.state===`closed`)){if(this.clearSuspendTimer(),this.clearAmbientTimer(),!e){this.stopEvent(),t.master.gain.cancelScheduledValues(t.context.currentTime),t.master.gain.setValueAtTime(0,t.context.currentTime),t.context.state===`running`&&await t.context.suspend();return}if(this.enabledPreference){try{await t.context.resume()}catch{return}!this.enabledPreference||!this.pageVisible||t.context.state!==`running`||(g(t.master.gain,this.targetMasterGain(),t.context.currentTime,.28),this.scheduleAmbient(d[this.currentScene]))}}}getSnapshot(){let e=m()!==null,t=this.runtime?.context.state??(e?`idle`:`unavailable`);return{enabled:this.enabledPreference,audible:this.enabledPreference&&this.pageVisible&&this.runtime?.context.state===`running`,supported:e,volume:this.volume,scene:this.currentScene,contextState:t}}async destroy(){if(this.destroyed)return;this.destroyed=!0,this.enabledPreference=!1,++this.operation,this.clearSuspendTimer(),this.clearAmbientTimer(),this.stopEvent();let e=this.runtime;this.runtime=null,e&&(e.master.disconnect(),e.compressor.disconnect(),e.accentBus.disconnect(),e.context.state!==`closed`&&await e.context.close())}};function C(e={}){return new S(e)}var w=[{id:`predsonie`,number:`I`,stanza:`X`,title:`Ночь, когда гадают`,kicker:`Святки · преддверие сна`,body:`Татьяна велит накрыть в бане стол на двоих — и всё же не решается ворожить. Она снимает шёлковый пояс, кладёт под подушку девичье зеркало и засыпает.`,quote:`Легла. Над нею вьется Лель,\u2028А под подушкою пуховой\u2028Девичье зеркало лежит.\u2028Утихло все. Татьяна спит.`,image:`/art/predream.webp`,alt:`Татьяна ночью сидит у постели; зеркало скрыто под подушкой`,position:`58% 52%`,mobilePosition:`76% 50%`,tone:`void`,align:`left`,pace:`still`},{id:`polyana`,number:`II`,stanza:`XI`,title:`Снеговая поляна`,kicker:`Одна по ту сторону ночи`,body:`Во сне она идёт по снеговой поляне. Ни дороги, ни следа, ни живого голоса. Перед ней — тёмный поток, который зима не смогла сковать.`,quote:`Ей снится, будто бы она\u2028Идет по снеговой поляне,\u2028Печальной мглой окружена;`,image:`/art/hero-winter.webp`,alt:`Татьяна одна у тёмного потока в заснеженном лесу`,position:`52% 50%`,mobilePosition:`72% 50%`,tone:`cold`,align:`left`,pace:`drift`},{id:`mostok`,number:`III`,stanza:`XI`,title:`Между берегами`,kicker:`Две жерди, схваченные льдом`,body:`Вместо моста — две тонкие жерди. Вода под ними бурлит и шумит. Чтобы идти дальше, надо ступить на то, чему нельзя доверять.`,quote:`Две жердочки, склеены льдиной,\u2028Дрожащий, гибельный мосток,\u2028Положены через поток;`,image:`/art/hero-winter.webp`,alt:`Заледенелые жерди над незамёрзшим потоком`,position:`38% 66%`,mobilePosition:`25% 55%`,tone:`cold`,align:`right`,pace:`fracture`},{id:`medved`,number:`IV`,stanza:`XII`,title:`Лапа из сугроба`,kicker:`Помощник или преследователь`,body:`Из сугроба поднимается большой взъерошенный медведь. Он протягивает Татьяне лапу и помогает перейти. Но едва она ступает на снег, медведь идёт следом.`,quote:`Дрожащей ручкой оперлась\u2028И боязливыми шагами\u2028Перебралась через ручей;\u2028Пошла — и что ж? медведь за ней!`,image:`/art/bear-crossing.webp`,alt:`Медведь протягивает Татьяне лапу над шатким мостком`,position:`50% 52%`,mobilePosition:`52% 50%`,tone:`cold`,align:`right`,pace:`fracture`},{id:`pogonya`,number:`V`,stanza:`XIII–XIV`,title:`Косматый лакей`,kicker:`Лес смыкается`,body:`Сук цепляет её за шею; серьги вырываются, башмачок вязнет в снегу, падает платок. Она не смеет остановиться. Но сил уже нет.`,quote:`Она бежит, он все вослед,\u2028И сил уже бежать ей нет.`,image:`/art/bear-hut.webp`,alt:`Медведь несёт потерявшую силы Татьяну через зимний лес`,position:`29% 54%`,mobilePosition:`23% 52%`,tone:`cold`,align:`right`,pace:`drift`},{id:`kum`,number:`VI`,stanza:`XV`,title:`Здесь мой кум`,kicker:`Один свет среди леса`,body:`Татьяна падает. Медведь подхватывает её и несёт к убогому шалашу. В окне горит свет. Оставляя девушку на пороге, зверь называет хозяина своим кумом.`,quote:`Медведь промолвил: «Здесь мой кум:\u2028Погрейся у него немножко!»\u2028И в сени прямо он идет\u2028И на порог ее кладет.`,image:`/art/bear-hut.webp`,alt:`Вдали среди леса светится окно маленькой хижины`,position:`71% 48%`,mobilePosition:`82% 48%`,tone:`amber`,align:`left`,pace:`still`},{id:`pir`,number:`VII`,stanza:`XVI–XVII`,title:`Как на похоронах`,kicker:`За дверью — крик и звон стакана`,body:`В сенях Татьяна приходит в себя. Медведя нет. Она глядит в щёлку: за столом сидят существа из перевёрнутого лубка — рог, клюв, хвост, кости, лапы и крылья.`,quote:`Не видя тут ни капли толку,\u2028Глядит она тихонько в щелку,\u2028И что же видит?.. за столом\u2028Сидят чудовища кругом:`,image:`/art/feast.webp`,alt:`Татьяна сквозь щель видит Онегина на пиру среди чудовищ`,position:`62% 48%`,mobilePosition:`60% 50%`,tone:`amber`,align:`left`,pace:`drift`},{id:`hozyain`,number:`VIII`,stanza:`XVII–XVIII`,title:`Хозяин`,kicker:`Тот, кто мил и страшен ей`,body:`Среди чудовищ — Онегин. Он пьёт: все пьют. Он смеётся: все хохочут. Он хмурится: пир смолкает. Его взгляд всё время возвращается к двери.`,quote:`Он знак подаст — и все хлопочут;\u2028Он пьет — все пьют и все кричат;\u2028Он засмеется — все хохочут;\u2028Нахмурит брови — все молчат;`,image:`/art/feast.webp`,alt:`Онегин неподвижно сидит в центре странного пира`,position:`55% 44%`,mobilePosition:`51% 45%`,tone:`amber`,align:`right`,pace:`still`},{id:`moyo`,number:`IX`,stanza:`XVIII–XX`,title:`Моё`,kicker:`Свет гаснет`,body:`Ветер гасит огни. Чудовища указывают на Татьяну и кричат: «моё!». Слово Онегина заставляет шайку исчезнуть, но звучит и как защита, и как притязание. Оставшись с Татьяной, он отводит её в угол, укладывает на шаткую скамью и склоняет голову к её плечу.`,quote:`Всё указует на нее,\u2028И все кричат: мое! мое!\u2028Мое! — сказал Евгений грозно,\u2028И шайка вся сокрылась вдруг;`,image:`/art/mine.webp`,alt:`Онегин у распахнутой двери; чудовища указывают на Татьяну`,position:`52% 48%`,mobilePosition:`60% 49%`,tone:`void`,align:`right`,pace:`fracture`},{id:`nozh`,number:`X`,stanza:`XX–XXI`,title:`Длинный нож`,kicker:`Сон предсказывает — и обманывает`,body:`Входят Ольга и Ленский. Вспыхивает свет, спор становится всё громче. Онегин хватает длинный нож. Ленский падает. Хижина содрогается.`,quote:`Спор громче, громче; вдруг Евгений\u2028Хватает длинный нож, и вмиг\u2028Повержен Ленский; страшно тени\u2028Сгустились; нестерпимый крик`,image:`/art/knife-v3.webp`,alt:`Темноволосый Онегин с длинным ножом и юный Ленский с чёрными кудрями до плеч в хижине`,position:`53% 49%`,mobilePosition:`71% 50%`,tone:`void`,align:`left`,pace:`fracture`},{id:`probuzhdenie`,number:`XI`,stanza:`XXI–XXIV`,title:`Пробуждение`,kicker:`Утро не даёт ответа`,body:`Татьяна просыпается при свете зари. На вопрос Ольги она ничего не отвечает. Сонник Мартына Задеки тоже промолчит — и ещё несколько дней тревога не оставит её.`,quote:`И Таня в ужасе проснулась...\u2028Глядит, уж в комнате светло;\u2028В окне сквозь мерзлое стекло\u2028Зари багряный луч играет;`,image:`/art/wake.webp`,alt:`Татьяна просыпается в своей комнате на зимнем рассвете`,position:`55% 48%`,mobilePosition:`42% 50%`,tone:`dawn`,align:`left`,pace:`still`}],T=[`в рогах с собачьей мордой`,`с петушьей головой`,`ведьма с козьей бородой`,`остов чопорный и гордый`,`карла с хвостиком`,`полужуравль и полукот`,`рак верхом на пауке`,`череп на гусиной шее`,`мельница вприсядку`],E=n();function D(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function O(){return(0,E.jsxs)(`div`,{className:`frost-crack`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{className:`crack-segment crack-segment-a`}),(0,E.jsx)(`i`,{className:`crack-segment crack-segment-b`}),(0,E.jsx)(`i`,{className:`crack-segment crack-segment-c`}),(0,E.jsx)(`i`,{className:`crack-segment crack-segment-d`}),(0,E.jsx)(`i`,{className:`crack-segment crack-segment-e`})]})}function k(){let e=(0,r.useRef)(null),t=(0,r.useRef)([]),n=(0,r.useRef)(null),i=(0,r.useRef)(null),a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=(0,r.useRef)(null),[c,l]=(0,r.useState)(0),[u,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)(.72),g=w[c]??w[0],_=(0,r.useCallback)(async()=>{let e=s.current;e&&p(await e.toggle())},[]),v=(0,r.useCallback)(()=>{d(!1),window.setTimeout(()=>n.current?.focus(),0)},[]),y=(0,r.useCallback)(e=>{d(!1),window.setTimeout(()=>{let t=document.getElementById(e);if(!t)return;let n=t.querySelector(`h2`),r=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;t?.scrollIntoView({behavior:r?`auto`:`smooth`,block:`start`});let i=window.scrollY,a=0,o=performance.now(),s=()=>{let e=Math.abs(window.scrollY-i),r=Math.abs(t.getBoundingClientRect().top);if(i=window.scrollY,a=e<.5&&r<2?a+1:0,a>=3||performance.now()-o>4e3){n?.focus({preventScroll:!0});return}window.requestAnimationFrame(s)};window.requestAnimationFrame(s)},0)},[]);return(0,r.useEffect)(()=>{let e=C({volume:m,initialScene:c});s.current=e;let t=()=>{e.setPageVisible(!document.hidden)};return document.addEventListener(`visibilitychange`,t),()=>{document.removeEventListener(`visibilitychange`,t),s.current=null,e.destroy()}},[]),(0,r.useEffect)(()=>{s.current?.setVolume(m)},[m]),(0,r.useEffect)(()=>{s.current?.setScene(c,{accent:!0})},[c]),(0,r.useEffect)(()=>{if(!u)return;document.body.dataset.menuOpen=`true`,i.current?.focus();let e=e=>{if(e.key===`Escape`){v();return}if(e.key!==`Tab`)return;let t=a.current?.querySelectorAll(`button:not([disabled]), a[href], input:not([disabled]), [tabindex]:not([tabindex="-1"])`);if(!t?.length)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())};return window.addEventListener(`keydown`,e),()=>{delete document.body.dataset.menuOpen,window.removeEventListener(`keydown`,e)}},[v,u]),(0,r.useEffect)(()=>{let n=document.documentElement;n.dataset.enhanced=`true`;let r=window.matchMedia(`(prefers-reduced-motion: reduce)`),i=r.matches,a=0,s=()=>{a=0;let r=e.current;if(!r)return;let s=r.offsetHeight-window.innerHeight||window.innerHeight,c=D((window.scrollY-r.offsetTop)/s);if(n.style.setProperty(`--page-progress`,c.toFixed(4)),o.current?.setAttribute(`aria-valuenow`,String(Math.round(c*100))),i)return;let l=window.innerHeight;t.current.forEach(e=>{if(!e)return;let t=e.getBoundingClientRect();if(t.bottom<-l||t.top>l*2)return;let n=D((l-t.top)/(t.height+l)),r=Math.max(1,t.height-l),i=D(-t.top/r);e.style.setProperty(`--scene-progress`,n.toFixed(4)),e.style.setProperty(`--sticky-progress`,i.toFixed(4))})},c=()=>{a||=window.requestAnimationFrame(s)},u=e=>{i=e.matches,c()},d=new IntersectionObserver(e=>{for(let n of e){if(!n.isIntersecting)continue;let e=t.current.indexOf(n.target);e>=0&&l(e)}},{rootMargin:`-43% 0px -43% 0px`,threshold:0});return t.current.forEach(e=>{e&&d.observe(e)}),window.addEventListener(`scroll`,c,{passive:!0}),window.addEventListener(`resize`,c,{passive:!0}),r.addEventListener(`change`,u),s(),()=>{delete n.dataset.enhanced,a&&window.cancelAnimationFrame(a),d.disconnect(),window.removeEventListener(`scroll`,c),window.removeEventListener(`resize`,c),r.removeEventListener(`change`,u)}},[]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`a`,{className:`skip-link`,href:`#istoriya`,children:`Перейти к истории`}),(0,E.jsxs)(`header`,{className:`story-header`,children:[(0,E.jsxs)(`a`,{className:`story-mark`,href:`#nachalo`,"aria-label":`К началу истории`,children:[(0,E.jsx)(`span`,{children:`А. С. Пушкин`}),(0,E.jsx)(`strong`,{children:`Сон Татьяны`})]}),(0,E.jsxs)(`p`,{className:`active-chapter`,"aria-live":`polite`,children:[(0,E.jsx)(`span`,{children:g.number}),g.title]}),(0,E.jsxs)(`div`,{className:`header-actions`,children:[(0,E.jsxs)(`button`,{className:`sound-toggle ${f?`is-on`:``}`,type:`button`,"aria-pressed":f,onClick:_,children:[(0,E.jsxs)(`span`,{className:`sound-glyph`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{}),(0,E.jsx)(`i`,{}),(0,E.jsx)(`i`,{})]}),(0,E.jsx)(`span`,{children:f?`Звук включён`:`Включить звук`})]}),(0,E.jsxs)(`button`,{ref:n,className:`menu-toggle`,type:`button`,"aria-expanded":u,"aria-controls":`chapter-menu`,"aria-label":`Открыть оглавление`,onClick:()=>d(!0),children:[(0,E.jsx)(`span`,{children:`Главы`}),(0,E.jsx)(`i`,{"aria-hidden":`true`})]})]})]}),(0,E.jsxs)(`aside`,{className:`chapter-rail`,"aria-label":`Ход истории`,children:[(0,E.jsx)(`div`,{ref:o,className:`rail-progress`,role:`progressbar`,"aria-label":`Прочитано`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0,children:(0,E.jsx)(`i`,{})}),(0,E.jsx)(`ol`,{children:w.map((e,t)=>(0,E.jsx)(`li`,{children:(0,E.jsxs)(`a`,{href:`#${e.id}`,"aria-label":`${e.number}. ${e.title}`,"aria-current":t===c?`step`:void 0,children:[(0,E.jsx)(`span`,{children:e.number}),(0,E.jsx)(`i`,{})]})},e.id))})]}),(0,E.jsxs)(`main`,{ref:e,id:`istoriya`,children:[(0,E.jsxs)(`section`,{className:`hero`,id:`nachalo`,"aria-labelledby":`story-title`,children:[(0,E.jsx)(`img`,{className:`hero-art`,src:`/art/hero-winter.webp`,alt:``,width:1536,height:1024,fetchPriority:`high`}),(0,E.jsx)(`div`,{className:`hero-wash`,"aria-hidden":`true`}),(0,E.jsx)(`div`,{className:`hero-frost`,"aria-hidden":`true`}),(0,E.jsx)(O,{}),(0,E.jsxs)(`div`,{className:`hero-meta`,children:[(0,E.jsx)(`p`,{children:`Александр Пушкин`}),(0,E.jsx)(`span`,{children:`Пятая глава «Евгения Онегина»`})]}),(0,E.jsxs)(`div`,{className:`hero-title-lockup`,children:[(0,E.jsxs)(`p`,{className:`hero-overline`,children:[`«О, не знай сих страшных снов…»`,(0,E.jsx)(`cite`,{children:`В. А. Жуковский · «Светлана»`})]}),(0,E.jsxs)(`h1`,{id:`story-title`,children:[(0,E.jsx)(`span`,{children:`Сон`}),(0,E.jsx)(`em`,{children:`Татьяны`})]}),(0,E.jsxs)(`p`,{className:`hero-deck`,children:[`Одиннадцать сцен о границе между любовью и страхом.`,(0,E.jsx)(`br`,{}),`Прокрутите, чтобы войти в сон.`]})]}),(0,E.jsxs)(`div`,{className:`hero-actions`,children:[(0,E.jsxs)(`a`,{className:`enter-dream`,href:`#predsonie`,children:[(0,E.jsx)(`span`,{children:`Войти в сон`}),(0,E.jsx)(`i`,{"aria-hidden":`true`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`headphones`,"aria-pressed":f,"aria-label":f?`Выключить звук`:`Включить звук — лучше в наушниках`,onClick:_,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,children:`◌`}),f?`Звук включён`:`Лучше в наушниках`]})]}),(0,E.jsx)(`p`,{className:`hero-duration`,children:`≈ 8 минут · звук необязателен`})]}),(0,E.jsx)(`article`,{className:`story-article`,"aria-label":`Сон Татьяны`,children:w.map((e,n)=>{let i={"--art-position":e.position,"--art-position-mobile":e.mobilePosition},a=e.id===`pir`,o=e.id===`moyo`,s=e.id===`nozh`;return(0,E.jsxs)(r.Fragment,{children:[(0,E.jsx)(`section`,{ref:e=>{t.current[n]=e},id:e.id,className:`story-scene tone-${e.tone} align-${e.align} pace-${e.pace}`,style:i,"aria-labelledby":`${e.id}-title`,children:(0,E.jsxs)(`div`,{className:`scene-stage`,children:[(0,E.jsxs)(`div`,{className:`scene-art`,children:[(0,E.jsx)(`img`,{src:e.image,alt:e.alt,width:1536,height:1024,loading:`lazy`,decoding:`async`}),a&&(0,E.jsx)(`div`,{className:`monster-reveal`,"aria-hidden":`true`,children:(0,E.jsx)(`img`,{src:e.image,alt:``,width:1536,height:1024,loading:`lazy`,decoding:`async`})}),(0,E.jsx)(`div`,{className:`scene-shade`,"aria-hidden":`true`}),(0,E.jsx)(`div`,{className:`paper-grain`,"aria-hidden":`true`}),(0,E.jsx)(`div`,{className:`frost-veil`,"aria-hidden":`true`}),(0,E.jsx)(O,{})]}),o&&(0,E.jsxs)(`div`,{className:`scene-motion mine-lighting`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{className:`mine-ember`}),(0,E.jsx)(`i`,{className:`mine-blackout`})]}),s&&(0,E.jsxs)(`div`,{className:`scene-motion knife-strike`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{className:`knife-flash`}),(0,E.jsx)(`i`,{className:`knife-shockwave`})]}),o&&(0,E.jsxs)(`div`,{className:`mine-echoes`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:`моё`}),(0,E.jsx)(`span`,{children:`моё`}),(0,E.jsx)(`span`,{children:`моё`})]}),(0,E.jsxs)(`div`,{className:`scene-index`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:e.number}),(0,E.jsx)(`i`,{}),(0,E.jsx)(`small`,{children:e.stanza})]}),(0,E.jsxs)(`div`,{className:`scene-copy`,children:[(0,E.jsx)(`p`,{className:`scene-kicker`,children:e.kicker}),(0,E.jsx)(`h2`,{id:`${e.id}-title`,tabIndex:-1,children:e.title}),(0,E.jsx)(`p`,{className:`scene-body`,children:e.body}),(0,E.jsxs)(`blockquote`,{children:[(0,E.jsx)(`span`,{children:`«`}),e.quote]})]}),a&&(0,E.jsxs)(`div`,{className:`bestiary`,"aria-label":`Чудовища из сна`,children:[(0,E.jsx)(`p`,{children:`За столом`}),(0,E.jsx)(`ul`,{children:T.map(e=>(0,E.jsx)(`li`,{children:e},e))})]})]})}),n===0&&(0,E.jsxs)(`div`,{className:`threshold`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:`Явь`}),(0,E.jsx)(`i`,{}),(0,E.jsx)(`span`,{children:`Сон`})]})]},e.id)})}),(0,E.jsxs)(`section`,{className:`afterword`,"aria-labelledby":`afterword-title`,children:[(0,E.jsx)(`div`,{className:`afterword-number`,"aria-hidden":`true`,children:`V`}),(0,E.jsxs)(`div`,{className:`afterword-copy`,children:[(0,E.jsx)(`p`,{className:`scene-kicker`,children:`После сна`}),(0,E.jsx)(`h2`,{id:`afterword-title`,children:`Предсказание с неверной деталью`}),(0,E.jsx)(`p`,{children:`Сон предвосхищает гибель Ленского, но не повторяет будущее буквально: во сне Онегин берётся за длинный нож, наяву прозвучит пистолетный выстрел. Пушкин оставляет видение между пророчеством, святочным страхом и тайным знанием самой Татьяны.`}),(0,E.jsx)(`p`,{children:`Медведь сперва помогает, потом преследует. «Моё!» одновременно спасает и присваивает. У этого сна нет одной разгадки — и сонник Мартына Задеки её не находит.`})]}),(0,E.jsxs)(`figure`,{className:`afterword-fragment`,children:[(0,E.jsx)(`img`,{src:`/art/wake.webp`,alt:`Рассветный луч проходит сквозь морозный узор на окне`,width:1536,height:1024,loading:`lazy`}),(0,E.jsxs)(`figcaption`,{children:[`«Бор, буря, ведьма, ель…»`,(0,E.jsx)(`span`,{children:`Татьяна ищет ключ к видению`})]})]})]}),(0,E.jsxs)(`footer`,{className:`story-footer`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{children:`Александр Сергеевич Пушкин`}),(0,E.jsx)(`h2`,{children:`«Евгений Онегин», глава V`})]}),(0,E.jsxs)(`p`,{children:[`Текст сверен по академической публикации`,` `,(0,E.jsx)(`a`,{href:`https://rvb.ru/pushkin/01text/04onegin/01onegin/0836-05.htm`,target:`_blank`,rel:`noreferrer`,children:`Русской виртуальной библиотеки`}),`. Иллюстрации и цифровая режиссура созданы специально для этой истории.`]}),(0,E.jsxs)(`a`,{className:`back-to-top`,href:`#nachalo`,children:[`Вернуться к началу `,(0,E.jsx)(`span`,{"aria-hidden":`true`,children:`↑`})]})]})]}),(0,E.jsxs)(`div`,{id:`chapter-menu`,className:`chapter-menu ${u?`is-open`:``}`,"aria-hidden":!u,children:[(0,E.jsx)(`button`,{className:`menu-backdrop`,type:`button`,tabIndex:u?0:-1,"aria-label":`Закрыть оглавление`,onClick:v}),(0,E.jsxs)(`div`,{ref:a,className:`menu-panel`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`menu-title`,children:[(0,E.jsxs)(`div`,{className:`menu-heading`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{children:`Пятая глава`}),(0,E.jsx)(`h2`,{id:`menu-title`,children:`Оглавление сна`})]}),(0,E.jsxs)(`button`,{ref:i,type:`button`,className:`menu-close`,onClick:v,children:[(0,E.jsx)(`span`,{children:`Закрыть`}),(0,E.jsx)(`i`,{"aria-hidden":`true`})]})]}),(0,E.jsx)(`ol`,{className:`menu-chapters`,children:w.map((e,t)=>(0,E.jsx)(`li`,{children:(0,E.jsxs)(`button`,{type:`button`,onClick:()=>y(e.id),"aria-current":t===c?`step`:void 0,children:[(0,E.jsx)(`span`,{children:e.number}),(0,E.jsx)(`strong`,{children:e.title}),(0,E.jsx)(`small`,{children:e.kicker}),(0,E.jsx)(`i`,{"aria-hidden":`true`,children:`↘`})]})},e.id))}),(0,E.jsxs)(`div`,{className:`sound-settings`,children:[(0,E.jsx)(`button`,{type:`button`,className:f?`is-on`:``,"aria-pressed":f,onClick:_,children:f?`Выключить звук`:`Включить звук`}),(0,E.jsxs)(`label`,{children:[(0,E.jsx)(`span`,{children:`Громкость`}),(0,E.jsx)(`input`,{type:`range`,min:`0`,max:`1`,step:`0.01`,value:m,onChange:e=>h(Number(e.target.value)),"aria-label":`Громкость звуковой атмосферы`})]})]})]})]})]})}export{k as StoryExperience};