1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6121,3466],{43466:function(e,t,r){r.r(t),r.d(t,{default:function(){return p}});var a=r(57437),n=r(29),o=r.n(n),l=r(2265),s=r(49924),i=r(18030),c=r(73890),m=r(28354),u=r(86112);function f(e){try{var t,r;null===(r=navigator)||void 0===r||null===(t=r.vibrate)||void 0===t||t.call(r,e)}catch(e){}}function d(e){var t;let{value:r,theme:n,size:o=80}=e,l=null!==(t=u.KK[r])&&void 0!==t?t:u.KK[1],s=o/3,i=.07*o;return(0,a.jsxs)("svg",{viewBox:"0 0 ".concat(o," ").concat(o),width:o,height:o,"aria-hidden":"true",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"dice-face-grad-".concat(n.id),x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:n.faceBg,stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"100%",stopColor:n.shadowInner,stopOpacity:"1"})]})}),(0,a.jsx)("rect",{x:"2",y:"2",width:o-4,height:o-4,rx:.18*o,fill:"url(#dice-face-grad-".concat(n.id,")"),stroke:n.borderColor,strokeWidth:"2"}),l.map((e,t)=>{let[r,o]=e;return(0,a.jsx)("circle",{cx:o*s+s/2,cy:r*s+s/2,r:i,fill:n.pipColor},t)})]})}function b(e){let{finalFace:t,isRolling:r,duration:n,startDelay:o,onStop:s,theme:i,size:c=80}=e,[m,u]=(0,l.useState)(t),[f,b]=(0,l.useState)(0),[p,y]=(0,l.useState)("idle"),x=(0,l.useRef)(null),h=(0,l.useRef)(null),g=(0,l.useRef)(null);(0,l.useEffect)(()=>(r?(y("idle"),x.current&&clearInterval(x.current),h.current&&clearTimeout(h.current),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{y("rolling"),b(e=>e+720+Math.floor(360*Math.random())),x.current=setInterval(()=>{u(1+Math.floor(6*Math.random()))},80),h.current=setTimeout(()=>{x.current&&clearInterval(x.current),u(t),y("stopped"),null==s||s()},1e3*n)},o)):(u(t),y("idle"),b(0)),()=>{x.current&&clearInterval(x.current),h.current&&clearTimeout(h.current),g.current&&clearTimeout(g.current)}),[r,t,n,o]);let w="rolling"===p;return(0,a.jsx)("div",{className:w?"dice-wobble":"stopped"===p?"dice-settle":"",style:{width:c,height:c,transform:"rotate(".concat(f,"deg)"),transition:w?"transform ".concat(n,"s cubic-bezier(0.2, 0.7, 0.3, 1)"):"none",willChange:w?"transform":"auto",filter:"drop-shadow(0 6px 10px rgba(0,0,0,0.35))"},"data-testid":"dice-roll-die","data-final-face":"stopped"===p?t:void 0,children:(0,a.jsx)(d,{value:m,theme:i,size:c})})}function p(e){let{game_config:t,is_win:r,won_prize:n,no_win_image_url:d,gamePhase:p,onStartGame:y,onGameComplete:x}=e,h=(0,s.b)(),{t:g}=(0,i.$)(h),w=function(e){let t="number"==typeof e.dice_style_id?e.dice_style_id:1,r="number"==typeof e.table_style_id?e.table_style_id:1,a="number"==typeof e.dice_count?Math.max(1,Math.min(3,e.dice_count)):2,n="specific"===e.win_rule||"all_same"===e.win_rule||"sum_gte"===e.win_rule?e.win_rule:"all_same",o="number"==typeof e.target_number?Math.max(1,Math.min(6,e.target_number)):6,l="number"==typeof e.target_sum?e.target_sum:4*a;return{diceStyleId:t,tableStyleId:r,diceCount:a,winRule:n,targetNumber:o,targetSum:l,rollDuration:"number"==typeof e.roll_duration?Math.max(2,Math.min(6,e.roll_duration)):3}}(t),j=(0,u.bF)(w.diceStyleId),k=(0,u.v$)(w.tableStyleId),v=(0,l.useMemo)(()=>(0,u.LW)(w.diceCount,w.winRule,w.targetNumber,w.targetSum,r),[w.diceCount,w.winRule,w.targetNumber,w.targetSum,r]),[T,C]=(0,l.useState)(!1),[z,R]=(0,l.useState)(!1),[_,F]=(0,l.useState)(!1),[N,B]=(0,l.useState)(!1),A=(0,l.useRef)(!1),S=(0,l.useRef)(!1),M=(0,l.useRef)(0),{play:D,muted:G,toggleMute:E}=(0,c.w)({spin:m.w4,tick:m.Yf,win:m.QQ,lose:m.gL}),K=(0,l.useCallback)(()=>{T||"ready"!==p||(B(!1),D("spin"),f(30),M.current=0,y(),C(!0),setTimeout(()=>{C(!1),R(!0),setTimeout(()=>{D(r?"win":"lose"),r&&f([100,50,100,50,200])},200),A.current||(A.current=!0,x())},1e3*w.rollDuration+(w.diceCount-1)*250+400))},[T,p,y,x,w.rollDuration,w.diceCount,r,D]),V=(0,l.useCallback)(()=>{M.current+=1,D("tick"),f(20)},[D]);(0,l.useEffect)(()=>{"result"!==p||z||(R(!0),C(!1))},[p,z]),(0,l.useEffect)(()=>{if("ready"===p&&!T&&!S.current){S.current=!0,B(!0);let e=setTimeout(()=>B(!1),3e3);return()=>clearTimeout(e)}},[p,T]);let L="ready"===p&&!T,I=1===w.diceCount?110:2===w.diceCount?90:78;return(0,a.jsxs)("div",{style:{minHeight:340,background:"linear-gradient(135deg, ".concat(k.bgGradient[0],"30, ").concat(k.bgGradient[2],"10)")}
1,"data-testid":"dice-roll-game",className:"jsx-413e757f2cb8bbc1 relative flex flex-col items-center justify-center rounded-2xl overflow-visible py-6 px-4 sm:py-8",children:[(0,a.jsx)("button",{type:"button",onClick:E,"aria-label":g(G?"play.sound.unmute":"play.sound.mute"),"data-testid":"dice-roll-mute-btn",className:"jsx-413e757f2cb8bbc1 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:G?(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-413e757f2cb8bbc1 h-4 w-4",children:[(0,a.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",className:"jsx-413e757f2cb8bbc1"}),(0,a.jsx)("line",{x1:"23",y1:"9",x2:"17",y2:"15",className:"jsx-413e757f2cb8bbc1"}),(0,a.jsx)("line",{x1:"17",y1:"9",x2:"23",y2:"15",className:"jsx-413e757f2cb8bbc1"})]}):(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-413e757f2cb8bbc1 h-4 w-4",children:[(0,a.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",className:"jsx-413e757f2cb8bbc1"}),(0,a.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",className:"jsx-413e757f2cb8bbc1"}),(0,a.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",className:"jsx-413e757f2cb8bbc1"})]})}),(0,a.jsxs)("div",{style:{padding:"32px 24px",background:"linear-gradient(180deg, ".concat(k.bgGradient[0],", ").concat(k.bgGradient[1]," 55%, ").concat(k.bgGradient[2],")"),border:"4px solid ".concat(k.borderColor),borderRadius:24,boxShadow:"0 18px 40px rgba(0,0,0,0.35), inset 0 0 60px ".concat(k.feltOverlay,", inset 0 2px 0 rgba(255,255,255,0.1)")},"data-testid":"dice-roll-table",className:"jsx-413e757f2cb8bbc1 relative w-full max-w-md",children:[(0,a.jsxs)("div",{style:{color:"rgba(255, 255, 255, 0.92)",textShadow:"0 1px 2px rgba(0,0,0,0.35)"},"data-testid":"dice-roll-rule-text",className:"jsx-413e757f2cb8bbc1 text-center mb-4 text-xs font-medium tracking-wider",children:["specific"===w.winRule&&g("play.diceRoll.ruleSpecificDesc",{target:String(w.targetNumber)}),"all_same"===w.winRule&&g("play.diceRoll.ruleAllSameDesc",{count:String(w.diceCount)}),"sum_gte"===w.winRule&&g("play.diceRoll.ruleSumGteDesc",{count:String(w.diceCount),target:String(w.targetSum)})]}),(0,a.jsx)("div",{style:{minHeight:I+16},"data-testid":"dice-roll-dice-area",className:"jsx-413e757f2cb8bbc1 flex justify-center items-center gap-4 my-6",children:v.map((e,t)=>(0,a.jsx)(b,{finalFace:e,isRolling:T,duration:w.rollDuration,startDelay:250*t,onStop:V,theme:j,size:I},t))}),(0,a.jsxs)("div",{className:"jsx-413e757f2cb8bbc1 relative flex justify-center mt-4",children:[N&&L&&(0,a.jsx)("div",{"data-testid":"dice-roll-hint",className:"jsx-413e757f2cb8bbc1 absolute -top-7 animate-dice-roll-hint pointer-events-none",children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:k.borderColor,className:"jsx-413e757f2cb8bbc1 h-6 w-6 drop-shadow-md",children:(0,a.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-413e757f2cb8bbc1"})})}),(0,a.jsx)("button",{type:"button",onClick:K,disabled:!L,style:{width:130,height:46,background:k.borderColor,color:k.bgGradient[2],border:"3px solid ".concat(k.bgGradient[0]),boxShadow:"0 6px 14px rgba(0,0,0,0.35), inset 0 2px 4px rgba(255,255,255,0.3)",fontWeight:800,fontSize:16,letterSpacing:"0.12em"},"data-testid":"dice-roll-button",className:"jsx-413e757f2cb8bbc1 "+"rounded-full flex items-center justify-center transition-all ".concat(L?"hover:scale-105 active:scale-95 cursor-pointer":T?"":"cursor-not-allowed opacity-70"),children:g(T?"play.diceRoll.rolling":"play.diceRoll.rollButton")})]})]}),z&&(0,a.jsx)("div",{"data-testid":"dice-roll-result",className:"jsx-413e757f2cb8bbc1 mt-6 flex flex-col items-center animate-dice-result-in",children:r&&n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{style:{color:k.bgGradient[2]},"data-testid":"dice-roll-result-title",className:"jsx-413e757f2cb8bbc1 text-xl font-bold mb-2",children:g("play.diceRoll.resultWin")}),n.prize_image_url&&(0,a.jsx)("button",{type:"button",onClick:()=>F(!0),"data-testid":"dice-roll-prize-image-btn",className:"jsx-413e757f2cb8bbc1 cursor-pointer",children:(0,a.jsx)("img",{src:n.prize_image_url,alt:n.prize_name,"data-testid":"dice-roll-prize-image",className:"jsx-413e757f2cb8bbc1 w-24 h-24 object-contain rounded-lg shadow-md bg-white mb-3"})}),(0,a.jsx)("p",{"data-testid":"dice-roll-prize-name",className:"jsx-413e757f2cb8bbc1 text-lg font-semibold text-gray-800",children:n.prize_name})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{"data-testid":"dice-roll-result-title",className:"jsx-413e757f2cb8bbc1 text-xl font-bold text-gray-600 mb-2",children:g("play.diceRoll.resultLose")}),d&&(0,a.jsx)("button",{type:"button",onClick:()=>F(!0),"data-testid":"dice-roll-no-win-image-btn",className:"jsx-413e757f2cb8bbc1 cursor-pointer",children:(0,a.jsx)("img",{src:d,alt:"","data-testid":"dice-roll-no-win-image",className:"jsx-413e757f2cb8bbc1 w-24 h-24 object-contain rounded-lg shadow-md bg-white"})})]})}),_&&(0,a.jsx)("div",{onClick:()=>F(!1),"data-testid":"dice-roll-lightbox",className:"jsx-413e757f2cb8bbc1 fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-6",children:(0,a.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-413e757f2cb8bbc1 relative max-w-sm w-full",children:[(0,a.jsx)("img",{src:r&&(null==n?void 0:n.prize_image_url)?n.prize_image_url:d||"",alt:(null==n?void 0:n.prize_name)||"",className:"jsx-413e757f2cb8bbc1 w-full object-contain rounded-xl bg-white p-4 shadow-2xl"}),(null==n?void 0:n.prize_name)&&(0,a.jsx)("p",{className:"jsx-413e757f2cb8bbc1 mt-3 text-center text-white text-lg font-bold drop-shadow-md",children:n.prize_name}),(0,a.jsx)("button",{type:"button",onClick:()=>F(!1),"data-testid":"dice-roll-lightbox-close",className:"jsx-413e757f2cb8bbc1 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,a.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"jsx-413e757f2cb8bbc1 w-5 h-5",children:(0,a.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-413e757f2cb8bbc1"})})})]})}),(0,a.jsx)(o(),{id:"413e757f2cb8bbc1",children:"@-webkit-keyframes dice-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 dice-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 dice-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 dice-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-dice-result-in.jsx-413e757f2cb8bbc1{-webkit-animation:dice-result-in 500ms ease-out forwards;-moz-animation:dice-result-in 500ms ease-out forwards;-o-animation:dice-result-in 500ms ease-out forwards;animation:dice-result-in 500ms ease-out forwards}@-webkit-keyframes dice-roll-hint{0%,100%{-webkit-transform:translatey(-4px);transform:translatey(-4px);opacity:.7}50%{-webkit-transform:translatey(4px);transform:translatey(4px);opacity:1}}@-moz-keyframes dice-roll-hint{0%,100%{-moz-transform:translatey(-4px);transform:translatey(-4px);opacity:.7}50%{-moz-transform:translatey(4px);transform:translatey(4px);opacity:1}}@-o-keyframes dice-roll-hint{0%,100%{-o-transform:translatey(-4px);transform:translatey(-4px);opacity:.7}50%{-o-transform:translatey(4px);transform:translatey(4px);opacity:1}}@keyframes dice-roll-hint{0%,100%{-webkit-transform:translatey(-4px);-moz-transform:translatey(-4px);-o-transform:translatey(-4px);transform:translatey(-4px);opacity:.7}50%{-webkit-transform:translatey(4px);-moz-transform:translatey(4px);-o-transform:translatey(4px);transform:translatey(4px);opacity:1}}.animate-dice-roll-hint.jsx-413e757f2cb8bbc1{-webkit-animation:dice-roll-hint 1.2s ease-in-out infinite;-moz-animation:dice-roll-hint 1.2s ease-in-out infinite;-o-animation:dice-roll-hint 1.2s ease-in-out infinite;animation:dice-roll-hint 1.2s ease-in-out infinite}@-webkit-keyframes dice-wobble{0%,100%{-webkit-transform:translatey(0);transform:translatey(0)}25%{-webkit-transform:translatey(-8px);transform:translatey(-8px)}50%{-webkit-transform:translatey(-4px);transform:translatey(-4px)}75%{-webkit-transform:translatey(-12px);transform:translatey(-12px)}}@-moz-keyframes dice-wobble{0%,100%{-moz-transform:translatey(0);transform:translatey(0)}25%{-moz-transform:translatey(-8px);transform:translatey(-8px)}50%{-moz-transform:translatey(-4px);transform:translatey(-4px)}75%{-moz-transform:translatey(-12px);transform:translatey(-12px)}}@-o-keyframes dice-wobble{0%,100%{-o-transform:translatey(0);transform:translatey(0)}25%{-o-transform:translatey(-8px);transform:translatey(-8px)}50%{-o-transform:translatey(-4px);transform:translatey(-4px)}75%{-o-transform:translatey(-12px);transform:translatey(-12px)}}@keyframes dice-wobble{0%,100%{-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}25%{-webkit-transform:translatey(-8px);-moz-transform:translatey(-8px);-o-transform:translatey(-8px);transform:translatey(-8px)}50%{-webkit-transform:translatey(-4px);-moz-transform:translatey(-4px);-o-transform:translatey(-4px);transform:translatey(-4px)}75%{-webkit-transform:translatey(-12px);-moz-transform:translatey(-12px);-o-transform:translatey(-12px);transform:translatey(-12px)}}.dice-wobble{-webkit-animation:dice-wobble.4s ease-in-out infinite;-moz-animation:dice-wobble.4s ease-in-out infinite;-o-animation:dice-wobble.4s ease-in-out infinite;animation:dice-wobble.4s ease-in-out infinite}@-webkit-keyframes dice-settle{0%{-webkit-transform:scale(1.1);transform:scale(1.1)}60%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-moz-keyframes dice-settle{0%{-moz-transform:scale(1.1);transform:scale(1.1)}60%{-moz-transform:scale(.95);transform:scale(.95)}100%{-moz-transform:scale(1);transform:scale(1)}}@-o-keyframes dice-settle{0%{-o-transform:scale(1.1);transform:scale(1.1)}60%{-o-transform:scale(.95);transform:scale(.95)}100%{-o-transform:scale(1);transform:scale(1)}}@keyframes dice-settle{0%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}60%{-webkit-transform:scale(.95);-moz-transform:scale(.95);-o-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dice-settle{-webkit-animation:dice-settle.35s ease-out forwards;-moz-animation:dice-settle.35s ease-out forwards;-o-animation:dice-settle.35s ease-out forwards;animation:dice-settle.35s ease-out forwards}"})]})}},86112:function(e,t,r){r.d(t,{GX:function(){return n},Hb:function(){return a},KK:function(){return s},LW:function(){return m},bF:function(){return i},i_:function(){return o},nw:function(){return l},v$:function(){return c}});let a=[{id:1,nameKey:"events.form.diceRoll.styleClassicWhite",faceBg:"#FFFFFF",pipColor:"#1F2937",borderColor:"#D1D5DB",shadowInner:"#E5E7EB"},{id:2,nameKey:"events.form.diceRoll.styleCasinoRed",faceBg:"#DC2626",pipColor:"#FFFFFF",borderColor:"#7F1D1D",shadowInner:"#991B1B"},{id:3,nameKey:"events.form.diceRoll.styleLuxuryGold",faceBg:"#FBBF24",pipColor:"#7C2D12",borderColor:"#B45309",shadowInner:"#D97706"},{id:4,nameKey:"events.form.diceRoll.styleNeonBlack",faceBg:"#111827",pipColor:"#22D3EE",borderColor:"#22D3EE",shadowInner:"#1F2937"},{id:5,nameKey:"events.form.diceRoll.styleOceanBlue",faceBg:"#3B82F6",pipColor:"#FFFFFF",borderColor:"#1E3A8A",shadowInner:"#1D4ED8"},{id:6,nameKey:"events.form.diceRoll.styleSakuraPink",faceBg:"#F472B6",pipColor:"#FFFFFF",borderColor:"#9D174D",shadowInner:"#BE185D"}],n=[{id:1,nameKey:"events.form.diceRoll.tableGreenFelt",bgGradient:["#065F46","#047857","#064E3B"],borderColor:"#92400E",feltOverlay:"rgba(255,255,255,0.04)"},{id:2,nameKey:"events.form.diceRoll.tableRoyalBlue",bgGradient:["#1E40AF","#1E3A8A","#172554"],borderColor:"#FBBF24",feltOverlay:"rgba(255,255,255,0.05)"},{id:3,nameKey:"events.form.diceRoll.tableRoyalPurple",bgGradient:["#6B21A8","#581C87","#3B0764"],borderColor:"#FBBF24",feltOverlay:"rgba(255,255,255,0.05)"},{id:4,nameKey:"events.form.diceRoll.tableWarmWood",bgGradient:["#92400E","#78350F","#451A03"],borderColor:"#FCD34D",feltOverlay:"rgba(255,255,255,0.03)"}],o=[{value:"specific",labelKey:"events.form.diceRoll.ruleSpecific",forDiceCount:[1]},{value:"all_same",labelKey:"events.form.diceRoll.ruleAllSame",forDiceCount:[2,3]},{value:"sum_gte",labelKey:"events.form.diceRoll.ruleSumGte",forDiceCount:[2,3]}],l=[1,2,3],s={1:[[1,1]],2:[[0,0],[2,2]],3:[[0,0],[1,1],[2,2]],4:[[0,0],[0,2],[2,0],[2,2]],5:[[0,0],[0,2],[1,1],[2,0],[2,2]],6:[[0,0],[0,2],[1,0],[1,2],[2,0],[2,2]]};function i(e){var t;return null!==(t=a.find(t=>
1t.id===e))&&void 0!==t?t:a[0]}function c(e){var t;return null!==(t=n.find(t=>t.id===e))&&void 0!==t?t:n[0]}function m(e,t,r,a,n){if("specific"===t){if(n)return[r];let e=[1,2,3,4,5,6].filter(e=>e!==r);return[e[Math.floor(Math.random()*e.length)]]}if("all_same"===t){if(n){let t=1+Math.floor(6*Math.random());return Array.from({length:e},()=>t)}let t=1+Math.floor(6*Math.random()),r=Array.from({length:e-1},()=>t),a=1+Math.floor(6*Math.random());for(;a===t;)a=1+Math.floor(6*Math.random());return r.push(a),r}if(n){let t=0;for(;t<50;){let r=Array.from({length:e},()=>1+Math.floor(6*Math.random()));if(r.reduce((e,t)=>e+t,0)>=a)return r;t++}return Array.from({length:e},()=>6)}let o=0;for(;o<50;){let t=Array.from({length:e},()=>1+Math.floor(6*Math.random()));if(t.reduce((e,t)=>e+t,0)<a)return t;o++}return Array.from({length:e},()=>1)}},73890:function(e,t,r){r.d(t,{w:function(){return n}});var a=r(2265);function n(e){let t=(0,a.useRef)(e);t.current=e;let[r,n]=(0,a.useState)(!1),o=(0,a.useRef)(r);return o.current=r,{play:(0,a.useCallback)(e=>{if(o.current)return;let r=t.current[e];if(r)try{r()}catch(e){}},[]),muted:r,toggleMute:(0,a.useCallback)(()=>{n(e=>!e)},[])}}},28354:function(e,t,r){r.d(t,{QQ:function(){return c},Tw:function(){return u},Yf:function(){return b},ZQ:function(){return f},gL:function(){return m},q2:function(){return l},tn:function(){return s},vS:function(){return i},w4:function(){return d}});let a=null;function n(){try{return a||(a=new(window.AudioContext||window.webkitAudioContext)),"suspended"===a.state&&a.resume(),a}catch(e){return null}}function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sine",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.15,o=n();if(!o)return;let l=o.createOscillator(),s=o.createGain();
1l.type=r,l.frequency.setValueAtTime(e,o.currentTime),s.gain.setValueAtTime(a,o.currentTime),s.gain.exponentialRampToValueAtTime(.001,o.currentTime+t),l.connect(s),s.connect(o.destination),l.start(o.currentTime),l.stop(o.currentTime+t)}function l(){o(880,.06,"sine",.12)}function s(){let e=n();if(!e)return;let t=e.createOscillator(),r=e.createGain();t.type="sawtooth",t.frequency.setValueAtTime(600,e.currentTime),t.frequency.exponentialRampToValueAtTime(200,e.currentTime+.2),r.gain.setValueAtTime(.1,e.currentTime),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.25),t.connect(r),r.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.25)}function i(){[523,659,784].forEach((e,t)=>{setTimeout(()=>o(e,.1,"triangle",.1),80*t)})}function c(){[523,659,784,1047].forEach((e,t)=>{setTimeout(()=>o(e,.15,"sine",.12),120*t)})}function m(){o(440,.18,"sine",.08),setTimeout(()=>o(330,.22,"sine",.06),150)}function u(){let e=n();if(!e)return;let t=.03*e.sampleRate,r=e.createBuffer(1,t,e.sampleRate),a=r.getChannelData(0);for(let e=0;e<t;e++)a[e]=(2*Math.random()-1)*.3;let o=e.createBufferSource();o.buffer=r;let l=e.createGain();l.gain.setValueAtTime(.08,e.currentTime),l.gain.exponentialRampToValueAtTime(.001,e.currentTime+.04),o.connect(l),l.connect(e.destination),o.start(e.currentTime)}function f(){let e=n();if(!e)return;let t=e.createOscillator(),r=e.createGain();t.type="sine",t.frequency.setValueAtTime(300,e.currentTime),t.frequency.exponentialRampToValueAtTime(800,e.currentTime+.3),r.gain.setValueAtTime(.12,e.currentTime),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.35),t.connect(r),r.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.35)}function d(){let e=n();if(!e)return;let t=e.createOscillator(),r=e.createGain();t.type="triangle",t.frequency.setValueAtTime(200,e.currentTime),t.frequency.exponentialRampToValueAtTime(600,e.currentTime+.4),r.gain.setValueAtTime(.1,e.currentTime),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.45),t.connect(r),r.connect(e.destination),t.start(e.currentTime),t.stop(e.currentTime+.45)}function b(){o(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.