PageSourceSearch

https://online.stopwatch-timer.net/static/js/741.8dd127f6.chunk.js

js stopwatch-timer.net collected 2026-10-07 09:32:18 UTC 7,938 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[741],{1032:(e,t,n)=>{n.r(t),n.d(t,{default:()=>S});var l=n(2791),s=n(4270),r=n(4349),i=n(1851),c=n(7723),o=n(184);const a=()=>{return e=3,t=()=>null,Array(3).fill().map((()=>Array(e).fill().map(t)));var e,t};function u(e,t,n){return!!(e&&t&&n)&&(e===t&&t===n)}function d(e){const[t,n,l,s,r,i,c,o,a]=e;return u(t,n,l)||u(s,r,i)||u(c,o,a)||u(t,s,c)||u(n,r,o)||u(l,i,a)||u(t,r,a)||u(l,r,c)}const h={O:"X",X:"O"},m=()=>({grid:a(),status:"inProgress",turn:"X",lMega:!1}),p=(e,t)=>{if("success"===e.status&&"RESET"!==t.type)return e;switch(t.type){case"RESET":return m();case"CLICK":{const{x:n,y:l}=t.payload,{grid:s,turn:r,lMega:i}=e;if(s[l][n])return e;const o=(e=>JSON.parse(JSON.stringify(e)))(e);o.grid[l][n]=r;const a=o.grid.reduce(((e,t)=>[...e,...t]),[]);return d(a)?(o.status="success",o):function(e){return!d(e)&&e.filter(Boolean).length===e.length}(a)?m():(o.turn=h[r],i||(setTimeout((()=>(0,c.Z)()),5e3),o.loadMega=!0),o)}default:return e}};function x(){const[e,t]=l.useReducer(p,m()),{grid:n,status:s,turn:r}=e;return(0,o.jsxs)("div",{style:{display:"inline-block",width:"305px"},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,o.jsxs)("div",{children:["Next turn: ",r]}),(0,o.jsx)("div",{children:"success"===s?`${r} won!`:null}),(0,o.jsx)("button",{onClick:()=>{t({type:"RESET"})},type:"button",children:"reset"})]}),(0,o.jsx)(f,{grid:n,handleClick:(e,n)=>{t({type:"CLICK",payload:{x:e,y:n}})}})]})}function f(e){let{grid:t,handleClick:n}=e;return(0,o.jsx)("div",{style:{display:"inline-block"},children:(0,o.jsx)("div",{style:{backgroundColor:"#444",display:"grid",gridTemplateRows:`repeat(${t.length}, 1fr)`,gridTemplateColumns:`repeat(${t[0].length}, 1fr)`,gridGap:2},children:t.map(((e,t)=>e.map(((e,l)=>(0,o.jsx)(g,{onClick:()=>{n(l,t)},value:e},`${l}-${t}`)))))})})}function g(e){let{onClick:t,value:n}=e;return(0,o.jsx)("div",{style:{backgroundColor:"#fff",width:100,height:100},children:(0,o.jsx)("button",{style:{fontSize:"2.5rem",width:"100%",height:"100%"},onClick:t,type:"button",children:n})})}var j=n(9209),y=n(6320);class w extends l.Component{constructor(){super(...arguments),this.state={isFullScreen:!1,fullScreen:{}}}componentDidMount(){document.addEventListener("keydown",this.handleKey.bind(this),!1)}render(){const e=this.props.intl,t={"@context":"https://schema.org","@type":"WebApplication",name:"Online Tic Tac Toe",applicationCategory:"BrowserApplication",browserRequirements:"Requires JavaScript. Requires HTML5.",operatingSystem:"All",aggregateRating:{"@type":"AggregateRating",ratingValue:"4.2",ratingCount:"75847"},offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},url:"https://online.stopwatch-timer.net/tic-tac-toe",keywords:"tic tac toe game,tic-tac-toe game,tic-tac-toe online,tic-tac-toe game online",description:"Online tic-tac-toe game for classrooms! Did you know that tic-tac-toe has existed for over 3,000 years!"};return this.props.custom&&(t.name=this.props.custom.title,t.description=this.props.custom.description),t.name=e.formatMessage({id:"tictactoe.seo.title",defaultMessage:t.name}),t.description=e.formatMessage({id:"tictactoe.seo.description",defaultMessage:t.description}),t.keywords=e.formatMessage({id:"tictactoe.seo.keywords",defaultMessage:t.keywords}),t.url="https://online.stopwatch-timer.net"+this.props.location.pathname,(0,o.jsxs)(l.Fragment,{children:[(0,o.jsxs)(s.Z,{children:[(0,o.jsx)("title",{children:t.name}),(0,o.jsx)("meta",{name:"description",content:t.description}),(0,o.jsx)("meta",{property:"og:description",content:t.description}),(0,o.jsx)("meta",{property:"og:image",content:"https://online.stopwatch-timer.net/tic-tac-toe-game.jpg"}),(0,o.jsx)("meta",{property:"og:image:width",content:"700"}),(0,o.jsx)("meta",{property:"og:image:height",content:"630"}),(0,o.jsx)("meta",{property:"og:title",content:t.name}),(0,o.jsx)("meta",{property:"og:url",content:t.url}),(0,o.jsx)("meta",{name:"twitter:site",content:t.url}),(0,o.jsx)("meta",{name:"twitter:label1",content:t.name}),(0,o.jsx)("meta",{name:"keywords",content:t.keywords}),(0,o.jsx)("link",{rel:"canonical",href:t.url}),(0,o.jsx)("link",{rel:"alternate",hreflang:"en",href:"https://online.stopwatch-timer.net/tic-tac-toe"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"pt",href:"https://online.stopwatch-timer.net/tic-tac-toe/pt"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"es",href:"https://online.stopwatch-timer.net/tic-tac-toe/es"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"fr",href:"https://online.stopwatch-timer.net/tic-tac-toe/fr"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"it",href:"https://online.stopwatch-timer.net/tic-tac-toe/it"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"de",href:"https://online.stopwatch-timer.net/tic-tac-toe/de"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"nl",href:"https://online.stopwatch-timer.net/tic-tac-toe/nl"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"ru",href:"https://online.stopwatch-timer.net/tic-tac-toe/ru"}),(0,o.jsx)("link",{rel:"alternate",hreflang:"x-default",href:"https://online.stopwatch-timer.net/tic-tac-toe"}),(0,o.jsx)("script",{type:"application/ld+json",children:JSON.stringify(t)})]}),(0,o.jsx)("h1",{children:(0,o.jsx)(r.Z,{id:"tictactoe.h1"})}),(0,o.jsx)("p",{className:"lead",children:(0,o.jsx)(r.Z,{id:"tictactoe.desc.1"})}),(0,o.jsxs)("p",{children:[(0,o.jsx)(r.Z,{id:"tictactoe.desc.2"}),(0,o.jsx)(j.Z,{...this.props})]}),(0,o.jsx)(y.Z,{}),(0,o.jsxs)("div",{className:"d-flex flex-column timer-main align-items-center",style:this.state.fullScreen,children:[(0,o.jsx)(x,{}),(0,o.jsx)("div",{className:"text-center w-100 mt-5 pt-5",children:(0,o.jsx)("p",{children:(0,o.jsxs)("button",{className:"btn btn-sm btn-info mr-1 my-2 btn-timer",onClick:()=>this.fullScreen(),children:[(0,o.jsx)(r.Z,{id:"tictactoe.btn.fullScreen"}),(0,o.jsx)("span",{children:(0,o.jsx)(r.Z,{id:"tictactoe.btn.fullScreen.sub"})})]})})})]}),(0,o.jsx)("hr",{className:"mt-2"}),(0,o.jsx)("h2",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.1.h2"})}),(0,o.jsx)("p",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.1.p.1"})}),(0,o.jsx)("p",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.1.p.2"})}),(0,o.jsx)("h2",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.2.h2"})}),(0,o.jsx)("p",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.2.p.1"})}),(0,o.jsx)("h2",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.3.h2"})}),(0,o.jsx)("p",{children:(0,o.jsx)(r.Z,{id:"tictactoe.article.3.p.1"})})]})}handleKey(e){e.preventDefault(),13===e.keyCode&&this.fullScreen()}browserFullScreen(){let e=document.fullscreenElement&&null!==document.fullscreenElement||document.webkitFullscreenElement&&null!==document.webkitFullscreenElement||document.mozFullScreenElement&&null!==document.mozFullScreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement,t=document.documentElement;if(!e&&this.state.isFullScreen)return!1;e?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),document.body.classList.remove("all-no-ad")):(t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),document.body.classList.add("all-no-ad"),window.scrollTo(0,0))}fullScreen(){this.state.isFullScreen?(this.browserFullScreen(),this.setState({isFullScreen:!1,fullScreen:{}})):(this.browserFullScreen(),this.setState({isFullScreen:!0,fullScreen:{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",zIndex:"10000",alignContent:"center",justifyContent:"center",flexDirection:"column",textAlign:"center",backgroundColor:"black",color:"#fff"}}))}}const S=(0,i.ZP)(w)}}]);
2//# sourceMappingURL=741.8dd127f6.chunk.js.map

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.