mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-17 19:49:30 -07:00
1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
import{B as e,D as t,E as n,M as r,a as i,k as a,n as o,o as s,r as c,u as l}from"./BfssZJ.js";var u=[{threshold:20,trailLength:20},{threshold:40,trailLength:10},{threshold:80,trailLength:5},{threshold:140,trailLength:5},{threshold:200,trailLength:5}],d=t();function f(){let e=i();return e<0||e>=u.length?2:e}function p(e){let[t,i]=r(f()),o=a(()=>{let e=u[t()];return{thresholdIndex:t(),threshold:e.threshold,trailLength:e.trailLength}}),s=e=>{let n=t()+e;n<0||n>=u.length||(sessionStorage.setItem(`thresholdsIndex`,n.toString()),i(n))};return n(d.Provider,{value:[o,{incThreshold:()=>{s(1)},decThreshold:()=>{s(-1)}}],get children(){return e.children}})}function m(){let t=e(d);return l(t,`undefined config context`),t}var h=t();function g(e){let t=o(),[i,a]=r(-1),[l,u]=r([]),[d,f]=r(``),[p,m]=r(!1),[g,_]=r(!1),[v,y]=r(!1),[b,x]=r(`none`),S=e=>{let n=t().length;n<=0||a(t=>e===1?s(t,n):c(t,n))};return n(h.Provider,{value:[{index:i,cordHist:l,hoverText:d,isOpen:p,isAnimating:g,isLoading:v,navVector:b},{setIndex:a,incIndex:()=>{S(1)},decIndex:()=>{S(-1)},setCordHist:u,setHoverText:f,setIsOpen:m,setIsAnimating:_,setIsLoading:y,setNavVector:x}],get children(){return e.children}})}function _(){let t=e(h);return l(t,`undefined desktop context`),t}export{m as i,_ as n,p as r,g as t}; |