jacobinathanialpeterson commited on
Commit
1e40c2a
1 Parent(s): 07366cd

Upload 1035 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +26 -0
  2. 1v1.lol/UnityLoader.js +0 -0
  3. 1v1.lol/css/style.css +208 -0
  4. 1v1.lol/favicon.png +0 -0
  5. 1v1.lol/firebase/firebase-analytics.js +2 -0
  6. 1v1.lol/firebase/firebase-app.js +2 -0
  7. 1v1.lol/firebase/firebase-auth.js +0 -0
  8. 1v1.lol/firebase/firebase-firestore.js +0 -0
  9. 1v1.lol/firebase/firebase-remote-config.js +2 -0
  10. 1v1.lol/index.html +343 -0
  11. 1v1.lol/js/IronSourceRV.js +33 -0
  12. 1v1.lol/js/adblockManager.js +19 -0
  13. 1v1.lol/js/cpmstar.js +49 -0
  14. 1v1.lol/js/firebase-config.js +39 -0
  15. 1v1.lol/js/firebase.js +29 -0
  16. 1v1.lol/js/fullscreen.js +37 -0
  17. 1v1.lol/js/login.js +149 -0
  18. 1v1.lol/js/macUserAgent.js +37 -0
  19. 1v1.lol/js/mobileRedirect.js +20 -0
  20. 1v1.lol/js/sdkloader/ima3.js +0 -0
  21. 1v1.lol/js/visibilityChangeListener.js +8 -0
  22. 1v1.lol/js/windowResize.js +40 -0
  23. 1v1.lol/lib/jquery.min.js +2 -0
  24. 1v1.lol/logo.png +0 -0
  25. 1v1.lol/splash.png +0 -0
  26. 1v1.lol/webcopy-origin.txt +100 -0
  27. 2048/.gitignore +1 -0
  28. 2048/.jshintrc +19 -0
  29. 2048/CONTRIBUTING.md +33 -0
  30. 2048/LICENSE.txt +21 -0
  31. 2048/README.md +38 -0
  32. 2048/Rakefile +11 -0
  33. 2048/favicon.ico +0 -0
  34. 2048/index.html +99 -0
  35. 2048/js/animframe_polyfill.js +28 -0
  36. 2048/js/application.js +4 -0
  37. 2048/js/bind_polyfill.js +9 -0
  38. 2048/js/classlist_polyfill.js +71 -0
  39. 2048/js/game_manager.js +272 -0
  40. 2048/js/grid.js +117 -0
  41. 2048/js/html_actuator.js +139 -0
  42. 2048/js/keyboard_input_manager.js +144 -0
  43. 2048/js/local_storage_manager.js +63 -0
  44. 2048/js/tile.js +27 -0
  45. 2048/meta/apple-touch-icon.png +0 -0
  46. 2048/meta/apple-touch-startup-image-640x1096.png +0 -0
  47. 2048/meta/apple-touch-startup-image-640x920.png +0 -0
  48. 2048/style/fonts/ClearSans-Bold-webfont.eot +0 -0
  49. 2048/style/fonts/ClearSans-Bold-webfont.svg +640 -0
  50. 2048/style/fonts/ClearSans-Bold-webfont.woff +0 -0
.gitattributes CHANGED
@@ -33,3 +33,29 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ boxingrandom/images/shared-0-sheet0.png filter=lfs diff=lfs merge=lfs -text
37
+ ducklife/WebGL1Coolmath.asm.code.unityweb filter=lfs diff=lfs merge=lfs -text
38
+ ducklife/WebGL1Coolmath.data.unityweb filter=lfs diff=lfs merge=lfs -text
39
+ ducklife2/WebGL2Wix.asm.code.unityweb filter=lfs diff=lfs merge=lfs -text
40
+ ducklife2/WebGL2Wix.data.unityweb filter=lfs diff=lfs merge=lfs -text
41
+ ducklife3/WebGL3Wix.asm.code.unityweb filter=lfs diff=lfs merge=lfs -text
42
+ ducklife3/WebGL3Wix.data.unityweb filter=lfs diff=lfs merge=lfs -text
43
+ ducklife4/WebGL.asm.code.unityweb filter=lfs diff=lfs merge=lfs -text
44
+ ducklife4/WebGL.data.unityweb filter=lfs diff=lfs merge=lfs -text
45
+ fireboyandwatergirlintheforesttemple/assets/audio/LevelMusic.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ geometrydash/gdash.js filter=lfs diff=lfs merge=lfs -text
47
+ minecraft1.5.2/assets.epk filter=lfs diff=lfs merge=lfs -text
48
+ ovo/media/track1.html filter=lfs diff=lfs merge=lfs -text
49
+ ovo/media/track1.ogg filter=lfs diff=lfs merge=lfs -text
50
+ ovo/media/track2.html filter=lfs diff=lfs merge=lfs -text
51
+ ovo/media/track2.ogg filter=lfs diff=lfs merge=lfs -text
52
+ ovo/media/track3.html filter=lfs diff=lfs merge=lfs -text
53
+ ovo/media/track3.ogg filter=lfs diff=lfs merge=lfs -text
54
+ ovo/media/track4.html filter=lfs diff=lfs merge=lfs -text
55
+ ovo/media/track4.ogg filter=lfs diff=lfs merge=lfs -text
56
+ ovo/silver.ttf filter=lfs diff=lfs merge=lfs -text
57
+ slope/Build/slope_data.unityweb filter=lfs diff=lfs merge=lfs -text
58
+ slope/Build/slope_wasmcode.unityweb filter=lfs diff=lfs merge=lfs -text
59
+ snowrider3d/Build/SnowRider3D-gd-1.data.unityweb filter=lfs diff=lfs merge=lfs -text
60
+ snowrider3d/Build/SnowRider3D-gd-1.wasm.code.unityweb filter=lfs diff=lfs merge=lfs -text
61
+ worldshardestgame/sounds/music.mp3 filter=lfs diff=lfs merge=lfs -text
1v1.lol/UnityLoader.js ADDED
The diff for this file is too large to render. See raw diff
 
