diff --git a/.gitignore b/.gitignore
index b462f3d..98a0b0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.swp
*.swo
*~
+*.zip
node_modules
diff --git a/Android/js/diff.js b/Android/js/diff.js
deleted file mode 100644
index da656fe..0000000
--- a/Android/js/diff.js
+++ /dev/null
@@ -1,136 +0,0 @@
-$(document).ready(function() {
-
- $(document).on('resume', function() {
- sizeAndPos();
- })
- document.addEventListener('deviceready', function() {
- sizeAndPos();
-
- $('*').off('click mousemove mousedown mouseup mouseleave').on('click mousemove mousedown mouseup mouseleave', function(e) {
- e.preventDefault;
- })
-
- /*$('a[href^="http"]').tap(function(e) {
- e.preventDefault();
- var href = $(this).attr('href');
- var view = new MozActivity({
- name: 'view',
- data: {
- type: 'url',
- url: href
- }
- })
-
- return false;
- }).click(function(e) {
- e.preventDefault();
- return false;
- })*/
-
- /*$('a[href^="mailto"]').tap(function(e) {
- e.preventDefault();
- var mail = new MozActivity({
- name: 'new',
- data: {
- type: 'mail',
- url: $(this).attr('href')
- }
- })
- return false;
- }).click(function(e) {
- e.preventDefault();
- return false;
- })*/
-
-
-
- window.save = function() {
- var f = c.getImageData(0, 0, width(), height());
- switch(save.background) {
- case 'white': {
- c.fillStyle = 'white';
- c.globalCompositeOperation = 'destination-over';
- c.fillRect(0, 0, width(), height());
- c.fillStyle = settings.color;
- c.globalCompositeOperation = settings.composite;
- break;
- }
- case 'current color': {
- c.fillStyle = settings.bg;
- c.globalCompositeOperation = 'destination-over';
- c.fillRect(0, 0, width(), height());
- c.globalCompositeOperation = settings.composite;
- break;
- }
- }
- var data = $c[0].toDataURL();
- if( save.type == 'sketchy project' ) {
- var list = JSON.parse(localStorage.getItem('projects'));
- var index;
- if( list && list.some(function(a, i) { if( a.name == save['file name'] ) {index = i; return true} return false }) ) {
- if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name'] + '?') ) {
- console.log(index);
- list[index] = {
- name: save['file name'],
- data: data,
- points: window.points,
- settings: settings
- }
- localStorage.setItem('projects', JSON.stringify(list));
- }
- }
- else {
- list ? list.push({
- name: save['file name'],
- data: data,
- points: window.points,
- settings: settings
- }) : list = [{
- name: save['file name'],
- data: data,
- points: window.points,
- settings: settings
- }];
- localStorage.setItem('projects', JSON.stringify(list));
- }
- } else {
- var img = dataToBlob(data);
- var sd = window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {
- window.alert('SD');
- /*var req = fs.root.getFile(save['file name'] + '.png', {create: true}, function(entry) {
- alert('Entry');
- entry.createWriter(function(writer) {
- writer.write(img);
- alert('Your Sketch was saved successfuly');
- }, function() {
- alert('Something bad happened trying to save your sketch ' + save['file name'] + '\n Possible reasons:\n Duplicate Name \n Not enough permission')
- })
- })*/
- }, function(e) {
- alert('SD Error')
- //alert('Couldn\'t access filesystem\nERR: ' + e.code);
- });
- }
- c.putImageData(f, 0, 0);
- }
- window.load = function() {
- var file = JSON.parse(localStorage.getItem('projects')).filter(function(a) { return a.name == load.file })[0];
- var img = document.createElement('img');
- img.src = file.data;
- img.onload = function() {
- c.clearRect(0, 0, width(), height());
- c.drawImage(img, 0, 0);
- window.points = file.points;
- window.points.history = [{ data: c.createImageData($c.width(), $c.height()), points: []}, { data: c.getImageData(0, 0, width(), height()), points: file.points}];
- $c.first().css('background', file.settings.bg);
- window.settings.bg = file.settings.bg;
- }
- }
-
- if( !localStorage.getItem('sawVote') ) {
- $('.vote').removeClass('hidden');
- localStorage.setItem('sawVote', true);
- }
- }, false)
-
-})
diff --git a/Android/res/icons/android/icon.png b/Android/res/icons/android/icon.png
deleted file mode 100644
index bac55b3..0000000
Binary files a/Android/res/icons/android/icon.png and /dev/null differ
diff --git a/Gruntfile.js b/Gruntfile.js
index f5735ec..dc0e553 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -21,13 +21,6 @@ module.exports = function(grunt) {
dest: 'build/web/js',
filter: 'isFile'
},
- {
- expand: true,
- cwd: 'Shared/js',
- src: '**',
- dest: 'build/android/js',
- filter: 'isFile'
- },
{
expand: true,
cwd: 'Mobile/js/',
@@ -35,13 +28,6 @@ module.exports = function(grunt) {
dest: 'build/mobile/js',
filter: 'isFile'
},
- {
- expand: true,
- cwd: 'Android/js/',
- src: '*',
- dest: 'build/android/js',
- filter: 'isFile'
- },
{
expand: true,
cwd: 'Web/js/',
@@ -56,7 +42,6 @@ module.exports = function(grunt) {
production: {
files: {
'build/mobile/css/main.css': 'Shared/css/main.less',
- 'build/android/css/main.css': 'Shared/css/main.less',
'build/web/css/main.css': 'Shared/css/main.less'
},
compress: true
@@ -83,12 +68,6 @@ module.exports = function(grunt) {
src: ['index.html', 'manifest.webapp'],
dest: 'build/mobile'
},
- {
- expand: true,
- cwd: 'Android',
- src: ['index.html', 'config.xml', 'AndroidManifest.xml', 'res/**', 'icon.png'],
- dest: 'build/android'
- },
{
expand: true,
cwd: 'Web',
@@ -105,12 +84,6 @@ module.exports = function(grunt) {
src: '*/**',
dest: 'build/mobile/css'
},
- {
- expand: true,
- cwd: 'Shared/css',
- src: '*/**',
- dest: 'build/android/css'
- },
{
expand: true,
cwd: 'Shared/css',
diff --git a/Mobile/index.html b/Mobile/index.html
index abc9887..64be561 100644
--- a/Mobile/index.html
+++ b/Mobile/index.html
@@ -4,6 +4,7 @@
diff --git a/build/mobile/js/diff.js b/build/mobile/js/diff.js
index 3db3455..739ae59 100644
--- a/build/mobile/js/diff.js
+++ b/build/mobile/js/diff.js
@@ -1 +1 @@
-$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}},localStorage.getItem("sawVote")||($(".vote").removeClass("hidden"),localStorage.setItem("sawVote",!0))});
\ No newline at end of file
+$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}});
\ No newline at end of file
diff --git a/build/mobile/manifest.webapp b/build/mobile/manifest.webapp
index 326110f..663975f 100644
--- a/build/mobile/manifest.webapp
+++ b/build/mobile/manifest.webapp
@@ -1,7 +1,7 @@
{
"name": "Sketchy",
"description": "Free full-featured Sketch app",
- "version": "1.2.1",
+ "version": "1.2.2",
"fullscreen": "true",
"type": "privileged",
"launch_path": "/index.html",
@@ -37,6 +37,9 @@
"device-storage:pictures": {
"description": "Required to save sketches",
"access": "readwrite"
+ },
+ "video-capture": {
+ "description": "Test"
}
}
}
diff --git a/build/web/js/main.js b/build/web/js/main.js
index 4f82d55..b17a3c9 100644
--- a/build/web/js/main.js
+++ b/build/web/js/main.js
@@ -1 +1 @@
-"use strict";$(document).ready(function(){function a(){var b=c.getImageData(0,0,width(),height());switch(a.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var d=$c[0].toDataURL();if("sketchy project"==a.type){var e,f=JSON.parse(localStorage.getItem("projects"));f&&f.some(function(b,c){return b.name==a["file name"]?(e=c,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+a["file name"]+"?")&&(console.log(e),f[e]={name:a["file name"],data:d,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(f))):f?f.push({name:a["file name"],data:d,points:window.points,settings:settings}):f=[{name:a["file name"],data:d,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(f))}else $('
').click();c.putImageData(b,0,0)}function b(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==b.file})[0],d=document.createElement("img");d.src=a.data,d.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(d,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}yepnope({test:window.mobile,yep:["js/mobile.js","js/libs/color-picker-touch.js"],nope:["js/libs/color-picker.js"]}),$(window).resize(sizeAndPos),window.load=b,window.save=a});
\ No newline at end of file
+"use strict";$(document).ready(function(){function a(){var b=c.getImageData(0,0,width(),height());switch(a.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var d=$c[0].toDataURL();if("sketchy project"==a.type){var e,f=JSON.parse(localStorage.getItem("projects"));f&&f.some(function(b,c){return b.name==a["file name"]?(e=c,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+a["file name"]+"?")&&(console.log(e),f[e]={name:a["file name"],data:d,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(f))):f?f.push({name:a["file name"],data:d,points:window.points,settings:settings}):f=[{name:a["file name"],data:d,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(f))}else $('
').click();c.putImageData(b,0,0)}function b(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==b.file})[0],d=document.createElement("img");d.src=a.data,d.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(d,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}function d(){console.log("Ready"),Unity.Notification.showNotification("Salam","Chetori!")}yepnope({test:window.mobile,yep:["js/mobile.js","js/libs/color-picker-touch.js"],nope:["js/libs/color-picker.js"]}),$(window).resize(sizeAndPos),window.load=b,window.save=a,alert(typeof external.getUnityObject),external.getUnityObject&&(window.Unity=external.getUnityObject(1),Unity.init({name:"Sketchy",iconUrl:"file:///home/mahdi/Documents/Workshop/Sketchy/build/web/img/icons/icon60.png",onInit:d}))});
\ No newline at end of file
diff --git a/deploy-android b/deploy-android
deleted file mode 100755
index 267ca83..0000000
--- a/deploy-android
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-grunt;
-cp -R build/android/* ~/Documents/Workshop/Sketchy-Android/sketchy/www/
-cd ~/Documents/Workshop/Sketchy-Android/sketchy
-phonegap run android
diff --git a/out/css/fonts/MozTT-Bold.ttf b/out/css/fonts/MozTT-Bold.ttf
new file mode 100644
index 0000000..8ad5fab
Binary files /dev/null and b/out/css/fonts/MozTT-Bold.ttf differ
diff --git a/out/css/fonts/MozTT-Light.ttf b/out/css/fonts/MozTT-Light.ttf
new file mode 100644
index 0000000..0553c17
Binary files /dev/null and b/out/css/fonts/MozTT-Light.ttf differ
diff --git a/out/css/fonts/MozTT-Medium.ttf b/out/css/fonts/MozTT-Medium.ttf
new file mode 100644
index 0000000..91466be
Binary files /dev/null and b/out/css/fonts/MozTT-Medium.ttf differ
diff --git a/out/css/fonts/MozTT-Regular.ttf b/out/css/fonts/MozTT-Regular.ttf
new file mode 100644
index 0000000..e74e0b2
Binary files /dev/null and b/out/css/fonts/MozTT-Regular.ttf differ
diff --git a/out/css/imgs/bg_overlay_pressed_1.png b/out/css/imgs/bg_overlay_pressed_1.png
new file mode 100644
index 0000000..753e953
Binary files /dev/null and b/out/css/imgs/bg_overlay_pressed_1.png differ
diff --git a/out/css/imgs/bg_overlay_pressed_2.png b/out/css/imgs/bg_overlay_pressed_2.png
new file mode 100644
index 0000000..8db4bbf
Binary files /dev/null and b/out/css/imgs/bg_overlay_pressed_2.png differ
diff --git a/out/css/imgs/clear.png b/out/css/imgs/clear.png
new file mode 100644
index 0000000..cfcff2e
Binary files /dev/null and b/out/css/imgs/clear.png differ
diff --git a/out/css/imgs/div_line_lg_black.png b/out/css/imgs/div_line_lg_black.png
new file mode 100644
index 0000000..2fd663e
Binary files /dev/null and b/out/css/imgs/div_line_lg_black.png differ
diff --git a/out/css/imgs/div_line_sm_black.png b/out/css/imgs/div_line_sm_black.png
new file mode 100644
index 0000000..c1b4c09
Binary files /dev/null and b/out/css/imgs/div_line_sm_black.png differ
diff --git a/out/css/imgs/download.png b/out/css/imgs/download.png
new file mode 100644
index 0000000..897c9f2
Binary files /dev/null and b/out/css/imgs/download.png differ
diff --git a/out/css/imgs/header_bg_black.png b/out/css/imgs/header_bg_black.png
new file mode 100644
index 0000000..5670021
Binary files /dev/null and b/out/css/imgs/header_bg_black.png differ
diff --git a/out/css/imgs/load.png b/out/css/imgs/load.png
new file mode 100644
index 0000000..193d42f
Binary files /dev/null and b/out/css/imgs/load.png differ
diff --git a/out/css/imgs/menu.png b/out/css/imgs/menu.png
new file mode 100644
index 0000000..c0d38c0
Binary files /dev/null and b/out/css/imgs/menu.png differ
diff --git a/out/css/imgs/redo.png b/out/css/imgs/redo.png
new file mode 100644
index 0000000..d2864fb
Binary files /dev/null and b/out/css/imgs/redo.png differ
diff --git a/out/css/imgs/settings.png b/out/css/imgs/settings.png
new file mode 100644
index 0000000..6792c46
Binary files /dev/null and b/out/css/imgs/settings.png differ
diff --git a/out/css/imgs/undo.png b/out/css/imgs/undo.png
new file mode 100644
index 0000000..6117001
Binary files /dev/null and b/out/css/imgs/undo.png differ
diff --git a/out/css/main.css b/out/css/main.css
new file mode 100644
index 0000000..acbda4a
--- /dev/null
+++ b/out/css/main.css
@@ -0,0 +1,650 @@
+@font-face {
+ font-family: 'MozTT-Regular';
+ src: url('fonts/MozTT-Regular.ttf');
+}
+@font-face {
+ font-family: 'MozTT-Light';
+ src: url('fonts/MozTT-Light.ttf');
+}
+@font-face {
+ font-family: 'MozTT-Medium';
+ src: url('fonts/MozTT-Medium.ttf');
+}
+@font-face {
+ font-family: 'MozTT-Bold';
+ src: url('fonts/MozTT-Bold.ttf');
+}
+/* Purty Picker Copyright 2013 Jayden Seric (MIT license): https://github.com/jaydenseric/Purty-Picker */
+/* Core: No touchy! */
+.color-picker .spectrum {
+ position: relative;
+ /* To position pin, luminosity filter */
+ background: linear-gradient(#808080, transparent), linear-gradient(90deg, #ff0000, #ff2b00, #ff5500, #ff8000, #ffaa00, #ffd500, #ffff00, #d4ff00, #aaff00, #80ff00, #55ff00, #2bff00, #00ff00, #00ff2b, #00ff55, #00ff80, #00ffaa, #00ffd5, #00ffff, #00d4ff, #00aaff, #007fff, #0055ff, #002bff, #0000ff, #2a00ff, #5500ff, #7f00ff, #aa00ff, #d400ff, #ff00ff, #ff00d4, #ff00aa, #ff0080, #ff0055, #ff002b, #ff0000);
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ /* Prevent pin interaction causing content selection */
+ cursor: crosshair;
+}
+.color-picker .spectrum.active {
+ cursor: none;
+}
+.color-picker .spectrum.active .pin {
+ cursor: none;
+}
+.color-picker .spectrum > div {
+ /* Luminosity filter */
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+}
+.color-picker .spectrum .pin {
+ position: absolute;
+ cursor: move;
+}
+/* Customization: Default skin */
+.color-picker {
+ margin: 20px;
+ padding: 11px;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ background-color: #f5f5f5;
+}
+.color-picker .color,
+.color-picker .luminosity {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ display: block;
+ width: 100%;
+}
+.color-picker .format {
+ display: block;
+ margin: 0 auto 10px auto;
+}
+.color-picker .color {
+ -webkit-appearance: none;
+ border: 0;
+ border-radius: 2px;
+ padding: 10px;
+ text-align: center;
+ font-size: 11px;
+ letter-spacing: 1px;
+ font-family: Consolas, Monaco, 'Andale Mono', monospace;
+ color: rgba(0, 0, 0, 0.6);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
+ transition: color 0.2s;
+}
+.color-picker .color.dark {
+ color: rgba(255, 255, 255, 0.7);
+}
+.color-picker .spectrum {
+ height: 150px;
+ /* Arbitary but required */
+ overflow: hidden;
+ /* Prevent pin overflowing container */
+ border-radius: 2px;
+ margin: 10px 0;
+}
+.color-picker .spectrum > div {
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
+}
+.color-picker .spectrum .pin {
+ margin-left: -4px;
+ margin-top: -4px;
+ width: 4px;
+ height: 4px;
+ border: 2px solid white;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
+ border-radius: 100%;
+}
+.color-picker .luminosity {
+ margin: 0;
+}
+/* ----------------------------------
+* Seekbars
+* ---------------------------------- */
+div[role="slider"] {
+ position: relative;
+ height: 3.5rem;
+}
+div[role="slider"] > div {
+ display: block;
+ padding: 0;
+ overflow-y: hidden;
+ position: relative;
+ height: 100%;
+}
+div[role="slider"] progress {
+ width: 100%;
+ background: #000;
+ border: none;
+ height: 0.1rem;
+ display: block;
+ border-radius: 0;
+ margin-top: 1.9rem;
+}
+div[role="slider"] progress::-moz-progress-bar {
+ background: #01c5ed;
+ height: 0.6rem;
+ margin-top: -0.3rem;
+ border-radius: 0;
+}
+div[role="slider"] > label {
+ font-size: 1.5rem;
+ line-height: 3.8rem;
+ font-family: sans-serif;
+ color: #00aacb;
+ float: right;
+ padding: 0 0 0 1rem;
+ height: 3.5rem;
+ width: auto;
+}
+div[role="slider"] label:first-of-type {
+ float: left;
+ padding: 0 1rem 0 0;
+}
+div[role="slider"] > label.icon {
+ width: 3rem;
+ height: 3rem;
+ margin-top: 0.5rem;
+ font-size: 0;
+ background: no-repeat right top / 3rem auto;
+}
+div[role="slider"] > label.icon:first-of-type {
+ background-position: top left;
+}
+div[role="slider"] button {
+ width: 3.2rem;
+ height: 3.2rem;
+ background: url(seekbars/images/ui/handler.png) no-repeat center center / 3rem auto;
+ font: 0/0 a;
+ position: absolute;
+ top: 50%;
+ left: 0;
+ margin: -1.5rem 0 0 -1.6rem;
+ border-radius: 3.2rem;
+ border: solid 0.1rem transparent;
+ transition: border 0.15s ease;
+ padding: 0;
+ z-index: 10;
+}
+div[role="slider"] button:active {
+ border: solid 0.5rem #01c5ed;
+}
+/* ----------------------------------
+ * Value selector (Single & Multiple)
+ * ---------------------------------- */
+/* Main dialog setup */
+form[role="dialog"][data-type="value-selector"] {
+ background: url(value_selector/images/ui/pattern.png) repeat left top, url(value_selector/images/ui/gradient.png) no-repeat left top / 100% 100%;
+ overflow: hidden;
+ position: absolute;
+ z-index: 100;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 0 0 7rem;
+ color: #fff;
+ font-family: sans-serif;
+}
+form[role="dialog"][data-type="value-selector"] > section {
+ padding: 0 1.5rem 0;
+ -moz-box-sizing: padding-box;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+}
+form[role="dialog"][data-type="value-selector"] h1 {
+ font-weight: 400;
+ font-size: 1.9rem;
+ line-height: 4.8rem;
+ color: #fff;
+ border-bottom: 0.1rem solid #616262;
+ background: rgba(0, 0, 0, 0.2);
+ margin: 0 -1.5rem;
+ padding: 0 3rem 1rem;
+ height: 4.8rem;
+ -moz-box-sizing: border-box;
+}
+/* Specific component code */
+form[role="dialog"][data-type="value-selector"] [role="listbox"] {
+ position: relative;
+ padding: 0;
+ margin: 0 -1.5rem;
+ max-height: calc(95%);
+ overflow: auto;
+ border-top: solid 0.1rem #222323;
+}
+form[role="dialog"][data-type="value-selector"] .scrollable:before {
+ content: "";
+ display: block;
+ position: absolute;
+ pointer-events: none;
+ top: 4.8rem;
+ left: 0;
+ right: 0;
+ bottom: 6.9rem;
+ background: url(value_selector/images/ui/shadow.png) repeat-x left top, url(value_selector/images/ui/shadow-invert.png) repeat-x left bottom;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li {
+ margin: 0;
+ padding: 0 1.5rem;
+ height: auto;
+ list-style: none;
+ position: relative;
+ font-weight: lighter;
+ font-size: 2.2rem;
+ line-height: 3.9rem;
+ color: #fff;
+ transition: background-color 0.2s ease;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:first-child label {
+ border-top-color: transparent;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li label {
+ outline: none;
+ display: block;
+ color: #fff;
+ border-top: 0.1rem solid #666;
+ border-bottom: 0.1rem solid #000;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:last-child label {
+ border-bottom-color: transparent;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li label span {
+ display: block;
+ padding: 1rem 1.5rem;
+ line-height: 4rem;
+ word-wrap: break-word;
+}
+/* Pressed status */
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active {
+ background-color: #00ABCC;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active label {
+ border-color: transparent;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active + li label {
+ border-top-color: #000;
+}
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active label span {
+ color: #fff !important;
+ background-image: none;
+}
+/* Checked status */
+form[role="dialog"][data-type="value-selector"] [role="listbox"] li[aria-selected="true"]:not([data-input]) span {
+ padding-right: 2.6rem;
+ margin-right: 1.2rem;
+ color: #00abcd;
+ background: transparent url(value_selector/images/icons/checked.png) no-repeat 100% 50%;
+ background-size: 2rem;
+}
+/* Menu & buttons setup */
+form[role="dialog"][data-type="value-selector"] menu {
+ white-space: nowrap;
+ margin: 0;
+ padding: 1.5rem;
+ border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
+ background: #2d2d2d url(value_selector/images/ui/pattern.png) repeat left top;
+ display: block;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+form[role="dialog"][data-type="value-selector"] menu button::-moz-focus-inner {
+ border: none;
+ outline: none;
+}
+form[role="dialog"][data-type="value-selector"] menu button,
+.button {
+ width: calc(49.5%);
+ height: 3.8rem;
+ margin: 0 0 1rem;
+ padding: 0 1.5rem;
+ -moz-box-sizing: border-box;
+ display: inline-block;
+ vertical-align: middle;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ background: #fafafa url(value_selector/images/ui/default.png) repeat-x left bottom / auto 100%;
+ border: 0.1rem solid #a6a6a6;
+ border-radius: 0.3rem;
+ font-weight: 500;
+ font-size: 1.6rem;
+ line-height: 3.8rem;
+ color: #333;
+ text-align: center;
+ text-shadow: 0.1rem 0.1rem 0 rgba(255, 255, 255, 0.3);
+ text-decoration: none;
+ outline: none;
+}
+/* Press (default & affirmative) */
+form[role="dialog"][data-type="value-selector"] menu button:active,
+form[role="dialog"][data-type="value-selector"] menu button.affirmative:active,
+.button:active {
+ border-color: #008aaa;
+ background: #008aaa;
+ color: #333;
+}
+/* affirmative */
+form[role="dialog"][data-type="value-selector"] menu button.affirmative,
+.button.affirmative {
+ background-image: url(value_selector/images/ui/affirmative.png);
+ background-color: #00caf2;
+ border-color: #008eab;
+}
+form[role="dialog"][data-type="value-selector"] menu button:last-child {
+ margin-left: 1rem;
+}
+form[role="dialog"][data-type="value-selector"] menu button,
+form[role="dialog"][data-type="value-selector"] menu button:first-child {
+ margin: 0;
+}
+form[role="dialog"][data-type="value-selector"] menu button.full,
+.button.full {
+ width: 100%;
+}
+/* Right to left tweaks */
+html[dir="rtl"] #value-selector li input:checked + span,
+html[dir="rtl"] #value-selector li[aria-selected="true"] span {
+ padding-left: 2.6rem;
+ margin-left: 1.2rem;
+}
+html,
+body {
+ margin: 0;
+ font-size: 10px;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+}
+*::-moz-focus-inner {
+ border: none;
+}
+*:focus {
+ outline: none;
+}
+.hidden {
+ display: none !important;
+ visibility: none !important;
+}
+div#container {
+ position: absolute;
+}
+canvas {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+canvas:first-of-type {
+ background: white;
+}
+.separator {
+ display: block;
+ height: 4.8rem;
+ width: 0.1rem;
+}
+.separator.long {
+ background: url('imgs/div_line_lg_black.png');
+}
+.separator.small {
+ background: url('imgs/div_line_sm_black.png');
+}
+.separator.left {
+ float: left;
+}
+.separator.right {
+ float: right;
+}
+.separator.menu {
+ position: relative;
+ left: -3rem;
+}
+.overlay {
+ z-index: 9999;
+ position: absolute;
+ left: 0;
+ top: 5.3rem;
+}
+button {
+ -moz-appearance: none;
+ z-index: 1;
+ position: relative;
+ border: none;
+}
+.close {
+ display: block;
+ width: 2rem;
+ height: 2rem;
+ padding: 0 0 0.2rem 0.2rem;
+ font-size: 10pt;
+ border: 1px solid #e3e3e3;
+ border-radius: 50%;
+ position: absolute;
+ text-align: center;
+ top: -2%;
+ left: 97%;
+}
+.picker,
+.about,
+.tour,
+.vote {
+ font-family: 'MozTT-Light';
+ width: 30rem;
+ height: 24.6rem;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ margin-top: -12.3rem;
+ margin-left: -15rem;
+}
+.picker .color-picker,
+.about .color-picker,
+.tour .color-picker,
+.vote .color-picker {
+ margin: 0;
+}
+.about,
+.tour,
+.vote {
+ background: #262626;
+ padding: 1rem 2rem;
+ height: 23rem;
+ margin-top: -11.5rem;
+ margin-left: -17rem;
+ border-radius: 0.2rem;
+ color: white;
+ box-shadow: 0 0 0.3rem black;
+}
+.about a,
+.tour a,
+.vote a,
+.about a:link,
+.tour a:link,
+.vote a:link,
+.about a:visited,
+.tour a:visited,
+.vote a:visited,
+.about a:active,
+.tour a:active,
+.vote a:active {
+ color: white;
+}
+.about .close,
+.tour .close,
+.vote .close {
+ background: #262626;
+ color: white;
+ border: 1px solid gray;
+}
+.about p,
+.tour p,
+.vote p {
+ font-size: 11pt;
+}
+.about span,
+.tour span,
+.vote span {
+ font-size: 8pt;
+}
+.tour .button,
+.vote .button {
+ width: 30rem;
+ position: absolute;
+ bottom: 1rem;
+ left: 1.8rem;
+}
+.vote {
+ height: 30rem;
+}
+header {
+ width: 100%;
+ height: 5.3rem;
+ background: url('imgs/header_bg_black.png');
+}
+header button {
+ width: 5rem;
+ height: 5rem;
+}
+header .menu {
+ background: url('imgs/menu.png') -12px center no-repeat;
+ float: left;
+}
+header .menu:active {
+ background: url('imgs/menu.png') -12px center no-repeat, url('imgs/bg_overlay_pressed_1.png') left no-repeat;
+}
+header .save {
+ background: url('imgs/download.png') center center no-repeat;
+ float: right;
+}
+header .save:active {
+ background: url('imgs/download.png') center center no-repeat, url('imgs/bg_overlay_pressed_2.png') center center;
+}
+header .load {
+ background: url('imgs/load.png') center center no-repeat;
+ float: right;
+}
+header .load:active {
+ background: url('imgs/load.png') center center no-repeat, url('imgs/bg_overlay_pressed_2.png') center center;
+}
+header #title {
+ color: white;
+ font-size: 11pt;
+ font-family: 'MozTT-Regular';
+ float: left;
+ margin: 1.5rem 0;
+ position: relative;
+ left: -2rem;
+}
+#menu {
+ width: 15.4rem;
+ height: 100%;
+ display: block;
+ background: #262626;
+ position: absolute;
+ left: -15.4rem;
+ top: 5rem;
+ color: white;
+ transition: left 0.3s ease-out;
+ border-collapse: collapse;
+ overflow: hidden;
+}
+#menu.pulled {
+ left: 0;
+ transition: left 0.3s ease-out;
+}
+#menu button[id^='set'],
+#menu p,
+#menu .bottom button {
+ background: none;
+ display: block;
+ width: 75%;
+ color: white;
+ text-align: left;
+ margin: 1rem 2.5rem;
+ font-family: 'MozTT-Light' !important;
+ font-size: 9pt;
+ padding: 0 0.6rem;
+ cursor: pointer;
+}
+#menu p {
+ width: 65%;
+}
+#menu span {
+ float: right;
+ font-size: 7pt;
+ padding-top: 0.3rem;
+}
+#menu div[role='slider'] {
+ width: 60%;
+ float: right;
+ margin: 0 2rem 0 0;
+}
+#menu div[role='slider'] div {
+ overflow: visible;
+}
+#menu div[role='slider'] div button {
+ margin-top: -3.4rem;
+ left: 0%;
+}
+#menu hr {
+ clear: both;
+ padding: 0.7rem 0;
+ margin-bottom: 0.7rem;
+ border: none;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+}
+#menu *[class^='icon'] {
+ display: block;
+ margin: 1rem 0.5rem;
+ font-family: 'MozTT-Regular' !important;
+}
+#menu *[class^='icon']:nth-of-type(2) {
+ padding-top: 0.5rem;
+}
+#menu *[class^='icon']:before {
+ content: '';
+ background-size: 2rem;
+ width: 2rem;
+ height: 2rem;
+ display: block;
+ float: left;
+ margin: -0.3rem 0.5rem 0 0;
+}
+#menu .icon-settings:before {
+ background-image: url('imgs/settings.png');
+}
+#menu .icon-clear:before {
+ background-image: url('imgs/clear.png');
+}
+#menu .icon-undo:before {
+ background-image: url('imgs/undo.png');
+}
+#menu .icon-redo:before {
+ background-image: url('imgs/redo.png');
+}
+#menu .options {
+ display: table-row;
+ vertical-align: top;
+ margin-top: 1rem;
+ width: 100%;
+}
+#menu .bottom {
+ width: 100%;
+ position: absolute;
+ bottom: 5rem;
+}
+#menu .bottom button[class^='icon'] {
+ margin-left: 3.5rem;
+}
+#menu .bottom button {
+ margin-left: 5rem;
+}
diff --git a/out/css/seekbars/images/ui/handler.png b/out/css/seekbars/images/ui/handler.png
new file mode 100644
index 0000000..246b7b4
Binary files /dev/null and b/out/css/seekbars/images/ui/handler.png differ
diff --git a/out/css/seekbars/images/ui/handler@1.5x.png b/out/css/seekbars/images/ui/handler@1.5x.png
new file mode 100644
index 0000000..26a5092
Binary files /dev/null and b/out/css/seekbars/images/ui/handler@1.5x.png differ
diff --git a/out/css/seekbars/images/ui/handler@2x.png b/out/css/seekbars/images/ui/handler@2x.png
new file mode 100644
index 0000000..9a69e77
Binary files /dev/null and b/out/css/seekbars/images/ui/handler@2x.png differ
diff --git a/out/css/seekbars/seekbars.css b/out/css/seekbars/seekbars.css
new file mode 100644
index 0000000..a92a477
--- /dev/null
+++ b/out/css/seekbars/seekbars.css
@@ -0,0 +1,79 @@
+/* ----------------------------------
+* Seekbars
+* ---------------------------------- */
+div[role="slider"] {
+ position: relative;
+ height: 3.5rem;
+}
+
+div[role="slider"] > div {
+ display: block;
+ overflow: hidden;
+ padding: 0;
+ position: relative;
+ height: 100%;
+}
+
+div[role="slider"] progress {
+ width: 100%;
+ background: #000;
+ border: none;
+ height: 0.1rem;
+ display: block;
+ border-radius: 0;
+ margin-top: 1.9rem;
+}
+
+div[role="slider"] progress::-moz-progress-bar {
+ background: #01c5ed;
+ height: 0.6rem;
+ margin-top: -0.3rem;
+ border-radius: 0;
+}
+
+div[role="slider"] > label {
+ font-size: 1.5rem;
+ line-height: 3.8rem;
+ font-family: sans-serif;
+ color: #00aacb;
+ float: right;
+ padding: 0 0 0 1rem;
+ height: 3.5rem;
+ width: auto;
+}
+
+div[role="slider"] label:first-of-type {
+ float: left;
+ padding: 0 1rem 0 0;
+}
+
+div[role="slider"] > label.icon {
+ width: 3rem;
+ height: 3rem;
+ margin-top: 0.5rem;
+ font-size: 0;
+ background: no-repeat right top / 3rem auto;
+}
+
+div[role="slider"] > label.icon:first-of-type {
+ background-position: top left;
+}
+
+div[role="slider"] button {
+ width: 3.2rem;
+ height: 3.2rem;
+ background: url(seekbars/images/ui/handler.png) no-repeat center center / 3rem auto;
+ font: 0/0 a;
+ position: absolute;
+ top: 50%;
+ left: 0;
+ margin: -1.5rem 0 0 -1.6rem;
+ border-radius: 3.2rem;
+ border: solid 0.1rem transparent;
+ transition: border 0.15s ease;
+ padding: 0;
+}
+
+div[role="slider"] button:active {
+ border: solid 0.5rem #01c5ed;
+}
diff --git a/out/css/switches/images/check/danger.png b/out/css/switches/images/check/danger.png
new file mode 100644
index 0000000..ed1f267
Binary files /dev/null and b/out/css/switches/images/check/danger.png differ
diff --git a/out/css/switches/images/check/danger@1.5x.png b/out/css/switches/images/check/danger@1.5x.png
new file mode 100644
index 0000000..8d4b61d
Binary files /dev/null and b/out/css/switches/images/check/danger@1.5x.png differ
diff --git a/out/css/switches/images/check/danger@2x.png b/out/css/switches/images/check/danger@2x.png
new file mode 100644
index 0000000..7befd67
Binary files /dev/null and b/out/css/switches/images/check/danger@2x.png differ
diff --git a/out/css/switches/images/check/default.png b/out/css/switches/images/check/default.png
new file mode 100644
index 0000000..9f188bb
Binary files /dev/null and b/out/css/switches/images/check/default.png differ
diff --git a/out/css/switches/images/check/default@1.5x.png b/out/css/switches/images/check/default@1.5x.png
new file mode 100644
index 0000000..8c25cae
Binary files /dev/null and b/out/css/switches/images/check/default@1.5x.png differ
diff --git a/out/css/switches/images/check/default@2x.png b/out/css/switches/images/check/default@2x.png
new file mode 100644
index 0000000..3e19692
Binary files /dev/null and b/out/css/switches/images/check/default@2x.png differ
diff --git a/out/css/switches/images/radio/danger.png b/out/css/switches/images/radio/danger.png
new file mode 100644
index 0000000..d285887
Binary files /dev/null and b/out/css/switches/images/radio/danger.png differ
diff --git a/out/css/switches/images/radio/danger@1.5x.png b/out/css/switches/images/radio/danger@1.5x.png
new file mode 100644
index 0000000..3b6a7d2
Binary files /dev/null and b/out/css/switches/images/radio/danger@1.5x.png differ
diff --git a/out/css/switches/images/radio/danger@2x.png b/out/css/switches/images/radio/danger@2x.png
new file mode 100644
index 0000000..812f9a3
Binary files /dev/null and b/out/css/switches/images/radio/danger@2x.png differ
diff --git a/out/css/switches/images/radio/default.png b/out/css/switches/images/radio/default.png
new file mode 100644
index 0000000..086d61a
Binary files /dev/null and b/out/css/switches/images/radio/default.png differ
diff --git a/out/css/switches/images/radio/default@1.5x.png b/out/css/switches/images/radio/default@1.5x.png
new file mode 100644
index 0000000..27ead41
Binary files /dev/null and b/out/css/switches/images/radio/default@1.5x.png differ
diff --git a/out/css/switches/images/radio/default@2x.png b/out/css/switches/images/radio/default@2x.png
new file mode 100644
index 0000000..a93f80b
Binary files /dev/null and b/out/css/switches/images/radio/default@2x.png differ
diff --git a/out/css/switches/images/switch/background.png b/out/css/switches/images/switch/background.png
new file mode 100644
index 0000000..99bfe33
Binary files /dev/null and b/out/css/switches/images/switch/background.png differ
diff --git a/out/css/switches/images/switch/background@1.5x.png b/out/css/switches/images/switch/background@1.5x.png
new file mode 100644
index 0000000..d1c2bd5
Binary files /dev/null and b/out/css/switches/images/switch/background@1.5x.png differ
diff --git a/out/css/switches/images/switch/background_off.png b/out/css/switches/images/switch/background_off.png
new file mode 100644
index 0000000..963a0d1
Binary files /dev/null and b/out/css/switches/images/switch/background_off.png differ
diff --git a/out/css/switches/images/switch/background_off@1.5x.png b/out/css/switches/images/switch/background_off@1.5x.png
new file mode 100644
index 0000000..c7bb7f5
Binary files /dev/null and b/out/css/switches/images/switch/background_off@1.5x.png differ
diff --git a/out/css/value_selector/images/icons/checked.png b/out/css/value_selector/images/icons/checked.png
new file mode 100644
index 0000000..69d5c3d
Binary files /dev/null and b/out/css/value_selector/images/icons/checked.png differ
diff --git a/out/css/value_selector/images/icons/checked@1.5x.png b/out/css/value_selector/images/icons/checked@1.5x.png
new file mode 100644
index 0000000..490dded
Binary files /dev/null and b/out/css/value_selector/images/icons/checked@1.5x.png differ
diff --git a/out/css/value_selector/images/icons/checked@2x.png b/out/css/value_selector/images/icons/checked@2x.png
new file mode 100644
index 0000000..c1a6fbd
Binary files /dev/null and b/out/css/value_selector/images/icons/checked@2x.png differ
diff --git a/out/css/value_selector/images/ui/affirmative.png b/out/css/value_selector/images/ui/affirmative.png
new file mode 100644
index 0000000..c1823eb
Binary files /dev/null and b/out/css/value_selector/images/ui/affirmative.png differ
diff --git a/out/css/value_selector/images/ui/default.png b/out/css/value_selector/images/ui/default.png
new file mode 100644
index 0000000..a174b67
Binary files /dev/null and b/out/css/value_selector/images/ui/default.png differ
diff --git a/out/css/value_selector/images/ui/gradient.png b/out/css/value_selector/images/ui/gradient.png
new file mode 100644
index 0000000..d2e6f5b
Binary files /dev/null and b/out/css/value_selector/images/ui/gradient.png differ
diff --git a/out/css/value_selector/images/ui/gradient@1.5x.png b/out/css/value_selector/images/ui/gradient@1.5x.png
new file mode 100644
index 0000000..0e420cd
Binary files /dev/null and b/out/css/value_selector/images/ui/gradient@1.5x.png differ
diff --git a/out/css/value_selector/images/ui/pattern.png b/out/css/value_selector/images/ui/pattern.png
new file mode 100644
index 0000000..af03f56
Binary files /dev/null and b/out/css/value_selector/images/ui/pattern.png differ
diff --git a/out/css/value_selector/images/ui/shadow-invert.png b/out/css/value_selector/images/ui/shadow-invert.png
new file mode 100644
index 0000000..b1b905f
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow-invert.png differ
diff --git a/out/css/value_selector/images/ui/shadow-invert@1.5x.png b/out/css/value_selector/images/ui/shadow-invert@1.5x.png
new file mode 100644
index 0000000..ee2dc1c
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow-invert@1.5x.png differ
diff --git a/out/css/value_selector/images/ui/shadow-invert@2x.png b/out/css/value_selector/images/ui/shadow-invert@2x.png
new file mode 100644
index 0000000..15c95ed
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow-invert@2x.png differ
diff --git a/out/css/value_selector/images/ui/shadow.png b/out/css/value_selector/images/ui/shadow.png
new file mode 100644
index 0000000..728fe77
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow.png differ
diff --git a/out/css/value_selector/images/ui/shadow@1.5x.png b/out/css/value_selector/images/ui/shadow@1.5x.png
new file mode 100644
index 0000000..44b35b4
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow@1.5x.png differ
diff --git a/out/css/value_selector/images/ui/shadow@2x.png b/out/css/value_selector/images/ui/shadow@2x.png
new file mode 100644
index 0000000..f515eff
Binary files /dev/null and b/out/css/value_selector/images/ui/shadow@2x.png differ
diff --git a/out/img/icons/MozillaFXOSIconTemplate1_overlay.png b/out/img/icons/MozillaFXOSIconTemplate1_overlay.png
new file mode 100644
index 0000000..2389796
Binary files /dev/null and b/out/img/icons/MozillaFXOSIconTemplate1_overlay.png differ
diff --git a/out/img/icons/icon120.png b/out/img/icons/icon120.png
new file mode 100644
index 0000000..9519dd3
Binary files /dev/null and b/out/img/icons/icon120.png differ
diff --git a/out/img/icons/icon128.png b/out/img/icons/icon128.png
new file mode 100644
index 0000000..96e7f9f
Binary files /dev/null and b/out/img/icons/icon128.png differ
diff --git a/out/img/icons/icon16.png b/out/img/icons/icon16.png
new file mode 100644
index 0000000..186045d
Binary files /dev/null and b/out/img/icons/icon16.png differ
diff --git a/out/img/icons/icon2.png b/out/img/icons/icon2.png
new file mode 100644
index 0000000..559431b
Binary files /dev/null and b/out/img/icons/icon2.png differ
diff --git a/out/img/icons/icon2.svg b/out/img/icons/icon2.svg
new file mode 100644
index 0000000..6256192
--- /dev/null
+++ b/out/img/icons/icon2.svg
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/out/img/icons/icon32.png b/out/img/icons/icon32.png
new file mode 100644
index 0000000..78e4cf0
Binary files /dev/null and b/out/img/icons/icon32.png differ
diff --git a/Android/res/icons/android/icon-48-mdpi.png b/out/img/icons/icon48.png
similarity index 100%
rename from Android/res/icons/android/icon-48-mdpi.png
rename to out/img/icons/icon48.png
diff --git a/Android/res/icons/android/icon-60-hdpi.png b/out/img/icons/icon60.png
similarity index 100%
rename from Android/res/icons/android/icon-60-hdpi.png
rename to out/img/icons/icon60.png
diff --git a/out/img/icons/icon64.png b/out/img/icons/icon64.png
new file mode 100644
index 0000000..fd0041a
Binary files /dev/null and b/out/img/icons/icon64.png differ
diff --git a/out/img/icons/icon90.png b/out/img/icons/icon90.png
new file mode 100644
index 0000000..4e56717
Binary files /dev/null and b/out/img/icons/icon90.png differ
diff --git a/Android/index.html b/out/index.html
similarity index 91%
rename from Android/index.html
rename to out/index.html
index 31a15dd..64be561 100644
--- a/Android/index.html
+++ b/out/index.html
@@ -4,10 +4,10 @@
Sketchy
+
-
-
+
-
diff --git a/out/js/diff.js b/out/js/diff.js
new file mode 100644
index 0000000..739ae59
--- /dev/null
+++ b/out/js/diff.js
@@ -0,0 +1 @@
+$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}});
\ No newline at end of file
diff --git a/out/js/events.js b/out/js/events.js
new file mode 100644
index 0000000..8d6dc86
--- /dev/null
+++ b/out/js/events.js
@@ -0,0 +1 @@
+"use strict";$(document).ready(function(){$(".menu").on("click tap",function(){$("#menu").toggleClass("pulled")}),$(".save").on("click tap",function(){$("#save").removeClass("hidden")}),$(".load").on("click tap",function(){$("#load").removeClass("hidden"),$("#load li, #load p").remove();var a=JSON.parse(localStorage.getItem("projects"));if(!a||a.length<1)return void $("#load ol").append($("
No sketch found.
"));for(var c=0,d=a.length;d>c;c++)$("#load ol").append($("
"+a[c].name+" "));b.find("li").off("click").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2)").removeClass("hidden")})}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2) li").removeClass("hidden")}),$c.last().on("mousedown touchstart",function(a){a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]);var b=relative(a.pageX,a.pageY);startPoint(b.x,b.y),window.active=!0}).on("mousemove touchmove",function(a){if(a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]),window.active&&"line"!=settings.type){var b=relative(a.pageX,a.pageY);drawPoint(b.x,b.y)}}).on("mouseup touchend",function(a){if(a.preventDefault(),window.active=!1,"eraser"!=settings.type){if(window.points.history.last
div").addClass("hidden"),$("#menu div.options > .general, #menu div.options > ."+c).removeClass("hidden")),$(this).parents("form").addClass("hidden")}),a.submit(function(a){a.preventDefault(),$(this).addClass("hidden")});var b=$("form.confirm");b.each(function(){$(this).find("li").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$(this).find("button").last().on("click tap",function(a){a.preventDefault();var b=$(this).parents("form").attr("id");$(this).parents("form").find("h1").each(function(a){if(a>0){var c=$(this).html().toLowerCase(),d=$(this).parent().find("ol:nth-of-type("+a+") li[aria-selected] span").html();"file name"!==c&&"file"!==c&&(d=d.toLowerCase()),window[b][c]=d}}),$(this).parents("form").addClass("hidden"),window[b]()}),$(this).find("button").first().on("click tap",function(a){a.preventDefault(),$(this).parents("form").addClass("hidden")})});var d=$('button[id^="set"]');d.each(function(){var a=/set(.*)/.exec($(this).attr("id"))[1];return"color"==a||"bg"==a?$(this).on("click tap",function(){$(".picker").removeClass("hidden"),$(".picker").attr("data-caller",a),setTimeout(function(){$("body").on("click tap","canvas, #menu, header",function(){$(".picker").addClass("hidden"),$("body").off("click tap")})},500)}):void $(this).on("click tap",function(b){b.preventDefault(),$('form[id="'+a+'"]').removeClass("hidden")})});var e;$('div[role="slider"] button').on("mousedown touchstart",function(){$(this).attr("data-moving","true"),e||(e=$('div[role="slider"] button').offset().left)}).on("mousemove touchmove",function(a){if($(this).attr("data-moving")){a.changedTouches&&(a=a.changedTouches[0]);var b=parseInt(a.pageX-e-15),c=$("."+$(this).parents('div[role="slider"]').attr("class")),d=c.find("progress"),f=+d.attr("max"),g=+d.attr("min");if(f>=b&&b>=g){c.find("button").css("left",b+"%"),d.attr("value",b);var h=c.attr("class");settings[h]=b,$("#"+h+" span").html(b)}}}).on("mouseup mouseleave touchend",function(){$(this).removeAttr("data-moving")}),$(".fill, .stroke").on("click tap",function(){var a=$("."+$(this).attr("class")).find("span");"Yes"==a.html()?(a.html("No"),settings[$(this).attr("class")]=!1):(a.html("Yes"),settings[$(this).attr("class")]=!0)}),$(".close, .tour button, .vote button").on("click tap",function(){$(this).parent().addClass("hidden"),$("body").off("click tap")}),$("#clear").on("click tap",function(){c.clear();var a=window.points.history;window.points=[],window.points.history=a,window.points.history.last=a&&a>=c-f&&d+f>=b&&b>=d-f?!0:!1}function draw(a,b,c,d,e,f){if(e=e||{},f)var g=window.o;else var g=window.c;g.beginPath(),g.globalCompositeOperation="eraser"==settings.type?"destination-out":e.composite||settings.composite,g.lineCap=e.lineCap||settings.lineCap,g.lineJoin=e.lineJoin||settings.lineJoin,g.strokeStyle=e.color||settings.color,g.fillStyle=e.color||settings.color,g.lineWidth=(e.lineWidth||settings.lineWidth)/10,g.moveTo(a,b),g.lineTo(c,d),(!e.noStroke||settings.noStroke)&&g.stroke(),(e.fill||settings.fill)&&g.fill()}function mark(a,b){var c=window.o;c.beginPath(),c.fillStyle="red",c.arc(a,b,3,0,2*Math.PI),c.fill()}function erase(a,b,c,d,e){var e=e||{},f=window.c;f.beginPath(),f.lineWidth=(e.lineWidth||settings.lineWidth)/10,f.globalCompositeOperation="source-out",f.moveTo(a,b),f.lineTo(c,d),window.points=window.points.filter(function(e){return threshold(e.x,e.y,a,b,f.lineWidth)||threshold(e.x,e.y,c,d,f.lineWidth)?!1:!0})}function line(a,b,c){var c=c||{},d=window.o;d.beginPath(),d.lineCap=c.lineCap||settings.lineCap,d.lineJoin=c.lineJoin||settings.lineJoin,d.strokeStyle=c.color||settings.color,d.fillStyle=c.color||settings.color,d.lineWidth=(c.lineWidth||settings.lineWidth)/10;var e=settings.drawingLine.length-1;d.moveTo(settings.drawingLine[e].x,settings.drawingLine[e].y),d.lineTo(a,b),settings.drawingLine.push({x:a,y:b}),d.stroke(),(c.fill||settings.fill)&&d.fill()}function finishLine(a){var a=a||{},b=window.c;o.clear(),b.beginPath(),b.strokeStyle=a.color||settings.color,b.fillStyle=a.color||settings.color,b.lineWidth=(a.lineWidth||settings.lineWidth)/10,b.lineJoin=a.lineJoin||settings.lineJoin,b.lineCap=a.lineJoin||settings.lineJoin,b.moveTo(settings.drawingLine[0].x,settings.drawingLine[0].y);for(var c=1,d=settings.drawingLine.length;d>c;c++)b.lineTo(settings.drawingLine[c].x,settings.drawingLine[c].y);settings.stroke&&b.stroke(),settings.fill&&b.fill(),settings.drawingLine=[],window.points.history.push({data:b.getImageData(0,0,width(),height()),points:window.points.slice(0)}),window.points.history.last=window.points.history.length-1}function undo(){var a=window.points.history;if(a.last>1){var b=a[a.last-1];c.putImageData(b.data,0,0),window.points=b.points.slice(0),window.points.history=a,window.points.history.last=a.last-1}else c.clear(),window.points=[],window.points.history=a,window.points.history.last=0}function redo(){var a=window.points.history;if(a.last1&&(d&&threshold(d.x,d.y,a,b,f[0])||threshold(c.x,c.y,a,b,f[1]))?(window.active=!1,points[points.length-1].type="",points[points.length-1].start=void 0,void finishLine()):void points.push(e)}function drawPoint(a,b){var c=points[points.length-1];switch(c.type){case"eraser":erase(c.x,c.y,a,b);case"pencil":draw(c.x,c.y,a,b);var d={x:a,y:b,start:c.start,type:c.type};points.push(d);break;case"sketch":draw(c.x,c.y,a,b);var d={x:a,y:b,start:c.start,type:c.type};points.push(d);for(var e=0,f=points.length-1;f>e;e++)if(threshold(points[e].x,points[e].y,d.x,d.y,settings.connectTelorance)){var a=points[e].x-d.x,b=points[e].y-d.y,g=settings.lineWidth/20>.2?settings.lineWidth/20:.2;draw(points[e].x-.2*a,points[e].y-.2*b,d.x+.2*a,d.y+.2*b,{strokeStyle:"rgba(0,0,0,0.4)",lineWidth:g})}break;case"fur":draw(c.x,c.y,a,b);var d={x:a,y:b,start:c.start,type:c.type};points.push(d);for(var e=0,f=points.length-1;f>e;e++)if(threshold(points[e].x,points[e].y,d.x,d.y,settings.connectTelorance)){var a=points[e].x-d.x,b=points[e].y-d.y,h=settings.furLength/100||.2,g=settings.lineWidth/20>.2?settings.lineWidth/20:.2;draw(points[e].x+a*h,points[e].y+b*h,d.x-a*h,d.y-b*h,{strokeStyle:"rgba(0,0,0,0.4)",lineWidth:g})}break;case"shape":o.clear(),o.beginPath(),o.fillStyle=settings.color,o.strokeStyle=settings.color,o.lineWidth=settings.lineWidth/20;var i=settings.shapeStart;switch(settings.shape){case"circle":var j=Math.abs(a-i.x);o.arc(i.x,i.y,j,0,2*Math.PI),settings.comShape={type:"circle",x:i.x,y:i.y,radius:j};break;case"rectangle":var g=a-i.x,k=b-i.y;o.rect(i.x,i.y,g,k),settings.comShape={type:"rectangle",x:i.x,y:i.y,w:g,h:k};break;case"square":var g=a-i.x;o.rect(i.x,i.y,g,g),settings.comShape={type:"rectangle",x:i.x,y:i.y,w:g,h:g};break;case"triangle":var l=(a-i.x)/2,m=(b-i.y)/2;o.moveTo(i.x+l,i.y),o.lineTo(a,b),o.lineTo(i.x,b),o.lineTo(i.x+l,i.y),settings.comShape={type:"triangle",start:{x:i.x,y:i.y},x:a,y:b,dix:l,diy:m}}settings.fill&&o.fill(),settings.stroke&&o.stroke()}}
\ No newline at end of file
diff --git a/out/js/libs/color-picker-touch.js b/out/js/libs/color-picker-touch.js
new file mode 100644
index 0000000..a4b5f79
--- /dev/null
+++ b/out/js/libs/color-picker-touch.js
@@ -0,0 +1 @@
+$(function(){"use strict";function a(a,b,c){a/=360,b/=100,c/=100;var d,e,f;if(0==b)d=e=f=c;else{var g=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;d=g(i,h,a+1/3),e=g(i,h,a),f=g(i,h,a-1/3)}return{red:Math.round(255*d),green:Math.round(255*e),blue:Math.round(255*f)}}function b(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{hue:Math.round(360*d),saturation:Math.round(100*e),luminosity:Math.round(100*h)}}function c(a,b,c){return"#"+((1<<24)+(a<<16)+(b<<8)+c).toString(16).slice(1)}function d(a){var b=parseInt(a.replace("#",""),16),c=b>>16&255,d=b>>8&255,e=255&b;return{red:c,green:d,blue:e}}function e(a){var c=d(a);return b(c.red,c.green,c.blue)}function f(b,d,e){var f=a(b,d,e);return c(f.red,f.green,f.blue)}$.each($(".color-picker"),function(){function c(){var a=h.find(".pin").position(),b=l.width(),c=l.height();return{hue:Math.round(a.left/b*360),saturation:Math.round(a.top/c*100),luminosity:k.val()}}function d(){var b=c();switch(i.val()){case"HSL":j.val("hsl("+b.hue+", "+b.saturation+"%, "+b.luminosity+"%)");break;case"RGB":var d=a(b.hue,b.saturation,b.luminosity);j.val("rgb("+d.red+", "+d.green+", "+d.blue+")");break;case"Hex":j.val(f(b.hue,b.saturation,b.luminosity))}h.trigger("change")}function g(a){var b,c;50>=a?(b="0, 0, 0",c=1-a/100*2):(b="255, 255, 255",c=a/100*2-1),l.children().css("background-color","rgba("+b+", "+c+")")}var h=$(this),i=h.find(".format"),j=h.find(".color"),k=h.find("input[type=range]"),l=h.find(".spectrum"),m=h.find(".pin");i.on("change",function(){d()}),j.on("change",function(){var a;switch(i.val()){case"HSL":var c=$(this).val().match(/\d+/g);a={hue:c[0],saturation:c[1],luminosity:c[2]};break;case"RGB":var c=$(this).val().match(/\d+/g);a=b(c[0],c[1],c[2]);break;case"Hex":a=e($(this).val())}k.val(a.luminosity),g(a.luminosity),m.css({left:a.hue/360*100+"%",top:a.saturation+"%"}),h.trigger("change")}),k.on("change",function(){g($(this).val()),d()});var n=function(a){var b=l.offset(),c=l.width(),e=l.height(),f=a.changedTouches[0].clientX-b.left,g=a.changedTouches[0].clientY-b.top;0>f?f=0:f>=c&&(f=c),0>g?g=0:g>=e&&(g=e),m.css({left:f/c*100+"%",top:g/e*100+"%"}),d()};l.on("touchstart",function(a){a.preventDefault(),n(a),l.addClass("active"),$(document).on("touchmove",n)}),$(document).on("touchend",function(){l.removeClass("active"),$(document).off("touchmove",n)}),l.on("touchmove touchstart",n),h.on("change",function(){j.css("background-color",j.val()).toggleClass("dark",k.val()<=50)}),j.trigger("change")})});
\ No newline at end of file
diff --git a/out/js/libs/color-picker.js b/out/js/libs/color-picker.js
new file mode 100644
index 0000000..0563b45
--- /dev/null
+++ b/out/js/libs/color-picker.js
@@ -0,0 +1 @@
+$(function(){"use strict";function a(a,b,c){a/=360,b/=100,c/=100;var d,e,f;if(0==b)d=e=f=c;else{var g=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;d=g(i,h,a+1/3),e=g(i,h,a),f=g(i,h,a-1/3)}return{red:Math.round(255*d),green:Math.round(255*e),blue:Math.round(255*f)}}function b(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{hue:Math.round(360*d),saturation:Math.round(100*e),luminosity:Math.round(100*h)}}function c(a,b,c){return"#"+((1<<24)+(a<<16)+(b<<8)+c).toString(16).slice(1)}function d(a){var b=parseInt(a.replace("#",""),16),c=b>>16&255,d=b>>8&255,e=255&b;return{red:c,green:d,blue:e}}function e(a){var c=d(a);return b(c.red,c.green,c.blue)}function f(b,d,e){var f=a(b,d,e);return c(f.red,f.green,f.blue)}$.each($(".color-picker"),function(){function c(){var a=h.find(".pin").position(),b=l.width(),c=l.height();return{hue:Math.round(a.left/b*360),saturation:Math.round(a.top/c*100),luminosity:k.val()}}function d(){var b=c();switch(i.val()){case"HSL":j.val("hsl("+b.hue+", "+b.saturation+"%, "+b.luminosity+"%)");break;case"RGB":var d=a(b.hue,b.saturation,b.luminosity);j.val("rgb("+d.red+", "+d.green+", "+d.blue+")");break;case"Hex":j.val(f(b.hue,b.saturation,b.luminosity))}h.trigger("change")}function g(a){var b,c;50>=a?(b="0, 0, 0",c=1-a/100*2):(b="255, 255, 255",c=a/100*2-1),l.children().css("background-color","rgba("+b+", "+c+")")}var h=$(this),i=h.find(".format"),j=h.find(".color"),k=h.find("input[type=range]"),l=h.find(".spectrum"),m=h.find(".pin");i.on("change",function(){d()}),j.on("change",function(){var a;switch(i.val()){case"HSL":var c=$(this).val().match(/\d+/g);a={hue:c[0],saturation:c[1],luminosity:c[2]};break;case"RGB":var c=$(this).val().match(/\d+/g);a=b(c[0],c[1],c[2]);break;case"Hex":a=e($(this).val())}k.val(a.luminosity),g(a.luminosity),m.css({left:a.hue/360*100+"%",top:a.saturation+"%"}),h.trigger("change")}),k.on("change",function(){g($(this).val()),d()});var n=function(a){var b=l.offset(),c=l.width(),e=l.height(),f=a.clientX-b.left,g=a.clientY-b.top;0>f?f=0:f>=c&&(f=c),0>g?g=0:g>=e&&(g=e),m.css({left:f/c*100+"%",top:g/e*100+"%"}),d()};l.on("mousedown",function(a){a.preventDefault(),n(a),l.addClass("active"),$(document).on("mousemove",n)}),$(document).on("mouseup",function(){l.removeClass("active"),$(document).off("mousemove",n)}),l.on("touchmove touchstart",n),h.on("change",function(){j.css("background-color",j.val()).toggleClass("dark",k.val()<=50)}),j.trigger("change")})});
\ No newline at end of file
diff --git a/out/js/libs/mobilebrowsers.js b/out/js/libs/mobilebrowsers.js
new file mode 100644
index 0000000..a7caf2a
--- /dev/null
+++ b/out/js/libs/mobilebrowsers.js
@@ -0,0 +1 @@
+!function(a){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(window.mobile=!0)}(navigator.userAgent||navigator.vendor||window.opera,"http://detectmobilebrowser.com/mobile");
\ No newline at end of file
diff --git a/out/js/libs/stack.js b/out/js/libs/stack.js
new file mode 100644
index 0000000..f9c8d3b
--- /dev/null
+++ b/out/js/libs/stack.js
@@ -0,0 +1 @@
+!function(a){a.fn.end=function(){return this.prevObject||a()},a.fn.andSelf=function(){return this.add(this.prevObject||a())},"filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=c.apply(this,arguments);return a.prevObject=this,a}})}(Zepto);
\ No newline at end of file
diff --git a/out/js/libs/touch.js b/out/js/libs/touch.js
new file mode 100644
index 0000000..4981bd7
--- /dev/null
+++ b/out/js/libs/touch.js
@@ -0,0 +1 @@
+!function(a){function b(a,b,c,d){return Math.abs(a-b)>=Math.abs(c-d)?a-b>0?"Left":"Right":c-d>0?"Up":"Down"}function c(){k=null,m.last&&(m.el.trigger("longTap"),window.touchEl=m.el,m={})}function d(){k&&clearTimeout(k),k=null}function e(){h&&clearTimeout(h),i&&clearTimeout(i),j&&clearTimeout(j),k&&clearTimeout(k),h=i=j=k=null,m={}}function f(a){return("touch"==a.pointerType||a.pointerType==a.MSPOINTER_TYPE_TOUCH)&&a.isPrimary}function g(a,b){return a.type=="pointer"+b||a.type.toLowerCase()=="mspointer"+b}var h,i,j,k,l,m={},n=750;a(document).ready(function(){var o,p,q,r,s=0,t=0;"MSGesture"in window&&(l=new MSGesture,l.target=document.body),a(document).bind("MSGestureEnd",function(a){var b=a.velocityX>1?"Right":a.velocityX<-1?"Left":a.velocityY>1?"Down":a.velocityY<-1?"Up":null;b&&(m.el.trigger("swipe"),m.el.trigger("swipe"+b))}).on("touchstart MSPointerDown pointerdown",function(b){(!(r=g(b,"down"))||f(b))&&(q=r?b:b.touches[0],b.touches&&1===b.touches.length&&m.x2&&(m.x2=void 0,m.y2=void 0),o=Date.now(),p=o-(m.last||o),m.el=a("tagName"in q.target?q.target:q.target.parentNode),h&&clearTimeout(h),m.x1=q.pageX,m.y1=q.pageY,p>0&&250>=p&&(m.isDoubleTap=!0),m.last=o,k=setTimeout(c,n),l&&r&&l.addPointer(b.pointerId))}).on("touchmove MSPointerMove pointermove",function(b){(!(r=g(b,"move"))||f(b))&&(q=r?b:b.touches[0],a.moveCancel&&d(),m.x2=q.pageX,m.y2=q.pageY,s+=Math.abs(m.x1-m.x2),t+=Math.abs(m.y1-m.y2))}).on("touchend MSPointerUp pointerup",function(c){(!(r=g(c,"up"))||f(c))&&(d(),m.x2&&Math.abs(m.x1-m.x2)>30||m.y2&&Math.abs(m.y1-m.y2)>30?j=setTimeout(function(){m.el.trigger("swipe"),m.el.trigger("swipe"+b(m.x1,m.x2,m.y1,m.y2)),m={}},0):"last"in m&&(30>s&&30>t?i=setTimeout(function(){var b=a.Event("tap");b.cancelTouch=e,m.el.trigger(b),m.isDoubleTap?(m.el&&m.el.trigger("doubleTap"),m={}):h=setTimeout(function(){h=null,m.el&&m.el.trigger("singleTap"),m={}},250)},0):m={}),s=t=0)}).on("touchcancel MSPointerCancel pointercancel",e),a(window).on("scroll",e)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(b){a.fn[b]=function(a){return this.on(b,a)}})}(Zepto);
\ No newline at end of file
diff --git a/out/js/libs/yepnope.min.js b/out/js/libs/yepnope.min.js
new file mode 100644
index 0000000..bd57852
--- /dev/null
+++ b/out/js/libs/yepnope.min.js
@@ -0,0 +1 @@
+!function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;g>c;c++)d=a[c].split("="),(b=B[d.shift()])&&(f=b(f,d));for(c=0;e>c;c++)f=z[c](f);return f}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(A[i.url]?i.noexec=!0:A[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),A[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}),g(a,l,b,0,j);else if(Object(a)===a)for(i in h=function(){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c}(),a)a.hasOwnProperty(i)&&(!c&&!--h&&(d(l)?l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}:l[i]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),n()}}(m[i])),g(a[i],l,b,i,j))}else!c&&n()}var h,i,j=!!a.test,k=a.load||a.both,l=a.callback||f,m=l,n=a.complete||f;c(j?a.yep:a.nope,!!k),k&&c(k)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(y(a))for(i=0;i0?y.fn.concat.apply([],a):a}function k(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(a){return a in H?H[a]:H[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function m(a,b){return"number"!=typeof b||I[k(a)]?b:b+"px"}function n(a){var b,c;return G[a]||(b=F.createElement(a),F.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),G[a]=c),G[a]}function o(a){return"children"in a?D.call(a.children):y.map(a.childNodes,function(a){return 1==a.nodeType?a:void 0})}function p(a,b,c){for(x in b)c&&(f(b[x])||g(b[x]))?(f(b[x])&&!f(a[x])&&(a[x]={}),g(b[x])&&!g(a[x])&&(a[x]=[]),p(a[x],b[x],c)):b[x]!==w&&(a[x]=b[x])}function q(a,b){return null==b?y(a):y(a).filter(b)}function r(a,c,d,e){return b(c)?c.call(a,d,e):c}function s(a,b,c){null==c?a.removeAttribute(b):a.setAttribute(b,c)}function t(a,b){var c=a.className,d=c&&c.baseVal!==w;return b===w?d?c.baseVal:c:void(d?c.baseVal=b:a.className=b)}function u(a){var b;try{return a?"true"==a||("false"==a?!1:"null"==a?null:/^0/.test(a)||isNaN(b=Number(a))?/^[\[\{]/.test(a)?y.parseJSON(a):a:b):a}catch(c){return a}}function v(a,b){b(a);for(var c in a.childNodes)v(a.childNodes[c],b)}var w,x,y,z,A,B,C=[],D=C.slice,E=C.filter,F=window.document,G={},H={},I={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},J=/^\s*<(\w+|!)[^>]*>/,K=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,M=/^(?:body|html)$/i,N=/([A-Z])/g,O=["val","css","html","text","data","width","height","offset"],P=["after","prepend","before","append"],Q=F.createElement("table"),R=F.createElement("tr"),S={tr:F.createElement("tbody"),tbody:Q,thead:Q,tfoot:Q,td:R,th:R,"*":F.createElement("div")},T=/complete|loaded|interactive/,U=/^[\w-]*$/,V={},W=V.toString,X={},Y=F.createElement("div"),Z={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"};return X.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=Y).appendChild(a),d=~X.qsa(e,b).indexOf(a),f&&Y.removeChild(a),d},A=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},B=function(a){return E.call(a,function(b,c){return a.indexOf(b)==c})},X.fragment=function(a,b,c){var d,e,g;return K.test(a)&&(d=y(F.createElement(RegExp.$1))),d||(a.replace&&(a=a.replace(L,"<$1>$2>")),b===w&&(b=J.test(a)&&RegExp.$1),b in S||(b="*"),g=S[b],g.innerHTML=""+a,d=y.each(D.call(g.childNodes),function(){g.removeChild(this)})),f(c)&&(e=y(d),y.each(c,function(a,b){O.indexOf(a)>-1?e[a](b):e.attr(a,b)})),d},X.Z=function(a,b){return a=a||[],a.__proto__=y.fn,a.selector=b||"",a},X.isZ=function(a){return a instanceof X.Z},X.init=function(a,c){var d;if(!a)return X.Z();if("string"==typeof a)if(a=a.trim(),"<"==a[0]&&J.test(a))d=X.fragment(a,RegExp.$1,c),a=null;else{if(c!==w)return y(c).find(a);d=X.qsa(F,a)}else{if(b(a))return y(F).ready(a);if(X.isZ(a))return a;if(g(a))d=i(a);else if(e(a))d=[a],a=null;else if(J.test(a))d=X.fragment(a.trim(),RegExp.$1,c),a=null;else{if(c!==w)return y(c).find(a);d=X.qsa(F,a)}}return X.Z(d,a)},y=function(a,b){return X.init(a,b)},y.extend=function(a){var b,c=D.call(arguments,1);return"boolean"==typeof a&&(b=a,a=c.shift()),c.forEach(function(c){p(a,c,b)}),a},X.qsa=function(a,b){var c,e="#"==b[0],f=!e&&"."==b[0],g=e||f?b.slice(1):b,h=U.test(g);return d(a)&&h&&e?(c=a.getElementById(g))?[c]:[]:1!==a.nodeType&&9!==a.nodeType?[]:D.call(h&&!e?f?a.getElementsByClassName(g):a.getElementsByTagName(b):a.querySelectorAll(b))},y.contains=function(a,b){return a!==b&&a.contains(b)},y.type=a,y.isFunction=b,y.isWindow=c,y.isArray=g,y.isPlainObject=f,y.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},y.inArray=function(a,b,c){return C.indexOf.call(b,a,c)},y.camelCase=A,y.trim=function(a){return null==a?"":String.prototype.trim.call(a)},y.uuid=0,y.support={},y.expr={},y.map=function(a,b){var c,d,e,f=[];if(h(a))for(d=0;d=0?a:a+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){return C.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return b(a)?this.not(this.not(a)):y(E.call(this,function(b){return X.matches(b,a)}))},add:function(a,b){return y(B(this.concat(y(a,b))))},is:function(a){return this.length>0&&X.matches(this[0],a)},not:function(a){var c=[];if(b(a)&&a.call!==w)this.each(function(b){a.call(this,b)||c.push(this)});else{var d="string"==typeof a?this.filter(a):h(a)&&b(a.item)?D.call(a):y(a);this.forEach(function(a){d.indexOf(a)<0&&c.push(a)})}return y(c)},has:function(a){return this.filter(function(){return e(a)?y.contains(this,a):y(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!e(a)?a:y(a)},last:function(){var a=this[this.length-1];return a&&!e(a)?a:y(a)},find:function(a){var b,c=this;return b="object"==typeof a?y(a).filter(function(){var a=this;return C.some.call(c,function(b){return y.contains(b,a)})}):1==this.length?y(X.qsa(this[0],a)):this.map(function(){return X.qsa(this,a)})},closest:function(a,b){var c=this[0],e=!1;for("object"==typeof a&&(e=y(a));c&&!(e?e.indexOf(c)>=0:X.matches(c,a));)c=c!==b&&!d(c)&&c.parentNode;return y(c)},parents:function(a){for(var b=[],c=this;c.length>0;)c=y.map(c,function(a){return(a=a.parentNode)&&!d(a)&&b.indexOf(a)<0?(b.push(a),a):void 0});return q(b,a)},parent:function(a){return q(B(this.pluck("parentNode")),a)},children:function(a){return q(this.map(function(){return o(this)}),a)},contents:function(){return this.map(function(){return D.call(this.childNodes)})},siblings:function(a){return q(this.map(function(a,b){return E.call(o(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return y.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=n(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var c=b(a);if(this[0]&&!c)var d=y(a).get(0),e=d.parentNode||this.length>1;return this.each(function(b){y(this).wrapAll(c?a.call(this,b):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){y(this[0]).before(a=y(a));for(var b;(b=a.children()).length;)a=b.first();y(a).append(this)}return this},wrapInner:function(a){var c=b(a);return this.each(function(b){var d=y(this),e=d.contents(),f=c?a.call(this,b):a;e.length?e.wrapAll(f):d.append(f)})},unwrap:function(){return this.parent().each(function(){y(this).replaceWith(y(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=y(this);(a===w?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return y(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return y(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return 0===arguments.length?this.length>0?this[0].innerHTML:null:this.each(function(b){var c=this.innerHTML;y(this).empty().append(r(this,a,b,c))})},text:function(a){return 0===arguments.length?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=a===w?"":""+a})},attr:function(a,b){var c;return"string"==typeof a&&b===w?0==this.length||1!==this[0].nodeType?w:"value"==a&&"INPUT"==this[0].nodeName?this.val():!(c=this[0].getAttribute(a))&&a in this[0]?this[0][a]:c:this.each(function(c){if(1===this.nodeType)if(e(a))for(x in a)s(this,x,a[x]);else s(this,a,r(this,b,c,this.getAttribute(a)))})},removeAttr:function(a){return this.each(function(){1===this.nodeType&&s(this,a)})},prop:function(a,b){return a=Z[a]||a,b===w?this[0]&&this[0][a]:this.each(function(c){this[a]=r(this,b,c,this[a])})},data:function(a,b){var c=this.attr("data-"+a.replace(N,"-$1").toLowerCase(),b);return null!==c?u(c):w},val:function(a){return 0===arguments.length?this[0]&&(this[0].multiple?y(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(b){this.value=r(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var c=y(this),d=r(this,a,b,c.offset()),e=c.offsetParent().offset(),f={top:d.top-e.top,left:d.left-e.left};"static"==c.css("position")&&(f.position="relative"),c.css(f)});if(0==this.length)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(b,c){if(arguments.length<2){var d=this[0],e=getComputedStyle(d,"");if(!d)return;if("string"==typeof b)return d.style[A(b)]||e.getPropertyValue(b);if(g(b)){var f={};return y.each(g(b)?b:[b],function(a,b){f[b]=d.style[A(b)]||e.getPropertyValue(b)}),f}}var h="";if("string"==a(b))c||0===c?h=k(b)+":"+m(b,c):this.each(function(){this.style.removeProperty(k(b))});else for(x in b)b[x]||0===b[x]?h+=k(x)+":"+m(x,b[x])+";":this.each(function(){this.style.removeProperty(k(x))});return this.each(function(){this.style.cssText+=";"+h})},index:function(a){return a?this.indexOf(y(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return a?C.some.call(this,function(a){return this.test(t(a))},l(a)):!1},addClass:function(a){return a?this.each(function(b){z=[];var c=t(this),d=r(this,a,b,c);d.split(/\s+/g).forEach(function(a){y(this).hasClass(a)||z.push(a)},this),z.length&&t(this,c+(c?" ":"")+z.join(" "))}):this},removeClass:function(a){return this.each(function(b){return a===w?t(this,""):(z=t(this),r(this,a,b,z).split(/\s+/g).forEach(function(a){z=z.replace(l(a)," ")}),t(this,z.trim()),void 0)})},toggleClass:function(a,b){return a?this.each(function(c){var d=y(this),e=r(this,a,c,t(this));e.split(/\s+/g).forEach(function(a){(b===w?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})}):this},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===w?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a===w?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=M.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(y(a).css("margin-top"))||0,c.left-=parseFloat(y(a).css("margin-left"))||0,d.top+=parseFloat(y(b[0]).css("border-top-width"))||0,d.left+=parseFloat(y(b[0]).css("border-left-width"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||F.body;a&&!M.test(a.nodeName)&&"static"==y(a).css("position");)a=a.offsetParent;return a})}},y.fn.detach=y.fn.remove,["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});y.fn[a]=function(e){var f,g=this[0];return e===w?c(g)?g["inner"+b]:d(g)?g.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){g=y(this),g.css(a,r(this,e,b,g[a]()))})}}),P.forEach(function(b,c){var d=c%2;y.fn[b]=function(){var b,e,f=y.map(arguments,function(c){return b=a(c),"object"==b||"array"==b||null==c?c:X.fragment(c)}),g=this.length>1;return f.length<1?this:this.each(function(a,b){e=d?b:b.parentNode,b=0==c?b.nextSibling:1==c?b.firstChild:2==c?b:null,f.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!e)return y(a).remove();v(e.insertBefore(a,b),function(a){null!=a.nodeName&&"SCRIPT"===a.nodeName.toUpperCase()&&(!a.type||"text/javascript"===a.type)&&!a.src&&window.eval.call(window,a.innerHTML)})})})},y.fn[d?b+"To":"insert"+(c?"Before":"After")]=function(a){return y(a)[b](this),this}}),X.Z.prototype=y.fn,X.uniq=B,X.deserializeValue=u,y.zepto=X,y}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(a){function b(a){return a._zid||(a._zid=m++)}function c(a,c,f,g){if(c=d(c),c.ns)var h=e(c.ns);return(q[b(a)]||[]).filter(function(a){return!(!a||c.e&&a.e!=c.e||c.ns&&!h.test(a.ns)||f&&b(a.fn)!==b(f)||g&&a.sel!=g)})}function d(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function e(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function f(a,b){return a.del&&!s&&a.e in t||!!b}function g(a){return u[a]||s&&t[a]||a}function h(c,e,h,i,k,m,n){var o=b(c),p=q[o]||(q[o]=[]);e.split(/\s/).forEach(function(b){if("ready"==b)return a(document).ready(h);var e=d(b);e.fn=h,e.sel=k,e.e in u&&(h=function(b){var c=b.relatedTarget;return!c||c!==this&&!a.contains(this,c)?e.fn.apply(this,arguments):void 0}),e.del=m;var o=m||h;e.proxy=function(a){if(a=j(a),!a.isImmediatePropagationStopped()){a.data=i;var b=o.apply(c,a._args==l?[a]:[a].concat(a._args));return b===!1&&(a.preventDefault(),a.stopPropagation()),b}},e.i=p.length,p.push(e),"addEventListener"in c&&c.addEventListener(g(e.e),e.proxy,f(e,n))})}function i(a,d,e,h,i){var j=b(a);(d||"").split(/\s/).forEach(function(b){c(a,b,e,h).forEach(function(b){delete q[j][b.i],"removeEventListener"in a&&a.removeEventListener(g(b.e),b.proxy,f(b,i))})})}function j(b,c){return(c||!b.isDefaultPrevented)&&(c||(c=b),a.each(y,function(a,d){var e=c[a];b[a]=function(){return this[d]=v,e&&e.apply(c,arguments)},b[d]=w}),(c.defaultPrevented!==l?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())&&(b.isDefaultPrevented=v)),b}function k(a){var b,c={originalEvent:a};for(b in a)!x.test(b)&&a[b]!==l&&(c[b]=a[b]);return j(c,a)}var l,m=(a.zepto.qsa,1),n=Array.prototype.slice,o=a.isFunction,p=function(a){return"string"==typeof a},q={},r={},s="onfocusin"in window,t={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};r.click=r.mousedown=r.mouseup=r.mousemove="MouseEvents",a.event={add:h,remove:i},a.proxy=function(c,d){if(o(c)){var e=function(){return c.apply(d,arguments)};return e._zid=b(c),e}if(p(d))return a.proxy(c[d],c);throw new TypeError("expected function")},a.fn.bind=function(a,b,c){return this.on(a,b,c)},a.fn.unbind=function(a,b){return this.off(a,b)},a.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var v=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$)/,y={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(a,b,c){return this.on(b,a,c)},a.fn.undelegate=function(a,b,c){return this.off(b,a,c)},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,d,e,f){var g,j,m=this;return b&&!p(b)?(a.each(b,function(a,b){m.on(a,c,d,b,f)}),m):(!p(c)&&!o(e)&&e!==!1&&(e=d,d=c,c=l),(o(d)||d===!1)&&(e=d,d=l),e===!1&&(e=w),m.each(function(l,m){f&&(g=function(a){return i(m,a.type,e),e.apply(this,arguments)}),c&&(j=function(b){var d,f=a(b.target).closest(c,m).get(0);return f&&f!==m?(d=a.extend(k(b),{currentTarget:f,liveFired:m}),(g||e).apply(f,[d].concat(n.call(arguments,1)))):void 0}),h(m,b,e,d,c,j||g)}))},a.fn.off=function(b,c,d){var e=this;return b&&!p(b)?(a.each(b,function(a,b){e.off(a,c,b)}),e):(!p(c)&&!o(d)&&d!==!1&&(d=c,c=l),d===!1&&(d=w),e.each(function(){i(this,b,d,c)}))},a.fn.trigger=function(b,c){return b=p(b)||a.isPlainObject(b)?a.Event(b):j(b),b._args=c,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(b):a(this).triggerHandler(b,c)})},a.fn.triggerHandler=function(b,d){var e,f;return this.each(function(g,h){e=k(p(b)?a.Event(b):b),e._args=d,e.target=h,a.each(c(h,b.type||b),function(a,b){return f=b.proxy(e),e.isImmediatePropagationStopped()?!1:void 0})}),f},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.each(function(){try{this[b]()}catch(a){}}),this}}),a.Event=function(a,b){p(a)||(b=a,a=b.type);var c=document.createEvent(r[a]||"Events"),d=!0;if(b)for(var e in b)"bubbles"==e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),j(c)}}(Zepto),function(a){function b(b,c,d){var e=a.Event(c);return a(b).trigger(e,d),!e.isDefaultPrevented()}function c(a,c,d,e){return a.global?b(c||s,d,e):void 0}function d(b){b.global&&0===a.active++&&c(b,null,"ajaxStart")}function e(b){b.global&&!--a.active&&c(b,null,"ajaxStop")}function f(a,b){var d=b.context;return b.beforeSend.call(d,a,b)===!1||c(b,d,"ajaxBeforeSend",[a,b])===!1?!1:void c(b,d,"ajaxSend",[a,b])}function g(a,b,d,e){var f=d.context,g="success";d.success.call(f,a,g,b),e&&e.resolveWith(f,[a,g,b]),c(d,f,"ajaxSuccess",[b,d,a]),i(g,b,d)}function h(a,b,d,e,f){var g=e.context;e.error.call(g,d,b,a),f&&f.rejectWith(g,[d,b,a]),c(e,g,"ajaxError",[d,e,a||b]),i(b,d,e)}function i(a,b,d){var f=d.context;d.complete.call(f,b,a),c(d,f,"ajaxComplete",[b,d]),e(d)}function j(){}function k(a){return a&&(a=a.split(";",2)[0]),a&&(a==x?"html":a==w?"json":u.test(a)?"script":v.test(a)&&"xml")||"text"}function l(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function m(b){b.processData&&b.data&&"string"!=a.type(b.data)&&(b.data=a.param(b.data,b.traditional)),b.data&&(!b.type||"GET"==b.type.toUpperCase())&&(b.url=l(b.url,b.data),b.data=void 0)}function n(b,c,d,e){var f=!a.isFunction(c);return{url:b,data:f?c:void 0,success:f?a.isFunction(d)?d:void 0:c,dataType:f?e||d:d}}function o(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,i){f=a.type(i),e&&(c=d?e:e+"["+(h||"object"==f||"array"==f?c:"")+"]"),!e&&g?b.add(i.name,i.value):"array"==f||!d&&"object"==f?o(b,i,d,c):b.add(c,i)})}var p,q,r=0,s=window.document,t=/