├── .github
└── workflows
│ ├── codeql.yml
│ └── sonarqube.yml
├── .gitignore
├── Hello.js
├── README.md
├── build
├── asset-manifest.json
├── index.html
└── static
│ ├── css
│ ├── main.c4bcdd99.css
│ └── main.c4bcdd99.css.map
│ └── js
│ ├── main.8e9dde19.js
│ ├── main.8e9dde19.js.LICENSE.txt
│ └── main.8e9dde19.js.map
├── package-lock.json
├── package.json
├── public
└── index.html
└── src
├── index.js
└── style.css
/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ "main" ]
17 | pull_request:
18 | branches: [ "main" ]
19 | schedule:
20 | - cron: '17 3 * * 6'
21 |
22 | jobs:
23 | analyze:
24 | name: Analyze
25 | # Runner size impacts CodeQL analysis time. To learn more, please see:
26 | # - https://gh.io/recommended-hardware-resources-for-running-codeql
27 | # - https://gh.io/supported-runners-and-hardware-resources
28 | # - https://gh.io/using-larger-runners
29 | # Consider using larger runners for possible analysis time improvements.
30 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32 | permissions:
33 | # required for all workflows
34 | security-events: write
35 |
36 | # only required for workflows in private repositories
37 | actions: read
38 | contents: read
39 |
40 | strategy:
41 | fail-fast: false
42 | matrix:
43 | language: [ 'javascript-typescript' ]
44 | # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
45 | # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
46 | # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
47 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
48 |
49 | steps:
50 | - name: Checkout repository
51 | uses: actions/checkout@v4
52 |
53 | # Initializes the CodeQL tools for scanning.
54 | - name: Initialize CodeQL
55 | uses: github/codeql-action/init@v3
56 | with:
57 | languages: ${{ matrix.language }}
58 | # If you wish to specify custom queries, you can do so here or in a config file.
59 | # By default, queries listed here will override any specified in a config file.
60 | # Prefix the list here with "+" to use these queries and those in the config file.
61 |
62 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63 | # queries: security-extended,security-and-quality
64 |
65 |
66 | # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
67 | # If this step fails, then you should remove it and run the build manually (see below)
68 | - name: Autobuild
69 | uses: github/codeql-action/autobuild@v3
70 |
71 | # ℹ️ Command-line programs to run using the OS shell.
72 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
73 |
74 | # If the Autobuild fails above, remove it and uncomment the following three lines.
75 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
76 |
77 | # - run: |
78 | # echo "Run, Build Application using script"
79 | # ./location_of_script_within_repo/buildscript.sh
80 |
81 | - name: Perform CodeQL Analysis
82 | uses: github/codeql-action/analyze@v3
83 | with:
84 | category: "/language:${{matrix.language}}"
85 |
--------------------------------------------------------------------------------
/.github/workflows/sonarqube.yml:
--------------------------------------------------------------------------------
1 | # This workflow uses actions that are not certified by GitHub.
2 | # They are provided by a third-party and are governed by
3 | # separate terms of service, privacy policy, and support
4 | # documentation.
5 |
6 | # This workflow helps you trigger a SonarQube analysis of your code and populates
7 | # GitHub Code Scanning alerts with the vulnerabilities found.
8 | # (this feature is available starting from SonarQube 9.7, Developer Edition and above)
9 |
10 | # 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub)
11 |
12 | # 2. Import your project on SonarQube
13 | # * Add your repository as a new project by clicking "Create project" from your homepage.
14 | #
15 | # 3. Select GitHub Actions as your CI and follow the tutorial
16 | # * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN
17 | # (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator)
18 | #
19 | # * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL
20 | #
21 | # * c. Copy/paste the project Key into the args parameter below
22 | # (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage)
23 |
24 | # Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/)
25 | # or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10)
26 |
27 | name: SonarQube analysis
28 |
29 | on:
30 | push:
31 | branches: [ "main" ]
32 | pull_request:
33 | branches: [ "main" ]
34 | workflow_dispatch:
35 |
36 | permissions:
37 | pull-requests: read # allows SonarQube to decorate PRs with analysis results
38 |
39 | jobs:
40 | Analysis:
41 | runs-on: ubuntu-latest
42 |
43 | steps:
44 | - name: Analyze with SonarQube
45 |
46 | # You can pin the exact commit or the version.
47 | # uses: SonarSource/sonarqube-scan-action@v1.1.0
48 | uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8
49 | env:
50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
51 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
52 | SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret)
53 | with:
54 | # Additional arguments for the sonarcloud scanner
55 | args:
56 | # Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu)
57 | # mandatory
58 | -Dsonar.projectKey=
59 | # Comma-separated paths to directories containing main source files.
60 | #-Dsonar.sources= # optional, default is project base directory
61 | # When you need the analysis to take place in a directory other than the one from which it was launched
62 | #-Dsonar.projectBaseDir= # optional, default is .
63 | # Comma-separated paths to directories containing test source files.
64 | #-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
65 | # Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
66 | #-Dsonar.verbose= # optional, default is false
67 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/Hello.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default ({ name }) =>
Hello {name}! ;
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React-Countdown-Timer
2 |
3 | Timer implementation with hooks
4 |
5 | https://github.com/Akki90skid/React-Hooks/assets/25727015/832764bc-15d4-4ed0-94d4-c7dec8d7cb5c
6 |
7 | Usage link-
8 | https://aaqibhafeezkhan.github.io/Timer-Countdown-using-React-Hooks/
9 |
--------------------------------------------------------------------------------
/build/asset-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "main.css": "/Timer-Countdown-using-React-Hooks/static/css/main.c4bcdd99.css",
4 | "main.js": "/Timer-Countdown-using-React-Hooks/static/js/main.8e9dde19.js",
5 | "index.html": "/Timer-Countdown-using-React-Hooks/index.html",
6 | "main.c4bcdd99.css.map": "/Timer-Countdown-using-React-Hooks/static/css/main.c4bcdd99.css.map",
7 | "main.8e9dde19.js.map": "/Timer-Countdown-using-React-Hooks/static/js/main.8e9dde19.js.map"
8 | },
9 | "entrypoints": [
10 | "static/css/main.c4bcdd99.css",
11 | "static/js/main.8e9dde19.js"
12 | ]
13 | }
--------------------------------------------------------------------------------
/build/index.html:
--------------------------------------------------------------------------------
1 | React App
--------------------------------------------------------------------------------
/build/static/css/main.c4bcdd99.css:
--------------------------------------------------------------------------------
1 | body{align-items:center;background-color:#ecf0f1;display:flex;font-family:Lato,sans-serif;height:100vh;justify-content:center;margin:0}.timer-container{text-align:center}.clock{animation:pulse 1.5s infinite alternate;color:#3498db;display:inline-block;font-size:3em}.timer{color:#e74c3c;font-size:1.5em;font-weight:700;margin-top:10px}button{background-color:#2ecc71;border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font-size:1em;margin-top:20px;padding:15px 30px;text-decoration:none;transition:background-color .3s ease-in-out}button:hover{background-color:#27ae60}@keyframes pulse{to{color:#2980b9;transform:scale(1.1)}}
2 | /*# sourceMappingURL=main.c4bcdd99.css.map*/
--------------------------------------------------------------------------------
/build/static/css/main.c4bcdd99.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"static/css/main.c4bcdd99.css","mappings":"AAAA,KAII,kBAAmB,CAFnB,wBAAyB,CACzB,YAAa,CAFb,2BAA+B,CAK/B,YAAa,CADb,sBAAuB,CAEvB,QACF,CAEA,iBACE,iBACF,CAEA,OAIE,uCAAwC,CADxC,aAAc,CAFd,oBAAqB,CACrB,aAGF,CAEA,OAEE,aAAc,CADd,eAAgB,CAEhB,eAAiB,CACjB,eACF,CAEA,OAKE,wBAAyB,CAKzB,WAAY,CAJZ,iBAAkB,CAFlB,UAAW,CAKX,cAAe,CARf,oBAAqB,CAOrB,aAAc,CADd,eAAgB,CALhB,iBAAkB,CAClB,oBAAqB,CAQrB,2CACF,CAEA,aACE,wBACF,CAEA,iBACE,GAEE,aAAc,CADd,oBAEF,CACF","sources":["style.css"],"sourcesContent":["body {\r\n font-family: 'Lato', sans-serif;\r\n background-color: #ecf0f1;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100vh;\r\n margin: 0;\r\n }\r\n \r\n .timer-container {\r\n text-align: center;\r\n }\r\n \r\n .clock {\r\n display: inline-block;\r\n font-size: 3em;\r\n color: #3498db;\r\n animation: pulse 1.5s infinite alternate;\r\n }\r\n \r\n .timer {\r\n font-size: 1.5em;\r\n color: #e74c3c;\r\n font-weight: bold;\r\n margin-top: 10px;\r\n }\r\n \r\n button {\r\n display: inline-block;\r\n padding: 15px 30px;\r\n text-decoration: none;\r\n color: #fff;\r\n background-color: #2ecc71;\r\n border-radius: 5px;\r\n margin-top: 20px;\r\n font-size: 1em;\r\n cursor: pointer;\r\n border: none;\r\n transition: background-color 0.3s ease-in-out;\r\n }\r\n \r\n button:hover {\r\n background-color: #27ae60;\r\n }\r\n \r\n @keyframes pulse {\r\n to {\r\n transform: scale(1.1);\r\n color: #2980b9;\r\n }\r\n }\r\n "],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/build/static/js/main.8e9dde19.js:
--------------------------------------------------------------------------------
1 | /*! For license information please see main.8e9dde19.js.LICENSE.txt */
2 | (()=>{"use strict";var e={123:e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(l){return!1}}()?Object.assign:function(e,l){for(var i,a,o=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{var r=n(43),l=n(123),i=n(853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,l,r)&&(n=null),r||null===l?function(e){return!!Q.call(H,e)||!Q.call(B,e)&&(W.test(e)?H[e]=!0:(B[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,J="function"===typeof Symbol&&Symbol.for,ee=J?Symbol.for("react.element"):60103,te=J?Symbol.for("react.portal"):60106,ne=J?Symbol.for("react.fragment"):60107,re=J?Symbol.for("react.strict_mode"):60108,le=J?Symbol.for("react.profiler"):60114,ie=J?Symbol.for("react.provider"):60109,ae=J?Symbol.for("react.context"):60110,oe=J?Symbol.for("react.concurrent_mode"):60111,ue=J?Symbol.for("react.forward_ref"):60112,ce=J?Symbol.for("react.suspense"):60113,se=J?Symbol.for("react.suspense_list"):60120,fe=J?Symbol.for("react.memo"):60115,de=J?Symbol.for("react.lazy"):60116,pe=J?Symbol.for("react.block"):60121,me="function"===typeof Symbol&&Symbol.iterator;function he(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=me&&e[me]||e["@@iterator"])?e:null}function ve(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case le:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case se:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ve(e.type);case pe:return ve(e.render);case de:if(e=1===e._status?e._result:null)return ve(e)}return null}function ge(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,l=e._debugSource,i=ve(e.type);n=null,r&&(n=ve(r.type)),r=i,i="",l?i=" (at "+l.fileName.replace(Z,"")+":"+l.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function xe(e,t){var n=t.checked;return l({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Te(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ee(e,t){null!=(t=t.checked)&&G(e,"checked",t,!1)}function Se(e,t){Ee(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?_e(e,t.type,n):t.hasOwnProperty("defaultValue")&&_e(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function _e(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=l({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ne(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Re(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ie="http://www.w3.org/1999/xhtml",Fe="http://www.w3.org/2000/svg";function De(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?De(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ae,je,Ue=(je=function(e,t){if(e.namespaceURI!==Fe||"innerHTML"in e)e.innerHTML=t;else{for((Ae=Ae||document.createElement("div")).innerHTML=""+t.valueOf().toString()+" ",t=Ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return je(e,t)}))}:je);function Ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function We(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qe={animationend:We("Animation","AnimationEnd"),animationiteration:We("Animation","AnimationIteration"),animationstart:We("Animation","AnimationStart"),transitionend:We("Transition","TransitionEnd")},Be={},He={};function $e(e){if(Be[e])return Be[e];if(!Qe[e])return e;var t,n=Qe[e];for(t in n)if(n.hasOwnProperty(t)&&t in He)return Be[e]=n[t];return e}_&&(He=document.createElement("div").style,"AnimationEvent"in window||(delete Qe.animationend.animation,delete Qe.animationiteration.animation,delete Qe.animationstart.animation),"TransitionEvent"in window||delete Qe.transitionend.transition);var Ke=$e("animationend"),qe=$e("animationiteration"),Ye=$e("animationstart"),Xe=$e("transitionend"),Ge="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ze=new("function"===typeof WeakMap?WeakMap:Map);function Je(e){var t=Ze.get(e);return void 0===t&&(t=new Map,Ze.set(e,t)),t}function et(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function tt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function nt(e){if(et(e)!==e)throw Error(a(188))}function rt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=et(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(null===l)break;var i=l.alternate;if(null===i){if(null!==(r=l.return)){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return nt(l),e;if(i===r)return nt(l),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function lt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var at=null;function ot(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;rft.length&&ft.push(e)}function pt(e,t,n,r){if(ft.length){var l=ft.pop();return l.topLevelType=e,l.eventSystemFlags=r,l.nativeEvent=t,l.targetInst=n,l}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function mt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Mn(r)}while(n);for(n=0;n=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dn(r)}}function mn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hn(){for(var e=window,t=fn();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=fn((e=t.contentWindow).document)}return t}function vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gn="$",yn="/$",bn="$?",wn="$!",kn=null,xn=null;function Tn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function En(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Sn="function"===typeof setTimeout?setTimeout:void 0,Cn="function"===typeof clearTimeout?clearTimeout:void 0;function _n(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Pn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if(n===gn||n===wn||n===bn){if(0===t)return e;t--}else n===yn&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),zn="__reactInternalInstance$"+Nn,On="__reactEventHandlers$"+Nn,Rn="__reactContainere$"+Nn;function Mn(e){var t=e[zn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Rn]||n[zn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Pn(e);null!==e;){if(n=e[zn])return n;e=Pn(e)}return t}n=(e=n).parentNode}return null}function In(e){return!(e=e[zn]||e[Rn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Fn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Dn(e){return e[On]||null}function Ln(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function An(e,t){var n=e.stateNode;if(!n)return null;var r=m(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}function jn(e,t,n){(t=An(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=lt(n._dispatchListeners,t),n._dispatchInstances=lt(n._dispatchInstances,e))}function Un(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Ln(t);for(t=n.length;0this.eventPool.length&&this.eventPool.push(e)}function Jn(e){e.eventPool=[],e.getPooled=Gn,e.release=Zn}l(Xn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=qn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){this.isPersistent=qn},isPersistent:Yn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Yn,this._dispatchInstances=this._dispatchListeners=null}}),Xn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Xn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return l(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,Jn(n),n},Jn(Xn);var er=Xn.extend({data:null}),tr=Xn.extend({data:null}),nr=[9,13,27,32],rr=_&&"CompositionEvent"in window,lr=null;_&&"documentMode"in document&&(lr=document.documentMode);var ir=_&&"TextEvent"in window&&!lr,ar=_&&(!rr||lr&&8=lr),or=String.fromCharCode(32),ur={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},cr=!1;function sr(e,t){switch(e){case"keyup":return-1!==nr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function fr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var dr=!1;var pr={eventTypes:ur,extractEvents:function(e,t,n,r){var l;if(rr)e:{switch(e){case"compositionstart":var i=ur.compositionStart;break e;case"compositionend":i=ur.compositionEnd;break e;case"compositionupdate":i=ur.compositionUpdate;break e}i=void 0}else dr?sr(e,n)&&(i=ur.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=ur.compositionStart);return i?(ar&&"ko"!==n.locale&&(dr||i!==ur.compositionStart?i===ur.compositionEnd&&dr&&(l=Kn()):(Hn="value"in(Bn=r)?Bn.value:Bn.textContent,dr=!0)),i=er.getPooled(i,t,n,r),l?i.data=l:null!==(l=fr(n))&&(i.data=l),Qn(i),l=i):l=null,(e=ir?function(e,t){switch(e){case"compositionend":return fr(t);case"keypress":return 32!==t.which?null:(cr=!0,or);case"textInput":return(e=t.data)===or&&cr?null:e;default:return null}}(e,n):function(e,t){if(dr)return"compositionend"===e||!rr&&sr(e,t)?(e=Kn(),$n=Hn=Bn=null,dr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=document.documentMode,Kr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},qr=null,Yr=null,Xr=null,Gr=!1;function Zr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Gr||null==qr||qr!==fn(n)?null:("selectionStart"in(n=qr)&&vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Xr&&Hr(Xr,n)?null:(Xr=n,(e=Xn.getPooled(Kr.select,Yr,e,t)).type="select",e.target=qr,Qn(e),e))}var Jr={eventTypes:Kr,extractEvents:function(e,t,n,r,l,i){if(!(i=!(l=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{l=Je(l),i=S.onSelect;for(var a=0;apl||(e.current=dl[pl],dl[pl]=null,pl--)}function hl(e,t){pl++,dl[pl]=e.current,e.current=t}var vl={},gl={current:vl},yl={current:!1},bl=vl;function wl(e,t){var n=e.type.contextTypes;if(!n)return vl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,i={};for(l in n)i[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function kl(e){return null!==(e=e.childContextTypes)&&void 0!==e}function xl(){ml(yl),ml(gl)}function Tl(e,t,n){if(gl.current!==vl)throw Error(a(168));hl(gl,t),hl(yl,n)}function El(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ve(t)||"Unknown",i));return l({},n,{},r)}function Sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vl,bl=gl.current,hl(gl,e),hl(yl,yl.current),!0}function Cl(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=El(e,t,bl),r.__reactInternalMemoizedMergedChildContext=e,ml(yl),ml(gl),hl(gl,e)):ml(yl),hl(yl,n)}var _l=i.unstable_runWithPriority,Pl=i.unstable_scheduleCallback,Nl=i.unstable_cancelCallback,zl=i.unstable_requestPaint,Ol=i.unstable_now,Rl=i.unstable_getCurrentPriorityLevel,Ml=i.unstable_ImmediatePriority,Il=i.unstable_UserBlockingPriority,Fl=i.unstable_NormalPriority,Dl=i.unstable_LowPriority,Ll=i.unstable_IdlePriority,Al={},jl=i.unstable_shouldYield,Ul=void 0!==zl?zl:function(){},Vl=null,Wl=null,Ql=!1,Bl=Ol(),Hl=1e4>Bl?Ol:function(){return Ol()-Bl};function $l(){switch(Rl()){case Ml:return 99;case Il:return 98;case Fl:return 97;case Dl:return 96;case Ll:return 95;default:throw Error(a(332))}}function Kl(e){switch(e){case 99:return Ml;case 98:return Il;case 97:return Fl;case 96:return Dl;case 95:return Ll;default:throw Error(a(332))}}function ql(e,t){return e=Kl(e),_l(e,t)}function Yl(e,t,n){return e=Kl(e),Pl(e,t,n)}function Xl(e){return null===Vl?(Vl=[e],Wl=Pl(Ml,Zl)):Vl.push(e),Al}function Gl(){if(null!==Wl){var e=Wl;Wl=null,Nl(e)}Zl()}function Zl(){if(!Ql&&null!==Vl){Ql=!0;var e=0;try{var t=Vl;ql(99,(function(){for(;e=t&&(Fa=!0),e.firstContext=null)}function ci(e,t){if(li!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(li=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ri){if(null===ni)throw Error(a(308));ri=t,ni.dependencies={expirationTime:0,firstContext:t,responders:null}}else ri=ri.next=t;return e._currentValue}var si=!1;function fi(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function pi(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function mi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function hi(e,t){var n=e.alternate;null!==n&&di(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function vi(e,t,n,r){var i=e.updateQueue;si=!1;var a=i.baseQueue,o=i.shared.pending;if(null!==o){if(null!==a){var u=a.next;a.next=o.next,o.next=u}a=o,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=o))}if(null!==a){u=a.next;var c=i.baseState,s=0,f=null,d=null,p=null;if(null!==u)for(var m=u;;){if((o=m.expirationTime)s&&(s=o)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),xu(o,m.suspenseConfig);e:{var v=e,g=m;switch(o=t,h=n,g.tag){case 1:if("function"===typeof(v=g.payload)){c=v.call(h,c,o);break e}c=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null===(o="function"===typeof(v=g.payload)?v.call(h,c,o):v)||void 0===o)break e;c=l({},c,o);break e;case 2:si=!0}}null!==m.callback&&(e.effectTag|=32,null===(o=i.effects)?i.effects=[m]:o.push(m))}if(null===(m=m.next)||m===u){if(null===(o=i.shared.pending))break;m=a.next=o.next,o.next=u,i.baseQueue=a=o,i.shared.pending=null}}null===p?f=c:p.next=d,i.baseState=f,i.baseQueue=p,Tu(s),e.expirationTime=s,e.memoizedState=c}}function gi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;th?(v=f,f=null):v=f.sibling;var g=p(l,f,o[h],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(l,f),a=i(g,a,h),null===s?c=g:s.sibling=g,s=g,f=v}if(h===o.length)return n(l,f),c;if(null===f){for(;hv?(g=h,h=null):g=h.sibling;var b=p(l,h,y.value,c);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(l,h),o=i(b,o,v),null===f?s=b:f.sibling=b,f=b,h=g}if(y.done)return n(l,h),s;if(null===h){for(;!y.done;v++,y=u.next())null!==(y=d(l,y.value,c))&&(o=i(y,o,v),null===f?s=y:f.sibling=y,f=y);return s}for(h=r(l,h);!y.done;v++,y=u.next())null!==(y=m(h,l,v,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?v:y.key),o=i(y,o,v),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach((function(e){return t(l,e)})),s}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var s="object"===typeof i&&null!==i;if(s)switch(i.$$typeof){case ee:e:{for(s=i.key,c=r;null!==c;){if(c.key===s){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(r=l(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=l(c,i.props)).ref=_i(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Hu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Bu(i.type,i.key,i.props,null,e.mode,u)).ref=_i(e,r,i),u.return=e,e=u)}return o(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=l(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ku(i,e.mode,u)).return=e,e=r}return o(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=l(r,i)).return=e,e=r):(n(e,r),(r=$u(i,e.mode,u)).return=e,e=r),o(e);if(Ci(i))return h(e,r,i,u);if(he(i))return v(e,r,i,u);if(s&&Pi(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var zi=Ni(!0),Oi=Ni(!1),Ri={},Mi={current:Ri},Ii={current:Ri},Fi={current:Ri};function Di(e){if(e===Ri)throw Error(a(174));return e}function Li(e,t){switch(hl(Fi,t),hl(Ii,e),hl(Mi,Ri),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Le(null,"");break;default:t=Le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ml(Mi),hl(Mi,t)}function Ai(){ml(Mi),ml(Ii),ml(Fi)}function ji(e){Di(Fi.current);var t=Di(Mi.current),n=Le(t,e.type);t!==n&&(hl(Ii,e),hl(Mi,n))}function Ui(e){Ii.current===e&&(ml(Mi),ml(Ii))}var Vi={current:0};function Wi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===bn||n.data===wn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Qi(e,t){return{responder:e,props:t}}var Bi=X.ReactCurrentDispatcher,Hi=X.ReactCurrentBatchConfig,$i=0,Ki=null,qi=null,Yi=null,Xi=!1;function Gi(){throw Error(a(321))}function Zi(e,t){if(null===t)return!1;for(var n=0;ni))throw Error(a(301));i+=1,Yi=qi=null,t.updateQueue=null,Bi.current=Ea,e=n(r,l)}while(t.expirationTime===$i)}if(Bi.current=ka,t=null!==qi&&null!==qi.next,$i=0,Yi=qi=Ki=null,Xi=!1,t)throw Error(a(300));return e}function ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Yi?Ki.memoizedState=Yi=e:Yi=Yi.next=e,Yi}function ta(){if(null===qi){var e=Ki.alternate;e=null!==e?e.memoizedState:null}else e=qi.next;var t=null===Yi?Ki.memoizedState:Yi.next;if(null!==t)Yi=t,qi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(qi=e).memoizedState,baseState:qi.baseState,baseQueue:qi.baseQueue,queue:qi.queue,next:null},null===Yi?Ki.memoizedState=Yi=e:Yi=Yi.next=e}return Yi}function na(e,t){return"function"===typeof t?t(e):t}function ra(e){var t=ta(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=qi,l=r.baseQueue,i=n.pending;if(null!==i){if(null!==l){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(null!==l){l=l.next,r=r.baseState;var u=o=i=null,c=l;do{var s=c.expirationTime;if(s<$i){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(o=u=f,i=r):u=u.next=f,s>Ki.expirationTime&&(Ki.expirationTime=s,Tu(s))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),xu(s,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==l);null===u?i=r:u.next=o,Qr(r,t.memoizedState)||(Fa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function la(e){var t=ta(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(null!==l){n.pending=null;var o=l=l.next;do{i=e(i,o.action),o=o.next}while(o!==l);Qr(i,t.memoizedState)||(Fa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ia(e){var t=ea();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:na,lastRenderedState:e}).dispatch=wa.bind(null,Ki,e),[t.memoizedState,e]}function aa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ki.updateQueue)?(t={lastEffect:null},Ki.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oa(){return ta().memoizedState}function ua(e,t,n,r){var l=ea();Ki.effectTag|=e,l.memoizedState=aa(1|t,n,void 0,void 0===r?null:r)}function ca(e,t,n,r){var l=ta();r=void 0===r?null:r;var i=void 0;if(null!==qi){var a=qi.memoizedState;if(i=a.destroy,null!==r&&Zi(r,a.deps))return void aa(t,n,i,r)}Ki.effectTag|=e,l.memoizedState=aa(1|t,n,i,r)}function sa(e,t){return ua(516,4,e,t)}function fa(e,t){return ca(516,4,e,t)}function da(e,t){return ca(4,2,e,t)}function pa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ma(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ca(4,2,pa.bind(null,t,e),n)}function ha(){}function va(e,t){return ea().memoizedState=[e,void 0===t?null:t],e}function ga(e,t){var n=ta();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ya(e,t){var n=ta();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ba(e,t,n){var r=$l();ql(98>r?98:r,(function(){e(!0)})),ql(97<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[zn]=t,e[On]=r,Ha(e,t,!1,!1),t.stateNode=e,u=on(i,r),i){case"iframe":case"object":case"embed":qt("load",e),c=r;break;case"video":case"audio":for(c=0;cr.tailExpiration&&1t)&&iu.set(e,t))}}function du(e,t){e.expirationTime=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function mu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Xl(vu.bind(null,e));else{var t=pu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=cu();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var l=e.callbackPriority;if(e.callbackExpirationTime===t&&l>=r)return;n!==Al&&Nl(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Xl(vu.bind(null,e)):Yl(r,hu.bind(null,e),{timeout:10*(1073741821-t)-Hl()}),e.callbackNode=t}}}function hu(e,t){if(uu=0,t)return Zu(e,t=cu()),mu(e),null;var n=pu(e);if(0!==n){if(t=e.callbackNode,(jo&(Oo|Ro))!==No)throw Error(a(327));if(Ru(),e===Uo&&n===Wo||bu(e,n),null!==Vo){var r=jo;jo|=Oo;for(var l=ku();;)try{Su();break}catch(u){wu(e,u)}if(ii(),jo=r,_o.current=l,Qo===Io)throw t=Bo,bu(e,n),Xu(e,n),mu(e),t;if(null===Vo)switch(l=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Qo,Uo=null,r){case Mo:case Io:throw Error(a(345));case Fo:Zu(e,2=n){e.lastPingedTime=n,bu(e,n);break}}if(0!==(i=pu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=Sn(Nu.bind(null,e),l);break}Nu(e);break;case Lo:if(Xu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Pu(l)),Yo&&(0===(l=e.lastPingedTime)||l>=n)){e.lastPingedTime=n,bu(e,n);break}if(0!==(l=pu(e))&&l!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==$o?r=10*(1073741821-$o)-Hl():1073741823===Ho?r=0:(r=10*(1073741821-Ho)-5e3,0>(r=(l=Hl())-r)&&(r=0),(n=10*(1073741821-n)-l)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Co(r/1960))-r)&&(r=n)),10=(r=0|o.busyMinDurationMs)?r=0:(l=0|o.busyDelayMs,r=(i=Hl()-(10*(1073741821-i)-(0|o.timeoutMs||5e3)))<=l?0:l+r-i),10 component higher in the tree to provide a loading indicator or placeholder to display."+ge(a))}Qo!==Ao&&(Qo=Fo),o=lo(o,a),f=i;do{switch(f.tag){case 3:u=o,f.effectTag|=4096,f.expirationTime=t,hi(f,To(f,u,t));break e;case 1:u=o;var w=f.type,k=f.stateNode;if(0===(64&f.effectTag)&&("function"===typeof w.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===tu||!tu.has(k)))){f.effectTag|=4096,f.expirationTime=t,hi(f,Eo(f,u,t));break e}}f=f.return}while(null!==f)}Vo=_u(Vo)}catch(x){t=x;continue}break}}function ku(){var e=_o.current;return _o.current=ka,null===e?ka:e}function xu(e,t){eqo&&(qo=e)}function Eu(){for(;null!==Vo;)Vo=Cu(Vo)}function Su(){for(;null!==Vo&&!jl();)Vo=Cu(Vo)}function Cu(e){var t=So(e.alternate,e,Wo);return e.memoizedProps=e.pendingProps,null===t&&(t=_u(e)),Po.current=null,t}function _u(e){Vo=e;do{var t=Vo.alternate;if(e=Vo.return,0===(2048&Vo.effectTag)){if(t=no(t,Vo,Wo),1===Wo||1!==Vo.childExpirationTime){for(var n=0,r=Vo.child;null!==r;){var l=r.expirationTime,i=r.childExpirationTime;l>n&&(n=l),i>n&&(n=i),r=r.sibling}Vo.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Vo.firstEffect),null!==Vo.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Vo.firstEffect),e.lastEffect=Vo.lastEffect),1(e=e.childExpirationTime)?t:e}function Nu(e){var t=$l();return ql(99,zu.bind(null,e,t)),null}function zu(e,t){do{Ru()}while(null!==ru);if((jo&(Oo|Ro))!==No)throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var l=Pu(n);if(e.firstPendingTime=l,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Uo&&(Vo=Uo=null,Wo=0),1u&&(s=u,u=o,o=s),s=pn(w,o),f=pn(w,u),s&&f&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((k=k.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),o>u?(x.addRange(k),x.extend(f.node,f.offset)):(k.setEnd(f.node,f.offset),x.addRange(k))))),k=[];for(x=w;x=x.parentNode;)1===x.nodeType&&k.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof w.focus&&w.focus(),w=0;w=n?Xa(e,t,n):(hl(Vi,1&Vi.current),null!==(t=eo(e,t,n))?t.sibling:null);hl(Vi,1&Vi.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Ja(e,t,n);t.effectTag|=64}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null),hl(Vi,Vi.current),!r)return null}return eo(e,t,n)}Fa=!1}}else Fa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,l=wl(t,gl.current),ui(t,n),l=Ji(null,t,r,e,l,n),t.effectTag|=1,"object"===typeof l&&null!==l&&"function"===typeof l.render&&void 0===l.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,kl(r)){var i=!0;Sl(t)}else i=!1;t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,fi(t);var o=r.getDerivedStateFromProps;"function"===typeof o&&wi(t,r,o,e),l.updater=ki,t.stateNode=l,l._reactInternalFiber=t,Si(t,r,e,n),t=Qa(null,t,r,!0,i,n)}else t.tag=0,Da(null,t,l,n),t=t.child;return t;case 16:e:{if(l=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(l),1!==l._status)throw l._result;switch(l=l._result,t.type=l,i=t.tag=function(e){if("function"===typeof e)return Wu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(l),e=ei(l,e),i){case 0:t=Va(null,t,l,e,n);break e;case 1:t=Wa(null,t,l,e,n);break e;case 11:t=La(null,t,l,e,n);break e;case 14:t=Aa(null,t,l,ei(l.type,e),r,n);break e}throw Error(a(306,l,""))}return t;case 0:return r=t.type,l=t.pendingProps,Va(e,t,r,l=t.elementType===r?l:ei(r,l),n);case 1:return r=t.type,l=t.pendingProps,Wa(e,t,r,l=t.elementType===r?l:ei(r,l),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,l=null!==(l=t.memoizedState)?l.element:null,di(e,t),vi(t,r,null,n),(r=t.memoizedState.element)===l)Ma(),t=eo(e,t,n);else{if((l=t.stateNode.hydrate)&&(Ca=_n(t.stateNode.containerInfo.firstChild),Sa=t,l=_a=!0),l)for(n=Oi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Da(e,t,r,n),Ma();t=t.child}return t;case 5:return ji(t),null===e&&za(t),r=t.type,l=t.pendingProps,i=null!==e?e.memoizedProps:null,o=l.children,En(r,l)?o=null:null!==i&&En(r,i)&&(t.effectTag|=16),Ua(e,t),4&t.mode&&1!==n&&l.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Da(e,t,o,n),t=t.child),t;case 6:return null===e&&za(t),null;case 13:return Xa(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=zi(t,null,r,n):Da(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,La(e,t,r,l=t.elementType===r?l:ei(r,l),n);case 7:return Da(e,t,t.pendingProps,n),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value;var u=t.type._context;if(hl(ti,u._currentValue),u._currentValue=i,null!==o)if(u=o.value,0===(i=Qr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(o.children===l.children&&!yl.current){t=eo(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){o=u.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!==(s.observedBits&i)){1===u.tag&&((s=pi(n,null)).tag=2,mi(u,s)),u.expirationTime=t&&e<=t}function Xu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;nt||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Gu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Zu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Ju(e,t,n,r){var l=t.current,i=cu(),o=yi.suspense;i=su(i,l,o);e:if(n){t:{if(et(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(kl(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(kl(c)){n=El(n,c,u);break e}}n=u}else n=vl;return null===t.context?t.context=n:t.pendingContext=n,(t=pi(i,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),mi(l,t),fu(l,i),i}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime{!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{var r=n(43),l=60103;if("function"===typeof Symbol&&Symbol.for){var i=Symbol.for;l=i("react.element"),i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,s=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)o.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:l,type:e,key:c,ref:s,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},202:(e,t,n)=>{var r=n(123),l="function"===typeof Symbol&&Symbol.for,i=l?Symbol.for("react.element"):60103,a=l?Symbol.for("react.portal"):60106,o=l?Symbol.for("react.fragment"):60107,u=l?Symbol.for("react.strict_mode"):60108,c=l?Symbol.for("react.profiler"):60114,s=l?Symbol.for("react.provider"):60109,f=l?Symbol.for("react.context"):60110,d=l?Symbol.for("react.forward_ref"):60112,p=l?Symbol.for("react.suspense"):60113,m=l?Symbol.for("react.memo"):60115,h=l?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nz.length&&z.push(e)}function M(e,t,n,r){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var o=!1;if(null===e)o=!0;else switch(l){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case i:case a:o=!0}}if(o)return n(r,e,""===t?"."+F(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u{e.exports=n(202)},579:(e,t,n)=>{e.exports=n(153)},234:(e,t)=>{var n,r,l,i,a;if("undefined"===typeof window||"function"!==typeof MessageChannel){var o=null,u=null,c=function(){if(null!==o)try{var e=t.unstable_now();o(!0,e),o=null}catch(n){throw setTimeout(c,0),n}},s=Date.now();t.unstable_now=function(){return Date.now()-s},n=function(e){null!==o?setTimeout(n,0,e):(o=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},l=function(){clearTimeout(u)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,p=window.setTimeout,m=window.clearTimeout;if("undefined"!==typeof console){var h=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof f&&"function"===typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var g=!1,y=null,b=-1,w=5,k=0;i=function(){return t.unstable_now()>=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,l=e[r];if(!(void 0!==l&&0<_(l,t)))break e;e[r]=t,e[n]=l,n=r}}function S(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,l=e.length;r_(a,n))void 0!==u&&0>_(u,a)?(e[r]=u,e[o]=n,r=o):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>_(u,n)))break e;e[r]=u,e[o]=n,r=o}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],N=[],z=1,O=null,R=3,M=!1,I=!1,F=!1;function D(e){for(var t=S(N);null!==t;){if(null===t.callback)C(N);else{if(!(t.startTime<=e))break;C(N),t.sortIndex=t.expirationTime,E(P,t)}t=S(N)}}function L(e){if(F=!1,D(e),!I)if(null!==S(P))I=!0,n(A);else{var t=S(N);null!==t&&r(L,t.startTime-e)}}function A(e,n){I=!1,F&&(F=!1,l()),M=!0;var a=R;try{for(D(n),O=S(P);null!==O&&(!(O.expirationTime>n)||e&&!i());){var o=O.callback;if(null!==o){O.callback=null,R=O.priorityLevel;var u=o(O.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?O.callback=u:O===S(P)&&C(P),D(n)}else C(P);O=S(P)}if(null!==O)var c=!0;else{var s=S(N);null!==s&&r(L,s.startTime-n),c=!1}return c}finally{O=null,R=a,M=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||M||(I=!0,n(A))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return S(P)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0o?(e.sortIndex=u,E(N,e),null===S(P)&&e===S(N)&&(F?l():F=!0,r(L,u-o))):(e.sortIndex=a,E(P,e),I||M||(I=!0,n(A))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=S(P);return n!==O&&null!==O&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime{e.exports=n(234)}},t={};function n(r){var l=t[r];if(void 0!==l)return l.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}var r=n(43),l=n(950),i=n(579);const a=()=>{const[e,t]=(0,r.useState)("0:00"),[n,l]=(0,r.useState)(),[a,o]=(0,r.useState)(),[u,c]=(0,r.useState)(!1),[s,f]=(0,r.useState)(!1),[d,p]=(0,r.useState)(0);const m=(0,r.useRef)(null);(0,r.useEffect)((()=>(!u&&s?m.current=setInterval((()=>{d>=0&&(()=>{let e=Math.floor(d/60),n=d-60*e;d>=0&&(p((e=>e-1)),t((e>9?e:"0"+e)+":"+(n>9?n:"0"+n)),console.log(d,e,n))})()}),1e3):(clearInterval(m.current),m.current=null),()=>{clearInterval(m.current)})),[u,s,d]);return(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("label",{children:[(0,i.jsx)("input",{id:"minute",name:"minute",type:"number",value:n,onChange:e=>{p(60*Number(e.target.value)+(a>0?a:0)),console.log(d),l(Number(e.target.value))}}),"Minutes"]}),(0,i.jsxs)("label",{children:[(0,i.jsx)("input",{id:"id1",name:"minute1",type:"number",value:a,onChange:e=>{p(n?60*n:0+Number(e.target.value)),o(Number(e.target.value))}}),"Seconds"]})]}),(0,i.jsx)("button",{onClick:()=>{f((e=>!e))},children:"START"}),(0,i.jsx)("button",{onClick:()=>{c((e=>!e))},children:u?"Run":"Pause"}),(0,i.jsx)("button",{onClick:e=>{t("0:00"),p(0),l(0),o(0),f(!1)},children:"Reset"}),(0,i.jsx)("h1",{children:e})]})};(0,l.render)((0,i.jsx)(a,{}),document.getElementById("root"))})();
3 | //# sourceMappingURL=main.8e9dde19.js.map
--------------------------------------------------------------------------------
/build/static/js/main.8e9dde19.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*
2 | object-assign
3 | (c) Sindre Sorhus
4 | @license MIT
5 | */
6 |
7 | /** @license React v0.19.1
8 | * scheduler.production.min.js
9 | *
10 | * Copyright (c) Facebook, Inc. and its affiliates.
11 | *
12 | * This source code is licensed under the MIT license found in the
13 | * LICENSE file in the root directory of this source tree.
14 | */
15 |
16 | /** @license React v16.14.0
17 | * react-dom.production.min.js
18 | *
19 | * Copyright (c) Facebook, Inc. and its affiliates.
20 | *
21 | * This source code is licensed under the MIT license found in the
22 | * LICENSE file in the root directory of this source tree.
23 | */
24 |
25 | /** @license React v16.14.0
26 | * react-jsx-runtime.production.min.js
27 | *
28 | * Copyright (c) Facebook, Inc. and its affiliates.
29 | *
30 | * This source code is licensed under the MIT license found in the
31 | * LICENSE file in the root directory of this source tree.
32 | */
33 |
34 | /** @license React v16.14.0
35 | * react.production.min.js
36 | *
37 | * Copyright (c) Facebook, Inc. and its affiliates.
38 | *
39 | * This source code is licensed under the MIT license found in the
40 | * LICENSE file in the root directory of this source tree.
41 | */
42 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-wquvbn",
3 | "version": "0.0.0",
4 | "private": true,
5 | "dependencies": {
6 | "axios": "^0.18.0",
7 | "moment": "^2.24.0",
8 | "react": "^16.8.4",
9 | "react-dom": "^16.8.4"
10 | },
11 | "homepage": "https://AaqibhafeezKhan.github.io/Timer-Countdown-using-React-Hooks",
12 | "scripts": {
13 | "start": "react-scripts start",
14 | "build": "react-scripts build",
15 | "test": "react-scripts test --env=jsdom",
16 | "eject": "react-scripts eject",
17 | "predeploy": "npm run build",
18 | "deploy": "gh-pages -d build"
19 | },
20 | "devDependencies": {
21 | "gh-pages": "^6.2.0",
22 | "react-scripts": "latest"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Countdown Timer using React Hooks
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useRef, useEffect } from 'react';
2 |
3 | import { render } from 'react-dom';
4 |
5 | import './style.css';
6 |
7 | const App = () => {
8 | const [timer, setTimer] = useState('0:00');
9 |
10 | const [minutesValue, setMinutesValue] = useState();
11 |
12 | const [secondsValue, setSecondsValue] = useState();
13 |
14 | const [pause, setPause] = useState(false);
15 |
16 | const [active, setActive] = useState(false);
17 |
18 | const [count, setCount] = useState(0);
19 |
20 | let initCounter = () => {
21 | let m = Math.floor(count / 60);
22 |
23 | let s = count - m * 60;
24 |
25 | if (count >= 0) {
26 | setCount((count) => count - 1);
27 |
28 | setTimer((m > 9 ? m : '0' + m) + ':' + (s > 9 ? s : '0' + s));
29 |
30 | console.log(count, m, s);
31 | }
32 | };
33 |
34 | const interval = useRef(null);
35 |
36 | useEffect(() => {
37 | if (!pause && active) {
38 | interval.current = setInterval(() => {
39 | if (count >= 0) {
40 | initCounter();
41 | }
42 | }, 1000);
43 | } else {
44 | clearInterval(interval.current);
45 |
46 | interval.current = null;
47 | }
48 |
49 | return () => {
50 | clearInterval(interval.current);
51 | };
52 | }, [pause, active, count]);
53 |
54 | const handleRun = () => {
55 | setPause((pause) => !pause);
56 | };
57 |
58 | const handleChangeMin = (event) => {
59 | setCount(
60 | Number(event.target.value) * 60 + (secondsValue > 0 ? secondsValue : 0)
61 | );
62 |
63 | console.log(count);
64 |
65 | setMinutesValue(Number(event.target.value));
66 | };
67 |
68 | const handleChangeSec = (event) => {
69 | setCount(minutesValue ? minutesValue * 60 : 0 + Number(event.target.value));
70 |
71 | setSecondsValue(Number(event.target.value));
72 | };
73 |
74 | const handleStart = () => {
75 | setActive((active) => !active);
76 | };
77 |
78 | let reset = (e) => {
79 | setTimer('0:00');
80 |
81 | setCount(0);
82 |
83 | setMinutesValue(0);
84 |
85 | setSecondsValue(0);
86 |
87 | setActive(false);
88 | };
89 |
90 | return (
91 |
92 |
93 |
94 |
101 | Minutes
102 |
103 |
104 |
105 |
112 | Seconds
113 |
114 |
115 |
116 |
START
117 |
118 |
{pause ? 'Run' : 'Pause'}
119 |
120 |
Reset
121 |
122 |
{timer}
123 |
124 | );
125 | };
126 |
127 | render( , document.getElementById('root'));
128 |
--------------------------------------------------------------------------------
/src/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: 'Lato', sans-serif;
3 | background: linear-gradient(to bottom, #74ebd5, #acb6e5);
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | margin: 0;
9 | color: #2c3e50;
10 | }
11 |
12 | .timer-container {
13 | background: rgba(255, 255, 255, 0.85);
14 | padding: 30px;
15 | border-radius: 15px;
16 | box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
17 | text-align: center;
18 | width: 90%;
19 | max-width: 400px;
20 | }
21 |
22 | .clock {
23 | display: inline-block;
24 | font-size: 4em;
25 | color: #3498db;
26 | animation: pulse 1.5s infinite alternate;
27 | margin-bottom: 20px;
28 | }
29 |
30 | .timer {
31 | font-size: 1.5em;
32 | color: #e74c3c;
33 | font-weight: bold;
34 | margin-top: 10px;
35 | }
36 |
37 | button {
38 | display: inline-block;
39 | padding: 15px 30px;
40 | text-decoration: none;
41 | color: #fff;
42 | background-color: #2980b9;
43 | border-radius: 50px;
44 | margin: 15px 10px;
45 | font-size: 1em;
46 | cursor: pointer;
47 | border: none;
48 | transition: background-color 0.3s ease-in-out, transform 0.2s;
49 | }
50 |
51 | button:hover {
52 | background-color: #1c6691;
53 | transform: translateY(-3px);
54 | }
55 |
56 | button:active {
57 | transform: translateY(2px);
58 | }
59 |
60 | button .fas {
61 | margin-right: 8px;
62 | }
63 |
64 | input[type="number"] {
65 | width: 60px;
66 | padding: 10px;
67 | margin: 10px;
68 | border-radius: 5px;
69 | border: 2px solid #3498db;
70 | text-align: center;
71 | font-size: 1em;
72 | outline: none;
73 | transition: border-color 0.3s;
74 | }
75 |
76 | input[type="number"]:focus {
77 | border-color: #2980b9;
78 | }
79 |
80 | @keyframes pulse {
81 | to {
82 | transform: scale(1.1);
83 | color: #2ecc71;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------