1v1.lol/css/style.css ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ *,
6
+ *:before,
7
+ *:after {
8
+ box-sizing: inherit;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ background: #000!important;
14
+ }
15
+
16
+ #gameContainer {
17
+ width: 100vw;
18
+ height: 100vh;
19
+ background: #000!important;
20
+ }
21
+
22
+ canvas {
23
+ width: 100%;
24
+ height: 100%;
25
+ display: block;
26
+ }
27
+ /* try to handle mobile dialog */
28
+
29
+ canvas + * {
30
+ z-index: 2;
31
+ }
32
+
33
+ .logo {
34
+ display: block;
35
+ max-width: 15vw;
36
+ max-height: 15vh;
37
+ }
38
+
39
+ .progress {
40
+ margin: 1.5em;
41
+ border: 1px solid white;
42
+ width: 30vw;
43
+ display: none;
44
+ }
45
+
46
+ .progress .full {
47
+ margin: 2px;
48
+ background: white;
49
+ height: 1em;
50
+ transform-origin: top left;
51
+ }
52
+
53
+ #loader {
54
+ position: absolute;
55
+ left: 0;
56
+ top: 0;
57
+ width: 100vw;
58
+ height: 100vh;
59
+ display: flex;
60
+ flex-direction: column;
61
+ align-items: center;
62
+ justify-content: center;
63
+ }
64
+
65
+ .spinner,
66
+ .spinner:after {
67
+ border-radius: 50%;
68
+ width: 5em;
69
+ height: 5em;
70
+ }
71
+
72
+ .spinner {
73
+ margin: 10px;
74
+ font-size: 10px;
75
+ position: relative;
76
+ text-indent: -9999em;
77
+ border-top: 1.1em solid rgba(255, 255, 255, 0.2);
78
+ border-right: 1.1em solid rgba(255, 255, 255, 0.2);
79
+ border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
80
+ border-left: 1.1em solid #ffffff;
81
+ transform: translateZ(0);
82
+ animation: spinner-spin 1.1s infinite linear;
83
+ }
84
+
85
+ @keyframes spinner-spin {
86
+ 0% {
87
+ transform: rotate(0deg);
88
+ }
89
+ 100% {
90
+ transform: rotate(360deg);
91
+ }
92
+ }
93
+
94
+ .ad {
95
+ background: rgba(0, 0, 0, 0.4);
96
+ overflow: hidden;
97
+ display: none;
98
+ }
99
+
100
+ .modal{
101
+ background:rgba(0,0,0,.4);
102
+ display:none;
103
+ height:100%;
104
+ width: 100%;
105
+ position:fixed;
106
+ z-index:10000;
107
+ top: 0;
108
+ left: 0;
109
+ bottom: 0;
110
+ right: 0;
111
+ }
112
+
113
+ .modalContent{
114
+ margin: auto;
115
+ width: 100%;
116
+ }
117
+
118
+ .centered {
119
+ position: fixed;
120
+ top: 50%;
121
+ left: 50%;
122
+ transform: translate(-50%, -50%);
123
+ }
124
+
125
+ /* The Close Button */
126
+ .close {
127
+ color: #aaa;
128
+ float: right;
129
+ font-size: 28px;
130
+ font-weight: bold;
131
+ }
132
+
133
+ .close:hover,
134
+ .close:focus {
135
+ color: black;
136
+ text-decoration: none;
137
+ cursor: pointer;
138
+ }
139
+
140
+ #continueWindow{
141
+ background-color: #fefefe;
142
+ margin: 15% auto;
143
+ padding: 20px;
144
+ border: 1px solid #888;
145
+ width: 30%;
146
+ }
147
+
148
+ #adWindow{
149
+ background: #4382f5;
150
+ border: 10px solid #4382f5;
151
+ width: 660px;
152
+ border-top: 0;
153
+ height: 540px;
154
+ }
155
+
156
+ .ads{
157
+ height:100%;
158
+ display: flex;
159
+ flex-direction: column;
160
+ justify-content: space-evenly;
161
+ position: absolute;
162
+ z-index:40;
163
+ }
164
+
165
+ .ad-rectangle-bottom {
166
+ width: 304px;
167
+ height: 258px;
168
+ border-style: solid;
169
+ border-width: 4px 4px 4px 0px;
170
+ border-color: rgba(0, 0, 0, 0.01);
171
+ }
172
+
173
+ .ad-rectangle-upper {
174
+ width: 304px;
175
+ height: 258px;
176
+ border-style: solid;
177
+ border-width: 4px 4px 4px 0px;
178
+ border-color: rgba(0, 0, 0, 0.01);
179
+ }
180
+ .ad-leaderboard-bottom {
181
+ width: 304px;
182
+ height: 608px;
183
+ border-style: solid;
184
+ border-width: 4px 4px 4px 0px;
185
+ border-color: rgba(0, 0, 0, 0.01);
186
+ }
187
+
188
+ @media (min-height: 900px) {
189
+ .ad-smallscreen{
190
+ display: none;
191
+ }
192
+ }
193
+
194
+ @media (max-height: 900px) {
195
+ .ad-largescreen{
196
+ display: none;
197
+ }
198
+ }
199
+
200
+ #adWindow {
201
+ border: 10px solid #4382f5 !important;
202
+ height: 500px !important;
203
+ }
204
+
205
+ a[onclick*="showConsentToolSettings"] {
206
+ right: 0px;
207
+ left: auto !important;
208
+ }
1v1.lol/favicon.png ADDED
1v1.lol/firebase/firebase-analytics.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],t):t((e=e||self).firebase)}(this,function(je){"use strict";try{(function(){je=je&&je.hasOwnProperty("default")?je.default:je;var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(o,a,s,u){return new(s=s||Promise)(function(e,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function r(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(n,r)}i((u=u.apply(o,a||[])).next())})}function f(n,r){var i,o,a,e,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,o=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=r.call(n,s)}catch(e){t=[6,e],o=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var e,t,i,d=(i=Error,n(e=a,t=i),void(e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)),a);function o(){this.constructor=e}function a(e,t){var n=i.call(this,t)||this;return n.code=e,n.name="FirebaseError",Object.setPrototypeOf(n,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(n,u.prototype.create),n}var u=(l.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?function(e,r){return e.replace(p,function(e,t){var n=r[t];return null!=n?n.toString():"<"+t+"?>"})}(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new d(i,s),c=0,f=Object.keys(r);c<f.length;c++){var l=f[c];"_"!==l.slice(-1)&&(l in u&&console.warn('Overwriting FirebaseError base field "'+l+'" can cause unexpected behavior.'),u[l]=r[l])}return u},l);function l(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var p=/\{\$([^}]+)}/g;function h(n){return new Promise(function(e,t){n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function v(n,r,i){var o,e=new Promise(function(e,t){h(o=n[r].apply(n,i)).then(e,t)});return e.request=o,e}function g(e,n,t){t.forEach(function(t){Object.defineProperty(e.prototype,t,{get:function(){return this[n][t]},set:function(e){this[n][t]=e}})})}function y(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return v(this[n],e,arguments)})})}function w(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return this[n][e].apply(this[n],arguments)})})}function b(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return function(e,t,n){var r=v(e,t,n);return r.then(function(e){if(e)return new m(e,r.request)})}(this[n],e,arguments)})})}function _(e){this._index=e}function m(e,t){this._cursor=e,this._request=t}function E(e){this._store=e}function S(n){this._tx=n,this.complete=new Promise(function(e,t){n.oncomplete=function(){e()},n.onerror=function(){t(n.error)},n.onabort=function(){t(n.error)}})}function I(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new S(n)}function T(e){this._db=e}g(_,"_index",["name","keyPath","multiEntry","unique"]),y(_,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),b(_,"_index",IDBIndex,["openCursor","openKeyCursor"]),g(m,"_cursor",["direction","key","primaryKey","value"]),y(m,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(m.prototype[n]=function(){var t=this,e=arguments;return Promise.resolve().then(function(){return t._cursor[n].apply(t._cursor,e),h(t._request).then(function(e){if(e)return new m(e,t._request)})})})}),E.prototype.createIndex=function(){return new _(this._store.createIndex.apply(this._store,arguments))},E.prototype.index=function(){return new _(this._store.index.apply(this._store,arguments))},g(E,"_store",["name","keyPath","indexNames","autoIncrement"]),y(E,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),b(E,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),w(E,"_store",IDBObjectStore,["deleteIndex"]),S.prototype.objectStore=function(){return new E(this._tx.objectStore.apply(this._tx,arguments))},g(S,"_tx",["objectStoreNames","mode"]),w(S,"_tx",IDBTransaction,["abort"]),I.prototype.createObjectStore=function(){return new E(this._db.createObjectStore.apply(this._db,arguments))},g(I,"_db",["name","version","objectStoreNames"]),w(I,"_db",IDBDatabase,["deleteObjectStore","close"]),T.prototype.transaction=function(){return new S(this._db.transaction.apply(this._db,arguments))},g(T,"_db",["name","version","objectStoreNames"]),w(T,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(i){[E,_].forEach(function(e){i in e.prototype&&(e.prototype[i.replace("open","iterate")]=function(){var e=function(e){return Array.prototype.slice.call(e)}(arguments),t=e[e.length-1],n=this._store||this._index,r=n[i].apply(n,e.slice(0,-1));r.onsuccess=function(){t(r.result)}})})}),[_,E].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,n){var r=this,i=[];return new Promise(function(t){r.iterateCursor(e,function(e){e?(i.push(e.value),void 0===n||i.length!=n?e.continue():t(i)):t(i)})})})});var C,O=1e4,N="w:0.3.1",k="FIS_v2",A="https://firebaseinstallations.googleapis.com/v1",j=36e5,P=((C={})["missing-app-config-values"]="Missing App configuration values.",C["create-installation-failed"]="Could not register Firebase Installation.",C["generate-token-failed"]="Could not generate Auth Token.",C["not-registered"]="Firebase Installation is not registered.",C["installation-not-found"]="Firebase Installation not found.",C["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',C["app-offline"]="Could not process request. Application offline.",C["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",C),x=new u("installations","Installations",P);function D(e){return e instanceof d&&e.code.includes("request-failed")}function q(e){if(!e||!e.options)throw x.create("missing-app-config-values");var t=e.name,n=e.options,r=n.projectId,i=n.apiKey,o=n.appId;if(!(t&&r&&i&&o))throw x.create("missing-app-config-values");return{appName:t,projectId:r,apiKey:i,appId:o}}function F(e){var t=e.projectId;return A+"/projects/"+t+"/installations"}function R(e){return{token:e.token,requestStatus:2,expiresIn:function(e){return Number(e.replace("s","000"))}(e.expiresIn),creationTime:Date.now()}}function G(r,i){return c(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return[4,i.json()];case 1:return t=e.sent(),n=t.error,[2,x.create("request-failed",{requestName:r,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})]}})})}function V(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function L(e,t){var n=t.refreshToken,r=V(e);return r.append("Authorization",function(e){return k+" "+e}(n)),r}function K(n){return c(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return[4,n()];case 1:return 500<=(t=e.sent()).status&&t.status<600?[2,n()]:[2,t]}})})}function B(t){return new Promise(function(e){setTimeout(e,t)})}function M(e){return btoa(String.fromCharCode.apply(String,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(e))).replace(/\+/g,"-").replace(/\//g,"_")}var U=/^[cdef][\w-]{21}$/,H="";function W(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return M(e).substr(0,22)}(e);return U.test(t)?t:H}catch(e){return H}}var $="firebase-installations-database",z=1,J="firebase-installations-store",X=null;function Y(){return X=X||function(e,t,n){var r=v(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(e){n&&n(new I(i.result,e.oldVersion,i.transaction))}),r.then(function(e){return new T(e)})}($,z,function(e){switch(e.oldVersion){case 0:e.createObjectStore(J)}})}function Q(i,o){return c(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return t=te(i),[4,Y()];case 1:return n=e.sent(),[4,(r=n.transaction(J,"readwrite")).objectStore(J).put(o,t)];case 2:return e.sent(),[4,r.complete];case 3:return e.sent(),[2,o]}})})}function Z(i){return c(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return t=te(i),[4,Y()];case 1:return n=e.sent(),[4,(r=n.transaction(J,"readwrite")).objectStore(J).delete(t)];case 2:return e.sent(),[4,r.complete];case 3:return e.sent(),[2]}})})}function ee(s,u){return c(this,void 0,void 0,function(){var t,n,r,i,o,a;return f(this,function(e){switch(e.label){case 0:return t=te(s),[4,Y()];case 1:return n=e.sent(),r=n.transaction(J,"readwrite"),[4,(i=r.objectStore(J)).get(t)];case 2:return o=e.sent(),void 0!==(a=u(o))?[3,4]:[4,i.delete(t)];case 3:return e.sent(),[3,6];case 4:return[4,i.put(a,t)];case 5:e.sent(),e.label=6;case 6:return[4,r.complete];case 7:return e.sent(),[2,a]}})})}function te(e){return e.appName+"!"+e.appId}function ne(i){return c(this,void 0,void 0,function(){var r,t,n;return f(this,function(e){switch(e.label){case 0:return[4,ee(i,function(e){var t=function(e){return ie(e||{fid:W(),registrationStatus:0})}(e),n=function(e,t){{if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:function(n){return c(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return[4,re(n)];case 1:t=e.sent(),e.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,B(100)];case 3:return e.sent(),[4,re(n)];case 4:return t=e.sent(),[3,2];case 5:if(0===t.registrationStatus)throw x.create("create-installation-failed");return[2,t]}})})}(e)}:{installationEntry:t};if(!navigator.onLine){var n=Promise.reject(x.create("app-offline"));return{installationEntry:t,registrationPromise:n}}var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=function(r,i){return c(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,function(s,e){var u=e.fid;return c(this,void 0,void 0,function(){var t,n,r,i,o,a;return f(this,function(e){switch(e.label){case 0:return t=F(s),n=V(s),r={fid:u,authVersion:k,appId:s.appId,sdkVersion:N},i={method:"POST",headers:n,body:JSON.stringify(r)},[4,K(function(){return fetch(t,i)})];case 1:return(o=e.sent()).ok?[4,o.json()]:[3,3];case 2:return a=e.sent(),[2,{fid:a.fid||u,registrationStatus:2,refreshToken:a.refreshToken,authToken:R(a.authToken)}];case 3:return[4,G("Create Installation",o)];case 4:throw e.sent()}})})}(r,i)];case 1:return t=e.sent(),[2,Q(r,t)];case 2:return D(n=e.sent())&&409===n.serverCode?[4,Z(r)]:[3,4];case 3:return e.sent(),[3,6];case 4:return[4,Q(r,{fid:i.fid,registrationStatus:0})];case 5:e.sent(),e.label=6;case 6:throw n;case 7:return[2]}})})}(e,r);return{installationEntry:r,registrationPromise:i}}}(i,t);return r=n.registrationPromise,n.installationEntry})];case 1:return(t=e.sent()).fid!==H?[3,3]:(n={},[4,r]);case 2:return[2,(n.installationEntry=e.sent(),n)];case 3:return[2,{installationEntry:t,registrationPromise:r}]}})})}function re(e){return ee(e,function(e){if(!e)throw x.create("installation-not-found");return ie(e)})}function ie(e){return function(e){return 1===e.registrationStatus&&e.registrationTime+O<Date.now()}(e)?{fid:e.fid,registrationStatus:0}:e}function oe(s,u){return c(this,void 0,void 0,function(){var t,n,r,i,o,a;return f(this,function(e){switch(e.label){case 0:return t=function(e,t){var n=t.fid;return F(e)+"/"+n+"/authTokens:generate"}(s,u),n=L(s,u),r={installation:{sdkVersion:N}},i={method:"POST",headers:n,body:JSON.stringify(r)},[4,K(function(){return fetch(t,i)})];case 1:return(o=e.sent()).ok?[4,o.json()]:[3,3];case 2:return a=e.sent(),[2,R(a)];case 3:return[4,G("Generate Auth Token",o)];case 4:throw e.sent()}})})}function ae(i,o){return void 0===o&&(o=!1),c(this,void 0,void 0,function(){var r,t,n;return f(this,function(e){switch(e.label){case 0:return[4,ee(i,function(e){if(!ue(e))throw x.create("not-registered");var t=e.authToken;if(!o&&function(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+j}(e)}(t))return e;if(1===t.requestStatus)return r=function(r){return c(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return[4,se(r)];case 1:t=e.sent(),e.label=2;case 2:return 1!==t.authToken.requestStatus?[3,5]:[4,B(100)];case 3:return e.sent(),[4,se(r)];case 4:return t=e.sent(),[3,2];case 5:if(0===(n=t.authToken).requestStatus)throw x.create("generate-token-failed");return[2,n]}})})}(i),e;if(!navigator.onLine)throw x.create("app-offline");var n=function(e){var t={requestStatus:1,requestTime:Date.now()};return s(s({},e),{authToken:t})}(e);return r=function(i,o){return c(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,8]),[4,oe(i,o)];case 1:return t=e.sent(),r=s(s({},o),{authToken:t}),[4,Q(i,r)];case 2:return e.sent(),[2,t];case 3:return!D(n=e.sent())||401!==n.serverCode&&404!==n.serverCode?[3,5]:[4,Z(i)];case 4:return e.sent(),[3,7];case 5:return r=s(s({},o),{authToken:{requestStatus:0}}),[4,Q(i,r)];case 6:e.sent(),e.label=7;case 7:throw n;case 8:return[2]}})})}(i,n),n})];case 1:return t=e.sent(),r?[4,r]:[3,3];case 2:return n=e.sent(),[3,4];case 3:n=t.authToken,e.label=4;case 4:return[2,n.token]}})})}function se(e){return ee(e,function(e){if(!ue(e))throw x.create("not-registered");return function(e){return 1===e.requestStatus&&e.requestTime+O<Date.now()}(e.authToken)?s(s({},e),{authToken:{requestStatus:0}}):e})}function ue(e){return void 0!==e&&2===e.registrationStatus}function ce(n,r){return void 0===r&&(r=!1),c(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return[4,function(i){return c(this,void 0,void 0,function(){var t,n,r;return f(this,function(e){switch(e.label){case 0:return[4,ne(i)];case 1:return t=e.sent(),n=t.installationEntry,(r=t.registrationPromise)?[4,r]:[3,3];case 2:return e.sent(),[3,4];case 3:if(2!==n.registrationStatus)throw x.create("create-installation-failed");e.label=4;case 4:return[2]}})})}(t=q(n))];case 1:return e.sent(),[2,ae(t,r)]}})})}function fe(o,a){return c(this,void 0,void 0,function(){var t,n,r,i;return f(this,function(e){switch(e.label){case 0:return t=function(e,t){var n=t.fid;return F(e)+"/"+n}(o,a),n=L(o,a),r={method:"DELETE",headers:n},[4,K(function(){return fetch(t,r)})];case 1:return(i=e.sent()).ok?[3,3]:[4,G("Delete Installation",i)];case 2:throw e.sent();case 3:return[2]}})})}je.INTERNAL.registerService("installations",function(t){return q(t),{app:t,getId:function(){return function(o){return c(this,void 0,void 0,function(){var t,n,r,i;return f(this,function(e){switch(e.label){case 0:return[4,ne(t=q(o))];case 1:return n=e.sent(),r=n.installationEntry,(i=n.registrationPromise)&&i.catch(function(){}),2===r.registrationStatus&&ae(t).catch(function(){}),[2,r.fid]}})})}(t)},getToken:function(e){return ce(t,e)},delete:function(){return function(r){return c(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return[4,ee(t=q(r),function(e){if(!e||0!==e.registrationStatus)return e})];case 1:if(!(n=e.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw x.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw x.create("app-offline");case 3:return[4,fe(t,n)];case 4:return e.sent(),[4,Z(t)];case 5:e.sent(),e.label=6;case 6:return[2]}})})}(t)}}});var le,de,pe,he,ve,ge="measurementId",ye="firebase_id",we="origin";function be(e){return Array.isArray(window[e])}function _e(e,n,t){var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window[n].push(arguments)};return window[t]&&"function"==typeof window[t]&&(r=window[t]),window[t]=function(d,p){return function(e,t,n){if(e===le.EVENT){var r=[];if(n&&n.send_to){var i=n.send_to;Array.isArray(i)||(i=[i]);for(var o=0,a=i;o<a.length;o++){var s=a[o],u=p[s];if(!u){r=[];break}r.push(u)}}if(0===r.length)for(var c=0,f=Object.values(p);c<f.length;c++){var l=f[c];r.push(l)}Promise.all(r).then(function(){return d(le.EVENT,t,n||{})}).catch(function(e){return console.error(e)})}else if(e===le.CONFIG){(p[t]||Promise.resolve()).then(function(){d(le.CONFIG,t,n)}).catch(function(e){return console.error(e)})}else d(le.SET,t)}}(r,e),{gtagCore:r,wrappedGtag:window[t]}}(de=le=le||{}).EVENT="event",de.SET="set",de.CONFIG="config",(he=pe=pe||{}).ADD_PAYMENT_INFO="add_payment_info",he.ADD_TO_CART="add_to_cart",he.ADD_TO_WISHLIST="add_to_wishlist",he.BEGIN_CHECKOUT="begin_checkout",he.CHECKOUT_PROGRESS="checkout_progress",he.EXCEPTION="exception",he.GENERATE_LEAD="generate_lead",he.LOGIN="login",he.PAGE_VIEW="page_view",he.PURCHASE="purchase",he.REFUND="refund",he.REMOVE_FROM_CART="remove_from_cart",he.SCREEN_VIEW="screen_view",he.SEARCH="search",he.SELECT_CONTENT="select_content",he.SET_CHECKOUT_OPTION="set_checkout_option",he.SHARE="share",he.SIGN_UP="sign_up",he.TIMING_COMPLETE="timing_complete",he.VIEW_ITEM="view_item",he.VIEW_ITEM_LIST="view_item_list",he.VIEW_PROMOTION="view_promotion",he.VIEW_SEARCH_RESULTS="view_search_results";var me,Ee,Se=((ve={})["no-ga-id"]='"'+ge+'" field is empty in Firebase config. Firebase Analytics requires this field to contain a valid measurement ID.',ve["already-exists"]="A Firebase Analytics instance with the measurement ID ${id} already exists. Only one Firebase Analytics instance can be created for each measurement ID.",ve["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",ve),Ie=new u("analytics","Analytics",Se),Te={},Ce="dataLayer",Oe="gtag",Ne=!1;function ke(e){if(Ne)throw Ie.create("already-initialized");e.dataLayerName&&(Ce=e.dataLayerName),e.gtagName&&(Oe=e.gtagName)}function Ae(t,e){if(!t.options[ge])throw Ie.create("no-ga-id");var r=t.options[ge];if(null!=Te[r])throw Ie.create("already-exists",{id:r});if(!Ne){be(Ce)||function(e){var t=document.createElement("script");t.src="https://www.googletagmanager.com/gtag/js?l="+e,t.async=!0,document.head.appendChild(t)}(Ce),function(e){be(e)?window[e]:window[e]=[]}(Ce);var n=_e(Te,Ce,Oe),i=n.wrappedGtag,o=n.gtagCore;Ee=i,me=o,Ne=!0}Te[r]=function(r,i){return c(this,void 0,void 0,function(){var t,n;return f(this,function(e){switch(e.label){case 0:return[4,r.installations().getId()];case 1:return t=e.sent(),i("js",new Date),i(le.CONFIG,r.options[ge],((n={})[ye]=t,n[we]="firebase",n.update=!0,n)),[2]}})})}(t,me);var a={app:t,logEvent:function(e,t,n){return function(e,t,n,r,i){var o=r||{};i&&i.global||(o=s(s({},r),{send_to:t})),e(le.EVENT,n,o||{})}(Ee,r,e,t,n)},setCurrentScreen:function(e,t){return function(e,t,n,r){r&&r.global?e(le.SET,{screen_name:n}):e(le.CONFIG,t,{update:!0,screen_name:n})}(Ee,r,e,t)},setUserId:function(e,t){return function(e,t,n,r){r&&r.global?e(le.SET,{user_id:n}):e(le.CONFIG,t,{update:!0,user_id:n})}(Ee,r,e,t)},setUserProperties:function(e,t){return function(e,t,n,r){if(r&&r.global){for(var i={},o=0,a=Object.keys(n);o<a.length;o++){var s=a[o];i["user_properties."+s]=n[s]}e(le.SET,i)}else e(le.CONFIG,t,{update:!0,user_properties:n})}(Ee,r,e,t)},setAnalyticsCollectionEnabled:function(e){return function(e,t){window["ga-disable-"+e]=!t}(t.options[ge],e)}};return e({INTERNAL:{analytics:{logEvent:a.logEvent}}}),a}je.INTERNAL.registerService("analytics",Ae,{settings:ke,EventName:pe},void 0,!1)}).apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-analytics - be sure to load firebase-app.js first.")}});
2
+ //# sourceMappingURL=firebase-analytics.js.map
1v1.lol/firebase/firebase-app.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).firebase=t()}(this,function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function v(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)t.hasOwnProperty(r)&&(e[r]=v(e[r],t[r]));return e}var e,t,i,f=(i=Error,r(e=s,t=i),void(e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)),s);function o(){this.constructor=e}function s(e,t){var r=i.call(this,t)||this;return r.code=e,r.name="FirebaseError",Object.setPrototypeOf(r,s.prototype),Error.captureStackTrace&&Error.captureStackTrace(r,a.prototype.create),r}var a=(c.prototype.create=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=t[0]||{},i=this.service+"/"+e,o=this.errors[e],s=o?function(e,n){return e.replace(h,function(e,t){var r=n[t];return null!=r?r.toString():"<"+t+"?>"})}(o,n):"Error",a=this.serviceName+": "+s+" ("+i+").",c=new f(i,a),l=0,p=Object.keys(n);l<p.length;l++){var u=p[l];"_"!==u.slice(-1)&&(u in c&&console.warn('Overwriting FirebaseError base field "'+u+'" can cause unexpected behavior.'),c[u]=n[u])}return c},c);function c(e,t,r){this.service=e,this.serviceName=t,this.errors=r}var h=/\{\$([^}]+)}/g;function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){var r=new b(e,t);return r.subscribe.bind(r)}var p,u,b=(y.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},y.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},y.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},y.prototype.subscribe=function(e,t,r){var n,i=this;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");void 0===(n=function(e,t){if("object"!=typeof e||null===e)return!1;for(var r=0,n=t;r<n.length;r++){var i=n[r];if(i in e&&"function"==typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r}).next&&(n.next=g),void 0===n.error&&(n.error=g),void 0===n.complete&&(n.complete=g);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?n.error(i.finalError):n.complete()}catch(e){}}),this.observers.push(n),o},y.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},y.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},y.prototype.sendOne=function(e,t){var r=this;this.task.then(function(){if(void 0!==r.observers&&void 0!==r.observers[e])try{t(r.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},y.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},y);function y(e,t){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(r)}).catch(function(e){r.error(e)})}function g(){}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}(u=p=p||{})[u.DEBUG=0]="DEBUG",u[u.VERBOSE=1]="VERBOSE",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.SILENT=5]="SILENT";function _(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!(t<e.logLevel)){var i=(new Date).toISOString();switch(t){case p.DEBUG:case p.VERBOSE:console.log.apply(console,m(["["+i+"] "+e.name+":"],r));break;case p.INFO:console.info.apply(console,m(["["+i+"] "+e.name+":"],r));break;case p.WARN:console.warn.apply(console,m(["["+i+"] "+e.name+":"],r));break;case p.ERROR:console.error.apply(console,m(["["+i+"] "+e.name+":"],r));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")")}}}var E,N=p.INFO,O=(Object.defineProperty(A.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in p))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(A.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,m([this,p.DEBUG],e))},A.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,m([this,p.VERBOSE],e))},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,m([this,p.INFO],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,m([this,p.WARN],e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,m([this,p.ERROR],e))},A);function A(e){this.name=e,this._logLevel=N,this._logHandler=_}var k=((E={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",E["bad-app-name"]="Illegal App name: '{$appName}",E["duplicate-app"]="Firebase App named '{$appName}' already exists",E["app-deleted"]="Firebase App named '{$appName}' already deleted",E["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",E),w=new a("app","Firebase",k),R="[DEFAULT]",L=(Object.defineProperty(T.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),T.prototype.delete=function(){var a=this;return new Promise(function(e){a.checkDestroyed_(),e()}).then(function(){a.firebase_.INTERNAL.removeApp(a.name_);for(var e=[],t=0,r=Object.keys(a.services_);t<r.length;t++)for(var n=r[t],i=0,o=Object.keys(a.services_[n]);i<o.length;i++){var s=o[i];e.push(a.services_[n][s])}return Promise.all(e.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))}).then(function(){a.isDeleted_=!0,a.services_={}})},T.prototype._getService=function(e,t){if(void 0===t&&(t=R),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var r=t!==R?t:void 0,n=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),r);this.services_[e][t]=n}return this.services_[e][t]},T.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=R),this.services_[e]&&this.services_[e][t]&&delete this.services_[e][t]},T.prototype.extendApp=function(e){if(v(this,e),e.INTERNAL){if(e.INTERNAL.addAuthTokenListener){for(var t=0,r=this.tokenListeners_;t<r.length;t++){var n=r[t];this.INTERNAL.addAuthTokenListener(n)}this.tokenListeners_=[]}if(e.INTERNAL.analytics){for(var i=0,o=this.analyticsEventRequests_;i<o.length;i++){var s=o[i];this.INTERNAL.analytics.logEvent.apply(void 0,s)}this.analyticsEventRequests_=[]}}},T.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw w.create("app-deleted",{appName:this.name_})},T);function T(e,t,r){var n=this;this.firebase_=r,this.isDeleted_=!1,this.services_={},this.tokenListeners_=[],this.analyticsEventRequests_=[],this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=function(e){return v(void 0,e)}(e);var i=this;this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){n.tokenListeners_.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(t){n.tokenListeners_=n.tokenListeners_.filter(function(e){return e!==t})},analytics:{logEvent:function(){i.analyticsEventRequests_.push(arguments)}}}}L.prototype.name&&L.prototype.options||L.prototype.delete||console.log("dc");var I="7.2.1",j=new O("@firebase/app");function D(s){var o={},a={},c={},l={__esModule:!0,initializeApp:function(e,t){void 0===t&&(t={});if("object"!=typeof t||null===t){t={name:t}}var r=t;void 0===r.name&&(r.name=R);var n=r.name;if("string"!=typeof n||!n)throw w.create("bad-app-name",{appName:String(n)});if(d(o,n))throw w.create("duplicate-app",{appName:n});var i=new s(e,r,l);return f(o[n]=i,"create"),i},app:p,apps:null,SDK_VERSION:I,INTERNAL:{registerService:function(r,e,t,n,i){void 0===i&&(i=!1);if(a[r])return j.debug("There were multiple attempts to register service "+r+"."),l[r];a[r]=e,n&&(c[r]=n,u().forEach(function(e){n("create",e)}));function o(e){if(void 0===e&&(e=p()),"function"!=typeof e[r])throw w.create("invalid-app-argument",{appName:r});return e[r]()}void 0!==t&&v(o,t);return l[r]=o,s.prototype[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,r).apply(this,i?e:[])},o},removeApp:function(e){f(o[e],"delete"),delete o[e]},factories:a,useAsService:h}};function p(e){if(!d(o,e=e||R))throw w.create("no-app",{appName:e});return o[e]}function u(){return Object.keys(o).map(function(e){return o[e]})}function f(e,t){for(var r=0,n=Object.keys(a);r<n.length;r++){var i=h(e,n[r]);if(null===i)return;c[i]&&c[i](t,e)}}function h(e,t){return"serverAuth"===t?null:t}return l.default=l,Object.defineProperty(l,"apps",{get:u}),p.App=s,l}if("object"==typeof self&&self.self===self&&void 0!==self.firebase){j.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var F=self.firebase.SDK_VERSION;F&&0<=F.indexOf("LITE")&&j.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var S=function e(){var t=D(L);return t.INTERNAL=n(n({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){v(t,e)},createSubscribe:l,ErrorFactory:a,deepExtend:v}),t}(),P=S.initializeApp;return S.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return!1}}()&&j.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n '),P.apply(void 0,e)},S});
2
+ //# sourceMappingURL=firebase-app.js.map
1v1.lol/firebase/firebase-auth.js ADDED
The diff for this file is too large to render. See raw diff
 
