-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.min.js
More file actions
1 lines (1 loc) · 41.5 KB
/
Copy pathscript.min.js
File metadata and controls
1 lines (1 loc) · 41.5 KB
1
function escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const REVEAL_THRESHOLD=.15;function initScrollReveal(){const e=document.querySelectorAll(".reveal");e.length&&(observer=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("visible"),observer.unobserve(e.target))})},{threshold:.15}),e.forEach((e,t)=>{e.style.transitionDelay=50*t+"ms",observer.observe(e)}))}function initCaseTabs(){const e=document.querySelectorAll(".case-tab");e.length&&e.forEach(e=>{e.addEventListener("click",()=>function(e){const t=e.getAttribute("data-tab"),n=e.closest("main");n.querySelectorAll(".case-tab").forEach(e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),n.querySelectorAll(".case-tab-panel").forEach(e=>e.classList.remove("active")),e.classList.add("active"),e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0");const o=n.querySelector(`.case-tab-panel[data-panel="${t}"]`);o&&(o.classList.add("active"),o.querySelectorAll(".reveal:not(.visible)").forEach(e=>{observer&&observer.observe(e)}))}(e)),e.addEventListener("keydown",t=>{const n=Array.from(e.closest('[role="tablist"]').querySelectorAll('[role="tab"]')),o=n.indexOf(e);let a;"ArrowRight"===t.key?a=n[(o+1)%n.length]:"ArrowLeft"===t.key&&(a=n[(o-1+n.length)%n.length]),a&&(t.preventDefault(),a.focus(),a.click())})})}function initProjectLinks(){document.querySelectorAll(".project-name-link[data-href]").forEach(e=>{function t(t){t.stopPropagation(),t.preventDefault(),window.open(e.dataset.href,"_blank")}e.addEventListener("click",t),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||t(e)})})}function initGoatCounterEvents(){if(window.goatcounter&&window.goatcounter.count&&(document.querySelectorAll(".project-name-link").forEach(t=>{t.addEventListener("click",()=>{const n=t.closest(".project-item")?.querySelector(".project-name-title")?.textContent?.trim()||"unknown";e("ext-"+n.toLowerCase().replace(/\s+/g,"-"),"External: "+n)})}),document.querySelectorAll(".nav-lang a").forEach(t=>{t.addEventListener("click",()=>{const n=t.href.includes("/en/")||"En"===t.textContent.trim()?"en":"ru";e("lang-switch-to-"+n,"Language: "+n.toUpperCase())})}),document.querySelectorAll(".about-links a").forEach(t=>{t.addEventListener("click",()=>{const n=t.textContent.trim().toLowerCase();e("contact-"+n,"Contact: "+n)})}),document.querySelectorAll(".case-tab").forEach(t=>{t.addEventListener("click",()=>{const n=t.getAttribute("data-tab"),o=document.title.split("—")[0].trim().toLowerCase().replace(/\s+/g,"-");e("tab-"+o+"-"+n,"Tab: "+o+" / "+n)})}),document.querySelector(".main--case"))){let t=!1;window.addEventListener("scroll",()=>{if(t)return;if((window.scrollY+window.innerHeight)/document.documentElement.scrollHeight>=.9){t=!0;const n=document.title.split("—")[0].trim().toLowerCase().replace(/\s+/g,"-");e("read-complete-"+n,"Read complete: "+n)}})}function e(e,t){window.goatcounter.count({path:e,title:t,event:!0})}}let observer;function initLightbox(){const e=document.createElement("div");e.className="case-lightbox",e.setAttribute("role","dialog"),e.setAttribute("aria-label","Image viewer"),e.innerHTML='<img alt=""><button class="lb-close" aria-label="Close">×</button><video autoplay loop muted playsinline style="display:none">',document.body.appendChild(e);let t=null;const n=e.querySelector("img"),o=e.querySelector("video");let a=1,s=0,r=0;let i=!1,l=0,c=0,d=!1;function p(){a>1?(n.style.transform="scale("+a+") translate("+s/a+"px,"+r/a+"px)",n.style.cursor="grab"):(n.style.transform="",n.style.cursor="zoom-in",s=0,r=0)}function u(){a=1,s=0,r=0,p()}function m(a,s){s?(n.style.display="none",o.style.display="",o.src=a,o.play()):(o.style.display="none",n.style.display="",n.src=a,n.style.maxWidth="95vw",n.style.maxHeight="95vh",n.style.width="auto",n.style.height="auto"),u(),e.classList.add("open"),e.style.touchAction="none",t=document.activeElement,e.querySelector(".lb-close").focus()}function f(){e.classList.remove("open"),e.style.touchAction="",o.pause(),o.removeAttribute("src"),o.style.display="none",n.style.display="",u(),t&&t.focus()}e.addEventListener("keydown",t=>{"Tab"===t.key&&(t.preventDefault(),e.querySelector(".lb-close").focus())}),document.addEventListener("click",e=>{const t=e.target.closest(".case-video video, .case-hero-video video");if(t){const e=t.querySelector("source[src]");return void m(e?e.src:t.src,!0)}const n=e.target.closest(".case-img-full, .case-img-row img");if(!n)return;let o=n.src;const a=n.closest("picture");if(a){const e=a.querySelector("source[srcset]");e&&(o=e.getAttribute("srcset"))}m(o)}),e.addEventListener("click",e=>{d?d=!1:f()}),e.addEventListener("mousedown",e=>{a<=1||(i=!0,d=!1,l=e.clientX-s,c=e.clientY-r,n.style.cursor="grabbing",e.preventDefault())}),e.addEventListener("mousemove",e=>{i&&(s=e.clientX-l,r=e.clientY-c,d=!0,p())}),e.addEventListener("mouseup",()=>{i=!1,a>1&&(n.style.cursor="grab")}),document.addEventListener("keydown",e=>{"Escape"===e.key&&f()}),e.addEventListener("wheel",t=>{e.classList.contains("open")&&(t.preventDefault(),a=t.deltaY<0?Math.min(5,a+.15):Math.max(1,a-.15),p())},{passive:!1});let g=0,y=0,h=0;e.addEventListener("touchstart",e=>{2===e.touches.length?g=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY):1===e.touches.length&&a>1&&(i=!0,d=!1,y=e.touches[0].clientX-s,h=e.touches[0].clientY-r)},{passive:!0}),e.addEventListener("touchmove",t=>{if(e.classList.contains("open"))if(2===t.touches.length){t.preventDefault();const e=Math.hypot(t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY);if(g>0){const t=e/g;a=Math.min(5,Math.max(1,a*t)),p()}g=e}else 1===t.touches.length&&i&&a>1&&(t.preventDefault(),s=t.touches[0].clientX-y,r=t.touches[0].clientY-h,d=!0,p())},{passive:!1}),e.addEventListener("touchend",()=>{g=0,i=!1},{passive:!0})}function initBurger(){const e=document.querySelector(".nav-burger"),t=document.querySelector(".nav-mobile");if(!e||!t)return;const n=document.querySelector(".nav-links"),o=document.querySelector(".nav-lang");if(n&&n.querySelectorAll("a").forEach(e=>{const n=e.cloneNode(!0);t.appendChild(n)}),o){const e=document.createElement("div");e.className="nav-mobile-lang",e.innerHTML=o.innerHTML,t.appendChild(e)}e.addEventListener("click",()=>{const n=e.classList.toggle("open");t.classList.toggle("open",n),e.setAttribute("aria-expanded",String(n)),t.setAttribute("aria-hidden",String(!n)),document.body.style.overflow=n?"hidden":""}),t.addEventListener("click",n=>{"A"===n.target.tagName&&(e.classList.remove("open"),t.classList.remove("open"),e.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true"),document.body.style.overflow="")}),document.addEventListener("keydown",n=>{"Escape"===n.key&&t.classList.contains("open")&&e.click()})}function initDynamicFavicon(){const e=location.pathname.match(/projects\/([a-z-]+)/);if(!e)return;const t={flora:"#f48fb1",enxt:"#1976d2",teletype:"#4caf50",skysmart:"#ff9800",osme:"#9c27b0",sami:"#222",vedic:"#ca4f7d",qlean:"#00bcd4",prosto:"#ff5722",kombo:"#795548","singularity-hub":"#3f51b5","singularity-words":"#3f51b5"}[e[1]];if(!t)return;const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><circle cx="24" cy="24" r="24" fill="${t}"/></svg>`,o=document.querySelector('link[rel="icon"]');o&&(o.href="data:image/svg+xml,"+encodeURIComponent(n))}function initTerminal(){let e=null;const t=!location.pathname.includes("/en/"),n=[];let o=-1;const a={teletype:"teletype",sami:"sami",vedic:"vedic",enxt:"enxt",skysmart:"skysmart",osme:"osme",flora:"flora",qlean:"qlean",prosto:"prosto",kombo:"kombo",appteka:"appteka",hse:"hse","singularity-hub":"singularity-hub","singularity-words":"singularity-words","телетайп":"teletype","сами":"sami","просто":"prosto","комбо":"kombo"},s=['"Good design is as little design as possible." — Dieter Rams','"Design is not just what it looks like. Design is how it works." — Steve Jobs','"Simplicity is the ultimate sophistication." — Leonardo da Vinci','"The details are not the details. They make the design." — Charles Eames','"Less, but better." — Dieter Rams','"Design is intelligence made visible." — Alina Wheeler','"White space is to be regarded as an active element, not a passive background." — Jan Tschichold','"A user interface is like a joke. If you have to explain it, it\'s not that good." — Martin LeBlanc','"Typography is the craft of endowing human language with a durable visual form." — Robert Bringhurst','"Have no fear of perfection — you\'ll never reach it." — Salvador Dalí','"The best design is the one you don\'t notice." — Joe Sparano','"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." — Antoine de Saint-Exupéry','"Make it simple, but significant." — Don Draper','"Color does not add a pleasant quality to design — it reinforces it." — Pierre Bonnard','"Design creates culture. Culture shapes values. Values determine the future." — Robert L. Peters','"Every great design begins with an even better story." — Lorinda Mamo','"People ignore design that ignores people." — Frank Chimero','"Styles come and go. Good design is a language, not a style." — Massimo Vignelli','"The public is more familiar with bad design than good design. It is, in effect, conditioned to prefer bad design." — Paul Rand','"You can\'t use up creativity. The more you use, the more you have." — Maya Angelou','"Design is thinking made visual." — Saul Bass','"Content precedes design. Design in the absence of content is not design, it\'s decoration." — Jeffrey Zeldman','"Whitespace is like air: it is necessary for design to breathe." — Wojciech Zieliński','"Good design is obvious. Great design is transparent." — Joe Sparano','"If you think good design is expensive, you should look at the cost of bad design." — Ralf Speth','"The best error message is the one that never shows up." — Thomas Fuchs','"Consistency is one of the most powerful usability principles." — Jakob Nielsen','"A beautiful product that doesn\'t work very well is ugly." — Jonathan Ive','"Design is the silent ambassador of your brand." — Paul Rand','"Creativity is just connecting things." — Steve Jobs'],r=["help","projects","contact","skills","about","open","neofetch","fortune","sudo","rm","matrix","ls","git","radar","clear","exit"],i={help:()=>t?"projects\ncontact\nskills\nabout\nopen <проект> перейти к кейсу\nls -la файловая система\ngit log последние коммиты\nradar что меняет дизайн\nneofetch системная инфо\nfortune цитата о дизайне\nsudo\nrm -rf /\nmatrix":"projects\ncontact\nskills\nabout\nopen <project> go to case\nls -la file system\ngit log recent commits\nradar design × AI feed\nneofetch system info\nfortune design quote\nsudo\nrm -rf /\nmatrix",projects:()=>t?"Телетайп · Сами · Jyomi · ENXT · Skysmart · Osme · Flora Delivery · Qlean · Просто · Комбо":"Teletype · Sami · Jyomi · ENXT · Skysmart · Osme · Flora Delivery · Qlean · Prosto · Kombo",contact:()=>"telegram: @diyoriko\nemail: diyor.khakimov@gmail.com\nlinkedin: /in/diyoriko",skills:()=>"Design: Product, Brand, UI/UX, Packaging, Print\nCode: TypeScript, AI Agents, Bots, Automation",about:()=>t?"Диёр Хакимов — продуктовый дизайнер и разработчик, 10+ лет опыта.\nЖиву в Каше, Турция. Готов к релокации.":"Diyor Khakimov — product designer & developer, 10+ years of experience.\nBased in Kaş, Turkey. Open to relocation.",neofetch:()=>{const e=navigator.userAgent,t=e.includes("Chrome")?"Chrome":e.includes("Firefox")?"Firefox":e.includes("Safari")?"Safari":"Unknown";return'<span style="color:#f8401c"> ██████╗ </span> <span style="color:#f8401c">diyor</span>@design\n<span style="color:#f8401c"> ██╔══██╗ </span> ──────────────\n<span style="color:#f8401c"> ██║ ██║ </span> OS: '+(e.includes("Mac")?"macOS":e.includes("Win")?"Windows":e.includes("Linux")?"Linux":"Unknown")+'\n<span style="color:#f8401c"> ██║ ██║ </span> Browser: '+t+'\n<span style="color:#f8401c"> ██████╔╝ </span> Resolution: '+(window.innerWidth+"x"+window.innerHeight)+'\n<span style="color:#f8401c"> ╚═════╝ </span> Stack: HTML/CSS/JS (vanilla)\n Projects: 15\n Frameworks: 0\n Dependencies: 0'},fortune:()=>(i._fortunePool&&i._fortunePool.length||(i._fortunePool=s.slice().sort(()=>Math.random()-.5)),i._fortunePool.pop()),sudo:()=>t?"У вас нет прав. Но есть вкус.":"Permission denied. But you have great taste.","rm -rf /":()=>{const e=document.querySelectorAll("main > *, .nav, .ghost");return e.forEach((e,t)=>{e.style.transition="all 0.8s ease",e.style.transitionDelay=60*t+"ms",e.style.transform="rotate("+(40*Math.random()-20)+"deg) translateY("+(window.innerHeight+200)+"px)",e.style.opacity="0"}),setTimeout(()=>{e.forEach(e=>{e.style.transition="all 0.6s ease",e.style.transform="",e.style.opacity=""})},2500),t?"Удаление... шучу. Всё вернётся.":"Deleting... just kidding. It'll come back."},matrix:()=>(startMatrix(),t?"Добро пожаловать в Матрицу...":"Welcome to the Matrix..."),ls:()=>'<span style="color:#4fc3f7">drwxr-xr-x</span> diyor staff 15 cases <span style="color:#f8401c">projects/</span>\n<span style="color:#4fc3f7">drwxr-xr-x</span> diyor staff 411M <span style="color:#f8401c">assets/img/</span>\n<span style="color:#4fc3f7">drwxr-xr-x</span> diyor staff 9 files <span style="color:#f8401c">assets/embed/</span>\n<span style="color:#4fc3f7">drwxr-xr-x</span> diyor staff 800K <span style="color:#f8401c">assets/fonts/</span>\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 42K script.js\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 38K styles.css\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 20K index.html\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 4K about.html\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 2K 404.html\n<span style="color:#4fc3f7">-rw-r--r--</span> diyor staff 1K favicon.svg\n\n'+(t?"Всего: 0 фреймворков, 0 зависимостей, ~100% ручного кода":"Total: 0 frameworks, 0 dependencies, ~100% hand-coded"),radar:()=>'<span style="color:#f8401c">▌ RADAR</span> — '+(t?"что сейчас меняет дизайн":"what's changing design right now")+'\n\n<span style="color:#ffb74d">2026.03.24</span> <span style="color:#f8401c">[figma×ai]</span> Agents, Meet the Figma Canvas\n<span style="color:#ffb74d">2026.03.20</span> <span style="color:#f8401c">[design eng]</span> Designing Frontends with GPT-5.4\n<span style="color:#ffb74d">2026.03</span> <span style="color:#f8401c">[tools]</span> UI/UX Pro Max Skill — 50K+ stars\n<span style="color:#ffb74d">2026.03</span> <span style="color:#f8401c">[systems]</span> Design Systems & AI: MCP Is The Unlock\n<span style="color:#ffb74d">2026</span> <span style="color:#f8401c">[design eng]</span> Vibe Coding Guide for Designers\n<span style="color:#ffb74d">2026.02.25</span> <span style="color:#f8401c">[tools]</span> Claude Code for Designers\n<span style="color:#ffb74d">2026</span> <span style="color:#f8401c">[figma×ai]</span> Figma Make — General Availability\n\n<span style="color:#888">'+(t?"Полный список → about.html#radar":"Full list → about.html#radar")+"</span>","git log":()=>'<span style="color:#ffb74d">d226f26</span> feat: terminal upgrade, audit fixes, GoatCounter fix\n<span style="color:#ffb74d">a5e99b7</span> fix: tighten about-links gap on mobile\n<span style="color:#ffb74d">d74c6d6</span> fix: center text-glow higher inside banner on mobile\n<span style="color:#ffb74d">4197812</span> fix: about-bottom double padding on mobile\n<span style="color:#ffb74d">5b6c0e5</span> fix: About page mobile scroll + text-glow size\n\n<span style="color:#888">— github.com/diyoriko/portfolio</span>',clear:()=>"__CLEAR__",exit:()=>"__EXIT__"};function l(){e&&(e.remove(),e=null)}document.addEventListener("keydown",s=>{if("Backquote"===s.code||"`"===s.key||"ё"===s.key||"Ё"===s.key){if("INPUT"===s.target.tagName||"TEXTAREA"===s.target.tagName)return;s.preventDefault(),e?l():function(){e=document.createElement("div"),e.id="terminal",e.innerHTML='<div id="term-header"><span>~/diyor.design</span><button id="term-close">×</button></div><div id="term-body"><div id="term-output"></div><div id="term-line"><span id="term-prompt">→</span><input id="term-input" type="text" autocomplete="off" spellcheck="false"></div></div><div id="term-footer">↑↓ history · Tab autocomplete · clear · Esc close</div>',document.body.appendChild(e);const s=document.createElement("style");s.textContent="#terminal{position:fixed;bottom:24px;right:24px;width:500px;max-width:calc(100vw - 32px);background:#1a1a1a;border-radius:12px;box-shadow:0 16px 48px rgba(0,0,0,.35);z-index:9999;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;overflow:hidden;animation:termIn .25s ease}@keyframes termIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}#term-header{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:#252525;color:#888;font-size:12px;user-select:none}#term-close{background:none;border:none;color:#666;font-size:18px;cursor:pointer;padding:0 4px;line-height:1}#term-close:hover{color:#fff}#term-body{padding:12px 14px 14px;max-height:320px;overflow-y:auto}#term-output{color:#ccc;white-space:pre-wrap;word-break:break-word;line-height:1.5}#term-output .cmd{color:#f8401c}#term-output .out{color:#aaa}#term-line{display:flex;align-items:center;gap:8px;margin-top:8px}#term-prompt{color:#f8401c;flex-shrink:0}#term-input{flex:1;background:none;border:none;color:#fff;font:inherit;outline:none;caret-color:#f8401c}#term-footer{padding:8px 14px;background:#252525;color:#555;font-size:11px;border-top:1px solid #333}",document.head.appendChild(s);const c=e.querySelector("#term-input"),d=e.querySelector("#term-output"),p=t?"Привет. Введи help для списка команд.":"Hi. Type help for available commands.";d.innerHTML='<span class="out">'+p+"</span>\n",c.focus(),c.addEventListener("keydown",s=>{if("ArrowUp"===s.key)return s.preventDefault(),void(n.length&&o<n.length-1&&(o++,c.value=n[n.length-1-o]));if("ArrowDown"===s.key)return s.preventDefault(),void(o>0?(o--,c.value=n[n.length-1-o]):(o=-1,c.value=""));if("Tab"===s.key){s.preventDefault();const e=c.value.trim().toLowerCase();if(!e)return;if(e.startsWith("open ")){const t=e.slice(5),n=Object.keys(a).find(e=>e.startsWith(t));return void(n&&(c.value="open "+n))}const t=r.find(t=>t.startsWith(e));return void(t&&(c.value=t))}if("Enter"!==s.key)return;const p=c.value.trim(),u=p.toLowerCase();if(c.value="",!u)return;if(n.push(p),o=-1,d.innerHTML+='<span class="cmd">→ '+escapeHtml(p)+"</span>\n",u.startsWith("open ")){const n=u.slice(5).trim(),o=a[n];if(o){const n=location.pathname.includes("/projects/")?"":"projects/";d.innerHTML+='<span class="out">'+(t?"Открываю ":"Opening ")+o+"...</span>\n",e.querySelector("#term-body").scrollTop=9999,setTimeout(()=>{window.location.href=n+o+".html"},400)}else d.innerHTML+='<span class="out">'+(t?"Проект не найден. Введи projects для списка.":"Project not found. Type projects for the list.")+"</span>\n";return void(e.querySelector("#term-body").scrollTop=9999)}const m=u.replace(/\s+/g," ");if("rm -rf /"===m||"rm -rf"===m||"rm"===m){const t=i["rm -rf /"]();return d.innerHTML+='<span class="out">'+t+"</span>\n",void(e.querySelector("#term-body").scrollTop=9999)}if("git log"===m||"git"===m){const t=i["git log"]();return d.innerHTML+='<span class="out">'+t+"</span>\n",void(e.querySelector("#term-body").scrollTop=9999)}if("ls -la"===m||"ls -l"===m||"ls"===m||"ll"===m){const t=i.ls();return d.innerHTML+='<span class="out">'+t+"</span>\n",void(e.querySelector("#term-body").scrollTop=9999)}const f=i[u];if(f){const e=f();if("__CLEAR__"===e)return void(d.innerHTML="");if("__EXIT__"===e)return void l();d.innerHTML+='<span class="out">'+e+"</span>\n"}else{const e=t?"Неизвестная команда. Введи help.":"Unknown command. Type help.";d.innerHTML+='<span class="out">'+e+"</span>\n"}e.querySelector("#term-body").scrollTop=9999}),e.querySelector("#term-close").addEventListener("click",l)}()}"Escape"===s.key&&e&&l()})}function initEmailConfetti(){const e=document.querySelector('a[href^="mailto:"]');e&&e.addEventListener("click",t=>{t.preventDefault();const n=e.href.replace("mailto:","");navigator.clipboard.writeText(n).then(()=>{const e=document.createElement("span");if(e.textContent="en"===document.documentElement.lang?"Copied!":"Скопировано!",e.style.cssText="position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#222;color:#fff;padding:8px 20px;border-radius:8px;font-family:var(--font-sans);font-size:14px;z-index:10000;animation:tipFade 1.5s ease forwards;pointer-events:none",!document.getElementById("tip-fade-style")){var t=document.createElement("style");t.id="tip-fade-style",t.textContent="@keyframes tipFade{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}10%{opacity:1;transform:translate(-50%,-50%) scale(1)}70%{opacity:1}100%{opacity:0;transform:translate(-50%,-60%)}}",document.head.appendChild(t)}document.body.appendChild(e),setTimeout(()=>{e.remove()},1600),function(){const e=document.createElement("canvas");e.style.cssText="position:fixed;inset:0;width:100%;height:100%;z-index:9998;pointer-events:none",e.width=window.innerWidth,e.height=window.innerHeight,document.body.appendChild(e);const t=e.getContext("2d"),n=["#F8401C","#f48fb1","#ffb74d","#4fc3f7","#81c784","#ce93d8","#fff176"],o=[],a=e.width/2,s=e.height/2;for(let e=0;e<80;e++){const e=Math.random()*Math.PI*2,t=4+8*Math.random();o.push({x:a,y:s,vx:Math.cos(e)*t,vy:Math.sin(e)*t-4,size:4+4*Math.random(),color:n[Math.floor(Math.random()*n.length)],rotation:360*Math.random(),rotSpeed:12*(Math.random()-.5),gravity:.12+.08*Math.random(),opacity:1})}let r=0;function i(){t.clearRect(0,0,e.width,e.height);let n=!1;o.forEach(e=>{e.x+=e.vx,e.y+=e.vy,e.vy+=e.gravity,e.vx*=.99,e.rotation+=e.rotSpeed,e.opacity-=.012,e.opacity<=0||(n=!0,t.save(),t.translate(e.x,e.y),t.rotate(e.rotation*Math.PI/180),t.globalAlpha=e.opacity,t.fillStyle=e.color,t.fillRect(-e.size/2,-e.size/2,e.size,.6*e.size),t.restore())}),r++,n&&r<120?requestAnimationFrame(i):e.remove()}requestAnimationFrame(i)}()}).catch(()=>{window.location.href=e.href})})}function initVanillaBadge(){const e=location.pathname;if(e.includes("/projects/")||e.includes("about"))return;const t=window.innerWidth<=480,n='<span style="width:1px;height:14px;background:rgba(0,0,0,.12);display:inline-block;vertical-align:middle;margin:0 12px"></span>',o='<a href="https://github.com/diyoriko/portfolio" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px;vertical-align:middle"><svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" style="vertical-align:middle"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> GitHub</a>',a='<a href="https://github.com/diyoriko/portfolio-template" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;vertical-align:middle;opacity:.5">use as template</a>',s=document.createElement("div");s.innerHTML=t?'<span style="opacity:.5">vanilla everything</span>'+n+o+n+a:'<span style="opacity:.5">vanilla everything</span>'+n+'<span data-action="grid" style="cursor:pointer"><span style="opacity:.5">Shift+G</span> grid</span>'+n+'<span data-action="terminal" style="cursor:pointer"><span style="opacity:.5">~</span> terminal</span>'+n+o+n+a;const r=()=>document.documentElement.classList.contains("dark")||!document.documentElement.classList.contains("light")&&window.matchMedia("(prefers-color-scheme: dark)").matches;s.style.cssText="position:fixed;bottom:16px;left:50%;transform:translateX(-50%) translateY(20px);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:#999;background:"+(r()?"rgba(30,30,30,.55)":"rgba(255,255,255,.55)")+";padding:8px 16px;border-radius:6px;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid "+(r()?"rgba(255,255,255,.06)":"rgba(0,0,0,.06)")+";pointer-events:auto;white-space:nowrap;transition:all .3s;z-index:1;cursor:default;opacity:0",document.body.appendChild(s),setTimeout(()=>{s.style.opacity="1",s.style.transform="translateX(-50%) translateY(0)"},2e3),document.addEventListener("mousemove",e=>{const t=e.clientY>window.innerHeight-80,n=r();s.style.background=t?n?"rgba(30,30,30,1)":"rgba(255,255,255,1)":n?"rgba(30,30,30,.55)":"rgba(255,255,255,.55)",s.style.color=t?n?"#eee":"#000":"#999"}),s.addEventListener("click",e=>{const t=e.target.closest("[data-action]");t&&("terminal"===t.dataset.action?document.dispatchEvent(new KeyboardEvent("keydown",{code:"Backquote"})):"grid"===t.dataset.action&&document.dispatchEvent(new KeyboardEvent("keydown",{code:"KeyG",shiftKey:!0})))})}function initDesignSystemToggle(){let e=null,t=null;document.addEventListener("keydown",n=>{"INPUT"!==n.target.tagName&&"TEXTAREA"!==n.target.tagName&&n.shiftKey&&"KeyG"===n.code&&(n.preventDefault(),e?(e&&(e.remove(),e=null),t&&(t.remove(),t=null)):function(){e=document.createElement("div"),e.id="ds-overlay",t=document.createElement("style"),t.id="ds-style",t.textContent="#ds-overlay{position:fixed;inset:0;z-index:9990;pointer-events:none;animation:dsIn .2s ease}@keyframes dsIn{from{opacity:0}to{opacity:1}}#ds-grid{position:absolute;inset:0;max-width:calc(var(--content-max) + var(--side-padding)*2);margin:0 auto;padding:0 var(--side-padding);display:flex;gap:20px}#ds-grid .col{flex:1;background:rgba(248,64,28,0.04);border-left:1px solid rgba(248,64,28,0.1);border-right:1px solid rgba(248,64,28,0.1)}#ds-panel{position:fixed;bottom:52px;left:50%;transform:translateX(-50%);background:#1a1a1a;color:#ccc;border-radius:12px;padding:14px 20px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;display:flex;gap:20px;align-items:center;pointer-events:auto;box-shadow:0 12px 40px rgba(0,0,0,.3);white-space:nowrap}#ds-panel .sw{width:14px;height:14px;border-radius:3px;display:inline-block;vertical-align:middle;margin-right:5px;box-shadow:0 0 0 1px rgba(255,255,255,.15)}#ds-panel .sep{width:1px;height:20px;background:rgba(255,255,255,.12)}#ds-panel .lb{color:#666;font-size:9px;text-transform:uppercase;letter-spacing:.5px;display:block;margin-bottom:1px}",document.head.appendChild(t);const n=getComputedStyle(document.documentElement),o=n.getPropertyValue("--bg").trim(),a=n.getPropertyValue("--accent").trim(),s=n.getPropertyValue("--text-body").trim(),r=n.getPropertyValue("--text-dim").trim(),i=n.getPropertyValue("--font-sans").trim().split(",")[0].replace(/'/g,""),l=n.getPropertyValue("--font-mono").trim().split(",")[0].replace(/'/g,"");let c='<div id="ds-grid">';for(let e=0;e<12;e++)c+='<div class="col"></div>';c+="</div>",e.innerHTML=c+'<div id="ds-panel"><div><span class="lb">Colors</span>'+`<span class="sw" style="background:${o}"></span>bg `+`<span class="sw" style="background:${a}"></span>accent `+`<span class="sw" style="background:${s}"></span>text `+`<span class="sw" style="background:${r}"></span>dim</div><div class="sep"></div>`+`<div><span class="lb">Type</span>${i} · ${l}</div><div class="sep"></div><div><span class="lb">Layout</span>1156px · 12 col · 20px gap</div></div>`,document.body.appendChild(e)}())})}function initSlideshows(){document.querySelectorAll("[data-slideshow]").forEach(e=>{const t=e.querySelector(".case-slideshow-track"),n=t.querySelectorAll("img"),o=e.querySelector("[data-counter]"),a=e.querySelector("[data-prev]"),s=e.querySelector("[data-next]");if(!t||n.length<2)return;let r=0;const i=n.length;function l(e){r=(e+i)%i,t.style.transform="translateX(-"+100*r+"%)",o&&(o.textContent=r+1+"/"+i)}a&&a.addEventListener("click",()=>l(r-1)),s&&s.addEventListener("click",()=>l(r+1))})}function initNavActive(){const e=document.querySelectorAll(".nav-links a");if(!e.length)return;const t=location.pathname.replace(/\/+$/,"")||"/";e.forEach(e=>{const n=e.getAttribute("href"),o="."===n||"./"===n||"../"===n||"/"===n||""===n,a=/about/i.test(n),s=/radar/i.test(n);((t.includes("/projects/")||"/"===t||""===t)&&o||t.includes("/about")&&a||t.includes("/radar")&&s)&&e.classList.add("active")})}function initNavScrollLine(){const e=document.querySelector(".nav");e&&window.addEventListener("scroll",()=>{e.classList.toggle("scrolled",window.scrollY>10)},{passive:!0})}function initReadingProgress(){if(!document.querySelector(".main--case"))return;const e=document.createElement("div");function t(){const t=document.documentElement.scrollHeight-window.innerHeight,n=t>0?100*Math.min(window.scrollY/t,1):0;e.style.width=n+"%"}e.className="reading-progress",document.body.appendChild(e);let n=!1;window.addEventListener("scroll",()=>{n||(requestAnimationFrame(()=>{t(),n=!1}),n=!0)},{passive:!0}),t()}function initCaseArrowNav(){const e=document.querySelector(".case-nav-prev"),t=document.querySelector(".case-nav-next");(e||t)&&document.addEventListener("keydown",n=>{"INPUT"!==n.target.tagName&&"TEXTAREA"!==n.target.tagName&&(document.getElementById("terminal")||document.querySelector(".case-lightbox.open")||("ArrowLeft"===n.key&&e?window.location.href=e.href:"ArrowRight"===n.key&&t&&(window.location.href=t.href)))})}function startMatrix(){const e=document.createElement("canvas");e.style.cssText="position:fixed;inset:0;z-index:9998;pointer-events:none",e.width=window.innerWidth,e.height=window.innerHeight,document.body.appendChild(e);const t=e.getContext("2d"),n="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン0123456789ABCDEF",o=Math.floor(e.width/14),a=Array(o).fill(1);let s=0;requestAnimationFrame(function o(){t.fillStyle="rgba(0, 0, 0, 0.05)",t.fillRect(0,0,e.width,e.height),t.fillStyle="#0f0",t.font="14px monospace";for(let o=0;o<a.length;o++){const s=n[Math.floor(62*Math.random())];t.fillText(s,14*o,14*a[o]),14*a[o]>e.height&&Math.random()>.975&&(a[o]=0),a[o]++}s++,s<300?requestAnimationFrame(o):(e.style.transition="opacity 1s",e.style.opacity="0",setTimeout(()=>e.remove(),1e3))})}function initConsoleSig(){console.log("%c ██████╗ ██╗██╗ ██╗ ██████╗ ██████╗ \n ██╔══██╗ ██║╚██╗ ██╔╝██╔═══██╗██╔══██╗\n ██║ ██║ ██║ ╚████╔╝ ██║ ██║██████╔╝\n ██║ ██║ ██║ ╚██╔╝ ██║ ██║██╔══██╗\n ██████╔╝ ██║ ██║ ╚██████╔╝██║ ██║\n ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝","color:#F8401C;font-size:10px;font-family:monospace;line-height:1.2"),console.log("%cProduct Designer & Developer\ndiyor.design\n\nYou read source? Let's talk → t.me/diyoriko\nPress ~ for secret terminal | Shift+G for design system","font-size:12px;font-family:system-ui;color:#888;line-height:1.6")}function initStatCounters(){const e=document.querySelectorAll(".case-stat-value");if(!e.length)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(t.unobserve(e.target),animateStat(e.target))})},{threshold:.5});e.forEach(e=>t.observe(e))}function animateStat(e){const t=e.textContent.trim().match(/^([+\u2212−-]?)(\d+(?:[.,]\d+)?)(.*)$/);if(!t)return;const n=t[1],o=parseFloat(t[2].replace(",",".")),a=t[3],s=t[2].includes(".")||t[2].includes(","),r=performance.now();requestAnimationFrame(function t(i){const l=Math.min((i-r)/1200,1),c=1-Math.pow(1-l,3),d=o*c;e.textContent=n+(s?d.toFixed(1):Math.round(d))+a,l<1&&requestAnimationFrame(t)})}function initCursorTrail(){if(!document.querySelector(".e404"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=24,t=["#F8401C"],n=[];let o=0;const a=new Set;for(let e=0;e<30;e++){const e=document.createElement("div");e.style.cssText="position:fixed;width:24px;height:24px;pointer-events:none;z-index:9990;opacity:0;transition:opacity 1.2s ease;",document.body.appendChild(e),n.push(e)}document.addEventListener("mousemove",s=>{const r=Math.floor(s.clientX/e)*e,i=Math.floor(s.clientY/e)*e,l=r+","+i;if(a.has(l))return;a.add(l),setTimeout(()=>a.delete(l),1200);const c=n[o];o=(o+1)%30,c.style.transition="none",c.style.background=t[0],c.style.left=r+"px",c.style.top=i+"px",c.style.opacity="0.25",requestAnimationFrame(()=>{c.style.transition="opacity 1.2s ease",c.style.opacity="0"})})}function initRadarIntro(){const e=document.querySelector(".radar-intro");if(!e)return;const t=e.querySelector("video");t&&(e.title="Click to unmute",e.style.cursor="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23E8611A' stroke-width='2'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4V5z'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E\") 12 12, pointer",e.addEventListener("click",()=>{t.muted=!t.muted,t.muted?(e.classList.remove("unmuted"),e.title="Click to unmute",e.style.cursor="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23E8611A' stroke-width='2'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4V5z'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E\") 12 12, pointer"):(e.classList.add("unmuted"),e.title="Click to mute",e.style.cursor="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23E8611A' stroke-width='2'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M19.07 4.93a10 10 0 010 14.14'/%3E%3Cpath d='M15.54 8.46a5 5 0 010 7.07'/%3E%3C/svg%3E\") 12 12, pointer")}))}function initRadarCounter(){const e=document.querySelector(".radar-feed");if(!e)return;const t=document.querySelector(".radar-counter");let n=0;const o=!location.pathname.includes("/en/");e.querySelectorAll(".radar-line").forEach(e=>{e.addEventListener("mouseenter",()=>{n++,10===n?(t.textContent=o?"Тебе интересно. Это хорошо.":"You're curious. Good.",t.style.color="#F8401C"):n>10&&(t.textContent="",t.style.color="")})})}function initRadarFeed(){const e=document.querySelector(".radar-feed"),t=document.querySelector(".radar-tags");if(!e||!t)return;const n="ru"===document.documentElement.lang;fetch(n?"radar-db.json":"../radar-db.json").then(e=>e.json()).then(o=>{var a=o._meta||{},s=a.tags||{},r=a.types||{},i=o.items||(Array.isArray(o)?o:[]),l=n?"ru":"en";i.sort((e,t)=>(t.date||t.added||"").localeCompare(e.date||e.added||""));const c=["figma×ai","design + code","skills","tools","design systems","process","motion×ai","a11y×ai"].filter(e=>i.some(t=>(t.tag||"tools")===e)),d=n?"все":"all";t.innerHTML='<button class="radar-filter active" data-filter="all">'+d+"</button>"+c.map(e=>{var t=s[e]&&s[e][l]||e;return'<button class="radar-filter" data-filter="'+escapeHtml(e)+'">'+escapeHtml(t)+"</button>"}).join("");var p="",u=n?["","январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]:["","january","february","march","april","may","june","july","august","september","october","november","december"];e.innerHTML=i.map(e=>{const t=e.tag||"tools",o=e.type||"article",a=r[o]&&r[o][l+"_s"]||o,s=(e.date||e.added||"").split("-"),i=3===s.length?escapeHtml(s[2])+"."+escapeHtml(s[1])+"."+escapeHtml(s[0]):"",c=n?e.desc_ru||e.desc_en||"":e.desc_en||e.desc_ru||"",d=(e.url||"").replace(/https?:\/\/(www\.)?/,"").split("/")[0];var m=e.stars&&e.stars>=100?'<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor" style="vertical-align:-1px"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> '+(e.stars>=1e3?(e.stars/1e3).toFixed(1).replace(/\.0$/,"")+"k":e.stars):"",f="",g=(e.date||e.added||"").slice(0,7);if(g&&g!==p){var y=g.split("-");f='<div class="radar-month">'+(u[parseInt(y[1],10)]||"")+" "+y[0]+"</div>",p=g}return f+'<a href="'+escapeHtml(e.url||"")+'" target="_blank" rel="noopener" class="radar-line reveal" data-tag="'+escapeHtml(t)+'" data-type="'+escapeHtml(e.type||"article")+'"><span class="radar-meta"><span class="radar-type">'+escapeHtml(a)+'</span><span class="radar-added">'+i+"</span>"+(m?'<span class="radar-score">'+m+"</span>":"")+'</span><span class="radar-title" title="'+escapeHtml(e.title||"")+'">'+escapeHtml(e.title||"")+'</span><span class="radar-desc">'+escapeHtml(c)+'</span><span class="radar-source">'+escapeHtml(d)+" ↗</span></a>"}).join("")+'<div class="radar-cursor">_</div>';var m=document.querySelector(".radar-counter");m&&(m.textContent=n?i.length+" публикаций":i.length+" articles"),initScrollReveal(),t.addEventListener("click",n=>{const o=n.target.closest(".radar-filter");if(o){n.preventDefault();var a,s=window.scrollY;t.querySelectorAll(".radar-filter").forEach(e=>e.classList.remove("active")),o.classList.add("active"),a=o.dataset.filter,e.querySelectorAll(".radar-line").forEach(e=>{e.classList.toggle("filtered-out","all"!==a&&e.dataset.tag!==a)}),e.querySelectorAll(".radar-month").forEach(e=>{for(var t=e.nextElementSibling,n=!1;t&&!t.classList.contains("radar-month");)t.classList.contains("radar-line")&&!t.classList.contains("filtered-out")&&(n=!0),t=t.nextElementSibling;e.style.display=n?"":"none"}),window.scrollTo(0,s)}}),initRadarCounter()}).catch(()=>{var e=document.querySelector(".radar-feed");e&&(e.innerHTML='<p class="radar-error">Could not load articles. Try refreshing.</p>')})}function initRadarNewIndicator(){var e=document.querySelector(".nav-radar");if(e){var t="ru"===document.documentElement.lang,n=t?"radar-db.json":window.location.pathname.includes("/en/")?"../radar-db.json":"radar-db.json";window.location.pathname.includes("/projects/")&&(n=t?"../radar-db.json":"../../radar-db.json"),fetch(n).then(e=>e.json()).then(t=>{var n=Array.isArray(t)?t:t.items||[],o=new Date(Date.now()-2592e5).toISOString().slice(0,10);n.some(e=>(e.date||"")>=o)&&e.classList.add("has-new")}).catch(()=>{})}}function initSkeletonCleanup(){document.querySelectorAll(".case-img-full, .case-img-row img, picture img").forEach(e=>{e.complete?e.dataset.loaded="":e.addEventListener("load",()=>{e.dataset.loaded=""},{once:!0})}),document.querySelectorAll(".case-video video").forEach(e=>{e.readyState>=2?e.dataset.loaded="":e.addEventListener("loadeddata",()=>{e.dataset.loaded=""},{once:!0})})}function initThemeToggle(){const e=document.documentElement,t=localStorage.getItem("theme");"dark"===t?e.classList.add("dark"):"light"===t&&e.classList.add("light");const n=document.querySelector(".nav-lang");if(!n)return;const o=document.createElement("button");o.className="theme-toggle",o.setAttribute("aria-label","Toggle dark mode"),o.innerHTML='<span class="icon-moon"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z"/></svg></span><span class="icon-sun">☀</span>',n.prepend(o);const a=document.querySelector(".nav-mobile");if(a){const e=o.cloneNode(!0);e.style.fontSize="28px",e.style.marginLeft="0",e.style.marginTop="8px",a.appendChild(e),e.addEventListener("click",s)}function s(){e.classList.contains("dark")||!e.classList.contains("light")&&window.matchMedia("(prefers-color-scheme: dark)").matches?(e.classList.remove("dark"),e.classList.add("light"),localStorage.setItem("theme","light")):(e.classList.remove("light"),e.classList.add("dark"),localStorage.setItem("theme","dark"))}o.addEventListener("click",s)}document.addEventListener("DOMContentLoaded",()=>{initNavActive(),initThemeToggle(),initNavScrollLine(),initScrollReveal(),initCaseTabs(),initProjectLinks(),initSlideshows(),initLightbox(),initBurger(),initDynamicFavicon(),initTerminal(),initEmailConfetti(),initDesignSystemToggle(),initVanillaBadge(),initReadingProgress(),initCaseArrowNav(),initConsoleSig(),initStatCounters(),initCursorTrail(),initSkeletonCleanup(),initRadarIntro(),initRadarFeed(),initRadarNewIndicator();try{const e=setInterval(()=>{window.goatcounter&&window.goatcounter.count&&(clearInterval(e),initGoatCounterEvents())},500);setTimeout(()=>clearInterval(e),5e3)}catch(e){}}),window.addEventListener("unhandledrejection",e=>{e.reason&&"AbortError"===e.reason.name&&e.preventDefault()});