PageSourceSearch

https://oncehit.net/_next/static/chunks/3253.0aa5cf11b029082e.js

js oncehit.net collected 2026-10-02 01:06:47 UTC 20,593 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3253],{79989:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var r=a(57437),n=a(29),s=a.n(n),o=a(2265),i=a(49924),l=a(18030),c=a(73890),d=a(28354),m=a(4159);function u(e){try{var t,a;null===(a=navigator)||void 0===a||null===(t=a.vibrate)||void 0===t||t.call(a,e)}catch(e){}}function f(e){let{theme:t,capsuleColorSet:a,knobRotation:n,isTwisting:s,twistDuration:i}=e,l=(0,o.useMemo)(()=>(0,m.qN)(a),[a]);return(0,r.jsxs)("svg",{viewBox:"0 0 200 320",className:"w-full h-auto block","aria-hidden":"true",children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gacha-body-grad",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:t.bodyGradient[0]}),(0,r.jsx)("stop",{offset:"100%",stopColor:t.bodyGradient[1]})]}),(0,r.jsxs)("radialGradient",{id:"gacha-knob-grad",cx:"35%",cy:"35%",r:"65%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:"0.5"}),(0,r.jsx)("stop",{offset:"50%",stopColor:t.knobColor}),(0,r.jsx)("stop",{offset:"100%",stopColor:t.knobCenterColor})]}),(0,r.jsxs)("linearGradient",{id:"gacha-dome-glass",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:"0.4"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0.05"})]}),(0,r.jsx)("clipPath",{id:"gacha-dome-clip",children:(0,r.jsx)("path",{d:"M 60 110 Q 100 30 140 110 Z"})})]}),(0,r.jsx)("rect",{x:"40",y:"110",width:"120",height:"170",rx:"14",fill:"url(#gacha-body-grad)",stroke:t.bezelColor,strokeWidth:"3"}),(0,r.jsx)("rect",{x:"48",y:"118",width:"20",height:"150",rx:"6",fill:"#FFFFFF",opacity:"0.18"}),(0,r.jsx)("rect",{x:"50",y:"106",width:"100",height:"14",rx:"3",fill:t.bezelColor,stroke:t.knobCenterColor,strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M 56 110 Q 100 28 144 110 Z",fill:"#FFFFFF",opacity:"0.35",stroke:t.bezelColor,strokeWidth:"2"}),(0,r.jsx)("g",{clipPath:"url(#gacha-dome-clip)",children:l.map((e,t)=>(0,r.jsxs)("g",{transform:"translate(".concat(e.cx," ").concat(e.cy+18,") rotate(").concat(e.rotation,")"),children:[(0,r.jsx)("path",{d:"M -7 0 A 7 7 0 0 1 7 0 L 7 1 L -7 1 Z",fill:e.topColor,stroke:"rgba(0,0,0,0.15)",strokeWidth:"0.3"}),(0,r.jsx)("path",{d:"M -7 1 L 7 1 A 7 7 0 0 1 -7 1 Z",fill:e.bottomColor,stroke:"rgba(0,0,0,0.15)",strokeWidth:"0.3"}),(0,r.jsx)("line",{x1:"-7",y1:"1",x2:"7",y2:"1",stroke:"rgba(0,0,0,0.25)",strokeWidth:"0.4"})]},t))}),(0,r.jsx)("path",{d:"M 56 110 Q 100 28 144 110 Z",fill:"url(#gacha-dome-glass)",pointerEvents:"none"}),(0,r.jsx)("path",{d:"M 72 100 Q 78 60 96 38",stroke:"#FFFFFF",strokeWidth:"2.5",fill:"none",opacity:"0.5",strokeLinecap:"round"}),(0,r.jsx)("rect",{x:"60",y:"130",width:"32",height:"6",rx:"2",fill:t.coinSlotColor,opacity:"0.7"}),(0,r.jsx)("rect",{x:"64",y:"132",width:"24",height:"2",rx:"1",fill:"#000000",opacity:"0.5"}),(0,r.jsx)("rect",{x:"58",y:"148",width:"84",height:"22",rx:"3",fill:t.bodyGradient[1],opacity:"0.5",stroke:t.bezelColor,strokeWidth:"1"}),(0,r.jsx)("text",{x:"100",y:"163",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontSize:"10",fontWeight:"bold",letterSpacing:"2",fill:t.nameplateColor,children:"GACHA"}),(0,r.jsxs)("g",{style:{transform:"rotate(".concat(n,"deg)"),transformOrigin:"100px 200px",transition:s?"transform ".concat(i,"s cubic-bezier(0.3, 0.7, 0.4, 1)"):"none"},"data-testid":"gacha-knob",children:[(0,r.jsx)("circle",{cx:"100",cy:"200",r:"22",fill:"url(#gacha-knob-grad)",stroke:t.knobCenterColor,strokeWidth:"2"}),(0,r.jsx)("rect",{x:"98",y:"183",width:"4",height:"34",rx:"1",fill:t.knobCenterColor}),(0,r.jsx)("rect",{x:"83",y:"198",width:"34",height:"4",rx:"1",fill:t.knobCenterColor}),(0,r.jsx)("circle",{cx:"100",cy:"200",r:"4",fill:t.knobCenterColor}),(0,r.jsx)("ellipse",{cx:"94",cy:"193",rx:"5",ry:"3",fill:"#FFFFFF",opacity:"0.6"})]}),(0,r.jsx)("rect",{x:"68",y:"240",width:"64",height:"34",rx:"4",fill:"rgba(255,255,255,0.15)",stroke:t.bezelColor,strokeWidth:"2"}),(0,r.jsx)("rect",{x:"72",y:"245",width:"56",height:"3",rx:"1.5",fill:t.chuteColor,opacity:"0.6"}),(0,r.jsx)("rect",{x:"40",y:"276",width:"120",height:"6",rx:"3",fill:t.bezelColor,opacity:"0.4"})]})}function p(e){let{topColor:t,bottomColor:a,isFalling:n,dropDuration:s,isOpening:o,isWin:i,prizeImageUrl:l,noWinImageUrl:c,theme:d}=e;return(0,r.jsx)("div",{className:"absolute",style:{left:"50%",top:n?"78%":"32%",transform:"translate(-50%, -50%)",transition:n?"top ".concat(s,"s cubic-bezier(0.5, 0, 0.7, 1.4)"):"none",willChange:n?"top":"auto",width:80,height:80,zIndex:5},"data-testid":"gacha-capsule",children:(0,r.jsxs)("div",{className:"relative w-full h-full",style:{filter:o?"drop-shadow(0 0 18px ".concat(d.accentColor,"AA)"):"drop-shadow(0 4px 8px rgba(0,0,0,0.3))"},children:[(0,r.jsx)("div",{className:"absolute left-0 right-0 mx-auto rounded-t-full overflow-hidden",style:{to
1p:0,width:80,height:40,background:"radial-gradient(circle at 30% 30%, #FFFFFF99, ".concat(t,")"),border:"2px solid rgba(0,0,0,0.2)",borderBottom:"none",transform:o?"translateY(-30px) rotate(-12deg)":"translateY(0) rotate(0deg)",transformOrigin:"left bottom",transition:"transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)"}}),(0,r.jsx)("div",{className:"absolute left-0 right-0 mx-auto rounded-b-full overflow-hidden",style:{top:38,width:80,height:42,background:"radial-gradient(circle at 30% 70%, #FFFFFF99, ".concat(a,")"),border:"2px solid rgba(0,0,0,0.2)",borderTop:"none"}}),!o&&(0,r.jsx)("div",{className:"absolute left-0 right-0 mx-auto",style:{top:38,width:80,height:2,background:"rgba(0,0,0,0.25)"}}),o&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center animate-capsule-content-in",style:{zIndex:2},children:i&&l?(0,r.jsx)("img",{src:l,alt:"",className:"w-14 h-14 object-contain",draggable:!1}):!i&&c?(0,r.jsx)("img",{src:c,alt:"",className:"w-14 h-14 object-contain opacity-90",draggable:!1}):i?(0,r.jsx)("div",{style:{fontSize:40,color:d.accentColor},children:"★"}):(0,r.jsx)("div",{style:{fontSize:32,opacity:.5},children:"✕"})})]})})}function h(e){var t;let{game_config:a,is_win:n,won_prize:h,no_win_image_url:x,gamePhase:g,onStartGame:y,onGameComplete:b}=e,j=(0,i.b)(),{t:w}=(0,l.$)(j),k=function(e){let t="number"==typeof e.machine_style_id?e.machine_style_id:1;return{machineStyleId:t,capsuleColorSetId:"number"==typeof e.capsule_color_set_id?e.capsule_color_set_id:1,twistDuration:"number"==typeof e.twist_duration?Math.max(.5,Math.min(2.5,e.twist_duration)):1,dropDuration:"number"==typeof e.drop_duration?Math.max(.8,Math.min(3,e.drop_duration)):1.5}}(a),T=(0,m.hy)(k.machineStyleId),C=(0,m.T)(k.capsuleColorSetId),v=(0,o.useMemo)(()=>{let e=Math.floor(Math.random()*C.tops.length);return{top:C.tops[e],bottom:C.bottoms[e]}},[C.id]),[F,z]=(0,o.useState)(0),[N,_]=(0,o.useState)(!1),[A,S]=(0,o.useState)("hidden"),[M,V]=(0,o.useState)(!1),[W,R]=(0,o.useState)(!1),[G,L]=(0,o.useState)(!1),D=(0,o.useRef)(!1),q=(0,o.useRef)(!1),{play:O,muted:B,toggleMute:Q}=(0,c.w)({spin:d.w4,tick:d.Yf,win:d.QQ,lose:d.gL}),E=(0,o.useCallback)(()=>{N||"hidden"!==A||"ready"!==g||(L(!1),O("spin"),u(30),y(),_(!0),z(e=>e+360+180),setTimeout(()=>{_(!1),S("falling"),O("tick"),setTimeout(()=>{S("landed"),O("tick"),u(40),setTimeout(()=>{S("opening"),setTimeout(()=>{O(n?"win":"lose"),n&&u([100,50,100,50,200]),V(!0),D.current||(D.current=!0,b())},700)},400)},1e3*k.dropDuration)},1e3*k.twistDuration))},[N,A,g,y,b,k.twistDuration,k.dropDuration,n,O]);(0,o.useEffect)(()=>{"result"!==g||M||(V(!0),S("opening"))},[g,M]),(0,o.useEffect)(()=>{if("ready"===g&&"hidden"===A&&!q.current){q.current=!0,L(!0);let e=setTimeout(()=>L(!1),3e3);return()=>clearTimeout(e)}},[g,A]);let I="ready"===g&&"hidden"===A&&!N;return(0,r.jsxs)("div",{style:{minHeight:340,background:"linear-gradient(180deg, ".concat(T.bodyGradient[0],"25, ").concat(T.bodyGradient[1],"15)")},"data-testid":"gacha-game",className:"jsx-85a42a2ee8edeca0 relative flex flex-col items-center justify-center rounded-2xl overflow-visible py-6 px-4 sm:py-8",children:[(0,r.jsx)("button",{type:"button",onClick:Q,"aria-label":w(B?"play.sound.unmute":"play.sound.mute"),"data-testid":"gacha-mute-btn",className:"jsx-85a42a2ee8edeca0 absolute top-2 right-2 z-30 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-500 shadow-sm transition-colors hover:bg-white cursor-pointer",children:B?(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-85a42a2ee8edeca0 h-4 w-4",children:[(0,r.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",className:"jsx-85a42a2ee8edeca0"}),(0,r.jsx)("line",{x1:"23",y1:"9",x2:"17",y2:"15",className:"jsx-85a42a2ee8edeca0"}),(0,r.jsx)("line",{x1:"17",y1:"9",x2:"23",y2:"15",className:"jsx-85a42a2ee8edeca0"})]}):(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-85a42a2ee8edeca0 h-4 w-4",children:[(0,r.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",className:"jsx-85a42a2ee8edeca0"}),(0,r.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",className:"jsx-85a42a2ee8edeca0"}),(0,r.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",className:"jsx-85a42a2ee8edeca0"})]})}),(0,r.jsxs)("div",{style:{width:240,maxWidth:"100%"},"data-testid":"gacha-machine",className:"jsx-85a42a2ee8edeca0 relative",children:[(0,r.jsx)(f,{theme:T,capsuleColorSet
1:C,knobRotation:F,isTwisting:N,twistDuration:k.twistDuration}),"hidden"!==A&&(0,r.jsx)(p,{topColor:v.top,bottomColor:v.bottom,isFalling:"falling"===A,dropDuration:k.dropDuration,isOpening:"opening"===A,isWin:n,prizeImageUrl:null!==(t=null==h?void 0:h.prize_image_url)&&void 0!==t?t:null,noWinImageUrl:x,theme:T})]}),(0,r.jsxs)("div",{className:"jsx-85a42a2ee8edeca0 relative mt-5",children:[G&&I&&(0,r.jsx)("div",{"data-testid":"gacha-twist-hint",className:"jsx-85a42a2ee8edeca0 absolute -top-7 left-1/2 -translate-x-1/2 animate-gacha-twist-hint pointer-events-none",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:T.accentColor,className:"jsx-85a42a2ee8edeca0 h-6 w-6 drop-shadow-md",children:(0,r.jsx)("path",{d:"M12 2a1 1 0 0 1 1 1v12.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5a1 1 0 0 1 1.414-1.414L11 15.586V3a1 1 0 0 1 1-1z",className:"jsx-85a42a2ee8edeca0"})})}),(0,r.jsx)("button",{type:"button",onClick:E,disabled:!I,style:{width:140,height:46,background:T.accentColor,color:T.bodyGradient[1],border:"3px solid ".concat(T.bezelColor),boxShadow:"0 6px 14px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.4)",fontWeight:800,fontSize:15,letterSpacing:"0.14em"},"data-testid":"gacha-twist-btn",className:"jsx-85a42a2ee8edeca0 "+"rounded-full flex items-center justify-center transition-all ".concat(I?"hover:scale-105 active:scale-95 cursor-pointer":"cursor-not-allowed opacity-70"),children:w(N?"play.gacha.twisting":"falling"===A?"play.gacha.dropping":"opening"===A||"landed"===A?"play.gacha.revealing":"play.gacha.twistButton")})]}),M&&(0,r.jsx)("div",{"data-testid":"gacha-result",className:"jsx-85a42a2ee8edeca0 mt-6 flex flex-col items-center animate-gacha-result-in",children:n&&h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{style:{color:T.bodyGradient[1]},"data-testid":"gacha-result-title",className:"jsx-85a42a2ee8edeca0 text-xl font-bold mb-2",children:w("play.gacha.resultWin")}),h.prize_image_url&&(0,r.jsx)("button",{type:"button",onClick:()=>R(!0),"data-testid":"gacha-prize-image-btn",className:"jsx-85a42a2ee8edeca0 cursor-pointer",children:(0,r.jsx)("img",{src:h.prize_image_url,alt:h.prize_name,"data-testid":"gacha-prize-image",className:"jsx-85a42a2ee8edeca0 w-24 h-24 object-contain rounded-lg shadow-md bg-white mb-3"})}),(0,r.jsx)("p",{"data-testid":"gacha-prize-name",className:"jsx-85a42a2ee8edeca0 text-lg font-semibold text-gray-800",children:h.prize_name})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{"data-testid":"gacha-result-title",className:"jsx-85a42a2ee8edeca0 text-xl font-bold text-gray-600 mb-2",children:w("play.gacha.resultL
1ose")}),x&&(0,r.jsx)("button",{type:"button",onClick:()=>R(!0),"data-testid":"gacha-no-win-image-btn",className:"jsx-85a42a2ee8edeca0 cursor-pointer",children:(0,r.jsx)("img",{src:x,alt:"","data-testid":"gacha-no-win-image",className:"jsx-85a42a2ee8edeca0 w-24 h-24 object-contain rounded-lg shadow-md bg-white"})})]})}),W&&(0,r.jsx)("div",{onClick:()=>R(!1),"data-testid":"gacha-lightbox",className:"jsx-85a42a2ee8edeca0 fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-6",children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-85a42a2ee8edeca0 relative max-w-sm w-full",children:[(0,r.jsx)("img",{src:n&&(null==h?void 0:h.prize_image_url)?h.prize_image_url:x||"",alt:(null==h?void 0:h.prize_name)||"",className:"jsx-85a42a2ee8edeca0 w-full object-contain rounded-xl bg-white p-4 shadow-2xl"}),(null==h?void 0:h.prize_name)&&(0,r.jsx)("p",{className:"jsx-85a42a2ee8edeca0 mt-3 text-center text-white text-lg font-bold drop-shadow-md",children:h.prize_name}),(0,r.jsx)("button",{type:"button",onClick:()=>R(!1),"data-testid":"gacha-lightbox-close",className:"jsx-85a42a2ee8edeca0 absolute -top-3 -right-3 w-8 h-8 rounded-full bg-white/90 text-gray-600 flex items-center justify-center shadow-md hover:bg-white transition-colors",children:(0,r.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"jsx-85a42a2ee8edeca0 w-5 h-5",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd",className:"jsx-85a42a2ee8edeca0"})})})]})}),(0,r.jsx)(s(),{id:"85a42a2ee8edeca0",children:"@-webkit-keyframes gacha-result-in{0%{opacity:0;-webkit-transform:translatey(20px)scale(.95);transform:translatey(20px)scale(.95)}100%{opacity:1;-webkit-transform:translatey(0)scale(1);transform:translatey(0)scale(1)}}@-moz-keyframes gacha-result-in{0%{opacity:0;-moz-transform:translatey(20px)scale(.95);transform:translatey(20px)scale(.95)}100%{opacity:1;-moz-transform:translatey(0)scale(1);transform:translatey(0)scale(1)}}@-o-keyframes gacha-result-in{0%{opacity:0;-o-transform:translatey(20px)scale(.95);transform:translatey(20px)scale(.95)}100%{opacity:1;-o-transform:translatey(0)scale(1);transform:translatey(0)scale(1)}}@keyframes gacha-result-in{0%{opacity:0;-webkit-transform:translatey(20px)scale(.95);-moz-transform:translatey(20px)scale(.95);-o-transform:translatey(20px)scale(.95);transform:translatey(20px)scale(.95)}100%{opacity:1;-webkit-transform:translatey(0)scale(1);-moz-transform:translatey(0)scale(1);-o-transform:translatey(0)scale(1);transform:translatey(0)scale(1)}}.animate-gacha-result-in.jsx-85a42a2ee8edeca0{-webkit-animation:gacha-result-in 500ms ease-out forwards;-moz-animation:gacha-result-in 500ms ease-out forwards;-o-animation:gacha-result-in 500ms ease-out forwards;animation:gacha-result-in 500ms ease-out forwards}@-webkit-keyframes gacha-twist-hint{0%,100%{-webkit-transform:translate(-50%,-4px);transform:translate(-50%,-4px);opacity:.7}50%{-webkit-transform:translate(-50%,4px);transform:translate(-50%,4px);opacity:1}}@-moz-keyframes gacha-twist-hint{0%,100%{-moz-transform:translate(-50%,-4px);transform:translate(-50%,-4px);opacity:.7}50%{-moz-transform:translate(-50%,4px);transform:translate(-50%,4px);opacity:1}}@-o-keyframes gacha-twist-hint{0%,100%{-o-transform:translate(-50%,-4px);transform:translate(-50%,-4px);opacity:.7}50%{-o-transform:translate(-50%,4px);transform:translate(-50%,4px);opacity:1}}@keyframes gacha-twist-hint{0%,100%{-webkit-transform:translate(-50%,-4px);-moz-transform:translate(-50%,-4px);-o-transform:translate(-50%,-4px);transform:translate(-50%,-4px);opacity:.7}50%{-webkit-transform:translate(-50%,4px);-moz-transform:translate(-50%,4px);-o-transform:translate(-50%,4px);transform:translate(-50%,4px);opacity:1}}.animate-gacha-twist-hint.jsx-85a42a2ee8edeca0{-webkit-animation:gacha-twist-hint 1.2s ease-in-out infinite;-moz-animation:gacha-twist-hint 1.2s ease-in-out infinite;-o-animation:gacha-twist-hint 1.2s ease-in-out infinite;animation:gacha-twist-hint 1.2s ease-in-out infinite}@-webkit-keyframes capsule-content-in{0%{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}60%{opacity:1;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-moz-keyframes capsule-content-in{0%{opacity:0;-moz-transform:scale(.4);transform:scale(.4)}60%{opacity:1;-moz-transform:scale(1.15);transform:scale(1.15)}100%{opacity:1;-moz-transform:scale(1);transform:scale(1)}}@-o-keyframes capsule-content-in{0%{opacity:0;-o-transform:scale(.4);transform:scale(.4)}60%{opacity:1;-o-transform:scale(1.15);transform:scale(1.15)}100%{opacity:1;-o-transform:scale(1);transform:scale(1)}}@keyframes capsule-content-in{0%{opacity:0;-webkit-transform:scale(.4);-moz-transform:scale(.4);-o-transform:scale(.4);transform:scale(.4)}60%{opacity:1;-webkit-transform:scale(1.15);-moz-transform:scale(1.15);-o-transform:scale(1.15);transform:scale(1.15)}100%{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.animate-capsule-content-in{-webkit-animation:capsule-content-in.45s ease-out forwards;-moz-animation:capsule-content-in.45s ease-out forwards;-o-animation:capsule-content-in.45s ease-out forwards;animation:capsule-content-in.45s ease-out forwards}"})]})}},73890:function(e,t,a){a.d(t,{w:function(){return n}});var r=a(2265);function n(e){let t=(0,r.useRef)(e);t.current=e;let[a,n]=(0,r.useState)(!1),s=(0,r.useRef)(a);return s.current=a,{play:(0,r.useCallback)(e=>{if(s.current)return;let a=t.current[e];if(a)try{a()}catch(e){}},[]),muted:a,toggleMute:(0,r.useCallback)(()=>{n(e=>!e)},[])}}},28354:function(e,t,a){a.d(t,{QQ:function(){return c},Tw:function(){return m},Yf:function(){return p},ZQ:function(){return u},gL:function(){return d},q2:function(){return o},tn:function(){return i},vS:function(){return l},w4:function(){return f}});let r=null;function n(){try{return r||(r=new(window.AudioContext||window.webkitAudioContext)),"suspended"===r.state&&r.resume(),r}catch(e){return null}}function s(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.15,s=n();if(!s)return;let o=s.createOscillator(),i=s.createGain();o.type=a,o.frequency.setValueAtTime(e,s.currentTime),i.gain.setValueAtTime(r,s.currentTime),i.gain.exponentialRampToValueAtTime(.001,s.currentTime+t),o.connect(i),i.connect(s.destination),o.start(s.currentTime),o.stop(s.currentTime+t)}
1function o(){s(880,.06,"sine",.12)}function i(){let e=n();if(!e)return;let t=e.createOscillator(),a=e.createGain();t.type="sawtooth",t.frequency.setValueAtTime(600,e.currentTime),t.frequency.exponentialRampToValueAtTime(200,e.currentTime+.2),a.gain.setValueAtTime(.1,e.currentTime),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.25),t.connect(a),a.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.25)}function l(){[523,659,784].forEach((e,t)=>{setTimeout(()=>s(e,.1,"triangle",.1),80*t)})}function c(){[523,659,784,1047].forEach((e,t)=>{setTimeout(()=>s(e,.15,"sine",.12),120*t)})}function d(){s(440,.18,"sine",.08),setTimeout(()=>s(330,.22,"sine",.06),150)}function m(){let e=n();if(!e)return;let t=.03*e.sampleRate,a=e.createBuffer(1,t,e.sampleRate),r=a.getChannelData(0);for(let e=0;e<t;e++)r[e]=(2*Math.random()-1)*.3;let s=e.createBufferSource();s.buffer=a;let o=e.createGain();o.gain.setValueAtTime(.08,e.currentTime),o.gain.exponentialRampToValueAtTime(.001,e.currentTime+.04),s.connect(o),o.connect(e.destination),s.start(e.currentTime)}function u(){let e=n();if(!e)return;let t=e.createOscillator(),a=e.createGain();t.type="sine",t.frequency.setValueAtTime(300,e.currentTime),t.frequency.exponentialRampToValueAtTime(800,e.currentTime+.3),a.gain.setValueAtTime(.12,e.currentTime),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.35),t.connect(a),a.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.35)}function f(){let e=n();if(!e)return;let t=e.createOscillator(),a=e.createGain();t.type="triangle",t.frequency.setValueAtTime(200,e.currentTime),t.frequency.exponentialRampToValueAtTime(600,e.currentTime+.4),a.gain.setValueAtTime(.1,e.currentTime),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.45),t.connect(a),a.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.45)}function p(){s(1200,.02,"square",.1)}}}]);

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.