1v1.lol/firebase/firebase-firestore.js ADDED
The diff for this file is too large to render. See raw diff
 
1v1.lol/firebase/firebase-remote-config.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],e):e((t=t||self).firebase)}(this,function(zt){"use strict";try{(function(){zt=zt&&zt.hasOwnProperty("default")?zt.default:zt;var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var s=function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function u(o,s,a,c){return new(a=a||Promise)(function(t,e){function r(t){try{i(c.next(t))}catch(t){e(t)}}function n(t){try{i(c.throw(t))}catch(t){e(t)}}function i(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(r,n)}i((c=c.apply(o,s||[])).next())})}function _(r,n){var i,o,s,t,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(r,a)}catch(t){e=[6,t],o=0}finally{i=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function n(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}var t,e,i,h=(i=Error,r(t=a,e=i),void(t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)),a);function o(){this.constructor=t}function a(t,e){var r=i.call(this,e)||this;return r.code=t,r.name="FirebaseError",Object.setPrototypeOf(r,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(r,c.prototype.create),r}var c=(l.prototype.create=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=e[0]||{},i=this.service+"/"+t,o=this.errors[t],s=o?function(t,n){return t.replace(p,function(t,e){var r=n[e];return null!=r?r.toString():"<"+e+"?>"})}(o,n):"Error",a=this.serviceName+": "+s+" ("+i+").",c=new h(i,a),u=0,l=Object.keys(n);u<l.length;u++){var f=l[u];"_"!==f.slice(-1)&&(f in c&&console.warn('Overwriting FirebaseError base field "'+f+'" can cause unexpected behavior.'),c[f]=n[f])}return c},l);function l(t,e,r){this.service=t,this.serviceName=e,this.errors=r}var p=/\{\$([^}]+)}/g;function f(r){return new Promise(function(t,e){r.onsuccess=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function g(r,n,i){var o,t=new Promise(function(t,e){f(o=r[n].apply(r,i)).then(t,e)});return t.request=o,t}function d(t,r,e){e.forEach(function(e){Object.defineProperty(t.prototype,e,{get:function(){return this[r][e]},set:function(t){this[r][e]=t}})})}function v(e,r,n,t){t.forEach(function(t){t in n.prototype&&(e.prototype[t]=function(){return g(this[r],t,arguments)})})}function m(e,r,n,t){t.forEach(function(t){t in n.prototype&&(e.prototype[t]=function(){return this[r][t].apply(this[r],arguments)})})}function y(e,r,n,t){t.forEach(function(t){t in n.prototype&&(e.prototype[t]=function(){return function(t,e,r){var n=g(t,e,r);return n.then(function(t){if(t)return new w(t,n.request)})}(this[r],t,arguments)})})}function b(t){this._index=t}function w(t,e){this._cursor=t,this._request=e}function S(t){this._store=t}function E(r){this._tx=r,this.complete=new Promise(function(t,e){r.oncomplete=function(){t()},r.onerror=function(){e(r.error)},r.onabort=function(){e(r.error)}})}function T(t,e,r){this._db=t,this.oldVersion=e,this.transaction=new E(r)}function C(t){this._db=t}d(b,"_index",["name","keyPath","multiEntry","unique"]),v(b,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),y(b,"_index",IDBIndex,["openCursor","openKeyCursor"]),d(w,"_cursor",["direction","key","primaryKey","value"]),v(w,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(r){r in IDBCursor.prototype&&(w.prototype[r]=function(){var e=this,t=arguments;return Promise.resolve().then(function(){return e._cursor[r].apply(e._cursor,t),f(e._request).then(function(t){if(t)return new w(t,e._request)})})})}),S.prototype.createIndex=function(){return new b(this._store.createIndex.apply(this._store,arguments))},S.prototype.index=function(){return new b(this._store.index.apply(this._store,arguments))},d(S,"_store",["name","keyPath","indexNames","autoIncrement"]),v(S,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),y(S,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),m(S,"_store",IDBObjectStore,["deleteIndex"]),E.prototype.objectStore=function(){return new S(this._tx.objectStore.apply(this._tx,arguments))},d(E,"_tx",["objectStoreNames","mode"]),m(E,"_tx",IDBTransaction,["abort"]),T.prototype.createObjectStore=function(){return new S(this._db.createObjectStore.apply(this._db,arguments))},d(T,"_db",["name","version","objectStoreNames"]),m(T,"_db",IDBDatabase,["deleteObjectStore","close"]),C.prototype.transaction=function(){return new E(this._db.transaction.apply(this._db,arguments))},d(C,"_db",["name","version","objectStoreNames"]),m(C,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(i){[S,b].forEach(function(t){i in t.prototype&&(t.prototype[i.replace("open","iterate")]=function(){var t=function(t){return Array.prototype.slice.call(t)}(arguments),e=t[t.length-1],r=this._store||this._index,n=r[i].apply(r,t.slice(0,-1));n.onsuccess=function(){e(n.result)}})})}),[b,S].forEach(function(t){t.prototype.getAll||(t.prototype.getAll=function(t,r){var n=this,i=[];return new Promise(function(e){n.iterateCursor(t,function(t){t?(i.push(t.value),void 0===r||i.length!=r?t.continue():e(i)):e(i)})})})});var I,k=1e4,O="w:0.3.1",F="FIS_v2",M="https://firebaseinstallations.googleapis.com/v1",P=36e5,j=((I={})["missing-app-config-values"]="Missing App configuration values.",I["create-installation-failed"]="Could not register Firebase Installation.",I["generate-token-failed"]="Could not generate Auth Token.",I["not-registered"]="Firebase Installation is not registered.",I["installation-not-found"]="Firebase Installation not found.",I["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',I["app-offline"]="Could not process request. Application offline.",I["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",I),A=new c("installations","Installations",j);function L(t){return t instanceof h&&t.code.includes("request-failed")}function N(t){if(!t||!t.options)throw A.create("missing-app-config-values");var e=t.name,r=t.options,n=r.projectId,i=r.apiKey,o=r.appId;if(!(e&&n&&i&&o))throw A.create("missing-app-config-values");return{appName:e,projectId:n,apiKey:i,appId:o}}function D(t){var e=t.projectId;return M+"/projects/"+e+"/installations"}function x(t){return{token:t.token,requestStatus:2,expiresIn:function(t){return Number(t.replace("s","000"))}(t.expiresIn),creationTime:Date.now()}}function R(n,i){return u(this,void 0,void 0,function(){var e,r;return _(this,function(t){switch(t.label){case 0:return[4,i.json()];case 1:return e=t.sent(),r=e.error,[2,A.create("request-failed",{requestName:n,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function q(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function B(t,e){var r=e.refreshToken,n=q(t);return n.append("Authorization",function(t){return F+" "+t}(r)),n}function K(r){return u(this,void 0,void 0,function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,r()];case 1:return 500<=(e=t.sent()).status&&e.status<600?[2,r()]:[2,e]}})})}function V(e){return new Promise(function(t){setTimeout(t,e)})}function z(t){return btoa(String.fromCharCode.apply(String,function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}(t))).replace(/\+/g,"-").replace(/\//g,"_")}var H=/^[cdef][\w-]{21}$/,$="";function U(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){return z(t).substr(0,22)}(t);return H.test(e)?e:$}catch(t){return $}}var G,W,J="firebase-installations-database",Y=1,Q="firebase-installations-store",X=null;function Z(){return X=X||function(t,e,r){var n=g(indexedDB,"open",[t,e]),i=n.request;return i&&(i.onupgradeneeded=function(t){r&&r(new T(i.result,t.oldVersion,i.transaction))}),n.then(function(t){return new C(t)})}(J,Y,function(t){switch(t.oldVersion){case 0:t.createObjectStore(Q)}})}function tt(i,o){return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return e=nt(i),[4,Z()];case 1:return r=t.sent(),[4,(n=r.transaction(Q,"readwrite")).objectStore(Q).put(o,e)];case 2:return t.sent(),[4,n.complete];case 3:return t.sent(),[2,o]}})})}function et(i){return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return e=nt(i),[4,Z()];case 1:return r=t.sent(),[4,(n=r.transaction(Q,"readwrite")).objectStore(Q).delete(e)];case 2:return t.sent(),[4,n.complete];case 3:return t.sent(),[2]}})})}function rt(a,c){return u(this,void 0,void 0,function(){var e,r,n,i,o,s;return _(this,function(t){switch(t.label){case 0:return e=nt(a),[4,Z()];case 1:return r=t.sent(),n=r.transaction(Q,"readwrite"),[4,(i=n.objectStore(Q)).get(e)];case 2:return o=t.sent(),void 0!==(s=c(o))?[3,4]:[4,i.delete(e)];case 3:return t.sent(),[3,6];case 4:return[4,i.put(s,e)];case 5:t.sent(),t.label=6;case 6:return[4,n.complete];case 7:return t.sent(),[2,s]}})})}function nt(t){return t.appName+"!"+t.appId}function it(i){return u(this,void 0,void 0,function(){var n,e,r;return _(this,function(t){switch(t.label){case 0:return[4,rt(i,function(t){var e=function(t){return st(t||{fid:U(),registrationStatus:0})}(t),r=function(t,e){{if(0!==e.registrationStatus)return 1===e.registrationStatus?{installationEntry:e,registrationPromise:function(r){return u(this,void 0,void 0,function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,ot(r)];case 1:e=t.sent(),t.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,V(100)];case 3:return t.sent(),[4,ot(r)];case 4:return e=t.sent(),[3,2];case 5:if(0===e.registrationStatus)throw A.create("create-installation-failed");return[2,e]}})})}(t)}:{installationEntry:e};if(!navigator.onLine){var r=Promise.reject(A.create("app-offline"));return{installationEntry:e,registrationPromise:r}}var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},i=function(n,i){return u(this,void 0,void 0,function(){var e,r;return _(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,7]),[4,function(a,t){var c=t.fid;return u(this,void 0,void 0,function(){var e,r,n,i,o,s;return _(this,function(t){switch(t.label){case 0:return e=D(a),r=q(a),n={fid:c,authVersion:F,appId:a.appId,sdkVersion:O},i={method:"POST",headers:r,body:JSON.stringify(n)},[4,K(function(){return fetch(e,i)})];case 1:return(o=t.sent()).ok?[4,o.json()]:[3,3];case 2:return s=t.sent(),[2,{fid:s.fid||c,registrationStatus:2,refreshToken:s.refreshToken,authToken:x(s.authToken)}];case 3:return[4,R("Create Installation",o)];case 4:throw t.sent()}})})}(n,i)];case 1:return e=t.sent(),[2,tt(n,e)];case 2:return L(r=t.sent())&&409===r.serverCode?[4,et(n)]:[3,4];case 3:return t.sent(),[3,6];case 4:return[4,tt(n,{fid:i.fid,registrationStatus:0})];case 5:t.sent(),t.label=6;case 6:throw r;case 7:return[2]}})})}(t,n);return{installationEntry:n,registrationPromise:i}}}(i,e);return n=r.registrationPromise,r.installationEntry})];case 1:return(e=t.sent()).fid!==$?[3,3]:(r={},[4,n]);case 2:return[2,(r.installationEntry=t.sent(),r)];case 3:return[2,{installationEntry:e,registrationPromise:n}]}})})}function ot(t){return rt(t,function(t){if(!t)throw A.create("installation-not-found");return st(t)})}function st(t){return function(t){return 1===t.registrationStatus&&t.registrationTime+k<Date.now()}(t)?{fid:t.fid,registrationStatus:0}:t}function at(a,c){return u(this,void 0,void 0,function(){var e,r,n,i,o,s;return _(this,function(t){switch(t.label){case 0:return e=function(t,e){var r=e.fid;return D(t)+"/"+r+"/authTokens:generate"}(a,c),r=B(a,c),n={installation:{sdkVersion:O}},i={method:"POST",headers:r,body:JSON.stringify(n)},[4,K(function(){return fetch(e,i)})];case 1:return(o=t.sent()).ok?[4,o.json()]:[3,3];case 2:return s=t.sent(),[2,x(s)];case 3:return[4,R("Generate Auth Token",o)];case 4:throw t.sent()}})})}function ct(i,o){return void 0===o&&(o=!1),u(this,void 0,void 0,function(){var n,e,r;return _(this,function(t){switch(t.label){case 0:return[4,rt(i,function(t){if(!lt(t))throw A.create("not-registered");var e=t.authToken;if(!o&&function(t){return 2===t.requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+P}(t)}(e))return t;if(1===e.requestStatus)return n=function(n){return u(this,void 0,void 0,function(){var e,r;return _(this,function(t){switch(t.label){case 0:return[4,ut(n)];case 1:e=t.sent(),t.label=2;case 2:return 1!==e.authToken.requestStatus?[3,5]:[4,V(100)];case 3:return t.sent(),[4,ut(n)];case 4:return e=t.sent(),[3,2];case 5:if(0===(r=e.authToken).requestStatus)throw A.create("generate-token-failed");return[2,r]}})})}(i),t;if(!navigator.onLine)throw A.create("app-offline");var r=function(t){var e={requestStatus:1,requestTime:Date.now()};return s(s({},t),{authToken:e})}(t);return n=function(i,o){return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,8]),[4,at(i,o)];case 1:return e=t.sent(),n=s(s({},o),{authToken:e}),[4,tt(i,n)];case 2:return t.sent(),[2,e];case 3:return!L(r=t.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,et(i)];case 4:return t.sent(),[3,7];case 5:return n=s(s({},o),{authToken:{requestStatus:0}}),[4,tt(i,n)];case 6:t.sent(),t.label=7;case 7:throw r;case 8:return[2]}})})}(i,r),r})];case 1:return e=t.sent(),n?[4,n]:[3,3];case 2:return r=t.sent(),[3,4];case 3:r=e.authToken,t.label=4;case 4:return[2,r.token]}})})}function ut(t){return rt(t,function(t){if(!lt(t))throw A.create("not-registered");return function(t){return 1===t.requestStatus&&t.requestTime+k<Date.now()}(t.authToken)?s(s({},t),{authToken:{requestStatus:0}}):t})}function lt(t){return void 0!==t&&2===t.registrationStatus}function ft(r,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,function(i){return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return[4,it(i)];case 1:return e=t.sent(),r=e.installationEntry,(n=e.registrationPromise)?[4,n]:[3,3];case 2:return t.sent(),[3,4];case 3:if(2!==r.registrationStatus)throw A.create("create-installation-failed");t.label=4;case 4:return[2]}})})}(e=N(r))];case 1:return t.sent(),[2,ct(e,n)]}})})}function ht(o,s){return u(this,void 0,void 0,function(){var e,r,n,i;return _(this,function(t){switch(t.label){case 0:return e=function(t,e){var r=e.fid;return D(t)+"/"+r}(o,s),r=B(o,s),n={method:"DELETE",headers:r},[4,K(function(){return fetch(e,n)})];case 1:return(i=t.sent()).ok?[3,3]:[4,R("Delete Installation",i)];case 2:throw t.sent();case 3:return[2]}})})}function pt(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}zt.INTERNAL.registerService("installations",function(e){return N(e),{app:e,getId:function(){return function(o){return u(this,void 0,void 0,function(){var e,r,n,i;return _(this,function(t){switch(t.label){case 0:return[4,it(e=N(o))];case 1:return r=t.sent(),n=r.installationEntry,(i=r.registrationPromise)&&i.catch(function(){}),2===n.registrationStatus&&ct(e).catch(function(){}),[2,n.fid]}})})}(e)},getToken:function(t){return ft(e,t)},delete:function(){return function(n){return u(this,void 0,void 0,function(){var e,r;return _(this,function(t){switch(t.label){case 0:return[4,rt(e=N(n),function(t){if(!t||0!==t.registrationStatus)return t})];case 1:if(!(r=t.sent()))return[3,6];if(1!==r.registrationStatus)return[3,2];throw A.create("delete-pending-registration");case 2:if(2!==r.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw A.create("app-offline");case 3:return[4,ht(e,r)];case 4:return t.sent(),[4,et(e)];case 5:t.sent(),t.label=6;case 6:return[2]}})})}(e)}}}),(W=G=G||{})[W.DEBUG=0]="DEBUG",W[W.VERBOSE=1]="VERBOSE",W[W.INFO=2]="INFO",W[W.WARN=3]="WARN",W[W.ERROR=4]="ERROR",W[W.SILENT=5]="SILENT";function gt(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!(e<t.logLevel)){var i=(new Date).toISOString();switch(e){case G.DEBUG:case G.VERBOSE:console.log.apply(console,pt(["["+i+"] "+t.name+":"],r));break;case G.INFO:console.info.apply(console,pt(["["+i+"] "+t.name+":"],r));break;case G.WARN:console.warn.apply(console,pt(["["+i+"] "+t.name+":"],r));break;case G.ERROR:console.error.apply(console,pt(["["+i+"] "+t.name+":"],r));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}}var dt=G.INFO,vt=(Object.defineProperty(mt.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in G))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(mt.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),mt.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,pt([this,G.DEBUG],t))},mt.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,pt([this,G.VERBOSE],t))},mt.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,pt([this,G.INFO],t))},mt.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,pt([this,G.WARN],t))},mt.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,pt([this,G.ERROR],t))},mt);function mt(t){this.name=t,this._logLevel=dt,this._logHandler=gt}var yt,bt=(wt.prototype.isCachedDataFresh=function(t,e){if(!e)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var r=Date.now()-e,n=r<=t;return this.logger.debug("Config fetch cache check. Cache age millis: "+r+". Cache max age millis (minimumFetchIntervalMillis setting): "+t+". Is cache hit: "+n+"."),n},wt.prototype.fetch=function(s){return u(this,void 0,void 0,function(){var e,r,n,i,o;return _(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return e=t.sent(),r=e[0],(n=e[1])&&this.isCachedDataFresh(s.cacheMaxAgeMillis,r)?[2,n]:(s.eTag=n&&n.eTag,[4,this.client.fetch(s)]);case 2:return i=t.sent(),o=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===i.status&&o.push(this.storage.setLastSuccessfulFetchResponse(i)),[4,Promise.all(o)];case 3:return t.sent(),[2,i]}})})},wt);function wt(t,e,r,n){this.client=t,this.storage=e,this.storageCache=r,this.logger=n}var _t=((yt={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",yt["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",yt["registration-api-key"]="Undefined API key. Check Firebase app initialization.",yt["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",yt["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",yt["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",yt["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",yt["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",yt["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",yt["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',yt["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',yt["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",yt["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",yt),St=new c("remoteconfig","Remote Config",_t);var Et=(Tt.prototype.fetch=function(w){return u(this,void 0,void 0,function(){var e,r,n,i,o,s,a,c,u,l,f,h,p,g,d,v,m,y,b;return _(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:e=t.sent(),r=e[0],n=e[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?key="+this.apiKey,s={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":w.eTag||"*"},a={sdk_version:this.sdkVersion,app_instance_id:r,app_instance_id_token:n,app_id:this.appId,language_code:function(t){return void 0===t&&(t=navigator),t.languages&&t.languages[0]||t.language}()},c={method:"POST",headers:s,body:JSON.stringify(a)},u=fetch(o,c),l=new Promise(function(t,e){w.signal.addEventListener(function(){var t=new Error("The operation was aborted.");t.name="AbortError",e(t)})}),t.label=2;case 2:return t.trys.push([2,5,,6]),[4,Promise.race([u,l])];case 3:return t.sent(),[4,u];case 4:return f=t.sent(),[3,6];case 5:throw h=t.sent(),p="fetch-client-network","AbortError"===h.name&&(p="fetch-timeout"),St.create(p,{originalErrorMessage:h.message});case 6:if(g=f.status,d=f.headers.get("ETag")||void 0,200!==f.status)return[3,11];y=void 0,t.label=7;case 7:return t.trys.push([7,9,,10]),[4,f.json()];case 8:return y=t.sent(),[3,10];case 9:throw b=t.sent(),St.create("fetch-client-parse",{originalErrorMessage:b.message});case 10:v=y.entries,m=y.state,t.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===m?g=500:"NO_CHANGE"===m?g=304:"NO_TEMPLATE"!==m&&"EMPTY_CONFIG"!==m||(v={}),304!==g&&200!==g)throw St.create("fetch-status",{httpStatus:g});return[2,{status:g,eTag:d,config:v}]}})})},Tt);function Tt(t,e,r,n,i,o){this.firebaseInstallations=t,this.sdkVersion=e,this.namespace=r,this.projectId=n,this.apiKey=i,this.appId=o}var Ct=(It.prototype.addEventListener=function(t){this.listeners.push(t)},It.prototype.abort=function(){this.listeners.forEach(function(t){return t()})},It);function It(){this.listeners=[]}var kt=["1","true","t","yes","y","on"],Ot=(Ft.prototype.asString=function(){return this._value},Ft.prototype.asBoolean=function(){return"static"!==this._source&&0<=kt.indexOf(this._value.toLowerCase())},Ft.prototype.asNumber=function(){if("static"===this._source)return 0;var t=Number(this._value);return isNaN(t)&&(t=0),t},Ft.prototype.getSource=function(){return this._source},Ft);function Ft(t,e){void 0===e&&(e=""),this._source=t,this._value=e}var Mt=(Pt.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=G.DEBUG;break;case"silent":this._logger.logLevel=G.SILENT;break;default:this._logger.logLevel=G.ERROR}},Object.defineProperty(Pt.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!0,configurable:!0}),Object.defineProperty(Pt.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!0,configurable:!0}),Pt.prototype.activate=function(){return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return e=t.sent(),r=e[0],n=e[1],r&&r.config&&r.eTag&&r.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(r.config),this._storage.setActiveConfigEtag(r.eTag)])]:[2,!1];case 2:return t.sent(),[2,!0]}})})},Pt.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then(function(){t._isInitializationComplete=!0})),this._initializePromise},Pt.prototype.fetch=function(){return u(this,void 0,void 0,function(){var e=this;return _(this,function(t){return[2,new Promise(function(o,s){return u(e,void 0,void 0,function(){var e,r,n,i=this;return _(this,function(t){switch(t.label){case 0:e=new Ct,setTimeout(function(){return u(i,void 0,void 0,function(){return _(this,function(t){return e.abort(),[2]})})},this.settings.fetchTimeoutMillis),t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:e})];case 2:return t.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return t.sent(),o(),[3,6];case 4:return r=t.sent(),n=function(t,e){return t instanceof h&&-1!==t.code.indexOf(e)}(r,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:return t.sent(),s(r),[3,6];case 6:return[2]}})})})]})})},Pt.prototype.fetchAndActivate=function(){return u(this,void 0,void 0,function(){return _(this,function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}})})},Pt.prototype.getAll=function(){var r=this;return function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),Object.keys(s(s({},t),e))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce(function(t,e){return t[e]=r.getValue(e),t},{})},Pt.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},Pt.prototype.getNumber=function(t){return this.getValue(t).asNumber()},Pt.prototype.getString=function(t){return this.getValue(t).asString()},Pt.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var e=this._storageCache.getActiveConfig();return e&&void 0!==e[t]?new Ot("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new Ot("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new Ot("static"))},Pt);function Pt(t,e,r,n,i){this.app=t,this._client=e,this._storageCache=r,this._storage=n,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}function jt(t,e){var r=t.target.error||void 0;return St.create(e,{originalErrorMessage:r&&r.message})}var At="app_namespace_store",Lt="firebase_remote_config",Nt=1;var Dt=(xt.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},xt.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},xt.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},xt.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},xt.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},xt.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},xt.prototype.getActiveConfig=function(){return this.get("active_config")},xt.prototype.setActiveConfig=function(t){return this.set("active_config",t)},xt.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},xt.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},xt.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},xt.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},xt.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},xt.prototype.get=function(a){return u(this,void 0,void 0,function(){var o,s=this;return _(this,function(t){switch(t.label){case 0:return[4,this.openDbPromise];case 1:return o=t.sent(),[2,new Promise(function(r,e){var t=o.transaction([At],"readonly").objectStore(At),n=s.createCompositeKey(a);try{var i=t.get(n);i.onerror=function(t){e(jt(t,"storage-get"))},i.onsuccess=function(t){var e=t.target.result;r(e?e.value:void 0)}}catch(t){e(St.create("storage-get",{originalErrorMessage:t&&t.message}))}})]}})})},xt.prototype.set=function(a,c){return u(this,void 0,void 0,function(){var o,s=this;return _(this,function(t){switch(t.label){case 0:return[4,this.openDbPromise];case 1:return o=t.sent(),[2,new Promise(function(t,e){var r=o.transaction([At],"readwrite").objectStore(At),n=s.createCompositeKey(a);try{var i=r.put({compositeKey:n,value:c});i.onerror=function(t){e(jt(t,"storage-set"))},i.onsuccess=function(){t()}}catch(t){e(St.create("storage-set",{originalErrorMessage:t&&t.message}))}})]}})})},xt.prototype.delete=function(a){return u(this,void 0,void 0,function(){var o,s=this;return _(this,function(t){switch(t.label){case 0:return[4,this.openDbPromise];case 1:return o=t.sent(),[2,new Promise(function(t,e){var r=o.transaction([At],"readwrite").objectStore(At),n=s.createCompositeKey(a);try{var i=r.delete(n);i.onerror=function(t){e(jt(t,"storage-delete"))},i.onsuccess=function(){t()}}catch(t){e(St.create("storage-delete",{originalErrorMessage:t&&t.message}))}})]}})})},xt.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},xt);function xt(t,e,r,n){void 0===n&&(n=new Promise(function(e,r){var t=indexedDB.open(Lt,Nt);t.onerror=function(t){r(jt(t,"storage-open"))},t.onsuccess=function(t){e(t.target.result)},t.onupgradeneeded=function(t){var e=t.target.result;switch(t.oldVersion){case 0:e.createObjectStore(At,{keyPath:"compositeKey"})}}})),this.appId=t,this.appName=e,this.namespace=r,this.openDbPromise=n}var Rt=(qt.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},qt.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},qt.prototype.getActiveConfig=function(){return this.activeConfig},qt.prototype.loadFromStorage=function(){return u(this,void 0,void 0,function(){var e,r,n,i,o,s;return _(this,function(t){switch(t.label){case 0:return e=this.storage.getLastFetchStatus(),r=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,e];case 1:return(i=t.sent())&&(this.lastFetchStatus=i),[4,r];case 2:return(o=t.sent())&&(this.lastSuccessfulFetchTimestampMillis=o),[4,n];case 3:return(s=t.sent())&&(this.activeConfig=s),[2]}})})},qt.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},qt.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},qt.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},qt);function qt(t){this.storage=t}var Bt=(Kt.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return e=t.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(r,e)]}})})},Kt.prototype.attemptFetch=function(i,t){var o=t.throttleEndTimeMillis,s=t.backoffCount;return u(this,void 0,void 0,function(){var e,r,n;return _(this,function(t){switch(t.label){case 0:return[4,function(i,o){return new Promise(function(t,e){var r=Math.max(o-Date.now(),0),n=setTimeout(t,r);i.addEventListener(function(){clearTimeout(n),e(St.create("fetch-throttle",{throttleEndTimeMillis:o}))})})}(i.signal,o)];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,5,,7]),[4,this.client.fetch(i)];case 3:return e=t.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return t.sent(),[2,e];case 5:if(!function(t){if(!(t instanceof h))return!1;var e=Number(t.httpStatus);return 429===e||500===e||503===e||504===e}(r=t.sent()))throw r;return n={throttleEndTimeMillis:Date.now()+function(t){var e=1e3*Math.pow(2,t),r=Math.round(.5*e*(Math.random()-.5)*2);return Math.min(144e5,e+r)}(s),backoffCount:s+1},[4,this.storage.setThrottleMetadata(n)];case 6:return t.sent(),[2,this.attemptFetch(i,n)];case 7:return[2]}})})},Kt);function Kt(t,e){this.client=t,this.storage=e}var Vt;(Vt=zt).INTERNAL.registerService("remoteConfig",function(t,e,r){if("undefined"==typeof window)throw St.create("registration-window");var n=t.options,i=n.projectId,o=n.apiKey,s=n.appId;if(!i)throw St.create("registration-project-id");if(!o)throw St.create("registration-api-key");if(!s)throw St.create("registration-app-id");r=r||"firebase";var a=new Dt(s,t.name,r),c=new Rt(a),u=new vt("@firebase/remote-config");u.logLevel=G.ERROR;var l=new Et(t.installations(),Vt.SDK_VERSION,r,i,o,s),f=new Bt(l,a),h=new bt(f,a,c,u),p=new Mt(t,h,c,a,u);return p.ensureInitialized(),p},void 0,void 0,!0)}).apply(this,arguments)}catch(t){throw console.error(t),new Error("Cannot instantiate firebase-remote-config - be sure to load firebase-app.js first.")}});
2
+ //# sourceMappingURL=firebase-remote-config.js.map
1v1.lol/index.html ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>1v1.LOL</title>
6
+ <script src="js/googleAnalytics.js"></script>
7
+ <script src="lib/jquery.min.js"></script>
8
+ <script src="js/IronSourceRV.js"></script>
9
+ <script src="js/mobileRedirect.js"></script>
10
+ <script src="js/fullscreen.js"></script>
11
+ <script>
12
+ var gameLoaded = false;
13
+ window.addEventListener("beforeunload", function (e) {
14
+ if (adsVisible || !gameLoaded || !lockedOccured) return null;
15
+ var confirmationMessage = "Are you sure you want to leave? ";
16
+ (e || window.event).returnValue = confirmationMessage; //Gecko + IE
17
+ return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
18
+ });
19
+ window.alert = function (e) {
20
+ console.log(e);
21
+ };
22
+ </script>
23
+ <link rel="icon" type="image/png" href="favicon.png?v2" />
24
+ <meta property="og:title" content="1v1.LOL" />
25
+ <meta property="og:type" content="website" />
26
+ <meta property="og:description" content="Discover 1v1, the online building simulator & third person shooting game. Battle royale, build fight, box fight, zone wars and more game modes to enjoy!" />
27
+ <link rel="stylesheet" href="css/style.css" />
28
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
29
+ <meta name="description" content="Discover 1v1, the online building simulator & third person shooting game. Battle royale, build fight, box fight, zone wars and more game modes to enjoy!" />
30
+ <meta name="keywords" content="just,build,simulator,practice,free,online,battle,royale" />
31
+ <script type="text/javascript" src="js/sdkloader/ima3.js"></script>
32
+
33
+ <!-- ZONETAG - PLACE INTO HEAD SECTION OR RUN CODE AT STARTUP -->
34
+ <script>
35
+ (function (zonefile) {
36
+ var y = window.location.href
37
+ .split("#")[0]
38
+ .split("")
39
+ .reduce(function (a, b) {
40
+ return ((a << 5) - a + b.charCodeAt(0)) >>> 1;
41
+ }, 0);
42
+ y = (10 + ((y * 7) % 26)).toString(36) + y.toString(36);
43
+ var drutObj = (window[y] = window[y] || {});
44
+ function failCpmstarAPI() {
45
+ var failFn = function (o) {
46
+ o && typeof o === "object" && o.fail && o.fail();
47
+ };
48
+ drutObj && Array.isArray(drutObj.cmd) && drutObj.cmd.forEach(failFn) && (drutObj.cmd.length = 0);
49
+ window.cpmstarAPI = window["_" + zonefile] = failFn;
50
+ }
51
+ var rnd = Math.round(Math.random() * 999999);
52
+ var s = document.createElement("script");
53
+ s.type = "text/javascript";
54
+ s.async = true;
55
+ s.onerror = failCpmstarAPI;
56
+ var proto = document.location.protocol;
57
+ var host = proto == "https:" || proto == "file:" ? "https://server" : "//cdn";
58
+ if (window.location.hash == "#cpmstarDev") host = "//dev.server";
59
+ if (window.location.hash == "#cpmstarStaging") host = "//staging.server";
60
+ s.src = host + ".cpmstar.com/cached/zonefiles/" + zonefile + ".js?rnd=" + rnd;
61
+ var s2 = document.getElementsByTagName("script")[0];
62
+ s2.parentNode.insertBefore(s, s2);
63
+ window.cpmstarAPI = function (o) {
64
+ (drutObj.cmd = drutObj.cmd || []).push(o);
65
+ };
66
+ })("372_49986_1v1");
67
+ Object.defineProperty(window.performance.__proto__, "measures", Object.getOwnPropertyDescriptor(window.performance.__proto__, "now")),
68
+ delete window.performance.__proto__.now,
69
+ (window.performance.__proto__.now = {}),
70
+ Object.defineProperty(window.performance.__proto__, "now", {
71
+ get: function () {
72
+ return this.measures;
73
+ },
74
+ }),
75
+ Object.defineProperty(window.performance.__proto__, "now", {
76
+ set: function () {
77
+ Object.defineProperty(window.performance.__proto__, "now", {
78
+ get: function () {
79
+ return function () {
80
+ return this.measures() / 2;
81
+ };
82
+ },
83
+ });
84
+ },
85
+ });
86
+ </script>
87
+ <!-- MIDROLL/INTERSTITIAL VIDEO API -->
88
+ <script src="js/cpmstar.js"></script>
89
+ </head>
90
+
91
+ <body>
92
+ <div class="ads">
93
+ <div class="ad-smallscreen">
94
+ <div class="ad ad-rectangle-bottom"></div>
95
+ </div>
96
+ <div class="ad ad-rectangle-upper" id="adRectangleUpper">
97
+ <!-- 300X250B PLACEMENT TAG - PLACE INTO BODY (ZONE TAG REQUIRED) -->
98
+ <script>
99
+ (function (w, pid) {
100
+ var r = function (c, m) {
101
+ c = c.split("").reduce(function (a, b) {
102
+ return ((a << 5) - a + b.charCodeAt(0)) >>> m;
103
+ }, 0);
104
+ return (10 + ((c * 7) % 26)).toString(36) + c.toString(36);
105
+ },
106
+ y = r(w.location.href.split("#")[0], 1),
107
+ c = r(w.location.href.split("#")[0] + pid, 0);
108
+ w.document.write('<div style="width:300px;height:250px" class="' + c + '"></div>');
109
+ })(window, 83023);
110
+ </script>
111
+ </div>
112
+ <div class="ad-largescreen">
113
+ <div class="ad ad-leaderboard-bottom">
114
+ <!-- 300X600B PLACEMENT TAG - PLACE INTO BODY (ZONE TAG REQUIRED) -->
115
+ <script>
116
+ (function (w, pid) {
117
+ var r = function (c, m) {
118
+ c = c.split("").reduce(function (a, b) {
119
+ return ((a << 5) - a + b.charCodeAt(0)) >>> m;
120
+ }, 0);
121
+ return (10 + ((c * 7) % 26)).toString(36) + c.toString(36);
122
+ },
123
+ y = r(w.location.href.split("#")[0], 1),
124
+ c = r(w.location.href.split("#")[0] + pid, 0);
125
+ w.document.write('<div style="width:300px;height:600px" class="' + c + '"></div>');
126
+ })(window, 85420);
127
+ </script>
128
+ </div>
129
+ </div>
130
+ </div>
131
+
132
+ <!-- <div id="interAdsContainer" style="display: none;"></div> -->
133
+ <div id="gameContainer"></div>
134
+ <div id="loader">
135
+ <img class="logo" src="logo.png" />
136
+ <div class="spinner"></div>
137
+ <div class="progress">
138
+ <div class="full"></div>
139
+ </div>
140
+ </div>
141
+
142
+ <script id="unity-loader" src="UnityLoader.js"></script>
143
+ <!--<script src="Build/UnityLoader.js"></script>-->
144
+ <script>
145
+ var gameJsonUrl = "https://justbuild.nyc3.cdn.digitaloceanspaces.com/CI/1v1/Prod/162/WebGL.json"; //%gameJsonUrl
146
+ var hostname = window.location.hostname;
147
+ if (hostname.indexOf("dev1v1") >= 0 || hostname.indexOf("dev.1v1") >= 0 || hostname.indexOf("test1v1") >= 0 || hostname.indexOf("test.1v1") >= 0) {
148
+ let urlParams = new URLSearchParams(window.location.search);
149
+ let queryParam = urlParams.get("version");
150
+
151
+ if (queryParam !== undefined && queryParam !== null) {
152
+ gameJsonUrl = gameJsonUrl.replace(/[0-9][0-9]+/i, queryParam);
153
+ }
154
+ }
155
+ var gameInstance = UnityLoader.instantiate("gameContainer", gameJsonUrl, { onProgress: UnityProgress });
156
+ //var gameInstance = UnityLoader.instantiate("gameContainer", "Build/WebGL.json", {onProgress: UnityProgress});
157
+
158
+ window.unityInstance = gameInstance;
159
+ var lockedOccured = false;
160
+
161
+ function UnityProgress(gameInstance, progress) {
162
+ if (!gameInstance.Module) {
163
+ return;
164
+ }
165
+ const loader = document.querySelector("#loader");
166
+ if (!gameInstance.progress) {
167
+ const progress = document.querySelector("#loader .progress");
168
+ progress.style.display = "block";
169
+ gameInstance.progress = progress.querySelector(".full");
170
+ loader.querySelector(".spinner").style.display = "none";
171
+ }
172
+ gameInstance.progress.style.transform = `scaleX(${progress})`;
173
+ if (progress === 1 && !gameInstance.removeTimeout) {
174
+ loader.style.display = "none";
175
+ gameLoaded = true;
176
+ }
177
+ }
178
+
179
+ document.onkeydown = function (e) {
180
+ if (e.altKey || e.ctrlKey || e.key == "F1" || e.key == "F2" || e.key == "F3" || e.key == "F4") {
181
+ e.preventDefault();
182
+ }
183
+ };
184
+
185
+ document.onmouseup = function (e) {
186
+ e.preventDefault();
187
+ };
188
+
189
+ document.addEventListener("pointerlockchange", lockChangeAlert, false);
190
+ document.addEventListener("mozpointerlockchange", lockChangeAlert, false);
191
+
192
+ function lockChangeAlert() {
193
+ if (!lockedOccured && document.pointerLockElement) lockedOccured = true;
194
+ if (!document.pointerLockElement && lockedOccured) {
195
+ lockedOccured = false;
196
+ gameInstance.SendMessage("Pause Menu", "OnCursorUnlocked");
197
+ }
198
+ }
199
+
200
+ window.addEventListener("resize", injectAdByWindowSize);
201
+
202
+ function injectAdByWindowSize() {
203
+ // Inject small ad if screen is small, or large ad if screen is large
204
+ if (window.innerHeight < 900) {
205
+ if (document.getElementById("adRectangleBottom") == null) {
206
+ var el = document.getElementsByClassName("ad-rectangle-bottom")[0];
207
+ el.id = "adRectangleBottom";
208
+ cpmstarAPI({ kind: "go", module: "POOL 83025", config: { conditions: { target: { el: el, kind: "replace" } } } });
209
+ }
210
+ } else {
211
+ if (document.getElementById("adLeaderboardBottom") == null) {
212
+ var el = document.getElementsByClassName("ad-leaderboard-bottom")[0];
213
+ el.id = "adLeaderboardBottom";
214
+ cpmstarAPI({ kind: "go", module: "POOL 85420", config: { conditions: { target: { el: el, kind: "replace" } } } });
215
+ }
216
+ }
217
+ }
218
+
219
+ injectAdByWindowSize();
220
+
221
+ var refreshNextTime = true;
222
+
223
+ function showAds() {
224
+ document.getElementsByClassName("ad-rectangle-bottom")[0].style.display = "block";
225
+ document.getElementsByClassName("ad-leaderboard-bottom")[0].style.display = "block";
226
+ document.getElementById("adRectangleUpper").style.display = "block";
227
+
228
+ if (typeof counter === "undefined") {
229
+ startCounter();
230
+ resumeCounter();
231
+ } else {
232
+ resumeCounter();
233
+ refresh();
234
+ }
235
+ }
236
+
237
+ function hideAds() {
238
+ document.getElementsByClassName("ad-rectangle-bottom")[0].style.display = "none";
239
+ document.getElementsByClassName("ad-leaderboard-bottom")[0].style.display = "none";
240
+ document.getElementById("adRectangleUpper").style.display = "none";
241
+
242
+ pauseCounter();
243
+ }
244
+
245
+ // hide ads
246
+ hideAds();
247
+
248
+ function refresh() {
249
+ //console.log("time since ads refresh = " + timeSinceRefresh + " seconds");
250
+ //console.log("time ads visible = " + timeAdsVisible + " seconds");
251
+
252
+ if (timeSinceRefresh <= 30 || timeAdsVisible <= 2) {
253
+ //console.log("don't refresh");
254
+ return;
255
+ }
256
+
257
+ if (document.getElementById("adRectangleBottom") != null && window.getComputedStyle(document.getElementsByClassName("ad-smallscreen")[0]).display != "none") {
258
+ cpmstarAPI({ kind: "adcmd", module: "POOL 83023", command: "refresh" });
259
+ }
260
+
261
+ if (document.getElementById("adLeaderboardBottom") != null && window.getComputedStyle(document.getElementsByClassName("ad-largescreen")[0]).display != "none") {
262
+ cpmstarAPI({ kind: "adcmd", module: "POOL 85420", command: "refresh" });
263
+ }
264
+
265
+ cpmstarAPI({ kind: "adcmd", module: "POOL 83025", command: "refresh" });
266
+
267
+ timeSinceRefresh = 0;
268
+ timeAdsVisible = 0;
269
+ //console.log("refresh ads");
270
+ }
271
+
272
+ window.onfocus = function () {
273
+ //console.log("onfocus");
274
+ resumeCounter();
275
+ refresh();
276
+ };
277
+
278
+ window.onblur = function () {
279
+ //console.log("onblur");
280
+ pauseCounter();
281
+ };
282
+
283
+ var timeSinceRefresh = 0;
284
+ var timeAdsVisible = 0;
285
+ var counter;
286
+ var adsVisible = false;
287
+
288
+ function startCounter() {
289
+ timeSinceRefresh++;
290
+ if (adsVisible) timeAdsVisible++;
291
+
292
+ counter = setTimeout(function () {
293
+ startCounter();
294
+ }, 1000);
295
+ }
296
+
297
+ function resumeCounter() {
298
+ adsVisible = true;
299
+ }
300
+
301
+ function pauseCounter() {
302
+ adsVisible = false;
303
+ }
304
+ </script>
305
+ <!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
306
+ <script src="firebase/firebase-app.js"></script>
307
+
308
+ <!-- Add Firebase products that you want to use -->
309
+ <script src="firebase/firebase-analytics.js"></script>
310
+ <script src="firebase/firebase-auth.js"></script>
311
+ <script src="firebase/firebase-firestore.js"></script>
312
+ <script src="firebase/firebase-remote-config.js"></script>
313
+
314
+ <script src="js/firebase.js?v=147"></script>
315
+ <script src="js/login.js?v=147"></script>
316
+ <script src="js/firebase-config.js?v=147"></script>
317
+
318
+ <script>
319
+ var hostname = window.location.hostname;
320
+ if (hostname.indexOf("dev1v1") >= 0 || hostname.indexOf("dev.1v1") >= 0 || hostname.indexOf("test1v1") >= 0 || hostname.indexOf("test.1v1") >= 0 || hostname.indexOf("localhost") >= 0) {
321
+ initializeFireBaseDev();
322
+ } else {
323
+ initializeFireBase();
324
+ }
325
+
326
+ initRemoteConfig();
327
+ </script>
328
+
329
+ <script src="js/windowResize.js"></script>
330
+ <script src="js/adblockManager.js"></script>
331
+ <script src="js/macUserAgent.js"></script>
332
+ <script src="js/visibilityChangeListener.js"></script>
333
+ <script>
334
+ function onUnityReady() {
335
+ checkAdBlock();
336
+ sendConfig();
337
+ }
338
+
339
+ fixMacUserAgent();
340
+ </script>
341
+ <script src="/js/main.js"></script>
342
+ </body>
343
+ </html>
1v1.lol/js/IronSourceRV.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ window.InitRV = function InitRV(id) {
2
+ $.getScript("https://static.ultra-rv.com/rv-min.js", function () {
3
+
4
+ let userId = id === undefined ? "Guest" : id;
5
+ let ironRV = IronRV.getInstance({
6
+ applicationKey: "1-mb5whk",
7
+ applicationUserId: userId,
8
+ });
9
+
10
+ ironRV.addListener(IronRV.EVENTS.READY, function () {
11
+ gameInstance.SendMessage("MainMenuManagers", "RvReady");
12
+ });
13
+
14
+ ironRV.addListener(IronRV.EVENTS.CLOSE, function () {
15
+ gameInstance.SendMessage("MainMenuManagers", "RvWatchComplete", "false");
16
+ });
17
+
18
+ ironRV.addListener(IronRV.EVENTS.COMPLETION, function () {
19
+ gameInstance.SendMessage("MainMenuManagers", "RvWatchComplete", "true");
20
+ });
21
+
22
+ ironRV.addListener(IronRV.EVENTS.AD_BLOCK, function () {
23
+ ironRV.showAdBlockMessage();
24
+ });
25
+
26
+ ironRV.addListener(IronRV.EVENTS.INIT_ERROR, function () {
27
+ });
28
+
29
+ window.showRV = () => {
30
+ ironRV.show();
31
+ };
32
+ });
33
+ }
1v1.lol/js/adblockManager.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ async function checkAdBlock() {
2
+ var adBlockEnabled = false;
3
+ var testAd = document.createElement("div");
4
+ testAd.innerHTML = "&nbsp;";
5
+ testAd.className = "adsbox";
6
+ document.body.appendChild(testAd);
7
+ window.setTimeout(function () {
8
+ if (testAd.offsetHeight === 0) {
9
+ adBlockEnabled = true;
10
+ }
11
+ testAd.remove();
12
+ if (adBlockEnabled) {
13
+ gameInstance.SendMessage("PersistantObjects", "SendAdblockData", "false");
14
+ } else {
15
+ gameInstance.SendMessage("PersistantObjects", "SendAdblockData", "false");
16
+ }
17
+ }, 100);
18
+ }
19
+ // this script has been changed to say that adblock is always off even if it is on
1v1.lol/js/cpmstar.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //init the interstitial
2
+
3
+ var iAd;
4
+ cpmstarAPI(function (api) {
5
+ //console.log("Setting iAD")
6
+ iAd = new api.game.InterstitialView("interstitial");
7
+ iAd.load();
8
+ iAd.addEventListener("ad_opened", function (e) {
9
+ iAdPause(); //Pause the game when ad is open
10
+ });
11
+
12
+ iAd.addEventListener("ad_closed", function (e) {
13
+ setTimeout(function () {
14
+ iAdUnpause(); //Unpause when ad closed.
15
+ }, 700);
16
+ iAd.load(); //Preload another ad.
17
+ });
18
+ });
19
+
20
+ function iAdPause() {
21
+
22
+ }
23
+ function iAdUnpause() {
24
+ unityAdFinishedCallback()
25
+ }
26
+
27
+
28
+ function requestNewAd() {
29
+ //console.log("requested AD")
30
+ //console.log(iAd)
31
+ if (iAd && iAd.isLoaded()) {
32
+ iAd.show(); //Show loaded ad
33
+ }
34
+ else {
35
+ if (iAd) iAd.load(); //If no ad available, load another
36
+ unityAdFinishedCallback()
37
+ }
38
+ }
39
+
40
+ // This function calls Unity to tell the ad finished
41
+ function unityAdFinishedCallback() {
42
+ try {
43
+ if (gameInstance)
44
+ gameInstance.SendMessage('MainMenuManagers', 'OnWebCallback');
45
+ }
46
+ catch (error) {
47
+ console.log(error);
48
+ }
49
+ }
1v1.lol/js/firebase-config.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ let conf;
2
+
3
+ function initRemoteConfig() {
4
+ const remoteConfig = firebase.remoteConfig();
5
+ remoteConfig.settings.minimumFetchIntervalMillis = 2000;
6
+ setDefaultValues(remoteConfig);
7
+
8
+ remoteConfig.fetchAndActivate().then(() => {
9
+ conf = {};
10
+ // Convert all of the remote config parameters to a dict:
11
+ for (const [key, value] of Object.entries(remoteConfig.getAll())) {
12
+ conf[key] = value.asString();
13
+ }
14
+ })
15
+ .catch((err) => {
16
+ console.warn("config error: " + err);
17
+ });
18
+ }
19
+
20
+ async function sendConfig() {
21
+ while(conf === undefined)
22
+ {
23
+ await sleep(2000)
24
+ }
25
+
26
+ window.unityInstance.SendMessage('MainMenuManagers', 'ActivateRemoteConfig', JSON.stringify(conf));
27
+ };
28
+
29
+ function setDefaultValues(remoteConfig){
30
+ remoteConfig.defaultConfig = {
31
+ "SettingsV5": JSON.stringify({"id":"default","skins_data":{"lol.1v1.playerskins.pack.1":{"Name":"Agent Olivia","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.2":{"Name":"S.W.A.T","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.3":{"Name":"X-Bot","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.4":{"Name":"Skater Boy","PriceText":"100","Currency":"LC","Rarity":"Epic","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.5":{"Name":"Lola","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.6":{"Name":"Ninja","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.7":{"Name":"Caty","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.8":{"Name":"Beach Girl","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.9":{"Name":"LOL Pump","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.10":{"Name":"Rey","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.11":{"Name":"Justin","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.12":{"Name":"Hot Dog","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.17":{"Name":"John","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.18":{"Name":"Hilda","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.19":{"Name":"Jester","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.20":{"Name":"Executioner","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.21":{"Name":"Astrid","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.22":{"Name":"Olaf","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.23":{"Name":"Dre","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.24":{"Name":"Sonya","PriceText":"100","Currency":"LC","Rarity":"Rare","Prices":{"LC":100,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.25":{"Name":"Jessica","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.26":{"Name":"Scarecrow","PriceText":"900","Currency":"LC","Rarity":"Legendary","Prices":{"LC":900,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.27":{"Name":"Brandy","PriceText":"400","Currency":"LC","Rarity":"Epic","Prices":{"LC":400,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV0":{"Name":"Paper Bag Mask","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV1":{"Name":"Hockey Mask","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV2":{"Name":"Mysterio","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV3":{"Name":"Cube Face","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV4":{"Name":"Uncle Sam","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV5":{"Name":"Alien","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV6":{"Name":"Stranger","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV7":{"Name":"Football","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV8":{"Name":"Party Hat","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV9":{"Name":"Pot","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV10":{"Name":"Skull Mask","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV11":{"Name":"Karate","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV12":{"Name":"Ice Cream","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV13":{"Name":"#1 Hat","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV14":{"Name":"Fish Bait","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV15":{"Name":"Spartan","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV16":{"Name":"Safety First!","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV17":{"Name":"Squid Kid","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV18":{"Name":"Cupcake","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV19":{"Name":"Gas Mask","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV20":{"Name":"Disco Star","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV21":{"Name":"Goth Girl","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV22":{"Name":"Ser 1v1alot","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}},"lol.1v1.playerskins.pack.tier.RV23":{"Name":"Fiesta Time","PriceText":"50","Currency":"RV","Rarity":"Uncommon","Prices":{"LC":50,"RM":0.99,"RV":4}}},"coins_data":{"lol.1v1.coins.pack.1":{"DisplayText":"100","Amount":100,"Price":0.99},"lol.1v1.coins.pack.2":{"DisplayText":"420","Amount":420,"Price":3.99},"lol.1v1.coins.pack.3":{"DisplayText":"770","Amount":770,"Price":6.99},"lol.1v1.coins.pack.4":{"DisplayText":"1150","Amount":1150,"Price":9.99},"lol.1v1.coins.pack.5":{"DisplayText":"2400","Amount":2400,"Price":19.99},"lol.1v1.coins.pack.6":{"DisplayText":"6500","Amount":6500,"Price":49.99}},"rv_skins":["lol.1v1.playerskins.pack.tier.RV11","lol.1v1.playerskins.pack.tier.RV12","lol.1v1.playerskins.pack.tier.RV13","lol.1v1.playerskins.pack.tier.RV14","lol.1v1.playerskins.pack.tier.RV15","lol.1v1.playerskins.pack.tier.RV16","lol.1v1.playerskins.pack.tier.RV17","lol.1v1.playerskins.pack.tier.RV18","lol.1v1.playerskins.pack.tier.RV19","lol.1v1.playerskins.pack.tier.RV20","lol.1v1.playerskins.pack.tier.RV21","lol.1v1.playerskins.pack.tier.RV22","lol.1v1.playerskins.pack.tier.RV23","lol.1v1.playerskins.pack.tier.RV10","lol.1v1.playerskins.pack.tier.RV0","lol.1v1.playerskins.pack.tier.RV5","lol.1v1.playerskins.pack.tier.RV6","lol.1v1.playerskins.pack.tier.RV9","lol.1v1.playerskins.pack.tier.RV8","lol.1v1.playerskins.pack.tier.RV2","lol.1v1.playerskins.pack.tier.RV1","lol.1v1.playerskins.pack.tier.RV3","lol.1v1.playerskins.pack.tier.RV7"],"player_skins_store":[["lol.1v1.playerskins.pack.23","lol.1v1.playerskins.pack.25","lol.1v1.playerskins.pack.1","lol.1v1.playerskins.pack.7","lol.1v1.playerskins.pack.10","lol.1v1.playerskins.pack.21","lol.1v1.playerskins.pack.22","lol.1v1.playerskins.pack.4","lol.1v1.playerskins.pack.2","lol.1v1.playerskins.pack.5","lol.1v1.playerskins.pack.8","lol.1v1.playerskins.pack.11","lol.1v1.playerskins.pack.3","lol.1v1.playerskins.pack.6","lol.1v1.playerskins.pack.9","lol.1v1.playerskins.pack.12"]],"links_data":{"Discord":{"link":"https://discord.gg/1v1"},"Instagram":{"link":"https://www.instagram.com/1v1.lol"},"TikTok":{"link":"https://www.tiktok.com/@1v1_lol"}},"percent_protection":30,"competitive_modes":[["1v1_Competitive","Teams_2v2_Competitive"]],"casual_modes":[["1v1","BoxFight_Teams_2v2","PipeRun_Race","Teams_City_ZoneWars"]],"practice_modes":["Practice","AimTrainer","Zombies","PipeRun"],"custom_modes":[["1v1_Custom","Deathmatch_Custom","MiniBoxFight_Custom","BoxFight_Custom","Zone_Custom","Vikings_Custom","PipeRun_Custom","City_ZoneWars_Custom"]],"modes_rotation_hour":17,"skins_rotation_hour":14,"modes_info":{"1v1":{"OverridenRangeIncreaseFactor":12000},"1v1_Competitive":{"OverridenRangeIncreaseFactor":12000},"BattleRoyale":{"OverridenRangeIncreaseFactor":12000},"BoxFight_Teams_2v2":{"OverridenRangeIncreaseFactor":24000},"Vikings_Teams_3v3":{"OverridenRangeIncreaseFactor":12000},"BattleRoyale_Teams_2v2":{"OverridenRangeIncreaseFactor":12000},"Teams_2v2":{"OverridenRangeIncreaseFactor":12000},"BattleRoyale_ZoneWars":{"OverridenRangeIncreaseFactor":24000},"BoxFight_1v1":{"OverridenRangeIncreaseFactor":12000},"BoxFight_1v1_Competitive":{"OverridenRangeIncreaseFactor":24000}},"mobile_settings":{"ShowPushNotifications":true},"ads_settings":{"ShowAdChance":1,"MinAdIntervalInSeconds":60,"RvAdIntervalInMinutes":1440,"RvAdsNeededToUnlock":4},"store_settings":{"NewItemsShine":true}}),
32
+ "BattlePassId":"default",
33
+ "BattlePass":JSON.stringify({"current_season":1,"start_date":"2021-08-20T12:30:00.000+03:00","battle_passes":{"default":{"win_xp":50,"lose_xp":25,"premium_price":1000,"tier_up_price":100,"tiers":[{"xp":0,"free_rewards":["lol.1v1.playerskins.pack.tier.RV0"],"premium_rewards":["lol.1v1.coins.pack.2"]}]}}})
34
+ };
35
+ }
36
+
37
+ function sleep(ms) {
38
+ return new Promise(resolve => setTimeout(resolve, ms));
39
+ }
1v1.lol/js/firebase.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function initializeFireBase(){
2
+ // Your web app's Firebase configuration
3
+ var firebaseConfig = {
4
+ apiKey: "AIzaSyBPrAfspM9RFxuNuDtSyaOZ5YRjDBNiq5I",
5
+ authDomain: "1v1.lol",
6
+ databaseURL: "https://justbuild-cdb86.firebaseio.com",
7
+ projectId: "justbuild-cdb86",
8
+ storageBucket: "justbuild-cdb86.appspot.com",
9
+ messagingSenderId: "93158914000",
10
+ appId: "1:93158914000:web:e73a8b453338ab7c"
11
+ };
12
+ // Initialize Firebase
13
+ firebase.initializeApp(firebaseConfig);
14
+ }
15
+
16
+ function initializeFireBaseDev(){
17
+ // Your web app's Firebase configuration
18
+ var firebaseConfig = {
19
+ apiKey: "AIzaSyANZ0SDhqoc62msSooQFs3SEb4XbC7gvk4",
20
+ authDomain: "dev.1v1.lol",
21
+ databaseURL: "https://dev1v1.firebaseio.com",
22
+ projectId: "dev1v1",
23
+ storageBucket: "dev1v1.appspot.com",
24
+ messagingSenderId: "90097883404",
25
+ appId: "1:90097883404:android:0931a7bbf3e74f2b9a5129"
26
+ };
27
+ // Initialize Firebase
28
+ firebase.initializeApp(firebaseConfig);
29
+ }
1v1.lol/js/fullscreen.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* View in fullscreen */
2
+ var elem = document.documentElement;
3
+ function openFullscreen() {
4
+ if (elem.requestFullscreen) {
5
+ elem.requestFullscreen();
6
+ } else if (elem.mozRequestFullScreen) { /* Firefox */
7
+ elem.mozRequestFullScreen();
8
+ } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
9
+ elem.webkitRequestFullscreen();
10
+ } else if (elem.msRequestFullscreen) { /* IE/Edge */
11
+ elem.msRequestFullscreen();
12
+ }
13
+ }
14
+
15
+ /* Close fullscreen */
16
+ function closeFullscreen() {
17
+ if (document.exitFullscreen) {
18
+ document.exitFullscreen();
19
+ } else if (document.mozCancelFullScreen) { /* Firefox */
20
+ document.mozCancelFullScreen();
21
+ } else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
22
+ document.webkitExitFullscreen();
23
+ } else if (document.msExitFullscreen) { /* IE/Edge */
24
+ document.msExitFullscreen();
25
+ }
26
+ }
27
+
28
+ function updateFullscreen() {
29
+ var isInFullScreen = (document.fullscreenElement && document.fullscreenElement !== null) ||
30
+ (document.webkitFullscreenElement && document.webkitFullscreenElement !== null) ||
31
+ (document.mozFullScreenElement && document.mozFullScreenElement !== null) ||
32
+ (document.msFullscreenElement && document.msFullscreenElement !== null);
33
+ if (!isInFullScreen)
34
+ openFullscreen();
35
+ else
36
+ closeFullscreen();
37
+ }
1v1.lol/js/login.js ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var tempErrorCreds;
2
+ var tempProviderName;
3
+
4
+ function retrieveIdToken(successCallback, errorCallback) {
5
+ if(firebase.auth().currentUser === null){
6
+ if(errorCallback !== null)
7
+ errorCallback("User is null");
8
+ return;
9
+ }
10
+
11
+ firebase.auth().currentUser.getIdToken().then(function (idToken) {
12
+ var resultObj = {
13
+ token: idToken,
14
+ displayName: firebase.auth().currentUser.displayName
15
+ };
16
+
17
+ if (successCallback !== undefined) {
18
+
19
+ successCallback(resultObj);
20
+ }
21
+ })
22
+ .catch(function (error) {
23
+ console.log(error);
24
+ if (errorCallback !== undefined)
25
+ errorCallback(error.message);
26
+ });
27
+ }
28
+
29
+ function anonymousLogin(successCallback, errorCallback) {
30
+ var resultObj = {
31
+ token: "",
32
+ displayName: "guest"
33
+ };
34
+
35
+ if (successCallback !== undefined) {
36
+
37
+ successCallback(resultObj);
38
+ }
39
+ }
40
+
41
+ function firebaseLogin(providerName, successCallback, errorCallback) {
42
+ if (providerName === "anonymous") {
43
+ anonymousLogin(successCallback, errorCallback);
44
+ return;
45
+ }
46
+
47
+ var user = firebase.auth().currentUser;
48
+
49
+ if(user != null && !user.isAnonymous){
50
+ retrieveIdToken(successCallback, errorCallback);
51
+ return;
52
+ }
53
+
54
+ var provider = getProvider(providerName);
55
+ firebase.auth().useDeviceLanguage();
56
+
57
+ //var task = firebase.auth().currentUser.isAnonymous ? firebase.auth().signInWithPopup(provider) : firebase.auth().linkWithPopup(provider);
58
+
59
+ firebase.auth().signInWithPopup(provider).then(function (result) {
60
+ console.log("Successful sign in");
61
+ retrieveIdToken(successCallback, errorCallback);
62
+ })
63
+ .catch(function (error) {
64
+ // Handle Errors here.
65
+ var errorCode = error.code;
66
+ var errorMessage = error.message;
67
+ // The email of the user's account used.
68
+ var email = error.email;
69
+ // The firebase.auth.AuthCredential type that was used.
70
+ tempErrorCreds = error.credential;
71
+ console.log(error);
72
+
73
+ if (errorCallback !== undefined)
74
+ errorCallback(error.message);
75
+
76
+ if (errorCode === 'auth/account-exists-with-different-credential') {
77
+ // User's email already exists.
78
+ // Get sign-in methods for this email.
79
+ firebase.auth().fetchSignInMethodsForEmail(email).then(function (methods) {
80
+ // the first method in the list will be the "recommended" method to use.
81
+ if (methods.length == 0)
82
+ return;
83
+ // Sign in to provider.
84
+ tempProviderName = methods[0].trim();
85
+ setModalContent("generalModalContent",
86
+ "<div id =\"continueWindow\"><span class=\"close\" id=\"closeButton\" onclick=\"hideModal('generalModal')\">&times;</span><p>Please press the button to login: </p><button onclick=\"continueLogin()\">Continue Login</button></div>");
87
+ showModal("generalModal");
88
+ });
89
+ }
90
+ });
91
+ }
92
+
93
+ function firebaseLogout() {
94
+ firebase.auth().signOut().catch(function (error) {
95
+ console.log(error);
96
+ });
97
+ }
98
+
99
+ function getCurrentUserDisplayName() {
100
+ var user = firebase.auth().currentUser;
101
+ var displayName = "";
102
+ if (user) {
103
+ displayName = user.displayName;
104
+ }
105
+ return displayName;
106
+ }
107
+
108
+ function getProvider(providerName) {
109
+ if (providerName && providerName.indexOf("facebook") != -1)
110
+ return new firebase.auth.FacebookAuthProvider()
111
+ else
112
+ return new firebase.auth.GoogleAuthProvider()
113
+ }
114
+
115
+ function setModalContent(modalContentId, contentString) {
116
+ content = document.getElementById(modalContentId);
117
+ if (content) {
118
+ content.innerHTML = contentString;
119
+ }
120
+
121
+ }
122
+
123
+ function continueLogin() {
124
+ hideModal("generalModal");
125
+ var provider = getProvider(tempProviderName);
126
+ firebase.auth().signInWithPopup(provider).then(
127
+ function (result) {
128
+ if (!tempErrorCreds) {
129
+ return;
130
+ }
131
+ // As we have access to the pending credential, we can directly call the link method.
132
+ result.user.linkAndRetrieveDataWithCredential(tempErrorCreds).then(function (usercred) {
133
+ //goToApp();
134
+ });
135
+ });
136
+
137
+ }
138
+
139
+ function showModal(modalId) {
140
+ modal = document.getElementById(modalId);
141
+ if (modal)
142
+ modal.style.display = "block";
143
+ }
144
+
145
+ function hideModal(modalId) {
146
+ modal = document.getElementById(modalId);
147
+ if (modal)
148
+ modal.style.display = "none";
149
+ }
1v1.lol/js/macUserAgent.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function fixMacUserAgent(){
2
+ var userAgentStr = window.navigator.appVersion;
3
+ if(userAgentStr && userAgentStr.includes("Intel Mac OS X 11")){
4
+ userAgentStr = userAgentStr.replace('Intel Mac OS X 11', 'Intel Mac OS X 10');
5
+ setUserAgent(window, userAgentStr);
6
+ }
7
+ }
8
+
9
+ function setUserAgent(curWindow, userAgent) {
10
+ // Works on Firefox, Chrome, Opera and IE9+
11
+ if (navigator.__defineGetter__) {
12
+ navigator.__defineGetter__('userAgent', function () {
13
+ return userAgent;
14
+ });
15
+ } else if (Object.defineProperty) {
16
+ Object.defineProperty(navigator, 'userAgent', {
17
+ get: function () {
18
+ return userAgent;
19
+ }
20
+ });
21
+ }
22
+ // Works on Safari
23
+ if (curWindow.navigator.userAgent !== userAgent) {
24
+ var userAgentProp = {
25
+ get: function () {
26
+ return userAgent;
27
+ }
28
+ };
29
+ try {
30
+ Object.defineProperty(curWindow.navigator, 'userAgent', userAgentProp);
31
+ } catch (e) {
32
+ curWindow.navigator = Object.create(navigator, {
33
+ userAgent: userAgentProp
34
+ });
35
+ }
36
+ }
37
+ }
1v1.lol/js/mobileRedirect.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var userAgent = navigator.userAgent || navigator.vendor || window.opera;
2
+
3
+ if (/bot|crawler|spider|crawling/i.test(userAgent)) {
4
+ // do nothing
5
+ }
6
+
7
+ // Windows Phone
8
+ else if (/windows phone/i.test(userAgent)) {
9
+ // window.location.replace("/mobile");
10
+ }
11
+
12
+ // Android
13
+ else if (/android/i.test(userAgent)) {
14
+ // window.location.replace("https://play.google.com/store/apps/details?id=lol.onevone");
15
+ }
16
+
17
+ // iOS
18
+ else if ((/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) || (navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform))) {
19
+ // window.location.replace("https://apps.apple.com/app/id1508620125");
20
+ }
1v1.lol/js/sdkloader/ima3.js ADDED
The diff for this file is too large to render. See raw diff
 
1v1.lol/js/visibilityChangeListener.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener("visibilitychange", () => {
2
+ if (!gameInstance) {
3
+ return;
4
+ }
5
+
6
+ var isFocused = document.visibilityState === "visible";
7
+ gameInstance.SendMessage("PersistantObjects", "OnApplicationFocusChange", isFocused ? 1 : 0);
8
+ }, false);
1v1.lol/js/windowResize.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ isIframe = false;
2
+ if (window.self != window.top) {
3
+ isIframe = true;
4
+ function WindowResize() {
5
+ var v = window.innerWidth;
6
+ var maxRes = 1320;
7
+
8
+ if (v < maxRes) {
9
+ var ads = document.getElementsByClassName('ad');
10
+
11
+ for (const ad of ads) {
12
+ ad.style.transform = "scale(" + v / maxRes + ")";
13
+ }
14
+ }
15
+ else {
16
+ var ads = document.getElementsByClassName('ad');
17
+
18
+ for (const ad of ads) {
19
+ ad.style.transform = "scale(1)";
20
+ }
21
+ }
22
+ }
23
+ window.addEventListener("resize", WindowResize);
24
+ WindowResize();
25
+ }
26
+ else {
27
+ var styles = `
28
+ @media screen and (max-width: 1200px) {
29
+ .ad-leaderboard-bottom {
30
+ display: none !important;
31
+ }
32
+ }
33
+ `
34
+
35
+ var styleSheet = document.createElement("style")
36
+ styleSheet.type = "text/css"
37
+ styleSheet.innerText = styles
38
+ document.head.appendChild(styleSheet)
39
+ }
40
+
1v1.lol/lib/jquery.min.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ /*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
2
+ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
1v1.lol/logo.png ADDED
1v1.lol/splash.png ADDED
1v1.lol/webcopy-origin.txt ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Uri: https://1v1.lol/
2
+ File Name: C:\Downloaded Web Sites\1v1.lol\index.htm
3
+ Content Type: text/html
4
+
5
+ Uri: https://1v1.lol/favicon.png?v2
6
+ File Name: C:\Downloaded Web Sites\1v1.lol\favicon.png
7
+ Content Type: image/png
8
+
9
+ Uri: https://1v1.lol/css/style.css
10
+ File Name: C:\Downloaded Web Sites\1v1.lol\css\style.css
11
+ Content Type: text/css
12
+
13
+ Uri: https://www.googletagmanager.com/gtag/js?id=UA-118283086-6
14
+ File Name: C:\Downloaded Web Sites\1v1.lol\gtag\js.js
15
+ Content Type: application/javascript
16
+
17
+ Uri: https://1v1.lol/js/googleAnalytics.js
18
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\googleAnalytics.js
19
+ Content Type: text/javascript
20
+
21
+ Uri: https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
22
+ File Name: C:\Downloaded Web Sites\1v1.lol\ajax\libs\jquery\3.5.1\jquery.min.js
23
+ Content Type: text/javascript
24
+
25
+ Uri: https://1v1.lol/js/IronSourceRV.js
26
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\IronSourceRV.js
27
+ Content Type: text/javascript
28
+
29
+ Uri: https://1v1.lol/js/mobileRedirect.js
30
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\mobileRedirect.js
31
+ Content Type: text/javascript
32
+
33
+ Uri: https://1v1.lol/js/fullscreen.js
34
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\fullscreen.js
35
+ Content Type: text/javascript
36
+
37
+ Uri: https://imasdk.googleapis.com/js/sdkloader/ima3.js
38
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\sdkloader\ima3.js
39
+ Content Type: text/javascript
40
+
41
+ Uri: https://1v1.lol/js/cpmstar.js
42
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\cpmstar.js
43
+ Content Type: text/javascript
44
+
45
+ Uri: https://1v1.lol/logo.png
46
+ File Name: C:\Downloaded Web Sites\1v1.lol\logo.png
47
+ Content Type: image/png
48
+
49
+ Uri: https://justbuild.nyc3.cdn.digitaloceanspaces.com/CI/1v1/Prod/162/UnityLoader.js
50
+ File Name: C:\Downloaded Web Sites\1v1.lol\CI\1v1\Prod\162\UnityLoader.js
51
+ Content Type: application/x-javascript
52
+
53
+ Uri: https://www.gstatic.com/firebasejs/7.2.1/firebase-app.js
54
+ File Name: C:\Downloaded Web Sites\1v1.lol\firebasejs\7.2.1\firebase-app.js
55
+ Content Type: text/javascript
56
+
57
+ Uri: https://www.gstatic.com/firebasejs/7.2.1/firebase-analytics.js
58
+ File Name: C:\Downloaded Web Sites\1v1.lol\firebasejs\7.2.1\firebase-analytics.js
59
+ Content Type: text/javascript
60
+
61
+ Uri: https://www.gstatic.com/firebasejs/7.2.1/firebase-auth.js
62
+ File Name: C:\Downloaded Web Sites\1v1.lol\firebasejs\7.2.1\firebase-auth.js
63
+ Content Type: text/javascript
64
+
65
+ Uri: https://www.gstatic.com/firebasejs/7.2.1/firebase-firestore.js
66
+ File Name: C:\Downloaded Web Sites\1v1.lol\firebasejs\7.2.1\firebase-firestore.js
67
+ Content Type: text/javascript
68
+
69
+ Uri: https://www.gstatic.com/firebasejs/7.2.1/firebase-remote-config.js
70
+ File Name: C:\Downloaded Web Sites\1v1.lol\firebasejs\7.2.1\firebase-remote-config.js
71
+ Content Type: text/javascript
72
+
73
+ Uri: https://1v1.lol/js/firebase.js?v=147
74
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\firebase.js
75
+ Content Type: text/javascript
76
+
77
+ Uri: https://1v1.lol/js/login.js?v=147
78
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\login.js
79
+ Content Type: text/javascript
80
+
81
+ Uri: https://1v1.lol/js/firebase-config.js?v=147
82
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\firebase-config.js
83
+ Content Type: text/javascript
84
+
85
+ Uri: https://1v1.lol/js/windowResize.js
86
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\windowResize.js
87
+ Content Type: text/javascript
88
+
89
+ Uri: https://1v1.lol/js/adblockManager.js
90
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\adblockManager.js
91
+ Content Type: text/javascript
92
+
93
+ Uri: https://1v1.lol/js/macUserAgent.js
94
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\macUserAgent.js
95
+ Content Type: text/javascript
96
+
97
+ Uri: https://1v1.lol/js/visibilityChangeListener.js
98
+ File Name: C:\Downloaded Web Sites\1v1.lol\js\visibilityChangeListener.js
99
+ Content Type: text/javascript
100
+
2048/.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .sass-cache/
2048/.jshintrc ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "esnext": true,
3
+ "indent": 2,
4
+ "maxlen": 80,
5
+ "freeze": true,
6
+ "camelcase": true,
7
+ "unused": true,
8
+ "eqnull": true,
9
+ "proto": true,
10
+ "supernew": true,
11
+ "noyield": true,
12
+ "evil": true,
13
+ "node": true,
14
+ "boss": true,
15
+ "expr": true,
16
+ "loopfunc": true,
17
+ "white": true,
18
+ "maxdepth": 4
19
+ }
2048/CONTRIBUTING.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing
2
+ Changes and improvements are more than welcome! Feel free to fork and open a pull request.
3
+
4
+ Please follow the house rules to have a bigger chance of your contribution being merged.
5
+
6
+ ## House rules
7
+
8
+ ### How to make changes
9
+ - To make changes, create a new branch based on `master` (do not create one from `gh-pages` unless strictly necessary) and make them there, then create a Pull Request to master.
10
+ `gh-pages` is different from master in that it contains sharing features, analytics and other things that have no direct bearing with the game. `master` is the "pure" version of the game.
11
+ - If you want to modify the CSS, please edit the SCSS files present in `style/`: `main.scss` and others. Don't edit the `main.css`, because it's supposed to be generated.
12
+ In order to compile your SCSS modifications, you need to use the `sass` gem (install it by running `gem install sass` once Ruby is installed).
13
+ To run SASS, simply use the following command:
14
+ `sass --unix-newlines --watch style/main.scss`
15
+ SASS will automatically recompile your css when changed.
16
+ - `Rakefile` contains some tasks that help during development. Feel free to add useful tasks if needed.
17
+ - Please use 2-space indentation when editing the JavaScript. A `.jshintrc` file is present, which will help your code to follow the guidelines if you install and run `jshint`.
18
+ - Please test your modification thoroughly before submitting your Pull Request.
19
+
20
+ ### Changes that might not be accepted
21
+ We have to be conservative with the core game. This means that some modifications won't be merged, or will have to be evaluated carefully before being merged:
22
+
23
+ - Undo/redo features
24
+ - Save/reload features
25
+ - Changes to how the tiles look or their contents
26
+ - Changes to the layout
27
+ - Changes to the grid size
28
+
29
+ ### Changes that are welcome
30
+ - Bug fixes
31
+ - Compatibility improvements
32
+ - "Under the hood" enhancements
33
+ - Small changes that don't have an impact on the core gameplay
2048/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Gabriele Cirulli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
2048/README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 2048
2
+ A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone).
3
+
4
+ Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
5
+
6
+ The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805)
7
+
8
+ ### Contributions
9
+
10
+ [Anna Harren](https://github.com/iirelu/) and [sigod](https://github.com/sigod) are maintainers for this repository.
11
+
12
+ Other notable contributors:
13
+
14
+ - [TimPetricola](https://github.com/TimPetricola) added best score storage
15
+ - [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile
16
+ - [marcingajda](https://github.com/marcingajda) made swipes work on Windows Phone
17
+ - [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3
18
+
19
+ Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions.
20
+
21
+ ### Screenshot
22
+
23
+ <p align="center">
24
+ <img src="https://cloud.githubusercontent.com/assets/1175750/8614312/280e5dc2-26f1-11e5-9f1f-5891c3ca8b26.png" alt="Screenshot"/>
25
+ </p>
26
+
27
+ That screenshot is fake, by the way. I never reached 2048 :smile:
28
+
29
+ ## Contributing
30
+ Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.
31
+
32
+ You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md)
33
+
34
+ ## License
35
+ 2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt)
36
+
37
+ ## Donations
38
+ I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much!
2048/Rakefile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require "date"
2
+
3
+ namespace :appcache do
4
+ desc "update the date in the appcache file (in the gh-pages branch)"
5
+ task :update do
6
+ appcache = File.read("cache.appcache")
7
+ updated = "# Updated: #{DateTime.now}"
8
+
9
+ File.write("cache.appcache", appcache.sub(/^# Updated:.*$/, updated))
10
+ end
11
+ end
2048/favicon.ico ADDED
2048/index.html ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>2048</title>
6
+
7
+ <link href="style/main.css" rel="stylesheet" type="text/css">
8
+ <link rel="shortcut icon" href="favicon.ico">
9
+ <link rel="apple-touch-icon" href="meta/apple-touch-icon.png">
10
+ <link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone 5+ -->
11
+ <link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone, retina -->
12
+ <meta name="apple-mobile-web-app-capable" content="yes">
13
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
14
+
15
+ <meta name="HandheldFriendly" content="True">
16
+ <meta name="MobileOptimized" content="320">
17
+ <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
18
+ </head>
19
+ <body>
20
+ <div class="container">
21
+ <div class="heading">
22
+ <h1 class="title">2048</h1>
23
+ <div class="scores-container">
24
+ <div class="score-container">0</div>
25
+ <div class="best-container">0</div>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="above-game">
30
+ <p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
31
+ <a class="restart-button">New Game</a>
32
+ </div>
33
+
34
+ <div class="game-container">
35
+ <div class="game-message">
36
+ <p></p>
37
+ <div class="lower">
38
+ <a class="keep-playing-button">Keep going</a>
39
+ <a class="retry-button">Try again</a>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="grid-container">
44
+ <div class="grid-row">
45
+ <div class="grid-cell"></div>
46
+ <div class="grid-cell"></div>
47
+ <div class="grid-cell"></div>
48
+ <div class="grid-cell"></div>
49
+ </div>
50
+ <div class="grid-row">
51
+ <div class="grid-cell"></div>
52
+ <div class="grid-cell"></div>
53
+ <div class="grid-cell"></div>
54
+ <div class="grid-cell"></div>
55
+ </div>
56
+ <div class="grid-row">
57
+ <div class="grid-cell"></div>
58
+ <div class="grid-cell"></div>
59
+ <div class="grid-cell"></div>
60
+ <div class="grid-cell"></div>
61
+ </div>
62
+ <div class="grid-row">
63
+ <div class="grid-cell"></div>
64
+ <div class="grid-cell"></div>
65
+ <div class="grid-cell"></div>
66
+ <div class="grid-cell"></div>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="tile-container">
71
+
72
+ </div>
73
+ </div>
74
+
75
+ <p class="game-explanation">
76
+ <strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
77
+ </p>
78
+ <hr>
79
+ <p>
80
+ <strong class="important">Note:</strong> This site is the official version of 2048. You can play it on your phone via <a href="http://git.io/2048">http://git.io/2048.</a> All other apps or sites are derivatives or fakes, and should be used with caution.
81
+ </p>
82
+ <hr>
83
+ <p>
84
+ Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
85
+ </p>
86
+ </div>
87
+
88
+ <script src="js/bind_polyfill.js"></script>
89
+ <script src="js/classlist_polyfill.js"></script>
90
+ <script src="js/animframe_polyfill.js"></script>
91
+ <script src="js/keyboard_input_manager.js"></script>
92
+ <script src="js/html_actuator.js"></script>
93
+ <script src="js/grid.js"></script>
94
+ <script src="js/tile.js"></script>
95
+ <script src="js/local_storage_manager.js"></script>
96
+ <script src="js/game_manager.js"></script>
97
+ <script src="js/application.js"></script>
98
+ </body>
99
+ </html>
2048/js/animframe_polyfill.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function () {
2
+ var lastTime = 0;
3
+ var vendors = ['webkit', 'moz'];
4
+ for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
5
+ window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
6
+ window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||
7
+ window[vendors[x] + 'CancelRequestAnimationFrame'];
8
+ }
9
+
10
+ if (!window.requestAnimationFrame) {
11
+ window.requestAnimationFrame = function (callback) {
12
+ var currTime = new Date().getTime();
13
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
14
+ var id = window.setTimeout(function () {
15
+ callback(currTime + timeToCall);
16
+ },
17
+ timeToCall);
18
+ lastTime = currTime + timeToCall;
19
+ return id;
20
+ };
21
+ }
22
+
23
+ if (!window.cancelAnimationFrame) {
24
+ window.cancelAnimationFrame = function (id) {
25
+ clearTimeout(id);
26
+ };
27
+ }
28
+ }());
2048/js/application.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // Wait till the browser is ready to render the game (avoids glitches)
2
+ window.requestAnimationFrame(function () {
3
+ new GameManager(4, KeyboardInputManager, HTMLActuator, LocalStorageManager);
4
+ });
2048/js/bind_polyfill.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Function.prototype.bind = Function.prototype.bind || function (target) {
2
+ var self = this;
3
+ return function (args) {
4
+ if (!(args instanceof Array)) {
5
+ args = [args];
6
+ }
7
+ self.apply(target, args);
8
+ };
9
+ };
2048/js/classlist_polyfill.js ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function () {
2
+ if (typeof window.Element === "undefined" ||
3
+ "classList" in document.documentElement) {
4
+ return;
5
+ }
6
+
7
+ var prototype = Array.prototype,
8
+ push = prototype.push,
9
+ splice = prototype.splice,
10
+ join = prototype.join;
11
+
12
+ function DOMTokenList(el) {
13
+ this.el = el;
14
+ // The className needs to be trimmed and split on whitespace
15
+ // to retrieve a list of classes.
16
+ var classes = el.className.replace(/^\s+|\s+$/g, '').split(/\s+/);
17
+ for (var i = 0; i < classes.length; i++) {
18
+ push.call(this, classes[i]);
19
+ }
20
+ }
21
+
22
+ DOMTokenList.prototype = {
23
+ add: function (token) {
24
+ if (this.contains(token)) return;
25
+ push.call(this, token);
26
+ this.el.className = this.toString();
27
+ },
28
+ contains: function (token) {
29
+ return this.el.className.indexOf(token) != -1;
30
+ },
31
+ item: function (index) {
32
+ return this[index] || null;
33
+ },
34
+ remove: function (token) {
35
+ if (!this.contains(token)) return;
36
+ for (var i = 0; i < this.length; i++) {
37
+ if (this[i] == token) break;
38
+ }
39
+ splice.call(this, i, 1);
40
+ this.el.className = this.toString();
41
+ },
42
+ toString: function () {
43
+ return join.call(this, ' ');
44
+ },
45
+ toggle: function (token) {
46
+ if (!this.contains(token)) {
47
+ this.add(token);
48
+ } else {
49
+ this.remove(token);
50
+ }
51
+
52
+ return this.contains(token);
53
+ }
54
+ };
55
+
56
+ window.DOMTokenList = DOMTokenList;
57
+
58
+ function defineElementGetter(obj, prop, getter) {
59
+ if (Object.defineProperty) {
60
+ Object.defineProperty(obj, prop, {
61
+ get: getter
62
+ });
63
+ } else {
64
+ obj.__defineGetter__(prop, getter);
65
+ }
66
+ }
67
+
68
+ defineElementGetter(HTMLElement.prototype, 'classList', function () {
69
+ return new DOMTokenList(this);
70
+ });
71
+ })();
2048/js/game_manager.js ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function GameManager(size, InputManager, Actuator, StorageManager) {
2
+ this.size = size; // Size of the grid
3
+ this.inputManager = new InputManager;
4
+ this.storageManager = new StorageManager;
5
+ this.actuator = new Actuator;
6
+
7
+ this.startTiles = 2;
8
+
9
+ this.inputManager.on("move", this.move.bind(this));
10
+ this.inputManager.on("restart", this.restart.bind(this));
11
+ this.inputManager.on("keepPlaying", this.keepPlaying.bind(this));
12
+
13
+ this.setup();
14
+ }
15
+
16
+ // Restart the game
17
+ GameManager.prototype.restart = function () {
18
+ this.storageManager.clearGameState();
19
+ this.actuator.continueGame(); // Clear the game won/lost message
20
+ this.setup();
21
+ };
22
+
23
+ // Keep playing after winning (allows going over 2048)
24
+ GameManager.prototype.keepPlaying = function () {
25
+ this.keepPlaying = true;
26
+ this.actuator.continueGame(); // Clear the game won/lost message
27
+ };
28
+
29
+ // Return true if the game is lost, or has won and the user hasn't kept playing
30
+ GameManager.prototype.isGameTerminated = function () {
31
+ return this.over || (this.won && !this.keepPlaying);
32
+ };
33
+
34
+ // Set up the game
35
+ GameManager.prototype.setup = function () {
36
+ var previousState = this.storageManager.getGameState();
37
+
38
+ // Reload the game from a previous game if present
39
+ if (previousState) {
40
+ this.grid = new Grid(previousState.grid.size,
41
+ previousState.grid.cells); // Reload grid
42
+ this.score = previousState.score;
43
+ this.over = previousState.over;
44
+ this.won = previousState.won;
45
+ this.keepPlaying = previousState.keepPlaying;
46
+ } else {
47
+ this.grid = new Grid(this.size);
48
+ this.score = 0;
49
+ this.over = false;
50
+ this.won = false;
51
+ this.keepPlaying = false;
52
+
53
+ // Add the initial tiles
54
+ this.addStartTiles();
55
+ }
56
+
57
+ // Update the actuator
58
+ this.actuate();
59
+ };
60
+
61
+ // Set up the initial tiles to start the game with
62
+ GameManager.prototype.addStartTiles = function () {
63
+ for (var i = 0; i < this.startTiles; i++) {
64
+ this.addRandomTile();
65
+ }
66
+ };
67
+
68
+ // Adds a tile in a random position
69
+ GameManager.prototype.addRandomTile = function () {
70
+ if (this.grid.cellsAvailable()) {
71
+ var value = Math.random() < 0.9 ? 2 : 4;
72
+ var tile = new Tile(this.grid.randomAvailableCell(), value);
73
+
74
+ this.grid.insertTile(tile);
75
+ }
76
+ };
77
+
78
+ // Sends the updated grid to the actuator
79
+ GameManager.prototype.actuate = function () {
80
+ if (this.storageManager.getBestScore() < this.score) {
81
+ this.storageManager.setBestScore(this.score);
82
+ }
83
+
84
+ // Clear the state when the game is over (game over only, not win)
85
+ if (this.over) {
86
+ this.storageManager.clearGameState();
87
+ } else {
88
+ this.storageManager.setGameState(this.serialize());
89
+ }
90
+
91
+ this.actuator.actuate(this.grid, {
92
+ score: this.score,
93
+ over: this.over,
94
+ won: this.won,
95
+ bestScore: this.storageManager.getBestScore(),
96
+ terminated: this.isGameTerminated()
97
+ });
98
+
99
+ };
100
+
101
+ // Represent the current game as an object
102
+ GameManager.prototype.serialize = function () {
103
+ return {
104
+ grid: this.grid.serialize(),
105
+ score: this.score,
106
+ over: this.over,
107
+ won: this.won,
108
+ keepPlaying: this.keepPlaying
109
+ };
110
+ };
111
+
112
+ // Save all tile positions and remove merger info
113
+ GameManager.prototype.prepareTiles = function () {
114
+ this.grid.eachCell(function (x, y, tile) {
115
+ if (tile) {
116
+ tile.mergedFrom = null;
117
+ tile.savePosition();
118
+ }
119
+ });
120
+ };
121
+
122
+ // Move a tile and its representation
123
+ GameManager.prototype.moveTile = function (tile, cell) {
124
+ this.grid.cells[tile.x][tile.y] = null;
125
+ this.grid.cells[cell.x][cell.y] = tile;
126
+ tile.updatePosition(cell);
127
+ };
128
+
129
+ // Move tiles on the grid in the specified direction
130
+ GameManager.prototype.move = function (direction) {
131
+ // 0: up, 1: right, 2: down, 3: left
132
+ var self = this;
133
+
134
+ if (this.isGameTerminated()) return; // Don't do anything if the game's over
135
+
136
+ var cell, tile;
137
+
138
+ var vector = this.getVector(direction);
139
+ var traversals = this.buildTraversals(vector);
140
+ var moved = false;
141
+
142
+ // Save the current tile positions and remove merger information
143
+ this.prepareTiles();
144
+
145
+ // Traverse the grid in the right direction and move tiles
146
+ traversals.x.forEach(function (x) {
147
+ traversals.y.forEach(function (y) {
148
+ cell = { x: x, y: y };
149
+ tile = self.grid.cellContent(cell);
150
+
151
+ if (tile) {
152
+ var positions = self.findFarthestPosition(cell, vector);
153
+ var next = self.grid.cellContent(positions.next);
154
+
155
+ // Only one merger per row traversal?
156
+ if (next && next.value === tile.value && !next.mergedFrom) {
157
+ var merged = new Tile(positions.next, tile.value * 2);
158
+ merged.mergedFrom = [tile, next];
159
+
160
+ self.grid.insertTile(merged);
161
+ self.grid.removeTile(tile);
162
+
163
+ // Converge the two tiles' positions
164
+ tile.updatePosition(positions.next);
165
+
166
+ // Update the score
167
+ self.score += merged.value;
168
+
169
+ // The mighty 2048 tile
170
+ if (merged.value === 2048) self.won = true;
171
+ } else {
172
+ self.moveTile(tile, positions.farthest);
173
+ }
174
+
175
+ if (!self.positionsEqual(cell, tile)) {
176
+ moved = true; // The tile moved from its original cell!
177
+ }
178
+ }
179
+ });
180
+ });
181
+
182
+ if (moved) {
183
+ this.addRandomTile();
184
+
185
+ if (!this.movesAvailable()) {
186
+ this.over = true; // Game over!
187
+ }
188
+
189
+ this.actuate();
190
+ }
191
+ };
192
+
193
+ // Get the vector representing the chosen direction
194
+ GameManager.prototype.getVector = function (direction) {
195
+ // Vectors representing tile movement
196
+ var map = {
197
+ 0: { x: 0, y: -1 }, // Up
198
+ 1: { x: 1, y: 0 }, // Right
199
+ 2: { x: 0, y: 1 }, // Down
200
+ 3: { x: -1, y: 0 } // Left
201
+ };
202
+
203
+ return map[direction];
204
+ };
205
+
206
+ // Build a list of positions to traverse in the right order
207
+ GameManager.prototype.buildTraversals = function (vector) {
208
+ var traversals = { x: [], y: [] };
209
+
210
+ for (var pos = 0; pos < this.size; pos++) {
211
+ traversals.x.push(pos);
212
+ traversals.y.push(pos);
213
+ }
214
+
215
+ // Always traverse from the farthest cell in the chosen direction
216
+ if (vector.x === 1) traversals.x = traversals.x.reverse();
217
+ if (vector.y === 1) traversals.y = traversals.y.reverse();
218
+
219
+ return traversals;
220
+ };
221
+
222
+ GameManager.prototype.findFarthestPosition = function (cell, vector) {
223
+ var previous;
224
+
225
+ // Progress towards the vector direction until an obstacle is found
226
+ do {
227
+ previous = cell;
228
+ cell = { x: previous.x + vector.x, y: previous.y + vector.y };
229
+ } while (this.grid.withinBounds(cell) &&
230
+ this.grid.cellAvailable(cell));
231
+
232
+ return {
233
+ farthest: previous,
234
+ next: cell // Used to check if a merge is required
235
+ };
236
+ };
237
+
238
+ GameManager.prototype.movesAvailable = function () {
239
+ return this.grid.cellsAvailable() || this.tileMatchesAvailable();
240
+ };
241
+
242
+ // Check for available matches between tiles (more expensive check)
243
+ GameManager.prototype.tileMatchesAvailable = function () {
244
+ var self = this;
245
+
246
+ var tile;
247
+
248
+ for (var x = 0; x < this.size; x++) {
249
+ for (var y = 0; y < this.size; y++) {
250
+ tile = this.grid.cellContent({ x: x, y: y });
251
+
252
+ if (tile) {
253
+ for (var direction = 0; direction < 4; direction++) {
254
+ var vector = self.getVector(direction);
255
+ var cell = { x: x + vector.x, y: y + vector.y };
256
+
257
+ var other = self.grid.cellContent(cell);
258
+
259
+ if (other && other.value === tile.value) {
260
+ return true; // These two tiles can be merged
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+
267
+ return false;
268
+ };
269
+
270
+ GameManager.prototype.positionsEqual = function (first, second) {
271
+ return first.x === second.x && first.y === second.y;
272
+ };
2048/js/grid.js ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function Grid(size, previousState) {
2
+ this.size = size;
3
+ this.cells = previousState ? this.fromState(previousState) : this.empty();
4
+ }
5
+
6
+ // Build a grid of the specified size
7
+ Grid.prototype.empty = function () {
8
+ var cells = [];
9
+
10
+ for (var x = 0; x < this.size; x++) {
11
+ var row = cells[x] = [];
12
+
13
+ for (var y = 0; y < this.size; y++) {
14
+ row.push(null);
15
+ }
16
+ }
17
+
18
+ return cells;
19
+ };
20
+
21
+ Grid.prototype.fromState = function (state) {
22
+ var cells = [];
23
+
24
+ for (var x = 0; x < this.size; x++) {
25
+ var row = cells[x] = [];
26
+
27
+ for (var y = 0; y < this.size; y++) {
28
+ var tile = state[x][y];
29
+ row.push(tile ? new Tile(tile.position, tile.value) : null);
30
+ }
31
+ }
32
+
33
+ return cells;
34
+ };
35
+
36
+ // Find the first available random position
37
+ Grid.prototype.randomAvailableCell = function () {
38
+ var cells = this.availableCells();
39
+
40
+ if (cells.length) {
41
+ return cells[Math.floor(Math.random() * cells.length)];
42
+ }
43
+ };
44
+
45
+ Grid.prototype.availableCells = function () {
46
+ var cells = [];
47
+
48
+ this.eachCell(function (x, y, tile) {
49
+ if (!tile) {
50
+ cells.push({ x: x, y: y });
51
+ }
52
+ });
53
+
54
+ return cells;
55
+ };
56
+
57
+ // Call callback for every cell
58
+ Grid.prototype.eachCell = function (callback) {
59
+ for (var x = 0; x < this.size; x++) {
60
+ for (var y = 0; y < this.size; y++) {
61
+ callback(x, y, this.cells[x][y]);
62
+ }
63
+ }
64
+ };
65
+
66
+ // Check if there are any cells available
67
+ Grid.prototype.cellsAvailable = function () {
68
+ return !!this.availableCells().length;
69
+ };
70
+
71
+ // Check if the specified cell is taken
72
+ Grid.prototype.cellAvailable = function (cell) {
73
+ return !this.cellOccupied(cell);
74
+ };
75
+
76
+ Grid.prototype.cellOccupied = function (cell) {
77
+ return !!this.cellContent(cell);
78
+ };
79
+
80
+ Grid.prototype.cellContent = function (cell) {
81
+ if (this.withinBounds(cell)) {
82
+ return this.cells[cell.x][cell.y];
83
+ } else {
84
+ return null;
85
+ }
86
+ };
87
+
88
+ // Inserts a tile at its position
89
+ Grid.prototype.insertTile = function (tile) {
90
+ this.cells[tile.x][tile.y] = tile;
91
+ };
92
+
93
+ Grid.prototype.removeTile = function (tile) {
94
+ this.cells[tile.x][tile.y] = null;
95
+ };
96
+
97
+ Grid.prototype.withinBounds = function (position) {
98
+ return position.x >= 0 && position.x < this.size &&
99
+ position.y >= 0 && position.y < this.size;
100
+ };
101
+
102
+ Grid.prototype.serialize = function () {
103
+ var cellState = [];
104
+
105
+ for (var x = 0; x < this.size; x++) {
106
+ var row = cellState[x] = [];
107
+
108
+ for (var y = 0; y < this.size; y++) {
109
+ row.push(this.cells[x][y] ? this.cells[x][y].serialize() : null);
110
+ }
111
+ }
112
+
113
+ return {
114
+ size: this.size,
115
+ cells: cellState
116
+ };
117
+ };
2048/js/html_actuator.js ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function HTMLActuator() {
2
+ this.tileContainer = document.querySelector(".tile-container");
3
+ this.scoreContainer = document.querySelector(".score-container");
4
+ this.bestContainer = document.querySelector(".best-container");
5
+ this.messageContainer = document.querySelector(".game-message");
6
+
7
+ this.score = 0;
8
+ }
9
+
10
+ HTMLActuator.prototype.actuate = function (grid, metadata) {
11
+ var self = this;
12
+
13
+ window.requestAnimationFrame(function () {
14
+ self.clearContainer(self.tileContainer);
15
+
16
+ grid.cells.forEach(function (column) {
17
+ column.forEach(function (cell) {
18
+ if (cell) {
19
+ self.addTile(cell);
20
+ }
21
+ });
22
+ });
23
+
24
+ self.updateScore(metadata.score);
25
+ self.updateBestScore(metadata.bestScore);
26
+
27
+ if (metadata.terminated) {
28
+ if (metadata.over) {
29
+ self.message(false); // You lose
30
+ } else if (metadata.won) {
31
+ self.message(true); // You win!
32
+ }
33
+ }
34
+
35
+ });
36
+ };
37
+
38
+ // Continues the game (both restart and keep playing)
39
+ HTMLActuator.prototype.continueGame = function () {
40
+ this.clearMessage();
41
+ };
42
+
43
+ HTMLActuator.prototype.clearContainer = function (container) {
44
+ while (container.firstChild) {
45
+ container.removeChild(container.firstChild);
46
+ }
47
+ };
48
+
49
+ HTMLActuator.prototype.addTile = function (tile) {
50
+ var self = this;
51
+
52
+ var wrapper = document.createElement("div");
53
+ var inner = document.createElement("div");
54
+ var position = tile.previousPosition || { x: tile.x, y: tile.y };
55
+ var positionClass = this.positionClass(position);
56
+
57
+ // We can't use classlist because it somehow glitches when replacing classes
58
+ var classes = ["tile", "tile-" + tile.value, positionClass];
59
+
60
+ if (tile.value > 2048) classes.push("tile-super");
61
+
62
+ this.applyClasses(wrapper, classes);
63
+
64
+ inner.classList.add("tile-inner");
65
+ inner.textContent = tile.value;
66
+
67
+ if (tile.previousPosition) {
68
+ // Make sure that the tile gets rendered in the previous position first
69
+ window.requestAnimationFrame(function () {
70
+ classes[2] = self.positionClass({ x: tile.x, y: tile.y });
71
+ self.applyClasses(wrapper, classes); // Update the position
72
+ });
73
+ } else if (tile.mergedFrom) {
74
+ classes.push("tile-merged");
75
+ this.applyClasses(wrapper, classes);
76
+
77
+ // Render the tiles that merged
78
+ tile.mergedFrom.forEach(function (merged) {
79
+ self.addTile(merged);
80
+ });
81
+ } else {
82
+ classes.push("tile-new");
83
+ this.applyClasses(wrapper, classes);
84
+ }
85
+
86
+ // Add the inner part of the tile to the wrapper
87
+ wrapper.appendChild(inner);
88
+
89
+ // Put the tile on the board
90
+ this.tileContainer.appendChild(wrapper);
91
+ };
92
+
93
+ HTMLActuator.prototype.applyClasses = function (element, classes) {
94
+ element.setAttribute("class", classes.join(" "));
95
+ };
96
+
97
+ HTMLActuator.prototype.normalizePosition = function (position) {
98
+ return { x: position.x + 1, y: position.y + 1 };
99
+ };
100
+
101
+ HTMLActuator.prototype.positionClass = function (position) {
102
+ position = this.normalizePosition(position);
103
+ return "tile-position-" + position.x + "-" + position.y;
104
+ };
105
+
106
+ HTMLActuator.prototype.updateScore = function (score) {
107
+ this.clearContainer(this.scoreContainer);
108
+
109
+ var difference = score - this.score;
110
+ this.score = score;
111
+
112
+ this.scoreContainer.textContent = this.score;
113
+
114
+ if (difference > 0) {
115
+ var addition = document.createElement("div");
116
+ addition.classList.add("score-addition");
117
+ addition.textContent = "+" + difference;
118
+
119
+ this.scoreContainer.appendChild(addition);
120
+ }
121
+ };
122
+
123
+ HTMLActuator.prototype.updateBestScore = function (bestScore) {
124
+ this.bestContainer.textContent = bestScore;
125
+ };
126
+
127
+ HTMLActuator.prototype.message = function (won) {
128
+ var type = won ? "game-won" : "game-over";
129
+ var message = won ? "You win!" : "Game over!";
130
+
131
+ this.messageContainer.classList.add(type);
132
+ this.messageContainer.getElementsByTagName("p")[0].textContent = message;
133
+ };
134
+
135
+ HTMLActuator.prototype.clearMessage = function () {
136
+ // IE only takes one value to remove at a time.
137
+ this.messageContainer.classList.remove("game-won");
138
+ this.messageContainer.classList.remove("game-over");
139
+ };
2048/js/keyboard_input_manager.js ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function KeyboardInputManager() {
2
+ this.events = {};
3
+
4
+ if (window.navigator.msPointerEnabled) {
5
+ //Internet Explorer 10 style
6
+ this.eventTouchstart = "MSPointerDown";
7
+ this.eventTouchmove = "MSPointerMove";
8
+ this.eventTouchend = "MSPointerUp";
9
+ } else {
10
+ this.eventTouchstart = "touchstart";
11
+ this.eventTouchmove = "touchmove";
12
+ this.eventTouchend = "touchend";
13
+ }
14
+
15
+ this.listen();
16
+ }
17
+
18
+ KeyboardInputManager.prototype.on = function (event, callback) {
19
+ if (!this.events[event]) {
20
+ this.events[event] = [];
21
+ }
22
+ this.events[event].push(callback);
23
+ };
24
+
25
+ KeyboardInputManager.prototype.emit = function (event, data) {
26
+ var callbacks = this.events[event];
27
+ if (callbacks) {
28
+ callbacks.forEach(function (callback) {
29
+ callback(data);
30
+ });
31
+ }
32
+ };
33
+
34
+ KeyboardInputManager.prototype.listen = function () {
35
+ var self = this;
36
+
37
+ var map = {
38
+ 38: 0, // Up
39
+ 39: 1, // Right
40
+ 40: 2, // Down
41
+ 37: 3, // Left
42
+ 75: 0, // Vim up
43
+ 76: 1, // Vim right
44
+ 74: 2, // Vim down
45
+ 72: 3, // Vim left
46
+ 87: 0, // W
47
+ 68: 1, // D
48
+ 83: 2, // S
49
+ 65: 3 // A
50
+ };
51
+
52
+ // Respond to direction keys
53
+ document.addEventListener("keydown", function (event) {
54
+ var modifiers = event.altKey || event.ctrlKey || event.metaKey ||
55
+ event.shiftKey;
56
+ var mapped = map[event.which];
57
+
58
+ if (!modifiers) {
59
+ if (mapped !== undefined) {
60
+ event.preventDefault();
61
+ self.emit("move", mapped);
62
+ }
63
+ }
64
+
65
+ // R key restarts the game
66
+ if (!modifiers && event.which === 82) {
67
+ self.restart.call(self, event);
68
+ }
69
+ });
70
+
71
+ // Respond to button presses
72
+ this.bindButtonPress(".retry-button", this.restart);
73
+ this.bindButtonPress(".restart-button", this.restart);
74
+ this.bindButtonPress(".keep-playing-button", this.keepPlaying);
75
+
76
+ // Respond to swipe events
77
+ var touchStartClientX, touchStartClientY;
78
+ var gameContainer = document.getElementsByClassName("game-container")[0];
79
+
80
+ gameContainer.addEventListener(this.eventTouchstart, function (event) {
81
+ if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||
82
+ event.targetTouches.length > 1) {
83
+ return; // Ignore if touching with more than 1 finger
84
+ }
85
+
86
+ if (window.navigator.msPointerEnabled) {
87
+ touchStartClientX = event.pageX;
88
+ touchStartClientY = event.pageY;
89
+ } else {
90
+ touchStartClientX = event.touches[0].clientX;
91
+ touchStartClientY = event.touches[0].clientY;
92
+ }
93
+
94
+ event.preventDefault();
95
+ });
96
+
97
+ gameContainer.addEventListener(this.eventTouchmove, function (event) {
98
+ event.preventDefault();
99
+ });
100
+
101
+ gameContainer.addEventListener(this.eventTouchend, function (event) {
102
+ if ((!window.navigator.msPointerEnabled && event.touches.length > 0) ||
103
+ event.targetTouches.length > 0) {
104
+ return; // Ignore if still touching with one or more fingers
105
+ }
106
+
107
+ var touchEndClientX, touchEndClientY;
108
+
109
+ if (window.navigator.msPointerEnabled) {
110
+ touchEndClientX = event.pageX;
111
+ touchEndClientY = event.pageY;
112
+ } else {
113
+ touchEndClientX = event.changedTouches[0].clientX;
114
+ touchEndClientY = event.changedTouches[0].clientY;
115
+ }
116
+
117
+ var dx = touchEndClientX - touchStartClientX;
118
+ var absDx = Math.abs(dx);
119
+
120
+ var dy = touchEndClientY - touchStartClientY;
121
+ var absDy = Math.abs(dy);
122
+
123
+ if (Math.max(absDx, absDy) > 10) {
124
+ // (right : left) : (down : up)
125
+ self.emit("move", absDx > absDy ? (dx > 0 ? 1 : 3) : (dy > 0 ? 2 : 0));
126
+ }
127
+ });
128
+ };
129
+
130
+ KeyboardInputManager.prototype.restart = function (event) {
131
+ event.preventDefault();
132
+ this.emit("restart");
133
+ };
134
+
135
+ KeyboardInputManager.prototype.keepPlaying = function (event) {
136
+ event.preventDefault();
137
+ this.emit("keepPlaying");
138
+ };
139
+
140
+ KeyboardInputManager.prototype.bindButtonPress = function (selector, fn) {
141
+ var button = document.querySelector(selector);
142
+ button.addEventListener("click", fn.bind(this));
143
+ button.addEventListener(this.eventTouchend, fn.bind(this));
144
+ };
2048/js/local_storage_manager.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ window.fakeStorage = {
2
+ _data: {},
3
+
4
+ setItem: function (id, val) {
5
+ return this._data[id] = String(val);
6
+ },
7
+
8
+ getItem: function (id) {
9
+ return this._data.hasOwnProperty(id) ? this._data[id] : undefined;
10
+ },
11
+
12
+ removeItem: function (id) {
13
+ return delete this._data[id];
14
+ },
15
+
16
+ clear: function () {
17
+ return this._data = {};
18
+ }
19
+ };
20
+
21
+ function LocalStorageManager() {
22
+ this.bestScoreKey = "bestScore";
23
+ this.gameStateKey = "gameState";
24
+
25
+ var supported = this.localStorageSupported();
26
+ this.storage = supported ? window.localStorage : window.fakeStorage;
27
+ }
28
+
29
+ LocalStorageManager.prototype.localStorageSupported = function () {
30
+ var testKey = "test";
31
+
32
+ try {
33
+ var storage = window.localStorage;
34
+ storage.setItem(testKey, "1");
35
+ storage.removeItem(testKey);
36
+ return true;
37
+ } catch (error) {
38
+ return false;
39
+ }
40
+ };
41
+
42
+ // Best score getters/setters
43
+ LocalStorageManager.prototype.getBestScore = function () {
44
+ return this.storage.getItem(this.bestScoreKey) || 0;
45
+ };
46
+
47
+ LocalStorageManager.prototype.setBestScore = function (score) {
48
+ this.storage.setItem(this.bestScoreKey, score);
49
+ };
50
+
51
+ // Game state getters/setters and clearing
52
+ LocalStorageManager.prototype.getGameState = function () {
53
+ var stateJSON = this.storage.getItem(this.gameStateKey);
54
+ return stateJSON ? JSON.parse(stateJSON) : null;
55
+ };
56
+
57
+ LocalStorageManager.prototype.setGameState = function (gameState) {
58
+ this.storage.setItem(this.gameStateKey, JSON.stringify(gameState));
59
+ };
60
+
61
+ LocalStorageManager.prototype.clearGameState = function () {
62
+ this.storage.removeItem(this.gameStateKey);
63
+ };
2048/js/tile.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function Tile(position, value) {
2
+ this.x = position.x;
3
+ this.y = position.y;
4
+ this.value = value || 2;
5
+
6
+ this.previousPosition = null;
7
+ this.mergedFrom = null; // Tracks tiles that merged together
8
+ }
9
+
10
+ Tile.prototype.savePosition = function () {
11
+ this.previousPosition = { x: this.x, y: this.y };
12
+ };
13
+
14
+ Tile.prototype.updatePosition = function (position) {
15
+ this.x = position.x;
16
+ this.y = position.y;
17
+ };
18
+
19
+ Tile.prototype.serialize = function () {
20
+ return {
21
+ position: {
22
+ x: this.x,
23
+ y: this.y
24
+ },
25
+ value: this.value
26
+ };
27
+ };
2048/meta/apple-touch-icon.png ADDED
2048/meta/apple-touch-startup-image-640x1096.png ADDED
2048/meta/apple-touch-startup-image-640x920.png ADDED
2048/style/fonts/ClearSans-Bold-webfont.eot ADDED
Binary file (23.8 kB). View file
 
2048/style/fonts/ClearSans-Bold-webfont.svg ADDED
2048/style/fonts/ClearSans-Bold-webfont.woff ADDED
Binary file (27.1 kB). View file