PageSourceSearch

https://cridergpt.com/assets/FrequencyPanel-BjfZm5th.js

js cridergpt.com collected 2026-10-02 01:27:08 UTC 55,554 bytes, 26 lines download raw bytes

1var Nt=Object.defineProperty;var gt=(a,t,n)=>t in a?Nt(a,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[t]=n;var W=(a,t,n)=>gt(a,typeof t!="symbol"?t+"":t,n);import{f as K,d6 as yt,an as bt,R as F,j as e,ao as xs,at as wt,d7 as St,ar as Ct,aq as hs,ap as Tt,r as o,am as Fe,aA as At,d5 as qt,d as M,B as h,a5 as kt,a6 as q,C as le,e as ce,cN as ke,cL as Mt,l as Pt,y as p,O as S,E as ps,G as fs,H as js,J as vs,N as J,ag as zt,S as Me,aB as Xe,o as Ze,x as Pe,d8 as Ye,Z as es,$ as ss,A as ts,bX as as,ah as G}from"./index-0skl7k4W.js";import{c as Ns,R as Rt,T as It,C as Ft}from"./index-CXpWIiEY.js";import{S as ns}from"./square-BtUFD9sT.js";import{V as Gt}from"./volume-2-eXEqINmd.js";import{V as Bt}from"./volume-x-D5pcCU1n.js";import{T as Et}from"./timer-Cb0Sc1Iu.js";import{C as Ht}from"./chart-column-DwBaWarM.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Dt=K("Guitar",[["path",{d:"m11.9 12.1 4.514-4.514",key:"109xqo"}],["path",{d:"M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z",key:"txyc8t"}],["path",{d:"m6 16 2 2",key:"16qmzd"}],["path",{d:"M8.2 9.9C8.7 8.8 9.8 8 11 8c2.8 0 5 2.2 5 5 0 1.2-.8 2.3-1.9 2.8l-.9.4A2 2 0 0 0 12 18a4 4 0 0 1-4 4c-3.3 0-6-2.7-6-6a4 4 0 0 1 4-4 2 2 0 0 0 1.8-1.2z",key:"1u8q3z"}],["circle",{cx:"11.5",cy:"12.5",r:".5",fill:"currentColor",key:"16onso"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const rs=K("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Ot=K("Speaker",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["circle",{cx:"12",cy:"14",r:"4",key:"1jruaj"}],["path",{d:"M12 14h.01",key:"1etili"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const Vt=K("StarOff",[["path",{d:"M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43",ke
21y:"16m0ql"}],["path",{d:"M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91",key:"1vt8nq"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const ls=K("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);var D="Accordion",$t=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ge,Lt,_t]=yt(D),[de,Na]=bt(D,[_t,Ns]),Be=Ns(),gs=F.forwardRef((a,t)=>{const{type:n,...l}=a,m=l,i=l;return e.jsx(Ge.Provider,{scope:a.__scopeAccordion,children:n==="multiple"?e.jsx(Jt,{...i,ref:t}):e.jsx(Qt,{...m,ref:t})})});gs.displayName=D;var[ys,Wt]=de(D),[bs,Ut]=de(D,{collapsible:!1}),Qt=F.forwardRef((a,t)=>{const{value:n,defaultValue:l,onValueChange:m=()=>{},collapsible:i=!1,...c}=a,[f,g]=xs({prop:n,defaultProp:l,onChange:m});return e.jsx(ys,{scope:a.__scopeAccordion,value:f?[f]:[],onItemOpen:g,onItemClose:F.useCallback(()=>i&&g(""),[i,g]),children:e.jsx(bs,{scope:a.__scopeAccordion,collapsible:i,children:e.jsx(ws,{...c,ref:t})})})}),Jt=F.forwardRef((a,t)=>{const{value:n,defaultValue:l,onValueChange:m=()=>{},...i}=a,[c=[],f]=xs({prop:n,defaultProp:l,onChange:m}),g=F.useCallback(u=>f((w=[])=>[...w,u]),[f]),y=F.useCallback(u=>f((w=[])=>w.filter(C=>C!==u)),[f]);return e.jsx(ys,{scope:a.__scopeAccordion,value:c,onItemOpen:g,onItemClose:y,children:e.jsx(bs,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(ws,{...i,ref:t})})})}),[Kt,me]=de(D),ws=F.forwardRef((a,t)=>{const{__scopeAccordion:n,disabled:l,dir:m,orientation:i="vertical",...c}=a,f=F.useRef(null),g=wt(f,t),y=Lt(n),w=St(m)==="ltr",C=Ct(a.onKeyDown,k=>{var O;if(!$t.includes(k.key))return;const d=k.target,x=y().filter(L=>{var V;return!((V=L.ref.current)!=null&&V.disabled)}),j=x.findIndex(L=>L.ref.current===d),v=x.length;if(j===-1)return;k.preventDefault();let b=j;const B=0,E=v-1,Q=()=>{b=j+1,b>E&&(b=B)},H=()=>{b=j-1,b<B&&(b=E)};switch(k.key){case"Home":b=B;break;case"End":b=E;break;case"ArrowRight":i==="horizontal"&&(w?Q():H());break;case"ArrowDown":i==="vertical"&&Q();break;case"ArrowLeft":i==="horizontal"&&(w?H():Q());break;case"ArrowUp":i==="vertical"&&H();break}const X=b%v;(O=x[X].ref.current)==null||O.focus()});return e.jsx(Kt,{scope:n,disabled:l,direction:m,orientation:i,children:e.jsx(Ge.Slot,{scope:n,children:e.jsx(hs.div,{...c,"data-orientation":i,ref:g,onKeyDown:l?void 0:C})})})}),oe="AccordionItem",[Xt,Ee]=de(oe),Ss=F.forwardRef((a,t)=>{const{__scopeAccordion:n,value:l,...m}=a,i=me(oe,n),c=Wt(oe,n),f=Be(n),g=Tt(),y=l&&c.value.includes(l)||!1,u=i.disabled||a.disabled;return e.jsx(Xt,{scope:n,open:y,disabled:u,triggerId:g,children:e.jsx(Rt,{"data-orientation":i.orientation,"data-state":Ms(y),...f,...m,ref:t,disabled:u,open:y,onOpenChange:w=>{w?c.onItemOpen(l):c.onItemClose(l)}})})});Ss.displayName=oe;var Cs="AccordionHeader",Ts=F.forwardRef((a,t)=>{const{__scopeAccordion:n,...l}=a,m=me(D,n),i=Ee(Cs,n);return e.jsx(hs.h3,{"data-orientation":m.orientation,"data-state":Ms(i.open),"data-disabled":i.disabled?"":void 0,...l,ref:t})});Ts.displayName=Cs;var Ie="AccordionTrigger",As=F.forwardRef((a,t)=>{const{__scopeAccordion:n,...l}=a,m=me(D,n),i=Ee(Ie,n),c=Ut(Ie,n),f=Be(n);return e.jsx(Ge.ItemSlot,{scope:n,children:e.jsx(It,{"aria-disabled":i.open&&!c.collapsible||void 0,"data-orientation":m.orientation,id:i.triggerId,...f,...l,ref:t})})});As.displayName=Ie;var qs="AccordionContent",ks=F.forwardRef((a,t)=>{const{__scopeAccordion:n,...l}=a,m=me(D,n),i=Ee(qs,n),c=Be(n);return e.jsx(Ft,{role:"region","aria-labelledby":i.triggerId,"data-orientation":m.orientation,...c,...l,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});ks.displayName=qs;function Ms(a){return a?"open":"closed"}var Zt=gs,Yt=Ss,ea=Ts,Ps=As,zs=ks;const sa=Zt,z=o.forwardRef(({className:a,...t},n)=>e.jsx(Yt,{ref:n,className:Fe("border-b",a),...t}));z.displayName="AccordionItem";const R=o.forwardRef(({className:a,children:t,...n},l)=>e.jsx(ea,{className:"flex",children:e.jsxs(Ps,{ref:l,className:Fe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...n,children:[t,e.jsx(At,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));R.displayName=Ps.displayName;const I=o.forwardRef(({className:a,children:t,...n},l)=>e.jsx(zs,{ref:l,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:e.jsx("div",{className:Fe("pb-4 pt-0",a),children:t})}));I.displayName=zs.displayName;class ta{constructor(){W(this,"ctx",null);W(this,"oscillators",new Map);W(this,"analyser",null);W(this,"masterGain",null);W(this,"noiseSource",null)}init(){return(!this.ctx||this.ctx.state==="closed")&&(this.ctx=new AudioContext,this.masterGain=this.ctx.createGain(),this.masterGain.gain.value=.5,this.analyser=this.ctx.createAnalyser(),this.analyser.fftSize=2048,this.masterGain.connect(this.analyser),this.analyser.connect(this.ctx.destination)),this.ctx.state==="suspended"&&this.ctx.resume(),this.ctx}play(t,n,l="sine",m=.5,i=0){this.init(),this.stop(t);const c=this.ctx,f=c.createOscillator(),g=c.createGain();if(f.type=l,f.frequency.setValueAtTime(n,c.currentTime),g.gain.setValueAtTime(0,c.currentTime),g.gain.linearRampToValueAtTime(m,c.currentTime+.05),i!==0){const y=c.createStereoPanner();y.pan.value=i,f.connect(g).connect(y).connect(this.masterGain)}else f.connect(g).connect(this.masterGain);f.start(),this.oscillators.set(t,{osc:f,gain:g})}stop(t){var l;const n=this.oscillators.get(t);if(n){try{n.gain.gain.linearRampToValueAtTime(0,(((l=this.ctx)==null?void 0:l.currentTime)||0)+.05),setTimeout(()=>{try{n.osc.stop()}catch{}},60)}catch{}this.oscillators.delete(t)}}
26stopAll(){if(this.oscillators.forEach((t,n)=>this.stop(n)),this.noiseSource){try{this.noiseSource.stop()}catch{}this.noiseSource=null}}setFrequency(t,n){const l=this.oscillators.get(t);l&&this.ctx&&l.osc.frequency.setValueAtTime(n,this.ctx.currentTime)}setVolume(t){this.masterGain&&this.ctx&&this.masterGain.gain.setValueAtTime(t,this.ctx.currentTime)}playNoise(t,n=.3){if(this.init(),this.noiseSource)try{this.noiseSource.stop()}catch{}const l=this.ctx,m=l.sampleRate*2,i=l.createBuffer(1,m,l.sampleRate),c=i.getChannelData(0);if(t==="white")for(let y=0;y<m;y++)c[y]=Math.random()*2-1;else if(t==="pink"){let y=0,u=0,w=0,C=0,k=0,d=0,x=0;for(let j=0;j<m;j++){const v=Math.random()*2-1;y=.99886*y+v*.0555179,u=.99332*u+v*.0750759,w=.969*w+v*.153852,C=.8665*C+v*.3104856,k=.55*k+v*.5329522,d=-.7616*d-v*.016898,c[j]=(y+u+w+C+k+d+x+v*.5362)*.11,x=v*.115926}}else{let y=0;for(let u=0;u<m;u++){const w=Math.random()*2-1;c[u]=(y+.02*w)/1.02,y=c[u],c[u]*=3.5}}const f=l.createBufferSource();f.buffer=i,f.loop=!0;const g=l.createGain();g.gain.value=n,f.connect(g).connect(this.masterGain),f.start(),this.noiseSource=f}stopNoise(){if(this.noiseSource){try{this.noiseSource.stop()}catch{}this.noiseSource=null}}getAnalyserData(){if(!this.analyser)return new Uint8Array(0);const t=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteFrequencyData(t),t}getWaveformData(){if(!this.analyser)return new Uint8Array(0);const t=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteTimeDomainData(t),t}sweep(t,n,l,m="sine"){this.init(),this.stop("sweep");
26const i=this.ctx,c=i.createOscillator(),f=i.createGain();c.type=m,c.frequency.setValueAtTime(t,i.currentTime),c.frequency.exponentialRampToValueAtTime(Math.max(n,1),i.currentTime+l),f.gain.value=.4,c.connect(f).connect(this.masterGain),c.start(),c.stop(i.currentTime+l),this.oscillators.set("sweep",{osc:c,gain:f}),setTimeout(()=>this.oscillators.delete("sweep"),l*1e3+100)}}const ie=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],U=(a,t)=>{const n=ie.indexOf(a),l=(t-4)*12+(n-9);return 440*Math.pow(2,l/12)},cs=a=>{const t=12*Math.log2(a/440)+49,n=Math.round(t-1)%12,l=Math.floor((Math.round(t-1)+8)/12);return`${ie[n<0?n+12:n]}${l}`},aa=[{freq:174,label:"Pain Relief",desc:"Foundation frequency for physical healing"},{freq:285,label:"Tissue Healing",desc:"Influences energy fields"},{freq:396,label:"Liberation",desc:"Liberating guilt and fear"},{freq:417,label:"Change",desc:"Undoing situations and facilitating change"},{freq:528,label:"Miracles",desc:"Transformation and DNA repair"},{freq:639,label:"Connections",desc:"Connecting relationships"},{freq:741,label:"Expression",desc:"Awakening intuition"},{freq:852,label:"Intuition",desc:"Returning to spiritual order"},{freq:963,label:"Divine",desc:"Connection to the cosmos"}],na=[{name:"Deep Sleep (Delta)",base:200,beat:2,desc:"0.5-4 Hz — deep dreamless sleep"}
26,{name:"Meditation (Theta)",base:200,beat:6,desc:"4-8 Hz — deep meditation, creativity"},{name:"Relaxation (Alpha)",base:200,beat:10,desc:"8-13 Hz — calm, relaxed focus"},{name:"Focus (Beta)",base:200,beat:18,desc:"13-30 Hz — alertness, concentration"},{name:"Peak Performance (Gamma)",base:200,beat:40,desc:"30-100 Hz — higher processing"},{name:"Schumann Resonance",base:200,beat:7.83,desc:"Earth's natural frequency"}],os={1:[697,1209],2:[697,1336],3:[697,1477],4:[770,1209],5:[770,1336],6:[770,1477],7:[852,1209],8:[852,1336],9:[852,1477],"*":[941,1209],0:[941,1336],"#":[941,1477]},is={A:".-",B:"-...",C:"-.-.",D:"-..",E:".",F:"..-.",G:"--.",H:"....",I:"..",J:".---",K:"-.-",L:".-..",M:"--",N:"-.",O:"---",P:".--.",Q:"--.-",R:".-.",S:"...",T:"-",U:"..-",V:"...-",W:".--",X:"-..-",Y:"-.--",Z:"--..",0:"-----",1:".----",2:"..---",3:"...--",4:"....-",5:".....",6:"-....",7:"--...",8:"---..",9:"----."," ":"/"},ra=[{name:"E2",freq:82.41},{name:"A2",freq:110},{name:"D3",freq:146.83},{name:"G3",freq:196},{name:"B3",freq:246.94},{name:"E4",freq:329.63}],ze={Major:[0,2,4,5,7,9,11,12],Minor:[0,2,3,5,7,8,10,12],Pentatonic:[0,2,4,7,9,12],Blues:[0,3,5,6,7,10,12],Dorian:[0,2,3,5,7,9,10,12],Mixolydian:[0,2,4,5,7,9,10,12],"Harmonic Minor":[0,2,3,5,7,8,11,12],Chromatic:[0,1,2,3,4,5,6,7,8,9,10,11,12]},ds={Major:[0,4,7],Minor:[0,3,7],Dim:[0,3,6],Aug:[0,4,8],Maj7:[0,4,7,11],Min7:[0,3,7,10],Dom7:[0,4,7,10],Sus2:[0,2,7],Sus4:[0,5,7],Add9:[0,4,7,14],Power:[0,7,12],"6th":[0,4,7,9]},la=[{name:"Laser",fn:a=>a.sweep(2e3,200,.3,"sawtooth")},{name:"Warp",fn:a=>a.sweep(100,3e3,1.5,"sine")},{name:"Siren",fn:a=>{let t=!0;const n=setInterval(()=>{a.sweep(t?400:800,t?800:400,.8),t=!t},800);setTimeout(()=>{clearInterval(n),a.stopAll()},5e3)}},{name:"Sonar Ping",fn:a=>{a.play("sonar",1200,"sine",.6),setTimeout(()=>a.stop("sonar"),150)}},{name:"Alarm",fn:a=>{let t=!0;const n=setInterval(()=>{t?a.play("alarm",880,"square",.3):a.stop("alarm"),t=!t},250);setTimeout(()=>{clearInterval(n),a.stopAll()},3e3)}},{name:"Doorbell",fn:a=>{a.play("db1",523.25,"sine",.4),setTimeout(()=>{a.stop("db1"),a.play("db2",659.25,"sine",.4),setTimeout(()=>a.stop("db2"),400)},300)}},{name:"Heartbeat",fn:a=>{const t=()=>{a.play("hb",60,"sine",.5),setTimeout(()=>a.stop("hb"),100),setTimeout(()=>{a.play("hb2",80,"sine",.3),setTimeout(()=>a.stop("hb2"),80)},150)};t();const n=setInterval(t,800);setTimeout(()=>{clearInterval(n),a.stopAll()},5e3)}},{name:"Coin Drop",fn:a=>{a.play("coin",1500,"square",.2),setTimeout(()=>{a.stop("coin"),a.play("coin2",2e3,"square",.15),setTimeout(()=>a.stop("coin2"),100)},80)}},{name:"Power Up",fn:a=>a.sweep(200,1500,.5,"square")},{name:"Power Down",fn:a=>a.sweep(1500,100,.8,"sawtooth")},{name:"Explosion",fn:a=>{a.playNoise("brown",.8),setTimeout(()=>a.stopNoise(),1500)}},{name:"Static",fn:a=>{a.playNoise("white",.3),setTimeout(()=>a.stopNoise(),2e3)}}],Re=["Unison","Minor 2nd","Major 2nd","Minor 3rd","Major 3rd","Perfect 4th","Tritone","Perfect 5th","Minor 6th","Major 6th","Minor 7th","Major 7th","Octave"];function ms({engine:a,active:t}){const n=o.useRef(null),l=o.useRef(0);return o.useEffect(()=>{if(!t||!n.current)return;const m=n.current,i=m.getContext("2d"),c=()=>{const f=a.getAnalyserData(),g=m.width,y=m.height;i.fillStyle="hsl(var(--background))",i.fillRect(0,0,g,y);const u=g/f.length*2.5;for(let w=0;w<f.length;w++){const C=f[w]/255*y,k=w/f.length*240;i.fillStyle=`hsl(${k}, 80%, 55%)`,i.fillRect(w*u,y-C,u-1,C)}l.current=requestAnimationFrame(c)};return c(),()=>cancelAnimationFrame(l.current)},[t,a]),e.jsx("canvas",{ref:n,width:400,height:120,className:"w-full h-[120px] rounded-md border border-border bg-background"})}function us({engine:a,active:t}){const n=o.useRef(null),l=o.useRef(0);return o.useEffect(()=>{if(!t||!n.current)return;const m=n.current,i=m.getContext("2d"),c=()=>{const f=a.getWaveformData(),g=m.width,y=m.height;i.fillStyle="hsl(var(--background))",i.fillRect(0,0,g,y),i.beginPath(),i.strokeStyle="hsl(var(--primary))",i.lineWidth=2;for(let u=0;u<f.length;u++){const w=u/f.length*g,C=f[u]/255*y;u===0?i.moveTo(w,C):i.lineTo(w,C)}i.stroke(),l.current=requestAnimationFrame(c)};return c(),()=>cancelAnimationFrame(l.current)},[t,a]),e.jsx("canvas",{ref:n,width:400,height:100,className:"w-full h-[100px] rounded-md border border-border bg-background"})}function ca(){const t=o.useRef(new ta).current,[n,l]=o.useState(440),[m,
26i]=o.useState("sine"),[c,f]=o.useState(50),[g,y]=o.useState(!1),[u,w]=o.useState(""),[C,k]=o.useState(880),[d,x]=o.useState(!1),[j,v]=o.useState(200),[b,B]=o.useState(2e3),[E,Q]=o.useState(2),[H,X]=o.useState(200),[O,L]=o.useState(10),[V,Z]=o.useState(!1),[He,Rs]=o.useState("white"),[Y,ee]=o.useState(!1),[ue,De]=o.useState(120),[xe,he]=o.useState(!1),pe=o.useRef(null),[se,Is]=o.useState(""),[fe,Oe]=o.useState(""),[da,Fs]=o.useState(""),[je,Gs]=o.useState(0),[Ve,$e]=o.useState({correct:0,total:0}),[ve,Bs]=o.useState(30),[Ne,ge]=o.useState(!1),ye=o.useRef(null),[Es,Le]=o.useState([]),[Hs,_e]=o.useState(0),[_,We]=o.useState(()=>{try{return JSON.parse(localStorage.getItem("freq-favorites")||"[]")}catch{return[]}}),[te,Ds]=o.useState(()=>{try{return JSON.parse(localStorage.getItem("freq-recent")||"[]")}catch{return[]}}),[be,Ue]=o.useState(!1),[Qe,Os]=o.useState(20),[ae,Je]=o.useState(!1),[Vs,$s]=o.useState("inhale"),we=o.useRef(null),[Se,Ce]=o.useState(new Array(16).fill(!1)),[ne,Te]=o.useState(!1),[Ae,Ls]=o.useState(140),[_s,Ws]=o.useState(0),qe=o.useRef(null),[re,Us]=o.useState("both"),[Ke,Qs]=o.useState(!0);o.useEffect(()=>()=>{t.stopAll()},[]),o.useEffect(()=>{localStorage.setItem("freq-favorites",JSON.stringify(_))},[_]),o.useEffect(()=>{localStorage.setItem("freq-recent",JSON.stringify(te))},[te]);const Js=o.useCallback(s=>{Ds(r=>[s,...r.filter(T=>T!==s)].slice(0,20))},[]),Ks=()=>{g?(t.stop("main"),y(!1)):(t.play("main",n,m,c/100),y(!0),Js(n))},Xs=()=>{d?(t.stop("dual1"),t.stop("dual2"),x(!1)):(t.play("dual1",n,m,c/100),t.play("dual2",C,m,c/100),x(!0))},Zs=()=>{t.sweep(j,b,E,m),G.success(`Sweep: ${j}→${b} Hz over ${E}s`)},Ys=()=>{V?(t.stop("binL"),t.stop("binR"),Z(!1)):(t.play("binL",H,"sine",c/100,-1),t.play("binR",H+O,"sine",c/100,1),Z(!0),G.success(`Binaural: ${H} Hz L / ${H+O} Hz R (${O} Hz beat)`))},et=()=>{Y?(t.stopNoise(),ee(!1)):(t.playNoise(He,c/100),ee(!0))},st=()=>{if(xe)pe.current&&clearInterval(pe.current),t.stop("metro"),he(!1);else{const s=()=>{t.play("metro",1e3,"sine",.3),setTimeout(()=>t.stop("metro"),30)};s(),pe.current=setInterval(s,6e4/ue),he(!0)}},tt=async()=>{const s=se.toUpperCase();t.init();for(const r of s){const N=is[r];if(N){if(N==="/"){await new Promise(T=>setTimeout(T,400));continue}for(const T of N)t.play("morse",700,"sine",.4),await new Promise(A=>setTimeout(A,T==="."?80:240)),t.stop("morse"),await new Promise(A=>setTimeout(A,60));await new Promise(T=>setTimeout(T,200))}}G.success("Morse complete!")},at=async()=>{t.init();for(const s of fe){const r=os[s];r&&(t.play("dtmf1",r[0],"sine",.3),t.play("dtmf2",r[1],"sine",.3),await new Promise(N=>setTimeout(N,200)),t.stop("dtmf1"),t.stop("dtmf2"),await new Promise(N=>setTimeout(N,100)))}},nt=(s,r,N)=>{const T=ze[N];if(!T)return;const A=U(s,r);T.forEach((P,$)=>{setTimeout(()=>{t.play("scale",A*Math.pow(2,P/12),m,c/100),setTimeout(()=>t.stop("scale"),250)},$*300)})},rt=(s,r,N)=>{const T=ds[N];if(!T)return;const A=U(s,r);T.forEach((P,$)=>{t.play(`chord${$}`,A*Math.pow(2,P/12),m,c/100)}),setTimeout(()=>T.forEach((P,$)=>t.stop(`chord${$}`)),2e3)},lt=()=>{const s=Math.floor(Math.random()*13);Gs(s),Fs("");const r=261.63;t.play("int1",r,"sine",.4),setTimeout(()=>{t.stop("int1"),t.play("int2",r*Math.pow(2,s/12),"sine",.4),setTimeout(()=>t.stop("int2"),800)},1e3)},ct=s=>{s===je?($e(r=>({correct:r.correct+1,total:r.total+1})),G.success(`Correct! ${Re[je]}`)):($e(r=>({...r,total:r.total+1})),G.error(`Wrong! It was ${Re[je]}`))},ot=()=>{Ne?(ye.current&&clearTimeout(ye.current),ge(!1),G.info("Sleep timer cancelled")):(ye.current=setTimeout(()=>{t.stopAll(),y(!1),Z(!1),ee(!1),ge(!1),G.info("Sleep timer — audio stopped")},ve*6e4),ge(!0),G.success(`Audio will stop in ${ve} minutes`))},it=()=>{const s=Date.now(),r=[...Es,s].slice(-8);if(Le(r),r.length>=2){const N=r.slice(1).map((A,P)=>A-r[P]),T=N.reduce((A,P)=>A+P,0)/N.length;_e(Math.round(6e4/T))}},dt=async()=>{Ue(!0);const s=[20,50,100,250,500,1e3,2e3,4e3,8e3,12e3,16e3,18e3,2e4];for(const r of s)Os(r),t.play("hearing",r,"sine",.3),await new Promise(N=>setTimeout(N,1500)),t.stop("hearing"),await new Promise(N=>setTimeout(N,300));Ue(!1),G.success("Hearing test complete!")},mt=()=>{if(ae){we.current&&clearInterval(we.current),Je(!1),t.stop("breath");return}Je(!0);const s=["inhale","hold","exhale","rest"];let r=0;const N=()=>{$s(s[r]),s[r]==="inhale"?t.play("breath",396,"sine",.15):s[r]==="exhale"?(t.stop("breath"),t.play("breath",285,"sine",.1)):t.stop("breath"),r=(r+1)%4};N(),we.current=setInterval(N,4e3)},ut=s=>{const r=[...Se];r[s]=!r[s],Ce(r)},xt=()=>{if(ne){qe.current&&clearInterval(qe.current),t.stop("seq"),Te(!1);return}Te(!0);let s=0;const r=()=>{Ws(s),Se[s]&&(t.play("seq",n,m,c/100),setTimeout(()=>t.stop("seq"),6e4/Ae*.3)),s=(s+1)%16};r(),qe.current=setInterval(r,6e4/Ae)},ht=()=>{const s=re==="left"?-1:re==="right"?1:0;t.play("speaker",440,"sine",.4,s),setTimeout(()=>t.stop("speaker"),2e3),G.success(`Playing on ${re} channel(s)`)},pt=()=>{const s=`${cs(n)} (${n} Hz)`;_.find(r=>r.freq===n)||(We(r=>[...r,{freq:n,wave:m,name:s}]),G.success("Added to favorites!"))};o.useEffect(()=>{t.setVolume(c/100)},[c]),o.useEffect(()=>{g&&t.setFrequency("main",n)},[n,g]);
26const ft=(343/n).toFixed(3),jt=cs(n),vt=[{id:"tone",label:"Tone Generator",icon:ls,count:8},{id:"musical",label:"Musical Tools",icon:Xe,count:12},{id:"binaural",label:"Binaural & Wellness",icon:Ze,count:12},{id:"sfx",label:"Sound Effects",icon:Pe,count:14},{id:"analysis",label:"Audio Analysis",icon:Ht,count:7},{id:"science",label:"Science & Education",icon:es,count:11},{id:"signal",label:"Signal Processing",icon:rs,count:13},{id:"utility",label:"Utility Tools",icon:ss,count:10},{id:"sequence",label:"Pattern & Sequence",icon:ts,count:9},{id:"comms",label:"Communication",icon:Ye,count:7},{id:"presets",label:"Presets & Favorites",icon:Me,count:6},{id:"visual",label:"Visualizations",icon:as,count:6}];return e.jsxs("div",{className:"space-y-4 p-4 md:p-6 max-w-5xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-foreground flex items-center gap-2",children:[e.jsx(qt,{className:"h-6 w-6 text-primary"}),"Sound & Frequency Toolkit"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"120+ audio tools powered by the Web Audio API"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(M,{variant:"secondary",className:"text-xs",children:[vt.reduce((s,r)=>s+r.count,0),"+ Features"]}),e.jsxs(h,{variant:"outline",size:"sm",onClick:()=>{t.stopAll(),y(!1),Z(!1),ee(!1),x(!1),he(!1),Te(!1)},children:[e.jsx(ns,{className:"h-3 w-3 mr-1"})," Stop All"]})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(kt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(q,{placeholder:"Search tools (e.g. binaural, morse, guitar, noise...)",value:u,onChange:s=>w(s.target.value),className:"pl-9"})]}),e.jsx(le,{children:e.jsxs(ce,{className:"py-3 px-4 flex items-center gap-4 flex-wrap",children:[c>0?e.jsx(Gt,{className:"h-4 w-4 text-primary"}):e.jsx(Bt,{className:"h-4 w-4 text-muted-foreground"}),e.jsx(ke,{value:[c],onValueChange:s=>f(s[0]),max:100,className:"flex-1 min-w-[120px]"}),e.jsxs("span",{className:"text-sm font-mono text-foreground w-12 text-right",children:[c,"%"]}),e.jsx(Mt,{checked:Ke,onCheckedChange:Qs}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Visualizer"})]})}),Ke&&(g||d||V||Y)&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(ms,{engine:t,active:!0}),e.jsx(us,{engine:t,active:!0})]}),e.jsx(Pt,{className:"h-auto",children:e.jsxs(sa,{type:"multiple",defaultValue:["tone"],className:"space-y-2",children:[(!u||"tone frequency waveform sweep dual generator play".includes(u.toLowerCase()))&&e.jsxs(z,{value:"tone",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ls,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Tone Generator"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"8 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:e.jsxs("div",{className:"flex-1 min-w-[200px]",children:[e.jsx(p,{className:"text-xs text-muted-foreground",children:"Frequency (Hz)"}),e.jsxs("div",{className:"flex gap-2 mt-1",children:[e.jsx(q,{type:"number",value:n,onChange:s=>l(Number(s.target.value)||1),min:1,max:22e3,className:"w-28 font-mono"}),e.jsx(ke,{value:[n],onValueChange:s=>l(s[0]),min:1,max:22e3,step:1,className:"flex-1"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Note: ",e.jsx("strong",{className:"text-foreground",children:jt})]}),e.jsx(S,{orientation:"vertical",className:"h-4"}),e.jsxs("span",{children:["λ: ",e.jsxs("strong",{className:"text-foreground",children:[ft,"m"]})]}),e.jsx(S,{orientation:"vertical",className:"h-4"}),e.jsxs("span",{children:["Period: ",e.jsxs("strong",{className:"text-foreground",children:[(1e3/n).toFixed(3),"ms"]})]})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs(ps,{value:m,onValueChange:s=>i(s),children:[e.jsx(fs,{className:"w-36",children:e.jsx(js,{})}),e.jsxs(vs,{children:[e.jsx(J,{value:"sine",children:"Sine"}),e.jsx(J,{value:"square",children:"Square"}),e.jsx(J,{value:"sawtooth",children:"Sawtooth"}),e.jsx(J,{value:"triangle",children:"Triangle"})]})]}),e.jsx(h,{onClick:Ks,variant:g?"destructive":"default",className:"gap-1",children:g?e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"h-3 w-3"})," Stop"]}):e.jsxs(e.Fragment,{children:[e.jsx(zt,{className:"h-3 w-3"})," Play"]})}),e.jsx(h,{variant:"outline",size:"icon",onClick:pt,children:e.jsx(Me,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:[{l:"A4 (440)",f:440},{l:"Middle C",f:261.63},{l:"Concert A",f:442},{l:"Bass E",f:82.41},{l:"1 kHz",f:1e3},{l:"432 Hz",f:432},{l:"100 Hz",f:100},{l:"10 kHz",f:1e4}].map(s=>e.jsx(h,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>l(s.f),children:s.l},s.l))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Dual-Tone Generator"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsx(q,{type:"number",value:n,onChange:s=>l(Number(s.target.value)),className:"w-24 font-mono",placeholder:"Freq 1"}),e.jsx("span",{className:"text-muted-foreground",children:"+"}),e.jsx(q,{type:"number",value:C,onChange:s=>k(Number(s.target.value)),className:"w-24 font-mono",placeholder:"Freq 2"}),e.jsx(h,{onClick:Xs,variant:d?"destructive":"secondary",size:"sm",children:d?"Stop":"Play Both"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Frequency Sweep"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsx(q,{type:"number",value:j,onChange:s=>v(Number(s.target.value)),className:"w-24 font-mono",placeholder:"From"}),e.jsx("span",{className:"text-muted-foreground",children:"→"}),e.jsx(q,{type:"number",value:b,onChange:s=>B(Number(s.target.value)),className:"w-24 font-mono",placeholder:"To"}),e.jsx(q,{type:"number",value:E,onChange:s=>Q(Number(s.target.value)),className:"w-16 font-mono",placeholder:"Sec"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"sec"}),e.jsx(h,{onClick:Zs,size:"sm",variant:"secondary",children:"Sweep"})]})]})]})]}),(!u||"musical guitar piano chord scale metronome tuner interval octave note".includes(u.toLowerCase()))&&e.jsxs(z,{value:"musical",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Xe,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Musical Tools"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"12 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Note ↔ Frequency Converter"}),e.jsx("div",{className:"grid grid-cols-4 md:grid-cols-6 gap-1",children:[3,4,5].map(s=>ie.map(r=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs h-8 font-mono",onClick:()=>{const N=Math.round(U(r,s)*100)/100;l(N),t.play("note",N,m,c/100),setTimeout(()=>t.stop("note"),500)},children:[r,s]},`${r}${s}`)))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Guitar Tuner Reference"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:ra.map(s=>e.jsxs(h,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>{l(s.freq),t.play("guitar",s.freq,"sine",c/100),setTimeout(()=>t.stop("guitar"),2e3)},children:[e.jsx(Dt,{className:"h-3 w-3"}
26)," ",s.name," (",s.freq," Hz)"]},s.name))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Scale Player"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.keys(ze).map(s=>e.jsx(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>nt("C",4,s),children:s},s))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Chord Generator"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:Object.keys(ds).map(s=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>rt("C",4,s),children:["C ",s]},s))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Metronome"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(q,{type:"number",value:ue,onChange:s=>De(Number(s.target.value)),className:"w-20 font-mono",min:20,max:300}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"BPM"}),e.jsx(ke,{value:[ue],onValueChange:s=>De(s[0]),min:20,max:300,className:"flex-1 min-w-[100px]"}),e.jsx(h,{onClick:st,variant:xe?"destructive":"secondary",size:"sm",children:xe?"Stop":"Start"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Interval Trainer"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsx(h,{onClick:lt,size:"sm",variant:"secondary",children:"Play Interval"}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Score: ",Ve.correct,"/",Ve.total]})]}),e.jsx("div",{className:"grid grid-cols-4 md:grid-cols-7 gap-1",children:Re.map((s,r)=>e.jsx(h,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>ct(r),children:s},s))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Harmonics Explorer"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Play fundamental + overtones"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[1,2,3,4,5,6,7,8].map(s=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{t.play(`harm${s}`,n*s,"sine",c/100/s),setTimeout(()=>t.stop(`harm${s}`),2e3)},children:[s,"× (",Math.round(n*s)," Hz)"]},s))})]})]})]}),(!u||"binaural wellness solfeggio noise sleep meditation focus relax breathe".includes(u.toLowerCase()))&&e.jsxs(z,{value:"binaural",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Binaural & Wellness"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"12 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Binaural Beat Generator"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"🎧 Use headphones for binaural effect"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Base (Hz)"}),e.jsx(q,{type:"number",value:H,onChange:s=>X(Number(s.target.value)),className:"w-20 font-mono"})]}),e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Beat (Hz)"}),e.jsx(q,{type:"number",value:O,onChange:s=>L(Number(s.target.value)),className:"w-20 font-mono"})]}),e.jsx(h,{onClick:Ys,variant:V?"destructive":"default",className:"mt-4",children:V?"Stop":"Start Binaural"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mt-2",children:na.map(s=>e.jsx(h,{variant:"outline",size:"sm",className:"justify-start text-left h-auto py-2",onClick:()=>{X(s.base),L(s.beat)},children:e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.desc})]})},s.name))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Solfeggio Frequencies"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:aa.map(s=>e.jsx(h,{variant:"outline",className:"justify-start h-auto py-2 text-left",onClick:()=>{l(s.freq),t.play("solf",s.freq,"sine",c/100),setTimeout(()=>t.stop("solf"),5e3)},children:e.jsxs("div",{children:[e.jsxs("div",{className:"font-mono text-sm",children:[s.freq," Hz"]}),e.jsx("div",{className:"text-xs font-medium text-primary",children:s.label}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.desc})]})},s.freq))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Noise Generator"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[["white","pink","brown"].map(s=>e.jsx(h,{variant:He===s?"default":"outline",size:"sm",onClick:()=>Rs(s),className:"capitalize",children:s},s)),e.jsx(h,{onClick:et,variant:Y?"destructive":"secondary",children:Y?"Stop Noise":"Play Noise"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Sleep Timer"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(q,{type:"number",value:ve,onChange:s=>Bs(Number(s.target.value)),className:"w-20 font-mono",min:1,max:480}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"minutes"}),e.jsxs(h,{onClick:ot,variant:Ne?"destructive":"outline",size:"sm",children:[e.jsx(Et,{className:"h-3 w-3 mr-1"})," ",Ne?"Cancel Timer":"Set Timer"]})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Breathing Pacer"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(h,{onClick:mt,variant:ae?"destructive":"secondary",size:"sm",children:ae?"Stop":"Start Breathing"}),ae&&e.jsx(M,{variant:"secondary",className:"text-lg px-4 py-1 animate-pulse capitalize",children:Vs})]})]})]})]}),(!u||"sound effect siren alarm laser sonar explosion heartbeat coin".includes(u.toLowerCase()))&&e.jsxs(z,{value:"sfx",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Pe,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Sound Effects & Fun"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"14 tools"})]})}),e.jsx(I,{className:"pt-2",children:e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2",children:la.map(s=>e.jsx(h,{variant:"outline",className:"h-auto py-3",onClick:()=>s.fn(t),children:e.jsxs("div",{className:"text-center",children:[e.jsx(Pe,{className:"h-4 w-4 mx-auto mb-1 text-primary"}),e.jsx("div",{className:"text-xs font-medium",children:s.name})]})},s.name))})})]}
26),(!u||"morse code dtmf phone dial communication signal".includes(u.toLowerCase()))&&e.jsxs(z,{value:"comms",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ye,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Communication & Signals"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"7 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Morse Code Translator"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(q,{value:se,onChange:s=>Is(s.target.value),placeholder:"Type text to convert to Morse",className:"flex-1"}),e.jsx(h,{onClick:tt,size:"sm",variant:"secondary",children:"Play Morse"})]}),se&&e.jsx("p",{className:"font-mono text-xs text-muted-foreground break-all",children:se.toUpperCase().split("").map(s=>is[s]||"").join(" ")})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"DTMF Tone Generator (Phone Dial)"}),e.jsx("div",{className:"grid grid-cols-3 gap-1 max-w-[200px]",children:["1","2","3","4","5","6","7","8","9","*","0","#"].map(s=>e.jsx(h,{variant:"outline",className:"h-10 font-mono text-lg",onClick:()=>{const r=os[s];t.play("dtmf1",r[0],"sine",.3),t.play("dtmf2",r[1],"sine",.3),setTimeout(()=>{t.stop("dtmf1"),t.stop("dtmf2")},200),Oe(N=>N+s)},children:s},s))}),fe&&e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx("span",{className:"font-mono text-sm",children:fe}),e.jsx(h,{variant:"ghost",size:"sm",onClick:()=>Oe(""),children:"Clear"}),e.jsx(h,{variant:"outline",size:"sm",onClick:at,children:"Replay All"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Musical Frequency Chart"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"text-xs w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-1 text-muted-foreground",children:"Note"}),[2,3,4,5,6].map(s=>e.jsxs("th",{className:"text-right py-1 text-muted-foreground",children:["Oct ",s]},s))]})}),e.jsx("tbody",{children:ie.map(s=>e.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30",children:[e.jsx("td",{className:"py-0.5 font-medium",children:s}),[2,3,4,5,6].map(r=>e.jsx("td",{className:"text-right py-0.5 font-mono cursor-pointer hover:text-primary",onClick:()=>{const N=Math.round(U(s,r)*100)/100;l(N)},children:Math.round(U(s,r)*10)/10},r))]},s))})]})})]})]})]}),(!u||"science education hearing test wavelength speed sound doppler".includes(u.toLowerCase()))&&e.jsxs(z,{value:"science",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(es,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Science & Education"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"11 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsx(oa,{}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Hearing Range Test"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Sweeps through frequencies from 20 Hz to 20,000 Hz"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(h,{onClick:dt,disabled:be,variant:"secondary",size:"sm",children:be?`Testing ${Qe} Hz...`:"Start Hearing Test"}),be&&e.jsxs(M,{variant:"outline",className:"font-mono",children:[Qe," Hz"]})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Beats Phenomenon Demo"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'Play two close frequencies to hear "beats" — pulsating volume'}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[[440,442],[440,444],[440,446],[440,450]].map(([s,r])=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{t.play("beat1",s,"sine",.3),t.play("beat2",r,"sine",.3),setTimeout(()=>{t.stop("beat1"),t.stop("beat2")},5e3)},children:[s," + ",r," Hz (",r-s," Hz beat)"]},`${s}-${r}`))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Frequency → Color Synesthesia Mapper"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-16 h-16 rounded-lg border border-border",style:{backgroundColor:`hsl(${n/22e3*360}, 80%, 55%)`}}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-mono",children:[n," Hz"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Hue: ",Math.round(n/22e3*360),"°"]})]})]})]})]})]}),(!u||"utility speaker test headphone balance bpm tap subwoofer channel".includes(u.toLowerCase()))&&e.jsxs(z,{value:"utility",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ss,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Utility Tools"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"10 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Speaker / Headphone Test"}),e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[["left","right","both"].map(s=>e.jsx(h,{variant:re===s?"default":"outline",size:"sm",onClick:()=>Us(s),className:"capitalize",children:s==="left"?"◀ Left":s==="right"?"Right ▶":"◀ Both ▶"},s)),e.jsxs(h,{onClick:ht,variant:"secondary",size:"sm",children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"})," Test"]})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Subwoofer Test Tones"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[20,30,40,50,60,80,100,12
260].map(s=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs font-mono",onClick:()=>{t.play("sub",s,"sine",.6),setTimeout(()=>t.stop("sub"),3e3)},children:[s," Hz"]},s))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"BPM Tapper"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(h,{onClick:it,variant:"secondary",className:"h-16 w-32 text-lg font-bold",children:"TAP"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold font-mono text-foreground",children:Hs||"—"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"BPM"})]}),e.jsx(h,{variant:"ghost",size:"sm",onClick:()=>{Le([]),_e(0)},children:"Reset"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Tone Burst Generator"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Generates pulsed tones at the current frequency"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[{l:"100ms pulses",on:100,off:100},{l:"250ms pulses",on:250,off:250},{l:"500ms pulses",on:500,off:500},{l:"1s pulses",on:1e3,off:1e3}].map(s=>e.jsx(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{let r=0;const N=setInterval(()=>{r%2===0?t.play("burst",n,m,c/100):t.stop("burst"),r++,r>=10&&(clearInterval(N),t.stop("burst"))},s.on)},children:s.l},s.l))})]})]})]}),(!u||"pattern sequence sequencer step arpeggio drum rhythm".includes(u.toLowerCase()))&&e.jsxs(z,{value:"sequence",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ts,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Pattern & Sequence"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"9 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"16-Step Sequencer"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:Se.map((s,r)=>e.jsx("button",{onClick:()=>ut(r),className:`w-8 h-8 rounded text-xs font-mono border transition-colors ${s?"bg-primary text-primary-foreground border-primary":"bg-muted border-border hover:bg-accent"} ${_s===r&&ne?"ring-2 ring-primary ring-offset-1":""}`,children:r+1},r))}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(q,{type:"number",value:Ae,onChange:s=>Ls(Number(s.target.value)),className:"w-20 font-mono",min:40,max:300}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"BPM"}),e.jsx(h,{onClick:xt,variant:ne?"destructive":"secondary",size:"sm",children:ne?"Stop":"Play"}),e.jsx(h,{variant:"ghost",size:"sm",onClick:()=>Ce(new Array(16).fill(!1)),children:"Clear"}),e.jsx(h,{variant:"ghost",size:"sm",onClick:()=>Ce(new Array(16).fill(!1).map(()=>Math.random()>.5)),children:"Random"})]})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Random Melody Generator"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:["Major","Minor","Pentatonic","Blues"].map(s=>e.jsxs(h,{variant:"outline",size:"sm",onClick:()=>{const r=ze[s],N=U("C",4);Array.from({length:8},()=>r[Math.floor(Math.random()*r.length)]).forEach((A,P)=>{setTimeout(()=>{t.play("melody",N*Math.pow(2,A/12),m,c/100),setTimeout(()=>t.stop("melody"),200)},P*250)})},children:[s," Melody"]},s))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Ambient Drone Creator"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[{l:"Om Drone",fs:[136.1,272.2,408.3]},{l:"Earth",fs:[7.83,136.1,256]},{l:"Space",fs:[63,126,189,252]},{l:"Forest",fs:[174,285,396]}].map(s=>e.jsx(h,{variant:"outline",size:"sm",onClick:()=>{s.fs.forEach((r,N)=>t.play(`drone${N}`,r,"sine",.15)),setTimeout(()=>s.fs.forEach((r,N)=>t.stop(`drone${N}`)),1e4)},children:s.l},s.l))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Polyrhythm Generator"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[[2,3],[3,4],[4,5],[5,7
26],[3,5]].map(([s,r])=>e.jsxs(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{let T=0,A=0;const P=setInterval(()=>{t.play("polyA",800,"sine",.3),setTimeout(()=>t.stop("polyA"),30),T++,T>=s*4&&clearInterval(P)},500*(r/s)),$=setInterval(()=>{t.play("polyB",1200,"sine",.25),setTimeout(()=>t.stop("polyB"),30),A++,A>=r*4&&clearInterval($)},500)},children:[s,":",r]},`${s}:${r}`))})]})]})]}),(!u||"signal filter lowpass highpass bandpass reverb delay distortion modulation".includes(u.toLowerCase()))&&e.jsxs(z,{value:"signal",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(rs,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Signal Processing"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"13 tools"})]})}),e.jsx(I,{className:"space-y-4 pt-2",children:e.jsx(ia,{engine:t,frequency:n,waveform:m,volume:c})})]}),(!u||"preset favorite recent save custom".includes(u.toLowerCase()))&&e.jsxs(z,{value:"presets",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Me,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Presets & Favorites"}),e.jsxs(M,{variant:"outline",className:"text-xs",children:[_.length+te.length," saved"]})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Favorites"}),_.length===0?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No favorites yet — star a frequency to save it here"}):e.jsx("div",{className:"flex flex-wrap gap-1",children:_.map((s,r)=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>{l(s.freq),i(s.wave)},children:s.name}),e.jsx(h,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>We(N=>N.filter((T,A)=>A!==r)),children:e.jsx(Vt,{className:"h-3 w-3"})})]},r))})]}),e.jsx(S,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{className:"text-sm font-medium",children:"Recent Frequencies"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:te.map((s,r)=>e.jsxs(h,{variant:"ghost",size:"sm",className:"text-xs font-mono h-7",onClick:()=>l(s),children:[s," Hz"]},r))})]})]})]}),(!u||"visual spectrum waveform oscilloscope lissajous".includes(u.toLowerCase()))&&e.jsxs(z,{value:"visual",className:"border rounded-lg px-4",children:[e.jsx(R,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(as,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-semibold",children:"Visualizations"}),e.jsx(M,{variant:"outline",className:"text-xs",children:"6 tools"})]})}),e.jsxs(I,{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(p,{className:"text-sm font-medium",children:"Spectrum Analyzer"}),e.jsx(ms,{engine:t,active:!0})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(p,{className:"text-sm font-medium",children:"Oscilloscope (Waveform)"}),e.jsx(us,{engine:t,active:!0})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(p,{className:"text-sm font-medium",children:"Frequency → Color Mapping"}),e.jsx("div",{className:"flex gap-2",children:[100,250,500,1e3,2e3,5e3,1e4,15e3,2e4].map(s=>e.jsx("div",{className:"w-8 h-8 rounded-full border border-border",style:{backgroundColor:`hsl(${s/22e3*360}, 80%, 55%)`},title:`${s} Hz`},s))})]})]})]})]})})]})}function oa(){const[a,t]=o.useState(20),n=331.3+.606*a,[l,m]=o.useState(440),i=n/l;return e.jsxs("div",{className:"space-y-3",children:[e.jsx(p,{className:"text-sm font-medium",children:"Speed of Sound & Wavelength Calculator"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Temperature (°C)"}),e.jsx(q,{type:"number",value:a,onChange:c=>t(Number(c.target.value)),className:"font-mono"})]}),e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Frequency (Hz)"}
26),e.jsx(q,{type:"number",value:l,onChange:c=>m(Number(c.target.value)),className:"font-mono"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[e.jsx(le,{children:e.jsxs(ce,{className:"py-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Speed of Sound"}),e.jsxs("p",{className:"font-mono text-sm font-bold",children:[n.toFixed(1)," m/s"]})]})}),e.jsx(le,{children:e.jsxs(ce,{className:"py-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Wavelength"}),e.jsxs("p",{className:"font-mono text-sm font-bold",children:[i.toFixed(4)," m"]})]})}),e.jsx(le,{children:e.jsxs(ce,{className:"py-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Period"}),e.jsxs("p",{className:"font-mono text-sm font-bold",children:[(1e3/l).toFixed(4)," ms"]})]})})]})]})}function ia({engine:a,frequency:t,waveform:n,volume:l}){const[m,i]=o.useState("lowpass"),[c,f]=o.useState(1e3),[g,y]=o.useState(1),[u,w]=o.useState(!1),C=o.useRef(null),k=()=>{if(u)a.stop("filtered"),w(!1);else{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createGain(),v=d.createBiquadFilter();x.type=n,x.frequency.value=t,j.gain.value=l/100,v.type=m,v.frequency.value=c,v.Q.value=g,x.connect(v).connect(j).connect(a.masterGain),x.start(),C.current=v,a.oscillators.set("filtered",{osc:x,gain:j}),w(!0)}};return o.useEffect(()=>{C.current&&(C.current.frequency.value=c,C.current.Q.value=g,C.current.type=m)},[c,g,m]),e.jsxs("div",{className:"space-y-3",children:[e.jsx(p,{className:"text-sm font-medium",children:"Filter Demo"}),e.jsxs("div",{className:"flex gap-2 flex-wrap items-end",children:[e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Filter Type"}),e.jsxs(ps,{value:m,onValueChange:d=>i(d),children:[e.jsx(fs,{className:"w-32",children:e.jsx(js,{})}),e.jsx(vs,{children:["lowpass","highpass","bandpass","notch","allpass","peaking"].map(d=>e.jsx(J,{value:d,className:"capitalize",children:d},d))})]})]}),e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Cutoff (Hz)"}),e.jsx(q,{type:"number",value:c,onChange:d=>f(Number(d.target.value)),className:"w-24 font-mono"})]}),e.jsxs("div",{children:[e.jsx(p,{className:"text-xs",children:"Q Factor"}),e.jsx(q,{type:"number",value:g,onChange:d=>y(Number(d.target.value)),className:"w-20 font-mono",step:.1,min:.
261,max:20})]}),e.jsx(h,{onClick:k,variant:u?"destructive":"secondary",size:"sm",children:u?"Stop":"Play with Filter"})]}),e.jsx(S,{}),e.jsx(p,{className:"text-sm font-medium",children:"Quick Effects"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:[{l:"Tremolo",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createGain(),v=d.createOscillator(),b=d.createGain();x.frequency.value=t,x.type=n,v.frequency.value=5,b.gain.value=.3,v.connect(b).connect(j.gain),j.gain.value=.5,x.connect(j).connect(a.masterGain),x.start(),v.start(),setTimeout(()=>{x.stop(),v.stop()},4e3)}},{l:"Vibrato",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createGain(),v=d.createOscillator(),b=d.createGain();x.frequency.value=t,x.type=n,v.frequency.value=6,b.gain.value=10,v.connect(b).connect(x.frequency),j.gain.value=l/100,x.connect(j).connect(a.masterGain),x.start(),v.start(),setTimeout(()=>{x.stop(),v.stop()},4e3)}},{l:"AM Radio",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createOscillator(),v=d.createGain(),b=d.createGain();x.frequency.value=t,x.type="sine",j.frequency.value=50,v.gain.value=.5,b.gain.value=l/100,j.connect(v).connect(b.gain),x.connect(b).connect(a.masterGain),x.start(),j.start(),setTimeout(()=>{x.stop(),j.stop()},4e3)}},{l:"FM Synth",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createOscillator(),v=d.createGain(),b=d.createGain();x.frequency.value=t,j.frequency.value=t*2,v.gain.value=200,b.gain.value=l/100,j.connect(v).connect(x.frequency),x.connect(b).connect(a.masterGain),x.start(),j.start(),setTimeout(()=>{x.stop(),j.stop()},4e3)}},{l:"Ring Mod",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createOscillator(),v=d.createGain(),b=d.createGain();x.frequency.value=t,j.frequency.value=150,v.gain.value=1,b.gain.value=l/100,x.connect(b),j.connect(v).connect(b.gain),b.connect(a.masterGain),x.start(),j.start(),setTimeout(()=>{x.stop(),j.stop()},4e3)}},{l:"Distortion",fn:()=>{a.init();const d=a.ctx,x=d.createOscillator(),j=d.createWaveShaper(),v=d.createGain();x.frequency.value=t,x.type=n;const b=new Float32Array(256);for(let B=0;B<256;B++){const E=B*2/256-1;b[B]=(Math.PI+50)*E/(Math.PI+50*Math.abs(E))}j.curve=b,v.gain.value=l/100,x.connect(j).connect(v).connect(a.masterGain),x.start(),setTimeout(()=>x.stop(),4e3)}}].map(d=>e.jsx(h,{variant:"outline",size:"sm",className:"text-xs",onClick:d.fn,children:d.l},d.l))})]})}function ga(){return e.jsx("div",{className:"h-full overflow-auto",children:e.jsx(ca,{})})}export{ga as FrequencyPanel};

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.