PageSourceSearch

https://balliq.app/assets/DailyDone-CbVEx-uh.js

js balliq.app collected 2026-09-24 14:07:52 UTC 7,918 bytes, 6 lines download raw bytes

1import{j as e}from"./client-6IbISpu-.js";import{r as i,R as O}from"./react-PZFeUDsy.js";import{f as B,a as H,e as U,M as A}from"./StoreBadge-TDy-gnyG.js";import{c as X,r as Y,f as q,s as G,F as J,C as z,b as N,B as K,U as Q,R as V,a as Z}from"./webpushVisitor-DayvjJS_.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new a.Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="5c65eda7-b8a3-491a-af34-793441485efc",a._sentryDebugIdIdentifier="sentry-dbid-5c65eda7-b8a3-491a-af34-793441485efc")}catch{}})();/**
2 * @license lucide-react v0.383.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 ee=X("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]),se={footle:e.jsx("span",{className:"fh-tile fh-tile-green",style:{"--fh-tile":"22px",borderRadius:6},"aria-hidden":"true",children:"F"}),daily7:e.jsx(Z,{size:18,strokeWidth:2.2}),trail:e.jsx(V,{size:18,strokeWidth:2.2}),mystery:e.jsx(Q,{size:18,strokeWidth:2.2})},R=new Set;function te({game:a,edition:o,won:t,bucket:c,isArchive:y=!1,streak:u,onShare:C,waText:v,remind:h,nextUp:w=[],save:l,stump:j,GetAppCTA:S=null,track:r}){const[$,M]=i.useState(()=>new Date),[f,E]=i.useState(null),[b,p]=i.useState(!1),[I,F]=i.useState(!1);i.useEffect(()=>{const s=setInterval(()=>M(new Date),3e4);return()=>clearInterval(s)},[]),i.useEffect(()=>{if(!r||!a)return;const s=`${a}:${o??"?"}`;R.has(s)||(R.add(s),r("dd-shown",{game:a,remind:h?.state||"none",save:l&&l.onSave&&((u?.count||0)>=2||l.line)?1:0,stump:j?1:0}))},[a,o,h?.state,y,r,l,j,u?.count]),i.useEffect(()=>{let s=!0;return(async()=>{y||await Y({game:a,edition:o,bucket:c,won:t});const x=await q({game:a,edition:o});s&&E(x)})(),()=>{s=!1}},[a,o,c,t,y]);const n=i.useMemo(()=>G(f,{game:a,mine:c,won:t}),[f,a,c,t]),D=B(H($)),m=u?.count||0,W=i.useMemo(()=>{if(!n)return[];const s=f.buckets,x=a==="daily7"?[0,1,2,3,4,5,6,7]:a==="footle"?[1,2,3,4,5,6,0]:(()=>{const d=Object.keys(s).map(Number).filter(k=>k>0),L=Math.max(4,...d,t?c:0);return[...Array.from({length:Math.min(L,10)},(k,P)=>P+1),0]})(),g=Math.max(1,...x.map(d=>s[d]||0));return x.map(d=>({k:d,label:d===0&&a!=="daily7"?"X":String(d),c:s[d]||0,pct:Math.round((s[d]||0)/g*100),mine:a==="daily7"||t?d===c:d===0}))},[n,f,a,c,t]),_=async()=>{if(!b){p(!0),r?.("dd-share",{game:a});try{await C?.(),F(!0),setTimeout(()=>F(!1),2200)}finally{p(!1)}}},T=async()=>{if(!(b||!h?.onRemind)){p(!0),r?.("dd-remind",{game:a});try{await h.onRemind()}finally{p(!1)}}};return e.jsxs("section",{className:"dd","aria-label":"After today's puzzle",children:[e.jsxs("div",{className:"dd-row",style:{"--dd-rgb":"255,170,0","--dd-c":"var(--gold)"},children:[e.jsx("span",{className:"dd-well","aria-hidden":"true",children:e.jsx(J,{size:20,strokeWidth:2.2})}),e.jsxs("div",{className:"dd-body",children:[e.jsx("div",{className:"dd-title",children:m>=2?e.jsxs(e.Fragment,{children:[m,"-day ",u?.label||"streak"]}):m===1?e.jsxs(e.Fragment,{children:["Day 1 of a ",u?.label||"streak"]}):e.jsxs(e.Fragment,{children:["Start a ",u?.label||"streak"]})}),e.jsx("div",{className:"dd-sub",children:y?e.jsx(e.Fragment,{children:"An old puzzle — it doesn’t count toward tomorrow."}):m>=1?e.jsxs(e.Fragment,{children:["Tomorrow makes it ",e.jsx("strong",{className:"dd-num",children:m+1})," · new puzzles in ",e.jsx("strong",{className:"dd-num",children:D})]}):e.jsxs(e.Fragment,{children:["New puzzles in ",e.jsx("strong",{className:"dd-num",children:D})]})})]}),h&&h.state==="on"&&e.jsxs("span",{className:"dd-pill is-set","aria-label":`Reminder set for ${N()}`,children:[e.jsx(z,{size:14,strokeWidth:2.6,"aria-hidden":"true"})," ",N()]})]}),h&&h.state==="off"&&!y&&e.jsxs("div",{className:"dd-row",style:{"--dd-rgb":"88,204,2","--dd-c":"var(--accent)"},children:[e.jsx("span",{className:"dd-well","aria-hidden":"true",children:e.jsx(K,{size:20,strokeWidth:2.2})}),e.jsxs("div",{className:"dd-body",children:[e.jsxs("div",{className:"dd-title",children:["Remind me tomorrow at ",N()]}),e.jsx("div",{className:"dd-sub",children:"One nudge at your hour, only if you haven’t played · off any time"})]}),e.jsx("button",{type:"button",className:"dd-pill dd-pill-on",disabled:b,onClick:T,"aria-label":`Turn on a daily reminder at ${N()}`,children:"Turn on"})]}),w.filter(s=>s.key!==a).length>0&&e.jsxs("div",{className:"dd-next","aria-label":"Still open today",children:[e.jsx("div",{className:"dd-title",children:"Still open today"}),w.filter(s=>s.key!==a).map(s=>{const x=s.href?"a":"button",g=U[s.key==="daily"?"daily7":s.key]||"88,204,2",d=A[s.key==="daily"?"daily7":s.key]||"var(--accent)";return e.jsxs(x,{className:"dd-next-row is-mode",style:{"--dd-rgb":g,"--dd-c":d},href:s.href,onClick:()=>{r?.("dd-next",{game:a,to:s.key}),s.onTap?.()},...s.href?{}:{type:"button"},children:[e.jsx("span",{className:"dd-well","aria-hidden":"true",children:s.icon||se[s.key]||null}),e.jsx("span",{className:"dd-title",children:s.name}),e.jsx("span",{className:"dd-next-go",children:"Play"})]},s.key)})]}),e.jsx("button",{type:"button",className:"dd-share",onClick:_,disabled:b,"aria-label":"Share your result",children:I?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:18,strokeWidth:2.6,"aria-hidden":"true"})," Shared"]}):e.jsxs(e.Fragment,{children:[e.jsx(ee,{size:18,strokeWidth:2.4,"aria-hidden":"true"})," Share result"]})}),(v||j)&&e.jsxs("div",{className:"dd-share-alts",children:[v&&e.jsx("a",{className:"dd-share-alt",href:`https://wa.me/?text=${encodeURIComponent(v)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>r?.("dd-share-wa",{game:a}),children:"Send on WhatsApp"}),j&&e.jsx("button",{type:"button",className:"dd-share-alt",onClick:()=>{r?.("dd-stump",{game:a}),j()},children:"Stump a mate"})]}),n&&e.jsxs("div",{className:"dd-dist","aria-label":`How everyone did, ${n.n} results`,children:[e.jsxs("div",{className:"dd-dist-head",children:[e.jsx("div",{className:"dd-title",children:"How everyone did"}),e.jsxs("div",{className:"dd-dist-cap dd-num",children:[n.n.toLocaleStr
6ing()," played"]})]}),e.jsx("div",{className:"dd-bars",children:W.map(s=>e.jsxs(O.Fragment,{children:[e.jsx("span",{className:`dd-bar-k${s.mine?" is-mine":""}`,children:s.label}),e.jsx("span",{className:`dd-bar${s.mine?" is-mine":""}`,role:"img","aria-label":`${s.label}: ${s.c}`,children:e.jsx("i",{style:{width:`${s.pct}%`}})}),e.jsx("span",{className:`dd-bar-v${s.mine?" is-mine":""}`,children:s.c})]},s.k))}),e.jsx("div",{className:"dd-sub",children:a==="daily7"?e.jsxs(e.Fragment,{children:["Average ",e.jsxs("strong",{className:"dd-num",children:[n.avg.toFixed(1),"/7"]}),n.beatPct>0?e.jsxs(e.Fragment,{children:[" · you beat ",e.jsxs("strong",{className:"dd-num",children:[n.beatPct,"%"]})]}):null]}):e.jsxs(e.Fragment,{children:[e.jsxs("strong",{className:"dd-num",children:[n.solvedPct,"%"]})," solved",t&&n.beatPct>0?e.jsxs(e.Fragment,{children:[" · you beat ",e.jsxs("strong",{className:"dd-num",children:[n.beatPct,"%"]})]}):null]})})]}),l&&l.onSave&&(m>=2||l.line)&&e.jsxs("div",{className:"dd-row",children:[e.jsx("div",{className:"dd-body",children:m>=2?e.jsxs("div",{className:"dd-sub",children:["Your ",e.jsxs("strong",{className:"dd-num",children:[m,"-day"]})," streak",l.line?e.jsxs(e.Fragment,{children:[" and ",e.jsx("strong",{className:"dd-num",children:l.line})]}):null," live",l.line?"":"s"," on this phone only."]}):e.jsxs("div",{className:"dd-sub",children:[e.jsx("strong",{className:"dd-num",children:l.line})," — on this phone only."]})}),e.jsx("button",{type:"button",className:"dd-pill",onClick:()=>{r?.("dd-save",{game:a}),l.onSave()},children:"Save"})]}),S&&e.jsx("div",{className:"dd-getapp",children:e.jsx(S,{})})]})}export{te as D};

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.