PageSourceSearch

https://knucklebet.com.au/assets/StakeInput-CLyW-JOo.js

js knucklebet.com.au collected 2026-10-07 09:26:28 UTC 14,244 bytes, 13 lines download raw bytes

1import{O as F,d4 as fe,bu as P,a9 as M,w as d,e2 as B,e3 as pe,ab as ee,e4 as me,e5 as xe,d0 as X,e6 as be,e7 as ge,e8 as U,j as e,a8 as he,e9 as ye,I as w,N as Z,aV as W,cR as ve,a7 as H,a0 as G,ea as q,bv as te,cS as L}from"./client-Bai4VJA1.js";import{u as se,I as D,B as je,f as ne,g as re,h as oe,G as V,F as ae,j as ie,t as ke}from"./FeaturedSgmWidgetHeader-Bs5pMGp9.js";import{t as we}from"./useBreakpoint-BnoNun7E.js";import{u as Se}from"./usePreferences-BynNnNRX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"97808a5afbf047a0a6f7534b79e8c9b165448d38"};var n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6819f39a-a33f-448c-9da8-27c4ee757f0a",t._sentryDebugIdIdentifier="sentry-dbid-6819f39a-a33f-448c-9da8-27c4ee757f0a")}catch{}})();function Fe(){return F(t=>fe(t)?.recoveryId)}function _e(){const t=P(),{capture:n}=M(),i=F(a=>a.auth?.token),s=F(a=>a.betslipRecovery.lastEnded),r=F(a=>a.betslipRecovery.recoveryId),o=F(a=>a.betslip.bets.length);d.useEffect(()=>{i||!r||t(B({reason:"signed_out",betCount:o}))},[i,r,o,t]),d.useEffect(()=>{s&&(t(pe()),n(ee.BetslipRecoveryEnded,{recovery_id:s.recoveryId,reason:s.reason,bet_count:s.betCount??0,...s.detectedAt?{elapsed_ms:Date.now()-s.detectedAt}:{}}))},[s,t,n])}function Oe(){const t=P(),n=F(u=>u.betslipRecovery),i=F(me),s=F(u=>u.betslip.bets.length),{recoveryId:r,snapshotId:o,expiresAt:a,variant:l}=n;return d.useEffect(()=>{!r||!o||i!==o&&t(B({reason:s?"betslip_mutated":"betslip_cleared",betCount:s}))},[r,o,i,s,t]),d.useEffect(()=>{if(!r||!a)return;const u=()=>{t(B({reason:"window_expired",betCount:s}))},c=a-Date.now();if(c<=0){u();return}const g=setTimeout(u,c);return()=>clearTimeout(g)},[r,a,s,t]),d.useEffect(()=>{if(l)return xe(X.BetslipQuickDeposit.key,l),()=>be(X.BetslipQuickDeposit.key)},[l]),{recovery:n,variant:l,sheetOpen:!!n.sheetOpen,sheetOpenSeq:n.sheetOpenSeq??0,closeSheet:()=>t(ge(!1))}}const ce=({locale:t,onValueChange:n})=>{const i=d.useCallback(o=>{if(!o)return o;const{decimalSeparator:a}=U(t);return a===","?o.replace(/\./g,","):o},[t]),s=d.useCallback(o=>{if(!o||o===""){n?.("");return}const{decimalSeparator:a}=U(t);if(a===","){const l=o.replace(/,/g,".");n?.(l)}else n?.(o)},[t,n]),r=d.useCallback(o=>{if(!o||o===""||Array.isArray(o))return;const a=String(o),{decimalSeparator:l}=U(t);return l===","?a.replace(/\./g,","):a},[t]);return{transformRawValue:i,handleValueChange:s,formatValueForDisplay:r}},$e=({betTypes:t,placesToPay:n,eachwayReduction:i=0,variant:s="racing"})=>{const{t:r}=se();if(!n)return null;const o=we(n.description,r);return e.jsxs("div",{className:"bg-ui-orange-light mb-3 flex flex-row gap-2 rounded-lg px-3 py-2",children:[e.jsx("div",{children:e.jsx(D,{name:"info",size:"sm",className:"text-ui-orange-normal"})}),e.jsxs("span",{className:"text-xs font-semibold",children:[he(i)&&e.jsxs(e.Fragment,{children:[r("eachwayPriceReductionOfTheWinOdds",{ns:s,reduction:i})," "]}),ye(t.map(a=>({bet_type:a})),n)?r("placesToPay",{ns:"racing",places:n.places_to_pay,description:o?`(${o})`:""}):r("noPlaceDividends",{ns:"racing"})]})]})};var le=(t=>(t.HostUser="host.state.user",t.HostToggleBetslip="host.event.toggleBetslip",t.HostRemoveBet="host.event.removeBet",t.HostSetRacingBetslip="host.event.setRacingBetslip",t.HostSetOddsFormat="host.event.setOddsFormat",t.HostSetLanguage="host.event.setLanguage",t.HostSetCurrency="host.event.setCurrency",t.HostSetViewportInsets="host.event.setViewportInsets",t.EmbedLogin="bm.event.login",t.EmbedBetslip="bm.state.betslip",t.EmbedDimensions="bm.event.dimensions",t.EmbedBetslipPlaced="bm.event.betslipPlaced",t))(le||{});const v=({children:t,disabled:n=!1,className:i,theme:s,...r})=>e.jsx(je,{className:w("active:bg-bg-button-numpad-pressed flex flex-1 flex-row justify-center text-nowrap rounded-lg py-3 ",{"!bg-bg-button-numpad-default !text-base !text-white":!s,"!bg-bg-numpad-main !text-white":s==="none"},i),theme:s,disabled:n,...r,children:t});function de({LinkComponent:t,genRoutes:n,onDismiss:i,onInsufficientBalance:s}){const{t:r}=se(),{loggedIn:o}=Z(),a=Se(),{quickbet:l}=a,{placeBets:u,stakedBets:c,stats:g,placeBetsDisabled:h,isPlacingBets:m}=W(),b=P(),{embedUser:p}=Z(),{capture:x}=M(),f=Fe(),N=d.useCallback(()=>
1{if(m())return;const k=p?.loggedIn?"EmbedUser":"Web";x(ee.PlaceBetsClicked,{bet_count:c.length,total_stake:g.totalStake,singles_mode:!!a.singlesMode,quickbet:!!a.quickbet,source:k,...f&&{recovery_id:f}}),u(k,s)},[x,p,m,s,u,a.quickbet,a.singlesMode,f,c.length,g.totalStake]);if(!o){const k=e.jsx(v,{theme:"brand",onClick:()=>{window.dispatchEvent(new CustomEvent(le.EmbedLogin)),i?.()},children:r("logIn",{ns:"account"})});return e.jsx(t,{className:"flex",...n.login({}),children:k})}return l?e.jsx(v,{theme:"brand",disabled:h,onClick:N,children:r("quickbet",{ns:"betslip"})}):e.jsx(v,{theme:"success",disabled:h,onClick:()=>{b(ve(H.Review))},children:r(`placeBet${c.length>1?"s":""}`,{ns:"betslip"})})}function Ce({children:t,betId:n,onDismiss:i,value:s,onValueChange:r,LinkComponent:o,genRoutes:a}){const l=P(),{decimalSeparator:u}=G();d.useEffect(()=>(l(q(n)),()=>{l(q(void 0))}),[l,n]);const c=s||"",g=[[1,2,3,10],[4,5,6,20],[7,8,9,50]],h=100;return e.jsxs(e.Fragment,{children:[t,e.jsx("div",{className:"text-text-white flex flex-row justify-end px-3 py-4 text-sm font-semibold",children:e.jsx("button",{onClick:i,children:"Done"})}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 px-3 pb-8 font-semibold",children:[g.map((m,b)=>e.jsx(d.Fragment,{children:m.map((p,x)=>{const f=x===3;return e.jsx(v,{onClick:()=>r?.(f?(+c+ +p).toString():`${c}${p}`),children:f?`+${p}%`:p},`${b}${x}`)})},b)),e.jsx(v,{theme:"none",onClick:()=>{c.toString().includes(".")||r?.(`${c}.`)},children:u}),e.jsx(v,{onClick:()=>r?.(`${c}0`),children:"0"}),e.jsx(v,{theme:"none",onClick:()=>r?.(`${c.toString().slice(0,c.toString().length-1)}`),children:e.jsx(D,{name:"delete",size:"raw"})}),t?e.jsxs(v,{onClick:()=>r?.((+c+h).toString()),children:["+",h,"%"]}):e.jsx(de,{onDismiss:i,LinkComponent:o,genRoutes:a})]})]})}function Pe({betId:t="",disabled:n=!1,isBonus:i,value:s,onValueChange:r,children:o,inBetBuilder:a,inKeypad:l,blurOnDismiss:u=!1,LinkComponent:c,genRoutes:g,...h}){const m=d.useRef(null),{locale:b}=te(),{stage:p}=W(),[x,f]=d.useState(!1),[N,k]=d.useState(!1),C=d.useRef(!1);function S(y){const $=typeof y=="function"?y(C.current):y;C.current=$,f($)}const{transformRawValue:Q,handleValueChange:E,formatValueForDisplay:_}=ce({locale:b,onValueChange:r??(()=>{})}),{refs:O,context:I}=ne({open:x,onOpenChange:S,placement:"bottom-end"}),A=re(I),{getFloatingProps:z}=oe([A]),R=()=>k(!0),T=y=>{C.current?(y.preventDefault(),m.current?.focus({preventScroll:!0})):L(10).then(()=>{k(!1)})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:w("betslip-input group relative flex h-8 w-full flex-row overflow-hidden rounded-lg -outline-offset-1 focus-within:outline",{"bg-bg-inputfield-default border-border-primary border":!a,"bg-bg-betbuilder-inputfield":a,"outline-bg-reward-bonus":i,"outline-border-input-active":!i,"border-border-input-active border":l==="flexi","opacity-50":n}),children:[e.jsx("div",{className:"hidden flex-1 sm:block",children:e.jsx(V,{className:w("placeholder:text-text-secondary h-full w-full appearance-none border-none bg-transparent px-2 text-sm focus:ring-0",{"placeholder:!text-text-tertiary text-white":o}),placeholder:"0%",disabled:n,ref:m,intlConfig:{locale:b},suffix:"%",value:s===0?void 0:_(s),onValueChange:E,onBlur:T,onFocus:R,...h})}),e.jsx("div",{className:"block flex-1 sm:hidden",children:e.jsx(V,{className:w("placeholder:text-text-secondary h-full w-full appearance-none border-none bg-transparent px-2 text-base focus:ring-0",{"placeholder:!text-text-tertiary text-white":o}),placeholder:"0%",disabled:n,ref:m,intlConfig:{locale:b},suffix:"%",value:s===0?void 0:_(s),readOnly:!0,onValueChange:E,onClick:()=>S(y=>!y),onBlur:T,onFocus:R,transformRawValue:Q,...h})}),!!s&&!n&&(N||l==="flexi")&&e.jsx("button",{onClick:()=>{r?.(""),L(10).then(()=>{m.current&&(m.current.value="",m.current.defaultValue="")})},className:"absolute right-2 top-1/2 translate-y-[-50%]",tabIndex:-1,children:e.jsx(D,{name:"clear",size:"sm",className:w({"text-bg-reward-bonus":i,"text-border-input-active":(N||l==="flexi")&&!i})})})]}),p===H.Default&&x&&e.jsx(ae,{id:"bm-root-modal",children:e.jsx(ie,{c
1ontext:I,initialFocus:-1,modal:!1,returnFocus:!u,children:e.jsx("div",{ref:O.setFloating,autoFocus:!1,className:"bg-bg-numpad-main fixed bottom-0 left-0 right-0 z-[51] hidden max-sm:block lg:absolute lg:z-50",...z,children:e.jsx(Ce,{LinkComponent:c,genRoutes:g,betId:t,onDismiss:()=>{S(!1),u&&m.current?.blur()},value:s,onValueChange:y=>{(y?.split(".")[1]?.length??0)<=2&&r?.(y)},children:o})})})})]})}function Ie({children:t,betId:n,onDismiss:i,value:s,onValueChange:r,LinkComponent:o,genRoutes:a}){const l=P(),{decimalSeparator:u}=G();d.useEffect(()=>(l(q(n)),()=>{l(q(void 0))}),[l,n]);const c=s||"",g=[[1,2,3,5],[4,5,6,10],[7,8,9,20]],h=50;return e.jsxs(e.Fragment,{children:[t,e.jsx("div",{className:"text-text-white flex flex-row justify-end px-3 py-4 text-sm font-semibold",children:e.jsx("button",{onClick:i,children:"Done"})}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 px-3 pb-8 font-semibold",children:[g.map((m,b)=>e.jsx(d.Fragment,{children:m.map((p,x)=>{const f=x===3;return e.jsx(v,{onClick:()=>r?.(f?(+c+ +p).toString():`${c}${p}`),children:f?`+${p}`:p},`${b}${x}`)})},b)),e.jsx(v,{theme:"none",onClick:()=>{c.toString().includes(".")||r?.(`${c}.`)},children:u}),e.jsx(v,{onClick:()=>r?.(`${c}0`),children:"0"}),e.jsx(v,{theme:"none",onClick:()=>r?.(`${c.toString().slice(0,c.toString().length-1)}`),children:e.jsx(D,{name:"delete",size:"raw"})}),t?e.jsxs(v,{onClick:()=>r?.((+c+h).toString()),children:["+",h]}):e.jsx(de,{onDismiss:i,LinkComponent:o,genRoutes:a})]})]})}function Ae({betId:t="",isBonus:n,disabled:i=!1,value:s,onValueChange:r,children:o,className:a,inBetBuilder:l,inKeypad:u,autoFocus:c,blurOnDismiss:g=!1,LinkComponent:h,genRoutes:m,...b}){const{currency:p,currencySymbol:x}=G(),f=d.useRef(null),N=x(),{locale:k}=te(),{stage:C}=W(),[S,Q]=d.useState(!1),[E,_]=d.useState(!1),O=d.useRef(!1);function I(j){const K=typeof j=="function"?j(O.current):j;O.current=K,Q(K)}const{transformRawValue:A,handleValueChange:z,formatValueForDisplay:R}=ce({locale:k,onValueChange:r??(()=>{})});d.useEffect(()=>{if(c&&!i&&C===H.Default){const j=setTimeout(()=>{f.current?.focus(),window.matchMedia("(max-width: 640px)").matches&&I(!0)},100);return()=>clearTimeout(j)}},[c,i,C]);const{refs:T,context:y}=ne({open:S,onOpenChange:I,placement:"bottom-end"}),$=re(y),{getFloatingProps:ue}=oe([$]),J=()=>_(!0),Y=j=>{O.current?(j.preventDefault(),f.current?.focus({preventScroll:!0})):L(10).then(()=>{_(!1)})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:ke(w("betslip-input group relative flex h-8 w-full flex-row overflow-hidden rounded-lg -outline-offset-1 focus-within:outline",{"bg-bg-inputfield-default border-border-primary border":!l,"bg-bg-betbuilder-inputfield":l,"outline-bg-reward-bonus":n,"outline-border-input-active":!n,"border-border-input-active border":u==="stake","opacity-50":i},a)),children:[e.jsx("div",{className:w("border-border-primary pointer-events-none flex h-full items-center justify-center border-r pl-3 pr-3 text-sm font-bold",{"border-bg-betbuilder-main text-text-tertiary -mr-3 border-none":l,"bg-bg-reward-bonus border-bg-reward-bonus":n,"text-white":l&&!!s}),children:n?e.jsx(D,{name:"badge-bonus-active",size:"sm"}):N}),e.jsx("div",{className:"hidden flex-1 sm:block",children:e.jsx(V,{className:w("placeholder:text-text-secondary h-full w-full appearance-none border-none bg-transparent px-2 text-sm focus:ring-0 caret-border-input-active",{"placeholder:text-text-tertiary! text-white":o}),placeholder:p("0",{minimumFractionDigits:2}).slice(x().length).trim(),disabled:i,ref:f,intlConfig:{locale:k},value:s===0?void 0:R(s),onValueChange:z,onBlur:Y,onFocus:J,transformRawValue:A,...b})}),e.jsxs("div",{className:"relative block flex-1 sm:hidden",children:[e.jsx(V,{className:w("placeholder:text-text-secondary h-full w-full appearance-none border-none bg-transparent px-2 text-base focus:ring-0",{"placeholder:text-text-tertiary! text-white ":o,"text-transparent caret-transparent":S}),placeholder:p("0",{minimumFractionDigits:2}).slice(x().length).trim(),disabled:i,ref:f,intlConfig:{locale:k},value:s===0?void 0:R(s),readOnly:!0,onValueChange:z,onClick:()=>I(j=>!j),onBlur:Y,onFocus:J,transformRawValue:A,...b}),S&&e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
2                  @keyframes fake-caret-blink {
3                    0%, 49% { opacity: 1; }
4                    50%, 100% { opacity: 0; }
5                  }
6
7                  .fake-caret::after {
8                    content: "|";
9                    margin-left: 1px;
10                    color: var(--border-input-active);
11                    animation: fake-caret-blink 1s step-end infinite;
12                  }
13                `}),e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center overflow-hidden px-2 text-base","aria-hidden":!0,
13children:e.jsx("span",{className:w("fake-caret truncate",o&&"text-white",!o&&"text-inherit"),children:s===0?"":R(s)})})]})]}),!!s&&!i&&(E||u==="stake"||S)&&e.jsx("button",{onClick:()=>{r?.(""),L(10).then(()=>{f.current&&(f.current.value="",f.current.defaultValue="")})},className:"absolute right-2 top-1/2 translate-y-[-50%]",tabIndex:-1,children:e.jsx(D,{name:"clear",size:"sm",className:w({"text-bg-reward-bonus":n,"text-border-input-active":(E||u==="stake")&&!n})})})]}),C===H.Default&&S&&e.jsx(ae,{id:"bm-root-modal",children:e.jsx(ie,{context:y,initialFocus:-1,modal:!1,returnFocus:!g,children:e.jsx("div",{ref:T.setFloating,autoFocus:!1,className:"bg-bg-numpad-main fixed bottom-0 left-0 right-0 z-[51] hidden max-sm:block lg:absolute lg:z-50",...ue,children:e.jsx(Ie,{LinkComponent:h,genRoutes:m,betId:t,onDismiss:()=>{I(!1),g&&f.current?.blur()},value:s,onValueChange:j=>{(j?.split(".")[1]?.length??0)<=2&&r?.(j)},children:o})})})})]})}export{Pe as F,$e as P,Ae as S,_e as a,Oe as b,Fe as u};

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.